Introduction
The Generic API production integration pushes batch data and related order data, in JSON format, to an API endpoint. The integration makes it easy for fulfillers with in-house developers, to ingest this data and produce jobs outside of the Kornit X Platform.
The integration is compatible with both artwork processing job templates and non-artwork processing job templates (also known as a consolidation job template).
The integration can be set up on any production centre company. Job templates are assigned to a production centre during job template set up. Any jobs that are created using job templates assigned to the production centre, will be pushed to the endpoint defined in the integration settings.
Setting up the Integration
- Go to Settings>Companies and filter the company type to Production Centre (or click here).
- Click on the production centre that you wish to set up the integration on, to view details for that company.
- Select the Production Integrations tab on the left.
- Click on Generic API to view the integration settings.
Explanation of the Integration Settings
Enabled - Toggle whether the integration is enabled or disabled.
Auto Transfer Enabled - When enabled, jobs will be automatically pushed to the API endpoint URL once they reach a Pending Production status. (See the "Run Interval" setting below for how often this happens). When disabled, jobs will only be pushed to the API endpoint URL when the Send to Production button is clicked in the UI. There are 2 ways to send a job to production.
- For a single job, the Send to Production button appears to the right when you hover over the job.
- For multiple jobs, you can select them and use the Send to Production button that appears at the top of the jobs list.
Run Interval - Select how frequent jobs are pushed to the API endpoint URL. The options here are "Always", "Quarter-Hourly", "Hourly" or "Daily (Midnight UTC)". (This option only appears when the Auto Transfer option is enabled).
Start Timestamp (UTC) - The start date and time of the integration. Only jobs created after this time will be pushed to the API endpoint URL. (This option only appears when the Auto Transfer option is enabled).
API URL - The endpoint URL that the data will be pushed to.
Request Strategy - There is currently only one option here which is "Manual Override". The value that must be entered in the box below is "SL\Proxy2\Production\GenericApi\RequestStrategy" (without quotations).
Preferred Artwork Format - The format of the artwork URL's that will be pushed to the endpoint. The options here are "PNG", "JPG" or "PDF".
Once the integration has been configured, click Save to enable the integration. An example configuration (with a dummy endpoint URL) is shown below.
Example JSON Data
To give an idea of the job data that's sent to the API endpoint, two examples are provided below. The first is for an artwork processing job and the second is for a consolidation job.
Example Artwork Processing Job Data
- {
- "id":9972081,
- "artwork":{
- "artwork.png":[
- "https:\/\/s3-eu-west-1.amazonaws.com\/generated-assets-gateway3d-com\/batch\/dlp6123cyc\/flat.png",
- "s3:\/\/generated-assets-gateway3d-com\/batch\/dlp6123cyc\/flat.png"
- ]
- },
- "items":[
- {
- "id":19156817,
- "order_item_id":71126037,
- "batch_job_id":9972081,
- "series_number":1,
- "series_total":1,
- "order":{
- "id":"POS-80DAF4",
- "ref":"ADD14AE3630E28DA",
- "external_ref":"POS-80DAF4",
- "customer_name":"Test Testing",
- "shipping_address_1":"Pinewood Court",
- "shipping_address_2":"",
- "shipping_address_3":"",
- "shipping_address_4":"Macclesfield",
- "shipping_address_5":"Cheshire",
- "shipping_postcode":"SK10 2XR",
- "shipping_country_code":"GB",
- "shipping_carrier":"Hermes",
- "shipping_method":""
- },
- "order_item":{
- "id":71126037,
- "type":2,
- "mapped_sku":"SGS7E-CS-G-TEST",
- "sku":"SGS7E-CS-G-TEST",
- "description":"Samsung Galaxy 7 Edge Snap In Gloss",
- "quantity":1,
- "artwork":null
- }
- },
- {
- "id":19156818,
- "order_item_id":71126038,
- "batch_job_id":9972081,
- "series_number":1,
- "series_total":1,
- "order":{
- "id":"POS-80DAF4",
- "ref":"ADD14AE3630E28DA",
- "external_ref":"POS-80DAF4",
- "customer_name":"Test Testing",
- "shipping_address_1":"Pinewood Court",
- "shipping_address_2":"",
- "shipping_address_3":"",
- "shipping_address_4":"Macclesfield",
- "shipping_address_5":"Cheshire",
- "shipping_postcode":"SK10 2XR",
- "shipping_country_code":"GB",
- "shipping_carrier":"Hermes",
- "shipping_method":""
- },
- "order_item":{
- "id":71126038,
- "type":2,
- "mapped_sku":"SGS7E-CS-G-TEST",
- "sku":"SGS7E-CS-G-TEST",
- "description":"Samsung Galaxy 7 Edge Snap In Gloss",
- "quantity":1,
- "artwork":null
- }
- }
- ]
- }
Example Consolidation Job Data
- {
- "id":9972198,
- "artwork":null,
- "items":[
- {
- "id":19157068,
- "order_item_id":71128134,
- "batch_job_id":9972198,
- "series_number":1,
- "series_total":1,
- "order":{
- "id":"POS-BED9F4",
- "ref":"24C1AC7E630E3314",
- "external_ref":"POS-BED9F4",
- "customer_name":"Test Testing",
- "shipping_address_1":"Pinewood Court",
- "shipping_address_2":"",
- "shipping_address_3":"",
- "shipping_address_4":"Macclesfield",
- "shipping_address_5":"test",
- "shipping_postcode":"SK10 2XR",
- "shipping_country_code":"GB",
- "shipping_carrier":"",
- "shipping_method":""
- },
- "order_item":{
- "id":71128134,
- "type":2,
- "mapped_sku":"JH001 HEA XL",
- "sku":"Jh001-PSTEST",
- "description":"AWDis Hooded Sweatshirt",
- "quantity":1,
- "artwork":[
- {
- "name":"AV HD6 Black HQ_64021_Hoodies Full Size_71128134-output-3950663_1_16_129.png",
- "nameSansExt":"AV HD6 Black HQ_64021_Hoodies Full Size_71128134-output-3950663_1_16_129",
- "ext":"png",
- "description":"AV HD6 Black HQ_64021_Hoodies Full Size_71128134-output-3950663_1_16_129.png",
- "clientUrl":"https:\/\/s3-eu-west-1.amazonaws.com\/generated-assets-gateway3d-com\/auto-crop\/4f\/af\/93\/39\/59\/92\/1d\/7f\/6f\/e0\/e2\/14\/16\/81\/e7\/22\/95\/cf\/6b\/32\/a2\/c6\/06\/44\/6d\/c4\/75\/86\/fc\/d5\/e6\/5d.png",
- "isMergedMulti":false,
- "isMerged":false,
- "isMulti":false,
- "isSingle":false,
- "isThumbnail":false,
- "isUserPopulated":true
- }
- ]
- }
- },
- {
- "id":19157069,
- "order_item_id":71128135,
- "batch_job_id":9972198,
- "series_number":1,
- "series_total":1,
- "order":{
- "id":"POS-BED9F4",
- "ref":"24C1AC7E630E3314",
- "external_ref":"POS-BED9F4",
- "customer_name":"Test Testing",
- "shipping_address_1":"Pinewood Court",
- "shipping_address_2":"",
- "shipping_address_3":"",
- "shipping_address_4":"Macclesfield",
- "shipping_address_5":"test",
- "shipping_postcode":"SK10 2XR",
- "shipping_country_code":"GB",
- "shipping_carrier":"",
- "shipping_method":""
- },
- "order_item":{
- "id":71128135,
- "type":2,
- "mapped_sku":"JH001 GOL M",
- "sku":"JH001 GOL M",
- "description":"AWDis Hooded Sweatshirt",
- "quantity":1,
- "artwork":[
- {
- "name":"AV HD6 Black HQ_64021_Hoodies Full Size_71128135-output-3950663_1_14_116.png",
- "nameSansExt":"AV HD6 Black HQ_64021_Hoodies Full Size_71128135-output-3950663_1_14_116",
- "ext":"png",
- "description":"AV HD6 Black HQ_64021_Hoodies Full Size_71128135-output-3950663_1_14_116.png",
- "clientUrl":"https:\/\/s3-eu-west-1.amazonaws.com\/generated-assets-gateway3d-com\/auto-crop\/94\/ab\/92\/cf\/57\/69\/3e\/a9\/69\/72\/45\/41\/ba\/47\/c7\/05\/98\/4c\/24\/0f\/97\/5b\/d9\/64\/6c\/04\/3e\/91\/8b\/35\/72\/6f.png",
- "isMergedMulti":false,
- "isMerged":false,
- "isMulti":false,
- "isSingle":false,
- "isThumbnail":false,
- "isUserPopulated":true
- }
- ]
- }
- }
- ]
- }
Kornit Naming Convention
For consolidation jobs, it's possible for the integration to push filenames that identify the Kornit set up, table and X and Y offsets.
To enable this, enable the Kornit Quick P RIP integration on the same production centre that the Generic API production integration was set up on.
Details on the Kornit Quick P RIP integration can be found
here.
As you can see from the example data below, a URL to the artwork is provided, along with the name required by Quick P to apply the correct set up for the item.
- "artwork":[
- {
- "name":"AV HD6 Black HQ_64021_Hoodies Full Size_71128135-output-3950663_1_14_116.png",
- "nameSansExt":"AV HD6 Black HQ_64021_Hoodies Full Size_71128135-output-3950663_1_14_116",
- "ext":"png",
- "description":"AV HD6 Black HQ_64021_Hoodies Full Size_71128135-output-3950663_1_14_116.png",
- "clientUrl":"https:\/\/s3-eu-west-1.amazonaws.com\/generated-assets-gateway3d-com\/auto-crop\/94\/ab\/92\/cf\/57\/69\/3e\/a9\/69\/72\/45\/41\/ba\/47\/c7\/05\/98\/4c\/24\/0f\/97\/5b\/d9\/64\/6c\/04\/3e\/91\/8b\/35\/72\/6f.png",
- "isMergedMulti":false,
- "isMerged":false,
- "isMulti":false,
- "isSingle":false,
- "isThumbnail":false,
- "isUserPopulated":true
- }
- ]
The artwork can be downloaded from the clientURL field and saved using the artwork "name" field as the filename.