Endpoint - GenerateLabelEndpoint
Generate Label PNG and associated shipping label documentation.
This endpoint method accept a consignment request which contains the shipping address, list of packages and shipping service configuration options.
The method will generate a label for each package and return all packages with the matching sequence number.
Request
Post
GenerateLabelRequest
GenerateLabelRequest
Field Name | Type | Description |
---|---|---|
AuthorizationToken | Guid | Authorization token uniquely identifying each integration profile |
Name | String | Customer name |
CompanyName | String | Company name |
AddressLine1 | String | Address Line 1 |
AddressLine2 | String | Address Line 2 |
AddressLine3 | String | Address Line 3 |
Town | String | Address Town / City |
Region | String | Address State / County / Region |
CountryCode | String | Country code ISO 3166-2 |
Postalcode | String | Postal code / Zip code |
DeliveryNote | String | Delivery note |
String | Email address of the customer | |
Phone | String | Phone number of the customer |
OrderId | Integer | Linnworks order id |
OrderReference | String | Linnworks order reference number |
OrderCurrency | String | Currency code (3 characters) |
OrderValue | Decimal | Order value |
PostageCharges | Decimal | Shipping cost |
ServiceId | Guid | Unique Service Id as defined in UserAvailableServices response |
Packages | Package[] | List of packages. See Endpoint - GenerateLabelEndpoint - Package |
OrderExtendedProperties | OrderExtendedProperties[] | List of extended properties items mapped to order extended properties. See Endpoint - GenerateLabelEndpoint - OrderExtendedProperty |
SaveConfigItems | ServiceConfigItem[] | List of config items value as defined by the user in the service configuration. See Endpoint - GenerateLabelEndpoint - ServiceConfigItem |
Package
Package
Field Name | Type | Description |
---|---|---|
SequenceNumber | Integer | Sequence number of a package |
PackageWeight | Decimal | Package weight (grams) |
PackageWidth | Decimal | Package width (cm) |
PackageHeight | Decimal | Package height (cm) |
PackageDepth | Decimal | Package depth (cm) |
PackageFormat | String | Packaging type: BOX, PARCEL, PACKET, LETTER |
Items | Item[] | Property title. See Endpoint - GenerateLabelEndpoint - Item |
Item
Item
Field Name | Type | Description |
---|---|---|
ItemName | String | Name of the product |
ProductCode | String | SKU |
Quantity | Integer | Item quantity |
UnitValue | Decimal | Product unit cost (OrderCurrency) |
UnitWeight | Decimal | Product unit weight (gram) |
Height | Decimal | Product height (cm) |
Width | Decimal | Product width (cm) |
Length | Decimal | Product length (cm) |
ExtendedProperties | ExtendedProperty[] | Extended property as mapped to Linnworks item extended property. See Endpoint - GenerateLabelEndpoint - ExtendedProperty |
Extended Property
Extended Property
Field Name | Type | Description |
---|---|---|
Name | String | Extended Property name as defined |
Value | String | Linnworks item extended property value |
OrderExtendedProperties
OrderExtendedProperties
Field Name | Type | Description |
---|---|---|
Name | String | Extended Property name as defined |
Value | String | Linnworks order extended property value |
Service Config Item
Service Config Item
Field Name | Type | Description |
---|---|---|
ConfigItemId | String | Config item Id as defined |
SelectedValue | String | Value specified by the user in the config |
Sample
{
"AuthorizationToken": "a8e53e86eead4b69beaa0afcc29b67fb",
"Name": "Customer name",
"CompanyName": "Company name",
"AddressLine1": "Great Russell St",
"AddressLine2": "Bloomsbury",
"AddressLine3": "",
"Town": "London",
"Region": "Greater London",
"CountryCode": "GB",
"Postalcode": "WC1B 3DG",
"DeliveryNote": "Some note",
"Email": "[email protected]",
"Phone": "+44 00000000000",
"OrderId": 100001,
"OrderReference": "ORDERREFERENCE",
"OrderCurrency": "GBP",
"OrderValue": 1,
"PostageCharges": 1,
"ServiceId": "6a47631504db4d25a25ce6917a1bcad9",
"Packages": [
{
"SequenceNumber": 0,
"PackageWeight": 1,
"PackageWidth": 1,
"PackageHeight": 1,
"PackageDepth": 1,
"PackageFormat": "BOX",
"Items": [
{
"ItemName": "Product 1",
"ProductCode": "SKU001",
"Quantity": 1,
"UnitValue": 1,
"UnitWeight": 1,
"Height": 1,
"Width": 1,
"Length": 1,
"ExtendedProperties": [
{
"Name": "ExtendedCover",
"Value": "True"
}
]
}
]
}
],
"OrderExtendedProperties": [
{
"Name": "SafePlace",
"Value": "Some message"
}
],
"ServiceConfigItems": [
{
"ConfigItemId": "InsuranceConver",
"SelectedValue": "500"
}
]
}
Response
GenerateLabelResponse
GenerateLabelResponse
Field Name | Type | Description |
---|---|---|
LeadTrackingNumber | String | Lead tracking number for the whole consignment |
Cost | Decimal | Cost of all labels |
Currency | String | Cost currency |
Package | Package[] | List of Package Response classes. See Endpoint - GenerateLabelEndpoint - Package |
IsError | Boolean | Indicates if there is an error |
ErrorMessage | String / null | Error message |
Package
Field Name | Type | Description |
---|---|---|
SequenceNumber | Integer | Package sequence number. Must match what is in the request |
TrackingNumber | String | Package tracking number |
PNGLabelDataBase64 | String | Base64 PNG label |
AdditionalPngsBase64 | String[] | Additional Base64 PNG documents |
PDFBytesDocumentationBase64 | String[] | Each element is Base64 PDF document. If no document, must be an empty array. Null will result in an error |
LabelWidth | Decimal | Label width in inches |
LabelHeight | Decimal | Label height in inches |
Sample
{
"LeadTrackingNumber": "GB1234567891",
"Cost": 0,
"Currency": "GBP",
"Package": [
{
"SequenceNumber": 0,
"TrackingNumber": "GB1234567891",
"PNGLabelDataBase64": "DJHDD234872376478DDD….",
"PDFBytesDocumentationBase64": [
"DJHDD234872376478DDD….",
"DJHDD234872376478DDD…."
],
"LabelWidth": 4,
"LabelHeight": 6
}
],
"IsError": false,
"ErrorMessage": null
}
Updated over 1 year ago