Search for orders
  • 22 Nov 2024
  • 4 Minutes to read
  • Contributors
  • Dark
    Light

Search for orders

  • Dark
    Light

Article summary

Get
/orders/v1/orders

Search for a specific order based on different criteria.

Security
HTTP
Type bearer
Query parameters
filter[customer][id]
stringRequired
Min length1
filter[contract][id]
string
Min length1
filter[status]
string
Min length1
page[size]
number
Minimum1
page[cursor]
string
Min length1
Responses
200

Retrieved Orders

Expand All
object
data
Array of object

Orders matching the search criteria.

object
id
string

The ID for this resource

Min length1
type
string

The type of the resource

Valid values[ "ORDER" ]
createdAt
string (date-time)

The date and time the resource was created

updatedAt
string (date-time)

The date and time the resource was last updated

pricing
object
currencyCode
string

ISO 4217 currency code.

ExampleGBP
totalPrice
integer

Total price of the order and delivery with discounts applied, in the currency's minor unit e.g. pence or cents.

Minimum0
totalDiscount
integer

Total discount applied to the order in the currency's minor unit e.g. pence or cents.

Default0
deliveryPrice
integer

Delivery price for the order in the currency's minor unit e.g. pence or cents.

Example500
subtotal
integer Deprecated
Example5000
subtotalDiscount
integer

Total discount applied to the order items in the currency's minor unit e.g. pence or cents.

Example2000
delivery
object

Delivery information for the order.

shippingDate
string (date)

Date the order is to be shipped.

customer
object

Information about the order's customer.

id
string

The ID for this resource

Min length1
type
string

The type of the resource

Valid values[ "CUSTOMER" ]
discounts
Array of object

Discounts applied to the order.

object
code
string

Discount code applied to the order (maximum one per order).

Min length1
status
string

The status of the order. PENDING: not yet successfully billed. COMMITTED: Successfully billed. CANCELLED: Removed from customers' order list. Note that an order with billing status REFUNDED would still be considered COMMITTED, while an order with billing status FAILED would remain PENDING.

Valid values[ "PENDING", "COMMITTED", "CANCELLED" ]
billing
object
status
string

The billing status of the order. PENDING: not yet attempted billing. IN PROGRESS: Currently attempting billing. DELEGATED: Billing happened through a process external to Bento, e.g. during signup. SUCCEEDED: Billing occurred successfully. FAILED: Billing attempt failed, e.g. due to incorrect card details. REFUNDED: The order was billed, but later refunded for the full amount. PARTIALLY REFUNDED: Order was billed for the full amount, but refunded for less than the full amount.

Valid values[ "PENDING", "IN PROGRESS", "DELEGATED", "SUCCEEDED", "FAILED", "REFUNDED", "PARTIALLY REFUNDED" ]
lineItems
Array

Line items associated with the order.

OneOf
object
id
string

The ID for this resource

Min length1
type
string

The type of the resource

Valid values[ "PRODUCT" ]
quantity
integer

Quantity of the product in the order.

Minimum1
meta
object

Additional information about the product.

property*
contract
object

The contract associated with the order.

id
string

The ID for this resource

Min length1
type
string

The type of the resource

Valid values[ "CONTRACT" ]
contractType
object

The contract type associated with the order.

id
string

The ID for this resource

Min length1
type
string

The type of the resource

Valid values[ "CONTRACT_TYPE" ]
count
integer

The count of all COMMITTED and PENDING orders associated with the linked subscription up to and including this order.

Minimum0
number
integer

The number of the order in the linked subscription contract, the first order of the subscription would have number 1. Useful for custom tracking of orders e.g. playlists.

Minimum0
transactions
Array of object

The transactions associated with the order.

object
transactionId
string
totalAmount
number
currency
string
state
string
history
Array of object
object
amount
number
result
string
action
string
meta
object
cursor
string
property*
links
object
next
string

The next page of results.

prev
string

The previous page of results.

current
string

The current page of results.

400

Bad Request

Expand All
object
error
Array of object

Details of problems encountered processing the request.

object

Details of a problem encountered processing the request.

status
string

The HTTP status code applicable to the problem

title
string

A short-human readable description of the problem, this should not change from occurrence to occurrence.

detail
string

A human-readable explanation specific to this occurrence of the problem.

401

Unauthorized

Expand All
object
error
Array of object

Details of problems encountered processing the request.

object

Details of a problem encountered processing the request.

status
string

The HTTP status code applicable to the problem

title
string

A short-human readable description of the problem, this should not change from occurrence to occurrence.

detail
string

A human-readable explanation specific to this occurrence of the problem.

403

Forbidden

Expand All
object
error
Array of object

Details of problems encountered processing the request.

object

Details of a problem encountered processing the request.

status
string

The HTTP status code applicable to the problem

title
string

A short-human readable description of the problem, this should not change from occurrence to occurrence.

detail
string

A human-readable explanation specific to this occurrence of the problem.

429

Too Many Requests

Expand All
object
error
Array of object

Details of problems encountered processing the request.

object

Details of a problem encountered processing the request.

status
string

The HTTP status code applicable to the problem

title
string

A short-human readable description of the problem, this should not change from occurrence to occurrence.

detail
string

A human-readable explanation specific to this occurrence of the problem.

500

Internal Server Error

Expand All
object
error
Array of object

Details of problems encountered processing the request.

object

Details of a problem encountered processing the request.

status
string

The HTTP status code applicable to the problem

title
string

A short-human readable description of the problem, this should not change from occurrence to occurrence.

detail
string

A human-readable explanation specific to this occurrence of the problem.

503

Service Unavailable

Expand All
object
error
Array of object

Details of problems encountered processing the request.

object

Details of a problem encountered processing the request.

status
string

The HTTP status code applicable to the problem

title
string

A short-human readable description of the problem, this should not change from occurrence to occurrence.

detail
string

A human-readable explanation specific to this occurrence of the problem.


Was this article helpful?