Get Return Commission Policy
Returns the return commission policy stored for a retailer with an app (overrides) and the policy that actually applies (effective, with a source of MERCHANT, APP or DEFAULT). Callable by Violet admins and the channel that owns the app.
Returns the return commission policy stored for a retailer with an app, and the policy that will actually apply, so that a channel can see what a sale made now would be treated as before one exists.
overridesis what is stored for this retailer. Anullvalue means there is no override.effectiveis the policy that applies, andsourcesays where it came from:MERCHANT(the retailer's override),APP(the app's own default, set on its payment configuration) orDEFAULT(the platform default,REVERSE). An app with no configuration has no default, soDEFAULTapplies.
The policy decides what happens to the commission on a returned sale: REVERSE reverses it (SAR contracts), RETAIN keeps it (SBR and SBR Net Receipts contracts). Nothing configured means REVERSE. The transaction fee is not part of the policy: an applied fee is never reversed.
Only Violet admins and the channel that owns the app, with the retailer enabled on it, can read this. The retailer cannot.
The retailer whose policy is read.
10000The app the retailer's policy is with.
10001Token of the caller: a Violet admin, or a user of the channel that owns the app.
Secret of the app the token was issued for.
Id of the app the token was issued for. This is not necessarily the app in the path.
10001The retailer's return commission policy with this app.
A retailer's return commission policy with one app: what happens to the commission when a sale is returned. 'overrides' is what is stored for this retailer; 'effective' is what applies to sales made from now on, and where it came from. A change applies to new sales only: a sale that already exists keeps the policy it was made under.
The retailer the policy is for.
10000The app the retailer's policy is with.
10001The caller is not a Violet admin or the channel that owns the app, or the retailer is not enabled on that app. Retailers cannot read their own policy, and a request with no credentials is refused.
The retailer is not connected to the app.
The database reported a concurrency failure while reading, for example that the read was chosen as a deadlock victim. This is rare, because reading takes no lock. Nothing was changed; retry the request.
An unexpected error occurred.
GET /v1/merchants/{merchant_id}/app_relationships/{app_id}/return_commission_policy HTTP/1.1
Host: sandbox-api.violet.io
X-Violet-Token: text
X-Violet-App-Secret: text
X-Violet-App-Id: 1
Accept: */*
{
"merchant_id": 10000,
"app_id": 10001,
"overrides": {
"return_commission_policy": "RETAIN"
},
"effective": {
"return_commission_policy": {
"value": "RETAIN",
"source": "MERCHANT"
}
}
}Last updated
Was this helpful?