POST
/
orders
/
{order_id}
/
bags
/
{bag_id}
/
refunds

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.

amount_refunded
integer | null

Amount that should be refunded in cents. If no value is provided the full bag amount will be refunded.

Required range: x > 0
notify_customer
boolean | null
default:
false

Should the customer be notified by the merchants system of the refund. If no value is provided the merchants default system configuration for this feature will be used.

reason
string | null

Custom reason message for the refund.

Maximum length: 255
restock_items
boolean | null
default:
false

Should the items be restocked. Set to true when the order is being returned.

shipping
object | null

Details of any shipping refunds.

skus
array | null

Sku level refund data. If no Sku's are provided then all Skus will be refunded.

Response

default - application/json

Order Refund

amount
integer
required

Amount being refunded. In Cents

app_id
integer
required

ID of the App that created the Order

gateway_transaction_id
string
required

ID of the Transaction in the Payment Gateway

merchant_id
integer
required

ID of the merchant making the refund

order_id
integer
required

ID of the Order being refunded

transaction_id
integer
required

ID of the Transaction being refunded

bag_id
integer

ID of the Bag being refunded

date_created
string

Date of creation

date_last_modified
string

Date of last update

developer_transfer_reversal_amount_usd
integer

Amount being taken back from the associated transfer to the developer. In Cents

errors
object[]

List of errors associated to this refund during processing. This value will only be populated if there are errors during processing

external_id
string

ID of the refund on the external commerce platform. This value will only be populated if the external commerce platform supports refund ID's.

id
integer
merchant_transfer_reversal_amount_usd
integer

Amount being taken back from the associated transfer to the merchant. In Cents

reason
string

Reason for refund

reason_code
enum<string>

Reason code for refund

Available options:
OTHER,
CUSTOMER,
INVENTORY,
FRAUD,
DECLINED
refund_currency
string

Currency set for this refund by the external ecom platform

shipping
object | null

Details of any refunded shipping amounts.

skus
object[]

SKUs the refund applies to

status
enum<string>

Status of the Refund

Available options:
PROCESSING,
COMPLETED,
CANCELED,
PARTIALLY_COMPLETED,
FAILED,
EXTERNAL
tax_amount
integer | null

Tax amount being refunded. In Cents.

Required range: x > 0

Was this page helpful?