Skip to main content

The REST API from Keyline

Overview of all end points and examples

Patric avatar
Written by Patric
Updated over 3 weeks ago

You can find the official documentation of our two APIs here.

The Inbox API is suitable for creating an order in Keyline from a system such as a Web2Print shop, using predefined product templates.

Here, a virtual shopping cart is filled, and with a checkout, Keyline directly creates an order for you based on your defined data and products.

With the Advanced API, you can make additional configurations.

In the Admin area under Accounts/API Permissions, you can create and manage new API keys.

These keys are required to integrate third-party applications such as Pipedrive, make.com, CRM systems, etc.

Once youโ€™ve created a new API key via the โ€œCreate API access permissionโ€ button, you can share it with the service provider and deactivate it at any time.

Caution: API keys created in this way have access to all resources of your Keyline account.

You can therefore also restrict API keys to specific organizations, which will then only operate under that organizationโ€™s name.

To do this, please create the API key directly within the organization (Sales > Organization).

API keys that are no longer needed should be deactivated immediately.

Each API key also counts towards the total number of users.

Please note that a deactivated API key cannot be reactivated.


๐Ÿ”Ž Usage Tip:

Use your browserโ€™s search function (Ctrl+F / Cmd+F) to jump directly to relevant keywords or endpoints.


๐Ÿ“ฆ Circulations โ€“ Define Print Runs per Variant

This API section allows you to define actual circulations (print runs) per product variant, similar to the feature available in the UI.

Method

Endpoint

Description

GET

/production/products/:product_id/circulations

List all circulations for a product

GET

/production/products/:product_id/circulations/:id

Retrieve a single circulation

PATCH

/production/products/:product_id/circulations/:id

Update the actual_amount of a circulation

๐Ÿ“ค Example Payload:

{
"circulation": {
"actual_amount": 32
}
}

๐Ÿ“„ Job Bags, Delivery Notes & Labels

You can generate various production and logistics documents via the API. Depending on the requested content type, the API returns either JSON metadata or the PDF file directly.

Method

Endpoint

Description

GET

/production/products/:product_id/job_bag.pdf

Job bag (PDF as JSON link)

GET

/logistics/shipments/:shipment_id/delivery_note.pdf

Delivery note (PDF as JSON)

GET

/logistics/shipments/:shipment_id/proforma_invoice.pdf

Pro forma invoice

GET

/logistics/parcels/:parcel_id/label.pdf

Parcel label (PDF link)

Direct PDF file (binary response)

Use the same endpoints with header:

Accept: application/pdf

Method

Endpoint

Description

GET

/production/products/:product_id/job_bag

Direct job bag PDF

GET

/logistics/shipments/:shipment_id/delivery_note

Direct delivery note PDF

GET

/logistics/shipments/:shipment_id/proforma_invoice

Pro forma invoice PDF

GET

/logistics/parcels/:parcel_id/label

Parcel label PDF

GET

/logistics/outsourcings/:outsourcing_id

Outsourcing Slip PDF


๐Ÿงพ Material Presets & Packaging

Use these endpoints to predefine materials for product components, finishings, and packaging steps. This allows for automation and standardization of material selection in the conception phase.

You can assign material presets at different levels:

Method

Endpoint

Description

GET/POST

/conception/products/:product_id/components/:component_id/material_presets

Material presets for a specific component

GET/POST

/conception/products/:product_id/components/:component_id/finishings/:finishing_id/material_presets

Material presets for a finishing within a component

GET/POST

/conception/products/:product_id/material_presets

Material presets at product level

GET/POST

/conception/products/:product_id/finishings/:finishing_id/material_presets

Material presets at product โ†’ finishing level

GET/POST

/conception/products/:product_id/packagings/:packaging_id/material_presets

Material preset for packaging

๐Ÿ“ค Example Payload:

{
"material_preset": {
"material_id": 1
}
}

๐Ÿ“ฆ Packaging Workflow (Step-by-Step)

To automate packaging setup, follow this flow:

  1. Create packaging entry

    POST /conception/products/{product_id}/packagings

  2. Define packaging details (label type, deposition, etc.)

    PATCH /conception/products/{product_id}/packagings/{packaging_id}

  3. Create pick instructions (which items go into this packaging)

    POST /conception/products/{product_id}/packagings/{packaging_id}/picks

๐Ÿ‘‰ If multiple sorts or packagings exist, all definitions must be combined in the same JSON payload.


