Querying Packing Lists
In this guide:
Introduction
Prerequisites
Querying packing lists
Making sense of the response
Introduction
The purpose of Packing Lists is to see which SKUs are inside of specific containers. You can access Packing Lists only if you have Purchase Orders in your FCL Bookings. Each container from such booking has corresponding Packing List. The Packing List consists of Packing List Lines, each representing a single SKU that has been included.
Prerequisites
You need to have a FCL Booking with at least one container and assigned Purchase Order.
Querying Packing Lists
To be able to see the list of existing packing lists, we will perform following PackingList query in API console. How to perform GraphQL queries you can read more here.
POST /graphql
Query
query ($findBy: PackingListFindBy!) {
packingLists(findBy: $findBy) {
nodes {
bookingReference
cargo {
id
type
looseCargoType
quantity
grossWeight {
value
metric
}
cbm
... on CargoContainerType {
containerNumber
}
}
lines {
lot {
quantityFulfilled
cbm
}
product {
skuCode
}
}
}
}
}
Packing Lists query uses option/filter to retrieve a list for packing lists for a specific booking or a single packing list for a specific cargo. For instance, to retrieve list of packing lists for a booking with booking reference: "ZTEST-1" we need to provide following variables to the query:
{ "key": "BOOKING_REFERENCE", "value": "ZTEST-1" }
On the other hand if we need to query the packing list for specific cargo with id: "2d632c5b-6827-4937-93c6-e1fd2adf0c66" we will use:
{ "key": "CARGO_ID", "value": "2d632c5b-6827-4937-93c6-e1fd2adf0c66" }
Let's imagine we have a booking with booking reference "ZTEST-1", containing one container. This container ships goods from two lots, one with beds (SKU_CODE: '100000') and one with tables (SKU_CODE: '100001'). We will use following query variables:
Variables
{
"findBy": {"key": "BOOKING_REFERENCE","value": "ZTEST-1"}
}
The result of our query returns list containing one packing list (since we have one container), with following data:
JSON response
{
"data": {
"packingLists": {
"nodes": [
{
"bookingReference": "ZTEST-1",
"cargo": {
"id": "aeb33a94-6e14-4440-a602-5bb3e851d6c3",
"type": "CONTAINER",
"looseCargoType": "PALLETS",
"quantity": 40,
"grossWeight":
{
"metric": "KG",
"value": 10991
},
"cbm": 71.1,
"containerNumber": "ACMU1234567"
},
"lines": [
{
"lot": {
"quantityFulfilled": 1245,
"cbm": 40.1
},
"product": {
"skuCode": "100000"
}
},
{
"lot": {
"quantityFulfilled": 1222,
"cbm": 31.0
},
"product": {
"skuCode": "100000"
}
}
]
}
]
}
}
}
Making sense of the response
In this result we could find following data related to our container:
| Cargo details | ||
| id | Zencargo's internal cargo identifier | |
| type | Type of cargo, in our case container | |
| looseCargoType | Says how the goods inside the container have been packaged | |
| quantity | The quantity of loose cargo items, such as pallets or boxes, this is sometimes called the piece count | |
| grossWeight | The gross volume of the container including all packaging | |
| cbm | The volume of the goods inside the container, in cubic meters | |
| containerNumber | Container number. Available only for CargoContainerType. See CargoCargoItem for other types. |
We could also find two Packing List lines, each describing lot and product information:
| Lot information | ||
| quantityFulfilled | Quantity of product fulfilled | |
| cbm | The expected volume of the fulfilled quantity of products, when fully packaged, in cubic meters | |
| Product information | ||
| skuCode | Sku Codes of shipped products |