POST orders

Place an order for one or more products.

Request

Body

You must include at least one item and a shipping address. Optionally, you can specify your own custom order ID — Print API will automatically generate a random ID if you don't — plus up to about 1kb of metadata you'd like to store with your order.

Property Description Type Details
Id Optional custom order ID. Must be unique within your account. If not supplied, the API will generate a random ID automatically. string Length: 0-36, inclusive
Email Optional customer e-mail address. If you've enabled e-mail confirmations in your application settings, they will be sent to this address. string Length: 0-254, inclusive
Username Optional customer username. If you've enabled e-mail confirmations in your application settings, this name will be used to address the recipient. string Length: 0-64, inclusive
ProductionSpeed Optional custom production speed for this order. Must be available for at least one item! Default is "Standard". Additional charges apply when opting for faster production speeds. ProductionSpeed -
Items The items belonging to the order. in:Item -
Shipping The shipping address and method selection preference of the order. in:Shipping -
Coupon Optional coupon to apply to the order. Coupons apply to the Print API payment screen only. Contact support to add discount coupons for your application. string Length: 0-64, inclusive
Metadata Optional metadata to store with the item. Will be available whenever you GET the order again. You can store any string (JSON, XML or other) up to 1 kb. string Length: 0-4092, inclusive
{
  "email": "info@printapi.nl",
  "productionSpeed": "Standard",
  "items": [
    {
      "productId": "boek_hc_a5_sta",
      "pageCount": 32,
      "quantity": 1,
      "files": {
        "content": "https://www.printapi.nl/sample-book-a5-content.pdf",
        "cover": "https://www.printapi.nl/sample-book-a5-cover.pdf"
      }
    },
    {
      "productId": "poster_a3_staand",
      "quantity": 10,
      "metadata": "{ \"my_file\": \"wswU7jPMloKSD5GhDFf9hbRQiXiTYj.jpg\" }"
    }
  ],
  "shipping": {
    "preference": "Tracked",
    "address": {
      "name": "Print API",
      "line1": "Osloweg 75",
      "postCode": "9700 GE",
      "city": "Groningen",
      "country": "NL"
    }
  }
}
<?xml version="1.0"?>
<Order xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Email>info@printapi.nl</Email>
  <ProductionSpeed>Standard</ProductionSpeed>
  <Items>
    <Item>
      <ProductId>boek_hc_a5_sta</ProductId>
      <PageCount>32</PageCount>
      <Quantity>1</Quantity>
      <Files>
        <Content>https://www.printapi.nl/sample-book-a5-content.pdf</Content>
        <Cover>https://www.printapi.nl/sample-book-a5-cover.pdf</Cover>
      </Files>
      <Retail xsi:nil="true" />
    </Item>
    <Item>
      <ProductId>poster_a3_staand</ProductId>
      <PageCount xsi:nil="true" />
      <Quantity>10</Quantity>
      <Retail xsi:nil="true" />
      <Metadata>{ "my_file": "wswU7jPMloKSD5GhDFf9hbRQiXiTYj.jpg" }</Metadata>
    </Item>
  </Items>
  <Shipping>
    <Preference>Tracked</Preference>
    <Address>
      <Name>Print API</Name>
      <Line1>Osloweg 75</Line1>
      <PostCode>9700 GE</PostCode>
      <City>Groningen</City>
      <Country>NL</Country>
    </Address>
  </Shipping>
</Order>

Response

Body

The order as it was processed by Print API. If you chose to upload your files to the API, the items collection will contain the necessary upload URLs. Likewise, if Print API checkout is enabled, the checkout object will contain the follow-up URL.