๐Ÿšš Shipping Note:

If an item is to be shipped directly, include the property:

"deposition": "shipment"

This skips the picking step and directly creates a packaging for shipping.

๐Ÿ“ฆ Retrieve Packagings During Production

If you want to view the packaging units of a product during production, the following endpoints are available:

GET /production/products/:id/packagings/
GET /production/products/:id/packagings/:id

๐Ÿ› ๏ธ Change Production Means & Recalculate Concept

These endpoints allow you to override default production resources and trigger a new conceptualization (recalculation of the production path).


๐Ÿ”ง Change Production Resource (e.g. machine)

To change a production resource for a specific component:

POST /conception/products/{product_id}/production_paths/{production_path_id}/production_flow_modifications

๐Ÿ“ค Example Payload:

{
"production_flow_modification": {
"modification": "preset",
"workable_type": "component",
"workable_id": 1361413,
"stock_task_id": 6579,
"means_of_production_id": 10319
}
}
  • workable_id: corresponds to the component ID

  • means_of_production_id: new machine/resource

  • stock_task_id: the specific task ID within the flow


โ™ป๏ธ Recalculate Production Path (Conceptualization)

After making changes, you can trigger a new calculation:

POST /conception/products/{product_id}/production_paths/{production_path_id}/conceptualize

This is not mandatory, but recommended to update timings and costs.


โœ‚๏ธ Cutting (Enable Cutting Step)

To activate cutting on a specific imposing:

PATCH /conception/products/{product_id}/components/{component_id}/imposings/{imposing_id}

๐Ÿ“ค Example Payload:

{
"imposing": {
"cutting": true
}
}

๐Ÿ“ Adjust Folding Schema

To change the folding pattern of an imposing:

PATCH /conception/products/{product_id}/components/{component_id}/imposings/{imposing_id}

๐Ÿ“ค Example Payload:

{
"imposing": {
"default_stock_folding_pattern_id": 983
}
}

You can retrieve available folding patterns here:

GET /configuration/stock_folding_patterns

๐Ÿ”„ Page Arrangement Options:

Value

Description

standalone

Single page layout

crossover

Connected page layout

parallel

Parallel folding (e.g. z-fold)


๐Ÿ” Filtering & Search Queries

Many endpoints support powerful filtering and search capabilities using query parameters.

These allow you to retrieve specific subsets of data based on date ranges, status, or keywords.

GET /accounting/invoices?billed_from=2024-08-28&billed_to=2025-08-22

  • billed_from, billed_to โ€“ filter by invoice date

  • created_from, created_to โ€“ filter by creation date

๐Ÿ“ฆ Orders

GET /sales/orders?state=draft

GET /sales/orders?created_from=2024-08-12&created_to=2024-09-12

GET /sales/orders?updated_from=2024-08-12&updated_to=2024-09-12

  • state โ€“ e.g. draft, confirmed, cancelled

  • created_from, updated_from โ€“ filter by date range

โš™๏ธ Production Tasks

GET /production/tasks?search_term=offset

GET /production/tasks?state=running

GET /production/tasks?created_from=2020-06-27&created_to=2020-06-27

GET /production/tasks?updated_from=2020-11-13&updated_to=2020-11-13

GET /production/tasks?search_term=offsetdruck&state=ready

  • search_term โ€“ keyword-based search (e.g. machine, process, product)

  • state โ€“ running, ready, completed

  • created_from, updated_from โ€“ filter by task life cycle


โœ‰๏ธ Product Messages & Internal Notes

You can attach messages to products to document internal notes or instructions.

GET /production/products/{product_id}/messages

POST /production/products/{product_id}/messages

PATCH /production/products/{product_id}/messages/{message_id}

DELETE /production/products/{product_id}/messages/{message_id}

๐Ÿ“ค Example Payload:

{
"text": "This is an my message via the API."
}

๐Ÿ“ง Send Custom Offer Email Text

You can modify the subject and content of the offer email via API โ€“ as long as the order is still in draft status.

POST /sales/orders/{order_id}/offer_mail_messages

๐Ÿ“ค Example Payload:

{
"mail_message": {
"subject": "Custom Email Subject via API",
"content": "Custom email body content created via API."
}
}

โš ๏ธ The offer will be sent immediately with the modified email text.

The order must still be in draft state.


