Skip to main content

Label

POST /api/system/packages/register

Creates a label and returns Base64 buffers for the requested format (ZPL/PDF/PNG).

  • Staging: https://parcelconnect-stage.apc-pli.com/api/system/packages/register
  • Production: https://parcelconnect.apc-pli.com/api/system/packages/register

Authentication is sent in the request body — see the userID, accountNumber, and passcode fields below.

Request

curl -X POST -H "Content-Type: application/json" \
-d '{
"userID": "{{userID}}",
"accountNumber": "{{accountNumber}}",
"passcode": "{{passcode}}",
"importerVATNumber": "",
"shipFromAttention": "",
"shipFromName": "APC",
"shipFromAddress1": "140 East Union Avenue",
"shipFromAddress2": "",
"shipFromCity": "East Rutherford",
"shipFromStateProv": "NJ",
"shipFromPostalCode": "07073",
"shipFromCountryISO2": "US",
"shipFromPhone": "(201) 372-9700",
"shipFromEmail": "apisupport@apc-pli.com",
"sender": "APC_NJ",
"company": "Destination Company",
"contact": "Destination Contact",
"address1": "123 Main St",
"address2": "",
"address3": "",
"city": "Toronto",
"stateProv": "ON",
"postalCode": "M5V 3L9",
"countryISO2": "CA",
"phone": "(201) 372-9700",
"email": "apisupport@apc-pli.com",
"taxCode": "",
"ref1": "",
"ref2": "",
"costCenter": "",
"exportReason": "",
"labelFormat": "ZPL",
"serviceCode": "APC.PRIPDC",
"shipDateTime": "01/01/2026",
"timeZone": "",
"parcelLength": 2,
"parcelWidth": 2,
"parcelHeight": 2,
"parcelWeight": 1,
"parcelContents": "M",
"commodityItems": [
{
"itemID": "123",
"itemDescription": "Shirt",
"itemQuantity": 1,
"itemWeight": 1,
"itemWeightUOM": "lb",
"itemValue": 9.95,
"itemTariffCode": "610910",
"itemCountryOfOriginISO2": "US"
}
]
}' \
"https://parcelconnect-stage.apc-pli.com/api/system/packages/register"

Response

{
"errorCode": 0,
"errorMessage": null,
"trackingNumber": "12345P01234567890",
"packageId": "P0123456789",
"labelBuf1": "<base64 ZPL/PDF/PNG buffer>",
"labelBuf2": null,
"labelBuf3": null
}

Request body parameters

All fields are case-sensitive.

FieldTypeDescriptionMax length / Example
userIDstringAuthorization data
accountNumberstringAuthorization data
passcodestringAuthorization data
importerVATNumberstringImporter VAT number50
shipFromAttentionstringShip-from attention line50
shipFromNamestringSender company or facility name50
shipFromAddress1stringSender address line 150
shipFromAddress2stringSender address line 250
shipFromCitystringCity of origin50
shipFromStateProvstringState or province code10
shipFromPostalCodestringPostal or ZIP code10
shipFromCountryISO2string2-character country ISO code2 (e.g., US)
shipFromPhonestringSender phone number25
shipFromEmailstringSender email address50
senderstringWarehouse facility (APC_NJ, APC_IL, APC_CA)
companystringDestination company name50
contactstringRecipient contact name50
address1stringDestination address line 150
address2stringDestination address line 250
address3stringDestination address line 350
citystringDestination city50
stateProvstringDestination state/province code50
postalCodestringDestination postal code10
countryISO2stringDestination country code2 (e.g., CA)
phonestringDestination phone number20
emailstringDestination email address100
taxCodestringRecipient VAT / tax number50
ref1stringCustom reference value 1 (echoed back in tracking responses)50
ref2stringCustom reference value 2 (echoed back in tracking responses)50
costCenterstringCost center to charge the shipment to (e.g., shipping)100
exportReasonstringReason for export (e.g., Gift, Samples)50
labelFormatstringLabel format to returnZPL, PDF, PNG
serviceCodestringService identifier (e.g., APC.PRIPDC). The full list of services available to your account can be retrieved from the Services endpoint.20
shipDateTimestringShip date, format MM/DD/YYYY. Optional.Example: 01/01/2026
timeZonestringSender timezone. Free-form text; not validated.Max length 50
parcelLengthdecimalLongest parcel dimension in inches. Optional.Example: 10 or 10.00
parcelWidthdecimalSecond longest dimension in inches. Optional.Example: 8 or 8.50
parcelHeightdecimalShortest dimension in inches. Optional.Example: 6 or 6.25
parcelWeightdecimalTotal weight in pounds. Required.Example: 2 or 2.25
parcelContentsstringItem category. M (Merchandise) is the typical default.M = Merchandise
G = Gift
D = Documents
Z = Hazardous Materials
S = Commercial Sample
H = Humanitarian Donation
O = Other
commodityItemsarrayLine items with tariff and value details. At least one item is currently required for all shipments.
commodityItems.itemIDstringInternal item identifier50
commodityItems.itemDescriptionstringPlain-text item description100
commodityItems.itemQuantityintegerItem quantity5
commodityItems.itemWeightdecimalItem weight
commodityItems.itemWeightUOMstringWeight unit of measurelb, kg
commodityItems.itemValuedecimalDeclared value per item
commodityItems.itemTariffCodestringHS code for customs13
commodityItems.itemCountryOfOriginISO2stringCountry of manufacture2