Skip to main content
GET
/
orders
List orders
curl --request GET \
  --url https://{subdomain}.truust.io/2.0/orders \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://{subdomain}.truust.io/2.0/orders"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://{subdomain}.truust.io/2.0/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://{subdomain}.truust.io/2.0/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://{subdomain}.truust.io/2.0/orders"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://{subdomain}.truust.io/2.0/orders")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{subdomain}.truust.io/2.0/orders")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "current_page": 1,
  "last_page": 5,
  "per_page": 15,
  "total": 73,
  "from": 1,
  "to": 15,
  "data": [
    {
      "id": 123,
      "self": "/2.0/orders/1234",
      "public_id": "<string>",
      "name": "<string>",
      "description": "<string>",
      "value": 123,
      "fee_value": 123,
      "fee_percent": 123,
      "currency": "EUR",
      "amount": "150.00 €",
      "payin_amount": "<string>",
      "payout_amount": "<string>",
      "fee_amount": "<string>",
      "shipping_amount": "<string>",
      "buyer_link": "<string>",
      "seller_link": "<string>",
      "qr_link": "<string>",
      "sandbox": true,
      "status_nicename": "<string>",
      "images": [
        "<string>"
      ],
      "tag": "<string>",
      "payin_intents": 123,
      "payin_types": [
        "<string>"
      ],
      "payin_fallback": [
        "<string>"
      ],
      "metadata": {},
      "template": {},
      "published_units": 123,
      "refund": {
        "status": "<string>",
        "reference_id": "<string>"
      },
      "created_at": "2023-11-07T05:31:56Z",
      "published_at": "2023-11-07T05:31:56Z",
      "accepted_at": "2023-11-07T05:31:56Z",
      "shipping_at": "2023-11-07T05:31:56Z",
      "cancelled_at": "2023-11-07T05:31:56Z",
      "validated_at": "2023-11-07T05:31:56Z",
      "released_at": "2023-11-07T05:31:56Z",
      "connections": {}
    }
  ]
}

Authorizations

Authorization
string
header
required

Use your account's Secret Key as the Bearer token.

Query Parameters

page
integer
default:1

Page number for pagination.

Required range: x >= 1
per_page
integer
default:15

Number of results per page.

Required range: 1 <= x <= 100

Field to search by (e.g. email, tag).

query
string

Search term to filter by.

date_begin
string<date>

Start date filter (ISO 8601).

Example:

"2024-01-01"

date_end
string<date>

End date filter (ISO 8601).

Example:

"2024-12-31"

order
string
default:created_at

Field to sort results by.

sort
enum<string>
default:desc

Sort direction.

Available options:
asc,
desc
status
enum<string>

Filter by order status.

Available options:
DRAFT,
PENDING_DETAILS,
PENDING_PUBLISH,
PUBLISHED,
ACCEPTED,
REJECTED,
CANCELLED,
RELEASED
sandbox
boolean

Filter sandbox orders.

Response

200 - application/json

Paginated list of orders

current_page
integer
Example:

1

last_page
integer
Example:

5

per_page
integer
Example:

15

total
integer
Example:

73

from
integer
Example:

1

to
integer
Example:

15

data
object[]