Skip to main content
GET
/
orders
cURL
curl --request GET \
  --url https://api.juo.io/customer/v1/orders \
  --header 'X-Delegated-Token: <api-key>' \
  --header 'X-Tenant-ID: <x-tenant-id>'
import requests

url = "https://api.juo.io/customer/v1/orders"

headers = {
"X-Tenant-ID": "<x-tenant-id>",
"X-Delegated-Token": "<api-key>"
}

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

print(response.text)
const options = {
method: 'GET',
headers: {'X-Tenant-ID': '<x-tenant-id>', 'X-Delegated-Token': '<api-key>'}
};

fetch('https://api.juo.io/customer/v1/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://api.juo.io/customer/v1/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 => [
"X-Delegated-Token: <api-key>",
"X-Tenant-ID: <x-tenant-id>"
],
]);

$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://api.juo.io/customer/v1/orders"

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

req.Header.Add("X-Tenant-ID", "<x-tenant-id>")
req.Header.Add("X-Delegated-Token", "<api-key>")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.juo.io/customer/v1/orders")
.header("X-Tenant-ID", "<x-tenant-id>")
.header("X-Delegated-Token", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.juo.io/customer/v1/orders")

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

request = Net::HTTP::Get.new(url)
request["X-Tenant-ID"] = '<x-tenant-id>'
request["X-Delegated-Token"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "resource": "list",
  "hasNextPage": true,
  "hasPrevPage": true,
  "endCursor": "<string>",
  "startCursor": "<string>",
  "data": [
    {
      "id": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "placedAt": "2023-11-07T05:31:56Z",
      "currencyCode": "<string>",
      "type": "checkout",
      "paymentStatus": "paid",
      "financialStatus": "<string>",
      "fulfillmentStatus": "<string>",
      "subtotal": 1,
      "shipping": 1,
      "totalPrice": 1,
      "taxesAmount": 1,
      "taxesIncluded": true,
      "items": [
        {
          "id": "<string>",
          "title": "<string>",
          "subtitle": "<string>",
          "quantity": 2,
          "unitPrice": 1,
          "totalPrice": 1,
          "productId": "<string>",
          "variantId": "<string>",
          "sku": "<string>",
          "variantImage": {
            "url": "<string>",
            "altText": "<string>"
          },
          "subscriptionLineId": "<string>",
          "requiresShipping": true,
          "taxable": true,
          "customAttributes": [
            {
              "key": "<string>",
              "value": "<string>"
            }
          ],
          "sellingPlanId": "<string>",
          "sellingPlanName": "<string>"
        }
      ],
      "discounts": [
        {
          "id": "<string>",
          "title": "<string>",
          "type": "Code",
          "target": "Line",
          "value": {
            "type": "Percentage",
            "percentage": 50
          },
          "entitledItems": {
            "all": true
          },
          "subscriptionDiscountId": "<string>"
        }
      ],
      "deliveryMethod": {
        "type": "Shipping",
        "address": {
          "firstName": "<string>",
          "lastName": "<string>",
          "address1": "<string>",
          "address2": "<string>",
          "zip": "<string>",
          "city": "<string>",
          "country": "<string>",
          "countryCode": "<string>",
          "provinceCode": "<string>",
          "province": "<string>",
          "phone": "<string>",
          "company": "<string>"
        }
      },
      "paymentMethod": {
        "id": "<string>",
        "type": "CreditCard",
        "details": {
          "brand": "<string>",
          "lastDigits": "<string>",
          "maskedNumber": "<string>",
          "expiryMonth": 6,
          "expiryYear": 2001,
          "name": "<string>"
        }
      },
      "note": "<string>",
      "customAttributes": [
        {
          "key": "<string>",
          "value": "<string>"
        }
      ],
      "subscriptionIds": [
        "<string>"
      ]
    }
  ],
  "orders": [
    {
      "id": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "placedAt": "2023-11-07T05:31:56Z",
      "currencyCode": "<string>",
      "type": "checkout",
      "paymentStatus": "paid",
      "financialStatus": "<string>",
      "fulfillmentStatus": "<string>",
      "subtotal": 1,
      "shipping": 1,
      "totalPrice": 1,
      "taxesAmount": 1,
      "taxesIncluded": true,
      "items": [
        {
          "id": "<string>",
          "title": "<string>",
          "subtitle": "<string>",
          "quantity": 2,
          "unitPrice": 1,
          "totalPrice": 1,
          "productId": "<string>",
          "variantId": "<string>",
          "sku": "<string>",
          "variantImage": {
            "url": "<string>",
            "altText": "<string>"
          },
          "subscriptionLineId": "<string>",
          "requiresShipping": true,
          "taxable": true,
          "customAttributes": [
            {
              "key": "<string>",
              "value": "<string>"
            }
          ],
          "sellingPlanId": "<string>",
          "sellingPlanName": "<string>"
        }
      ],
      "discounts": [
        {
          "id": "<string>",
          "title": "<string>",
          "type": "Code",
          "target": "Line",
          "value": {
            "type": "Percentage",
            "percentage": 50
          },
          "entitledItems": {
            "all": true
          },
          "subscriptionDiscountId": "<string>"
        }
      ],
      "deliveryMethod": {
        "type": "Shipping",
        "address": {
          "firstName": "<string>",
          "lastName": "<string>",
          "address1": "<string>",
          "address2": "<string>",
          "zip": "<string>",
          "city": "<string>",
          "country": "<string>",
          "countryCode": "<string>",
          "provinceCode": "<string>",
          "province": "<string>",
          "phone": "<string>",
          "company": "<string>"
        }
      },
      "paymentMethod": {
        "id": "<string>",
        "type": "CreditCard",
        "details": {
          "brand": "<string>",
          "lastDigits": "<string>",
          "maskedNumber": "<string>",
          "expiryMonth": 6,
          "expiryYear": 2001,
          "name": "<string>"
        }
      },
      "note": "<string>",
      "customAttributes": [
        {
          "key": "<string>",
          "value": "<string>"
        }
      ],
      "subscriptionIds": [
        "<string>"
      ]
    }
  ]
}

Authorizations

X-Delegated-Token
string
header
required

Headers

X-Tenant-ID
string
required

Unique identifier of the tenant in the system (usually a store identifier)

Query Parameters

query
string
deprecated

DEPRECATED: previously used for free-text / per-subscriptionId server-side search. Not supported by the current implementation. The parameter is accepted for SDK backward compatibility and ignored on the server.

Minimum string length: 1
includeOneTime
boolean
default:false

When false (default), only subscription-driven orders are returned: the set is determined by orders tracked in our database for the customer, hydrated from Shopify. When true, the full Shopify order history (including one-time orders) is returned. Toggling this flag restarts pagination (the default path uses database cursors; the full-history path uses Shopify cursors).

limit
integer
default:20
Required range: 1 <= x <= 50
sort
enum<string>

Sort order. When set to placedAt, orders are sorted by placement date (newest first). When omitted, the default sort is used. Toggling this flag restarts pagination (cursors are not interchangeable between sort modes).

Available options:
placedAt
after
string
Minimum string length: 1
before
string
Minimum string length: 1

Response

200 - application/json

Default Response

resource
enum<string>
required
Available options:
list
hasNextPage
boolean
required
hasPrevPage
boolean
required
endCursor
null | string
required
startCursor
null | string
required
data
Order · object[]
required
orders
Order · object[]
required
deprecated

DEPRECATED: use data instead. Returned for backward compatibility with the pre-pagination response shape.