Suspend, self-exclude or reinstate one customer
/api/v1/users/{id}/statusFor a responsible gambling decision that arrives from YOUR system: a self-exclusion, a cool off, a fraud or chargeback hold. suspended stops every NEW quote and order for the customer on every path (the API and the embed) with 403 user_suspended, from the next request. Open positions, settlement, cash already owed and every read carry on unchanged: history is not a permission.
A self-exclusion is a suspension with reason: "self_exclusion". Parity does not police an exclusion period: you are the licensee, and a reinstatement you send is applied. A customer you have never sent is created, so you can exclude somebody before their first trade. Every change is recorded in your audit trail with the API key that sent it (GET /api/v1/audit).
Header parameters
x-parity-operatorstringoptionalFor an aggregator: the operator this request is for, one of your direct child operators, by its id or its slug (
GET /api/v1/operators/childrenlists them). Omit it, or name yourself, to act as yourself. A key may act only for a direct child in the same mode as its own operator; anything else is403 operator_not_permittedor403 mode_mismatch, and an unknown name answers exactly like an operator that is not yours.
Path parameters
idstringrequiredYour own id for the customer.
Bodyapplication/json
statusstring · enumrequiredPossible values:
activesuspendedreasonstring · enum · nullableoptionalWhy, with a suspension. Shown back on GET and in your audit trail; never to the customer. Ignored when reinstating: an active customer carries no reason.
Possible values:
self_exclusioncool_offresponsible_gamblingfraudchargebackoperator_requestothernotestring · nullableoptionalYour own words, for the audit trail. Never shown to the customer.
max length 500
Responses
- 200application/json
Stored. The status as it now stands, and
previousStatus.Show response fieldsHide response fields
externalUserIdstringrequiredstatusstring · enumrequiredPossible values:
activesuspendedreasonstring · enum · nullablerequiredThe reason you gave, or anomaly_controls when your account's anomaly controls in the back office suspended the player (you cannot send that one). Null when none was given, or the status was set in the portal.
Possible values:
self_exclusioncool_offresponsible_gamblingfraudchargebackoperator_requestotheranomaly_controlsnotestring · nullablerequiredYour own words, as you sent them.
changedAtstring · nullablerequiredWhen the status last changed, UTC. Null when it never has.
format: date-time
canTradebooleanrequiredBranch on this: false while suspended.
previousStatusstring · enumrequiredPossible values:
activesuspended
- 400application/json · Error
Malformed body or no customer id.
Codes:
invalid_json,invalid_request,missing_user.Show response fieldsHide response fields
errorstringrequiredMachine-readable code.
messagestringoptionaldetailanyoptionalPresent on validation failures and some refusals.
requiredstring | arrayoptionalOn
insufficient_scope: the scope this key needs. A single scope from the key gate; an array of every scope the call needs fromPOST /embed-sessionsandDELETE /embed-sessions/{id}.acceptedScopesstring[]optionalOn
insufficient_scopefrom a route that accepts any one of several scopes (the player limit, status, statement and audit routes): every scope that would pass.requiredis still the first of them.missingstring[]optionalOn
insufficient_scopefromPOST /embed-sessionsorDELETE /embed-sessions/{id}: the required scopes this key does not carry.supportedanyoptionalThe values that would have been accepted. On
invalid_typefromGET /reconciliation/feedand from both player activity feeds: the known item types, as an array of strings. Onstake_exceeds_available_depththe figure issupportedStakeinstead.statestring · nullableoptionalOn the refusals of
POST /orders/{id}/cancelandPOST /orders/{id}/confirm-reserve: the order's execution state when it was refused, or null for an unknown order.transmissionStatestring · enumoptionalOn the refusals of
POST /orders/{id}/cancel.unknownmeans keep holding the authorization;resolvedmeans the order's ownoperatorMoneyalready says what to apply.Possible values:
not_transmittedunknownresolvedearlieststringoptionalOn
updated_since_too_oldfrom the player activity feeds: the earliest instant the feed can answer from.format: date-time
noOrderForKeybooleanoptionalOn
quote_not_found,quote_expiredanduser_suspendedfromPOST /api/v1/orders: proof that no earlier request under thisclientOrderIdplaced an order.queuedbooleanoptionalOn
503 order_in_progress: this request was never run, because Parity was too busy to start it. Resend it unchanged.retryAfterSecondsnumberoptionalOn every
rate_limited: seconds until the window resets.Retry-Aftercarries the same figure.retryAfterMsnumberoptionalOn
over_tenant_exposure: milliseconds until the exposure window rolls over.maxStakenumberoptionalOn
over_wager_limitandstake_exceeds_stale_limit: the largest stake, in major units, that would be accepted.maxCentsnumberoptionalOn
line_not_available: the executable price, in cents, that put the line outside the wagerable band. A price, not an amount of money.requestedStakenumberoptionalOn
stake_exceeds_available_depth: the stake you asked for.supportedStakenumberoptionalOn
stake_exceeds_available_depth: the largest stake the book can fill at these terms. Re-quote at it to accept.orderIdstringoptionalOn
quote_already_usedandidempotency_conflictfromPOST /api/v1/orders: seeOrderConflict.executionRefstringoptionalOn a
POST /api/v1/ordersrefusal that closed an order Parity had already recorded (rejected,reconciliation_required,insufficient_collateral,insufficient_position): that order’s Parity execution reference. Quote it to Parity support.detailnever quotes a venue order id; this reference stands in for one.sellableContractsnumberoptionalOn
insufficient_positionandbelow_venue_minimumfrom a live cash out quote: the most contracts this customer could sell now, on the hundredth-of-a-contract grid.minimumContractsnumberoptionalOn the same two refusals: the smallest sale, in contracts, this market accepts.
- 401application/json · Error
The key is absent, unrecognised or revoked. Waiting does not help.
Codes:
missing_credentials,invalid_key,revoked_key.Show response fieldsHide response fields
errorstringrequiredMachine-readable code.
messagestringoptionaldetailanyoptionalPresent on validation failures and some refusals.
requiredstring | arrayoptionalOn
insufficient_scope: the scope this key needs. A single scope from the key gate; an array of every scope the call needs fromPOST /embed-sessionsandDELETE /embed-sessions/{id}.acceptedScopesstring[]optionalOn
insufficient_scopefrom a route that accepts any one of several scopes (the player limit, status, statement and audit routes): every scope that would pass.requiredis still the first of them.missingstring[]optionalOn
insufficient_scopefromPOST /embed-sessionsorDELETE /embed-sessions/{id}: the required scopes this key does not carry.supportedanyoptionalThe values that would have been accepted. On
invalid_typefromGET /reconciliation/feedand from both player activity feeds: the known item types, as an array of strings. Onstake_exceeds_available_depththe figure issupportedStakeinstead.statestring · nullableoptionalOn the refusals of
POST /orders/{id}/cancelandPOST /orders/{id}/confirm-reserve: the order's execution state when it was refused, or null for an unknown order.transmissionStatestring · enumoptionalOn the refusals of
POST /orders/{id}/cancel.unknownmeans keep holding the authorization;resolvedmeans the order's ownoperatorMoneyalready says what to apply.Possible values:
not_transmittedunknownresolvedearlieststringoptionalOn
updated_since_too_oldfrom the player activity feeds: the earliest instant the feed can answer from.format: date-time
noOrderForKeybooleanoptionalOn
quote_not_found,quote_expiredanduser_suspendedfromPOST /api/v1/orders: proof that no earlier request under thisclientOrderIdplaced an order.queuedbooleanoptionalOn
503 order_in_progress: this request was never run, because Parity was too busy to start it. Resend it unchanged.retryAfterSecondsnumberoptionalOn every
rate_limited: seconds until the window resets.Retry-Aftercarries the same figure.retryAfterMsnumberoptionalOn
over_tenant_exposure: milliseconds until the exposure window rolls over.maxStakenumberoptionalOn
over_wager_limitandstake_exceeds_stale_limit: the largest stake, in major units, that would be accepted.maxCentsnumberoptionalOn
line_not_available: the executable price, in cents, that put the line outside the wagerable band. A price, not an amount of money.requestedStakenumberoptionalOn
stake_exceeds_available_depth: the stake you asked for.supportedStakenumberoptionalOn
stake_exceeds_available_depth: the largest stake the book can fill at these terms. Re-quote at it to accept.orderIdstringoptionalOn
quote_already_usedandidempotency_conflictfromPOST /api/v1/orders: seeOrderConflict.executionRefstringoptionalOn a
POST /api/v1/ordersrefusal that closed an order Parity had already recorded (rejected,reconciliation_required,insufficient_collateral,insufficient_position): that order’s Parity execution reference. Quote it to Parity support.detailnever quotes a venue order id; this reference stands in for one.sellableContractsnumberoptionalOn
insufficient_positionandbelow_venue_minimumfrom a live cash out quote: the most contracts this customer could sell now, on the hundredth-of-a-contract grid.minimumContractsnumberoptionalOn the same two refusals: the smallest sale, in contracts, this market accepts.
- 403application/json · Error
The key is real and may not do this.
insufficient_scopenames the scope to add;operator_suspendedmeans the operator is not active (any status other than active);operator_archivedmeans Parity archived the operator, and every request with its keys is refused;operator_not_permittedmeansx-parity-operatornames an operator this key may not act for;mode_mismatchmeansx-parity-operatornames an operator in the other mode than the key (a sandbox key for a live operator, or a live key for a sandbox one), which is never allowed;sandbox_onlymeans the endpoint models a Parity-held balance and exists for sandbox integration only.Codes:
insufficient_scope,operator_suspended,operator_archived,operator_not_permitted,mode_mismatch,sandbox_only.Show response fieldsHide response fields
errorstringrequiredMachine-readable code.
messagestringoptionaldetailanyoptionalPresent on validation failures and some refusals.
requiredstring | arrayoptionalOn
insufficient_scope: the scope this key needs. A single scope from the key gate; an array of every scope the call needs fromPOST /embed-sessionsandDELETE /embed-sessions/{id}.acceptedScopesstring[]optionalOn
insufficient_scopefrom a route that accepts any one of several scopes (the player limit, status, statement and audit routes): every scope that would pass.requiredis still the first of them.missingstring[]optionalOn
insufficient_scopefromPOST /embed-sessionsorDELETE /embed-sessions/{id}: the required scopes this key does not carry.supportedanyoptionalThe values that would have been accepted. On
invalid_typefromGET /reconciliation/feedand from both player activity feeds: the known item types, as an array of strings. Onstake_exceeds_available_depththe figure issupportedStakeinstead.statestring · nullableoptionalOn the refusals of
POST /orders/{id}/cancelandPOST /orders/{id}/confirm-reserve: the order's execution state when it was refused, or null for an unknown order.transmissionStatestring · enumoptionalOn the refusals of
POST /orders/{id}/cancel.unknownmeans keep holding the authorization;resolvedmeans the order's ownoperatorMoneyalready says what to apply.Possible values:
not_transmittedunknownresolvedearlieststringoptionalOn
updated_since_too_oldfrom the player activity feeds: the earliest instant the feed can answer from.format: date-time
noOrderForKeybooleanoptionalOn
quote_not_found,quote_expiredanduser_suspendedfromPOST /api/v1/orders: proof that no earlier request under thisclientOrderIdplaced an order.queuedbooleanoptionalOn
503 order_in_progress: this request was never run, because Parity was too busy to start it. Resend it unchanged.retryAfterSecondsnumberoptionalOn every
rate_limited: seconds until the window resets.Retry-Aftercarries the same figure.retryAfterMsnumberoptionalOn
over_tenant_exposure: milliseconds until the exposure window rolls over.maxStakenumberoptionalOn
over_wager_limitandstake_exceeds_stale_limit: the largest stake, in major units, that would be accepted.maxCentsnumberoptionalOn
line_not_available: the executable price, in cents, that put the line outside the wagerable band. A price, not an amount of money.requestedStakenumberoptionalOn
stake_exceeds_available_depth: the stake you asked for.supportedStakenumberoptionalOn
stake_exceeds_available_depth: the largest stake the book can fill at these terms. Re-quote at it to accept.orderIdstringoptionalOn
quote_already_usedandidempotency_conflictfromPOST /api/v1/orders: seeOrderConflict.executionRefstringoptionalOn a
POST /api/v1/ordersrefusal that closed an order Parity had already recorded (rejected,reconciliation_required,insufficient_collateral,insufficient_position): that order’s Parity execution reference. Quote it to Parity support.detailnever quotes a venue order id; this reference stands in for one.sellableContractsnumberoptionalOn
insufficient_positionandbelow_venue_minimumfrom a live cash out quote: the most contracts this customer could sell now, on the hundredth-of-a-contract grid.minimumContractsnumberoptionalOn the same two refusals: the smallest sale, in contracts, this market accepts.
- 429application/json · Error
Over the per-key limit, or over the ceiling shared by every key the operator holds (
messagesays which).Retry-AfterandretryAfterSecondscarry the wait; theRateLimit-*headers always describe the key.Codes:
rate_limited.Show response fieldsHide response fields
errorstringrequiredMachine-readable code.
messagestringoptionaldetailanyoptionalPresent on validation failures and some refusals.
requiredstring | arrayoptionalOn
insufficient_scope: the scope this key needs. A single scope from the key gate; an array of every scope the call needs fromPOST /embed-sessionsandDELETE /embed-sessions/{id}.acceptedScopesstring[]optionalOn
insufficient_scopefrom a route that accepts any one of several scopes (the player limit, status, statement and audit routes): every scope that would pass.requiredis still the first of them.missingstring[]optionalOn
insufficient_scopefromPOST /embed-sessionsorDELETE /embed-sessions/{id}: the required scopes this key does not carry.supportedanyoptionalThe values that would have been accepted. On
invalid_typefromGET /reconciliation/feedand from both player activity feeds: the known item types, as an array of strings. Onstake_exceeds_available_depththe figure issupportedStakeinstead.statestring · nullableoptionalOn the refusals of
POST /orders/{id}/cancelandPOST /orders/{id}/confirm-reserve: the order's execution state when it was refused, or null for an unknown order.transmissionStatestring · enumoptionalOn the refusals of
POST /orders/{id}/cancel.unknownmeans keep holding the authorization;resolvedmeans the order's ownoperatorMoneyalready says what to apply.Possible values:
not_transmittedunknownresolvedearlieststringoptionalOn
updated_since_too_oldfrom the player activity feeds: the earliest instant the feed can answer from.format: date-time
noOrderForKeybooleanoptionalOn
quote_not_found,quote_expiredanduser_suspendedfromPOST /api/v1/orders: proof that no earlier request under thisclientOrderIdplaced an order.queuedbooleanoptionalOn
503 order_in_progress: this request was never run, because Parity was too busy to start it. Resend it unchanged.retryAfterSecondsnumberoptionalOn every
rate_limited: seconds until the window resets.Retry-Aftercarries the same figure.retryAfterMsnumberoptionalOn
over_tenant_exposure: milliseconds until the exposure window rolls over.maxStakenumberoptionalOn
over_wager_limitandstake_exceeds_stale_limit: the largest stake, in major units, that would be accepted.maxCentsnumberoptionalOn
line_not_available: the executable price, in cents, that put the line outside the wagerable band. A price, not an amount of money.requestedStakenumberoptionalOn
stake_exceeds_available_depth: the stake you asked for.supportedStakenumberoptionalOn
stake_exceeds_available_depth: the largest stake the book can fill at these terms. Re-quote at it to accept.orderIdstringoptionalOn
quote_already_usedandidempotency_conflictfromPOST /api/v1/orders: seeOrderConflict.executionRefstringoptionalOn a
POST /api/v1/ordersrefusal that closed an order Parity had already recorded (rejected,reconciliation_required,insufficient_collateral,insufficient_position): that order’s Parity execution reference. Quote it to Parity support.detailnever quotes a venue order id; this reference stands in for one.sellableContractsnumberoptionalOn
insufficient_positionandbelow_venue_minimumfrom a live cash out quote: the most contracts this customer could sell now, on the hundredth-of-a-contract grid.minimumContractsnumberoptionalOn the same two refusals: the smallest sale, in contracts, this market accepts.
- 500application/json · Error
Unexpected server failure. Safe to retry a read.
Codes:
internal_error.Show response fieldsHide response fields
errorstringrequiredMachine-readable code.
messagestringoptionaldetailanyoptionalPresent on validation failures and some refusals.
requiredstring | arrayoptionalOn
insufficient_scope: the scope this key needs. A single scope from the key gate; an array of every scope the call needs fromPOST /embed-sessionsandDELETE /embed-sessions/{id}.acceptedScopesstring[]optionalOn
insufficient_scopefrom a route that accepts any one of several scopes (the player limit, status, statement and audit routes): every scope that would pass.requiredis still the first of them.missingstring[]optionalOn
insufficient_scopefromPOST /embed-sessionsorDELETE /embed-sessions/{id}: the required scopes this key does not carry.supportedanyoptionalThe values that would have been accepted. On
invalid_typefromGET /reconciliation/feedand from both player activity feeds: the known item types, as an array of strings. Onstake_exceeds_available_depththe figure issupportedStakeinstead.statestring · nullableoptionalOn the refusals of
POST /orders/{id}/cancelandPOST /orders/{id}/confirm-reserve: the order's execution state when it was refused, or null for an unknown order.transmissionStatestring · enumoptionalOn the refusals of
POST /orders/{id}/cancel.unknownmeans keep holding the authorization;resolvedmeans the order's ownoperatorMoneyalready says what to apply.Possible values:
not_transmittedunknownresolvedearlieststringoptionalOn
updated_since_too_oldfrom the player activity feeds: the earliest instant the feed can answer from.format: date-time
noOrderForKeybooleanoptionalOn
quote_not_found,quote_expiredanduser_suspendedfromPOST /api/v1/orders: proof that no earlier request under thisclientOrderIdplaced an order.queuedbooleanoptionalOn
503 order_in_progress: this request was never run, because Parity was too busy to start it. Resend it unchanged.retryAfterSecondsnumberoptionalOn every
rate_limited: seconds until the window resets.Retry-Aftercarries the same figure.retryAfterMsnumberoptionalOn
over_tenant_exposure: milliseconds until the exposure window rolls over.maxStakenumberoptionalOn
over_wager_limitandstake_exceeds_stale_limit: the largest stake, in major units, that would be accepted.maxCentsnumberoptionalOn
line_not_available: the executable price, in cents, that put the line outside the wagerable band. A price, not an amount of money.requestedStakenumberoptionalOn
stake_exceeds_available_depth: the stake you asked for.supportedStakenumberoptionalOn
stake_exceeds_available_depth: the largest stake the book can fill at these terms. Re-quote at it to accept.orderIdstringoptionalOn
quote_already_usedandidempotency_conflictfromPOST /api/v1/orders: seeOrderConflict.executionRefstringoptionalOn a
POST /api/v1/ordersrefusal that closed an order Parity had already recorded (rejected,reconciliation_required,insufficient_collateral,insufficient_position): that order’s Parity execution reference. Quote it to Parity support.detailnever quotes a venue order id; this reference stands in for one.sellableContractsnumberoptionalOn
insufficient_positionandbelow_venue_minimumfrom a live cash out quote: the most contracts this customer could sell now, on the hundredth-of-a-contract grid.minimumContractsnumberoptionalOn the same two refusals: the smallest sale, in contracts, this market accepts.