Property Description Type Details
Id The ID assigned to the order. string -
DateTime The date/time the order was created. ISO 8601 date -
Status The status of the order. OrderStatus -
TrackingUrl The tracking URL provided by our shipping partner. May become available on status "Shipped". In rare cases the tracking URL may be absent, so always check if it is present. string -
Email Optional customer e-mail address. string -
Username Optional customer username. string -
ProductionSpeed The production speed of this order. ProductionSpeed -
Checkout Print API payment screen data about the order. Only present if you enabled the payment screen in your application settings before submitting the order. out:CheckoutInfo -
Items The items belonging to the order. out:Item -
Metadata Optional metadata stored with the order. string -
Shipping The shipping address and method of the order. out:Shipping -
Invoice The costs of the order. out:Invoice -
{
  "id": "83432183",
  "dateTime": "2025-01-01T06:12:24.0508061",
  "status": "Created",
  "email": "info@printapi.nl",
  "productionSpeed": "Standard",
  "checkout": {
    "amount": 99.99,
    "setupUrl": "https://test.printapi.nl/v2/checkout/k56xz0u2lc5mOp3t4CcZ"
  },
  "items": [
    {
      "id": "07453",
      "productId": "boek_hc_a5_sta",
      "pageCount": 32,
      "quantity": 1,
      "files": {
        "content": {
          "status": "DownloadPending",
          "downloadUrl": "https://www.printapi.nl/sample-book-a5-content.pdf"
        },
        "cover": {
          "status": "DownloadPending",
          "downloadUrl": "https://www.printapi.nl/sample-book-a5-cover.pdf"
        }
      }
    },
    {
      "id": "18557",
      "productId": "poster_a3_sta",
      "pageCount": 1,
      "quantity": 10,
      "files": {
        "content": {
          "status": "AwaitingUpload",
          "uploadUrl": "https://test.printapi.nl/v2/files/qYgtKyiRCj5myJ6cYC4t"
        }
      },
      "metadata": "{ \"my_file\": \"wswU7jPMloKSD5GhDFf9hbRQiXiTYj.jpg\" }"
    }
  ],
  "shipping": {
    "method": {
      "name": "Pakket (M)",
      "isTrackable": true
    },
    "address": {
      "name": "Print API",
      "line1": "Osloweg 75",
      "postCode": "9700 GE",
      "city": "Groningen",
      "country": "NL"
    }
  },
  "invoice": {
    "production": {
      "cost": 39.24,
      "taxes": [
        {
          "rate": 0.06,
          "amount": 0.57
        },
        {
          "rate": 0.21,
          "amount": 6.24
        }
      ]
    },
    "shipping": {
      "cost": 5.95,
      "taxes": [
        {
          "rate": 0.21,
          "amount": 1.25
        }
      ]
    },
    "handling": {
      "cost": 1.50,
      "taxes": [
        {
          "rate": 0.21,
          "amount": 0.32
        }
      ]
    },
    "total": {
      "cost": 46.69,
      "taxes": [
        {
          "rate": 0.21,
          "amount": 7.81
        },
        {
          "rate": 0.06,
          "amount": 0.57
        }
      ]
    }
  },
  "invoicingState": "Included"
}
<?xml version="1.0"?>
<Order xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Id>83432183</Id>
  <DateTime>2025-01-01T06:12:24.0508061+01:00</DateTime>
  <Status>Created</Status>
  <Email>info@printapi.nl</Email>
  <ProductionSpeed>Standard</ProductionSpeed>
  <Checkout>
    <Amount>99.99</Amount>
    <SetupUrl>https://test.printapi.nl/v2/checkout/k56xz0u2lc5mOp3t4CcZ</SetupUrl>
    <Status xsi:nil="true" />
  </Checkout>
  <Items>
    <Item>
      <Id>07453</Id>
      <ProductId>boek_hc_a5_sta</ProductId>
      <PageCount>32</PageCount>
      <Quantity>1</Quantity>
      <Retail xsi:nil="true" />
      <Files>
        <Content>
          <Status>DownloadPending</Status>
          <DownloadUrl>https://www.printapi.nl/sample-book-a5-content.pdf</DownloadUrl>
        </Content>
        <Cover>
          <Status>DownloadPending</Status>
          <DownloadUrl>https://www.printapi.nl/sample-book-a5-cover.pdf</DownloadUrl>
        </Cover>
      </Files>
    </Item>
    <Item>
      <Id>18557</Id>
      <ProductId>poster_a3_sta</ProductId>
      <PageCount>1</PageCount>
      <Quantity>10</Quantity>
      <Retail xsi:nil="true" />
      <Files>
        <Content>
          <Status>AwaitingUpload</Status>
          <UploadUrl>https://test.printapi.nl/v2/files/qYgtKyiRCj5myJ6cYC4t</UploadUrl>
        </Content>
      </Files>
      <Metadata>{ "my_file": "wswU7jPMloKSD5GhDFf9hbRQiXiTYj.jpg" }</Metadata>
    </Item>
  </Items>
  <Shipping>
    <Method>
      <Name>Pakket (M)</Name>
      <IsTrackable>true</IsTrackable>
    </Method>
    <Address>
      <Name>Print API</Name>
      <Line1>Osloweg 75</Line1>
      <PostCode>9700 GE</PostCode>
      <City>Groningen</City>
      <Country>NL</Country>
    </Address>
  </Shipping>
  <Invoice>
    <Production>
      <Cost>39.24</Cost>
      <Taxes>
        <Tax>
          <Rate>0.06</Rate>
          <Amount>0.57</Amount>
          <CalculatedOver xsi:nil="true" />
        </Tax>
        <Tax>
          <Rate>0.21</Rate>
          <Amount>6.24</Amount>
          <CalculatedOver xsi:nil="true" />
        </Tax>
      </Taxes>
    </Production>
    <Shipping>
      <Cost>5.95</Cost>
      <Taxes>
        <Tax>
          <Rate>0.21</Rate>
          <Amount>1.25</Amount>
          <CalculatedOver xsi:nil="true" />
        </Tax>
      </Taxes>
    </Shipping>
    <Handling>
      <Cost>1.50</Cost>
      <Taxes>
        <Tax>
          <Rate>0.21</Rate>
          <Amount>0.32</Amount>
          <CalculatedOver xsi:nil="true" />
        </Tax>
      </Taxes>
    </Handling>
    <Total>
      <Cost>46.69</Cost>
      <Taxes>
        <Tax>
          <Rate>0.21</Rate>
          <Amount>7.81</Amount>
          <CalculatedOver xsi:nil="true" />
        </Tax>
        <Tax>
          <Rate>0.06</Rate>
          <Amount>0.57</Amount>
          <CalculatedOver xsi:nil="true" />
        </Tax>
      </Taxes>
    </Total>
  </Invoice>
  <InvoicingState>Included</InvoicingState>
</Order>