Get an order

Prev Next
Get
/orders/v1/orders/{orderId}

Get a specific order from the Order Service.

Security
HTTP
Type bearer
Path parameters
orderId
stringRequired
Min length1
Responses
200

Retrieved Order

Expand All
object
data
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. AUTOFILLING: The order is currently being autofilled.CANCELLED: The order is cancelled.

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

Line items associated with the order.

OneOf
object
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.

isGift
boolean

Whether the product is a gift.

ExampleFalse
source
string

The source of why the item is in the order e.g. set by the contract, added by an admin.

Exampleadmin_edited
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" ]
phaseId
string

The identifier for the phase that order is in within the subscription contract. This is currently optional due to V2 contracts not containing the concept of phases.

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
shouldCutoffAt
string (date-time)

Represents when an order will no longer be editable and the configured cutoff flow will begin.

meta
object

Additional information about the order.

_from
object
contract
object
defaultNumberOfRecipes
integer | null
defaultNumberOfPortions
integer | null
_isCancelled
boolean
meta
object

Additional information about the resource.

property*
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.

source
object

The source of the error.

pointer
string

A pointer to the request field related to the problem.

parameter
string

A parameter related to the problem.

header
string

A header related to the problem.

meta
object

Additional metadata about the error.

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.

source
object

The source of the error.

pointer
string

A pointer to the request field related to the problem.

parameter
string

A parameter related to the problem.

header
string

A header related to the problem.

meta
object

Additional metadata about the error.

404

Not Found

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.

source
object

The source of the error.

pointer
string

A pointer to the request field related to the problem.

parameter
string

A parameter related to the problem.

header
string

A header related to the problem.

meta
object

Additional metadata about the error.

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.

source
object

The source of the error.

pointer
string

A pointer to the request field related to the problem.

parameter
string

A parameter related to the problem.

header
string

A header related to the problem.

meta
object

Additional metadata about the error.

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.

source
object

The source of the error.

pointer
string

A pointer to the request field related to the problem.

parameter
string

A parameter related to the problem.

header
string

A header related to the problem.

meta
object

Additional metadata about the error.

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.

source
object

The source of the error.

pointer
string

A pointer to the request field related to the problem.

parameter
string

A parameter related to the problem.

header
string

A header related to the problem.

meta
object

Additional metadata about the error.