Skip to main content
GET
/
orders
Typescript (SDK)
import { Crevio } from "@crevio/sdk";

const crevio = new Crevio({
  apiKey: process.env["CREVIO_API_KEY"] ?? "",
});

async function run() {
  const result = await crevio.orders.list({});

  console.log(result);
}

run();
{
  "object": "list",
  "data": [
    {
      "id": "<string>",
      "object": "<string>",
      "status": "succeeded",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "amount": 123,
      "currency": "<string>",
      "amount_refunded": 123,
      "customer": "<string>",
      "checkout": "<string>",
      "line_items": [
        {
          "id": "<string>",
          "object": "<string>",
          "quantity": 123,
          "price_variant": "<string>",
          "product": "<string>",
          "order": "<string>"
        }
      ]
    }
  ],
  "has_more": true,
  "url": "<string>"
}

Authorizations

Authorization
string
header
required

API key in the format: Bearer {api_token}

Query Parameters

status
enum<string>

Filter by order status

Available options:
succeeded,
pending,
failed,
refunded,
partially_refunded
customer
string

Filter by customer ID

processor
string

Filter by payment processor

expand
string

Comma-separated relations to expand: customer, line_items

starting_after
string

Cursor for pagination — the ID of the last item in the previous page

limit
integer
default:20

Items per page

Required range: 1 <= x <= 100

Response

List of orders

object
enum<string>
required
Available options:
list
data
object[]
required
has_more
boolean
required
url
string
required