Create an inventory location
Creates a new place that holds stock, such as a warehouse, store, van or manufacturing location. The location code must be unique, and the caller needs permission to manage locations. Store and van locations are also created automatically when stores and vehicles are added.
How to use it
- Choose a unique locationCode, a name and a locationType; optionally link a store (List stores), a vehicle (List vehicles) or a parent location.
- Set isDefault to true only for the warehouse that should act as the fallback stockroom.
- The location is created active and starts with no stock; add stock with Adjust stock on hand for an item.
BearerAuthAuthorizationBearer <JWT>application/json- body
locationCode*stringShort unique code for the location. The call fails if another location already uses it.
locationName*stringDisplay name shown in stock screens and reports.
locationType*stringKind of stockroom: WAREHOUSE, STORE, VAN, MANUFACTURING, TRANSIT, or QUARANTINE.
"WAREHOUSE""STORE""VAN""MANUFACTURING""TRANSIT""QUARANTINE"parentId?|Optional parent location id, from List inventory locations, when this location sits inside another.
uuidstoreId?|Optional store this location belongs to, from List stores.
int64vehicleId?|Optional vehicle this location belongs to, from List vehicles.
uuidisDefault*booleanWhether to flag this as a default location. A default active warehouse is the fallback stockroom for registers with none set.
OK
*/*- response
status*stringOutcome of the call: SUCCESS when the request was handled, ERROR otherwise.
message*stringShort human-readable message describing the outcome, e.g. which record was fetched or saved.
data?The inventory location.
curl -X POST 'https://beta.iotoms.com/api/v1/inventory/locations' \ -H 'Content-Type: application/json' \ -d '{ "locationCode": "string", "locationName": "string", "locationType": "WAREHOUSE", "isDefault": true}'{ "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 }}