List All Orders

GET

/v1/orders

Returns a paginated list of orders.


Filter parameters

store_id

Return only orders belonging to the store with this ID.

user_email

Return only orders where the user_email field is equal to this email address.


curl "https://api.lemonsqueezy.com/v1/orders" \
  -H 'Accept: application/vnd.api+json' \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {api_key}'
curl "https://api.lemonsqueezy.com/v1/orders?filter[user_email][email protected]" \
  -H 'Accept: application/vnd.api+json'  \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {api_key}'

Returns

Returns a paginated list of Order objects ordered by created_at in descending.

{
  "meta": {
    "page": {
      "currentPage": 1,
      "from": 1,
      "lastPage": 1,
      "perPage": 10,
      "to": 10,
      "total": 10
    }
  },
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "first": "https://api.lemonsqueezy.com/v1/orders?page%5Bnumber%5D=1&page%5Bsize%5D=10&sort=-createdAt",
    "last": "https://api.lemonsqueezy.com/v1/orders?page%5Bnumber%5D=1&page%5Bsize%5D=10&sort=-createdAt"
  },
  "data": [
    {
      "type": "orders",
      "id": "1",
      "attributes": {
        "store_id": 1,
        "customer_id": 1,
        "identifier": "104e18a2-d755-4d4b-80c4-a6c1dcbe1c10",
        "order_number": 1,
        "user_name": "John Doe",
        "user_email": "[email protected]",
        "currency": "USD",
        "currency_rate": "1.0000",
        "subtotal": 999,
        "setup_fee": 999,
        "discount_total": 0,
        "tax": 200,
        "total": 1199,
        "subtotal_usd": 999,
        "setup_fee_usd": 999,
        "discount_total_usd": 0,
        "tax_usd": 200,
        "total_usd": 1199,
        "tax_name": "VAT",
        "tax_rate": "20.00",
        "tax_inclusive": false,
        "status": "paid",
        "status_formatted": "Paid",
        "refunded": false,
        "refunded_at": null,
        "subtotal_formatted": "$9.99",
        "setup_fee_formatted": "$9.99",
        "discount_total_formatted": "$0.00",
        "tax_formatted": "$2.00",
        "total_formatted": "$11.99",
        "first_order_item": {
          "id": 1,
          "order_id": 1,
          "product_id": 1,
          "variant_id": 1,
          "product_name": "Test Limited License for 2 years",
          "variant_name": "Default",
          "price": 1199,
          "created_at": "2021-08-17T09:45:53.000000Z",
          "updated_at": "2021-08-17T09:45:53.000000Z",
          "deleted_at": null,
          "test_mode": false
        },
        "urls": {
          "receipt": "https://app.lemonsqueezy.com/my-orders/104e18a2-d755-4d4b-80c4-a6c1dcbe1c10?signature=8847fff02e1bfb0c7c43ff1cdf1b1657a8eed2029413692663b86859208c9f42"
        },
        "created_at": "2021-08-17T09:45:53.000000Z",
        "updated_at": "2021-08-17T09:45:53.000000Z",
        "test_mode": false
      },
      "relationships": {
        "store": {
          "links": {
            "related": "https://api.lemonsqueezy.com/v1/orders/1/store",
            "self": "https://api.lemonsqueezy.com/v1/orders/1/relationships/store"
          }
        },
        "customer": {
          "links": {
            "related": "https://api.lemonsqueezy.com/v1/orders/1/customer",
            "self": "https://api.lemonsqueezy.com/v1/orders/1/relationships/customer"
          }
        },
        "order-items": {
          "links": {
            "related": "https://api.lemonsqueezy.com/v1/orders/1/order-items",
            "self": "https://api.lemonsqueezy.com/v1/orders/1/relationships/order-items"
          }
        },
        "subscriptions": {
          "links": {
            "related": "https://api.lemonsqueezy.com/v1/orders/1/subscriptions",
            "self": "https://api.lemonsqueezy.com/v1/orders/1/relationships/subscriptions"
          }
        },
        "license-keys": {
          "links": {
            "related": "https://api.lemonsqueezy.com/v1/orders/1/license-keys",
            "self": "https://api.lemonsqueezy.com/v1/orders/1/relationships/license-keys"
          }
        },
        "discount-redemptions": {
          "links": {
            "related": "https://api.lemonsqueezy.com/v1/orders/1/discount-redemptions",
            "self": "https://api.lemonsqueezy.com/v1/orders/1/relationships/discount-redemptions"
          }
        }
      },
      "links": {
        "self": "https://api.lemonsqueezy.com/v1/orders/1"
      }
    },
	{...},
	{...},
  ]
}

Was this page helpful?