v1

latestOpenAPI 3.0.0UNLICENSED2026-07-26178479713.7 KB
order.list

aid_draft_orders_get

Retrieve a list of draft orders

scopes:

  • admin:shopping
  • read:shopping
get/accounts/{aid}/shopping/draft_orders

Path parameters

aidstring ^[PT]{1}\d{8}$ required

An id that uniquely identifies the account.

Query parameters

starting_afterstring checkout-id

cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

limitinteger

A limit on the number of objects to be returned. Limit can range between 1 and 100 items, and the default is 10 items.

customer_idstring

The resource identifier string

statusstring[]

filter by draft order status

created_at.gtestring date

filter by created_at, greater than or equal (after)

created_at.ltestring date

filter by created_at, less than or equal (before)

net_amount.gteinteger

Lower limit for filtering on order net_amount.

net_amount.lteinteger

Upper limit for filtering on order net_amount.

currencystring[]

Filter on order currency (3-letter currency code)

searchstring

Will try to match the search to either order_id, external_ids or customer phone_number, email, name or customer_id.

Response

draft order collection

Example response

{
  "draft_orders": [
    {
      "id": "bd04c959-d159-49b4-a096-2d84e014a8da",
      "created_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
      "deleted_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
      "events": [
        {
          "id": "bd04c959-d159-49b4-a096-2d84e014a8da",
          "created_by": "bd04c959-d159-49b4-a096-2d84e014a8da"
        }
      ],
      "options": {
        "order_time_to_live": 94672800,
        "payout": {
          "rules": [
            {
              "rule_type": "order.items.store.id",
              "rule_id": "sc029",
              "rule_version": 1,
              "destinations": [
                {
                  "type": "percentage",
                  "value": 10,
                  "destinations": [
                    {
                      "type": "flat_amount",
                      "value": "500",
                      "destination": "account-a"
                    },
                    {
                      "type": "remaining_amount",
                      "destinations": [
                        {
                          "type": "percentage",
                          "value": "5.0",
                          "destination": "account-b"
                        }
                      ]
                    }
                  ]
                },
                {
                  "type": "flat_amount",
                  "value": "500",
                  "destination": "account-a"
                },
                {
                  "type": "remaining_amount",
                  "destinations": [
                    {
                      "type": "percentage",
                      "value": "5",
                      "destination": "account-b"
                    },
                    {
                      "type": "percentage",
                      "value": "95.0",
                      "destination": "account-c"
                    }
                  ]
                }
              ]
            }
          ]
        }
      },
      "order": {
        "customer": {
          "metadata": {
            "dob_year": 1985
          },
          "created_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
          "deleted_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
          "first_name": "John",
          "last_name": "Doe",
          "email": "customer@example.com",
          "phone_number": "+4799999999",
          "enrolled_by": {
            "type": "url",
            "value": "https://facebook.com"
          },
          "marketing_consent": {
            "sms": {
              "consent": true,
              "updated_at": "2018-01-12T13:42:00Z"
            },
            "email": {
              "consent": true,
              "updated_at": "2018-01-12T13:42:00Z"
            }
          },
          "addresses": [
            {
              "address_line": "Sommerkroveien 34",
              "address_line_2": "PB 123",
              "postal_code": "0349",
              "postal_place": "Oslo",
              "country": "NO",
              "latitude": 59.942112,
              "longitude": 10.716991,
              "comment": "5th floor, use doorbell."
            }
          ],
          "company": {
            "organization_number": "123456789MVA",
            "bussiness_name": "TKP tech AS",
            "department": "sales department",
            "industry": "computer industry"
          },
          "gender": "male",
          "date_of_birth": "1990-09-20"
        },
        "gross_amount": 39800,
        "net_amount": 27840,
        "total_discount": 23130,
        "shipping_address": {
          "address_line": "Sommerkroveien 34",
          "address_line_2": "PB 123",
          "postal_code": "0349",
          "postal_place": "Oslo",
          "country": "NO",
          "first_name": "John",
          "last_name": "Doe",
          "comment": "5th floor, use doorbell."
        },
        "billing_address": {
          "address_line": "Sommerkroveien 34",
          "address_line_2": "PB 123",
          "postal_code": "0349",
          "postal_place": "Oslo",
          "country": "NO",
          "first_name": "John",
          "last_name": "Doe",
          "comment": "5th floor, use doorbell."
        },
        "time_to_live": 94672800,
        "itinerary": [
          {
            "arrival_address": {
              "address_line": "Sommerkroveien 34",
              "address_line_2": "PB 123",
              "postal_code": "0349",
              "postal_place": "Oslo",
              "latitude": 59.942112,
              "longitude": 10.716991,
              "country": "NO"
            },
            "departure_address": {
              "address_line": "Sommerkroveien 34",
              "address_line_2": "PB 123",
              "postal_code": "0349",
              "postal_place": "Oslo",
              "latitude": 59.942112,
              "longitude": 10.716991,
              "country": "NO"
            }
          }
        ],
        "items": [
          {
            "id": "175938",
            "groups": [
              {
                "id": "B234",
                "name": "Stol"
              },
              {
                "id": "B1",
                "name": "Møbel"
              }
            ],
            "line_id": 1,
            "quantity": 2,
            "gross_amount": 39800,
            "net_amount": 27840,
            "tax_lines": [
              {
                "amount": 5584,
                "amount_dwh": "5584.0440",
                "included_in_price": true,
                "percentage": 25,
                "tax_basis": 27920,
                "tax_basis_dwh": "27920.22",
                "tax_code": "3",
                "tax_group": "Vmva-høy"
              }
            ],
            "description": "Stablestol for utendørsbruk",
            "description_alias": "Staplestol",
            "eligible_for_discount": true,
            "discount_lines": [
              {
                "amount": 4400,
                "percentage": 44,
                "discount_id": "766da0ef-9283-42bd-b012-0582344ec53c",
                "line_id": 1
              }
            ],
            "additions": [
              {
                "id": "C1203",
                "description": "Extra Cheese",
                "gross_amount": 27840,
                "groups": [
                  {
                    "id": "B234",
                    "name": "Stol"
                  },
                  {
                    "id": "B1",
                    "name": "Møbel"
                  }
                ]
              }
            ],
            "store": {
              "id": "SL02",
              "organization_number": "123456789MVA",
              "name": "SC Oslo",
              "business_name": "SC Oslo AS"
            },
            "external_id": "SL02-94821948",
            "payout": {
              "destinations": [
                {
                  "type": "percentage",
                  "value": "10",
                  "amount": 4000,
                  "destinations": [
                    {
                      "amount": 500
                    },
                    {
                      "destinations": [
                        {
                          "amount": 3500
                        }
                      ]
                    }
                  ]
                },
                {
                  "amount": 500
                },
                {
                  "destinations": [
                    {
                      "amount": 192
                    },
                    {
                      "amount": 38308
                    }
                  ]
                }
              ]
            },
            "original_currency": "SEK",
            "original_gross_amount": 39800,
            "conversion_rate_ppm": 1099000,
            "conversion_rate_source": "ecb"
          }
        ],
        "type": "delivery",
        "order_number": "order123456",
        "currency": "NOK",
        "store": {
          "id": "SL02",
          "organization_number": "123456789MVA",
          "name": "SC Oslo",
          "business_name": "SC Oslo AS"
        },
        "external_links": [
          {
            "text": "Order Receipt",
            "href": "https://example.dintero.com/receipts/234CC019-8BA9-4DDB-9A40-8C9EE0BB943C?type=pdf"
          }
        ],
        "attachments": [
          {
            "bus_reservation": {
              "booking_id": "NE 138 47794",
              "itinerary": [
                {
                  "departure_address": {
                    "address_line": "Sommerkroveien 34",
                    "address_line_2": "PB 123",
                    "postal_code": "0349",
                    "postal_place": "Oslo",
                    "country": "NO"
                  },
                  "arrival_address": {
                    "address_line": "Sommerkroveien 34",
                    "address_line_2": "PB 123",
                    "postal_code": "0349",
                    "postal_place": "Oslo",
                    "country": "NO"
                  },
                  "operator": "SAS"
                }
              ]
            },
            "car_reservation": {
              "booking_id": "TV 347794",
              "itinerary": [
                {
                  "rental_company": "Avis",
                  "pick_up_address": {
                    "address_line": "Sommerkroveien 34",
                    "address_line_2": "PB 123",
                    "postal_code": "0349",
                    "postal_place": "Oslo",
                    "country": "NO"
                  },
                  "drop_off_address": {
                    "address_line": "Sommerkroveien 34",
                    "address_line_2": "PB 123",
                    "postal_code": "0349",
                    "postal_place": "Oslo",
                    "country": "NO"
                  }
                }
              ]
            },
            "ferry_reservation": {
              "booking_id": "NE 138 47794",
              "itinerary": [
                {
                  "departure_address": {
                    "address_line": "Sommerkroveien 34",
                    "address_line_2": "PB 123",
                    "postal_code": "0349",
                    "postal_place": "Oslo",
                    "country": "NO"
                  },
                  "arrival_address": {
                    "address_line": "Sommerkroveien 34",
                    "address_line_2": "PB 123",
                    "postal_code": "0349",
                    "postal_place": "Oslo",
                    "country": "NO"
                  },
                  "operator": "SAS"
                }
              ]
            },
            "metro_reservation": {
              "booking_id": "NE 138 47794",
              "itinerary": [
                {
                  "departure_address": {
                    "address_line": "Sommerkroveien 34",
                    "address_line_2": "PB 123",
                    "postal_code": "0349",
                    "postal_place": "Oslo",
                    "country": "NO"
                  },
                  "arrival_address": {
                    "address_line": "Sommerkroveien 34",
                    "address_line_2": "PB 123",
                    "postal_code": "0349",
                    "postal_place": "Oslo",
                    "country": "NO"
                  },
                  "operator": "SAS"
                }
              ]
            },
            "taxi_reservation": {
              "booking_id": "NE 138 47794",
              "itinerary": [
                {
                  "departure_address": {
                    "address_line": "Sommerkroveien 34",
                    "address_line_2": "PB 123",
                    "postal_code": "0349",
                    "postal_place": "Oslo",
                    "country": "NO"
                  },
                  "arrival_address": {
                    "address_line": "Sommerkroveien 34",
                    "address_line_2": "PB 123",
                    "postal_code": "0349",
                    "postal_place": "Oslo",
                    "country": "NO"
                  },
                  "operator": "SAS"
                }
              ]
            },
            "train_reservation": {
              "booking_id": "NE 138 47794",
              "itinerary": [
                {
                  "departure_address": {
                    "address_line": "Sommerkroveien 34",
                    "address_line_2": "PB 123",
                    "postal_code": "0349",
                    "postal_place": "Oslo",
                    "country": "NO"
                  },
                  "arrival_address": {
                    "address_line": "Sommerkroveien 34",
                    "address_line_2": "PB 123",
                    "postal_code": "0349",
                    "postal_place": "Oslo",
                    "country": "NO"
                  },
                  "operator": "SAS"
                }
              ]
            },
            "tram_reservation": {
              "booking_id": "NE 138 47794",
              "itinerary": [
                {
                  "departure_address": {
                    "address_line": "Sommerkroveien 34",
                    "address_line_2": "PB 123",
                    "postal_code": "0349",
                    "postal_place": "Oslo",
                    "country": "NO"
                  },
                  "arrival_address": {
                    "address_line": "Sommerkroveien 34",
                    "address_line_2": "PB 123",
                    "postal_code": "0349",
                    "postal_place": "Oslo",
                    "country": "NO"
                  },
                  "operator": "SAS"
                }
              ]
            }
          }
        ],
        "stores": [
          {
            "id": "SL02",
            "organization_number": "123456789MVA",
            "name": "SC Oslo",
            "business_name": "SC Oslo AS"
          }
        ]
      }
    }
  ]
}