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

Field NameTypeDescription
AuthorizationTokenGuidAuthorization token uniquely identifying each integration profile
NameStringCustomer name
CompanyNameStringCompany name
AddressLine1StringAddress Line 1
AddressLine2StringAddress Line 2
AddressLine3StringAddress Line 3
TownStringAddress Town / City
RegionStringAddress State / County / Region
CountryCodeStringCountry code ISO 3166-2
PostalcodeStringPostal code / Zip code
DeliveryNoteStringDelivery note
EmailStringEmail address of the customer
PhoneStringPhone number of the customer
OrderIdIntegerLinnworks order id
OrderReferenceStringLinnworks order reference number
OrderCurrencyStringCurrency code (3 characters)
OrderValueDecimalOrder value
PostageChargesDecimalShipping cost
ServiceIdGuidUnique Service Id as defined in UserAvailableServices response
PackagesPackage[]List of packages. See Endpoint - GenerateLabelEndpoint - Package
OrderExtendedPropertiesOrderExtendedProperties[]List of extended properties items mapped to order extended properties. See Endpoint - GenerateLabelEndpoint - OrderExtendedProperty
SaveConfigItemsServiceConfigItem[]List of config items value as defined by the user in the service configuration. See Endpoint - GenerateLabelEndpoint - ServiceConfigItem

Package

Field NameTypeDescription
SequenceNumberIntegerSequence number of a package
PackageWeightDecimalPackage weight (grams)
PackageWidthDecimalPackage width (cm)
PackageHeightDecimalPackage height (cm)
PackageDepthDecimalPackage depth (cm)
PackageFormatStringPackaging type: BOX, PARCEL, PACKET, LETTER
ItemsItem[]Property title. See Endpoint - GenerateLabelEndpoint - Item

Item

Field NameTypeDescription
ItemNameStringName of the product
ProductCodeStringSKU
QuantityIntegerItem quantity
UnitValueDecimalProduct unit cost (OrderCurrency)
UnitWeightDecimalProduct unit weight (gram)
HeightDecimalProduct height (cm)
WidthDecimalProduct width (cm)
LengthDecimalProduct length (cm)
ExtendedPropertiesExtendedProperty[]Extended property as mapped to Linnworks item extended property. See Endpoint - GenerateLabelEndpoint - ExtendedProperty

Extended Property

Field NameTypeDescription
NameStringExtended Property name as defined
ValueStringLinnworks item extended property value

OrderExtendedProperties

Field NameTypeDescription
NameStringExtended Property name as defined
ValueStringLinnworks order extended property value

Service Config Item

Field NameTypeDescription
ConfigItemIdStringConfig item Id as defined
SelectedValueStringValue 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

Field NameTypeDescription
LeadTrackingNumberStringLead tracking number for the whole consignment
CostDecimalCost of all labels
CurrencyStringCost currency
PackagePackage[]List of Package Response classes. See Endpoint - GenerateLabelEndpoint - Package
IsErrorBooleanIndicates if there is an error
ErrorMessageString / nullError message

Package

Field NameTypeDescription
SequenceNumberIntegerPackage sequence number. Must match what is in the request
TrackingNumberStringPackage tracking number
PNGLabelDataBase64StringBase64 PNG label
AdditionalPngsBase64String[]Additional Base64 PNG documents
PDFBytesDocumentationBase64String[]Each element is Base64 PDF document. If no document, must be an empty array. Null will result in an error
LabelWidthDecimalLabel width in inches
LabelHeightDecimalLabel 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
}