Orders

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

Attributes you send to Keyline

due_at datetime The date and time when the order is due

Attributes Keyline sends back to you

id integer The ID of the order that was just created
printery_id integer The ID of your printery
customer_id integer The ID of the customer
creator_id integer The ID of the creator
brand_id integer The ID of the brand
reference string The reference of the order
due_at datetime The date and time when the order is due
created_at datetime The date and time when the order was created
updated_at datetime The date and time when the order was last modified

Actions

Creating an order

POST
/api/v1/orders

Example request

$ curl -X POST -H "Authorization: Bearer 4b00c2cbffba2d16d24dd8adf0e843e6b143b54dbf800ce7ef12d431927ef63f"\
-H "Content-Type: application/json"\
-d '{"order": {
       "due_at": "2016-06-21T08:20:54.760+02:00"
      }
    }'
"https://api.keyline-mis.com/api/v1/orders/123"

Updating an order

PATCH
/api/v1/orders/{ORDER_ID}

Example request

$ curl -X PATCH -H "Authorization: Bearer 4b00c2cbffba2d16d24dd8adf0e843e6b143b54dbf800ce7ef12d431927ef63f"\
-H "Content-Type: application/json"\
-d '{"order": {
       "due_at": "2016-06-20T09:16:57.495+02:00"
      }
    }'
"https://api.keyline-mis.com/api/v1/orders/123"

Deleting an order

DELETE
/api/v1/invoices/{ORDER_ID}

Example request

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