POST /receipts/_assignΒΆ
Assign a previously unassigned receipt to an identifier.
The receipt referenced using the receipt id
or transaction_id
must exist.
Query parameters:
Name |
Type |
Description |
---|---|---|
|
boolean, optional, default: false |
readable output formatting |
Body parameters:
Name |
Type |
Description |
---|---|---|
|
string, optional, mutually exclusive with |
the unique receipt identifier |
|
string, optional, mutually exclusive with |
retailer-specific transaction identifier |
|
string, required |
retailer-specific consumer identifier (loyalty card number, e-mail address or other) |
Example request:
POST /receipts/_assign HTTP/1.1
Host: api.ereceipts.co.uk
Accept: application/json
Content-Length: 75
Content-Type: application/json
{
"transaction_id": "0123456789",
"identifier": "example@example.com"
}
Example response:
When the key is configured to return the receipt:
HTTP/1.1 200 OK
Content-Length: ...
Content-Type: application/json; charset=UTF-8
{
"id": "513e2391ee5e525ff9000000",
"transaction_id": "0123456789",
"identifier": "email@example.com"
// ... remaining receipt content ...
}
See Receipt Object for a description of the receipt format.
When the key is configured to not return receipt:
HTTP/1.1 204 No Content