iotoms Docs

Update an inventory location

PATCH
/api/v1/inventory/locations/{id}

Updates only the fields you send: locationName, isDefault and isActive. Code, type and links cannot be changed. Setting isDefault does not clear the flag on other locations.

How to use it

  1. Take the location id from List inventory locations or Get an inventory location.
  2. Send only the fields to change: locationName, isDefault and/or isActive.
  3. Setting isActive to false hides the location from the list; true brings it back.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string

ID of the record (UUID).

Formatuuid

Header Parameters

Request Body

application/json
  1. body
locationName?|

New display name. Leave out to keep the current name.

isDefault?|

Set or clear the default flag. Other locations keep their own flag. Leave out to keep it unchanged.

isActive?|

Set false to deactivate or true to reactivate the location. Leave out to keep it unchanged.

Response Body

OK

*/*
  1. response
status*string

Outcome of the call: SUCCESS when the request was handled, ERROR otherwise.

message*string

Short human-readable message describing the outcome, e.g. which record was fetched or saved.

data?

The inventory location.

Example Request
curl -X PATCH 'https://beta.iotoms.com/api/v1/inventory/locations/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "status": "string",  "message": "string",  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "locationCode": "string",    "locationName": "string",    "locationType": "WAREHOUSE",    "parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43",    "storeId": 0,    "vehicleId": "c406adf4-e700-4483-ad7a-e7447a2941cb",    "isDefault": true,    "isActive": true  }}