View an Inventory Snapshot

HTTP Request

POST /v1/inventory/snapshot

Summary

This operation retrieves the retailer’s current inventory at the fulfillment center.

Request URLs

Sandbox: https://shipping-api-sandbox.pitneybowes.com/shippingservices/fulfillment/v1/inventory/snapshot
Production: https://shipping-api.pitneybowes.com/shippingservices/fulfillment/v1/inventory/snapshot

Query Parameters

Query parameters are optional.

Name

Description

page

The page number to return in the result set. Page numbering starts at 1.

Default value: 1

size

The number of results to return per page.

Default value: 20

Request Headers

Name


Description

Authorization

Required. OAuth token generated using the Generate an OAuth Token API.

X-PB-TransactionId

Required. A unique identifier for the request, up to 25 characters. The following characters are allowed: letters, numbers, hyphens (-), and underscores (_).

Important: Ensure the ID is unique.

Request Elements

Name

Data Type

Description

clientId

String

Required. The client identifier assigned by Pitney Bowes.

sort

Array[String]

The property upon which to sort and the sort order. Use the following syntax:

<property>-<sort_direction>

Possible values:

  • sku-asc (default)

  • sku-desc

searchFields

Array[Object]

The search criteria. Each object in the array is a name-value pair with the following two elements:

name: The field in inventory records upon which to search, entered as a String.

values: The values to search for, entered as a String array.

You can search on the following fields in inventory records. The fields take the values listed:

Response Elements

Name

Data Type

Description

totalPages

Number

The number of pages in the result set.

totalElements

Number

The number of products in the result set.

first

Boolean

If true, this is the first page of the result set.

last

Boolean

If true, this is the last page of the result set.

size

Number

The number of products per page in the result set.

page

Number

The page number to return. Page numbering starts at 1.

sort

Array[String]

The sort order.

clientId

String

The client identifier assigned by Pitney Bowes.

inventoryRecords

Array[Inventory Records Object]

The inventory items.

Inventory Records Object

The inventoryRecords array contains the Inventory Records Object:

Name

Data Type

Description

sku

String

The SKU used to track the product in the fulfillment center.

brand

String

The manufacturer’s brand name for the item.

inventoryTotal

Array[Object]

The total inventory for the item for all facilities.

inventoryTotal.inventoryType

String

Possible values:

  • NEW

  • REFURBISHED (Reserved for future use)

inventoryTotal.supplyType

String

Possible values:

  • AVAILABLE

  • CURRENT

  • DAMAGED

  • EXPIRED

  • KITTING

  • PENDING

  • PUTAWAY

  • QUARANTINE

  • RECALLED

inventoryTotal.quantity

Number

The number of items for all facilities.

inventoryDetails

Array[Inventory Details Object]

The item inventory per facility.

Inventory Details Object

The inventoryRecords.inventoryDetails array contains the Inventory Details Object:

Name

Data Type

Description

node

String

The Pitney Bowes Fulfillment Center.

inventoryTypeDetails

Array[Object]

Details for the inventory item.

inventoryTypeDetails.inventoryType

String

For possible values, see the inventoryTotal.inventoryType field above on this page.

inventoryTypeDetails.supplyType

String

For possible values, see the inventoryTotal.supplyType field above on this page.

inventoryTypeDetails.expiryDate

String

The item’s expiration date.

inventoryTypeDetails.quantity

Number

The number of items for the lot.

inventoryTypeDetails.lotNumber

String

The lot code.

Sample Request

curl -X POST ".../v1/inventory/snapshot?page=1" \
-H "Authorization: Bearer <oauth_token>" \
-H "X-PB-TransactionId: <unique_identifier>" \
-d '
{
    "clientId": "1234",
    "sort": [
        "sku-asc",
        "node-desc"
      ],
    "searchFields": [ {
        "name": "node",
        "values": [ "160" ]
    },{
        "name": "supplyType",
        "values": [ "AVAILABLE" ]
    },{
        "name": "brand",
        "values": [ "Acme" ]
    } ]
}'

Sample Response

{
    "totalPages": 4,
    "totalElements": 44,
    "first": true,
    "last": true,
    "size": 20,
    "page": 1,
    "sort": [
        "sku-asc",
        "node-desc"
    ],
    "clientId": "1234",
    "inventoryRecords": [ {
        "sku": "0001234565",
        "inventoryTotal": [ {
            "inventoryType": "NEW",
            "supplyType": "AVAILABLE",
            "quantity": 787
        } ],
        "inventoryDetails": [ {
            "node": "160",
            "inventoryTypeDetails": [ {
                "inventoryType": "NEW",
                "supplyType": "AVAILABLE",
                "expiryDate": "2022-02-05T00:00:00Z",
                "quantity": 414,
                "lotNumber": "LOT1"
            },
            ...
            ]
        },
        ...
        ]
    },
    ...
    ]
}

Error Codes

For lists of error codes returned by the Fulfillment APIs, please see 80-Prefix Error Codes (Fulfillment APIs).