POST
/
orders
/
{order_id}
/
bags
/
{bag_id}
/
refunds
curl --request POST \
  --url https://sandbox-api.violet.io/v1/orders/{order_id}/bags/{bag_id}/refunds \
  --header 'Content-Type: application/json' \
  --data '{
  "amount_refunded": 1000,
  "shipping": {
    "amount": 500
  },
  "skus": [
    {
      "order_sku_id": 10000,
      "quantity_refunded": 1,
      "amount_refunded": 500
    }
  ]
}'
{
  "id": 123,
  "order_id": 123,
  "bag_id": 123,
  "merchant_id": 123,
  "app_id": 123,
  "transaction_id": 123,
  "gateway_transaction_id": "<string>",
  "amount": 123,
  "merchant_transfer_reversal_amount_usd": 123,
  "developer_transfer_reversal_amount_usd": 123,
  "merchant_transfer_reversal_amount_platform_currency": 123,
  "developer_transfer_reversal_amount_platform_currency": 123,
  "reason": "<string>",
  "reason_code": "OTHER",
  "refund_currency": "<string>",
  "platform_currency": "<string>",
  "status": "PROCESSING",
  "skus": [
    {
      "id": 123,
      "refund_id": 123,
      "bag_id": 123,
      "quantity_refunded": 123,
      "external_id": "<string>",
      "order_sku_id": 123
    }
  ],
  "date_created": "2023-11-07T05:31:56Z",
  "date_last_modified": "2023-11-07T05:31:56Z",
  "external_id": "<string>",
  "errors": [
    {
      "id": 123,
      "error_code": 123,
      "error_message": "<string>",
      "resolved": true,
      "date_resolved": "2023-11-07T05:31:56Z",
      "date_created": "2023-11-07T05:31:56Z",
      "refund_id": 123
    }
  ],
  "shipping": {
    "amount": 1,
    "tax_amount": 1,
    "full_refund": true,
    "discrepancy_reason": "<string>"
  },
  "tax_amount": 1
}

Bag refunds is in beta. Please report any errors to Violet.

Initiate a refund on a Bag. This can be a full refund or a partial refund depending on the amounts you provide. This action will attempt to refund the external order in the merchants system.

The Bag must be in a refundable state. Any Bag’s that have a status of IN_PROGRESS, REFUNDED, or CANCELED cannot be refunded.

Headers

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

Path Parameters

order_id
integer
required
bag_id
integer
required

Body

application/json

Request used to initiate a bag refund.

Response

default - application/json
default response

Order Refund