Overview

Introduction

The PrintedDirect API supports two ways of handling delivery:

  • Managed delivery
  • Pre-paid labels

With managed delivery, all that is needed is an address to ship to along with the Jobs needing to be sent. This is useful when you don't have your own delivery system configured and want to rely on PrintedDirect to handle it for you.

With pre-paid labels, whilst you still need to provide an address, at the point of dispatch, PrintedDirect will fetch your label(s). All that is needed is to provide an additional field in the API call with the remote URL to your label generator. To read more, see Using your own label?

Usage

{
    "jobs": [
        "d171520e-bbc4-4203-bad1-b4a9a6544209"
    ],
    "delivery_address": {
      "name": "Jane Smith",
      "email": "jane.smith@example.com",
      "phone": "+447777111222",
      "company": "The Printed Group",
      "address_line1": "2 Arcot Court",
      "address_line2": "Nelson Road",
      "city": "Cramlington",
      "postcode": "NE23 1BB",
      "country": "GB"
    }
}

Using your own label?

If you're using your own labels, then you must send an additional field in the options object which contains the URL of where your label resides. Example:

{
    ..
    "options": {
        "prepaid_label_url": "https://www.example.com/orders/ABC-123456/label-generator?number={parcelCount}"
    }
}

As you can see in the example above, the field prepaid_label_url is added to an options object. This informs the API that you wish to receive a Delivery Option specifically for a prepaid label.

The value must be a valid URL with the placeholder {parcelCount}. During dispatch, this placeholder gets replaced with the number of labels the Production House requires. For example, if the Production House requires three labels, then using the example above, the API would request the label from https://www.example.com/orders/ABC-123456/label-generator?number=3.

The response must be a valid PDF with the correct number of pages. Returning an incorrect number of pages will cause a delay in getting your Order dispatched.

Delaying your Job Batch

You can delay your Job Batch by providing a number of days before the Production House should begin producing your Job(s). Example:

{
    ..
    "options": {
        "extra_production_time_days": 3
    }
}

Using the example above, the Production House will wait 3 additional working days before beginning to produce your Job(s).

Note: The maximum number of days you can provide is 20. Any value higher than this will result in a 400 Bad Request.