Production Integration - Generic API

Production Integration - Generic API

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

  1. Go to Settings>Companies and filter the company type to Production Centre (or click here).
  2. Click on the production centre that you wish to set up the integration on, to view details for that company.
  3. Select the Production Integrations tab on the left.

  1. 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.
  1. For a single job, the Send to Production button appears to the right when you hover over the job.

  1. 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

  1. {
  2.    "id":9972081,
  3.    "artwork":{
  4.       "artwork.png":[
  5.          "https:\/\/s3-eu-west-1.amazonaws.com\/generated-assets-gateway3d-com\/batch\/dlp6123cyc\/flat.png",
  6.          "s3:\/\/generated-assets-gateway3d-com\/batch\/dlp6123cyc\/flat.png"
  7.       ]
  8.    },
  9.    "items":[
  10.       {
  11.          "id":19156817,
  12.          "order_item_id":71126037,
  13.          "batch_job_id":9972081,
  14.          "series_number":1,
  15.          "series_total":1,
  16.          "order":{
  17.             "id":"POS-80DAF4",
  18.             "ref":"ADD14AE3630E28DA",
  19.             "external_ref":"POS-80DAF4",
  20.             "customer_name":"Test Testing",
  21.             "shipping_address_1":"Pinewood Court",
  22.             "shipping_address_2":"",
  23.             "shipping_address_3":"",
  24.             "shipping_address_4":"Macclesfield",
  25.             "shipping_address_5":"Cheshire",
  26.             "shipping_postcode":"SK10 2XR",
  27.             "shipping_country_code":"GB",
  28.             "shipping_carrier":"Hermes",
  29.             "shipping_method":""
  30.          },
  31.          "order_item":{
  32.             "id":71126037,
  33.             "type":2,
  34.             "mapped_sku":"SGS7E-CS-G-TEST",
  35.             "sku":"SGS7E-CS-G-TEST",
  36.             "description":"Samsung Galaxy 7 Edge Snap In Gloss",
  37.             "quantity":1,
  38.             "artwork":null
  39.          }
  40.       },
  41.       {
  42.          "id":19156818,
  43.          "order_item_id":71126038,
  44.          "batch_job_id":9972081,
  45.          "series_number":1,
  46.          "series_total":1,
  47.          "order":{
  48.             "id":"POS-80DAF4",
  49.             "ref":"ADD14AE3630E28DA",
  50.             "external_ref":"POS-80DAF4",
  51.             "customer_name":"Test Testing",
  52.             "shipping_address_1":"Pinewood Court",
  53.             "shipping_address_2":"",
  54.             "shipping_address_3":"",
  55.             "shipping_address_4":"Macclesfield",
  56.             "shipping_address_5":"Cheshire",
  57.             "shipping_postcode":"SK10 2XR",
  58.             "shipping_country_code":"GB",
  59.             "shipping_carrier":"Hermes",
  60.             "shipping_method":""
  61.          },
  62.          "order_item":{
  63.             "id":71126038,
  64.             "type":2,
  65.             "mapped_sku":"SGS7E-CS-G-TEST",
  66.             "sku":"SGS7E-CS-G-TEST",
  67.             "description":"Samsung Galaxy 7 Edge Snap In Gloss",
  68.             "quantity":1,
  69.             "artwork":null
  70.          }
  71.       }
  72.    ]
  73. }

