Create label
POST /openapi/Document/CreateLabel — TMS API · Label
Creates a carrier label for the parcels of registered shipments and returns the label content.
- Each parcel is identified by
customerSpecificCode(your parcel number). - If
formatis empty or unrecognized, the label is generated in ZPL; send the relevant format code for PDF or image format. - If multiple parcels are linked to a single label, indicate the sequence with
labelSequenceNumberandisLastSequence(isLastSequenceis consideredtrueif empty). - If parcel volume/weight is sent, the values in the shipment record are updated.
- The
barcodeLabelin the response is the label content (ZPL text or content encoded according to the format).
İstek gövdesi
clientCode(string, zorunlu): Organization code.accountCode(string, zorunlu): Account code.createLabels(object[], zorunlu): Shipments for which the label will be created.createLabels.parcels(object[]): Parcels to receive labels.createLabels.parcels.data(any[]): Carrier-specific additional data.createLabels.parcels.lines(object[]): Order lines in the parcel.createLabels.parcels.format(string): Label format code (e.g.ZPL,PDF). ZPL is generated if empty or unrecognized.createLabels.parcels.weight(number): Parcel weight (kg).createLabels.parcels.isFragile(boolean): Is the parcel fragile.createLabels.parcels.isLastSequence(boolean): Is it the last parcel; consideredtrueif empty.createLabels.parcels.volumetricWeight(number): Parcel volume.createLabels.parcels.labelSequenceNumber(string): Sequence number in multi-parcel single label flow.createLabels.parcels.customerSpecificCode(string): Parcel number (your unique parcel code).
createLabels.locationCode(string): Shipment origin location code.createLabels.consignmentNumber(string): Shipment number.
Yanıtlar
- 200: Created labels
- 400: Shipment not found, shipment type not suitable, or carrier returned an error
- 401: Token missing, invalid, or expired (response without body).
- 429: Request limit exceeded.
200 yanıt alanları
format(string): Label format.carrierCode(string): Carrier code.barcodeLabel(string): Label content (ZPL text or content encoded according to the format).barcodeValue(string): Barcode value on the label.trackingLink(string): Tracking link.trackingNumber(string): Carrier tracking number.consignmentNumber(string): Shipment number.customerSpecificCode(string): Parcel number.barcodeLabelIntegrationTypeCode(string): Integration type used to generate the label.