Receipt Object

The values contained in the receipt object are those that were printed on the original receipt, and it is important to note that no derived values are returned.

As an example, if a receipt does not have the net price (the price before VAT) this value will not be calculated by the API (even though this is possible given the rest of the information in the receipt) but will instead have the value null (see the net keys in the example receipt below).

Thus, null values in the receipt object indicate a field that was not available on the original receipt. Consumers of the GET /receipts (v1) resource should, if necessary, calculate any missing values themselves.

Each receipt is a object with a number of keys:

Name

Type

Description

items

array of Item Objects, required, min: 1

see Item Object

identifier

string, optional

retailer-specific consumer identifier (loyalty card number, e-mail address or other)

properties

Receipt Properties Object, optional

see Receipt Properties Object

transaction_id

string, required

retailer-specific, unique transaction identifier

localtime

string, required, date and time (timezone optional) using ISO 8601

the date and time on the receipt, optionally including the timezone offset in which the receipt was generated (the receipt, store, or retailer timezone is used if a timezone offset is not included) formatted as an ISO 8601 date and time

payments

array of Payment Objects, optional

see Payment Object

total

float, required

the total price on the receipt

subtotal

float, optional

the subtotal on the receipt

gross

float, optional

the gross price

net

float, optional

the net price

vat

array of VAT Objects, optional

deprecated: use taxes instead

taxes

array of Tax Objects, optional

see Tax Object

discounts

array of Discount Objects, optional

see Discount Object

store_reference

integer or string, required

the store identifier

store

Store Object, required

see Store Object

l10n

L10N Object, optional

see L10N Object

incomplete

boolean, optional, default: false

signifies missing fields on the receipt

duplicate

boolean, optional, default: false

signifies that this receipt is a duplicate - for details, see Duplicate Receipts

external_id

string, optional

a UUIDv4, as defined in RFC 4122

attachments

mapping of labels to Attachments, optional

see Attachment Object

id

string, required

the unique receipt identifier

_links

mapping, optional

receipt links

timestamp

string, required

the date and time on the receipt, converted to UTC, formatted as an ISO 8601 date

retailer

Retailer Object, required

see Retailer Object

till_uuid

string, optional

the UUID of the source till

delivery

Delivery Object, required

see Delivery Object

feedback

Feedback Object, required

see Feedback Object

pos_data_ids

array of strings, required

an array of pos_data ObjectIds

processed

string, optional

end of processing timestamp, in UTC, formatted as an ISO 8601 date

Notes

  • There is no guarantee of the accuracy of the time on the original receipt and the precision may vary from receipt to receipt

  • items may contain an empty array if the receipt has no items

  • total, may or may not add up to the total price of the individual items (as each individual item may not have had discounts subtracted or VAT applied)

  • net, if present, may or may not have had discounts subtracted and there will be no indication of whether this is the case

  • vat is a deprecated property, please use the taxes property. The vat property exists for backwards compatibility. Vat may or may not contain a breakdown of VAT by rate, if there is only one VAT object and its rate is null then the original receipt did not explicitly state any information about VAT rates.

  • taxes will contain multiple tax objects. The list can be empty.

  • discounts may contain an empty array if the receipt has no discounts. The discounts object may contain discounts which apply to the entire receipt (and are therefore not found on individual items) and discounts which summarize or duplicate item discounts. The way in which the discounts object is used depends on the individual retailer.

  • _links are not present by default but can be configured on demand to include:

    • a URL of an HTML rendering (webview) of the receipt,

    • a URL of a PDF rendering of the receipt,

    • a URL of a QR code image containing the webview URL.

Example

{
  "_links": {
    "pdf": {
      "href": "https://webview.ereceipts.co.uk/pdf/513e2391ee5e525ff9000002"
    },
    "webview": {
      "href": "https://webview.ereceipts.co.uk/513e2391ee5e525ff9000002",
      "qrcode": "https://barcodes.ereceipts.co.uk/qrcode?c=https%3A%2F%2Fwebview.ereceipts.co.uk%2F513e2391ee5e525ff9000002"
    }
  },
  "discounts": [
    {
      "amount": 3.0,
      "name": "Buy one get one free",
      "quantity": 1
    }
  ],
  "id": "513e2391ee5e525ff9000002",
  "incomplete": false,
  "items": [
    {
      "discounts": [],
      "name": "Socks, black",
      "net": null,
      "properties": {
        "category": "Underwear"
      },
      "quantity": 1,
      "total": 3.0,
      "vat": {
        "amount": 0.5,
        "rate": 20.0
      }
    },
    {
      "discounts": [
        {
          "amount": -3.0,
          "name": "Buy one get one free",
          "quantity": null
        }
      ],
      "name": "Socks, black",
      "net": null,
      "properties": {
        "category": "Underwear"
      },
      "quantity": 1,
      "total": 3.0,
      "vat": {
        "amount": 0.5,
        "rate": 20.0
      }
    },
    {
      "discounts": [],
      "name": "Novelty Tie",
      "net": null,
      "properties": {
        "category": "Misc"
      },
      "quantity": 1,
      "total": 10.0,
      "vat": {
        "amount": 0.0,
        "rate": 0.0
      }
    }
  ],
  "localtime": "2013-04-30T13:01:00+01:00",
  "net": null,
  "payments": [
    {
      "amount": 13.0,
      "method": "cash"
    }
  ],
  "pos_data_ids": [
    "52a99372d535cf25c814aec3"
  ],
  "properties": {},
  "retailer": {
    "name": "Paperless Fashion",
    "vatno": null
  },
  "store": {
    "address": [
      "61 Hatton Garden"
    ],
    "city": "London",
    "country": "GBR",
    "name": "Paperless Fashion Clerkenwell",
    "phone": "+440000000000",
    "postcode": "EC1N 8LS",
    "properties": {}
  },
  "store_reference": "1",
  "till_uuid": "03b8fc59-cd41-4880-810c-543a34cc0528",
  "timestamp": "2013-04-30T12:01:00+00:00",
  "total": 13.0,
  "transaction_id": "0010159609",
  "vat": [
    {
      "amount": 0.0,
      "rate": 0.0
    },
    {
      "amount": 0.5,
      "rate": 20.0
    }
  ]
}