Search Packages with Custom Header Mapping

This operation returns package records based on the requested custom header mapping. The request body contains package field names as keys and custom header labels as values. These header labels can be used to display the returned package data with user-defined column names.

SecuritybearerAuth
Request
query Parameters
startDate
string

Filter package updated on or after this date.

Example: startDate=2024-11-27T18:30:00.000Z
endDate
string

Filter package updated on or before this date.

Example: endDate=2024-11-28T18:30:00.000Z
page
integer

The page number of the results to retrieve. Pagination starts from 1.

Example: page=1
size
integer

The number of assets to retrieve per page.

Example: size=25
status
string

Filter assets by status.

Example: status=UNDELIVERED
sort
string

Specify the sorting order of the results.

Example: sort=insertTimestamp
inboundSiteId
string

This is the identifier of the Inbound Site to be searched.

Example: inboundSiteId=bzxgKm861vv
Request Body schema: application/json

Defines custom header mappings for package search results.

Each key represents a package response field, and each value represents the custom header label to be used for that field. The request body is a key-value mapping used to define custom headers for the package search response.

  • Key (Field Name):
    Represents the actual package field from the system.
    This can include nested fields using dot notation (for example, subId, packageId, currentLocation.name, givenTo.name, currentRoute.routeName).

  • Value (Header Label):
    Represents the custom header name for the corresponding field in the response output.

This mapping allows users to control how package data fields are labeled when returned in response.

Example:

  • "packageId": "Package Identifier" → Returns the packageId field as "Package Identifier"
  • "currentLocation.name": "Site Name" → Returns current location name as "Site Name"
  • deliveryClerk: "Delivered By" → Returns delivery clerk name as "Delivered By"

Note:

  • An empty object can be passed.
  • If no mappings are provided, the API returns all package fields using their default field names.
object
Responses
200

Package details have been retrived successfully.

400

Invalid request.

401

The request could not be authorized.

500

The request could not be completed due to an internal error.

post/api/v1/packages/search
Request samples
application/json
{
  • "subId": "subID",
  • "userName": "Operator",
  • "insertTimestamp": "ReceivedDate",
  • "packageId": "Package ID",
  • "currentLocation.name": "Site Name",
  • "currentStatus": "Status",
  • "locationZip": "Location ZIP",
  • "lockerBank": "Locker Bank",
  • "deliveryClerk": "Delivered By",
  • "receiveClerk": "Received By",
  • "givenTo.name": "Given To",
  • "currentRoute.routeName": "Route",
  • "deliveryTime": "Delivery Time"
}
Response samples
application/json
{
  • "packages": [
    ],
  • "totalCount": 1
}