# Orders
The /api/orders/
endpoint enables you to retrieve
information about placed orders. The orders can be orders in any state, so both completed orders, orders awaitin approval and orders where the customer has not completed the payment.
# Parameters
The endpoint uses GET and currently supports the following parameters, all optional:
"fields" - a comma-separated list of fields to return in the JSON, e.g.
?fields=data,invoice_lines
. The default is "data". You can choose between:- "data" - all fields directly on the order.
- "invoice_lines" - estimated invoice lines from ordered campaigns and products. These are calculated at the time of the API request (not at the time the order was made).
"order_id" - (optional) ID of a specific order, e.g.
?order_id=83529
."customer" - (optional) orders made by a specific customer with the provided customer ID, e.g.
?customer=9224437
. These orders are either completed or the customer has logged in as part of ordering."campaign" - (optional) campaign ID, selected products representing one or more of these campaign IDs e.g.
?campaign=3i&campaign=12m
."status" - (optional) status of the order, e.g.
?status=awaitingapproval&status=denied
. Can be awaiting, awaitingconfirmation, awaitingpaymentprocessor, awaitingemailconfirmation, awaitingapproval, denied"created_before" - (optional) e.g.
?created_before=2024-01-01
(the date inclusive)"created_after" - (optional) e.g.
?created_after=2024-01-01
(the date inclusive)"iframe" - set if returned URLs are intended to go in an iframe, e.g.
iframe=1
# Return value
The data returned is an object with an array of order
information (possibly empty array). A maximum of 10.000 orders are returned so make sure to use
the created_before
and/or created_after
parameters if you have a lot of orders to fetch.
Note that the content depends on what fields have been set up inside Iteras and filled in on a given order. In general, only filled-in fields are returned, so for instance if the order form does not include a specific field or the field is not filled in, it won't show up in the data for the order.
GET /api/orders/?customer=452&created_after=2025-01-26
{
"orders": [
{
"created": "2025-02-26T04:26:33",
"ordering_form": "3-months", // URL ID of form used for order
"resume_ordering_url": "https://app.iteras.dk/example/iframe/order/myOrderingForm/?order=vnt3eb683b4833v8", // link to order (only present if status is 'awaitingconfirmation')
"address": {
"name": "John Doe",
"address": "Sneglevej 78\n6000 Kolding",
"country": "DK"
},
"email": "johndoe@example.com",
"billing_address": {
"company": "Business Corp",
"address": "Business road 56\n4637 Town",
"country": "NO"
},
"password": "rnfy98r57485tnf398r9n8347", // hashed value
":Receive newsletter": true,
"ip": "123.123.123.123", // IP address that placed the order
"ordering_code": "EXTRA20OFF", // if an ordering code was used
"products": [ // chosen products
{
"campaign_id": "3months", // ID of campaign product
"campaign_name": "Product for 3 months",
"campaign_customer_facing_name": "Receive the product for 3 months",
"text": "Receive the product for 3 months (100,00 DKK)", // product text used when ordering
"quantity": 1,
"subscribed_to": [{
"name": "Test Magazine",
"external_id": "testexternal"
}],
"price": 100.00
},
{
"name": "Standard size book", // stand-alone product
"customer_facing_name": "A good book",
"external_id": "book_offer_34",
"text": "A good book at a good price (50,00 DKK)", // product text used when ordering
":Special": "Holiday special",
"price": 50.00
],
"status": "approved", // or awaitingconfirmation/awaitingpaymentprocessor/awaitingemailconfirmation/awaitingapproval/denied
"customer": "452", // customer ID of customer attached to this order (if any)
"payment_agreement": {
"id": "7453106",
"text": "Mastercard: XX...XX2451 (04/2027)"
},
"subscriptions" [ // ID's of created subscriptions from this order (if any)
"56469"
]
}
]
}