GET
/
orders
/
{order_id}
/
cancellations
curl --request GET \
  --url https://sandbox-api.violet.io/v1/orders/{order_id}/cancellations
{
  "order_id": 10000,
  "app_id": 10000,
  "status": "CANCELED",
  "cancelled_bags": [
    {
      "order_id": 10000,
      "bag_id": 11111,
      "merchant_id": 22222,
      "external_order_id": "7438192837181",
      "status": "CANCELED",
      "originated_by": "VIOLET",
      "date_cancelled": "2024-10-24T14:00:39.000Z",
      "refund": {
        "id": 99999,
        "order_id": 10000,
        "bag_id": 11111,
        "merchant_id": 22222,
        "app_id": 10000,
        "transaction_id": 44444,
        "amount": 9900,
        "reason": "Order canceled",
        "refund_currency": "USD",
        "status": "COMPLETED",
        "skus": [
          {
            "id": 55555,
            "bag_id": 11111,
            "quantity_refunded": 1,
            "external_id": "41818918453315",
            "order_sku_id": 8014657
          },
          {
            "id": 55556,
            "bag_id": 77777,
            "quantity_refunded": 1,
            "external_id": "41832890171459",
            "order_sku_id": 77777
          }
        ],
        "date_created": "2024-10-24T14:00:35+0000",
        "date_last_modified": "2024-10-24T14:00:35+0000",
        "external_id": "943916482627",
        "errors": []
      }
    }
  ],
  "message": "All external orders were cancelled."
}

Headers

X-Violet-Token
string
X-Violet-App-Secret
string
X-Violet-App-Id
integer

Path Parameters

order_id
integer
required

Response

200
application/json
success

Cancellation record for an order.

order_id
integer

The ID of the order this cancellation relates to.

app_id
integer

The ID of the app that originated this order.

status
enum<string>

Status of the overall cancellation.

Available options:
CANCELED,
PARTIALLY_CANCELED,
CANCELLATION_FAILURE
cancelled_bags
object[]

Bags within the order that were cancelled.

message
string

Description of the outcome of the order cancellation request.