Create location

POST/api/v1/inventory/locations

Create a new inventory location.

Operation ID: create_location_api_v1_inventory_locations_post·View as markdown·OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Request body

namestringrequired

Location name

codestring

Short code like 'WH1', 'STORE-NYC'

location_typeLocationTypeEnumLocationTypeEnum

Type of location

address_line1string
address_line2string
citystring
statestring
postal_codestring
countrystring
is_defaultboolean

Default location for new inventory

is_activeboolean

Whether location accepts new inventory

contact_namestring
contact_emailstring
contact_phonestring
notesstring

Responses

201Successful Response

successboolean
messagestring
codestring
dataLocationResponse

400Bad Request - Invalid input

401Unauthorized - Authentication required

403Forbidden - Insufficient permissions

422Validation Error

detailarray · ValidationErrorValidationError
5 fields
locarray · string | integerrequired
msgstringrequired
typestringrequired
inputobject
ctxobject