This documentation is for the v3 (stable) version of the API.
Invocation URL: /v3/dynamiclabels/generatelabel

Descripton:

This method can be used to produce Fastway labels if you do not wish to use your own label creation. Complete all the required feilds multiple labels may be generated to the same address.

Parameters:

Get Label color, Label number and Number of excess label using Allocate call and input the Parcel weight used in this call.

Is an array of 'Items'. Simply increment the index number to send multiple items as shown in the example.

items[0].colour - Label color - Required
items[0].labelNumber - Label number - Required
items[0].weight - Parcel weight - Required
items[0].numberOfExcess - Number of excess labels

Input toPostcode & destRF, used in above Allocate call.

toCompany - Required
toAddress1 - Required
toAddress2
toCity - Required
toFastwayRFName
toPostCode - To Postcode (eg: '4137') - Required
contactName - Required
contactPhone - Required
fromCompanyName - Required
fromAddress1 - Required
fromCity - Required
fromPhone - Required
specialInstruction1
specialInstruction2
customerReference
labelDate - Required
destRF - Destination RF code (eg: 'AUK','NPE'.....) - Required
Type - The type of label you wish to generate, your options are PDF (0), Sato (1), Argox PPLA (2), Argox PPLB (3) and Image (4), you can refer to these by their alpha or numeric types

Returns:

Type PDF: A PDF stream, you will need to save this, do not send this link to any external parties.
Type Sato/Argox:

    {
        result: {
            success: true,
            code: [
                'PRINTER CODE'
            ]
        },
        generated_in: '37ms'
    }

Type Image:
    {
        result: {
            success: true,
            jpegs:
      {
        'filename': '1.jpg,
        'base64Utf8Bytes':'9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDB.....'
        },
        generated_in: '37ms'
    }

Example:

https://api.fastway.org/v3/dynamiclabels/generatelabel?api_key=YOUR_API_KEY&items[0].colour=red&items[0].labelNumber=AA0987654321&items[0].weight=4&items[0].numberOfExcess=1&items[1].colour=red&items[1].labelNumber=AA0987654322&items[1].weight=3&items[1].numberOfExcess=0 &toCompany=Tim&toAddress1=123 Fake street&toCity=Napier&toFastwayRFName=Auckland&toPostCode=4110&contactName=Jim&contactPhone=06 765 4321&fromCompanyName=Tims Toys&fromAddress1=123 The toy shop &fromCity=Hastings&fromPhone=06 9223111&specialInstruction1=Beware of the dog &customerReference=PO821312&labelDate=24/06/2013&destRF=AUK&type=PDF

Back to Dynamic Labels