Fetching Data
Orders
Orders
When product is finished an order is made - both if printed product or a digital service.
Fetch available orders
Fetch list of orders
URI: https://<im4>/orders/{'updated'?}/{agency_id?}
?days={days?}
?minutes={minutes?}
?search={search?}
?take={take?}&skip={skip?}
- Request-type:
GET - Parameters:
{'updated'}(part of URI) (optional): If 'updated' included - sort by, take and days use updated_at instead of created_at Since 0.27{agency_id}(part of URI) (optional): Agency - fallback to client agency + collaborating agencies{days}(integer) (default 120): Days to include - skipped if minutes, search or take set{minutes}(integer): Since 0.28 Minutes to include - skipped if search or take set{search}(string): Multi-word search – if specified, days and minutes are ignored.{take}(integer): Limit result – used for paging – if specified, days and minutes are ignored.{skip}(integer): Skip first x results – used for paging – will only work if take specified - Return data
{mixed}(JSON)
If user has access to multiple agencies –
orders in all agencies will be returned unless agency_id is specifiedFetch project orders
orders is a valid key on projects, so get through project:
`https://<im4>/project/${projectId}/orders`
Fetch a specific full order
Get a specific order with additional information (see ordertable here
`https://<im4>/project/${projectId}/order/${orderId}`
- Request-type:
GET - Parameters:
{projectId}(part of URI): Project ID{orderId}(part of URI): Order ID - Return data
{mixed}(JSON)
Fetch document for order
Get the document for a completed order.
Orders with product type book memorial or book condolence is not supported
`https://<im4>/project/${projectId}/order/${orderId}/pdf`
- Request-type:
GET - Return data
200 OKapplication/pdf404 Not found- Order does not exist, or the order does not have a document403 Forbidden- Order is not invoiced and/or delivered or the product is not supported