Overview
Login
- Access
Merchants
- Merchant
- Configuration
- Onboarding
- Explore
Catalog
- Offers
- SKUs
- Categories
- Collections
- Currencies
Orders & Checkout
- Carts
- Cart Items
- Cart Customer
- Cart Discounts
- Cart Shipping
- Cart Pricing
- Cart Payment
- Cart Completion
- Orders
- Order Refunds
- Order Cancellations
- Transfers
Payments
- Payout Accounts
- Distributions
- Transfers
- Transfer Reversals
Events
- Webhooks
- Webhook Events
- Webhook Headers
Apps
- Merchant/App Installs
- Commission Rates
Operations
- Connection
Relay
- Shipping
Ecom Syncs
- Offers
Order Refunds
Refund Bag
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' \
--header 'X-Violet-App-Id: <x-violet-app-id>' \
--header 'X-Violet-App-Secret: <x-violet-app-secret>' \
--header 'X-Violet-Token: <x-violet-token>' \
--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,
"payment_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
}
],
"transfer_reversals": [
"<string>"
],
"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
Body
application/json
Request used to initiate a bag refund.
Response
default - application/json
default response
Order Refund
Was this page helpful?
curl --request POST \
--url https://sandbox-api.violet.io/v1/orders/{order_id}/bags/{bag_id}/refunds \
--header 'Content-Type: application/json' \
--header 'X-Violet-App-Id: <x-violet-app-id>' \
--header 'X-Violet-App-Secret: <x-violet-app-secret>' \
--header 'X-Violet-Token: <x-violet-token>' \
--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,
"payment_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
}
],
"transfer_reversals": [
"<string>"
],
"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
}
Assistant
Responses are generated using AI and may contain mistakes.