Product components

This endpoint allows you to create, update and delete product components inside Keyline.

Attributes you send to Keyline

name string The name of the component
number_of_pages string The number of pages
production_method string The production method, the value has to be one of the following:
offset, digital
page_arrangement string The page arrangement, the value has to be one of the following:
standalone, parallel, crossover, standalone_single_motive,
parallel_single_motive, crossover_single_motive
paper string The type of paper, the value has to be one of your stock papers
closed_dimensions array [integer] The closed dimensions
front_colors array [string] The front colors, the value has to be one or more of our predefined colors
or your stock colors
back_colors array [string] The back colors, the value has to be one or more of our predefined colors
or your stock colors

Attributes Keyline sends back to you

id integer The ID of the product component that was just created
name integer The name of the component
number_of_pages integer The number of pages
closed_dimensions array [integer] The closed dimensions
production_method integer The production method
page_arrangement string The page arrangement
front_colors array [string] The front colors
back_colors array [string] The back colors
paper object The associated paper object
sheets object The associated sheet objects

Actions

Creating a product

POST
/api/v1/orders/{ORDER_ID}/products/{PRODUCT_ID}/components

Example request

$ curl -X POST -H "Authorization: Bearer 4b00c2cbffba2d16d24dd8adf0e843e6b143b54dbf800ce7ef12d431927ef63f"\
-H "Content-Type: application/json"\
-d '{ "component": {
        "name": "Keyline Cover",
        "number_of_pages": "2",
        "production_method": "offset",
        "page_arrangement": "standalone",
        "paper": "INASET PLUS matt holzfrei weiß, 70g, 430.0mm×610.0mm (Schmalbahn)",
        "closed_dimensions": [210, 297],
        "front_colors": ["CMYK/Cyan", "CMYK/Magenta", "CMYK/Yellow", "CMYK/Black"],
        "back_colors": ["Pantone/439"]
      }
    }'
"https://api.keyline-mis.com/api/v1/orders/123/products/1/components"

Updating a product

PATCH
/api/v1/orders/{ORDER_ID}/products/{PRODUCT_ID}/components/{COMPONENT_ID}

Example request

$ curl -X PATCH -H "Authorization: Bearer 4b00c2cbffba2d16d24dd8adf0e843e6b143b54dbf800ce7ef12d431927ef63f"\
-H "Content-Type: application/json"\
-d '{"product": {
      "custom_description": "Rückendrahtheftung"
      }
    }'
"https://api.keyline-mis.com/api/v1/orders/123/products/1/components/1"

Deleting a product

DELETE
/api/v1/invoices/{ORDER_ID}/products/{PRODUCT_ID}/components/{COMPONENT_ID}

Example request

$ curl -X DELETE -H "Authorization: Bearer 4b00c2cbffba2d16d24dd8adf0e843e6b143b54dbf800ce7ef12d431927ef63f"\
-H "Content-Type: application/json"\
"https://api.keyline-mis.com/api/v1/orders/123/products/1/components/1"