Skip to main content
POST
/
locations
Create Location
curl --request POST \
  --url https://api.example.com/locations \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "parentLocationId": "<string>",
  "locationTag": "<string>"
}
'
{
  "id": "<string>",
  "identifier": "<string>",
  "referenceNumber": 123,
  "name": "<string>",
  "parentLocationId": "<string>",
  "locationTag": {
    "id": "<string>",
    "code": "<string>",
    "name": "<string>",
    "description": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "deleted": true,
    "deletedAt": "2023-11-07T05:31:56Z"
  }
}

Body

application/json
name
string
required

The name of the location

parentLocationId
string | null

The id of the parent location

locationTag
string

The tag associated with the location

Response

The location has been successfully created

id
string
required

The id of the location

identifier
string
required

The identifier of the location

referenceNumber
number
required

The reference number of the location

name
string
required

The name of the location

parentLocationId
string | null

The id of the parent location

locationTag
object

The tag associated with the location