Kornit X is able to integrate with suppliers using a variety of API options.
For order management, Kornit X 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.
Kornit X 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 Kornit X.
To receive order pushes, a supplier must enable the "Generic API" supplier integration against the relevant dropshipping account in the platform, this can be done by your Kornit X contact.
Once the integration has been enabled, a push URL defined and changes saved, a HMAC key will be automatically generated.
Whilst optional, this step is highly recommended for security.
For each push request, a HMAC message digest can be calculated using the SHA256 algorithm with the request body as the input and the HMAC key displayed in the Generic API settings page.
The calculated HMAC message digest should match the value of the requests's X-CustomGateway-Hmac header.
If the values do not match then you should reject the push request.
A branded A4 Dispatch Note must be included within each order. It contains information which is vital for the Customer Returns process.
An example Dispatch Note can be viewed here.
The Dispatch Note is available to download and print from the platform.
If you are integrating directly with the platform, a URL will be included with the data where you will be able to access and print the Dispatch Note.
Don't forget to replace :id with the order's unique numeric ID.
The shipping service used is automatically determined based on how your account has been configured.
A successful request will result in one or more shipment entities being created and returned.
If an order has been split into multiple shipments, then the items collection on each shipment can be used to identify which items are included in that particular shipment.
A successful request will result in an array of shipments being returned:
If tracking information isn't available, the following call should be executed:
curl -X PUT -d '{ "status": 8 }' -H "authorization: basic REFID:APIKEY" -H "content-type: application/json" "https://api-sl-2-2.custom-gateway.net/order/:id/status"
REFID = Fulfiller Company Code (this will be provided by Kornit X)
KEY = API Key associated to the Fulfiller Company (this will be provided by Kornit X)
ID = Internal Order ID (this will be passed with the order data)
If a supplier is unable to fulfill an order, the order can be cancelled via the API. To do so, the following call should be executed:
curl -X PUT -d '{ "status": 128 }' -H "authorization: basic REFID:APIKEY" -H "content-type: application/json" "https://api-sl-2-2.custom-gateway.net/order/:ID/status"
Where:
REFID = Fulfiller Company Code (this will be provided by Kornit X)
KEY = API Key associated to the Fulfiller Company (this will be provided by Kornit X)
ID = Internal Order ID (this will be passed with the order data)
Kornit X provides a Stock API to allow suppliers to provide up-to-date stock information when stock positions change. This is updated via a Kornit X API end-point which uses basic authentication via a company ref ID and API key which you can obtain from your Kornit X contact by request.
The stock API allows Next Suppliers to POST stock updates using a RESTful API.
curl -X PUT -d'[ { "sku": "ABCD", "data": { "quantity_available": 10 } }, { "sku": "EFGH", "data": { "quantity_available": 12 } } ]' -H "Authorization: Basic REFID:<KEY>" -H"Content-type: application/json" https://api-sl-2-2.custom-gateway.net/stock/availability
Where:
REFID = Fulfiller Company Code (this will be provided by Kornit X)
KEY = API Key associated to the Fulfiller Company (this will be provided by Kornit X)
The following illustrates a sample of the data structure and attributes retrieved by the above API call:
{
"successful": [ { "id": 8965089, "quantity_available": 1001, "last_modified": "2023-10-18 08:30:01" }, { "id": 8274177, "quantity_available": 500, "last_modified": "2023-10-18 08:30:01" } ] }