๐Ÿ‘ฅ Assign a Consultant or Team Member to an Order

You can assign a user to an order and define their role (e.g. customer consultant, media designer, production employee, etc.).

POST /sales/orders/{order_id}/assignments

๐Ÿ“ค Example Payload:

{
"assignment": {
"user_id": 4033,
"role": "customer_consultant"
}
}

๐ŸŽญ Available Roles:

  • customer_consultant

  • sales_representative

  • media_designer

  • prepress_employee

  • production_employee

  • accounting_employee

You can retrieve the user_id from the admin user management section.


๐Ÿ“Ž Document Callbacks (Custom Job Bag, etc.)

With document callbacks, you can override default Keyline documents (e.g. Job Bag) by linking to your own document URL.

POST /conception/products/{product_id}/document_callbacks

๐Ÿ“ค Example Payload:

{
"document_callback": {
"kind": "job_bag",
"url": "http://your_custom_document_url"
}
}

๐Ÿ”„ Modify or Remove Callback

You can also manage callbacks during the production phase:

PATCH /production/products/:id/document_callbacks

DELETE /production/products/:id/document_callbacks/:callback_id

Or during conception:

PATCH /conception/products/:id/document_callbacks

DELETE /conception/products/:id/document_callbacks/:callback_id


โœ… Confirm Draft Order (Send to Production)

Use the following endpoint to confirm and release an order:

POST /sales/orders/{order_id}/confirm

This changes the order from draft to active and triggers production.


๐Ÿ“„ Download Order Confirmation PDF

Once confirmed, the confirmation PDF can be retrieved via:

GET /sales/orders/{order_id}/confirmation.pdf


๐Ÿ“ Edit Product Description

To manually update the product description:

PATCH /conception/products/{product_id}

๐Ÿ“ค Example Payload:

{
"custom_description": "Updated product description via API."
}

โš–๏ธ Set Custom Product Weight

You can manually override the system-calculated product weight using this endpoint:

PATCH /conception/products/{product_id}/production_paths/{production_path_id}

๐Ÿ“ค Example Payload:

{
"weight_calculation_mode": "manual",
"product_weight": 123456
}

Weight must be provided in milligrams per unit (e.g. 123456 = 123.456โ€ฏg)


โœ… Complete a Product

To mark a product as fully produced (completed):

PATCH /production/products/{product_id}/complete

This finalizes the product and updates its status accordingly.


๐Ÿ“ฆ Retrieve Outsourcing (Fremdbeschaffung) Info

List all outsourcing entries:

GET /logistics/outsourcings

This includes all external production steps managed through logistics.


๐Ÿ“ซ Announce Customer Addresses

To pre-announce customer addresses (so they can be found via search even before use):

POST /customer_relations/organizations/{organization_id}/address_announcements

After being announced, the address is searchable and visible under the associated organization once used.


๐Ÿ—‚๏ธ Retrieve Actual Circulations (from Archive)

To get the actual produced circulation amount of a product from the archive:

GET /archive/products/{product_id}/circulations

GET /archive/products/{product_id}/circulations/{circulation_id}

This is helpful for reviewing actual print quantities post-production.


๐Ÿ“ฆ Packaging Flow via API

To automate the full packaging process via API, follow this flow:

1. Create a Packaging Unit

POST /conception/products/{product_id}/packagings

2. Define Packaging Details

PATCH /conception/products/{product_id}/packagings/{packaging_id}

Include settings like deposition, labeling, etc.

3. Create Pick Instructions

POST /conception/products/{product_id}/packagings/{packaging_id}/picks

This defines what is packed into each unit.

If you have multiple types/sorts, combine them into a single JSON.

๐Ÿ‘‰ Note: If the product is shipped directly, the packaging must include:

"deposition": "shipment"

No pick is required in this case.


๐Ÿ’ธ Post-Calculation via API

To trigger a product post-calculation:

PATCH /billing/products/{product_id}


๐Ÿงพ Create Invoice from Finalized Order

Once an order is finalized and post-calculated, create an invoice:

POST /accounting/customer_invoices/create_from_order?order_id={id}


๐Ÿ™…โ€โ™‚๏ธ Remove Contact Person from Invoice or Credit Note

If the invoice or credit note should be issued only to the billing address, without a named contact:

DEL /accounting/customer_invoices/:id/contact
DEL /accounting/credit_notes/:id/contact

Did this answer your question?