Keyline API documentation version 2.0
https://app.keyline-mis.com/api/v2
API for interacting with Keyline, the modern Print MIS
Authentication
Keyline requires API users to authenticate before they can access any information, and leverages a bearer token based authentication scheme to secure access.
All valid requests to the Keyline API must therefore contain the Authorization
header field, which contains a valid API key, prefixed with the string Bearer
, so that the header line looks similar to the following:
Authorization: Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e
You can add or revoke access tokens in the Settings > API section of Keyline.
Response Paging
Responses to GET requests that hit index endpoints, such as /api/v2/configuration/customers
will at most get back a result set of size 100. If the total size of the desired result set exceeds 100, multiple requests need to be made.
If a response's result set was paged, the response headers contain the following extra headers:
X-Keyline-Result-Page
: Gives the page number of the current returned result subsetX-Keyline-Result-Per-Page
: Gives the maximum size of the current returned result subset. Is always 100.X-Keyline-Result-Total
: Gives the total number of results across all pages.
If a client wants to fetch a page number different from the first, it must specify the page number as a request header X-Keyline-Requested-Page
, where the value is the page to fetch as an integer. The lowest page number is always 1.
Status Codes
The Keyline API uses standardised HTTP response codes the inform the caller about the status of any requests.
These are the most common codes you'll get to see:
200 OK
: Everything is okay201 Created
: You just created a new resource204 No Content
: The update or delete operation you just ran was successful400 Bad request
: The request you made is missing required parameters and cannot be executed401 Unauthorized
: You're not allowed to access this resource. Check your access token404 Not found
: You tried to access a resource that doesn't exist422 Unprocessable Entity
: The validation of the resource you wanted to create or change failed. The JSON will contain a detailed error description500 Internal Server Error
: Yikes! This is pretty bad and might be our fault. If you encounter one of these, we are automatically informed, but please contact us with some in-depth infos.
Encoding of Decimal Numbers
Keyline internally uses a number datatype (Ruby's BigDecimal
) that allows for higher precision than the Javascript float datatype. In order to preserve this high level of precision and aim for highest compatibility of API clients consuming the JSON responses of the Keyline API, such numbers are encoded as strings in the JSON responses.
It is the obligation of the API clients to correctly parse decimal numbers that are encoded as strings in JSON responses.
/accounting
The collection of Invoices
Get a list of all Invoice objects.
get /accounting/invoices
Get a list of all Invoice objects.
Keyline requires API users to authenticate before they can access any information.
HTTP status code 200
Body
Media type: application/json
Type: array of object
Items: Invoice
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- number: required(string)
If not specified, the invoice number is generated automatically.
- net_total: required(integer)
- gross_total: required(integer)
- paid_at: required(date-only)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- custom_text: required(string)
- taxes: required(object)
Contains the tax rates for each line item of the invoice
- due_at: required(date-only)
If not specified, the due date will be set automatically, based on the specified payment terms.
- printery_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- billed_at: required(date-only)
- sent_at: required(date-only)
- business_unit_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- checked_at: required(datetime)
- custom_references: required(object)
Contains up to 5 arbitrary key-value entries, for data that doesn't fit into any other category of the invoice
- reversal_invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reversed_invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- type: required(string)
- services_performed_at: required(date-only)
If not specified, the services date will be set automatically to the invoice date.
- recipient: required(object)
A
Organization
object represents a customer of a printery- name: required(string)
- email: (string)
- preferred_locale: (string)
A two-letter ISO country code, that identifies the language the person or organization prefers to be contacted with.
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- creditor_identifier: (string)
- debitor_identifier: (string)
- tax_identifier: (string)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reference: (string)
- recipient_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- recipient_type: required(string)
- address: required(object)
An
Address
object represents a postal Address- addressee: required(string)
- town: required(string)
- number: (string)
- country_code: required(string)
ISO Country code of country this address is located in.
- zip_code: required(string)
- street: (string)
- addition: (string)
An optional additional information, usually displayed right below the address.
- line_items: required(array of response.LineItem)
Items: LineItem
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- description: required(string)
- qty: required(integer - minimum: 1)
- unit: required(pdf piece plate sheet folded_sheet meter sqmeter sqmillimeter millimeter liter milliliter gram kilogram ream minutes hours)
- net_total: required(integer)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- tax_rate: required(number - minimum: 0 - maximum: 1)
- gross_total: required(number)
- billable_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- billable_type: required(string)
- net: required(number)
For credit notes net, must be less than or equal to 0
- discount: required(number)
- discounted_net_total: required(integer)
- order_number: required(string)
- accounting_category_ids: required(array of any)
- environmental_certifications: required(string)
- id: required(integer - minimum: 1)
Example:
[{
"id": 31899,
"recipient_id": 57,
"recipient_type": "Organization",
"business_unit_id": 23,
"reversed_invoice_id": null,
"number": "190404001",
"net_total": 95000,
"gross_total": 113050,
"paid_at": null,
"custom_text": null,
"taxes": {
"0.19": 18050
},
"due_at": "2019-05-04",
"billed_at": "2019-04-04",
"sent_at": null,
"custom_references": {},
"services_performed_at": "2019-04-04",
"type": "CustomerInvoice",
"created_at": "2019-04-04T13:47:27.320Z",
"updated_at": "2019-04-04T13:48:20.269Z",
"recipient": {
"id": 57,
"name": "Crispy Mountain GmbH",
"tax_identifier": null,
"email": null,
"reference": "14323323",
"debitor_identifier": "JDU39939",
"creditor_identifier": null,
"preferred_locale": "de",
"credit_limit": null,
"created_at": "2016-05-30T07:43:24.993Z",
"updated_at": "2018-12-04T10:42:43.457Z"
},
"contact": {
"id": 13963,
"organization_id": 57,
"salutation": "Herr",
"name": "Krüger",
"first_name": "Sebastian",
"mobile": null,
"phone": null,
"fax": null,
"tax_identifier": null,
"email": "sk@crispymtn.com",
"reference": "VNWXR8",
"credit_limit": null,
"debitor_identifier": null,
"preferred_locale": "de",
"created_at": "2018-09-18T08:35:57.858Z",
"updated_at": "2018-12-19T11:51:19.549Z"
},
"address": {
"id": 167354,
"addressee": "Crispy 2",
"street": "Emmerich-Josef-Str.",
"number": "1A",
"addition": null,
"zip_code": "55116",
"town": "Mainz",
"country_code": "DE",
"fingerprint": "0521f90b1906d16dc99a6023c4f3da2f",
"created_at": "2019-04-04T13:47:27.324Z",
"updated_at": "2019-04-04T13:47:27.324Z"
},
"line_items": [{
"id": 49950,
"invoice_id": 31899,
"description": "Flyer Caritas\r\nFlyer 6 Seiten LD:\r\nSeiten: 6 (Wickelfalz)\r\nGeschlossenes Format: 100 × 210 mm\r\nOffenes Format: 297 × 210 mm (A4)\r\nPapier: BD matt\r\nGrammatur: 170 g/m²\r\nFarben: CMYK / CMYK\r\n\r\nAntwortkarte:\r\nSeiten: 2\r\nFormat: 148 × 95 mm\r\nPapier: LuxoSatin weiß\r\nGrammatur: 250 g/m²\r\nFarben: Schwarz / Schwarz\r\nWeiterverarbeitung: Eckrunden (Anzahl der Ecken: 4 Stück)\r\n\r\nWeiterverarbeitung: Einstecken (Beschreibung: Karte in Flyer, Anzahl einzusteckende Teile: 1 Stück)",
"qty": 1000,
"unit": "piece",
"net_total": 95000,
"created_at": "2019-04-04T13:47:27.333Z",
"updated_at": "2019-04-04T13:47:52.830Z",
"tax_rate": "0.19",
"gross_total": "113050.0",
"billable_id": 105589,
"billable_type": "Product",
"net": "95.0",
"discount": "0.0",
"discounted_net_total": 95000,
"order_number": "PH-4Q-QR",
"environmental_certifications": [],
"accounting_categories": [{
"name": "Erlöse 19% MwSt.",
"number": "8400",
"invoice_kind": "outward",
"tax_rate": "0.19"
}]
}],
"payment_terms": {
"time_for_payment": 30,
"time_for_first_cashback": 14,
"first_cashback_discount": 0.03,
"time_for_second_cashback": null,
"second_cashback_discount": null
}
},
{
"id": 31192,
"recipient_id": 57,
"recipient_type": "Organization",
"business_unit_id": 23,
"reversed_invoice_id": null,
"number": "190328002",
"net_total": 90250,
"gross_total": 107398,
"paid_at": null,
"custom_text": "Ausgleichsabgabe 100,- Euro",
"taxes": {
"0.19": 17148
},
"due_at": "2019-04-27",
"billed_at": "2019-03-28",
"sent_at": null,
"custom_references": {},
"services_performed_at": "2019-03-28",
"type": "CustomerInvoice",
"created_at": "2019-03-28T14:30:18.760Z",
"updated_at": "2019-03-28T14:30:49.519Z",
"recipient": {
"id": 57,
"name": "Crispy Mountain GmbH",
"tax_identifier": null,
"email": null,
"reference": "14323323",
"debitor_identifier": "JDU39939",
"creditor_identifier": null,
"preferred_locale": "de",
"credit_limit": null,
"created_at": "2016-05-30T07:43:24.993Z",
"updated_at": "2018-12-04T10:42:43.457Z"
},
"contact": {
"id": 178,
"organization_id": 57,
"salutation": "Herr",
"name": "Prinz",
"first_name": "Matthias",
"mobile": null,
"phone": null,
"fax": null,
"tax_identifier": null,
"email": "mp@crispymtn.com",
"reference": "1TAVSG",
"credit_limit": null,
"debitor_identifier": null,
"preferred_locale": null,
"created_at": "2017-09-12T08:39:22.803Z",
"updated_at": "2017-09-12T08:39:22.803Z"
},
"address": {
"id": 164275,
"addressee": "Crispy 2",
"street": "Emmerich-Josef-Str.",
"number": "1A",
"addition": null,
"zip_code": "55116",
"town": "Mainz",
"country_code": "DE",
"fingerprint": "0521f90b1906d16dc99a6023c4f3da2f",
"created_at": "2019-03-28T14:30:18.763Z",
"updated_at": "2019-03-28T14:30:18.763Z"
},
"line_items": [{
"id": 48669,
"invoice_id": 31192,
"description": "Flyer Caritas\r\nSeiten: 2\r\nFormat: 100 × 210 mm\r\nPapier: LuxoSatin weiß\r\nGrammatur: 170 g/m²\r\nFarben: CMYK / CMYK",
"qty": 950,
"unit": "piece",
"net_total": 90250,
"created_at": "2019-03-28T14:30:18.768Z",
"updated_at": "2019-03-28T14:30:34.890Z",
"tax_rate": "0.19",
"gross_total": "107398.0",
"billable_id": 105851,
"billable_type": "Product",
"net": "95.0",
"discount": "0.0",
"discounted_net_total": 90250,
"order_number": "T1-2M-WD",
"environmental_certifications": [],
"accounting_category": {
"name": "Erlöse 19% MwSt.",
"number": "8400",
"invoice_kind": "outward",
"tax_rate": "0.19"
}
}],
"payment_terms": {
"time_for_payment": 30,
"time_for_first_cashback": 14,
"first_cashback_discount": 0.03,
"time_for_second_cashback": null,
"second_cashback_discount": null
}
}
]
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The collection of Invoices.
Get a single Invoice record.
get /accounting/invoices/{invoice_id}
Get a single Invoice record.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- invoice_id: required(string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- number: required(string)
If not specified, the invoice number is generated automatically.
- net_total: required(integer)
- gross_total: required(integer)
- paid_at: required(date-only)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- custom_text: required(string)
- taxes: required(object)
Contains the tax rates for each line item of the invoice
- due_at: required(date-only)
If not specified, the due date will be set automatically, based on the specified payment terms.
- printery_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- billed_at: required(date-only)
- sent_at: required(date-only)
- business_unit_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- checked_at: required(datetime)
- custom_references: required(object)
Contains up to 5 arbitrary key-value entries, for data that doesn't fit into any other category of the invoice
- reversal_invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reversed_invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- type: required(string)
- services_performed_at: required(date-only)
If not specified, the services date will be set automatically to the invoice date.
- recipient: required(object)
A
Organization
object represents a customer of a printery- name: required(string)
- email: (string)
- preferred_locale: (string)
A two-letter ISO country code, that identifies the language the person or organization prefers to be contacted with.
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- creditor_identifier: (string)
- debitor_identifier: (string)
- tax_identifier: (string)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reference: (string)
- recipient_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- recipient_type: required(string)
- address: required(object)
An
Address
object represents a postal Address- addressee: required(string)
- town: required(string)
- number: (string)
- country_code: required(string)
ISO Country code of country this address is located in.
- zip_code: required(string)
- street: (string)
- addition: (string)
An optional additional information, usually displayed right below the address.
- line_items: required(array of response.LineItem)
Items: LineItem
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- description: required(string)
- qty: required(integer - minimum: 1)
- unit: required(pdf piece plate sheet folded_sheet meter sqmeter sqmillimeter millimeter liter milliliter gram kilogram ream minutes hours)
- net_total: required(integer)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- tax_rate: required(number - minimum: 0 - maximum: 1)
- gross_total: required(number)
- billable_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- billable_type: required(string)
- net: required(number)
For credit notes net, must be less than or equal to 0
- discount: required(number)
- discounted_net_total: required(integer)
- order_number: required(string)
- accounting_category_ids: required(array of any)
- environmental_certifications: required(string)
- id: required(integer - minimum: 1)
Example:
{
"id": 31899,
"recipient_id": 57,
"recipient_type": "Organization",
"business_unit_id": 23,
"reversed_invoice_id": null,
"number": "190404001",
"net_total": 95000,
"gross_total": 113050,
"paid_at": null,
"custom_text": null,
"taxes": {
"0.19": 18050
},
"due_at": "2019-05-04",
"billed_at": "2019-04-04",
"sent_at": null,
"custom_references": {},
"services_performed_at": "2019-04-04",
"type": "CustomerInvoice",
"created_at": "2019-04-04T13:47:27.320Z",
"updated_at": "2019-04-04T13:48:20.269Z",
"recipient": {
"id": 57,
"name": "Crispy Mountain GmbH",
"tax_identifier": null,
"email": null,
"reference": "14323323",
"debitor_identifier": "JDU39939",
"creditor_identifier": null,
"preferred_locale": "de",
"credit_limit": null,
"created_at": "2016-05-30T07:43:24.993Z",
"updated_at": "2018-12-04T10:42:43.457Z"
},
"contact": {
"id": 13963,
"organization_id": 57,
"salutation": "Herr",
"name": "Krüger",
"first_name": "Sebastian",
"mobile": null,
"phone": null,
"fax": null,
"tax_identifier": null,
"email": "sk@crispymtn.com",
"reference": "VNWXR8",
"credit_limit": null,
"debitor_identifier": null,
"preferred_locale": "de",
"created_at": "2018-09-18T08:35:57.858Z",
"updated_at": "2018-12-19T11:51:19.549Z"
},
"address": {
"id": 167354,
"addressee": "Crispy 2",
"street": "Emmerich-Josef-Str.",
"number": "1A",
"addition": null,
"zip_code": "55116",
"town": "Mainz",
"country_code": "DE",
"fingerprint": "0521f90b1906d16dc99a6023c4f3da2f",
"created_at": "2019-04-04T13:47:27.324Z",
"updated_at": "2019-04-04T13:47:27.324Z"
},
"line_items": [{
"id": 49950,
"invoice_id": 31899,
"description": "Flyer Caritas\r\nFlyer 6 Seiten LD:\r\nSeiten: 6 (Wickelfalz)\r\nGeschlossenes Format: 100 × 210 mm\r\nOffenes Format: 297 × 210 mm (A4)\r\nPapier: BD matt\r\nGrammatur: 170 g/m²\r\nFarben: CMYK / CMYK\r\n\r\nAntwortkarte:\r\nSeiten: 2\r\nFormat: 148 × 95 mm\r\nPapier: LuxoSatin weiß\r\nGrammatur: 250 g/m²\r\nFarben: Schwarz / Schwarz\r\nWeiterverarbeitung: Eckrunden (Anzahl der Ecken: 4 Stück)\r\n\r\nWeiterverarbeitung: Einstecken (Beschreibung: Karte in Flyer, Anzahl einzusteckende Teile: 1 Stück)",
"qty": 1000,
"unit": "piece",
"net_total": 95000,
"created_at": "2019-04-04T13:47:27.333Z",
"updated_at": "2019-04-04T13:47:52.830Z",
"tax_rate": "0.19",
"gross_total": "113050.0",
"billable_id": 105589,
"billable_type": "Product",
"net": "95.0",
"discount": "0.0",
"discounted_net_total": 95000,
"order_number": "PH-4Q-QR",
"environmental_certifications": [],
"accounting_categories": [{
"name": "Erlöse 19% MwSt.",
"number": "8400",
"invoice_kind": "outward",
"tax_rate": "0.19"
}]
}],
"payment_terms": {
"time_for_payment": 30,
"time_for_first_cashback": 14,
"first_cashback_discount": 0.03,
"time_for_second_cashback": null,
"second_cashback_discount": null
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The collection of CustomerInvoices
Get a list of all CustomerInvoice objects.
Creating customer invoices which are not related to an order or a product.
get /accounting/customer_invoices
Get a list of all CustomerInvoice objects.
Keyline requires API users to authenticate before they can access any information.
HTTP status code 200
Body
Media type: application/json
Type: array of common.Invoice
Items: CustomerInvoice
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- number: required(string)
If not specified, the invoice number is generated automatically.
- net_total: required(integer)
- gross_total: required(integer)
- paid_at: required(date-only)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- custom_text: required(string)
- taxes: required(object)
Contains the tax rates for each line item of the invoice
- due_at: required(date-only)
If not specified, the due date will be set automatically, based on the specified payment terms.
- printery_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- billed_at: required(date-only)
- sent_at: required(date-only)
- business_unit_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- checked_at: required(datetime)
- custom_references: required(object)
Contains up to 5 arbitrary key-value entries, for data that doesn't fit into any other category of the invoice
- reversal_invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reversed_invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- type: required(string)
- services_performed_at: required(date-only)
If not specified, the services date will be set automatically to the invoice date.
- recipient: required(object)
A
Organization
object represents a customer of a printery- name: required(string)
- email: (string)
- preferred_locale: (string)
A two-letter ISO country code, that identifies the language the person or organization prefers to be contacted with.
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- creditor_identifier: (string)
- debitor_identifier: (string)
- tax_identifier: (string)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reference: (string)
- recipient_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- recipient_type: required(string)
- address: required(object)
An
Address
object represents a postal Address- addressee: required(string)
- town: required(string)
- number: (string)
- country_code: required(string)
ISO Country code of country this address is located in.
- zip_code: required(string)
- street: (string)
- addition: (string)
An optional additional information, usually displayed right below the address.
- line_items: required(array of response.LineItem)
Items: LineItem
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- description: required(string)
- qty: required(integer - minimum: 1)
- unit: required(pdf piece plate sheet folded_sheet meter sqmeter sqmillimeter millimeter liter milliliter gram kilogram ream minutes hours)
- net_total: required(integer)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- tax_rate: required(number - minimum: 0 - maximum: 1)
- gross_total: required(number)
- billable_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- billable_type: required(string)
- net: required(number)
For credit notes net, must be less than or equal to 0
- discount: required(number)
- discounted_net_total: required(integer)
- order_number: required(string)
- accounting_category_ids: required(array of any)
- environmental_certifications: required(string)
- id: required(integer - minimum: 1)
Example:
[
{
"id": 13569,
"number": null,
"net_total": 96411,
"gross_total": 114729,
"paid_at": null,
"created_at": "2018-04-06T11:38:47.211+02:00",
"updated_at": "2018-04-10T11:20:40.134+02:00",
"custom_text": null,
"taxes": {
"0.19": 18318
},
"due_at": null,
"printery_id": 17,
"billed_at": null,
"sent_at": null,
"business_unit_id": 23,
"custom_references": {},
"recipient_type": "Organization",
"recipient_id": 6710,
"reversal_invoice_id": null,
"reversed_invoice_id": null,
"services_performed_at": "2018-03-26",
"recipient": {
"id": 6710,
"name": "Crispy",
"tax_identifier": "DE 123456789",
"email": "crispy@example.com",
"reference": "Num 12345",
"debitor_identifier": null,
"creditor_identifier": null,
"preferred_locale": null,
"created_at": "2018-07-03T11:44:52.210+02:00",
"updated_at": "2018-07-03T11:44:52.210+02:00"
},
"contact": {
"id": 1245,
"salutation": "Frau",
"name": "Schöller",
"first_name": "Maria",
"mobile": null,
"phone": null,
"fax": null,
"tax_identifier": null,
"email": "maria@example.com",
"reference": "HAXEZ3",
"debitor_identifier": null,
"preferred_locale": null,
"created_at": "2017-07-19T13:44:16.332+02:00",
"updated_at": "2017-08-30T15:40:18.054+02:00"
},
"address": {
"addressee": "Crispy Mountain GmbH",
"street": "Emmerich Josef Straße",
"number": "1a",
"addition": "",
"zip_code": "55116",
"town": "Mainz",
"country_code": "DE"
},
"line_items": [
{
"id": 19890,
"invoice_id": 13569,
"description": "Visitenkarte\nSeiten: 2\nFormat: 85 × 55 mm\nPapier: Kartei U. Leitkarte Chamois chamois\nGrammatur: 250 g/m²\nFarben: CMYK / CMYK",
"qty": 500,
"unit": "piece",
"net_total": 96411,
"created_at": "2018-04-06T11:39:04.718+02:00",
"updated_at": "2018-04-06T11:39:04.718+02:00",
"tax_rate": "0.19",
"gross_total": "114729.0",
"billable_id": 56046,
"billable_type": "Product",
"net": "192.821",
"discount": "0.0",
"discounted_net_total": 96411,
"order_number": "EB-9M-BR",
"accounting_categories": [],
"environmental_certifications": []
}
]
},
{
"id": 12994,
"number": null,
"net_total": 25010,
"gross_total": 29762,
"paid_at": null,
"created_at": "2018-03-22T11:53:48.570+01:00",
"updated_at": "2018-03-22T11:54:00.502+01:00",
"custom_text": null,
"taxes": {
"0.19": 4752
},
"due_at": null,
"printery_id": 17,
"billed_at": null,
"sent_at": null,
"business_unit_id": 23,
"custom_references": {},
"reversal_invoice_id": null,
"reversed_invoice_id": null,
"services_performed_at": null,
"recipient_type": "Organization",
"recipient_id": 7250,
"recipient": {
"id": 7250,
"name": "German Tax Office",
"tax_identifier": null,
"email": null,
"reference": "1069800",
"debitor_identifier": "10698",
"creditor_identifier": null,
"preferred_locale": null,
"created_at": "2016-12-14T08:05:33.983+01:00",
"updated_at": "2017-04-27T08:22:22.656+02:00"
},
"contact": {
"id": 1244,
"salutation": "Frau",
"name": "König",
"first_name": "Melanie",
"mobile": null,
"phone": "+4912345678",
"fax": null,
"tax_identifier": null,
"email": "melanie@example.com",
"reference": "A2NK84",
"debitor_identifier": null,
"preferred_locale": null,
"created_at": "2017-11-17T12:25:23.479+01:00",
"updated_at": "2017-11-17T12:25:23.479+01:00"
},
"address": {
"addressee": "Crispy Mountain GmbH",
"street": "Emmerich Josef Straße",
"number": "1a",
"addition": "",
"zip_code": "55116",
"town": "Mainz",
"country_code": "DE"
},
"line_items": [
{
"id": 19004,
"invoice_id": 12994,
"description": "Visitenkarte\nKarte:\nSeiten: 2\nFormat: 85 × 55 mm\nPapier: Marmor Umschlag Chamois Hellbraun chamois-hellbraun (FSC Mix Credit)\nGrammatur: 200 g/m²\nFarben: CMYK / CMYK\nWeiterverarbeitung: Eckrunden\n\nSchuber:\nSeiten: 4\nGeschlossenes Format: 85 × 55 mm\nOffenes Format: 170 × 55 mm\nPapier: Marmor Umschlag Chamois Hellbraun chamois-hellbraun (FSC Mix Credit)\nGrammatur: 300 g/m²\nFarben: K / K\n\n\nSorten: Müller, Meier",
"qty": 500,
"unit": "piece",
"net_total": 25010,
"created_at": "2018-03-22T11:54:00.461+01:00",
"updated_at": "2018-03-22T11:54:00.461+01:00",
"tax_rate": "0.19",
"gross_total": "29762.0",
"billable_id": 45770,
"billable_type": "Product",
"net": "50.02",
"discount": "0.0",
"discounted_net_total": 25010,
"order_number": "TQ-7T-MZ",
"accounting_categories": [],
"environmental_certifications": [
"FSC Mix Credit"
]
}
]
}
]
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
post /accounting/customer_invoices
Creating customer invoices which are not related to an order or a product.
Keyline requires API users to authenticate before they can access any information.
Body
Media type: application/json
Type: object
Properties- customer_invoice: required(object)
- number: (string)
- paid_at: (date-only)
- custom_text: (string)
- due_at: (date-only)
- billed_at: (date-only)
- sent_at: (date-only)
- business_unit_id: (integer)
- customer_id: required(integer)
- services_performed_at: (date-only)
Example:
{
"customer_invoice": {
"recipient_id": 57,
"business_unit_id": 23,
"number": "221028",
"custom_text": "Steuerfrei nach § 4 Nr. 1 b i. V. m § 6 a UStG.",
"services_performed_at": "2018-04-08"
}
}
HTTP status code 201
This response is returned if creating a new CustomerInvoice was successful.
Body
Media type: application/json
Type: object
Properties- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- number: required(string)
If not specified, the invoice number is generated automatically.
- net_total: required(integer)
- gross_total: required(integer)
- paid_at: required(date-only)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- custom_text: required(string)
- taxes: required(object)
Contains the tax rates for each line item of the invoice
- due_at: required(date-only)
If not specified, the due date will be set automatically, based on the specified payment terms.
- printery_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- billed_at: required(date-only)
- sent_at: required(date-only)
- business_unit_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- checked_at: required(datetime)
- custom_references: required(object)
Contains up to 5 arbitrary key-value entries, for data that doesn't fit into any other category of the invoice
- reversal_invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reversed_invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- type: required(string)
- services_performed_at: required(date-only)
If not specified, the services date will be set automatically to the invoice date.
- recipient: required(object)
A
Organization
object represents a customer of a printery- name: required(string)
- email: (string)
- preferred_locale: (string)
A two-letter ISO country code, that identifies the language the person or organization prefers to be contacted with.
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- creditor_identifier: (string)
- debitor_identifier: (string)
- tax_identifier: (string)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reference: (string)
- recipient_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- recipient_type: required(string)
- address: required(object)
An
Address
object represents a postal Address- addressee: required(string)
- town: required(string)
- number: (string)
- country_code: required(string)
ISO Country code of country this address is located in.
- zip_code: required(string)
- street: (string)
- addition: (string)
An optional additional information, usually displayed right below the address.
- line_items: required(array of response.LineItem)
Items: LineItem
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- description: required(string)
- qty: required(integer - minimum: 1)
- unit: required(pdf piece plate sheet folded_sheet meter sqmeter sqmillimeter millimeter liter milliliter gram kilogram ream minutes hours)
- net_total: required(integer)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- tax_rate: required(number - minimum: 0 - maximum: 1)
- gross_total: required(number)
- billable_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- billable_type: required(string)
- net: required(number)
For credit notes net, must be less than or equal to 0
- discount: required(number)
- discounted_net_total: required(integer)
- order_number: required(string)
- accounting_category_ids: required(array of any)
- environmental_certifications: required(string)
- id: required(integer - minimum: 1)
Example:
{
"id": 13569,
"number": null,
"net_total": 96411,
"gross_total": 114729,
"paid_at": null,
"created_at": "2018-04-06T11:38:47.211+02:00",
"updated_at": "2018-04-10T11:20:40.134+02:00",
"custom_text": null,
"taxes": {
"0.19": 18318
},
"due_at": null,
"printery_id": 17,
"billed_at": null,
"sent_at": null,
"business_unit_id": 23,
"custom_references": {},
"reversal_invoice_id": null,
"reversed_invoice_id": null,
"services_performed_at": "2018-03-26",
"recipient_type": "Organization",
"recipient_id": 6710,
"recipient": {
"id": 6710,
"name": "Crispy",
"tax_identifier": "DE 123456789",
"email": "crispy@example.com",
"reference": "Num 12345",
"debitor_identifier": null,
"creditor_identifier": null,
"preferred_locale": null,
"created_at": "2018-07-03T11:44:52.210+02:00",
"updated_at": "2018-07-03T11:44:52.210+02:00"
},
"contact": {
"id": 1245,
"salutation": "Frau",
"name": "Schöller",
"first_name": "Maria",
"mobile": null,
"phone": null,
"fax": null,
"tax_identifier": null,
"email": "maria@example.com",
"reference": "HAXEZ3",
"debitor_identifier": null,
"preferred_locale": null,
"created_at": "2017-07-19T13:44:16.332+02:00",
"updated_at": "2017-08-30T15:40:18.054+02:00"
},
"address": {
"addressee": "Crispy Mountain GmbH",
"street": "Emmerich Josef Straße",
"number": "1a",
"addition": "",
"zip_code": "55116",
"town": "Mainz",
"country_code": "DE"
},
"line_items": [
{
"id": 19890,
"invoice_id": 13569,
"description": "Visitenkarte\nSeiten: 2\nFormat: 85 × 55 mm\nPapier: Kartei U. Leitkarte Chamois chamois\nGrammatur: 250 g/m²\nFarben: CMYK / CMYK",
"qty": 500,
"unit": "piece",
"net_total": 96411,
"created_at": "2018-04-06T11:39:04.718+02:00",
"updated_at": "2018-04-06T11:39:04.718+02:00",
"tax_rate": "0.19",
"gross_total": "114729.0",
"billable_id": 56046,
"billable_type": "Product",
"net": "192.821",
"discount": "0.0",
"discounted_net_total": 96411,
"order_number": "EB-9M-BR",
"accounting_categories": [],
"environmental_certifications": []
}
]
}
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The collection of CustomerInvoices.
Get a single CustomerInvoice record.
Update details for a draft customer invoice.
Delete a draft customer invoice.
get /accounting/customer_invoices/{customer_invoice_id}
Get a single CustomerInvoice record.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- customer_invoice_id: required(string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- number: required(string)
If not specified, the invoice number is generated automatically.
- net_total: required(integer)
- gross_total: required(integer)
- paid_at: required(date-only)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- custom_text: required(string)
- taxes: required(object)
Contains the tax rates for each line item of the invoice
- due_at: required(date-only)
If not specified, the due date will be set automatically, based on the specified payment terms.
- printery_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- billed_at: required(date-only)
- sent_at: required(date-only)
- business_unit_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- checked_at: required(datetime)
- custom_references: required(object)
Contains up to 5 arbitrary key-value entries, for data that doesn't fit into any other category of the invoice
- reversal_invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reversed_invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- type: required(string)
- services_performed_at: required(date-only)
If not specified, the services date will be set automatically to the invoice date.
- recipient: required(object)
A
Organization
object represents a customer of a printery- name: required(string)
- email: (string)
- preferred_locale: (string)
A two-letter ISO country code, that identifies the language the person or organization prefers to be contacted with.
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- creditor_identifier: (string)
- debitor_identifier: (string)
- tax_identifier: (string)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reference: (string)
- recipient_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- recipient_type: required(string)
- address: required(object)
An
Address
object represents a postal Address- addressee: required(string)
- town: required(string)
- number: (string)
- country_code: required(string)
ISO Country code of country this address is located in.
- zip_code: required(string)
- street: (string)
- addition: (string)
An optional additional information, usually displayed right below the address.
- line_items: required(array of response.LineItem)
Items: LineItem
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- description: required(string)
- qty: required(integer - minimum: 1)
- unit: required(pdf piece plate sheet folded_sheet meter sqmeter sqmillimeter millimeter liter milliliter gram kilogram ream minutes hours)
- net_total: required(integer)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- tax_rate: required(number - minimum: 0 - maximum: 1)
- gross_total: required(number)
- billable_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- billable_type: required(string)
- net: required(number)
For credit notes net, must be less than or equal to 0
- discount: required(number)
- discounted_net_total: required(integer)
- order_number: required(string)
- accounting_category_ids: required(array of any)
- environmental_certifications: required(string)
- id: required(integer - minimum: 1)
Example:
{
"id": 13569,
"number": null,
"net_total": 96411,
"gross_total": 114729,
"paid_at": null,
"created_at": "2018-04-06T11:38:47.211+02:00",
"updated_at": "2018-04-10T11:20:40.134+02:00",
"custom_text": null,
"taxes": {
"0.19": 18318
},
"due_at": null,
"printery_id": 17,
"billed_at": null,
"sent_at": null,
"business_unit_id": 23,
"custom_references": {},
"reversal_invoice_id": null,
"reversed_invoice_id": null,
"services_performed_at": "2018-03-26",
"recipient_type": "Organization",
"recipient_id": 6710,
"recipient": {
"id": 6710,
"name": "Crispy",
"tax_identifier": "DE 123456789",
"email": "crispy@example.com",
"reference": "Num 12345",
"debitor_identifier": null,
"creditor_identifier": null,
"preferred_locale": null,
"created_at": "2018-07-03T11:44:52.210+02:00",
"updated_at": "2018-07-03T11:44:52.210+02:00"
},
"contact": {
"id": 1245,
"salutation": "Frau",
"name": "Schöller",
"first_name": "Maria",
"mobile": null,
"phone": null,
"fax": null,
"tax_identifier": null,
"email": "maria@example.com",
"reference": "HAXEZ3",
"debitor_identifier": null,
"preferred_locale": null,
"created_at": "2017-07-19T13:44:16.332+02:00",
"updated_at": "2017-08-30T15:40:18.054+02:00"
},
"address": {
"addressee": "Crispy Mountain GmbH",
"street": "Emmerich Josef Straße",
"number": "1a",
"addition": "",
"zip_code": "55116",
"town": "Mainz",
"country_code": "DE"
},
"line_items": [
{
"id": 19890,
"invoice_id": 13569,
"description": "Visitenkarte\nSeiten: 2\nFormat: 85 × 55 mm\nPapier: Kartei U. Leitkarte Chamois chamois\nGrammatur: 250 g/m²\nFarben: CMYK / CMYK",
"qty": 500,
"unit": "piece",
"net_total": 96411,
"created_at": "2018-04-06T11:39:04.718+02:00",
"updated_at": "2018-04-06T11:39:04.718+02:00",
"tax_rate": "0.19",
"gross_total": "114729.0",
"billable_id": 56046,
"billable_type": "Product",
"net": "192.821",
"discount": "0.0",
"discounted_net_total": 96411,
"order_number": "EB-9M-BR",
"accounting_categories": [],
"environmental_certifications": []
}
]
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
patch /accounting/customer_invoices/{customer_invoice_id}
Update details for a draft customer invoice.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- customer_invoice_id: required(string)
Body
Media type: application/json
Type: object
Properties- customer_invoice: required(object)
- number: (string)
- paid_at: (date-only)
- custom_text: (string)
- due_at: (date-only)
- billed_at: (date-only)
- sent_at: (date-only)
- business_unit_id: (integer)
- customer_id: required(integer)
- services_performed_at: (date-only)
Example:
{
"customer_invoice": {
"recipient_id": 57,
"business_unit_id": 23,
"number": "221028",
"custom_text": "Steuerfrei nach § 4 Nr. 1 b i. V. m § 6 a UStG.",
"services_performed_at": "2018-04-08"
}
}
HTTP status code 204
Returned if the record was successfully updated.
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
delete /accounting/customer_invoices/{customer_invoice_id}
Delete a draft customer invoice.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- customer_invoice_id: required(string)
HTTP status code 204
Returned if the record was successfully deleted.
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The Contact record associated with the parent record.
Create a new Contact record.
Update details for a contact.
post /accounting/customer_invoices/{customer_invoice_id}/contact
Create a new Contact record.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- customer_invoice_id: required(string)
Body
Media type: application/json
Type: ContactRequest
HTTP status code 201
This response is returned if creating a new Contact was successful.
Body
Media type: application/json
Type: Contact
Example:
Can not resolve examples/api-v2/configuration/contacts/get_id_200_response.json
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
patch /accounting/customer_invoices/{customer_invoice_id}/contact
Update details for a contact.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- customer_invoice_id: required(string)
Body
Media type: application/json
Type: ContactRequest
HTTP status code 204
Returned if the record was successfully updated.
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The Address record associated with the parent record.
Create a new Address record.
Update details for an address.
post /accounting/customer_invoices/{customer_invoice_id}/address
Create a new Address record.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- customer_invoice_id: required(string)
Body
Media type: application/json
Type: object
Properties- address: required(object)
- addressee: required(string)
- town: required(string)
- number: (string)
- country_code: required(string)
ISO Country code of country this address is located in.
- zip_code: required(string)
- street: (string)
- addition: (string)
An optional additional information
Example:
{
"address": {
"addressee": "Crispy Mountain GmbH",
"street": "Emmerich-Josef-Straße",
"number": "1a",
"zip_code": "55116",
"town": "Mainz",
"country_code": "DE"
}
}
HTTP status code 201
This response is returned if creating a new Address was successful.
Body
Media type: application/json
Type: object
Properties- addressee: required(string)
- town: required(string)
- number: (string)
- country_code: required(string)
ISO Country code of country this address is located in.
- zip_code: required(string)
- street: (string)
- addition: (string)
An optional additional information, usually displayed right below the address.
Example:
{
"id": 195900,
"addressee": "Crispy Mountain GmbH",
"street": "Emmerich-Josef-Straße",
"number": "1a",
"addition": null,
"zip_code": "55116",
"town": "Mainz",
"country_code": "DE",
"fingerprint": "0bd0c67b086f05346dac284e606c4d30",
"created_at": "2019-06-27T13:25:52.423Z",
"updated_at": "2019-07-01T11:04:16.228Z"
}
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
patch /accounting/customer_invoices/{customer_invoice_id}/address
Update details for an address.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- customer_invoice_id: required(string)
Body
Media type: application/json
Type: object
Properties- address: required(object)
- addressee: required(string)
- town: required(string)
- number: (string)
- country_code: required(string)
ISO Country code of country this address is located in.
- zip_code: required(string)
- street: (string)
- addition: (string)
An optional additional information
Example:
{
"address": {
"addressee": "Crispy Mountain GmbH",
"street": "Emmerich-Josef-Straße",
"number": "1a",
"zip_code": "55116",
"town": "Mainz",
"country_code": "DE"
}
}
HTTP status code 204
Returned if the record was successfully updated.
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The collection of LineItems
Get a list of all LineItem objects.
Create a new LineItem object.
get /accounting/customer_invoices/{customer_invoice_id}/line_items
Get a list of all LineItem objects.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- customer_invoice_id: required(string)
HTTP status code 200
Body
Media type: application/json
Type: array of object
Items: LineItem
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- description: required(string)
- qty: required(integer - minimum: 1)
- unit: required(pdf piece plate sheet folded_sheet meter sqmeter sqmillimeter millimeter liter milliliter gram kilogram ream minutes hours)
- net_total: required(integer)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- tax_rate: required(number - minimum: 0 - maximum: 1)
- gross_total: required(number)
- billable_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- billable_type: required(string)
- net: required(number)
For credit notes net, must be less than or equal to 0
- discount: required(number)
- discounted_net_total: required(integer)
- order_number: required(string)
- accounting_category_ids: required(array of any)
- environmental_certifications: required(string)
Example:
[
{
"id": 17874,
"invoice_id": 12268,
"description": "Visitenkarte\nKarte:\nSeiten: 2\nFormat: 85 × 55 mm\nPapier: Marmor Umschlag Chamois Hellbraun chamois-hellbraun (FSC Mix Credit)\nGrammatur: 200 g/m²\nFarben: CMYK / CMYK\nWeiterverarbeitung: Eckrunden\n\nSchuber:\nSeiten: 4\nGeschlossenes Format: 85 × 55 mm\nOffenes Format: 170 × 55 mm\nPapier: Kartei U. Leitkarte Chamois chamois\nGrammatur: 250 g/m²\nFarben: K / K\n\n\nSorten: Meier, Müller",
"qty": 1000,
"unit": "piece",
"net_total": 33333,
"created_at": "2018-03-06T12:13:54.033+01:00",
"updated_at": "2018-03-06T12:13:54.033+01:00",
"tax_rate": "0.19",
"gross_total": "39666.0",
"billable_id": 53991,
"billable_type": "Product",
"net": "33.33333333333334",
"discount": "0.0",
"discounted_net_total": 33333,
"order_number": "4W-2K-CS",
"accounting_categories": [],
"environmental_certifications": [
"FSC Mix Credit"
]
},
{
"id": 17875,
"invoice_id": 12268,
"description": "Freistellen",
"qty": 1,
"unit": "hours",
"net_total": 6000,
"created_at": "2018-03-06T12:13:54.079+01:00",
"updated_at": "2018-03-06T12:13:54.079+01:00",
"tax_rate": "0.19",
"gross_total": "7140.0",
"billable_id": 326,
"billable_type": "Service",
"net": "6000.0",
"discount": "0.0",
"discounted_net_total": 6000,
"order_number": null,
"accounting_categories": [],
"environmental_certifications": []
},
{
"id": 17876,
"invoice_id": 12268,
"description": "Versand",
"qty": 1,
"unit": null,
"net_total": 450,
"created_at": "2018-03-06T12:13:54.124+01:00",
"updated_at": "2018-03-06T12:13:54.124+01:00",
"tax_rate": "0.19",
"gross_total": "536.0",
"billable_id": null,
"billable_type": null,
"net": "450.0",
"discount": "0.0",
"discounted_net_total": 450,
"order_number": null,
"accounting_categories": [],
"environmental_certifications": []
}
]
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
post /accounting/customer_invoices/{customer_invoice_id}/line_items
Create a new LineItem object.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- customer_invoice_id: required(string)
Body
Media type: application/json
Type: object
Properties- line_item: required(object)
- description: required(string)
- qty: required(integer - minimum: 1)
- unit: required(one of pdf, piece, plate, sheet, folded_sheet, meter, sqmeter, sqmillimeter, millimeter, liter, milliliter, gram, kilogram, ream, minutes, hours)
- tax_rate: required(number - minimum: 0 - maximum: 1)
- net: required(number)
For credit notes net, must be less than or equal to 0
- discount: (number)
- order_number: (string)
- accounting_category_id: (array of any)
Example:
{
"line_item": {
"description": "Freistellen",
"qty": 1,
"unit": "hours",
"tax_rate": 0.19,
"net": 6000.0,
"discount": 0.0,
"order_number": "XE-G4-D2"
}
}
HTTP status code 201
This response is returned if creating a new LineItem was successful.
Body
Media type: application/json
Type: object
Properties- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- description: required(string)
- qty: required(integer - minimum: 1)
- unit: required(pdf piece plate sheet folded_sheet meter sqmeter sqmillimeter millimeter liter milliliter gram kilogram ream minutes hours)
- net_total: required(integer)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- tax_rate: required(number - minimum: 0 - maximum: 1)
- gross_total: required(number)
- billable_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- billable_type: required(string)
- net: required(number)
For credit notes net, must be less than or equal to 0
- discount: required(number)
- discounted_net_total: required(integer)
- order_number: required(string)
- accounting_category_ids: required(array of any)
- environmental_certifications: required(string)
Example:
{
"id": 17875,
"invoice_id": 12268,
"description": "Freistellen",
"qty": 1,
"unit": "hours",
"net_total": 6000,
"created_at": "2018-03-06T12:13:54.079+01:00",
"updated_at": "2018-03-06T12:13:54.079+01:00",
"tax_rate": "0.19",
"gross_total": "7140.0",
"billable_id": 326,
"billable_type": "Service",
"net": "6000.0",
"discount": "0.0",
"discounted_net_total": 6000,
"order_number": null,
"accounting_categories": [],
"environmental_certifications": []
}
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The collection of LineItems.
Get a single LineItem record.
Update details for a line item.
Delete a line item for draft customer invoice.
get /accounting/customer_invoices/{customer_invoice_id}/line_items/{line_item_id}
Get a single LineItem record.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- customer_invoice_id: required(string)
- line_item_id: required(string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- description: required(string)
- qty: required(integer - minimum: 1)
- unit: required(pdf piece plate sheet folded_sheet meter sqmeter sqmillimeter millimeter liter milliliter gram kilogram ream minutes hours)
- net_total: required(integer)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- tax_rate: required(number - minimum: 0 - maximum: 1)
- gross_total: required(number)
- billable_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- billable_type: required(string)
- net: required(number)
For credit notes net, must be less than or equal to 0
- discount: required(number)
- discounted_net_total: required(integer)
- order_number: required(string)
- accounting_category_ids: required(array of any)
- environmental_certifications: required(string)
Example:
{
"id": 17875,
"invoice_id": 12268,
"description": "Freistellen",
"qty": 1,
"unit": "hours",
"net_total": 6000,
"created_at": "2018-03-06T12:13:54.079+01:00",
"updated_at": "2018-03-06T12:13:54.079+01:00",
"tax_rate": "0.19",
"gross_total": "7140.0",
"billable_id": 326,
"billable_type": "Service",
"net": "6000.0",
"discount": "0.0",
"discounted_net_total": 6000,
"order_number": null,
"accounting_categories": [],
"environmental_certifications": []
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
patch /accounting/customer_invoices/{customer_invoice_id}/line_items/{line_item_id}
Update details for a line item.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- customer_invoice_id: required(string)
- line_item_id: required(string)
Body
Media type: application/json
Type: object
Properties- line_item: required(object)
- description: required(string)
- qty: required(integer - minimum: 1)
- unit: required(one of pdf, piece, plate, sheet, folded_sheet, meter, sqmeter, sqmillimeter, millimeter, liter, milliliter, gram, kilogram, ream, minutes, hours)
- tax_rate: required(number - minimum: 0 - maximum: 1)
- net: required(number)
For credit notes net, must be less than or equal to 0
- discount: (number)
- order_number: (string)
- accounting_category_id: (array of any)
Example:
{
"line_item": {
"description": "Freistellen",
"qty": 1,
"unit": "hours",
"tax_rate": 0.19,
"net": 6000.0,
"discount": 0.0,
"order_number": "XE-G4-D2"
}
}
HTTP status code 204
Returned if the record was successfully updated.
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
delete /accounting/customer_invoices/{customer_invoice_id}/line_items/{line_item_id}
Delete a line item for draft customer invoice.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- customer_invoice_id: required(string)
- line_item_id: required(string)
HTTP status code 204
Returned if the record was successfully deleted.
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The PaymentTerms record associated with the parent record.
Create a new PaymentTerm record.
Update details for payment terms.
post /accounting/customer_invoices/{customer_invoice_id}/payment_terms
Create a new PaymentTerm record.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- customer_invoice_id: required(string)
Body
Media type: application/json
Type: object
Properties- payment_terms: required(object)
- time_for_payment: required(integer - minimum: 0)
- accepted_means_of_payment: (string)
- time_for_first_cashback: (integer - minimum: 1)
- first_cashback_discount: (number - minimum: 0.1 - maximum: 1)
- time_for_second_cashback: (integer - minimum: 1)
- second_cashback_discount: (number - minimum: 0.1 - maximum: 1)
Example:
{
"payment_terms": {
"time_for_payment": 7,
"time_for_first_cashback": 3,
"first_cashback_discount": 0.1
}
}
HTTP status code 201
This response is returned if creating a new PaymentTerm was successful.
Body
Media type: application/json
Type: object
Properties- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- payment_termable_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- payment_termable_type: required(string)
- time_for_payment: required(integer - minimum: 0)
- accepted_means_of_payment: required(string)
- time_for_first_cashback: required(integer - minimum: 1)
- first_cashback_discount: required(number - minimum: 0.1 - maximum: 1)
- time_for_second_cashback: required(integer - minimum: 1)
- second_cashback_discount: required(number - minimum: 0.1 - maximum: 1)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
Example:
{
"id": 16492,
"payment_termable_id": 13661,
"payment_termable_type": "Invoice",
"time_for_payment": 7,
"accepted_means_of_payment": null,
"time_for_first_cashback": 3,
"first_cashback_discount": 0.1,
"time_for_second_cashback": null,
"second_cashback_discount": null,
"created_at": "2018-04-10T14:59:40.970+02:00",
"updated_at": "2018-04-10T14:59:40.970+02:00"
}
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
patch /accounting/customer_invoices/{customer_invoice_id}/payment_terms
Update details for payment terms.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- customer_invoice_id: required(string)
Body
Media type: application/json
Type: object
Properties- payment_terms: required(object)
- time_for_payment: required(integer - minimum: 0)
- accepted_means_of_payment: (string)
- time_for_first_cashback: (integer - minimum: 1)
- first_cashback_discount: (number - minimum: 0.1 - maximum: 1)
- time_for_second_cashback: (integer - minimum: 1)
- second_cashback_discount: (number - minimum: 0.1 - maximum: 1)
Example:
{
"payment_terms": {
"time_for_payment": 7,
"time_for_first_cashback": 3,
"first_cashback_discount": 0.1
}
}
HTTP status code 204
Returned if the record was successfully updated.
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The ReversalInvoice record associated with the parent record.
Cancel a billed customer invoice and create a reversal invoice.
post /accounting/customer_invoices/{customer_invoice_id}/reversal_invoice
Cancel a billed customer invoice and create a reversal invoice.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- customer_invoice_id: required(string)
HTTP status code 201
This response is returned if creating a new ReversalInvoice was successful.
Body
Media type: application/json
Type: object
Properties- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- number: required(string)
If not specified, the invoice number is generated automatically.
- net_total: required(integer)
- gross_total: required(integer)
- paid_at: required(date-only)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- custom_text: required(string)
- taxes: required(object)
Contains the tax rates for each line item of the invoice
- due_at: required(date-only)
If not specified, the due date will be set automatically, based on the specified payment terms.
- printery_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- billed_at: required(date-only)
- sent_at: required(date-only)
- business_unit_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- checked_at: required(datetime)
- custom_references: required(object)
Contains up to 5 arbitrary key-value entries, for data that doesn't fit into any other category of the invoice
- reversal_invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reversed_invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- type: required(string)
- services_performed_at: required(date-only)
If not specified, the services date will be set automatically to the invoice date.
- recipient: required(object)
A
Organization
object represents a customer of a printery- name: required(string)
- email: (string)
- preferred_locale: (string)
A two-letter ISO country code, that identifies the language the person or organization prefers to be contacted with.
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- creditor_identifier: (string)
- debitor_identifier: (string)
- tax_identifier: (string)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reference: (string)
- recipient_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- recipient_type: required(string)
- address: required(object)
An
Address
object represents a postal Address- addressee: required(string)
- town: required(string)
- number: (string)
- country_code: required(string)
ISO Country code of country this address is located in.
- zip_code: required(string)
- street: (string)
- addition: (string)
An optional additional information, usually displayed right below the address.
- line_items: required(array of response.LineItem)
Items: LineItem
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- description: required(string)
- qty: required(integer - minimum: 1)
- unit: required(pdf piece plate sheet folded_sheet meter sqmeter sqmillimeter millimeter liter milliliter gram kilogram ream minutes hours)
- net_total: required(integer)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- tax_rate: required(number - minimum: 0 - maximum: 1)
- gross_total: required(number)
- billable_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- billable_type: required(string)
- net: required(number)
For credit notes net, must be less than or equal to 0
- discount: required(number)
- discounted_net_total: required(integer)
- order_number: required(string)
- accounting_category_ids: required(array of any)
- environmental_certifications: required(string)
- id: required(integer - minimum: 1)
Example:
{
"id": 13668,
"number": "180411002",
"net_total": -96411,
"gross_total": -114729,
"paid_at": null,
"created_at": "2018-04-11T10:27:54.298+02:00",
"updated_at": "2018-04-11T10:27:54.356+02:00",
"custom_text": null,
"taxes": {
"0.19": -18318
},
"due_at": "2018-04-11",
"printery_id": 17,
"billed_at": "2018-04-11",
"sent_at": null,
"business_unit_id": 23,
"custom_references": {},
"reversal_invoice_id": null,
"reversed_invoice_id": 13569,
"services_performed_at": "2018-03-26",
"recipient_type": "Organization",
"recipient_id": 6710,
"recipient": {
"id": 6710,
"name": "Crispy",
"tax_identifier": "DE 123456789",
"email": "crispy@example.com",
"reference": "Num 12345",
"debitor_identifier": null,
"creditor_identifier": null,
"preferred_locale": null,
"created_at": "2018-07-03T11:44:52.210+02:00",
"updated_at": "2018-07-03T11:44:52.210+02:00"
},
"contact": {
"id": 1245,
"salutation": "Frau",
"name": "Schöller",
"first_name": "Maria",
"mobile": null,
"phone": null,
"fax": null,
"tax_identifier": null,
"email": "maria@example.com",
"reference": "HAXEZ3",
"debitor_identifier": null,
"preferred_locale": null,
"created_at": "2017-07-19T13:44:16.332+02:00",
"updated_at": "2017-08-30T15:40:18.054+02:00"
},
"address": {
"addressee": "Crispy Mountain GmbH",
"street": "Emmerich Josef Straße",
"number": "1a",
"addition": "",
"zip_code": "55116",
"town": "Mainz",
"country_code": "DE"
},
"line_items": [
{
"id": 19999,
"invoice_id": 13668,
"description": "Visitenkarte\nSeiten: 2\nFormat: 85 × 55 mm\nPapier: Kartei U. Leitkarte Chamois chamois\nGrammatur: 250 g/m²\nFarben: CMYK / CMYK",
"qty": 500,
"unit": "piece",
"net_total": -96411,
"created_at": "2018-04-11T10:27:54.318+02:00",
"updated_at": "2018-04-11T10:27:54.318+02:00",
"tax_rate": "0.19",
"gross_total": "-114729.0",
"billable_id": 56046,
"billable_type": "Product",
"net": "-192.821",
"discount": "0.0",
"discounted_net_total": -96411,
"order_number": "EB-9M-BR",
"accounting_categories": [],
"environmental_certifications": []
}
]
}
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The collection of CreditNotes
Get a list of all CreditNote objects.
Create a new CreditNote object.
get /accounting/credit_notes
Get a list of all CreditNote objects.
Keyline requires API users to authenticate before they can access any information.
HTTP status code 200
Body
Media type: application/json
Type: array of common.Invoice
Items: CreditNote
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- number: required(string)
If not specified, the invoice number is generated automatically.
- net_total: required(integer)
- gross_total: required(integer)
- paid_at: required(date-only)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- custom_text: required(string)
- taxes: required(object)
Contains the tax rates for each line item of the invoice
- due_at: required(date-only)
If not specified, the due date will be set automatically, based on the specified payment terms.
- printery_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- billed_at: required(date-only)
- sent_at: required(date-only)
- business_unit_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- checked_at: required(datetime)
- custom_references: required(object)
Contains up to 5 arbitrary key-value entries, for data that doesn't fit into any other category of the invoice
- reversal_invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reversed_invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- type: required(string)
- services_performed_at: required(date-only)
If not specified, the services date will be set automatically to the invoice date.
- recipient: required(object)
A
Organization
object represents a customer of a printery- name: required(string)
- email: (string)
- preferred_locale: (string)
A two-letter ISO country code, that identifies the language the person or organization prefers to be contacted with.
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- creditor_identifier: (string)
- debitor_identifier: (string)
- tax_identifier: (string)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reference: (string)
- recipient_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- recipient_type: required(string)
- address: required(object)
An
Address
object represents a postal Address- addressee: required(string)
- town: required(string)
- number: (string)
- country_code: required(string)
ISO Country code of country this address is located in.
- zip_code: required(string)
- street: (string)
- addition: (string)
An optional additional information, usually displayed right below the address.
- line_items: required(array of response.LineItem)
Items: LineItem
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- description: required(string)
- qty: required(integer - minimum: 1)
- unit: required(pdf piece plate sheet folded_sheet meter sqmeter sqmillimeter millimeter liter milliliter gram kilogram ream minutes hours)
- net_total: required(integer)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- tax_rate: required(number - minimum: 0 - maximum: 1)
- gross_total: required(number)
- billable_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- billable_type: required(string)
- net: required(number)
For credit notes net, must be less than or equal to 0
- discount: required(number)
- discounted_net_total: required(integer)
- order_number: required(string)
- accounting_category_ids: required(array of any)
- environmental_certifications: required(string)
- id: required(integer - minimum: 1)
Example:
[
{
"id": 13664,
"number": "180410002",
"net_total": -6000,
"gross_total": -7140,
"paid_at": null,
"created_at": "2018-04-10T13:28:22.932+02:00",
"updated_at": "2018-04-10T13:28:59.972+02:00",
"custom_text": null,
"taxes": {
"0.19": -1140
},
"due_at": null,
"printery_id": 17,
"billed_at": "2018-04-10",
"sent_at": null,
"business_unit_id": 23,
"custom_references": {},
"reversal_invoice_id": null,
"reversed_invoice_id": null,
"services_performed_at": "2018-03-06",
"recipient_type": "Organization",
"recipient_id": 6710,
"recipient": {
"id": 6710,
"name": "Crispy",
"tax_identifier": "DE 123456789",
"email": "crispy@example.com",
"reference": "Num 12345",
"debitor_identifier": null,
"creditor_identifier": null,
"preferred_locale": null,
"created_at": "2018-07-03T11:44:52.210+02:00",
"updated_at": "2018-07-03T11:44:52.210+02:00"
},
"contact": {
"id": 1245,
"salutation": "Frau",
"name": "Schöller",
"first_name": "Maria",
"mobile": null,
"phone": null,
"fax": null,
"tax_identifier": null,
"email": "maria@example.com",
"reference": "HAXEZ3",
"debitor_identifier": null,
"preferred_locale": null,
"created_at": "2017-07-19T13:44:16.332+02:00",
"updated_at": "2017-08-30T15:40:18.054+02:00"
},
"address": {
"addressee": "Crispy Mountain GmbH",
"street": "Emmerich Josef Straße",
"number": "1a",
"addition": "",
"zip_code": "55116",
"town": "Mainz",
"country_code": "DE"
},
"line_items": [
{
"id": 19997,
"invoice_id": 13664,
"description": "Provision für Produkt CR-SS-Q2",
"qty": 1,
"unit": "piece",
"net_total": -6000,
"created_at": "2018-04-10T13:28:50.813+02:00",
"updated_at": "2018-04-10T13:28:50.813+02:00",
"tax_rate": "0.19",
"gross_total": "-7140.0",
"billable_id": null,
"billable_type": null,
"net": "-6000.0",
"discount": "0.0",
"discounted_net_total": -6000,
"order_number": null,
"accounting_categories": [],
"environmental_certifications": []
}
]
},
{
"id": 13663,
"number": "180410001",
"net_total": -12000,
"gross_total": -14280,
"paid_at": null,
"created_at": "2018-04-10T13:26:46.965+02:00",
"updated_at": "2018-04-10T13:28:11.627+02:00",
"custom_text": null,
"taxes": {
"0.19": -2280
},
"due_at": null,
"printery_id": 17,
"billed_at": "2018-04-10",
"sent_at": null,
"business_unit_id": 23,
"custom_references": {},
"reversal_invoice_id": null,
"reversed_invoice_id": null,
"services_performed_at": "2018-04-09",
"recipient_type": "Organization",
"recipient_id": 6710,
"recipient": {
"id": 6710,
"name": "Crispy",
"tax_identifier": "DE 123456789",
"email": "crispy@example.com",
"reference": "Num 12345",
"debitor_identifier": null,
"creditor_identifier": null,
"preferred_locale": null,
"created_at": "2018-07-03T11:44:52.210+02:00",
"updated_at": "2018-07-03T11:44:52.210+02:00"
},
"contact": {
"id": 1245,
"salutation": "Frau",
"name": "Schöller",
"first_name": "Maria",
"mobile": null,
"phone": null,
"fax": null,
"tax_identifier": null,
"email": "maria@example.com",
"reference": "HAXEZ3",
"debitor_identifier": null,
"preferred_locale": null,
"created_at": "2017-07-19T13:44:16.332+02:00",
"updated_at": "2017-08-30T15:40:18.054+02:00"
},
"address": {
"addressee": "Crispy Mountain GmbH",
"street": "Emmerich Josef Straße",
"number": "1a",
"addition": "",
"zip_code": "55116",
"town": "Mainz",
"country_code": "DE"
},
"line_items": [
{
"id": 19996,
"invoice_id": 13663,
"description": "Provision",
"qty": 1,
"unit": null,
"net_total": -12000,
"created_at": "2018-04-10T13:28:01.035+02:00",
"updated_at": "2018-04-10T13:28:01.035+02:00",
"tax_rate": "0.19",
"gross_total": "-14280.0",
"billable_id": null,
"billable_type": null,
"net": "-12000.0",
"discount": "0.0",
"discounted_net_total": -12000,
"order_number": null,
"accounting_categories": [],
"environmental_certifications": []
}
]
}
]
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
post /accounting/credit_notes
Create a new CreditNote object.
Keyline requires API users to authenticate before they can access any information.
Body
Media type: application/json
Type: object
Properties- credit_note: required(object)
- number: (string)
- paid_at: (date-only)
- custom_text: (string)
- due_at: (date-only)
- billed_at: (date-only)
- sent_at: (date-only)
- business_unit_id: (integer)
- affiliate_id: required(integer)
- services_performed_at: (date-only)
Example:
{
"credit_note": {
"recipient_id": 57,
"business_unit_id": 23,
"number": "221028",
"services_performed_at": "2018-04-08"
}
}
HTTP status code 201
This response is returned if creating a new CreditNote was successful.
Body
Media type: application/json
Type: object
Properties- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- number: required(string)
If not specified, the invoice number is generated automatically.
- net_total: required(integer)
- gross_total: required(integer)
- paid_at: required(date-only)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- custom_text: required(string)
- taxes: required(object)
Contains the tax rates for each line item of the invoice
- due_at: required(date-only)
If not specified, the due date will be set automatically, based on the specified payment terms.
- printery_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- billed_at: required(date-only)
- sent_at: required(date-only)
- business_unit_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- checked_at: required(datetime)
- custom_references: required(object)
Contains up to 5 arbitrary key-value entries, for data that doesn't fit into any other category of the invoice
- reversal_invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reversed_invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- type: required(string)
- services_performed_at: required(date-only)
If not specified, the services date will be set automatically to the invoice date.
- recipient: required(object)
A
Organization
object represents a customer of a printery- name: required(string)
- email: (string)
- preferred_locale: (string)
A two-letter ISO country code, that identifies the language the person or organization prefers to be contacted with.
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- creditor_identifier: (string)
- debitor_identifier: (string)
- tax_identifier: (string)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reference: (string)
- recipient_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- recipient_type: required(string)
- address: required(object)
An
Address
object represents a postal Address- addressee: required(string)
- town: required(string)
- number: (string)
- country_code: required(string)
ISO Country code of country this address is located in.
- zip_code: required(string)
- street: (string)
- addition: (string)
An optional additional information, usually displayed right below the address.
- line_items: required(array of response.LineItem)
Items: LineItem
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- description: required(string)
- qty: required(integer - minimum: 1)
- unit: required(pdf piece plate sheet folded_sheet meter sqmeter sqmillimeter millimeter liter milliliter gram kilogram ream minutes hours)
- net_total: required(integer)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- tax_rate: required(number - minimum: 0 - maximum: 1)
- gross_total: required(number)
- billable_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- billable_type: required(string)
- net: required(number)
For credit notes net, must be less than or equal to 0
- discount: required(number)
- discounted_net_total: required(integer)
- order_number: required(string)
- accounting_category_ids: required(array of any)
- environmental_certifications: required(string)
- id: required(integer - minimum: 1)
Example:
{
"id": 13664,
"number": "180410002",
"net_total": -6000,
"gross_total": -7140,
"paid_at": null,
"created_at": "2018-04-10T13:28:22.932+02:00",
"updated_at": "2018-04-10T13:28:59.972+02:00",
"custom_text": null,
"taxes": {
"0.19": -1140
},
"due_at": null,
"printery_id": 17,
"billed_at": "2018-04-10",
"sent_at": null,
"business_unit_id": 23,
"custom_references": {},
"reversal_invoice_id": null,
"reversed_invoice_id": null,
"services_performed_at": "2018-03-06",
"recipient_id": 6710,
"recipient": {
"id": 6710,
"name": "Crispy",
"tax_identifier": "DE 123456789",
"email": "crispy@example.com",
"reference": "Num 12345",
"debitor_identifier": null,
"creditor_identifier": null,
"preferred_locale": null,
"created_at": "2018-07-03T11:44:52.210+02:00",
"updated_at": "2018-07-03T11:44:52.210+02:00"
},
"contact": {
"id": 1245,
"salutation": "Frau",
"name": "Schöller",
"first_name": "Maria",
"mobile": null,
"phone": null,
"fax": null,
"tax_identifier": null,
"email": "maria@example.com",
"reference": "HAXEZ3",
"debitor_identifier": null,
"preferred_locale": null,
"created_at": "2017-07-19T13:44:16.332+02:00",
"updated_at": "2017-08-30T15:40:18.054+02:00"
},
"address": {
"addressee": "Crispy Mountain GmbH",
"street": "Emmerich Josef Straße",
"number": "1a",
"addition": "",
"zip_code": "55116",
"town": "Mainz",
"country_code": "DE"
},
"line_items": [
{
"id": 19997,
"invoice_id": 13664,
"description": "Provision für Produkt CR-SS-Q2",
"qty": 1,
"unit": "piece",
"net_total": -6000,
"created_at": "2018-04-10T13:28:50.813+02:00",
"updated_at": "2018-04-10T13:28:50.813+02:00",
"tax_rate": "0.19",
"gross_total": "-7140.0",
"billable_id": null,
"billable_type": null,
"net": "-6000.0",
"discount": "0.0",
"discounted_net_total": -6000,
"order_number": null,
"accounting_categories": [],
"environmental_certifications": []
}
]
}
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The collection of CreditNotes.
Get a single CreditNote record.
Update details for a draft credit note.
Delete a draft credit note.
get /accounting/credit_notes/{credit_note_id}
Get a single CreditNote record.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- credit_note_id: required(string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- number: required(string)
If not specified, the invoice number is generated automatically.
- net_total: required(integer)
- gross_total: required(integer)
- paid_at: required(date-only)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- custom_text: required(string)
- taxes: required(object)
Contains the tax rates for each line item of the invoice
- due_at: required(date-only)
If not specified, the due date will be set automatically, based on the specified payment terms.
- printery_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- billed_at: required(date-only)
- sent_at: required(date-only)
- business_unit_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- checked_at: required(datetime)
- custom_references: required(object)
Contains up to 5 arbitrary key-value entries, for data that doesn't fit into any other category of the invoice
- reversal_invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reversed_invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- type: required(string)
- services_performed_at: required(date-only)
If not specified, the services date will be set automatically to the invoice date.
- recipient: required(object)
A
Organization
object represents a customer of a printery- name: required(string)
- email: (string)
- preferred_locale: (string)
A two-letter ISO country code, that identifies the language the person or organization prefers to be contacted with.
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- creditor_identifier: (string)
- debitor_identifier: (string)
- tax_identifier: (string)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reference: (string)
- recipient_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- recipient_type: required(string)
- address: required(object)
An
Address
object represents a postal Address- addressee: required(string)
- town: required(string)
- number: (string)
- country_code: required(string)
ISO Country code of country this address is located in.
- zip_code: required(string)
- street: (string)
- addition: (string)
An optional additional information, usually displayed right below the address.
- line_items: required(array of response.LineItem)
Items: LineItem
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- description: required(string)
- qty: required(integer - minimum: 1)
- unit: required(pdf piece plate sheet folded_sheet meter sqmeter sqmillimeter millimeter liter milliliter gram kilogram ream minutes hours)
- net_total: required(integer)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- tax_rate: required(number - minimum: 0 - maximum: 1)
- gross_total: required(number)
- billable_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- billable_type: required(string)
- net: required(number)
For credit notes net, must be less than or equal to 0
- discount: required(number)
- discounted_net_total: required(integer)
- order_number: required(string)
- accounting_category_ids: required(array of any)
- environmental_certifications: required(string)
- id: required(integer - minimum: 1)
Example:
{
"id": 13664,
"number": "180410002",
"net_total": -6000,
"gross_total": -7140,
"paid_at": null,
"created_at": "2018-04-10T13:28:22.932+02:00",
"updated_at": "2018-04-10T13:28:59.972+02:00",
"custom_text": null,
"taxes": {
"0.19": -1140
},
"due_at": null,
"printery_id": 17,
"billed_at": "2018-04-10",
"sent_at": null,
"business_unit_id": 23,
"custom_references": {},
"reversal_invoice_id": null,
"reversed_invoice_id": null,
"services_performed_at": "2018-03-06",
"recipient_id": 6710,
"recipient": {
"id": 6710,
"name": "Crispy",
"tax_identifier": "DE 123456789",
"email": "crispy@example.com",
"reference": "Num 12345",
"debitor_identifier": null,
"creditor_identifier": null,
"preferred_locale": null,
"created_at": "2018-07-03T11:44:52.210+02:00",
"updated_at": "2018-07-03T11:44:52.210+02:00"
},
"contact": {
"id": 1245,
"salutation": "Frau",
"name": "Schöller",
"first_name": "Maria",
"mobile": null,
"phone": null,
"fax": null,
"tax_identifier": null,
"email": "maria@example.com",
"reference": "HAXEZ3",
"debitor_identifier": null,
"preferred_locale": null,
"created_at": "2017-07-19T13:44:16.332+02:00",
"updated_at": "2017-08-30T15:40:18.054+02:00"
},
"address": {
"addressee": "Crispy Mountain GmbH",
"street": "Emmerich Josef Straße",
"number": "1a",
"addition": "",
"zip_code": "55116",
"town": "Mainz",
"country_code": "DE"
},
"line_items": [
{
"id": 19997,
"invoice_id": 13664,
"description": "Provision für Produkt CR-SS-Q2",
"qty": 1,
"unit": "piece",
"net_total": -6000,
"created_at": "2018-04-10T13:28:50.813+02:00",
"updated_at": "2018-04-10T13:28:50.813+02:00",
"tax_rate": "0.19",
"gross_total": "-7140.0",
"billable_id": null,
"billable_type": null,
"net": "-6000.0",
"discount": "0.0",
"discounted_net_total": -6000,
"order_number": null,
"accounting_categories": [],
"environmental_certifications": []
}
]
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
patch /accounting/credit_notes/{credit_note_id}
Update details for a draft credit note.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- credit_note_id: required(string)
Body
Media type: application/json
Type: object
Properties- credit_note: required(object)
- number: (string)
- paid_at: (date-only)
- custom_text: (string)
- due_at: (date-only)
- billed_at: (date-only)
- sent_at: (date-only)
- business_unit_id: (integer)
- affiliate_id: required(integer)
- services_performed_at: (date-only)
Example:
{
"credit_note": {
"recipient_id": 57,
"business_unit_id": 23,
"number": "221028",
"services_performed_at": "2018-04-08"
}
}
HTTP status code 204
Returned if the record was successfully updated.
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
delete /accounting/credit_notes/{credit_note_id}
Delete a draft credit note.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- credit_note_id: required(string)
HTTP status code 204
Returned if the record was successfully deleted.
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The Contact record associated with the parent record.
Create a new Contact record.
Update details for a contact.
post /accounting/credit_notes/{credit_note_id}/contact
Create a new Contact record.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- credit_note_id: required(string)
Body
Media type: application/json
Type: ContactRequest
HTTP status code 201
This response is returned if creating a new Contact was successful.
Body
Media type: application/json
Type: Contact
Example:
Can not resolve examples/api-v2/configuration/contacts/get_id_200_response.json
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
patch /accounting/credit_notes/{credit_note_id}/contact
Update details for a contact.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- credit_note_id: required(string)
Body
Media type: application/json
Type: ContactRequest
HTTP status code 204
Returned if the record was successfully updated.
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The Address record associated with the parent record.
Create a new Address record.
Update details for an address.
post /accounting/credit_notes/{credit_note_id}/address
Create a new Address record.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- credit_note_id: required(string)
Body
Media type: application/json
Type: object
Properties- address: required(object)
- addressee: required(string)
- town: required(string)
- number: (string)
- country_code: required(string)
ISO Country code of country this address is located in.
- zip_code: required(string)
- street: (string)
- addition: (string)
An optional additional information
Example:
{
"address": {
"addressee": "Crispy Mountain GmbH",
"street": "Emmerich-Josef-Straße",
"number": "1a",
"zip_code": "55116",
"town": "Mainz",
"country_code": "DE"
}
}
HTTP status code 201
This response is returned if creating a new Address was successful.
Body
Media type: application/json
Type: object
Properties- addressee: required(string)
- town: required(string)
- number: (string)
- country_code: required(string)
ISO Country code of country this address is located in.
- zip_code: required(string)
- street: (string)
- addition: (string)
An optional additional information, usually displayed right below the address.
Example:
Can not resolve examples/api-v2/configuration/addresses//get_id_200_response.json
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
patch /accounting/credit_notes/{credit_note_id}/address
Update details for an address.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- credit_note_id: required(string)
Body
Media type: application/json
Type: object
Properties- address: required(object)
- addressee: required(string)
- town: required(string)
- number: (string)
- country_code: required(string)
ISO Country code of country this address is located in.
- zip_code: required(string)
- street: (string)
- addition: (string)
An optional additional information
Example:
{
"address": {
"addressee": "Crispy Mountain GmbH",
"street": "Emmerich-Josef-Straße",
"number": "1a",
"zip_code": "55116",
"town": "Mainz",
"country_code": "DE"
}
}
HTTP status code 204
Returned if the record was successfully updated.
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The collection of LineItems
Get a list of all LineItem objects.
Create a new LineItem object.
get /accounting/credit_notes/{credit_note_id}/line_items
Get a list of all LineItem objects.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- credit_note_id: required(string)
HTTP status code 200
Body
Media type: application/json
Type: array of object
Items: LineItem
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- description: required(string)
- qty: required(integer - minimum: 1)
- unit: required(pdf piece plate sheet folded_sheet meter sqmeter sqmillimeter millimeter liter milliliter gram kilogram ream minutes hours)
- net_total: required(integer)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- tax_rate: required(number - minimum: 0 - maximum: 1)
- gross_total: required(number)
- billable_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- billable_type: required(string)
- net: required(number)
For credit notes net, must be less than or equal to 0
- discount: required(number)
- discounted_net_total: required(integer)
- order_number: required(string)
- accounting_category_ids: required(array of any)
- environmental_certifications: required(string)
Example:
[
{
"id": 19997,
"invoice_id": 13664,
"description": "Provision für Produkt CR-SS-Q2",
"qty": 1,
"unit": "piece",
"net_total": -6000,
"created_at": "2018-04-10T13:28:50.813+02:00",
"updated_at": "2018-04-10T13:28:50.813+02:00",
"tax_rate": "0.19",
"gross_total": "-7140.0",
"billable_id": null,
"billable_type": null,
"net": "-6000.0",
"discount": "0.0",
"discounted_net_total": -6000,
"order_number": null,
"accounting_categories": [],
"environmental_certifications": []
}
]
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
post /accounting/credit_notes/{credit_note_id}/line_items
Create a new LineItem object.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- credit_note_id: required(string)
Body
Media type: application/json
Type: object
Properties- line_item: required(object)
- description: required(string)
- qty: required(integer - minimum: 1)
- unit: required(one of pdf, piece, plate, sheet, folded_sheet, meter, sqmeter, sqmillimeter, millimeter, liter, milliliter, gram, kilogram, ream, minutes, hours)
- tax_rate: required(number - minimum: 0 - maximum: 1)
- net: required(number)
For credit notes net, must be less than or equal to 0
- discount: (number)
- order_number: (string)
- accounting_category_id: (array of any)
Example:
{
"line_item": {
"description": "Provision für Produkt CR-SS-Q2",
"qty": 1,
"unit": "piece",
"tax_rate": 0.19,
"net": "-6000.0",
"discount": 0.0,
}
}
HTTP status code 201
This response is returned if creating a new LineItem was successful.
Body
Media type: application/json
Type: object
Properties- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- description: required(string)
- qty: required(integer - minimum: 1)
- unit: required(pdf piece plate sheet folded_sheet meter sqmeter sqmillimeter millimeter liter milliliter gram kilogram ream minutes hours)
- net_total: required(integer)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- tax_rate: required(number - minimum: 0 - maximum: 1)
- gross_total: required(number)
- billable_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- billable_type: required(string)
- net: required(number)
For credit notes net, must be less than or equal to 0
- discount: required(number)
- discounted_net_total: required(integer)
- order_number: required(string)
- accounting_category_ids: required(array of any)
- environmental_certifications: required(string)
Example:
{
"id": 19997,
"invoice_id": 13664,
"description": "Provision für Produkt CR-SS-Q2",
"qty": 1,
"unit": "piece",
"net_total": -6000,
"created_at": "2018-04-10T13:28:50.813+02:00",
"updated_at": "2018-04-10T13:28:50.813+02:00",
"tax_rate": "0.19",
"gross_total": "-7140.0",
"billable_id": null,
"billable_type": null,
"net": "-6000.0",
"discount": "0.0",
"discounted_net_total": -6000,
"order_number": null,
"accounting_categories": [],
"environmental_certifications": []
}
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The collection of LineItems.
Get a single LineItem record.
Update details for a line item.
Delete a line item for draft credit note.
get /accounting/credit_notes/{credit_note_id}/line_items/{line_item_id}
Get a single LineItem record.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- credit_note_id: required(string)
- line_item_id: required(string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- description: required(string)
- qty: required(integer - minimum: 1)
- unit: required(pdf piece plate sheet folded_sheet meter sqmeter sqmillimeter millimeter liter milliliter gram kilogram ream minutes hours)
- net_total: required(integer)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- tax_rate: required(number - minimum: 0 - maximum: 1)
- gross_total: required(number)
- billable_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- billable_type: required(string)
- net: required(number)
For credit notes net, must be less than or equal to 0
- discount: required(number)
- discounted_net_total: required(integer)
- order_number: required(string)
- accounting_category_ids: required(array of any)
- environmental_certifications: required(string)
Example:
{
"id": 19997,
"invoice_id": 13664,
"description": "Provision für Produkt CR-SS-Q2",
"qty": 1,
"unit": "piece",
"net_total": -6000,
"created_at": "2018-04-10T13:28:50.813+02:00",
"updated_at": "2018-04-10T13:28:50.813+02:00",
"tax_rate": "0.19",
"gross_total": "-7140.0",
"billable_id": null,
"billable_type": null,
"net": "-6000.0",
"discount": "0.0",
"discounted_net_total": -6000,
"order_number": null,
"accounting_categories": [],
"environmental_certifications": []
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
patch /accounting/credit_notes/{credit_note_id}/line_items/{line_item_id}
Update details for a line item.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- credit_note_id: required(string)
- line_item_id: required(string)
Body
Media type: application/json
Type: object
Properties- line_item: required(object)
- description: required(string)
- qty: required(integer - minimum: 1)
- unit: required(one of pdf, piece, plate, sheet, folded_sheet, meter, sqmeter, sqmillimeter, millimeter, liter, milliliter, gram, kilogram, ream, minutes, hours)
- tax_rate: required(number - minimum: 0 - maximum: 1)
- net: required(number)
For credit notes net, must be less than or equal to 0
- discount: (number)
- order_number: (string)
- accounting_category_id: (array of any)
Example:
{
"line_item": {
"description": "Provision für Produkt CR-SS-Q2",
"qty": 1,
"unit": "piece",
"tax_rate": 0.19,
"net": "-6000.0",
"discount": 0.0,
}
}
HTTP status code 204
Returned if the record was successfully updated.
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
delete /accounting/credit_notes/{credit_note_id}/line_items/{line_item_id}
Delete a line item for draft credit note.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- credit_note_id: required(string)
- line_item_id: required(string)
HTTP status code 204
Returned if the record was successfully deleted.
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The collection of ReversalInvoices
Get a list of all ReversalInvoice objects.
get /accounting/reversal_invoices
Get a list of all ReversalInvoice objects.
Keyline requires API users to authenticate before they can access any information.
HTTP status code 200
Body
Media type: application/json
Type: array of common.Invoice
Items: ReversalInvoice
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- number: required(string)
If not specified, the invoice number is generated automatically.
- net_total: required(integer)
- gross_total: required(integer)
- paid_at: required(date-only)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- custom_text: required(string)
- taxes: required(object)
Contains the tax rates for each line item of the invoice
- due_at: required(date-only)
If not specified, the due date will be set automatically, based on the specified payment terms.
- printery_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- billed_at: required(date-only)
- sent_at: required(date-only)
- business_unit_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- checked_at: required(datetime)
- custom_references: required(object)
Contains up to 5 arbitrary key-value entries, for data that doesn't fit into any other category of the invoice
- reversal_invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reversed_invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- type: required(string)
- services_performed_at: required(date-only)
If not specified, the services date will be set automatically to the invoice date.
- recipient: required(object)
A
Organization
object represents a customer of a printery- name: required(string)
- email: (string)
- preferred_locale: (string)
A two-letter ISO country code, that identifies the language the person or organization prefers to be contacted with.
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- creditor_identifier: (string)
- debitor_identifier: (string)
- tax_identifier: (string)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reference: (string)
- recipient_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- recipient_type: required(string)
- address: required(object)
An
Address
object represents a postal Address- addressee: required(string)
- town: required(string)
- number: (string)
- country_code: required(string)
ISO Country code of country this address is located in.
- zip_code: required(string)
- street: (string)
- addition: (string)
An optional additional information, usually displayed right below the address.
- line_items: required(array of response.LineItem)
Items: LineItem
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- description: required(string)
- qty: required(integer - minimum: 1)
- unit: required(pdf piece plate sheet folded_sheet meter sqmeter sqmillimeter millimeter liter milliliter gram kilogram ream minutes hours)
- net_total: required(integer)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- tax_rate: required(number - minimum: 0 - maximum: 1)
- gross_total: required(number)
- billable_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- billable_type: required(string)
- net: required(number)
For credit notes net, must be less than or equal to 0
- discount: required(number)
- discounted_net_total: required(integer)
- order_number: required(string)
- accounting_category_ids: required(array of any)
- environmental_certifications: required(string)
- id: required(integer - minimum: 1)
Example:
[
{
"id": 13668,
"number": "180411002",
"net_total": -96411,
"gross_total": -114729,
"paid_at": null,
"created_at": "2018-04-11T10:27:54.298+02:00",
"updated_at": "2018-04-11T10:27:54.356+02:00",
"custom_text": null,
"taxes": {
"0.19": -18318
},
"due_at": "2018-04-11",
"printery_id": 17,
"billed_at": "2018-04-11",
"sent_at": null,
"business_unit_id": 23,
"custom_references": {},
"reversal_invoice_id": null,
"reversed_invoice_id": 13569,
"services_performed_at": "2018-03-26",
"recipient_type": "Organization",
"recipient_id": 6710,
"recipient": {
"id": 6710,
"name": "Crispy",
"tax_identifier": "DE 123456789",
"email": "crispy@example.com",
"reference": "Num 12345",
"debitor_identifier": null,
"creditor_identifier": null,
"preferred_locale": null,
"created_at": "2018-07-03T11:44:52.210+02:00",
"updated_at": "2018-07-03T11:44:52.210+02:00"
},
"contact": {
"id": 1245,
"salutation": "Frau",
"name": "Schöller",
"first_name": "Maria",
"mobile": null,
"phone": null,
"fax": null,
"tax_identifier": null,
"email": "maria@example.com",
"reference": "HAXEZ3",
"debitor_identifier": null,
"preferred_locale": null,
"created_at": "2017-07-19T13:44:16.332+02:00",
"updated_at": "2017-08-30T15:40:18.054+02:00"
},
"address": {
"addressee": "Crispy Mountain GmbH",
"street": "Emmerich Josef Straße",
"number": "1a",
"addition": "",
"zip_code": "55116",
"town": "Mainz",
"country_code": "DE"
},
"line_items": [
{
"id": 19999,
"invoice_id": 13668,
"description": "Visitenkarte\nSeiten: 2\nFormat: 85 × 55 mm\nPapier: Kartei U. Leitkarte Chamois chamois\nGrammatur: 250 g/m²\nFarben: CMYK / CMYK",
"qty": 500,
"unit": "piece",
"net_total": -96411,
"created_at": "2018-04-11T10:27:54.318+02:00",
"updated_at": "2018-04-11T10:27:54.318+02:00",
"tax_rate": "0.19",
"gross_total": "-114729.0",
"billable_id": 56046,
"billable_type": "Product",
"net": "-192.821",
"discount": "0.0",
"discounted_net_total": -96411,
"order_number": "EB-9M-BR",
"accounting_categories": [],
"environmental_certifications": []
}
]
},
{
"id": 912,
"number": "27",
"net_total": -241014,
"gross_total": -286807,
"paid_at": null,
"created_at": "2016-11-30T14:31:58.341+01:00",
"updated_at": "2016-11-30T14:31:58.728+01:00",
"custom_text": null,
"taxes": {
"0.19": -45793
},
"due_at": "2016-11-30",
"printery_id": 17,
"billed_at": "2016-11-30",
"sent_at": null,
"business_unit_id": 23,
"custom_references": {},
"reversal_invoice_id": null,
"reversed_invoice_id": 911,
"services_performed_at": "2016-11-30",
"recipient_type": "Organization",
"recipient_id": 7250,
"recipient": {
"id": 7250,
"name": "German Tax Office",
"tax_identifier": null,
"email": null,
"reference": "1069800",
"debitor_identifier": "10698",
"creditor_identifier": null,
"preferred_locale": null,
"created_at": "2016-12-14T08:05:33.983+01:00",
"updated_at": "2017-04-27T08:22:22.656+02:00"
},
"contact": {
"id": 1244,
"salutation": "Frau",
"name": "König",
"first_name": "Melanie",
"mobile": null,
"phone": "+4912345678",
"fax": null,
"tax_identifier": null,
"email": "melanie@example.com",
"reference": "A2NK84",
"debitor_identifier": null,
"preferred_locale": null,
"created_at": "2017-11-17T12:25:23.479+01:00",
"updated_at": "2017-11-17T12:25:23.479+01:00"
},
"address": {
"addressee": "Autohaus Müller GmbH",
"street": "Musterstraße",
"number": "123",
"addition": "",
"zip_code": "12345",
"town": "Musterstadt",
"country_code": "DE"
},
"line_items": [
{
"id": 994,
"invoice_id": 912,
"description": "Broschüre (Rückendrahtheftung)\nUmschlag:\n\tSeiten: 4\n\tGeschlossenes Format: A4\n\tOffenes Format: 420 mm × 297 mm (A3)\n\tPapier: Multiart Silk Weiß\n\tGrammatur: 250 g/m²\n\tFarben: CMYK / CMYK\n\tWeiterverarbeitung: Rillen, Dispersionslackieren\n\nInnenteil:\n\tSeiten: 32\n\tGeschlossenes Format: A4\n\tOffenes Format: 420 mm × 297 mm (A3)\n\tPapier: Multiart Silk Weiß\n\tGrammatur: 150 g/m²\n\tFarben: CMYK / CMYK\n\nEinhefter:\n\tSeiten: 4\n\tGeschlossenes Format: A4\n\tOffenes Format: 420 mm × 297 mm (A3)\n\tPapier: Multiart Silk Weiß\n\tGrammatur: 100 g/m²\n\tFarben: K, HKS 10 K / K, HKS 10 K\n\tWeiterverarbeitung: Perforieren\n\n\nWeiterverarbeitung: Rückendrahtheften",
"qty": 1000,
"unit": "piece",
"net_total": -241014,
"created_at": "2016-11-30T14:31:58.529+01:00",
"updated_at": "2016-11-30T14:31:58.529+01:00",
"tax_rate": "0.19",
"gross_total": "-286807.0",
"billable_id": 3261,
"billable_type": "Product",
"net": "-241.014",
"discount": "0.0",
"discounted_net_total": -241014,
"order_number": "S9-NP-4E",
"accounting_categories": [],
"environmental_certifications": []
}
]
}
]
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The collection of ReversalInvoices.
Get a single ReversalInvoice record.
get /accounting/reversal_invoices/{reversal_invoice_id}
Get a single ReversalInvoice record.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- reversal_invoice_id: required(string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- number: required(string)
If not specified, the invoice number is generated automatically.
- net_total: required(integer)
- gross_total: required(integer)
- paid_at: required(date-only)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- custom_text: required(string)
- taxes: required(object)
Contains the tax rates for each line item of the invoice
- due_at: required(date-only)
If not specified, the due date will be set automatically, based on the specified payment terms.
- printery_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- billed_at: required(date-only)
- sent_at: required(date-only)
- business_unit_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- checked_at: required(datetime)
- custom_references: required(object)
Contains up to 5 arbitrary key-value entries, for data that doesn't fit into any other category of the invoice
- reversal_invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reversed_invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- type: required(string)
- services_performed_at: required(date-only)
If not specified, the services date will be set automatically to the invoice date.
- recipient: required(object)
A
Organization
object represents a customer of a printery- name: required(string)
- email: (string)
- preferred_locale: (string)
A two-letter ISO country code, that identifies the language the person or organization prefers to be contacted with.
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- creditor_identifier: (string)
- debitor_identifier: (string)
- tax_identifier: (string)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reference: (string)
- recipient_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- recipient_type: required(string)
- address: required(object)
An
Address
object represents a postal Address- addressee: required(string)
- town: required(string)
- number: (string)
- country_code: required(string)
ISO Country code of country this address is located in.
- zip_code: required(string)
- street: (string)
- addition: (string)
An optional additional information, usually displayed right below the address.
- line_items: required(array of response.LineItem)
Items: LineItem
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- invoice_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- description: required(string)
- qty: required(integer - minimum: 1)
- unit: required(pdf piece plate sheet folded_sheet meter sqmeter sqmillimeter millimeter liter milliliter gram kilogram ream minutes hours)
- net_total: required(integer)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- tax_rate: required(number - minimum: 0 - maximum: 1)
- gross_total: required(number)
- billable_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- billable_type: required(string)
- net: required(number)
For credit notes net, must be less than or equal to 0
- discount: required(number)
- discounted_net_total: required(integer)
- order_number: required(string)
- accounting_category_ids: required(array of any)
- environmental_certifications: required(string)
- id: required(integer - minimum: 1)
Example:
{
"id": 13668,
"number": "180411002",
"net_total": -96411,
"gross_total": -114729,
"paid_at": null,
"created_at": "2018-04-11T10:27:54.298+02:00",
"updated_at": "2018-04-11T10:27:54.356+02:00",
"custom_text": null,
"taxes": {
"0.19": -18318
},
"due_at": "2018-04-11",
"printery_id": 17,
"billed_at": "2018-04-11",
"sent_at": null,
"business_unit_id": 23,
"custom_references": {},
"reversal_invoice_id": null,
"reversed_invoice_id": 13569,
"services_performed_at": "2018-03-26",
"recipient_type": "Organization",
"recipient_id": 6710,
"recipient": {
"id": 6710,
"name": "Crispy",
"tax_identifier": "DE 123456789",
"email": "crispy@example.com",
"reference": "Num 12345",
"debitor_identifier": null,
"creditor_identifier": null,
"preferred_locale": null,
"created_at": "2018-07-03T11:44:52.210+02:00",
"updated_at": "2018-07-03T11:44:52.210+02:00"
},
"contact": {
"id": 1245,
"salutation": "Frau",
"name": "Schöller",
"first_name": "Maria",
"mobile": null,
"phone": null,
"fax": null,
"tax_identifier": null,
"email": "maria@example.com",
"reference": "HAXEZ3",
"debitor_identifier": null,
"preferred_locale": null,
"created_at": "2017-07-19T13:44:16.332+02:00",
"updated_at": "2017-08-30T15:40:18.054+02:00"
},
"address": {
"addressee": "Crispy Mountain GmbH",
"street": "Emmerich Josef Straße",
"number": "1a",
"addition": "",
"zip_code": "55116",
"town": "Mainz",
"country_code": "DE"
},
"line_items": [
{
"id": 19999,
"invoice_id": 13668,
"description": "Visitenkarte\nSeiten: 2\nFormat: 85 × 55 mm\nPapier: Kartei U. Leitkarte Chamois chamois\nGrammatur: 250 g/m²\nFarben: CMYK / CMYK",
"qty": 500,
"unit": "piece",
"net_total": -96411,
"created_at": "2018-04-11T10:27:54.318+02:00",
"updated_at": "2018-04-11T10:27:54.318+02:00",
"tax_rate": "0.19",
"gross_total": "-114729.0",
"billable_id": 56046,
"billable_type": "Product",
"net": "-192.821",
"discount": "0.0",
"discounted_net_total": -96411,
"order_number": "EB-9M-BR",
"accounting_categories": [],
"environmental_certifications": []
}
]
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
/customer_relations
The collection of Organizations
Get a list of all Organization objects.
Create a new Organization object.
get /customer_relations/organizations
Get a list of all Organization objects.
Keyline requires API users to authenticate before they can access any information.
HTTP status code 200
Body
Media type: application/json
Type: array of object
Items: Organization
- name: required(string)
- email: (string)
- preferred_locale: (string)
A two-letter ISO country code, that identifies the language the person or organization prefers to be contacted with.
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- creditor_identifier: (string)
- debitor_identifier: (string)
- tax_identifier: (string)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reference: (string)
Example:
[
{
"id": 7241,
"name": "Volksbank Mainz eG",
"tax_identifier": null,
"email": null,
"reference": "HCMZ19",
"debitor_identifier": null,
"creditor_identifier": null,
"preferred_locale": null,
"created_at": "2016-12-14T07:49:01.051+01:00",
"updated_at": "2016-12-14T10:47:15.384+01:00"
},
{
"id": 7250,
"name": "German Tax Office",
"tax_identifier": null,
"email": null,
"reference": "1069800",
"debitor_identifier": "10698",
"creditor_identifier": null,
"preferred_locale": null,
"created_at": "2016-12-14T08:05:33.983+01:00",
"updated_at": "2017-04-27T08:22:22.656+02:00"
},
{
"id": 6710,
"name": "Crispy",
"tax_identifier": "DE 123456789",
"email": "crispy@example.com",
"reference": "Num 12345",
"debitor_identifier": "",
"creditor_identifier": null,
"preferred_locale": null,
"created_at": "2018-07-03T11:44:52.210+02:00",
"updated_at": "2018-07-03T11:44:52.210+02:00"
}
]
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
post /customer_relations/organizations
Create a new Organization object.
Keyline requires API users to authenticate before they can access any information.
Body
Media type: application/json
Type: object
Properties- organization: required(object)
- name: (string)
- reference: (string)
- email: (string)
- tax_identifier: (string)
- debitor_identifier: (string)
- creditor_identifier: (string)
- preferred_locale: (string)
Example:
{
"organization": {
"name": "Crispy",
"reference": "Num 12345",
"email": "crispy@example.com",
"tax_identifier": "DE 123456789"
}
}
HTTP status code 201
This response is returned if creating a new Organization was successful.
Body
Media type: application/json
Type: object
Properties- name: required(string)
- email: (string)
- preferred_locale: (string)
A two-letter ISO country code, that identifies the language the person or organization prefers to be contacted with.
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- creditor_identifier: (string)
- debitor_identifier: (string)
- tax_identifier: (string)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reference: (string)
Example:
{
"id": 6710,
"name": "Crispy",
"tax_identifier": "DE 123456789",
"email": "crispy@example.com",
"reference": "Num 12345",
"debitor_identifier": null,
"creditor_identifier": null,
"preferred_locale": null,
"created_at": "2018-07-03T11:44:52.210+02:00",
"updated_at": "2018-07-03T11:44:52.210+02:00"
}
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The collection of Organizations.
Get a single Organization record.
Update the given Organization record with provided data.
get /customer_relations/organizations/{organization_id}
Get a single Organization record.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- organization_id: required(string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- name: required(string)
- email: (string)
- preferred_locale: (string)
A two-letter ISO country code, that identifies the language the person or organization prefers to be contacted with.
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- creditor_identifier: (string)
- debitor_identifier: (string)
- tax_identifier: (string)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reference: (string)
Example:
{
"id": 6710,
"name": "Crispy",
"tax_identifier": "DE 123456789",
"email": "crispy@example.com",
"reference": "Num 12345",
"debitor_identifier": null,
"creditor_identifier": null,
"preferred_locale": null,
"created_at": "2018-07-03T11:44:52.210+02:00",
"updated_at": "2018-07-03T11:44:52.210+02:00"
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
patch /customer_relations/organizations/{organization_id}
Update the given Organization record with provided data.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- organization_id: required(string)
Body
Media type: application/json
Type: object
Properties- organization: required(object)
- name: (string)
- reference: (string)
- email: (string)
- tax_identifier: (string)
- debitor_identifier: (string)
- creditor_identifier: (string)
- preferred_locale: (string)
Example:
{
"organization": {
"name": "Crispy",
"reference": "Num 12345",
"email": "crispy@example.com",
"tax_identifier": "DE 123456789"
}
}
HTTP status code 204
Returned if the record was successfully updated.
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The collection of People
Get a list of all Person objects.
Create a new Person object.
get /customer_relations/organizations/{organization_id}/people
Get a list of all Person objects.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- organization_id: required(string)
HTTP status code 200
Body
Media type: application/json
Type: array of object
Items: Person
- salutation: required(string)
- first_name: required(string)
- name: required(string)
- email: (string)
- phone: (string)
- fax: (string)
- mobile: (string)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- debitor_identifier: (string)
- tax_identifier: (string)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reference: (string)
- preferred_locale: (string)
A two-letter ISO country code, that identifies the language the person or organization prefers to be contacted with.
Example:
[
{
"id": 1245,
"salutation": "Frau",
"name": "Schöller",
"first_name": "Maria",
"mobile": null,
"phone": null,
"fax": null,
"tax_identifier": null,
"email": "maria@example.com",
"reference": "HAXEZ3",
"debitor_identifier": null,
"preferred_locale": null,
"created_at": "2017-07-19T13:44:16.332+02:00",
"updated_at": "2017-08-30T15:40:18.054+02:00"
},
{
"id": 1244,
"salutation": "Frau",
"name": "König",
"first_name": "Melanie",
"mobile": null,
"phone": "+4912345678",
"fax": null,
"tax_identifier": null,
"email": "melanie@example.com",
"reference": "A2NK84",
"debitor_identifier": null,
"preferred_locale": null,
"created_at": "2017-11-17T12:25:23.479+01:00",
"updated_at": "2017-11-17T12:25:23.479+01:00"
},
{
"id": 1243,
"salutation": "Herr Dr.",
"name": "Christian",
"first_name": "Weyer",
"mobile": null,
"phone": null,
"fax": null,
"tax_identifier": null,
"email": "w@example.com",
"reference": "643D8V",
"debitor_identifier": null,
"preferred_locale": null,
"created_at": "2016-12-14T07:50:45.625+01:00",
"updated_at": "2016-12-14T08:55:54.524+01:00"
}
]
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
post /customer_relations/organizations/{organization_id}/people
Create a new Person object.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- organization_id: required(string)
Body
Media type: application/json
Type: object
Properties- person: required(object)
- salutation: (string)
- first_name: required(string)
- name: required(string)
- email: required(string)
- phone: (string)
- fax: (string)
- mobile: (string)
- debitor_identifier: (string)
- preferred_locale: (string)
- tax_identifier: (string)
- reference: (string)
Example:
{
"person": {
"salutation": "Frau",
"name": "Schöller",
"first_name": "Maria",
"mobile": null,
"phone": "+4912345678",
"fax": null,
"tax_identifier": null,
"email": "maria@example.com",
"reference": "HAXEZ3",
"debitor_identifier": null,
"preferred_locale": null
}
}
HTTP status code 201
This response is returned if creating a new Person was successful.
Body
Media type: application/json
Type: object
Properties- salutation: required(string)
- first_name: required(string)
- name: required(string)
- email: (string)
- phone: (string)
- fax: (string)
- mobile: (string)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- debitor_identifier: (string)
- tax_identifier: (string)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reference: (string)
- preferred_locale: (string)
A two-letter ISO country code, that identifies the language the person or organization prefers to be contacted with.
Example:
{
"id": 1245,
"salutation": "Frau",
"name": "Schöller",
"first_name": "Maria",
"mobile": null,
"phone": null,
"fax": null,
"tax_identifier": null,
"email": "maria@example.com",
"reference": "HAXEZ3",
"debitor_identifier": null,
"preferred_locale": null,
"created_at": "2017-07-19T13:44:16.332+02:00",
"updated_at": "2017-08-30T15:40:18.054+02:00"
}
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The collection of People.
Get a single Person record.
Update the given Person record with provided data.
Delete the given Person record.
get /customer_relations/organizations/{organization_id}/people/{person_id}
Get a single Person record.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- organization_id: required(string)
- person_id: required(string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- salutation: required(string)
- first_name: required(string)
- name: required(string)
- email: (string)
- phone: (string)
- fax: (string)
- mobile: (string)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- debitor_identifier: (string)
- tax_identifier: (string)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reference: (string)
- preferred_locale: (string)
A two-letter ISO country code, that identifies the language the person or organization prefers to be contacted with.
Example:
{
"id": 1245,
"salutation": "Frau",
"name": "Schöller",
"first_name": "Maria",
"mobile": null,
"phone": null,
"fax": null,
"tax_identifier": null,
"email": "maria@example.com",
"reference": "HAXEZ3",
"debitor_identifier": null,
"preferred_locale": null,
"created_at": "2017-07-19T13:44:16.332+02:00",
"updated_at": "2017-08-30T15:40:18.054+02:00"
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
patch /customer_relations/organizations/{organization_id}/people/{person_id}
Update the given Person record with provided data.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- organization_id: required(string)
- person_id: required(string)
Body
Media type: application/json
Type: object
Properties- person: required(object)
- salutation: (string)
- first_name: required(string)
- name: required(string)
- email: required(string)
- phone: (string)
- fax: (string)
- mobile: (string)
- debitor_identifier: (string)
- preferred_locale: (string)
- tax_identifier: (string)
- reference: (string)
Example:
{
"person": {
"salutation": "Frau",
"name": "Schöller",
"first_name": "Maria",
"mobile": null,
"phone": "+4912345678",
"fax": null,
"tax_identifier": null,
"email": "maria@example.com",
"reference": "HAXEZ3",
"debitor_identifier": null,
"preferred_locale": null
}
}
HTTP status code 204
Returned if the record was successfully updated.
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
delete /customer_relations/organizations/{organization_id}/people/{person_id}
Delete the given Person record.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- organization_id: required(string)
- person_id: required(string)
HTTP status code 204
Returned if the record was successfully deleted.
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
/configuration
The collection of BusinessUnits
Get a list of all BusinessUnit objects.
get /configuration/business_units
Get a list of all BusinessUnit objects.
Keyline requires API users to authenticate before they can access any information.
HTTP status code 200
Body
Media type: application/json
Type: array of object
Items: BusinessUnit
- name: required(string)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- printery_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- address: required(object)
An
Address
object represents a postal Address- addressee: required(string)
- town: required(string)
- number: (string)
- country_code: required(string)
ISO Country code of country this address is located in.
- zip_code: required(string)
- street: (string)
- addition: (string)
An optional additional information, usually displayed right below the address.
- invoice_reply_to_email: (string)
- offer_reply_to_email: (string)
- material_delivery_reply_to_email: (string)
- archive_email: (string)
- terms: (string)
- additional_document_information: (string)
- email_signature: (string)
- send_email_copies: required(boolean)
- order_confirmation: required(one of automatically, manually, disabled)
Example:
[
{
"id": 29,
"name": "Druckmanufaktur",
"printery_id": 17,
"invoice_reply_to_email": null,
"offer_reply_to_email": null,
"material_delivery_reply_to_email": null,
"terms": null,
"additional_document_information": null,
"send_email_copies": false,
"email_signature": null,
"order_confirmation": "automatically",
"archive_email": null,
"created_at": "2016-07-11T12:59:00.208Z",
"updated_at": "2016-07-11T12:59:00.208Z",
"address": {
"id": 633,
"addressee": "Manufaktur GmbH",
"street": "Musterstraße",
"number": "12",
"addition": null,
"zip_code": "12345",
"town": "Neustadt",
"country_code": "DE",
"fingerprint": "255c26145631a4917c20510807750806",
"created_at": "2016-07-26T07:36:38.954Z",
"updated_at": "2016-07-26T07:36:38.954Z"
}
},
{
"id": 23,
"name": "Druckerei Crispy",
"printery_id": 17,
"invoice_reply_to_email": null,
"offer_reply_to_email": null,
"material_delivery_reply_to_email": null,
"terms": "I. Geltungsbereich/VertragsschlussAufträge",
"additional_document_information": null,
"send_email_copies": false,
"email_signature": null,
"order_confirmation": "automatically",
"archive_email": null,
"created_at": "2016-05-30T07:30:51.188Z",
"updated_at": "2018-05-09T10:41:31.691Z",
"address": {
"id": 552,
"addressee": "Keyline Druckerei GmbH",
"street": "Hauptstraße",
"number": "1",
"addition": null,
"zip_code": "12345",
"town": "Neustadt",
"country_code": "DE",
"fingerprint": "43092e95f3dc576800004b4e8534d372",
"created_at": "2016-07-11T18:36:23.326Z",
"updated_at": "2018-02-07T07:45:42.680Z"
}
},
{
"id": 50,
"name": "Crispy OnlineDruck",
"printery_id": 17,
"invoice_reply_to_email": null,
"offer_reply_to_email": null,
"material_delivery_reply_to_email": null,
"terms": null,
"additional_document_information": null,
"send_email_copies": false,
"email_signature": null,
"order_confirmation": "automatically",
"archive_email": null,
"created_at": "2016-10-15T10:35:12.024Z",
"updated_at": "2017-03-14T09:23:10.744Z",
"address": null
}
]
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The collection of BusinessUnits.
Get a single BusinessUnit record.
get /configuration/business_units/{business_unit_id}
Get a single BusinessUnit record.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- business_unit_id: required(string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- name: required(string)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- printery_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- address: required(object)
An
Address
object represents a postal Address- addressee: required(string)
- town: required(string)
- number: (string)
- country_code: required(string)
ISO Country code of country this address is located in.
- zip_code: required(string)
- street: (string)
- addition: (string)
An optional additional information, usually displayed right below the address.
- invoice_reply_to_email: (string)
- offer_reply_to_email: (string)
- material_delivery_reply_to_email: (string)
- archive_email: (string)
- terms: (string)
- additional_document_information: (string)
- email_signature: (string)
- send_email_copies: required(boolean)
- order_confirmation: required(one of automatically, manually, disabled)
Example:
{
"id": 29,
"name": "Druckmanufaktur",
"printery_id": 17,
"invoice_reply_to_email": null,
"offer_reply_to_email": "",
"material_delivery_reply_to_email": "",
"terms": null,
"additional_document_information": null,
"send_email_copies": false,
"email_signature": null,
"order_confirmation": "automatically",
"archive_email": null,
"created_at": "2016-07-11T12:59:00.208Z",
"updated_at": "2016-07-11T12:59:00.208Z",
"address": {
"id": 633,
"addressee": "Manufaktur GmbH",
"street": "Musterstraße",
"number": "12",
"addition": null,
"zip_code": "12345",
"town": "Neustadt",
"country_code": "DE",
"fingerprint": "255c26145631a4917c20510807750806",
"created_at": "2016-07-26T07:36:38.954Z",
"updated_at": "2016-07-26T07:36:38.954Z"
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The collection of Carriers
Get a list of all Carrier objects.
Create a new Carrier object.
get /configuration/business_units/{business_unit_id}/carriers
Get a list of all Carrier objects.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- business_unit_id: required(string)
HTTP status code 200
Body
Media type: application/json
Type: array of object
Items: Carrier
- name: required(string)
- service: required(string)
- automated_labels: required(boolean)
- bill_individual_parcels: required(boolean)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
Example:
[
{
"id": 18,
"name": "Selbstauslieferung",
"service": "Standard",
"automated_labels": false,
"bill_individual_parcels": false,
"created_at": "2016-10-11T20:07:35.966Z",
"updated_at": "2018-07-29T16:04:53.562Z"
},
{
"id": 12,
"name": "DHL",
"service": "Standard",
"automated_labels": true,
"bill_individual_parcels": false,
"created_at": "2016-09-26T11:05:48.887Z",
"updated_at": "2018-10-02T06:48:41.847Z"
},
{
"id": 17,
"name": "UPS",
"service": "Standard",
"automated_labels": true,
"bill_individual_parcels": false,
"created_at": "2016-10-11T20:07:26.205Z",
"updated_at": "2018-10-02T06:48:41.912Z"
}
]
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
post /configuration/business_units/{business_unit_id}/carriers
Create a new Carrier object.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- business_unit_id: required(string)
Body
Media type: application/json
Type: object
Properties- name: required(string)
Name of the carrier, which must be one of a pre-defined list of carriers, which is specific to the country the printery operates in.
- service: required(string)
Specifies which service of the Carrier, which is given in
name
, should be used when this carrier instance is selected for sending a shipment. This depends on the country the printery operates in and the carrier, but is usually one of the following values: 'Standard', 'Express', 'Morning Express' - automated_labels: (boolean)
- bill_individual_parcels: (boolean)
- supported_countries: required(array of string)
List of ISO Country codes to which this carrier will be able to send shipments to.
Example:
{
"carrier": {
"name": "DHL",
"service": "Standard",
"supported_countries": ["DE"]
}
}
HTTP status code 201
This response is returned if creating a new Carrier was successful.
Body
Media type: application/json
Type: object
Properties- name: required(string)
- service: required(string)
- automated_labels: required(boolean)
- bill_individual_parcels: required(boolean)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
Example:
{
"id": 12,
"name": "DHL",
"service": "Standard",
"automated_labels": true,
"bill_individual_parcels": false,
"created_at": "2016-09-26T11:05:48.887Z",
"updated_at": "2018-10-02T06:48:41.847Z"
}
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The collection of Carriers.
Get a single Carrier record.
Update the given Carrier record with provided data.
Delete the given Carrier record.
get /configuration/business_units/{business_unit_id}/carriers/{carrier_id}
Get a single Carrier record.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- business_unit_id: required(string)
- carrier_id: required(string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- name: required(string)
- service: required(string)
- automated_labels: required(boolean)
- bill_individual_parcels: required(boolean)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
Example:
{
"id": 12,
"name": "DHL",
"service": "Standard",
"automated_labels": true,
"bill_individual_parcels": false,
"created_at": "2016-09-26T11:05:48.887Z",
"updated_at": "2018-10-02T06:48:41.847Z"
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
patch /configuration/business_units/{business_unit_id}/carriers/{carrier_id}
Update the given Carrier record with provided data.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- business_unit_id: required(string)
- carrier_id: required(string)
Body
Media type: application/json
Type: object
Properties- name: required(string)
Name of the carrier, which must be one of a pre-defined list of carriers, which is specific to the country the printery operates in.
- service: required(string)
Specifies which service of the Carrier, which is given in
name
, should be used when this carrier instance is selected for sending a shipment. This depends on the country the printery operates in and the carrier, but is usually one of the following values: 'Standard', 'Express', 'Morning Express' - automated_labels: (boolean)
- bill_individual_parcels: (boolean)
- supported_countries: required(array of string)
List of ISO Country codes to which this carrier will be able to send shipments to.
Example:
{
"carrier": {
"name": "DHL",
"service": "Standard",
"supported_countries": ["DE"]
}
}
HTTP status code 204
Returned if the record was successfully updated.
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
delete /configuration/business_units/{business_unit_id}/carriers/{carrier_id}
Delete the given Carrier record.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- business_unit_id: required(string)
- carrier_id: required(string)
HTTP status code 204
Returned if the record was successfully deleted.
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The collection of StockFinishings
Get a list of all StockFinishing objects.
get /configuration/stock_finishings
Get a list of all StockFinishing objects.
Keyline requires API users to authenticate before they can access any information.
HTTP status code 200
Body
Media type: application/json
Type: array of object
Items: Stock Finishing
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- kind: required(string)
- permitted_finishable_type: required(one of product, component, any)
To what kind of object can this finishing be applied? A
Product
orComponent
only, or any kind. - properties: required(array of response.FinishingProperty)
Items: Finishing Property
- key: required(string)
- show_to_customer: required(boolean)
- kind: required(one of boolean, integer, float, string)
- unit: required(one of pdf, piece, plate, sheet, folded_sheet, meter, sqmeter, sqmillimeter, millimeter, liter, milliliter, gram, kilogram, ream)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- common: required(boolean)
Example:
[
{
"id": 628,
"kind": "Cellophaning",
"permitted_finishable_type": "any",
"properties": [
{
"key": "Both sides",
"kind": "boolean",
"show_to_customer": false
}
],
"created_at": "2018-02-01T08:54:37.216Z",
"updated_at": "2018-02-01T10:40:03.001Z",
"common": true
},
{
"id": 627,
"kind": "Chipping",
"permitted_finishable_type": "any",
"properties": [],
"created_at": "2018-02-01T07:50:57.734Z",
"updated_at": "2018-02-01T07:50:57.734Z",
"common": true
},
{
"id": 634,
"kind": "Collecting",
"permitted_finishable_type": "any",
"properties": [],
"created_at": "2018-02-01T10:39:32.100Z",
"updated_at": "2018-02-01T10:39:32.100Z",
"common": true
},
{
"id": 617,
"kind": "Concealing",
"permitted_finishable_type": "any",
"properties": [],
"created_at": "2018-02-01T07:34:39.138Z",
"updated_at": "2018-02-01T07:34:53.163Z",
"common": true
},
{
"id": 611,
"kind": "Corner rounding",
"permitted_finishable_type": "any",
"properties": [
{
"key": "Number of corners",
"kind": "integer",
"unit": "piece",
"show_to_customer": false
}
],
"created_at": "2018-02-01T07:27:29.312Z",
"updated_at": "2018-02-01T07:28:05.249Z",
"common": true
},
{
"id": 623,
"kind": "Creasing",
"permitted_finishable_type": "any",
"properties": [
{
"key": "Number of creasing rules",
"kind": "integer",
"unit": "piece",
"show_to_customer": false
}
],
"created_at": "2018-02-01T07:46:25.684Z",
"updated_at": "2018-02-01T07:48:30.130Z",
"common": true
},
{
"id": 610,
"kind": "Dispersion coating",
"permitted_finishable_type": "any",
"properties": [
{
"key": "Both sides",
"kind": "boolean",
"show_to_customer": false
}
],
"created_at": "2018-02-01T07:26:30.721Z",
"updated_at": "2018-02-01T07:30:23.004Z",
"common": true
},
{
"id": 532,
"kind": "Drilling",
"permitted_finishable_type": "any",
"properties": [
{
"key": "Number of holes",
"kind": "integer",
"unit": "piece",
"show_to_customer": false
}
],
"created_at": "2017-11-15T11:46:57.146Z",
"updated_at": "2018-02-01T07:18:24.983Z",
"common": true
},
{
"id": 607,
"kind": "Embossing",
"permitted_finishable_type": "any",
"properties": [
{
"key": "Costs per embossing stamp",
"kind": "float",
"show_to_customer": false
}
],
"created_at": "2018-02-01T07:17:13.441Z",
"updated_at": "2018-02-01T07:18:04.204Z",
"common": true
},
{
"id": 619,
"kind": "Eyelet binding",
"permitted_finishable_type": "any",
"properties": [
{
"key": "Number of eyelets",
"kind": "integer",
"unit": "piece",
"show_to_customer": false
}
],
"created_at": "2018-02-01T07:38:34.090Z",
"updated_at": "2018-02-01T07:39:01.151Z",
"common": true
},
{
"id": 608,
"kind": "Foil embossing",
"permitted_finishable_type": "any",
"properties": [
{
"key": "Costs per embossing stamp",
"kind": "float",
"show_to_customer": false
},
{
"key": "Embossing area",
"kind": "float",
"unit": "sqmillimeter",
"show_to_customer": false
}
],
"created_at": "2018-02-01T07:18:42.585Z",
"updated_at": "2018-02-01T07:20:04.464Z",
"common": true
},
{
"id": 614,
"kind": "Glueing",
"permitted_finishable_type": "any",
"properties": [],
"created_at": "2018-02-01T07:31:46.318Z",
"updated_at": "2018-02-01T07:32:00.425Z",
"common": true
},
{
"id": 609,
"kind": "Laminating",
"permitted_finishable_type": "any",
"properties": [
{
"key": "Both sides",
"kind": "boolean",
"show_to_customer": false
}
],
"created_at": "2018-02-01T07:20:37.828Z",
"updated_at": "2018-02-01T07:30:42.497Z",
"common": true
},
{
"id": 632,
"kind": "Numbering",
"permitted_finishable_type": "any",
"properties": [],
"created_at": "2018-02-01T10:38:42.281Z",
"updated_at": "2018-02-01T10:38:49.758Z",
"common": true
},
{
"id": 613,
"kind": "Perfect binding",
"permitted_finishable_type": "any",
"properties": [],
"created_at": "2018-02-01T07:31:06.078Z",
"updated_at": "2018-02-01T07:31:27.336Z",
"common": true
},
{
"id": 533,
"kind": "Perforating",
"permitted_finishable_type": "any",
"properties": [
{
"key": "Number of perforation lines",
"kind": "integer",
"unit": "piece",
"show_to_customer": false
}
],
"created_at": "2017-11-15T11:59:34.318Z",
"updated_at": "2018-02-01T07:48:58.589Z",
"common": true
},
{
"id": 620,
"kind": "Punching",
"permitted_finishable_type": "any",
"properties": [
{
"key": "Costs per punch form",
"kind": "float",
"show_to_customer": false
}
],
"created_at": "2018-02-01T07:39:57.872Z",
"updated_at": "2018-02-01T07:40:38.822Z",
"common": true
},
{
"id": 615,
"kind": "Punch numbering",
"permitted_finishable_type": "any",
"properties": [],
"created_at": "2018-02-01T07:33:24.399Z",
"updated_at": "2018-02-01T07:33:38.735Z",
"common": true
},
{
"id": 621,
"kind": "Saddle stitching",
"permitted_finishable_type": "any",
"properties": [
{
"key": "Number of stitchings",
"kind": "integer",
"unit": "piece",
"show_to_customer": false
}
],
"created_at": "2018-02-01T07:40:58.742Z",
"updated_at": "2018-02-01T15:46:09.246Z",
"common": true
},
{
"id": 612,
"kind": "Shrink wrapping",
"permitted_finishable_type": "any",
"properties": [],
"created_at": "2018-02-01T07:28:27.780Z",
"updated_at": "2018-02-01T08:55:05.120Z",
"common": true
},
{
"id": 624,
"kind": "Spiral binding",
"permitted_finishable_type": "any",
"properties": [],
"created_at": "2018-02-01T07:49:37.327Z",
"updated_at": "2018-02-01T07:49:46.892Z",
"common": true
},
{
"id": 625,
"kind": "Thermo binding",
"permitted_finishable_type": "any",
"properties": [],
"created_at": "2018-02-01T07:50:34.325Z",
"updated_at": "2018-02-01T07:50:34.325Z",
"common": true
},
{
"id": 618,
"kind": "Thread stitching",
"permitted_finishable_type": "any",
"properties": [],
"created_at": "2018-02-01T07:37:45.372Z",
"updated_at": "2018-02-01T07:37:55.546Z",
"common": true
},
{
"id": 622,
"kind": "UV coating",
"permitted_finishable_type": "any",
"properties": [
{
"key": "Both sides",
"kind": "boolean",
"show_to_customer": false
}
],
"created_at": "2018-02-01T07:45:33.649Z",
"updated_at": "2018-02-01T07:45:44.197Z",
"common": true
},
{
"id": 543,
"kind": "Varnishing",
"permitted_finishable_type": "any",
"properties": [
{
"key": "Both sides",
"kind": "boolean",
"show_to_customer": false
}
],
"created_at": "2017-11-24T10:13:11.424Z",
"updated_at": "2018-02-01T10:37:13.158Z",
"common": true
},
{
"id": 630,
"kind": "Wire-o binding",
"permitted_finishable_type": "any",
"properties": [],
"created_at": "2018-02-01T10:37:21.870Z",
"updated_at": "2018-02-01T10:37:35.640Z",
"common": true
}
]
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The collection of StockSubstrates
Get a list of all StockSubstrate objects.
Create a new StockSubstrate object.
get /configuration/stock_substrates
Get a list of all StockSubstrate objects.
Keyline requires API users to authenticate before they can access any information.
HTTP status code 200
Body
Media type: application/json
Type: array of object
Items: Stock Substrate
- name: required(string)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- material_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- dimensions: required(array of integer - minItems: 2 - maxItems: 2)
The dimensions of the paper in mm, where the first element of the array is the
width
and the second beingheight
. - grain: (one of long, short)
- grammage: required(integer - minimum: 1)
Grammage of the paper (in gsm)
- color_saturation: required(number - minimum: 0)
- color: required(string)
A string describing the color. These are usually not comparable across suppliers.
- thickness: (integer)
- category: (string)
Describes the category of substrate that is represented by this object as a string.
- kind: (string)
Describes the kind of substrate that is represented by this object as a string.
- environmental_certification: (one of PEFC 70%, PEFC 75%, PEFC 80%, PEFC 94%, PEFC 100%, FSC 30%, FSC 50%, FSC 70%, FSC 80%, FSC 100%, FSC Mix Credit, FSC Mix 30%, FSC Mix 50%, FSC Mix 70%, FSC Mix 80%, FSC Recycled Credit, FSC Recycled 30%, FSC Recycled 50%, FSC Recycled 60%, FSC Recycled 70%, FSC Recycled 75%, FSC Recycled 80%, FSC Recycled 85%, FSC Recycled 95%, FSC Recycled 100%)
- texture: (string)
A string describing the texture of the substrate. These are usually not comparable across suppliers.
- delivered_precut: (boolean)
Example:
[
{
"id": 20083,
"name": "Affichenpapier Rs Blau",
"dimensions": [
630,
880
],
"grain": "long",
"grammage": 115,
"color_saturation": null,
"color": "weiß",
"thickness": null,
"category": "Bilderdruckpapier",
"kind": "sheet",
"environmental_certification": null,
"texture": null,
"delivered_precut": false,
"created_at": "2016-09-06T16:48:25.349+02:00",
"updated_at": "2017-07-19T13:37:26.226+02:00",
"material_id": 69557,
},
{
"id": 15078,
"name": "Alaska Plus",
"dimensions": [
720,
1020
],
"grain": "long",
"grammage": 235,
"color_saturation": null,
"color": "weiß",
"thickness": null,
"category": "Naturpapier matt",
"kind": "sheet",
"environmental_certification": null,
"texture": null,
"delivered_precut": false,
"created_at": "2016-08-31T23:05:50.383+02:00",
"updated_at": "2017-03-24T15:15:12.102+01:00",
"material_id": 69224,
},
{
"id": 15082,
"name": "Alaska Plus",
"dimensions": [
720,
1020
],
"grain": "long",
"grammage": 280,
"color_saturation": null,
"color": "weiß",
"thickness": null,
"category": "Naturpapier matt",
"kind": "sheet",
"environmental_certification": null,
"texture": null,
"delivered_precut": false,
"created_at": "2016-08-31T23:05:51.751+02:00",
"updated_at": "2017-03-24T15:15:13.030+01:00",
"material_id": 69228,
},
{
"id": 15083,
"name": "Alaska Plus",
"dimensions": [
1020,
720
],
"grain": "short",
"grammage": 280,
"color_saturation": null,
"color": "weiß",
"thickness": null,
"category": "Naturpapier matt",
"kind": "sheet",
"environmental_certification": null,
"texture": null,
"delivered_precut": false,
"created_at": "2016-08-31T23:05:52.090+02:00",
"updated_at": "2017-03-24T15:15:13.273+01:00",
"material_id": 69229,
},
{
"id": 21690,
"name": "Algro Design",
"dimensions": [
720,
1020
],
"grain": "long",
"grammage": 160,
"color_saturation": null,
"color": "weiß",
"thickness": 181,
"category": null,
"kind": "sheet",
"environmental_certification": "FSC Mix Credit",
"texture": null,
"delivered_precut": false,
"created_at": "2016-09-06T16:55:55.649+02:00",
"updated_at": "2016-09-06T16:55:55.649+02:00",
"material_id": 70227,
}
]
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
post /configuration/stock_substrates
Create a new StockSubstrate object.
Keyline requires API users to authenticate before they can access any information.
Body
Media type: application/json
Type: object
Properties- stock_substrate: required(object)
- name: required(string)
- dimensions: required(array of integer - minItems: 2 - maxItems: 2)
The dimensions of the substrate in mm, where the first element of the array is the
width
and the second beingheight
. - grain: (one of long, short)
- grammage: required(integer - minimum: 1)
Grammage of the substrate (in gsm)
- color_saturation: (number - minimum: 0)
- color: required(string)
A string describing the color. These are usually not comparable across suppliers.
- thickness: (integer)
- category: (string)
Describes the category of the substrate that is represented by this object as a string.
- kind: (string)
Describes the kind of the substrate that is represented by this object as a string.
- environmental_certification: (one of PEFC 70%, PEFC 75%, PEFC 80%, PEFC 94%, PEFC 100%, FSC 30%, FSC 50%, FSC 70%, FSC 80%, FSC 100%, FSC Mix Credit, FSC Mix 30%, FSC Mix 50%, FSC Mix 70%, FSC Mix 80%, FSC Recycled Credit, FSC Recycled 30%, FSC Recycled 50%, FSC Recycled 60%, FSC Recycled 70%, FSC Recycled 75%, FSC Recycled 80%, FSC Recycled 85%, FSC Recycled 95%, FSC Recycled 100%)
- texture: (string)
A string describing the texture of the substrate. These are usually not comparable across suppliers.
- delivered_precut: (boolean)
Example:
{
"stock_substrate": {
"name": "Conqueror Cx22",
"dimensions": [640, 450],
"category": "Naturpapier matt",
"grain": null,
"color": "Brilliant White",
"grammage": 100,
"thickness": 0
}
}
HTTP status code 201
This response is returned if creating a new StockSubstrate was successful.
Body
Media type: application/json
Type: object
Properties- name: required(string)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- material_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- dimensions: required(array of integer - minItems: 2 - maxItems: 2)
The dimensions of the paper in mm, where the first element of the array is the
width
and the second beingheight
. - grain: (one of long, short)
- grammage: required(integer - minimum: 1)
Grammage of the paper (in gsm)
- color_saturation: required(number - minimum: 0)
- color: required(string)
A string describing the color. These are usually not comparable across suppliers.
- thickness: (integer)
- category: (string)
Describes the category of substrate that is represented by this object as a string.
- kind: (string)
Describes the kind of substrate that is represented by this object as a string.
- environmental_certification: (one of PEFC 70%, PEFC 75%, PEFC 80%, PEFC 94%, PEFC 100%, FSC 30%, FSC 50%, FSC 70%, FSC 80%, FSC 100%, FSC Mix Credit, FSC Mix 30%, FSC Mix 50%, FSC Mix 70%, FSC Mix 80%, FSC Recycled Credit, FSC Recycled 30%, FSC Recycled 50%, FSC Recycled 60%, FSC Recycled 70%, FSC Recycled 75%, FSC Recycled 80%, FSC Recycled 85%, FSC Recycled 95%, FSC Recycled 100%)
- texture: (string)
A string describing the texture of the substrate. These are usually not comparable across suppliers.
- delivered_precut: (boolean)
Example:
{
"id": 15078,
"name": "Alaska Plus",
"dimensions": [
720,
1020
],
"grain": "long",
"grammage": 235,
"color_saturation": null,
"color": "weiß",
"thickness": null,
"category": "Naturpapier matt",
"kind": "sheet",
"environmental_certification": null,
"texture": null,
"delivered_precut": false,
"created_at": "2016-08-31T23:05:50.383+02:00",
"updated_at": "2017-03-24T15:15:12.102+01:00",
"material_id": 69224
}
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The collection of StockSubstrates.
Get a single StockSubstrate record.
Update the given StockSubstrate record with provided data.
Delete the given StockSubstrate record.
get /configuration/stock_substrates/{stock_substrate_id}
Get a single StockSubstrate record.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- stock_substrate_id: required(string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- name: required(string)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- material_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- dimensions: required(array of integer - minItems: 2 - maxItems: 2)
The dimensions of the paper in mm, where the first element of the array is the
width
and the second beingheight
. - grain: (one of long, short)
- grammage: required(integer - minimum: 1)
Grammage of the paper (in gsm)
- color_saturation: required(number - minimum: 0)
- color: required(string)
A string describing the color. These are usually not comparable across suppliers.
- thickness: (integer)
- category: (string)
Describes the category of substrate that is represented by this object as a string.
- kind: (string)
Describes the kind of substrate that is represented by this object as a string.
- environmental_certification: (one of PEFC 70%, PEFC 75%, PEFC 80%, PEFC 94%, PEFC 100%, FSC 30%, FSC 50%, FSC 70%, FSC 80%, FSC 100%, FSC Mix Credit, FSC Mix 30%, FSC Mix 50%, FSC Mix 70%, FSC Mix 80%, FSC Recycled Credit, FSC Recycled 30%, FSC Recycled 50%, FSC Recycled 60%, FSC Recycled 70%, FSC Recycled 75%, FSC Recycled 80%, FSC Recycled 85%, FSC Recycled 95%, FSC Recycled 100%)
- texture: (string)
A string describing the texture of the substrate. These are usually not comparable across suppliers.
- delivered_precut: (boolean)
Example:
{
"id": 15078,
"name": "Alaska Plus",
"dimensions": [
720,
1020
],
"grain": "long",
"grammage": 235,
"color_saturation": null,
"color": "weiß",
"thickness": null,
"category": "Naturpapier matt",
"kind": "sheet",
"environmental_certification": null,
"texture": null,
"delivered_precut": false,
"created_at": "2016-08-31T23:05:50.383+02:00",
"updated_at": "2017-03-24T15:15:12.102+01:00",
"material_id": 69224
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
patch /configuration/stock_substrates/{stock_substrate_id}
Update the given StockSubstrate record with provided data.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- stock_substrate_id: required(string)
Body
Media type: application/json
Type: object
Properties- stock_substrate: required(object)
- name: required(string)
- dimensions: required(array of integer - minItems: 2 - maxItems: 2)
The dimensions of the substrate in mm, where the first element of the array is the
width
and the second beingheight
. - grain: (one of long, short)
- grammage: required(integer - minimum: 1)
Grammage of the substrate (in gsm)
- color_saturation: (number - minimum: 0)
- color: required(string)
A string describing the color. These are usually not comparable across suppliers.
- thickness: (integer)
- category: (string)
Describes the category of the substrate that is represented by this object as a string.
- kind: (string)
Describes the kind of the substrate that is represented by this object as a string.
- environmental_certification: (one of PEFC 70%, PEFC 75%, PEFC 80%, PEFC 94%, PEFC 100%, FSC 30%, FSC 50%, FSC 70%, FSC 80%, FSC 100%, FSC Mix Credit, FSC Mix 30%, FSC Mix 50%, FSC Mix 70%, FSC Mix 80%, FSC Recycled Credit, FSC Recycled 30%, FSC Recycled 50%, FSC Recycled 60%, FSC Recycled 70%, FSC Recycled 75%, FSC Recycled 80%, FSC Recycled 85%, FSC Recycled 95%, FSC Recycled 100%)
- texture: (string)
A string describing the texture of the substrate. These are usually not comparable across suppliers.
- delivered_precut: (boolean)
Example:
{
"stock_substrate": {
"name": "Conqueror Cx22",
"dimensions": [640, 450],
"category": "Naturpapier matt",
"grain": null,
"color": "Brilliant White",
"grammage": 100,
"thickness": 0
}
}
HTTP status code 204
Returned if the record was successfully updated.
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
delete /configuration/stock_substrates/{stock_substrate_id}
Delete the given StockSubstrate record.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- stock_substrate_id: required(string)
HTTP status code 204
Returned if the record was successfully deleted.
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
Returns all product templates that are available in the current printery.
get /configuration/product_templates
Returns all product templates that are available in the current printery.
Keyline requires API users to authenticate before they can access any information.
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- name: required(string)
- kind: required(string)
- order_number: required(string)
- description: required(string)
- automated_billing: required(boolean)
- product: required(object)
A single printed product identified by a name and made up of multiple components, which usually can be manufactured separately.
- name: required(string - minLength: 1 - maxLength: 200)
- order_id: required(integer)
The id of the order, this product belongs to.
- reference: required(string - pattern: ^[0-9A-Z]{6}$)
A 6-character, alphanumeric string, that uniquely identifies an object.
Example:
N4XTC8
- custom_references: required(object)
Contains up to 5 arbitrary key-value entries, for data that doesn't fit into any other category of the product
- state: required(one of draft, prepress, press, postpress, packing, shipping, completed, exception, canceled)
Denotes the state which the product is currently in
- kind: required(one of brochure, book, business_card, sticker, pad, pages, couvert, custom)
The kind of product
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
Example:
[
{
"id": 1,
"name": "Broschüre (Klebebindung)",
"kind": "Broschüre",
"order_number": null,
"description": null,
"automated_billing": false,
"created_at": "2017-02-14T22:56:07.379Z",
"updated_at": "2017-02-14T22:56:07.379Z",
"product": {
"id": 6039,
"order_id": null,
"reference": "MBVG1M",
"custom_references": {},
"state": "completed",
"name": "Broschüre (Klebebindung)",
"kind": "Broschüre",
"created_at": "2017-02-14T22:56:07.381Z",
"updated_at": "2017-02-14T22:56:07.381Z"
}
},
{
"id": 2,
"name": "Visitenkarte, kaschiert",
"kind": "Visitenkarte",
"order_number": null,
"description": null,
"automated_billing": false,
"created_at": "2017-02-14T22:56:07.680Z",
"updated_at": "2017-09-01T11:08:44.821Z",
"product": {
"id": 6040,
"order_id": null,
"reference": "BP3HV7",
"custom_references": {},
"state": "draft",
"name": "Visitenkarte, kaschiert",
"kind": "Visitenkarte",
"created_at": "2017-02-14T22:56:07.682Z",
"updated_at": "2017-02-14T22:56:07.682Z"
}
}
]
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
Returns all service templates that are available in the current printery. Services can be added to a product, to denote that this product needs certain services performed, e.g. 'typesetting', in order to be fully produced.
get /configuration/service_templates
Returns all service templates that are available in the current printery. Services can be added to a product, to denote that this product needs certain services performed, e.g. 'typesetting', in order to be fully produced.
Keyline requires API users to authenticate before they can access any information.
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- kind: required(string)
This describes the kind of service that is defined by this template. It must be unique within the printery, as it uniquely identifies the service template.
- category: required(one of prepress, image_editing, typesetting, layout, proofreading, digital_proof, other)
Describes which kind of service this template defines.
- unit: required(one of hours, minutes, pieces)
Denotes which unit the costs are given in.
- costs_per_unit: required(integer)
The costs per unit, given in the smallest unit currency of the printery ('cents' in case of EUR).
- completion_required_for: required(one of none, prepress, press, postpress)
If a service that is derived from a service template that has
completion_required_for
set to some other value thannone
is added to a product, then production of the product will be halted at the respective stage, until the task for this service is marked as completed.
This effectively makes services based on this service template a kind of quality gate. - created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
Example:
[
{
"id": 1,
"kind": "DTP",
"category": "layout",
"unit": "hours",
"costs_per_unit": 3000,
"completion_required_for": "none",
"created_at": "2017-11-09T09:02:19.975Z",
"updated_at": "2017-11-09T10:07:05.520Z"
},
{
"id": 2,
"kind": "Bildrecherche",
"category": "image_editing",
"unit": "hours",
"costs_per_unit": 2000,
"completion_required_for": "none",
"created_at": "2017-11-09T10:02:48.031Z",
"updated_at": "2017-11-09T10:06:50.592Z"
},
{
"id": 3,
"kind": "Bildbearbeitung",
"category": "image_editing",
"unit": "hours",
"costs_per_unit": 1000,
"completion_required_for": "none",
"created_at": "2017-11-09T10:08:01.572Z",
"updated_at": "2017-11-09T10:08:01.572Z"
},
{
"id": 4,
"kind": "Druckdaten erstellen",
"category": "typesetting",
"unit": "hours",
"costs_per_unit": 1000,
"completion_required_for": "none",
"created_at": "2017-11-09T10:09:02.366Z",
"updated_at": "2017-11-09T10:09:02.366Z"
}
]
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
Returns all printery-wide settings.
get /configuration/printery
Returns all printery-wide settings.
Keyline requires API users to authenticate before they can access any information.
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- name: required(string)
- country_code: required(one of DE, AT, CH, UK, LV)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- template_access: required(one of full, just_papers_and_basics, just_basics)
- default_imposing_margin: (integer - minimum: 1 - maximum: 100)
Imposing margin that is applied to all imposings by default (in mm).
- formula_for_contribution_margin_for_inhouse_costs: (string)
- formula_for_contribution_margin_for_external_costs: (string)
- production_scheduling_days_in_advance: required(integer)
- production_scheduling_generations: required(integer)
- production_scheduling_meet_deadline_importance: required(integer)
- production_scheduling_minimize_splits_importance: required(integer)
- production_scheduling_pool_materials_importance: required(integer)
- production_scheduling_minimize_time_importance: required(integer)
Example:
{
"name": "Crispy Mountain Printery",
"country_code": "DE",
"default_imposing_margin": null,
"template_access": "full",
"created_at": "2016-05-30T09:30:51.139+02:00",
"updated_at": "2017-11-29T10:02:41.395+01:00",
"formula_for_contribution_margin_for_inhouse_costs": null,
"formula_for_contribution_margin_for_external_costs": null,
"production_scheduling_days_in_advance": 5,
"production_scheduling_generations": 25,
"production_scheduling_meet_deadline_importance": 12,
"production_scheduling_minimize_splits_importance": 12,
"production_scheduling_pool_materials_importance": 50,
"production_scheduling_minimize_time_importance": 26
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
/sales
The collection of Orders
Get a list of all orders in draft state, that is orders that haven't been confirmed by their customer yet, and for which production hasn't started yet.
Create a new Order object.
get /sales/orders
Get a list of all orders in draft state, that is orders that haven't been confirmed by their customer yet, and for which production hasn't started yet.
Keyline requires API users to authenticate before they can access any information.
HTTP status code 200
Body
Media type: application/json
Type: array of object
Items: Order
- custom_references: required(object)
Contains up to 5 arbitrary key-value entries, for data that doesn't fit into any other category of the order
- custom_offer_text: (string)
An additional string that should appear on the offer to the customer.
- due_at: (datetime)
The point in time until which the order must be delivered to the customer.
- products: required(array of response.Product)
Items: Product
- name: required(string - minLength: 1 - maxLength: 200)
- order_id: required(integer)
The id of the order, this product belongs to.
- reference: required(string - pattern: ^[0-9A-Z]{6}$)
A 6-character, alphanumeric string, that uniquely identifies an object.
Example:
N4XTC8
- custom_references: required(object)
Contains up to 5 arbitrary key-value entries, for data that doesn't fit into any other category of the product
- state: required(one of draft, prepress, press, postpress, packing, shipping, completed, exception, canceled)
Denotes the state which the product is currently in
- kind: required(one of brochure, book, business_card, sticker, pad, pages, couvert, custom)
The kind of product
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- contact: (object)
Describes a natural person
- salutation: required(string)
- first_name: required(string)
- name: required(string)
- email: (string)
- phone: (string)
- fax: (string)
- mobile: (string)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- debitor_identifier: (string)
- tax_identifier: (string)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reference: (string)
- preferred_locale: (string)
A two-letter ISO country code, that identifies the language the person or organization prefers to be contacted with.
- address: (object)
An
Address
object represents a postal Address- addressee: required(string)
- town: required(string)
- number: (string)
- country_code: required(string)
ISO Country code of country this address is located in.
- zip_code: required(string)
- street: (string)
- addition: (string)
An optional additional information, usually displayed right below the address.
- customer: (object)
A
Organization
object represents a customer of a printery- name: required(string)
- email: (string)
- preferred_locale: (string)
A two-letter ISO country code, that identifies the language the person or organization prefers to be contacted with.
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- creditor_identifier: (string)
- debitor_identifier: (string)
- tax_identifier: (string)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reference: (string)
- reference: required(string - pattern: ^[0-9A-Z]{6}$)
A 6-character, alphanumeric string, that uniquely identifies an object.
Example:
N4XTC8
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- business_unit_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
Example:
[
{
"id": 16054,
"reference": "VGQGB4",
"custom_references": {
"Besteller": "Knusper Berg"
},
"custom_offer_text": null,
"due_at": null,
"created_at": "2017-11-28T17:44:21.526+01:00",
"updated_at": "2017-12-04T08:26:14.592+01:00",
"customer_id": 6710,
"customer_type": "Organization",
"customer": {
"id": 6710,
"name": "Crispy",
"tax_identifier": "DE 123456789",
"email": "crispy@example.com",
"reference": "Num 12345",
"debitor_identifier": null,
"creditor_identifier": null,
"preferred_locale": null,
"created_at": "2018-07-03T11:44:52.210+02:00",
"updated_at": "2018-07-03T11:44:52.210+02:00"
},
"contact": {
"id": 1245,
"salutation": "Frau",
"name": "Schöller",
"first_name": "Maria",
"mobile": null,
"phone": null,
"fax": null,
"tax_identifier": null,
"email": "maria@example.com",
"reference": "HAXEZ3",
"debitor_identifier": null,
"preferred_locale": null,
"created_at": "2017-07-19T13:44:16.332+02:00",
"updated_at": "2017-08-30T15:40:18.054+02:00"
},
"address": {
"addressee": "Crispy Mountain GmbH",
"street": "Emmerich Josef Straße",
"number": "1a",
"addition": "",
"zip_code": "55116",
"town": "Mainz",
"country_code": "DE"
},
"products": [
{
"id": 23511,
"order_id": 16054,
"reference": "CHC71H",
"custom_references": {},
"state": "draft",
"name": "New Product",
"kind": "book",
"created_at": "2017-11-28T17:44:49.868+01:00",
"updated_at": "2017-11-28T17:44:49.868+01:00"
}
]
},
{
"id": 13013,
"reference": "NC8G8E",
"custom_references": {},
"custom_offer_text": null,
"due_at": null,
"created_at": "2017-10-17T11:47:54.764+02:00",
"updated_at": "2017-10-17T11:47:54.764+02:00",
"address": null,
"customer_id": null,
"customer_type": null,
"contact": null,
"products": [
{
"id": 20012,
"order_id": 13013,
"reference": "G62ZTU",
"custom_references": {},
"state": "draft",
"name": "Blatt",
"kind": "custom",
"created_at": "2017-10-17T11:48:09.478+02:00",
"updated_at": "2017-10-17T11:48:09.478+02:00"
}
]
},
{
"id": 12359,
"reference": "ZRHFZW",
"custom_references": {},
"custom_offer_text": null,
"due_at": null,
"created_at": "2017-10-04T11:49:01.273+02:00",
"updated_at": "2017-10-04T11:57:01.596+02:00",
"address": {
"addressee": "Keyline\r\nc/o Crispy Mountain GmbH",
"street": "Emmerich-Josef-Str.",
"number": "1a",
"addition": "Hinterhaus",
"zip_code": "55116",
"town": "Mainz",
"country_code": "DE"
},
"customer_id": 6710,
"customer_type": "Organization",
"customer": {
"id": 6710,
"name": "Crispy",
"tax_identifier": "DE 123456789",
"email": "crispy@example.com",
"reference": "Num 12345",
"debitor_identifier": null,
"creditor_identifier": null,
"preferred_locale": null,
"created_at": "2018-07-03T11:44:52.210+02:00",
"updated_at": "2018-07-03T11:44:52.210+02:00"
},
"contact": {
"id": 1245,
"salutation": "Frau",
"name": "Schöller",
"first_name": "Maria",
"mobile": null,
"phone": null,
"fax": null,
"tax_identifier": null,
"email": "maria@example.com",
"reference": "HAXEZ3",
"debitor_identifier": null,
"preferred_locale": null,
"created_at": "2017-07-19T13:44:16.332+02:00",
"updated_at": "2017-08-30T15:40:18.054+02:00"
},
"products": [
{
"id": 19145,
"order_id": 12359,
"reference": "K7KD1D",
"custom_references": {},
"state": "draft",
"name": "Great Stickers",
"kind": "sticker",
"created_at": "2017-10-04T11:51:40.845+02:00",
"updated_at": "2017-10-04T11:51:40.845+02:00"
}
]
},
{
"id": 12314,
"reference": "T3EPVR",
"custom_references": {},
"custom_offer_text": null,
"due_at": null,
"created_at": "2017-10-02T15:47:37.663+02:00",
"updated_at": "2017-10-02T15:47:37.663+02:00",
"address": null,
"customer": null,
"contact": null,
"products": [
{
"id": 19088,
"order_id": 12314,
"reference": "MQKX72",
"custom_references": {},
"state": "draft",
"name": "Visitenkarte",
"kind": "business_card",
"created_at": "2017-10-02T15:47:43.213+02:00",
"updated_at": "2017-10-02T15:47:43.213+02:00"
},
{
"id": 19089,
"order_id": 12314,
"reference": "8UU1DR",
"custom_references": {},
"state": "draft",
"name": "Visitenkarte (basiert auf MQKX72)",
"kind": "business_card",
"created_at": "2017-10-02T15:48:32.623+02:00",
"updated_at": "2017-10-02T15:48:32.623+02:00"
}
]
}
]
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
post /sales/orders
Create a new Order object.
Keyline requires API users to authenticate before they can access any information.
Body
Media type: application/json
Type: object
Properties- order: required(object)
- custom_references: (object)
Contains up to 5 arbitrary key-value entries, for data that doesn't fit into any other category of the order
- custom_offer_text: (string)
An additional string that should appear on the offer to the customer.
- due_at: (datetime)
The point in time until which the order must be delivered to the customer.
- business_unit_id: (integer)
The id of the business unit this order should be associated to. If not specified, the standard business unit is set.
- customer_id: (integer)
The id of the customer this order should be associated to.
- contact_id: (integer)
The id of the contact this order should be associated to.
- custom_references: (object)
Example:
{
"order": {
"custom_references": {
"Ordering Person": "Ms Stark"
},
"custom_offer_text": "This is urgent",
"due_at": "2017-12-12T17:00:00+02:00",
"customer_id": 57
}
}
HTTP status code 201
This response is returned if creating a new Order was successful.
Body
Media type: application/json
Type: object
Properties- custom_references: required(object)
Contains up to 5 arbitrary key-value entries, for data that doesn't fit into any other category of the order
- custom_offer_text: (string)
An additional string that should appear on the offer to the customer.
- due_at: (datetime)
The point in time until which the order must be delivered to the customer.
- products: required(array of response.Product)
Items: Product
- name: required(string - minLength: 1 - maxLength: 200)
- order_id: required(integer)
The id of the order, this product belongs to.
- reference: required(string - pattern: ^[0-9A-Z]{6}$)
A 6-character, alphanumeric string, that uniquely identifies an object.
Example:
N4XTC8
- custom_references: required(object)
Contains up to 5 arbitrary key-value entries, for data that doesn't fit into any other category of the product
- state: required(one of draft, prepress, press, postpress, packing, shipping, completed, exception, canceled)
Denotes the state which the product is currently in
- kind: required(one of brochure, book, business_card, sticker, pad, pages, couvert, custom)
The kind of product
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- contact: (object)
Describes a natural person
- salutation: required(string)
- first_name: required(string)
- name: required(string)
- email: (string)
- phone: (string)
- fax: (string)
- mobile: (string)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- debitor_identifier: (string)
- tax_identifier: (string)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reference: (string)
- preferred_locale: (string)
A two-letter ISO country code, that identifies the language the person or organization prefers to be contacted with.
- address: (object)
An
Address
object represents a postal Address- addressee: required(string)
- town: required(string)
- number: (string)
- country_code: required(string)
ISO Country code of country this address is located in.
- zip_code: required(string)
- street: (string)
- addition: (string)
An optional additional information, usually displayed right below the address.
- customer: (object)
A
Organization
object represents a customer of a printery- name: required(string)
- email: (string)
- preferred_locale: (string)
A two-letter ISO country code, that identifies the language the person or organization prefers to be contacted with.
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- creditor_identifier: (string)
- debitor_identifier: (string)
- tax_identifier: (string)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reference: (string)
- reference: required(string - pattern: ^[0-9A-Z]{6}$)
A 6-character, alphanumeric string, that uniquely identifies an object.
Example:
N4XTC8
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- business_unit_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
Example:
{
"id": 16054,
"reference": "VGQGB4",
"custom_references": {},
"custom_offer_text": null,
"due_at": null,
"created_at": "2017-11-28T17:44:21.526+01:00",
"updated_at": "2017-12-04T08:26:14.592+01:00",
"address": null,
"customer_id": null,
"customer_type": null,
"contact": null,
"products": []
}
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The collection of Orders.
Get details for a single order, which is in draft state, that is it hasn't been confirmed by it's customer yet and production of the order hasn't started yet.
Update details for a single draft order.
Delete a draft order.
get /sales/orders/{order_id}
Get details for a single order, which is in draft state, that is it hasn't been confirmed by it's customer yet and production of the order hasn't started yet.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- order_id: required(string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- custom_references: required(object)
Contains up to 5 arbitrary key-value entries, for data that doesn't fit into any other category of the order
- custom_offer_text: (string)
An additional string that should appear on the offer to the customer.
- due_at: (datetime)
The point in time until which the order must be delivered to the customer.
- products: required(array of response.Product)
Items: Product
- name: required(string - minLength: 1 - maxLength: 200)
- order_id: required(integer)
The id of the order, this product belongs to.
- reference: required(string - pattern: ^[0-9A-Z]{6}$)
A 6-character, alphanumeric string, that uniquely identifies an object.
Example:
N4XTC8
- custom_references: required(object)
Contains up to 5 arbitrary key-value entries, for data that doesn't fit into any other category of the product
- state: required(one of draft, prepress, press, postpress, packing, shipping, completed, exception, canceled)
Denotes the state which the product is currently in
- kind: required(one of brochure, book, business_card, sticker, pad, pages, couvert, custom)
The kind of product
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- contact: (object)
Describes a natural person
- salutation: required(string)
- first_name: required(string)
- name: required(string)
- email: (string)
- phone: (string)
- fax: (string)
- mobile: (string)
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- debitor_identifier: (string)
- tax_identifier: (string)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reference: (string)
- preferred_locale: (string)
A two-letter ISO country code, that identifies the language the person or organization prefers to be contacted with.
- address: (object)
An
Address
object represents a postal Address- addressee: required(string)
- town: required(string)
- number: (string)
- country_code: required(string)
ISO Country code of country this address is located in.
- zip_code: required(string)
- street: (string)
- addition: (string)
An optional additional information, usually displayed right below the address.
- customer: (object)
A
Organization
object represents a customer of a printery- name: required(string)
- email: (string)
- preferred_locale: (string)
A two-letter ISO country code, that identifies the language the person or organization prefers to be contacted with.
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- creditor_identifier: (string)
- debitor_identifier: (string)
- tax_identifier: (string)
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- reference: (string)
- reference: required(string - pattern: ^[0-9A-Z]{6}$)
A 6-character, alphanumeric string, that uniquely identifies an object.
Example:
N4XTC8
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- business_unit_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
Example:
{
"id": 16054,
"reference": "VGQGB4",
"custom_references": {
"Besteller": "Knusper Berg"
},
"custom_offer_text": null,
"due_at": null,
"created_at": "2017-11-28T17:44:21.526+01:00",
"updated_at": "2017-12-04T08:26:14.592+01:00",
"customer_id": 6710,
"customer_type": "Organization",
"customer": {
"id": 6710,
"name": "Crispy",
"tax_identifier": "DE 123456789",
"email": "crispy@example.com",
"reference": "Num 12345",
"debitor_identifier": null,
"creditor_identifier": null,
"preferred_locale": null,
"created_at": "2018-07-03T11:44:52.210+02:00",
"updated_at": "2018-07-03T11:44:52.210+02:00"
},
"contact": {
"id": 1245,
"salutation": "Frau",
"name": "Schöller",
"first_name": "Maria",
"mobile": null,
"phone": null,
"fax": null,
"tax_identifier": null,
"email": "maria@example.com",
"reference": "HAXEZ3",
"debitor_identifier": null,
"preferred_locale": null,
"created_at": "2017-07-19T13:44:16.332+02:00",
"updated_at": "2017-08-30T15:40:18.054+02:00"
},
"address": {
"addressee": "Crispy Mountain GmbH",
"street": "Emmerich Josef Straße",
"number": "1a",
"addition": "",
"zip_code": "55116",
"town": "Mainz",
"country_code": "DE"
},
"products": [
{
"id": 23511,
"order_id": 16054,
"reference": "CHC71H",
"custom_references": {},
"state": "draft",
"name": "New Product",
"kind": "book",
"created_at": "2017-11-28T17:44:49.868+01:00",
"updated_at": "2017-11-28T17:44:49.868+01:00"
}
]
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
patch /sales/orders/{order_id}
Update details for a single draft order.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- order_id: required(string)
Body
Media type: application/json
Type: object
Properties- order: required(object)
- custom_references: (object)
Contains up to 5 arbitrary key-value entries, for data that doesn't fit into any other category of the order
- custom_offer_text: (string)
An additional string that should appear on the offer to the customer.
- due_at: (datetime)
The point in time until which the order must be delivered to the customer.
- business_unit_id: (integer)
The id of the business unit this order should be associated to. If not specified, the standard business unit is set.
- customer_id: (integer)
The id of the customer this order should be associated to.
- contact_id: (integer)
The id of the contact this order should be associated to.
- custom_references: (object)
Example:
{
"order": {
"custom_references": {
"Ordering Person": "Ms Stark"
},
"custom_offer_text": "This is urgent",
"due_at": "2017-12-12T17:00:00+02:00",
"customer_id": 57
}
}
HTTP status code 204
Returned if the record was successfully updated.
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
delete /sales/orders/{order_id}
Delete a draft order.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- order_id: required(string)
HTTP status code 204
Returned if the record was successfully deleted.
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The collection of Products
Get a list of all Product objects.
Create a new Product object.
get /sales/orders/{order_id}/products
Get a list of all Product objects.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- order_id: required(string)
HTTP status code 200
Body
Media type: application/json
Type: array of object
Items: Product
- name: required(string - minLength: 1 - maxLength: 200)
- order_id: required(integer)
The id of the order, this product belongs to.
- reference: required(string - pattern: ^[0-9A-Z]{6}$)
A 6-character, alphanumeric string, that uniquely identifies an object.
Example:
N4XTC8
- custom_references: required(object)
Contains up to 5 arbitrary key-value entries, for data that doesn't fit into any other category of the product
- state: required(one of draft, prepress, press, postpress, packing, shipping, completed, exception, canceled)
Denotes the state which the product is currently in
- kind: required(one of brochure, book, business_card, sticker, pad, pages, couvert, custom)
The kind of product
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
Example:
[
{
"id": 23426,
"order_id": 15532,
"reference": "VRHKQH",
"custom_references": {},
"state": "draft",
"name": "Visitenkarte",
"kind": "business_card",
"created_at": "2017-11-28T10:21:33.329+01:00",
"updated_at": "2017-11-28T10:21:33.329+01:00"
},
{
"id": 23430,
"order_id": 15532,
"reference": "UQQV1C",
"custom_references": {},
"state": "draft",
"name": "Broschüre (Rückendrahtheftung)",
"kind": "brochure",
"created_at": "2017-11-28T10:34:11.209+01:00",
"updated_at": "2017-11-28T10:34:11.209+01:00"
}
]
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
post /sales/orders/{order_id}/products
Create a new Product object.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- order_id: required(string)
Body
Media type: application/json
Type: object
Properties- product: required(object)
Either
product_template_id
orname
have to be given when creating a product.- custom_references: (object)
Contains up to 5 arbitrary key-value entries, for data that doesn't fit into any other category of the order
- product_template_id: (integer)
The id of the pre-defined product template on which this product should be based.
- name: (string)
Name of the product being printed.
- kind: (one of brochure, book, business_card, sticker, pad, pages, couvert, custom)
Denotes the kind of product being printed.
- custom_references: (object)
Example:
{
"product": {
"name": "Great Business Cards",
"kind": "business_card",
"custom_references": {
"PO": "1234"
}
}
}
HTTP status code 201
This response is returned if creating a new Product was successful.
Body
Media type: application/json
Type: object
Properties- name: required(string - minLength: 1 - maxLength: 200)
- order_id: required(integer)
The id of the order, this product belongs to.
- reference: required(string - pattern: ^[0-9A-Z]{6}$)
A 6-character, alphanumeric string, that uniquely identifies an object.
Example:
N4XTC8
- custom_references: required(object)
Contains up to 5 arbitrary key-value entries, for data that doesn't fit into any other category of the product
- state: required(one of draft, prepress, press, postpress, packing, shipping, completed, exception, canceled)
Denotes the state which the product is currently in
- kind: required(one of brochure, book, business_card, sticker, pad, pages, couvert, custom)
The kind of product
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
Example:
{
"id": 25088,
"order_id": 15532,
"reference": "H9WPQ7",
"custom_references": {
"PO": "123"
},
"state": "draft",
"name": "Visitenkarte",
"kind": "business_card",
"created_at": "2017-12-11T14:39:36.904+01:00",
"updated_at": "2017-12-11T14:39:36.904+01:00"
}
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
/conception
The collection of Products.
Get details for a single product, which is in draft state, that is the order it belongs to hasn't been confirmed by it's customer yet and production hasn't started yet.
Delete a product in draft state.
Update the given Product record with provided data.
get /conception/products/{product_id}
Get details for a single product, which is in draft state, that is the order it belongs to hasn't been confirmed by it's customer yet and production hasn't started yet.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- product_id: required(string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- name: required(string - minLength: 1 - maxLength: 200)
- order_id: required(integer)
The id of the order, this product belongs to.
- reference: required(string - pattern: ^[0-9A-Z]{6}$)
A 6-character, alphanumeric string, that uniquely identifies an object.
Example:
N4XTC8
- custom_references: required(object)
Contains up to 5 arbitrary key-value entries, for data that doesn't fit into any other category of the product
- state: required(one of draft, prepress, press, postpress, packing, shipping, completed, exception, canceled)
Denotes the state which the product is currently in
- kind: required(one of brochure, book, business_card, sticker, pad, pages, couvert, custom)
The kind of product
- created_at: required(datetime)
The exact time the respective object was created.
- updated_at: required(datetime)
The exact time the respective object was last updated.
- id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
Example:
{
"id": 25088,
"order_id": 15532,
"reference": "H9WPQ7",
"custom_references": {
"PO": "123"
},
"state": "draft",
"name": "Visitenkarte",
"kind": "business_card",
"created_at": "2017-12-11T14:39:36.904+01:00",
"updated_at": "2017-12-11T14:39:36.904+01:00"
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
delete /conception/products/{product_id}
Delete a product in draft state.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- product_id: required(string)
HTTP status code 204
Returned if the record was successfully deleted.
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
patch /conception/products/{product_id}
Update the given Product record with provided data.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- product_id: required(string)
Body
Media type: application/json
Type: object
Properties- product: required(object)
Either
product_template_id
orname
have to be given when creating a product.- custom_references: (object)
Contains up to 5 arbitrary key-value entries, for data that doesn't fit into any other category of the order
- product_template_id: (integer)
The id of the pre-defined product template on which this product should be based.
- name: (string)
Name of the product being printed.
- kind: (one of brochure, book, business_card, sticker, pad, pages, couvert, custom)
Denotes the kind of product being printed.
- custom_references: (object)
Example:
{
"product": {
"name": "Great Business Cards",
"kind": "business_card",
"custom_references": {
"PO": "1234"
}
}
}
HTTP status code 204
Returned if the record was successfully updated.
HTTP status code 422
This response is returned in case the request contained invalid data.
Body
Media type: application/json
Type: object
Properties- errors: required(object)
Example:
{
"errors": {
"name": [
"is too short (minimum is 1 character)"
]
}
}
Secured by BearerToken
Headers
- Authorization: required(string - minLength: 71 - maxLength: 71 - pattern: ^Bearer [0-9a-fA-F]{64}$)
Contains the key for using the API, which prefixed with the string 'Bearer'. # Token administration You can add or revoke access tokens in Keyline in the
Settings > API
section.Example:
Bearer f338bc59b1ee082ee08600f85022cf7d661426ee342b22c73c18d3875f2e9885
HTTP status code 401
Header missing or No token provided
HTTP status code 403
Bad token.
The collection of PrintDataFiles
Get a list of all PrintDataFile objects.
Create a new PrintDataFile object.
get /conception/products/{product_id}/print_data_files
Get a list of all PrintDataFile objects.
Keyline requires API users to authenticate before they can access any information.
URI Parameters
- product_id: required(string)
HTTP status code 200
Body
Media type: application/json
Type: array of object
Items: PrintDataFile
- print_data_file: required(object)
- printable_id: required(integer - minimum: 1)
Unique identifier for every object. Is used when referencing resources in URLs.
- printable_type: required(string)
- uri: required(string)
The full URI of this print data file, including the protocol
- preview_path: (string)
The full URI of this print data file, including the protocol in a preview size
- filesize: (integer)
The size of this print data file in bytes
- last_page: (integer)
The last page inside the print data file's PDF
- printable_id: required(integer - minimum: 1)