Working with parcels
General workflow for working with parcels
Creating a parcel and retrieving it's label
@host = https://api.test.post-plus.io
@apiKey = apitest1234567890
PUT {{host}}/api/v1/parcels
content-type: application/json
X-API-KEY: {{apiKey}}
{
"identifiers": {
"senderParcelNr": "Test-SE-0036"
},
"parcel": {
"transactionType": "B2C",
"parcelGrossWeight": 0.15,
"currency": "USD",
"items": [
{
"description": "plastic toy",
"hsCode": "950300",
"quantity": 1,
"valuePerItem": 0.1,
"weightPerItem": 0.1
}
]
},
"additionalInfo": {
"serviceCode": "FREEP"
},
"receiver": {
"name": "A test consignee",
"phone": "+123456",
"address": "Skeppsbron 5-1",
"zipCode": "41121",
"city": "GÖTEBORG",
"countryCode": "SE"
}
}
Retrieving parcel info
@host = https://api.test.post-plus.io
@apiKey = apitest1234567890
GET {{host}}/api/v1/parcels/{parcelId}?IncludeItems=true&IncludeReceiver=true&IncludeSender=true&IncludePrints=true
content-type: application/json
X-API-KEY: {{apiKey}}
GET {{host}}/api/v1/parcels/parcel-nrs/{parcelNr}?IncludeItems=true&IncludeReceiver=true&IncludeSender=true&IncludePrints=true
content-type: application/json
X-API-KEY: {{apiKey}}
GET {{host}}/api/v1/parcels/sender-parcel-nrs/{senderParcelNr}?IncludeItems=true&IncludeReceiver=true&IncludeSender=true&IncludePrints=true
content-type: application/json
X-API-KEY: {{apiKey}}
Retrieving parcel label
To get the label details and label contents in base64, use
@host = https://api.test.post-plus.io
@apiKey = apitest1234567890
GET {{host}}/api/v1/parcels/parcel-prints/{{labelId}}?IncludeContents=true
content-type: application/json
X-API-KEY: {{apiKey}}
@host = https://api.test.post-plus.io
@apiKey = apitest1234567890
GET {{host}}/api/v1/documents/parcel-prints/{{labelId}}
content-type: application/json
X-API-KEY: {{apiKey}}