Skip to main content
GET
/
v1
/
orders
/
{orderId}
Get Order
curl --request GET \
  --url https://{cluster}.voucherify.io/v1/orders/{orderId} \
  --header 'Authorization: Bearer <token>' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>'
{
  "id": "<string>",
  "source_id": "<string>",
  "status": "CREATED",
  "amount": 123,
  "initial_amount": 123,
  "discount_amount": 123,
  "items_discount_amount": 123,
  "total_discount_amount": 123,
  "total_amount": 123,
  "applied_discount_amount": 123,
  "items_applied_discount_amount": 123,
  "total_applied_discount_amount": 123,
  "metadata": {},
  "object": "order",
  "created_at": "2021-12-22T10:13:06.487Z",
  "updated_at": "2021-12-22T10:14:45.316Z",
  "customer_id": "cust_7iUa6ICKyU6gH40dBU25kQU1",
  "referrer_id": "cust_nM4jqPiaXUvQdVSA6vTRUnix",
  "customer": {
    "id": "<string>",
    "object": "customer"
  },
  "referrer": {
    "id": "<string>",
    "object": "customer"
  },
  "redemptions": {},
  "items": [
    {
      "id": "<string>",
      "sku_id": "<string>",
      "product_id": "<string>",
      "related_object": "product",
      "source_id": "<string>",
      "quantity": 123,
      "discount_quantity": 123,
      "initial_quantity": 123,
      "amount": 123,
      "discount_amount": 123,
      "applied_discount_amount": 123,
      "applied_discount_quantity": 123,
      "applied_quantity": 123,
      "applied_quantity_amount": 123,
      "initial_amount": 123,
      "price": 123,
      "subtotal_amount": 123,
      "product": {
        "id": "<string>",
        "source_id": "<string>",
        "override": true,
        "name": "<string>",
        "metadata": {},
        "price": 123
      },
      "sku": {
        "id": "<string>",
        "source_id": "<string>",
        "override": true,
        "sku": "<string>",
        "price": 123,
        "metadata": {}
      },
      "object": "order_item",
      "metadata": {}
    }
  ]
}

Authorizations

X-App-Id
string
header
required
X-App-Token
string
header
required
Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

orderId
string
required

Unique Voucherify order ID or order source ID.

Example:

"ord_smEh8p1p6W6DgOmeERk092LG"

Response

Returns an order object if a valid identifier was provided.

Response body schema for GET v1/orders/{orderId}. Order information.

id
string

Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.

source_id
string | null

Unique source ID of an existing order that will be linked to the redemption of this request.

status
enum<string>

The order status.

Available options:
CREATED,
PAID,
CANCELED,
FULFILLED
amount
integer

This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

initial_amount
integer

This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

discount_amount
integer

Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

items_discount_amount
integer

Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

total_discount_amount
integer

Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

total_amount
integer

Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

applied_discount_amount
integer

This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).

items_applied_discount_amount
integer

Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
sum(items, i => i.applied_discount_amount)

total_applied_discount_amount
integer

Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount

metadata
object

A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.

object
enum<string>
default:order

The type of the object represented by JSON.

Available options:
order
created_at
string<date-time>

Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.

Example:

"2021-12-22T10:13:06.487Z"

updated_at
string<date-time> | null

Timestamp representing the date and time when the order was last updated in ISO 8601 format.

Example:

"2021-12-22T10:14:45.316Z"

customer_id
string | null

Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.

Example:

"cust_7iUa6ICKyU6gH40dBU25kQU1"

referrer_id
string | null

Unique referrer ID.

Example:

"cust_nM4jqPiaXUvQdVSA6vTRUnix"

customer
object
referrer
object
redemptions
object
items
Order Item Calculated · object[]

Array of items applied to the order. It can include up to 500 items.

I