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

The currency to price the order in. The currency code should be provided in the 3 letter (ISO 4217 standard)[https://www.iso.org/iso-4217-currency-codes.html].

ExampleGBP
subtotal
integer

The price of all the line items on an order, calculated by the pricing calculator, before discounts are applied, in the currency's minor units e.g. pence or cents.

Minimum0
Example1500
formattedSubtotal
string

The subtotal formatted using the currencyCode.

Example£15.00
subtotalDiscount
integer

The discount applied to the subtotal, in the currency's minor units e.g. pence or cents.

Minimum0
Example150
formattedSubtotalDiscount
string

The subtotalDiscount formatted using the currencyCode.

Example£1.50
subtotalPrice
integer

The subtotal, after discounts have been applied, in the currency's minor units e.g. pence or cents.

Minimum0
Example1350
formattedSubtotalPrice
string

The subtotalPrice formatted using the currencyCode.

Example£13.50
delivery
integer

The fee for delivering the order, before discounts are applied, in the currency's minor units e.g. pence or cents.

Minimum0
Example399
formattedDelivery
string

The delivery formatted using the currencyCode.

Example£3.99
deliveryDiscount
integer

The discount applied to the delivery, in the currency's minor units e.g. pence or cents.

Minimum0
Example100
formattedDeliveryDiscount
string

The deliveryDiscount formatted using the currencyCode.

Example£1.00
deliveryPrice
integer

The deliveryPrice, after discounts have been applied, in the currency's minor units e.g. pence or cents.

Minimum0
Example299
formattedDeliveryPrice
string

The deliveryPrice formatted using the currencyCode.

Example£2.99
grossTotal
integer

The gross total of the order, subtotal + deliveryPrice, before discounts are applied, in the currency's minor units e.g. pence or cents.

Minimum0
Example1899
formattedGrossTotal
string

The grossTotal formatted using the currencyCode.

Example£18.99
totalDiscount
integer

The total discount applied to the order, subtotalDiscount + deliveryDiscount, in the currency's minor units e.g. pence or cents.

Minimum0
Example250
formattedTotalDiscount
string

The totalDiscount formatted using the currencyCode.

Example£2.50
totalPrice
integer

The total price of the order including discounts, grossTotal - totalDiscount, in the currency's minor units e.g. pence or cents.

Minimum0
Example1649
formattedTotalPrice
string

The totalPrice formatted using the currencyCode.

Example£16.49
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.
  • IN RETRY: The order will automatically retry following a retryable failure to bill.
Valid values[ "\"PENDING\"", "\"IN PROGRESS\"", "\"DELEGATED\"", "\"SUCCEEDED\"", "\"FAILED\"", "\"REFUNDED\"", "\"PARTIALLY REFUNDED\"", "\"AUTOFILLING\"", "\"CANCELLED\"", "\"IN RETRY\"" ]
billedPrice
integer

The price that was billed, in the currency's minor units, e.g. pence or cents.

Minimum0
Example649
formattedBilledPrice
string

The billedPrice formatted using the pricing.currencyCode.

Example£6.49
monetaryCreditUsed
integer

The amount of monetary credit used when the order was billed, in the currency's minor units, e.g. pence or cents.

Minimum0
Example1000
formattedMonetaryCreditUsed
string

The monetaryCreditUsed formatted using the pricing.currencyCode.

Example£10.00
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
refundedAmount
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.