Locations
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$
The page number to be retrieved where the size of the pages must be specified by the pageSize parameter. The number of the first page is 1.
1
The number of documents being retrieved on the page.
16
Fields to sort the response data by following order of the parameters from left to right. Can contain multiple fields in format: field name:sort direction separated by a comma. The colon with sort direction parameter is redundant and descending order is taken only if it is equal to desc or DESC. Ascending order is considered in any other case.
name,metadata.createdAt:desc
Query param for filtering entities by specified type. Examples of query params which are supported:
Q Param | Description |
---|---|
name:"Exact match" |
find an entity with name field with Exact match value |
name:~Supplier |
find an entity with name field containing Supplier value |
type:COMPANY |
find an entity with type field with COMPANY value |
metadata.createdAt:(>"2019-01-06T10:29:30.602Z" AND <"2020-01-07T10:29:30.602Z") |
find an entity with metadata.createdAt field with value between 2019-01-06T10:29:30.602Z and 2020-01-07T10:29:30.602Z |
name:exists |
find an entity with existing name field |
name:null |
find an entity with non-existing name field |
name:~supplier
Comma-separated list of fields to return in the response. If not specified, all fields are returned.
name,type
Location name. When specified, only locations containing the specified name will be returned.
The type of the location. When specified, only locations of the specified type will be returned.
The email of the contact details of the location. When specified, only locations with contact details containing the specified email will be returned.
The phone number of the contact details of the location.
The address of the contact details of the location.
The city of the contact details of the location.
The state of the contact details of the location.
The postcode of the contact details of the location.
The country code of the contact details of the location.
In order to get information how many entities meet a filter requirements, X-Total-Count header has been introduced. The header is optional and its default value is false. If the header is provided and it is true then total count is returned in the X-Total-Count response header.
false
GET /vendor/{tenant}/locations HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
{
"id": "LOC001",
"name": "Main HQ",
"type": "HEADQUARTER",
"contactDetails": {
"emails": [
"[email protected]"
],
"phones": [
"+1-555-0123"
],
"addressLine1": "123 Industrial Rd",
"city": "South Bend",
"state": "Indiana",
"postcode": "46619",
"countryCode": "US",
"tags": [
"text"
]
},
"metadata": {
"version": 1,
"mixins": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"createdAt": "text",
"modifiedAt": "text"
},
"mixins": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
]
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$
Custom location identifier. If not provided, it is automatically generated.
^[a-zA-Z0-9_-]+$
The name of the location
The type of the location.
POST /vendor/{tenant}/locations HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 303
{
"name": "Main HQ",
"type": "HEADQUARTER",
"contactDetails": {
"emails": [
"[email protected]",
"[email protected]"
],
"phones": [
"1234567890",
"123456789"
],
"addressLine1": "W Sample St",
"addressLine2": "3601-3799",
"city": "South Bend",
"state": "Indiana",
"postcode": "46619",
"countryCode": "US",
"tags": [
"shipping"
]
}
}
{
"id": "53ac81fd0cce8b26b36f1234"
}
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$
The location unique identifier.
Comma-separated list of fields to return in the response. If not specified, all fields are returned.
name,type
GET /vendor/{tenant}/locations/{locationId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"id": "LOC001",
"name": "Main HQ",
"type": "HEADQUARTER",
"contactDetails": {
"emails": [
"[email protected]"
],
"phones": [
"+1-555-0123"
],
"addressLine1": "123 Industrial Rd",
"city": "South Bend",
"state": "Indiana",
"postcode": "46619",
"countryCode": "US",
"tags": [
"text"
]
},
"metadata": {
"version": 1,
"mixins": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"createdAt": "text",
"modifiedAt": "text"
},
"mixins": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$
The location unique identifier.
The name of the location.
The type of the location.
PUT /vendor/{tenant}/locations/{locationId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 333
{
"name": "Main Warehouse",
"type": "WAREHOUSE",
"contactDetails": {
"emails": [
"[email protected]",
"[email protected]"
],
"phones": [
"1234567890",
"123456789"
],
"addressLine1": "W Sample St",
"addressLine2": "3601-3799",
"city": "South Bend",
"state": "Indiana",
"postcode": "46619",
"countryCode": "US",
"tags": [
"shipping"
]
},
"metadata": {
"version": 1
}
}
{
"id": "53ac81fd0cce8b26b36f3492"
}
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$
The location unique identifier.
DELETE /vendor/{tenant}/locations/{locationId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
Was this helpful?