List orders¶
Orders API v2
GET
https://api.mollie.com/v2/orders
Authentication:API keysOrganization access tokensApp access tokens
Retrieve all orders.
The results are paginated. See pagination for more information.
Parameters¶
from
stringoptional
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.
limit
integeroptional
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.
The website profile’s unique identifier, for example
pfl_3RkSN1zuPE
. Omit this parameter to retrieve all orders
across all profiles.
Set this to
true
to list test mode orders.Response¶
200
application/hal+json
count
integer
The number of orders found in
_embedded
, which is either the requested number (with a maximum of 250) or the
default number._embedded
objectThe object containing the queried data.
orders
array
An array of order objects as described in Get order.
_links
objectLinks to help navigate through the lists of orders. Every URL object will contain an href
and a type
field.
self
URL object
The URL to the current set of orders.
previous
URL object
The previous set of orders, if available.
next
URL object
The next set of orders, if available.
documentation
URL 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 5 | 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 | const { createMollieClient } = require('@mollie/api-client'); const mollieClient = createMollieClient({ apiKey: 'test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM' }); const orders = mollieClient.orders.iterate(); |
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" } } } |