Example Consolidation Job Data

  1. {
  2.    "id":9972198,
  3.    "artwork":null,
  4.    "items":[
  5.       {
  6.          "id":19157068,
  7.          "order_item_id":71128134,
  8.          "batch_job_id":9972198,
  9.          "series_number":1,
  10.          "series_total":1,
  11.          "order":{
  12.             "id":"POS-BED9F4",
  13.             "ref":"24C1AC7E630E3314",
  14.             "external_ref":"POS-BED9F4",
  15.             "customer_name":"Test Testing",
  16.             "shipping_address_1":"Pinewood Court",
  17.             "shipping_address_2":"",
  18.             "shipping_address_3":"",
  19.             "shipping_address_4":"Macclesfield",
  20.             "shipping_address_5":"test",
  21.             "shipping_postcode":"SK10 2XR",
  22.             "shipping_country_code":"GB",
  23.             "shipping_carrier":"",
  24.             "shipping_method":""
  25.          },
  26.          "order_item":{
  27.             "id":71128134,
  28.             "type":2,
  29.             "mapped_sku":"JH001 HEA XL",
  30.             "sku":"Jh001-PSTEST",
  31.             "description":"AWDis Hooded Sweatshirt",
  32.             "quantity":1,
  33.             "artwork":[
  34.                {
  35.                   "name":"AV HD6 Black HQ_64021_Hoodies Full Size_71128134-output-3950663_1_16_129.png",
  36.                   "nameSansExt":"AV HD6 Black HQ_64021_Hoodies Full Size_71128134-output-3950663_1_16_129",
  37.                   "ext":"png",
  38.                   "description":"AV HD6 Black HQ_64021_Hoodies Full Size_71128134-output-3950663_1_16_129.png",
  39.                   "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",
  40.                   "isMergedMulti":false,
  41.                   "isMerged":false,
  42.                   "isMulti":false,
  43.                   "isSingle":false,
  44.                   "isThumbnail":false,
  45.                   "isUserPopulated":true
  46.                }
  47.             ]
  48.          }
  49.       },
  50.       {
  51.          "id":19157069,
  52.          "order_item_id":71128135,
  53.          "batch_job_id":9972198,
  54.          "series_number":1,
  55.          "series_total":1,
  56.          "order":{
  57.             "id":"POS-BED9F4",
  58.             "ref":"24C1AC7E630E3314",
  59.             "external_ref":"POS-BED9F4",
  60.             "customer_name":"Test Testing",
  61.             "shipping_address_1":"Pinewood Court",
  62.             "shipping_address_2":"",
  63.             "shipping_address_3":"",
  64.             "shipping_address_4":"Macclesfield",
  65.             "shipping_address_5":"test",
  66.             "shipping_postcode":"SK10 2XR",
  67.             "shipping_country_code":"GB",
  68.             "shipping_carrier":"",
  69.             "shipping_method":""
  70.          },
  71.          "order_item":{
  72.             "id":71128135,
  73.             "type":2,
  74.             "mapped_sku":"JH001 GOL M",
  75.             "sku":"JH001 GOL M",
  76.             "description":"AWDis Hooded Sweatshirt",
  77.             "quantity":1,
  78.             "artwork":[
  79.                {
  80.                   "name":"AV HD6 Black HQ_64021_Hoodies Full Size_71128135-output-3950663_1_14_116.png",
  81.                   "nameSansExt":"AV HD6 Black HQ_64021_Hoodies Full Size_71128135-output-3950663_1_14_116",
  82.                   "ext":"png",
  83.                   "description":"AV HD6 Black HQ_64021_Hoodies Full Size_71128135-output-3950663_1_14_116.png",
  84.                   "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",
  85.                   "isMergedMulti":false,
  86.                   "isMerged":false,
  87.                   "isMulti":false,
  88.                   "isSingle":false,
  89.                   "isThumbnail":false,
  90.                   "isUserPopulated":true
  91.                }
  92.             ]
  93.          }
  94.       }
  95.    ]
  96. }

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.

  1. "artwork":[
  2.                {
  3.                   "name":"AV HD6 Black HQ_64021_Hoodies Full Size_71128135-output-3950663_1_14_116.png",
  4.                   "nameSansExt":"AV HD6 Black HQ_64021_Hoodies Full Size_71128135-output-3950663_1_14_116",
  5.                   "ext":"png",
  6.                   "description":"AV HD6 Black HQ_64021_Hoodies Full Size_71128135-output-3950663_1_14_116.png",
  7.                   "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",
  8.                   "isMergedMulti":false,
  9.                   "isMerged":false,
  10.                   "isMulti":false,
  11.                   "isSingle":false,
  12.                   "isThumbnail":false,
  13.                   "isUserPopulated":true
  14.                }
  15.             ]

The artwork can be downloaded from the clientURL field and saved using the artwork "name" field as the filename.
    • Related Articles

    • Product Integration | Generic API

      Introduction This article has been created to show how to setup the Product integration Kornit X has built to connect to Generic API.  Setup To setup the Generic API integration, please head to your category and within and within the advanced ...
    • Notification Integration | Generic Filesystem

      Introduction This article has been created to show how to setup the Notification Integration that Kornit X has built to connect to a Generic Filesystem  Setup To setup the Generic Filesystem Notification integration, please head to your company and ...
    • Shipper Integration | Generic Label

      Introduction This article has been created to show how to setup the Shipping Integration that Kornit X has built to connect to a Generic Label. Setup To setup the Generic Label integration, please head to your company and within the advanced settings ...
    • Production Integration: Generic Hot folder

      This production integration gives the ability to pass artwork from batches to a hot folder. The artwork will be added as default into a folder called 'artwork' within a folder determined by the batch name. The 'Generic Hotfolder' integration can be ...
    • Supplier Integration | Generic API

      The Order Push API from Custom Gateway us our generic OMS API allowing us to POST order data in JSON format (matching the structure of our standard orders in API) to an endpoint nominated by a supplier. This is a cheaper alternative to Custom Gateway ...