PATCH /stores/{reference}¶
Update a store using a JSON Patch document.
The request Content-Type
header must be set to application/json-patch+json
.
Body parameters:
The body must contain a correctly formatted JSON Patch document.
Modifiable store fields:
Name |
Type |
Description |
---|---|---|
|
string, optional, min: 1, max: 255 |
the retailer-specific store identifier |
|
string, required, min: 1, max: 100 |
the descriptive name for this store |
|
array of strings, optional |
an array of address lines |
|
string, optional, min: 1, max: 60 |
name of the city in which this store is located |
|
string, optional, min: 1, max: 10 |
the postcode matching this store’s address |
|
string, required, ISO 3166-1 or ISO 3166-3 alpha-3 country code |
code of the country in which this store is located |
|
string, optional, min: 1, max: 20 |
a telephone number for contacting this store |
|
string, optional |
the locale for this store |
|
string, optional |
IANA time zone name |
|
string, optional, ISO 4217 alpha-3 currency code |
ISO 4217 currency code |
|
JSON type, optional |
the properties for this store |
|
JSON type, optional |
the settings for this store |
See IANA time zone reference names.
Example request:
POST /stores/1001 HTTP/1.1
Host: api.ereceipts.co.uk
Accept: application/json
Content-Length: 234
Content-Type: application/json-patch+json
[
{
"op": "replace", "path": "/phone", "value": "+440000000001"
},
{
"op": "replace", "path": "/address/0", "value": "55 Foo St"
},
{
"op": "replace", "path": "/properties", "value": {"type": "high-street"}
}
]
Example response:
HTTP/1.1 200 OK
Content-Length: 287
Content-Type: application/json; charset=UTF-8
{
"address": [
"55 Foo St"
],
"city": "London",
"country": "GBR",
"id": 1,
"locale": "en_GB",
"name": "Test Store",
"phone": "+440000000000",
"postcode": "W124AF",
"properties": {
"type": "high-street"
},
"reference": 1001,
"timezone": "Europe/London"
}