Rebates
What this page solves
Manage rebate configuration and reconcile batch, payment and row results.
When to use it
Use this guide to configure rebates for your clients and reconcile the resulting batches, payments and calculation rows.
Before you start
Use an active signed API key. Select Partnership Read-only access (partnership.all:read) to inspect rebates, or Full access (partnership.all) to create and change rebate settings. See Authentication. Read existing groups and clients before changing them. Obtain group_id from the group list, rule_id from a group's rules, rebate_id from generated batches, and payment_id from payments. This API does not expose approval, rejection or payment-retry operations.
Recommended flow
- 1Read groups, their clients and rules to inspect current configuration.
- 2If you need to configure rebates, create or update the group, client settings or rules using Full access.
- 3Read generated rebate batches and inspect their status and amounts.
- 4Read payment records, then use a returned payment ID to read the included rebate rows.
- 5Compare processed, rejected and error amounts with individual row statuses.
- 6Re-read a result when processing has changed; ERROR is not necessarily permanent.
Configure rebates
Create a group, add client trading accounts, and adjust the group or its rules as needed. You can also set a percentage for multiple client accounts, change one account's rebate settings, or set the destination account for selected rows in a generated batch. Write operations require Full access (partnership.all). Read the affected resource after a lost response before deciding whether to repeat a write.
A group must have no assigned clients before you delete it. For group updates, include the intended rebate_percent even when changing another setting, and check need_approve in the response: approval is a separate process and is not available through this API. A group's AUTO type cannot be set through the update operation. Rule conditions use either USD or lot-based reward volume, and non-default rules run in ascending priority order. Each write operation lists its supported fields in API Reference; read filters such as limit, offset and ordering do not apply to these writes.
Batch periods and account counts
In the batch list, period_start_date and period_end_date are YYYY-MM-DD dates or null. clients_count counts clients; clients_accounts_count counts their trading accounts. The batch's group_id and group_name, and totals.clients_pending_count, can also be null.
Rebate group responses can return null for clients_count, rebate_percent, some period settings and link_code. Check the selected endpoint's schema before using these values.
Interpreting status
These tables describe status meanings, not a required transition sequence or the sort order of API results. A rebate does not have to pass through every listed status. Status values and their representation depend on the endpoint and response field.
Batch statuses
| Status | What It Means | Final? | Client action |
|---|---|---|---|
PENDING | awaiting approval | No | Read again to check for a later status; approval and payment actions are not available in this API. |
APPROVED | approved for processing | No | Read again to check processing progress. |
PROCESSING | a non-final processing state | No | Do not wait for this status before checking the rows and payments; it is not a required intermediate stage. |
ERROR | one or more rebate rows encountered a processing error | Not necessarily; processing can be retried | Inspect error and processed amounts and individual rows. ERROR does not imply that the processed amount is zero. |
PROCESSED_PARTIAL | both processed amounts and amounts with errors are present | Partial result | Compare processed and error amounts with the individual rows. |
PROCESSED | processing is complete with no remaining pending, approved, processing, or error amounts | Completed outcome* | Check rejected amounts and individual row statuses before treating every row as paid. |
REJECTED | the batch was rejected | Rejected outcome* | Inspect the rejected result; do not count it as a successful payment. |
Row statuses
| Status | What It Means | Final? | Client action |
|---|---|---|---|
PENDING | awaiting approval | No | Read again to check approval progress. History and payment-row lists exclude rows in this state. |
APPROVED | approved for processing | No | Row-list responses show this state as PROCESSING; aggregate responses can retain APPROVED. |
PROCESSING | payment processing is in progress; row lists also use this value for approved rows awaiting processing | No | Read again to reconcile the processing result. |
PROCESSED | processed successfully | Completed outcome* | Reconcile this row with the amounts and rows in its payment record. |
REJECTED | rejected without a successful payment | Rejected outcome* | Inspect the rejected result; do not count it as a successful payment. |
ERROR | processing failed | Not necessarily; processing can be retried | Inspect the returned processing error code where present and read again. For an unresolved error, provide the rebate or payment identifier and code to support. |
Payment statuses
| Status | What It Means | Final? | Client action |
|---|---|---|---|
PENDING | awaiting payment processing | No | Visible in payment details as totals.status; the payment list shows this state as PROCESSING. |
PROCESSING | payment processing is in progress; the payment list also uses this value for payments awaiting processing | No | Read again to reconcile the processing result. |
PROCESSED | payment processed successfully | Completed outcome* | Reconcile the reported amounts with the individual rows. |
REJECTED | payment rejected without a successful payout | Rejected outcome* | Inspect the rejected result; do not count it as a successful payment. |
ERROR | payment processing failed | Not necessarily; processing can be retried | Inspect the returned processing error code where present and read again. For an unresolved error, provide the rebate or payment identifier and code to support. |
Where each status appears
| Response | Field | Status handling |
|---|---|---|
| Batch list | data[].status | Batch status; compare the amounts and individual rows. Do not wait for PROCESSING before checking progress. |
| Rows for a batch | data[].status | PENDING can appear; APPROVED is returned as PROCESSING. |
| History and rows for a payment | data[].status | PENDING rows are excluded; APPROVED is returned as PROCESSING. |
| Aggregated rows | data[].status | PENDING and APPROVED can appear. Rows are grouped by status as well as account fields; this is not an overall status for the client account. |
| Payment list | data[].status | PENDING is returned as PROCESSING, which covers both waiting and ongoing processing. |
| Rows for a payment | totals.status | Payment status, separate from each row status in data. It can be null; when present, it preserves PENDING. |
*Completed or rejected describes the returned outcome. The contract does not guarantee that status values are immutable. Batch PROCESSED can include rejected rows: completion is determined from amounts, not solely from row counts. ERROR is not necessarily permanent. The same client account can have separate aggregate rows with different statuses; do not combine them into a single status by taking the first or last row.
Unrecognized status values
Status strings have no closed enums, and some totals.status fields can be null. The tables explain the currently documented values. Preserve an unrecognized string or null; neither confirms a successful or final outcome. Inspect the accompanying amounts and rows, and use support when the outcome cannot be interpreted. Do not trigger a payment or retry payment processing based on an unknown status. This API has no payment-retry operation.
API endpoints
Read rebates
- GET
/v1/partnership/autorebates— Lists generated rebate batches with client counts, amounts, and processing status. - GET
/v1/partnership/autorebates/clients— Lists client accounts available for rebate settings. - GET
/v1/partnership/autorebates/groups— Lists rebate groups with their percentage, period, and linked code. - GET
/v1/partnership/autorebates/groups/{group_id}— Retrieves a rebate group's percentage, schedule, linked code, and client count. - GET
/v1/partnership/autorebates/groups/{group_id}/clients— Lists client accounts assigned to a rebate group. - GET
/v1/partnership/autorebates/groups/{group_id}/rules— Lists a rebate group's account, volume, percentage, and priority rules. - GET
/v1/partnership/autorebates/history— Lists rebate rows and their processing history. - GET
/v1/partnership/autorebates/payments— Lists rebate payments with amounts, statuses, and processing results. - GET
/v1/partnership/autorebates/payments/{payment_id}/rebate-rows— Lists rebate rows included in a payment. - GET
/v1/partnership/autorebates/{rebate_id}/aggregates— Retrieves grouped rebate-row totals for one generated rebate batch. - GET
/v1/partnership/autorebates/{rebate_id}/clients— Lists client-account rebate rows for one generated rebate batch.
Change rebate settings
- PATCH
/v1/partnership/autorebates/clients— Set a rebate percentage for multiple client trading accounts. - PATCH
/v1/partnership/autorebates/clients/{client_account}— Change the rebate percentage or destination account for a single client trading account. - POST
/v1/partnership/autorebates/groups— Create a rebate group. - PATCH
/v1/partnership/autorebates/groups/{group_id}— Change rebate group settings; include the intended rebate percentage. - DELETE
/v1/partnership/autorebates/groups/{group_id}— Delete a group without assigned clients. - POST
/v1/partnership/autorebates/groups/{group_id}/clients— Add client accounts to a rebate group. - DELETE
/v1/partnership/autorebates/groups/{group_id}/clients— Remove client accounts from a rebate group. - POST
/v1/partnership/autorebates/groups/{group_id}/rules— Create a rule for a group. - PATCH
/v1/partnership/autorebates/groups/rules/{rule_id}— Change a rule's percentage, matching conditions or priority. - DELETE
/v1/partnership/autorebates/groups/rules/{rule_id}— Deactivate a rule. - PATCH
/v1/partnership/autorebates/{rebate_id}/clients— Change the account that receives selected pending rebates from the default account to another trading account of the same client.
Example request
Request-shape example; replace the authentication placeholders with a fresh signature.
GET /v1/partnership/autorebates/payments HTTP/1.1
Host: <your-api-host>
EXN-API-KEY: <your-api-key>
EXN-TIMESTAMP: <fresh-unix-milliseconds>
EXN-SIGN-VERSION: 1
EXN-DATA: <base64url-signed-data>
EXN-SIGN: <base64url-signature>
What to expect in return
HTTP 200 returns data and totals. Amounts in this operation are numbers; destination_client_account, client_account_type, error_code and processed_date can be null. When present, processed_date is a calendar date, not proof of a successful payment. The example illustrates response structure with an empty result.
{
"data": [],
"totals": {
"count": 0,
"reward": 0,
"reward_usd": 0,
"volume_lots": 0,
"processed_rebate": 0,
"processed_rebate_usd": 0,
"rejected_rebate_usd": 0,
"error_rebate_usd": 0
}
}
Common errors
The following errors apply to the example operation. Other operations can declare a different subset; follow their API Reference links.
| HTTP status / code | What It Means | How to Fix It |
|---|---|---|
429 / Throttled | A Partnership operation rate limit was exceeded. | Slow down the request rate and honor Retry-After when it is returned. |
504 / ServiceTransportError | A service required by the Partnership operation could not be reached or timed out. | Retry the request with exponential backoff. |
500 / Error | A Partnership operation failed because a required service could not complete the request. | Retry the request with backoff. |
401 / AuthenticationFailed | A Partnership service rejected the authenticated request after request authentication. API-key and request-signature failures use the numeric authentication errors. | Check the request authorization context. When the response uses the numeric envelope, follow the action for its error_message. |
403 / PermissionDenied | The authenticated identity cannot perform the operation or access the requested partner data. | Use credentials with the required Partnership permission and resource access. |
400 / ValidationError | Request validation failed, including bad-request or conflict conditions returned as validation errors. | Do not retry unchanged. Correct the request using details, then sign the corrected request again. |
502 / 1 — SYSTEM_BAD_GATEWAY | The API could not complete the request to the Partnership service. | Retry the request with backoff. |
503 / 2 — SYSTEM_TEMPORARY_UNAVAILABLE | A required service is temporarily unavailable or the request deadline was exceeded. | Retry the request with backoff. |
500 / 3 — SYSTEM_INTERNAL_ERROR | The API encountered an unexpected internal error. | Retry the request with backoff. |
401 / 1000 — AUTH_INVALID_API_KEY | The API key is invalid, expired, revoked, or not allowed for the request source. | Check the API key, its state, and its allowed source IP. |
401 / 1001 — AUTH_INVALID_SIGNATURE | The request signature or signed timestamp is invalid. | Rebuild the signature from the exact request and a fresh timestamp. |
403 / 1002 — AUTH_FORBIDDEN | The API key does not have a required operation scope. | Use an API key with the required Partnership scope. |
429 / 1003 — AUTH_RATE_LIMIT | The authentication rate limit was exceeded. | Honor Retry-After and reduce request rate. |
400 / 3001 — REQUEST_INVALID_PARAMETERS | Required headers or signed request data are malformed or inconsistent. | Correct the headers or signed values named by description, then sign the exact request again. |
Recovery and reconciliation
Interpret batch, row and payment statuses separately. PROCESSED at batch level does not mean every row was paid.
Row lists return APPROVED as PROCESSING; aggregates retain APPROVED. The payment list returns PENDING as PROCESSING, while payment details preserve the original payment status in totals.status when it is not null. Use the endpoint and field distinctions above when comparing results. error_code describes rebate processing and is separate from HTTP errors. For an unresolved processing error, provide the rebate or payment ID and returned code to support. No payment-retry operation is exposed.