Skip to main content
POST
/
v2
/
orders
Create orders
curl --request POST \
  --url https://dev.sbx.imprint.co/v2/orders \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "payment_method_id": "0144ea84-3c39-4382-a37a-03c699b77646",
  "partner_order_id": "o-c8a1fe46bbff4a18ba1d",
  "total_order_amount": 274999,
  "id": "77f60af4-185e-4867-b113-34e3cf7c6acd",
  "customer_id": "1bb0ab64-ed57-4f2f-bd8d-ab04d1a365c5",
  "merchant_id": "m-123456789",
  "merchant_name": "Rest Assured",
  "merchant_address": [
    {
      "street_line1": "123 Main St",
      "street_line2": "Apt 4B",
      "city": "San Francisco",
      "state": "CA",
      "postal_code": "94105",
      "country": "USA"
    }
  ],
  "order_lines": [
    {
      "name": "Couch Supreme",
      "product_url": "www.restassured.com/couch-supreme",
      "quantity": 1,
      "rate": 274999,
      "rewards_rate": 2500
    }
  ],
  "total_rewards_amount": 2500,
  "currency": "USD",
  "created_at": "2025-02-13T19:08:07Z",
  "updated_at": "2025-02-13T19:08:07Z"
}
'
{
  "payment_method_id": "0144ea84-3c39-4382-a37a-03c699b77646",
  "partner_order_id": "o-c8a1fe46bbff4a18ba1d",
  "total_order_amount": 274999,
  "id": "77f60af4-185e-4867-b113-34e3cf7c6acd",
  "customer_id": "1bb0ab64-ed57-4f2f-bd8d-ab04d1a365c5",
  "merchant_id": "m-123456789",
  "merchant_name": "Rest Assured",
  "merchant_address": [
    {
      "street_line1": "123 Main St",
      "street_line2": "Apt 4B",
      "city": "San Francisco",
      "state": "CA",
      "postal_code": "94105",
      "country": "USA"
    }
  ],
  "order_lines": [
    {
      "name": "Couch Supreme",
      "product_url": "www.restassured.com/couch-supreme",
      "quantity": 1,
      "rate": 274999,
      "rewards_rate": 2500
    }
  ],
  "total_rewards_amount": 2500,
  "currency": "USD",
  "created_at": "2025-02-13T19:08:07Z",
  "updated_at": "2025-02-13T19:08:07Z"
}

Authorizations

Authorization
string
header
required

Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>

Body

application/json
payment_method_id
string
required

Payment method identifier

Example:

"0144ea84-3c39-4382-a37a-03c699b77646"

partner_order_id
string
required

Partner's order identifier

Example:

"o-c8a1fe46bbff4a18ba1d"

total_order_amount
number<iso-4217>
required

Total order amount ($2,699.99 + $50.00)

Example:

274999

id
string

Unique identifier for the order

Example:

"77f60af4-185e-4867-b113-34e3cf7c6acd"

customer_id
string

Customer identifier

Example:

"1bb0ab64-ed57-4f2f-bd8d-ab04d1a365c5"

merchant_id
string | null

Merchant identifier

Example:

"m-123456789"

merchant_name
string | null

Merchant name

Example:

"Rest Assured"

merchant_address
object[]

List of merchant addresses

order_lines
object[]

An array of items that make up the order, used for the purpose of establishing the items, amounts, and rewards that are expected to be included in events sent to Imprint following order creation. Changes made to orders after the order is created can be implicitly communicated to Imprint through the event creation process following the creation of the order; modifying the order itself is not necessary. The set of events sent to Imprint after order creation serve as the final source of truth for transaction amounts, rewards, order lines, etc. When provided, the API will require that the calculated sum of all the rates and rewards rates within (taking quantities into account) are equal to the total_order_amount and total_rewards_amount, respectively.

Example:
[
{
"name": "Couch Supreme",
"product_url": "www.restassured.com/couch-supreme",
"quantity": 1,
"rate": 274999,
"rewards_rate": 2500
}
]
total_rewards_amount
number<iso-4217>

Total rewards amount ($25 + $0)

Example:

2500

currency
string

The 3-character currency code of the amount in ISO 4217 format (e.g., "USD")

Example:

"USD"

created_at
string<date-time> | null

The RFC-3339 timestamp when the order was created

Example:

"2025-02-13T19:08:07Z"

updated_at
string<date-time> | null

The RFC-3339 timestamp when the order was last updated

Example:

"2025-02-13T19:08:07Z"

Response

200 - application/json

Orders created successfully

payment_method_id
string
required

Payment method identifier

Example:

"0144ea84-3c39-4382-a37a-03c699b77646"

partner_order_id
string
required

Partner's order identifier

Example:

"o-c8a1fe46bbff4a18ba1d"

total_order_amount
number<iso-4217>
required

Total order amount ($2,699.99 + $50.00)

Example:

274999

id
string

Unique identifier for the order

Example:

"77f60af4-185e-4867-b113-34e3cf7c6acd"

customer_id
string

Customer identifier

Example:

"1bb0ab64-ed57-4f2f-bd8d-ab04d1a365c5"

merchant_id
string | null

Merchant identifier

Example:

"m-123456789"

merchant_name
string | null

Merchant name

Example:

"Rest Assured"

merchant_address
object[]

List of merchant addresses

order_lines
object[]

An array of items that make up the order, used for the purpose of establishing the items, amounts, and rewards that are expected to be included in events sent to Imprint following order creation. Changes made to orders after the order is created can be implicitly communicated to Imprint through the event creation process following the creation of the order; modifying the order itself is not necessary. The set of events sent to Imprint after order creation serve as the final source of truth for transaction amounts, rewards, order lines, etc. When provided, the API will require that the calculated sum of all the rates and rewards rates within (taking quantities into account) are equal to the total_order_amount and total_rewards_amount, respectively.

Example:
[
{
"name": "Couch Supreme",
"product_url": "www.restassured.com/couch-supreme",
"quantity": 1,
"rate": 274999,
"rewards_rate": 2500
}
]
total_rewards_amount
number<iso-4217>

Total rewards amount ($25 + $0)

Example:

2500

currency
string

The 3-character currency code of the amount in ISO 4217 format (e.g., "USD")

Example:

"USD"

created_at
string<date-time> | null

The RFC-3339 timestamp when the order was created

Example:

"2025-02-13T19:08:07Z"

updated_at
string<date-time> | null

The RFC-3339 timestamp when the order was last updated

Example:

"2025-02-13T19:08:07Z"