Partially update a customer store
PATCH
Changes only the fields included in the body. customerNumber links the store to the customer account that is billed for its purchases: send a number to link, null to unlink, or omit it to leave the link alone. Unknown customer numbers are rejected with 400, and changing the link needs extra permission.
How to use it
- Get the store's ID from List customer stores or Get a customer store.
- Send only the fields to change, e.g. {"latitude": 25.2, "longitude": 55.3} or {"status": "INACTIVE"}; photoUrl can also be set here.
- To link the store for invoicing, send customerNumber from List customers; send null to unlink. This needs the store-link permission.
- An unknown customer number is rejected with 400 and the existing link is kept.
BearerAuthheader
AuthorizationBearer <JWT>id*integerID of the record.
Format
int64application/json- body
[key: string]?OK
*/*- response
status*stringOutcome of the call: SUCCESS when the request worked, ERROR when it did not.
message*stringShort human-readable message describing the result, for logs or display; do not parse it.
data?The customer store as it is now stored.
Example Request
curl -X PATCH 'https://beta.iotoms.com/api/v1/ops/customer-stores/0' \ -H 'Content-Type: application/json' \ -d '{ "property1": {}, "property2": {}}'Example Response
{ "status": "string", "message": "string", "data": { "id": 0, "name": "string", "ownerName": "string", "ownerPhone": "string", "ownerEmail": "string", "addressLine1": "string", "addressLine2": "string", "city": "string", "state": "string", "postalCode": "string", "country": "string", "latitude": 0.1, "longitude": 0.1, "creditLimit": 0, "customerNumber": "string", "executiveNotes": "string", "photoUrl": "string", "status": "ACTIVE", "modifiedTime": "2019-08-24T14:15:22Z" }}