Order Refunds by external order id
GET/v2/external-order-id/:id/refunds
Shows refunds information about an existing order and its products by external order id. This endpoint allows API users to get current information on the refunds of their orders.
Request
Path Parameters
ID of the order provided to Bonsai by the party who placed the order. This can be anything you like, but should be unique per order.
Responses
- 200
- 400
- 401
- 404
- 5XX
Success
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- Array [
- ]
- ]
data object
Public ID of the order.
Customer order number.
ID of the order provided to Bonsai by the party who placed the order. This can be anything you like, but should be unique per order.
refunds object[]required
products object[]required
Product ID.
The ID of the product variant.
Possible values: >= 1
Quantity of the product variant.
Total amount refunded across the subtotal, shipping, and taxes
breakdown objectrequired
The amount of goods refunded
The amount of goods tax refunded
The amount of shipping refunded
The amount of shipping tax refunded
The amount of duties refunded
Possible values: [CAD
, USD
, GBP
, AUD
, EUR
]
Currency of the refund
Refund creation date and time.
{
"data": {
"id": "cldbvy7gt0006hpzo9nyw72ks",
"orderNumber": 238636,
"externalId": "51cf91c1-da4a-42c4-81d3-3ec3e3268655",
"refunds": [
{
"products": [
{
"id": "clad6pg5z00eu012gfz7hfm92",
"variantId": "M00679529706740",
"quantity": 1
}
],
"refundReason": "string",
"refundedAmount": 100,
"breakdown": {
"goods": 5,
"goodsTax": 1,
"shipping": 1,
"shippingTax": 1,
"duties": 0,
"currency": "USD"
},
"refundedAt": "2023-02-06T19:44:55.460Z"
}
]
}
}
400 - Bad request
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
errors object[]
{
"errors": [
{
"status": 400,
"detail": "",
"title": "Bad input request"
}
]
}
401 - Unauthorized
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
errors object[]
Unique identifier for error. Can be used for tracing across services.
HTTP status code.
Unique code for specific error.
Short description what the error entails.
detail objectrequired
Useful details related to the error
{
"errors": [
{
"id": "123e4567-e89b-12d3-a456-426655440000",
"status": 401,
"code": "AUTHENTICATION_FAILED",
"title": "Authentication failed",
"detail": {
"authentication_expected": "Authorization header"
}
}
]
}
404 - Not found
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
errors object[]
Unique identifier for error. Can be used for tracing across services.
HTTP status code.
Unique code for specific error.
Short description what the error entails.
detail objectrequired
Useful details related to the error
{
"errors": [
{
"id": "123e4567-e89b-12d3-a456-426655440000",
"status": 404,
"code": "CUSTOMER_ORDER_NOT_FOUND",
"title": "Customer order has not been found",
"detail": {
"customer_order_id": "cldbvy7gt0006hpzo9nyw72ks"
}
}
]
}
500 - Unknown error
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
errors object[]
{
"errors": [
{
"status": 500,
"detail": "",
"title": "Unknown error"
}
]
}