iotoms Docs

Update a customer store

PUT
/api/v1/ops/customer-stores/{id}

Replaces all details of a customer store with the request body: optional fields left out are cleared, status resets to ACTIVE and credit limit to 0. The customer account link and photo are not changed here.

How to use it

  1. Get the store's ID from List customer stores or Get a customer store.
  2. Send every field, not just the ones that change: optional fields left out are cleared, status resets to ACTIVE and creditLimit to 0.
  3. The customer account link and photo are not changed by this call; use Partially update a customer store for those.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*integer

ID of the record.

Formatint64

Header Parameters

Request Body

application/json
  1. body
name*string

Name of the shop or outlet. Required, up to 150 characters.

ownerName*string

Name of the shop owner or main contact. Required, up to 100 characters.

ownerPhone*string

Owner's phone number. Required, up to 30 characters.

ownerEmail?|

Owner's email address. Optional.

addressLine1*string

First line of the shop's street address. Required, up to 200 characters.

addressLine2?|

Second address line. Optional.

city*string

City the shop is in. Required.

state?|

State, province or region. Optional.

postalCode?|

Postal or ZIP code. Optional, up to 20 characters.

country*string

Country the shop is in. Required.

latitude*number

GPS latitude of the shop in decimal degrees. Required.

Formatdouble
longitude*number

GPS longitude of the shop in decimal degrees. Required.

Formatdouble
creditLimit*number

Maximum credit allowed for this shop, in the merchant's currency (2 decimals). Defaults to 0.

executiveNotes?|

Free-text notes for sales staff about this shop. Optional.

status*string

ACTIVE (default), INACTIVE, ARCHIVED or DELETED. Lists show only ACTIVE stores unless you filter by status.

Value in"ACTIVE""INACTIVE""ARCHIVED""DELETED"

Response Body

OK

*/*
  1. response
status*string

Outcome of the call: SUCCESS when the request worked, ERROR when it did not.

message*string

Short 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 PUT 'https://beta.iotoms.com/api/v1/ops/customer-stores/0' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "ownerName": "string",  "ownerPhone": "string",  "addressLine1": "string",  "city": "string",  "country": "string",  "latitude": 0.1,  "longitude": 0.1,  "creditLimit": 0,  "status": "ACTIVE"}'
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"  }}