Create a customer store
Creates a new customer store, the shop or outlet that van-sales and distribution routes visit, and returns it with its new ID (HTTP 201). New stores are not linked to a customer account.
How to use it
- Send the shop's name, owner name and phone, address line 1, city, country and GPS latitude/longitude; other fields are optional.
- Keep the returned id: it identifies the store in routes, visits and store credit (as storeId).
- The new store is not linked to a customer account; link it with Partially update a customer store so it can be invoiced.
BearerAuthAuthorizationBearer <JWT>application/json- body
name*stringName of the shop or outlet. Required, up to 150 characters.
ownerName*stringName of the shop owner or main contact. Required, up to 100 characters.
ownerPhone*stringOwner's phone number. Required, up to 30 characters.
ownerEmail?|Owner's email address. Optional.
addressLine1*stringFirst line of the shop's street address. Required, up to 200 characters.
addressLine2?|Second address line. Optional.
city*stringCity the shop is in. Required.
state?|State, province or region. Optional.
postalCode?|Postal or ZIP code. Optional, up to 20 characters.
country*stringCountry the shop is in. Required.
latitude*numberGPS latitude of the shop in decimal degrees. Required.
doublelongitude*numberGPS longitude of the shop in decimal degrees. Required.
doublecreditLimit*numberMaximum 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*stringACTIVE (default), INACTIVE, ARCHIVED or DELETED. Lists show only ACTIVE stores unless you filter by status.
"ACTIVE""INACTIVE""ARCHIVED""DELETED"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.
curl -X POST 'https://beta.iotoms.com/api/v1/ops/customer-stores' \ -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"}'{ "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" }}