KornitX is able to integrate with suppliers using a variety of API options.
For order management, KornitX can integrate with supplier systems in order to send Direct Dispatch and Personalised orders. The following order API requirements sections describe the core requirements for order management from a Supplier API.
KornitX also has a REST API available for stock management and order status updates. Details of these are also included in the sections below.
Additionally, a X-CustomGateway-Hmac header is also sent as part of the request. This header can be used to verify that the request has originated from KornitX.
To receive order pushes, the "Generic API" Supplier Integration must be enabled against the relevant Dropship Company account in the KornitX Platform. This will be done by your KornitX contact.
- API Sandbox Endpoint (push URL) - Note, this is optional.
- Access to KornitX Platform (for testing)
- REFID
- API Key
We can also enable Basic Authentication if requested.
Whilst optional, this step is highly recommended for security. If you choose not to verify, or to use Basic Auth, the "X-CustomGateway-Hmac" header will still always be included.
You can verify the integrity of the callback data being sent using HMAC - we will send you a header with the request named "X-CustomGateway-Hmac".
The value of this is calculated using the following:
Hash: sha256
Message: Request body (on a single line with no spaces)
Secret: HMAC Key
SL\Proxy2\Supplier\GenericApi\GenericApiHttpBasicAuthStrategy
When this is set up, requests will include an authorization header. The value of the authorization header will be the Auth Username and Auth Password, separated by a colon, base 64 encoded and prefixed with “Basic “.
For example, if the Auth Username is “test” and the Auth Password is “test”, the authorization header will be sent as shown below.
Authorization: Basic dGVzdDp0ZXN0
The supplier will provide KornitX with basic auth credentials:
The supplier is responsible for authorizing the incoming server calls.
Below is an example of an annotated JSON structure with additional clarity.
{ |
|
"id":65928635, *required | KornitX order reference. This should be stored in your systems and used as the order identifier for status updates for all integrations |
"company_ref_id":18698, | KornitX ID reference for Next. Not required if you get orders only from Next via KornitX |
"secondary_company_ref_id":"589705", *required | KornitX supplier ID |
"ref":"955C0070672AA0E3", | Internal KornitX order ref. Not required |
"status":1, |
|
"shipping_company":"", |
|
"shipping_address_1":"FLAT 22 XYZ COURT", *required | Address line |
"shipping_address_2":"", | Address line – usually empty |
"shipping_address_3":"", | Address line – usually empty |
"shipping_address_4":"ABC SQUARE", *required | Address line |
"shipping_address_5":"MACCLESFIELD", *required | Address line (town / city) |
"shipping_postcode":"SK10 2XR", *required |
|
"shipping_country":"United Kingdom", *required |
|
"shipping_country_code":"GB", *required |
|
"billing_company":"", |
|
"billing_address_1":"", |
|
"billing_address_2":"", |
|
"billing_address_3":"", |
|
"billing_address_4":"", |
|
"billing_address_5":"", |
|
"billing_postcode":"", |
|
"billing_country":"United Kingdom", |
|
"customer_name":"MRS B SURNAME", *required |
|
"customer_telephone":"", | This field is by default not mandatory. If you need it on each order, please ask Next to make it mandatory for your Brand |
"customer_telephone_mobile":"", |
|
"sale_datetime":"2024-11-05 00:00:00", | Order timestamp from Next |
"external_ref":"3745681400", *required | Order reference from Next and with the customer. Not required for the integration, we recommend storing it for the invoicing from Next |
"has_been_completed":false, |
|
"completion_datetime":"0000-00-00 00:00:00", |
|
"has_pdf_been_queued":false, |
|
"has_pdf_been_completed":false, |
|
"shipping_method":"8 Days", | Next expected leadtime |
*required | Customer email address is always provided |
"shipping_carrier":"OwnCarrier", |
|
"shipping_tracking":"", |
|
"shipping_note_url":"", |
|
"payment_trans_id":"10041", | Next invoice number |
"payment_type":"", |
|
"has_initial_confirmation_email_been_sent":false, |
|
"has_shipping_confirmation_email_been_sent":false, |
|
"creation_datetime":"2024-11-05 22:49:07", *required | Order receiving timestamp (KornitX) |
"additional_info":"S78P6335", |
|
"has_error":false, |
|
"error_message":"", |
|
"required_dispatch_date":"2024-11-14", *required | Date Next communicated to the customer as expected delivery |
"is_status_callback_pending":false, |
|
"stock_request_id":0, |
|
"status_callback_attempts":0, |
|
"status_callback_next_retry":"0000-00-00 00:00:00", |
|
"consolidate":false, |
|
"has_been_invoiced":false, |
|
"billing_customer_name":"", |
|
"billing_customer_email":"", |
|
"billing_customer_telephone":"", |
|
"shipping_price":0, |
|
"shipping_price_inc_tax":0, |
|
"shipping_tax_rate":0, |
|
"is_urgent":false, |
|
"tag":"", |
|
"pos_user_id":null, |
|
"coupon_code":"", |
|
"currency_code":"GBP", |
|
"is_free_of_charge":false, |
|
"status_name":"Received", |
|
"company_external_ref":"", |
|
"items":[ |
|
{ |
|
"id":121130789, |
|
"sale_vat_rate":0, |
|
"external_ref":"26305659", |
|
"ref":"B44BAAA9857", |
|
"order_id":65928635, | KorrnitX order reference |
"sku":"AC6152", *required | Next item number |
"mapped_sku":"HRNSBLW-L", *required | Manufacturer SKU. This is the item SKU you provided to Next in the PIF sheet. We recommend mapping this for the integration |
"description":"BRAND T-Shirt", | Short item description |
"colour":"Blue", |
|
"size":"LARGE", |
|
"quantity":1, *required |
|
"type":2, | Internal KornitX item type |
"print_job_id":112777254, | Internal KornitX ref for the personalised artwork |
"print_job_promise_ref":"", |
|
"external_url":"", |
|
"external_thumbnail_url":"https://s3-eu-west-1.amazonaws.com/assets.easypromo3d.com/output/thumbnails/print-jobs/17798_112777254.png", |
|
"status":1, |
|
"print_on_demand_ref":"", |
|
"plain_stock_item_ref":"", |
|
"license":"", |
|
"license_percentage":"", |
|
"unit_sale_price":35, |
|
"unit_sale_price_inc_tax":35, |
|
"unit_cost_price":0, |
|
"shipping_price":0, |
|
"shipping_price_inc_tax":0, |
|
"bundle_ref":"A92BF34BA5672A8AE7", |
|
"textual_product_id":"15341393", |
|
"product_variant_id":"4782092", |
|
"quantity_batched":0, |
|
"quantity_dispatched":0, |
|
"stock_request_id":null, |
|
"artwork_barcode":"112777254", |
|
"quantity_consolidated":0, | Next orders are usually not consolidated |
"product_state_id":null, |
|
"status_name":"Received", |
|
"ecommerce":{ |
|
"barcode":"5060441641250" |
|
}, |
|
"attributes":[ |
|
], |
|
"assets":[ | --- Start of personalisation details –-- following lines won't be included in the JSON if your products are stock products |
{ |
|
"name":"output-1.png", |
|
"description":"T-Shirt", |
|
"url":"https://s3-eu-west-1.amazonaws.com/generated-assets-gateway3d-com/print-job/A92BF34BA5672ACDE7/print-artwork/single-1.png" | Link to the printable artwork. |
}, |
|
{ |
|
"name":"thumbnail.png", |
|
"description":"Default Thumbnail", |
|
"url":"https://s3-eu-west-1.amazonaws.com/assets.easypromo3d.com/output/thumbnails/print-jobs/18778_111377254.png" | Thumbnail of default the preview of the personalised product |
}, |
|
{ |
|
"name":"thumbnail-2513439.png", |
|
"description":"Thumbnail T-Shirt", |
|
"url":"https://s3-eu-west-1.amazonaws.com/assets.easypromo3d.com/output/thumbnails/print-jobs/18778_111377254_2513439.png" | Thumbnail of the preview of the personalised product for the specific aspect. If your product has more aspects (e.g. front / back / side) you have a thumbnail URL for each
|
} |
|
], |
|
"personalisation_text_elements":[ | Personalisation details and text – if you wish to receive these in addition to the artwork, please ask us to activate this option |
{ |
|
"area_name":"T-Shirt Front", |
|
"area_position_x":384, |
|
"area_position_y":198, |
|
"final_text":"Ben", |
|
"size":126 |
|
} |
|
] |
|
} |
|
], | --- End of personalisation details ---- |
"pdfs":[ |
|
{ |
|
"id":43191519, |
|
"order_id":65928635, | KornitX order reference |
"type":1, |
|
"url":"https://s3-eu-west-1.amazonaws.com/generated-assets-gateway3d-com/misc/html2pdf/af3c4435e9f3cf22e13bc1a2a7688171.pdf", *required | URL to the Next branded dispatch note pdf to download, print and include with the order |
"ref":"cqvymr5thppls0d5klsb", |
|
"is_outdated":false |
|
} |
|
], |
|
"shipments":[ |
|
] |
|
} |
|
200 | Order was created successfully. |
403 | Invalid data provided. For example, unrecognized Item SKU. |
400 | If there is a syntax issue with the data sent, respond with a 400 HTTP status code and a helpful error message in the response body. |
401 | If there is an authentication issue with the request, respond with a 401 HTTP status code. |
500 | If the server is unable to handle the request, respond with a 500 HTTP status code. |
A branded A4 Dispatch Note must be included within each order. It contains information which is vital for the Customer Returns process and is essential that it is included with each order.
An example Dispatch Note can be viewed here.
A successful request will return an HTTP 200 response. The response body will be in JSON format.
A successful request will return an HTTP 200 response. The response body will be in JSON format.
COMPANYREFID = Fulfiller Company Code (this will be provided by KornitX)
APIKEY = API Key associated to the Fulfiller Company (this will be provided by KornitX)
The fulfiller SKU is stored in the Fulfiller SKU field, which is in the General tab of the stock product in the catalog module.
Barcode is found in the Barcode field, which is in the eCommerce tab of the stock product in the catalog module.
An example request body showing each method is provided below.