Skip to main content
GET
/
v1
/
inventory
/
hold-reasons
List active hold reasons
curl --request GET \
  --url https://{base_url_domain}/api/global/v1/inventory/hold-reasons \
  --header 'Authorization: Bearer <token>'
{
  "collection": [
    {
      "type": "HoldReason",
      "code": "damaged",
      "label": "Damaged",
      "sort_order": 30,
      "is_active": true,
      "is_system": true,
      "id": 12,
      "parent_code": "damaged",
      "allow_relocation": false,
      "children": "<array>",
      "parent": {
        "type": "HoldReason",
        "id": 3
      },
      "merchants": [
        {
          "type": "Merchant",
          "id": 4
        }
      ]
    }
  ],
  "has_more": true,
  "next": "<string>",
  "previous": "<string>",
  "meta": {
    "processing_time": 0.2525252525,
    "cursor_start": 123,
    "cursor_end": 123,
    "count": 123
  }
}

Authorizations

Authorization
string
header
required

Generate a JWT access token through a Custom Global Integration and provide it with each request in the Authorization header prefixed with "Bearer" and then a single space.

Query Parameters

fields
enum<string>[]

Specify additional fields of the HoldReason object to be included in the response.

Available options:
basic,
all,
code,
label,
parent_code,
allow_relocation,
sort_order,
is_active,
is_system,
children,
parent,
merchants
fields:parent
enum<string>[]

Specify additional fields of the parent HoldReason object to be included in the response. See the selecting fields page for more information. Specify additional fields of the HoldReason object to be included in the response.

Available options:
basic,
all,
code,
label,
parent_code,
allow_relocation,
sort_order,
is_active,
is_system,
children,
parent,
merchants
filter
string[]

Using the filtering syntax, you may filter the results using the following fields:

  • id — reason_id
  • code
sort
string

Default sort is ascending by id. Using the sorting syntax, the following fields are available for sorting:

  • id
  • code
  • sort_order
count
integer

If specified as 1, the meta.count property of the response will be present and populated with the total count of items matching the query before any paging is applied. This is not included by default to improve performance in some edge cases and is not required to perform paging using the next property of the response. See paging parameters for more information.

Required range: 0 <= x <= 1
cursor_end
integer

A cursor for use in pagination which defines the last id of the next page of results, non-inclusive. See paging parameters for more information on paging.

cursor_start
integer

A cursor for use in pagination which defines the starting id of the next page of results. See paging parameters for more information on paging.

limit
integer
default:100

A limit on the number of objects to be returned.

Required range: 1 <= x <= 1000
Example:

100

Response

A dictionary with a collection property containing an array of HoldReason objects (parents only; each parent's children array carries any user-defined sub-reasons). If no active reasons exist the array will be empty.

collection
HoldReason · object[]

A list of parent HoldReason objects with their children inlined.

has_more
boolean

True if the collection has more items on the next page. Use the "next" link to retrieve the next page of results.

next
string | null

The resource path for the next page of results if any are expected.

previous
string | null

The resource path for the previous page of results if any are expected.

meta
object

Additional metadata pertaining to the response.