Find a BOM¶
HTTP Request¶
POST /v1/bill-of-materials/search
Summary¶
This operation provides details of Bill of Materials (BOM) based on filter criteria.
Request URLs¶
Sandbox: https://shipping-api-sandbox.pitneybowes.com/shippingservices/fulfillment/v1/bill-of-materials/search
Production: https://shipping-api.pitneybowes.com/shippingservices/fulfillment/v1/bill-of-materials/search
Query Parameters¶
Query parameters are optional.
Name |
Description |
---|---|
page |
The number of the page to return from the result set. Page numbering starts at Default value: |
size |
The number of fulfilled orders to return per page. Default value: |
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 ( Important: Ensure this is a unique ID. |
Request Elements¶
Required fields are marked Required. All other fields are optional.
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:
|
searchFields |
Array[Object] |
Defines search criteria. Each object in the array defines a search field and search values. The object takes the following elements:
|
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 boms per page in the result set. |
page |
Number |
The page number indicating which set of items will be returned in the response. So, the combination of page=1 and size=20 returns the first 20 items. The combination of page=2 and size=20 returns items 21 through 40.. |
sort |
Array[String] |
Lists the property used to sort the response and the sort order. |
boms |
Array[BOM Objects] |
Bom result set based on filter criteria and sort order |
BOM Objects¶
The bom
array returns the bom Object:
Name |
Data Type |
Description |
---|---|---|
parentSku |
String |
SKU of the parent product. |
status |
String |
Status of Bill of material (Active/Inactive). |
billOfMaterialId |
String |
Unique Pitney Bowes id assigned to BOM. |
createDate |
String |
Create date of Bill of material. |
updateDate |
String |
Update date of Bill of material. |
pbCreateDate |
String |
Date when Bill of material was created on Pitney Bowes side. |
pbUpdateDate |
String |
Date when Bill of material was modified on Pitney Bowes side. |
bom details |
Array[BOM Details Object] |
Bill of material details. |
clientId |
String |
The client ID assigned by Pitney Bowes. |
Bom Details Object¶
Bom Details payload:
Name |
Data Type |
Description |
---|---|---|
childSku |
String |
SKU of the child product. Must belong to master catalog. |
quantity |
integer |
Quantity of the child product. |
Sample Request¶
curl -X POST ".../v1/bill-of-materials/search" \
-H "Authorization: Bearer <oauth_token>" \
-H "X-PB-TransactionId: <unique_identifier>" \
-d '
{
"clientId": "1234",
"sort": [
"pbCreateDate-asc-asc"
],
"searchFields": [
{
"name": "parentSku",
"values": [
"1685603906265"
]
},
{
"name":"pbCreateDate",
"to": "2023-07-10T00:00:00Z",
"from": "2023-06-05T00:00:00Z"
}
]
}
Sample Response¶
{
"totalPages": 1,
"totalElements": 2,
"first": true,
"last": true,
"size": 20,
"page": 1,
"sort": [
"pbCreateDate-asc"
],
"boms": [
{
"parentSku": "1685603906265",
"status": "Active",
"billOfMaterialId": "BM2862A0017978434441940995US",
"createDate": "01/14/2022 04:13:13",
"pbCreateDate": "07/05/2023 06:11:52",
"pbUpdateDate": "07/05/2023 09:06:26",
"bom details": [
{
"childSku": "1688537421275",
"quantity": 3
}
]
},
{
"parentSku": "1685603906265",
"status": "Active",
"billOfMaterialId": "BM2862A0018023370252062721US",
"createDate": "01/14/2022 04:13:13",
"pbCreateDate": "07/05/2023 09:07:59",
"pbUpdateDate": "07/05/2023 09:09:52",
"bom details": [
{
"childSku": "1688537421275",
"quantity": 3
}
]
}
]
}
Error Codes¶
For lists of error codes returned by the Fulfillment APIs, please see 80-Prefix Error Codes (Fulfillment APIs).