Skip to content

Query Parameters

Some of Barrett's APIs accept query parameters that can be used to refine queries by its customers and users.

General usage

/v1/{API Path}?filter={fieldName} {operator} {value}

All queries can be chained together with an and for further refined querying.

/v1/{API Path}?filter={fieldName} {operator} {value} and {fieldName} {operator} {value} and {fieldName} {operator} {value}

Supported data types

Number

Operators

Operator Description
eq Test whether a field is equal to a value
ne Test whether a field is not equal to a value
lt Test whether a field is less than a value
le Test whether a field is less than or equal to a value
gt Test whether a field is greater than a value
ge Test whether a field is greater than or equal to a value

Example use

/v1/orders?filter=shipmentSequence eq 4

String

Operators

Operator Description
eq Test whether a field is equal to a value
ne Test whether a field is not equal to a value
co Test whether a field contains a value
sw Test whether a field starts with a value
ew Test whether a field ends with a value

Example use

/v1/orders?filter=shipToName co "Will"

Date

Supported formats

  • ISO 8601 Date and Time Format ("YYYY-MM-DDTHH:mm:ss.SSSZ")
  • ISO 8601 Date Format ("YYYY-MM-DD")

Operators

Operator Description
eq Test whether a field is equal to a value
ne Test whether a field is not equal to a value
lt Test whether a field is less than a value
le Test whether a field is less than or equal to a value
gt Test whether a field is greater than a value
ge Test whether a field is greater than or equal to a value

Example use

createdDate ne "2024-03-22T20:58:24.445Z"
expirationDate gt "2024-03-22"

Comparing to lists of values

Some string filters support multiselect which allows queries to return all items that match one of the queried values. Queries utilizing multiselect must separated by a comma.

Operators

Operator Description
eq Test whether a field is equal to a value
ne Test whether a field is not equal to a value

Example use

/v1/inventory/lots?filter=facility eq "TX1,TX2"

/v1/inventory/items?filter=facility ne "MEM,MS5,TX1"

Filter Fields

Inventory

Inventory Items

  • itemId (String)
  • itemStatus (String)
  • statusId (String; supports multiselect)
  • facility (String; supports multiselect)
  • lotNumber (String)
  • serialNumber (String)
  • statusUom (String)
  • manufactureDate (ISO)
  • expirationDate (ISO)
  • quantity (Number)
  • description (String)

Inventory Lots

  • statusId (String; supports multiselect)
  • facility (String; supports multiselect)
  • itemId (String)
  • lotNumber (String)
  • serialNumber (String)
  • statusUom (String)
  • manufactureDate (ISO)
  • expirationDate (ISO)
  • description (String)

Inventory Orders

  • facility (String; supports multiselect)
  • inventoryClass (String)
  • inventoryStatusId (String)

Items

  • itemId (String)
  • statusId (String; supports multiselect)
  • velocity (String)
  • baseUom (String)
  • upc (String)
  • gtIn14 (String)
  • gtIn14Innr (String)
  • gtIn14Cs (String)

Orders

  • barrettOrderId (String)
  • shipmentSequence (Number)
  • orderId (String)
  • purchaseOrder (String)
  • orderStatus (String; supports multiselect)
  • orderType (String; supports multiselect)
  • fromFacility (String; supports multiselect)
  • toFacility (String; supports multiselect)
  • shipDateStart (ISO)
  • createdDate (ISO)
  • lastUpdatedDate (ISO)
  • poDate (ISO)
  • shipDateCancelBy (ISO)
  • shipDateStop (ISO)
  • shipToName (String)
  • shipToContact (String)
  • shipToCity (String)
  • shipToState (String)
  • shipToCountry (String; supports multiselect)
  • shipToPostalCode (String)
  • hdrPassthruChar15 (String)
  • hdrPassthruChar01 (String)
  • hdrPassthruChar47 (String)
  • trackingNo (String)