Introduction
This documentation describes the Printpartnerz API v1.0
This documentation describes the Printpartnerz API v1.0
To get started with Printpartnerz please get in touch with us, and we'll be glad to assist you in getting started.
The Printpartnerz API is RESTful API. Calls are implemented as HTTP GET or POST. The HTTP response codes 200 and 201 are positive responses, all other response codes must be considered as error. Data will only be returned for HTTP response code 200. Error descriptions can be returned on 4xx response codes.
All request data posted to the API must be in JSON objects. The documentation for each API call describes the request data parameters in detail.
Return data from the API is in JSON objects. The documentation for each API call describes the return values in detail.
Set content-type to application/json on all requests.
Each request to the API contains an API key for authentication. API keys are provided by Printpartnerz.
A separate API key will be provided for testing purposes. For sandboxing change api. in the HTTP requests with sandbox.
Please be advised: every order pushed to the production environment (api. ) will be produced and charged unless cancelled before it is in production.
GET https://api.printpartnerz.com/v1/products
Request a list of all enabled products.
{
"apikey": "7ZS9D4NY6eVy3KXfNEkzpN3EnkYSt"
}
[
{
"name": "Aluminium geborsteld 40x30",
"sku": "aluminium_geborsteld_40x30"
},
{
"name": "Acrylglas 30x30",
"sku": "acrylglas_30x30"
},
{
"name": "Aluminium wit 40x40",
"sku": "aluminium_wit_40x40"
}
]
| Name | Type | Description | Required |
|---|---|---|---|
| apikey | string | API access key | required |
| Name | Type | Description |
|---|---|---|
| name | string | Product name |
| sku | string | Product number |
| Code | Status | Description |
|---|---|---|
| 200 | OK | The request has succeeded |
| 400 | Bad request | The request was invalid or parameters are missing |
| 403 | Forbidden | The request was denied due to missing or incorrect credentials |
GET https://api.printpartnerz.com/v1/options
Request a list of all enabled options.
{
"apikey": "7ZS9D4NY6eVy3KXfNEkzpN3EnkYSt"
}
[
{
"name": "Blind ophangsysteem",
"sku": "blind_ophangsysteem"
},
{
"name": "Voorgemonteerd frame",
"sku": "voorgemonteerd_frame"
}
]
| Name | Type | Description | Required |
|---|---|---|---|
| apikey | string | API access key | required |
| Name | Type | Description |
|---|---|---|
| name | string | Product name |
| sku | string | Product number |
| Code | Status | Description |
|---|---|---|
| 200 | OK | The request has succeeded |
| 400 | Bad request | The request was invalid or parameters are missing |
| 403 | Forbidden | The request was denied due to missing or incorrect credentials |
GET https://api.printpartnerz.com/v1/products/info
Get detailed information on a single product.
{
"apikey": "7ZS9D4NY6eVy3KXfNEkzpN3EnkYSt",
"sku": "aluminium_geborsteld_40x30"
}
{
"name": "Aluminium geborsteld 40x30",
"sku": "aluminium_geborsteld_40x30"
}
| Name | Type | Description | Required |
|---|---|---|---|
| apikey | string | API access key | required |
| sku | string | Product number | required |
| Name | Type | Description |
|---|---|---|
| name | string | Product name |
| sku | string | Product number |
| Code | Status | Description |
|---|---|---|
| 200 | OK | The request has succeeded |
| 204 | No content | The requested product was not found |
| 400 | Bad request | The request was invalid or parameters are missing |
| 403 | Forbidden | The request was denied due to missing or incorrect credentials |
POST https://api.printpartnerz.com/v1/orders/add
Add a new order including a shipping address, one or more items, options and files.
Files are added with a URL from where Printpartnerz can fetch the files when the order has been accepted. A TLS encrypted HTTPS connection, use of an access key in the query string and use of a network ACL is recommended.
Example: https://mystore.example.com/files/77345809358907345445
{
"apikey": "7ZS9D4NY6eVy3KXfNEkzpN3EnkYSt",
"reference": "123456",
"email": "johndoe@example.com",
"phone": "12345678",
"whitelabel": false,
"shippingaddress": {
"companyname": "My company",
"firstname": "John",
"lastname": "Doe",
"street": "Main street",
"housenumber": "10",
"zipcode": "1234 AB",
"city": "Amsterdam",
"country": "NL"
},
"orderitems": [
{
"reference": "123456-1",
"sku": "aluminium_geborsteld_40x30",
"quantity": 1,
"file": "https://mystore.example.com/files/77345809358907345445",
"options": [
{
"sku": "blind_ophangsysteem",
"quantity": 1
}
]
},
{
"reference": "123456-2",
"sku": "aluminium_geborsteld_90x130",
"quantity": 2,
"file": "https://mystore.example.com/files/77345809358907345446",
"options": [
{
"sku": "voorgemonteerd_frame",
"quantity": 1
}
]
}
]
}
{
"reference": "123456",
"order_id": 278903,
"shipping_workdays": 3,
"shipping_date": "07-08-2024",
"subtotal": 222.66,
"shippingcosts": 27.25,
"tax": 52.48,
"total": 302.39
}
| Name | Type | Description | Required |
|---|---|---|---|
| apikey | string | API access key | required |
| reference | string | Clients own order reference identifier | required |
| string | End customer's email address (used for shipping/delivery purposes) | required | |
| phone | string | End customer's phone number (used for shipping/delivery purposes) | optional |
| whitelabel | boolean | Indicates whether a shipment has client sender details associated with it. When the boolean is set to false, it signifies that the shipment includes client sender information; when set to true, client sender information will be omitted. | optional |
| shippingaddress | array | Array of one address object | required |
| shippingaddress : companyname | string | End customer's shipping company name | optional |
| shippingaddress : firstname | string | End customer's shipping firstname | required |
| shippingaddress : lastname | string | End customer's shipping lastname | required |
| shippingaddress : street | string | End customer's shipping street name | required |
| shippingaddress : housenumber | string | End customer's shipping housenumber | required |
| shippingaddress : street2 | string | End customer's shipping street name 2 | optional |
| shippingaddress : housenumber2 | string | End customer's shipping housenumber 2 | optional |
| shippingaddress : zipcode | string | End customer's shipping zipcode | required |
| shippingaddress : city | string | End customer's shipping city name | required |
| shippingaddress : country | string | End customer's shipping country (ISO 3166-1 alpha-2 code retrieved from List shipping countries) | required |
| orderitems | array | Array of one or more order item objects | required |
| orderitems : reference | string | Clients own order item reference identifier | required |
| orderitems : sku | string | Product number (Retrieved from List products) | required |
| orderitems : quantity | integer | Number of copies to produce for this specific item | required |
| orderitems : file | string | URL to the print file - starting with HTTPS
|
required |
| orderitems : options | array | Array of one or more order item options objects | optional |
| orderitems : options : sku | string | The product option identification number (Retrieved from List options) | required |
| orderitems : options : quantity | integer | The number of times the specific option is used per item | required |
| Name | Type | Description |
|---|---|---|
| reference | string | Clients own order reference identifier |
| order_id | integer | Printpartnerz uniquely generated order identifier |
| shipping_workdays | integer | Number of workdays for the order to be shipped |
| shipping_date | date | Expected date for the order to be shipped |
| subtotal | decimal | Product costs for the order |
| shippingcosts | decimal | Shipping costs for the order (Shipping costs are a calculated estimate based on the order items. The costs may change later during order processing, especially for more complex orders with multiple items of different sizes.) |
| tax | decimal | Tax for the order |
| total | decimal | Total costs for the order |
| Code | Status | Description |
|---|---|---|
| 201 | Created | The order registration was created with success |
| 400 | Bad request | The request was invalid or parameters are missing |
| 403 | Forbidden | The request was denied due to missing or incorrect credentials |
POST https://api.printpartnerz.com/v1/orders/cancel
Request cancellation for a specific order.
Orders that have been processed or are currently in production cannot be canceled though the API. The cancellation period is 20 minutes.
{
"apikey": "7ZS9D4NY6eVy3KXfNEkzpN3EnkYSt",
"order_id": "278903"
}
{
"reference": "123456",
"state": "cancelled"
}
| Name | Type | Description | Required |
|---|---|---|---|
| apikey | string | API access key | required |
| order_id | string | Printpartnerz uniquely generated order identifier (Retrieved from Add order) | required |
| Name | Type | Description |
|---|---|---|
| reference | string | Clients own order reference identifier |
| state | string | New state of the order |
| Code | Status | Description |
|---|---|---|
| 200 | OK | The request has succeeded |
| 400 | Bad request | The request was invalid or parameters are missing |
| 403 | Forbidden | The request was denied due to missing or incorrect credentials |
| 409 | Conflict | The request failed due to wrong order state |
| 410 | Gone | The requested order was not found |
GET https://api.printpartnerz.com/v1/orders/state
Request state details for a specific order.
{
"apikey": "7ZS9D4NY6eVy3KXfNEkzpN3EnkYSt",
"order_id": "278903"
}
{
"reference": "123456",
"state": "completed",
"shipping": "created",
"tracking": "https://postnl.nl/tracktrace/****"
}
| Name | Type | Description | Required |
|---|---|---|---|
| apikey | string | API access key | required |
| order_id | string | Printpartnerz uniquely generated order identifier (Retrieved from Add order) | required |
| Name | Type | Description |
|---|---|---|
| reference | string | Clients own order reference identifier |
| state | string | State of the order:
|
| shipping | string | null | State of the shipment:
|
| tracking | string | null | Trackinglink for the shipment |
| Code | Status | Description |
|---|---|---|
| 200 | OK | The request has succeeded |
| 400 | Bad request | The request was invalid or parameters are missing |
| 403 | Forbidden | The request was denied due to missing or incorrect credentials |
| 410 | Gone | The requested order was not found |
GET https://api.printpartnerz.com/v1/shipping/countries
Request a list of available shipping countries.
{
"apikey": "7ZS9D4NY6eVy3KXfNEkzpN3EnkYSt"
}
[
{
"code": "BE",
"country": "België"
},
{
"code": "NL",
"country": "Nederland"
}
]
| Name | Type | Description | Required |
|---|---|---|---|
| apikey | string | API access key | required |
| Name | Type | Description |
|---|---|---|
| code | string | ISO 3166-1 alpha-2 country code |
| country | string | Country name |
| Code | Status | Description |
|---|---|---|
| 200 | OK | The request has succeeded |
| 400 | Bad request | The request was invalid or parameters are missing |
| 403 | Forbidden | The request was denied due to missing or incorrect credentials |