List orders

Orders API v2
GEThttps://api.mollie.com/v2/orders

Retrieve all orders.

The results are paginated. See pagination for more information.

Parameters

fromstringoptional
Used for pagination. Offset the result set to the order with this ID. The order with this ID is included in the result set as well.
limitintegeroptional
The number of orders to return (with a maximum of 250).

Access token parameters

If you are using organization access tokens or are creating an OAuth app, you can specify which profile you are retrieving orders for using the profileId parameter. Organizations can have multiple profiles for each of their websites. If you omit the profileId parameter, the API will return all orders across all profiles. See Profiles API for more information.

For these authentication methods the optional testmode parameter is available as well to enable test mode.

profileIdstringoptional
testmodebooleanoptional

Response

200 application/hal+json

countinteger
The number of orders found in _embedded, which is either the requested number (with a maximum of 250) or the default number.
_embeddedobject

The object containing the queried data.

Hide child parameters

ordersarray
An array of order objects as described in Get order.
_linksobject

Links to help navigate through the lists of orders. Every URL object will contain an href and a type field.

Show child parameters

selfURL object
The URL to the current set of orders.
previousURL object
The previous set of orders, if available.
nextURL object
The next set of orders, if available.
documentationURL object
The URL to the orders list endpoint documentation.

Example

cURLPHPPythonRubyNode.js
1
2
curl -X GET https://api.mollie.com/v2/orders \
   -H "Authorization: Bearer test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM"
1
2
3
4
5
6
<?php
$mollie = new \Mollie\Api\MollieApiClient();
$mollie->setApiKey("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM");

$most_recent_orders = $mollie->orders->page();
$previous_orders = $most_recent_orders->next();
1
2
3
4
mollie_client = Client()
mollie_client.set_api_key('test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM')
most_recent_orders = mollie_client.orders.list()
previous_orders = most_recent_orders.get_next()
1
2
3
4
5
6
7
require 'mollie-api-ruby'

Mollie::Client.configure do |config|
  config.api_key = 'test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM'
end

orders = Mollie::Order.all
1
2
3
4
5
6
7
const { createMollieClient } = require('@mollie/api-client');
const mollieClient = createMollieClient({ apiKey: 'test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM' });

(async () => {
  const mostRecentOrders = await mollieClient.orders.page();
  const previousOrders = await mostRecentOrders.nextPage();
})();

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
HTTP/1.1 200 OK
Content-Type: application/hal+json

{
    "count": 3,
    "_embedded": {
        "orders": [
            {
                "resource": "order",
                "id": "ord_kEn1PlbGa",
                "...": "..."
            },
            { },
            { }
        ]
    },
    "_links": {
        "self": {
            "href": "https://api.mollie.com/v2/orders",
            "type": "application/hal+json"
        },
        "previous": null,
        "next": {
            "href": "https://api.mollie.com/v2/orders?from=ord_stTC2WHAuS",
            "type": "application/hal+json"
        },
        "documentation": {
            "href": "https://docs.mollie.com/reference/v2/orders-api/list-orders",
            "type": "text/html"
        }
    }
}