Locations

Retrieving all locations for a site

get

Retrieves all locations for a specified site.


Required scopes

  • availability.availability_view

Authorizations
Path parameters
tenantstringRequired

Your Emporix tenant's name.

Note: The tenant name should always be provided in lowercase.

Example: testtenant
sitestringRequired

Site code, defined when the site is created.

Example: shop1
Responses
200
The request was successful. A list of locations is returned.
application/json
get
GET /availability/{tenant}/locations/{site} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "id": "shop1:1234",
    "site": "shop1",
    "rack": "1234",
    "rackName": "Tools",
    "order": 1
  }
]

Adding a new location to a site

post

Adds a new location to a specified site.


Required scopes

  • availability.availability_manage

Authorizations
Path parameters
tenantstringRequired

Your Emporix tenant's name.

Note: The tenant name should always be provided in lowercase.

Example: testtenant
sitestringRequired

Site code, defined when the site is created.

Example: shop1
Body

Physical location of the product.

idstringRequired

Unique identifier of the location.

Note: The value should be provided in the site:rack format.

Example: shop1:1234
sitestringRequired

Site code, defined when the site is created. The value should match the site query/path parameter value.

Example: shop1
rackstringOptional

Rack number.

Example: 1234
rackNamestringOptional

Name of the rack.

Example: Tools
ordernumberRequired

Order of the location, expressed as a number.

Example: 1
Responses
201
The request was successful. The location has been added to the site.
application/json
post
POST /availability/{tenant}/locations/{site} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 77

{
  "id": "shop1:1234",
  "site": "shop1",
  "rack": "1234",
  "rackName": "Tools",
  "order": 1
}
{
  "message": "Successfully created location with id: shop1:1234",
  "code": 201
}

Updating locations

put

Updates locations for a specified site.


Required scopes

  • availability.availability_manage

Authorizations
Path parameters
tenantstringRequired

Your Emporix tenant's name.

Note: The tenant name should always be provided in lowercase.

Example: testtenant
sitestringRequired

Site code, defined when the site is created.

Example: shop1
Bodyobject[]
idstringOptional

Unique identifier of the location.

Example: shop1:1234
ordernumberOptional

Order of the location, expressed as a number.

Example: 1
Responses
200
The request was successful. The locations have been updated.
application/json
put
PUT /availability/{tenant}/locations/{site} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 66

[
  {
    "id": "shop1:1234",
    "order": 1
  },
  {
    "id": "secondary:4321",
    "order": 10
  }
]
{
  "message": "Successfully modified 5 location(s)",
  "code": 200
}

Deleting a location

delete

Deletes a specified location.


Required scopes

  • availability.availability_manage

Authorizations
Path parameters
tenantstringRequired

Your Emporix tenant's name.

Note: The tenant name should always be provided in lowercase.

Example: testtenant
locationstringRequired

Location's unique identifier.

Example: shop1:1234
Responses
200
The request was successful. The location has been deleted.
application/json
delete
DELETE /availability/{tenant}/locations/{location} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "message": "Successfully deleted 5 location(s)",
  "code": 200
}

Retrieving product locations

post

Retrieves locations of specified products.


Required scopes

  • availability.availability_view

Authorizations
Path parameters
tenantstringRequired

Your Emporix tenant's name.

Note: The tenant name should always be provided in lowercase.

Example: testtenant
Body
sitestringOptional

Site code, defined when the site is created.

Example: shop1
productIdsstring[]Optional

List of product IDs. A product IDs is generated when the product is created through the Product Service.

Example: ["5f7c996173fc281cdd412345","5f7c996173fc281cdd412345"]
Responses
200
The request was successful. A list of locations is returned.
application/json
post
POST /availability/{tenant}/search/locations HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 85

{
  "site": "shop1",
  "productIds": [
    "5f7c996173fc281cdd412345",
    "5f7c996173fc281cdd412345"
  ]
}
[
  {
    "productId": "5f7c996173fc281cdd412345",
    "locations": [
      {
        "site": "shop1",
        "zone": "zone1",
        "rack": "1",
        "rackName": "Tools",
        "shelf": "shelf1",
        "section": "section1",
        "bin": "bin1",
        "order": 1
      }
    ]
  }
]

Was this helpful?