Switch API reference
Switch: rating
Rate decks, sell decks and sell rates: what you pay and what you charge.
38 operationsBase URL https://packetexchange.io/api/v1Postman collection
BrowseSwitch: rating
Analyse the cost and configured margin of a destination
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Resolves the route a call from this customer trunk would take (the same resolver the switch uses), prices every eligible supplier with its own increment and deck, and estimates margin on a call of seconds length. Read-only: no call record, balance or capacity is touched. This is an estimate; see /margin/realised for what was actually earned.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
destinationrequired | query | string | - |
origin | query | string | - |
customerId | query | string (uuid) | - |
customerTrunkId | query | string (uuid) | - |
seconds | query | integer | Reference call length for the margin estimate |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
atrequireddata.at | string (date-time) | ISO-8601 timestamp (UTC) |
inputrequireddata.input | object | The destination, routed number, origin, customer, trunk and reference call length used |
basisrequireddata.basis | object | - |
resolvedrequireddata.basis.resolved | boolean | - |
detailrequireddata.basis.detail | string | - |
routingKindrequireddata.basis.routingKind | string | -One of fixed, group, dialplan, none |
routingNamerequireddata.basis.routingName | string | null | - |
selectionModerequireddata.basis.selectionMode | string | null | - |
maxAttemptsrequireddata.basis.maxAttempts | integer | null | - |
sellrequireddata.sell | object | - |
outcomerequireddata.sell.outcome | object | null | A price, or the reason there is none. Only kind = rated carries a rate. |
kindrequireddata.sell.outcome.kind | string | -One of rated, no_matching_rate, not_yet_effective, expired, forbidden, rating_failed, not_billable |
ratedata.sell.outcome.rate | number | Present when kind = rated. May legitimately be 0. |
matchedPrefixdata.sell.outcome.matchedPrefix | string | - |
deckVersiondata.sell.outcome.deckVersion | integer | null | - |
sourcedata.sell.outcome.source | string | - |
destinationdata.sell.outcome.destination | string | - |
effectiveFromdata.sell.outcome.effectiveFrom | string | - |
expiredAtdata.sell.outcome.expiredAt | string | - |
reasondata.sell.outcome.reason | string | Why it is forbidden or failed |
billingRaterequireddata.sell.billingRate | number | null | USD as a JSON number (engine output, up to 6 decimal places) |
matchedPrefixrequireddata.sell.matchedPrefix | string | null | - |
billingIncrementrequireddata.sell.billingIncrement | string | - |
suppliersrequireddata.suppliers | object[] | - |
vendorTrunkIdrequireddata.suppliers[].vendorTrunkId | string (uuid) | null | - |
labelrequireddata.suppliers[].label | string | - |
kindrequireddata.suppliers[].kind | string | -One of supplier trunk, marketplace route |
chainOrdinalrequireddata.suppliers[].chainOrdinal | integer | null | Attempt position in the failover chain; null if past the attempt ceiling |
outcomerequireddata.suppliers[].outcome | object | null | A price, or the reason there is none. Only kind = rated carries a rate.Same fields as SwitchRatingOutcome, shown earlier on this page. |
billingRaterequireddata.suppliers[].billingRate | number | null | USD as a JSON number (engine output, up to 6 decimal places) |
sourcerequireddata.suppliers[].source | string | -One of supplier deck, trunk default, marketplace listing, unpriced |
matchedPrefixrequireddata.suppliers[].matchedPrefix | string | null | - |
deckIdrequireddata.suppliers[].deckId | string (uuid) | null | - |
deckVersionrequireddata.suppliers[].deckVersion | integer | null | - |
billingIncrementrequireddata.suppliers[].billingIncrement | string | - |
excludedrequireddata.suppliers[].excluded | object | null | - |
stagerequireddata.suppliers[].excluded.stage | string | - |
reasonrequireddata.suppliers[].excluded.reason | string | - |
detailrequireddata.suppliers[].excluded.detail | string | - |
selectedrequireddata.selected | object | null | - |
vendorTrunkIdrequireddata.selected.vendorTrunkId | string (uuid) | null | - |
labelrequireddata.selected.label | string | - |
kindrequireddata.selected.kind | string | -One of supplier trunk, marketplace route |
chainOrdinalrequireddata.selected.chainOrdinal | integer | null | Attempt position in the failover chain; null if past the attempt ceiling |
outcomerequireddata.selected.outcome | object | null | A price, or the reason there is none. Only kind = rated carries a rate.Same fields as SwitchRatingOutcome, shown earlier on this page. |
billingRaterequireddata.selected.billingRate | number | null | USD as a JSON number (engine output, up to 6 decimal places) |
sourcerequireddata.selected.source | string | -One of supplier deck, trunk default, marketplace listing, unpriced |
matchedPrefixrequireddata.selected.matchedPrefix | string | null | - |
deckIdrequireddata.selected.deckId | string (uuid) | null | - |
deckVersionrequireddata.selected.deckVersion | integer | null | - |
billingIncrementrequireddata.selected.billingIncrement | string | - |
excludedrequireddata.selected.excluded | object | null | - |
stagerequireddata.selected.excluded.stage | string | - |
reasonrequireddata.selected.excluded.reason | string | - |
detailrequireddata.selected.excluded.detail | string | - |
configuredMarginrequireddata.configuredMargin | object | - |
kindrequireddata.configuredMargin.kind | string | -One of configured_estimate |
perMinuterequireddata.configuredMargin.perMinute | number | null | USD as a JSON number (engine output, up to 6 decimal places) |
perMinutePctrequireddata.configuredMargin.perMinutePct | number | null | - |
referenceCallrequireddata.configuredMargin.referenceCall | object | null | Revenue, cost and margin of a call of the reference length, increment-aware (JSON numbers) |
rangerequireddata.configuredMargin.range | object | null | - |
explainrequireddata.configuredMargin.explain | object[] | - |
labelrequireddata.configuredMargin.explain[].label | string | - |
valuerequireddata.configuredMargin.explain[].value | string | - |
notedata.configuredMargin.explain[].note | string | - |
sourcedata.configuredMargin.explain[].source | string | - |
traceIdrequireddata.traceId | string (uuid) | The route trace this analysis ran on |
verdictrequireddata.verdict | object | - |
sideEffectsrequireddata.sideEffects | object | - |
createdCdrrequireddata.sideEffects.createdCdr | boolean | -One of false |
movedBalancerequireddata.sideEffects.movedBalance | boolean | -One of false |
consumedCapacityrequireddata.sideEffects.consumedCapacity | boolean | -One of false |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
List the suppliers that can carry a customer's traffic
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Destination-independent: which supplier trunks the customer's routing makes eligible, and whether each can be priced. Name a customer or a customer trunk. When a customer has several trunks with different routing, ambiguous says so.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
customerId | query | string (uuid) | - |
customerTrunkId | query | string (uuid) | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
suppliersrequireddata.suppliers | object[] | - |
vendorTrunkIdrequireddata.suppliers[].vendorTrunkId | string (uuid) | - |
labelrequireddata.suppliers[].label | string | - |
statusrequireddata.suppliers[].status | string | - |
viarequireddata.suppliers[].via | object[] | - |
sourcerequireddata.suppliers[].via[].source | string | -One of fixed target, route group, failover group, dialplan rule |
groupIdrequireddata.suppliers[].via[].groupId | string (uuid) | null | - |
groupNamerequireddata.suppliers[].via[].groupName | string | null | - |
prefixrequireddata.suppliers[].via[].prefix | string | null | - |
priorityrequireddata.suppliers[].via[].priority | integer | null | - |
defaultRatePerUnitrequireddata.suppliers[].defaultRatePerUnit | money | null | US dollars as a decimal string with exactly 6 decimal places, e.g. "0.012500". Do money arithmetic with a decimal type, not floating point. USD as a decimal string with exactly 6 places, e.g. "0.012500". |
activeRateRowsrequireddata.suppliers[].activeRateRows | integer | - |
unpricedrequireddata.suppliers[].unpriced | boolean | True when the trunk has no rates and no default: calls to it cannot be costed |
billingIncrementrequireddata.suppliers[].billingIncrement | string | - |
routingrequireddata.routing | object | - |
kindrequireddata.routing.kind | string | -One of fixed, group, dialplan, none |
namerequireddata.routing.name | string | null | - |
selectionModerequireddata.routing.selectionMode | string | null | - |
maxAttemptsrequireddata.routing.maxAttempts | integer | null | - |
trunkIdsrequireddata.routing.trunkIds | string (uuid)[] | - |
ambiguousrequireddata.ambiguous | string | null | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Get realised margin over a period
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
What customers were actually charged minus what suppliers actually cost, including the estimated cost of answered attempts that did not win. All amounts are JSON numbers in USD. exposure lists what makes the figure less reliable (for example sessions billed with no supplier cost).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
from | query | string | ISO timestamp; default 24 hours before to |
to | query | string | ISO timestamp; default now |
customerId | query | string (uuid) | - |
customerTrunkId | query | string (uuid) | - |
supplierTrunkId | query | string (uuid) | - |
kind | query | string | voice (default) or all, which includes SMSOne of voice, all |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
kindrequireddata.kind | string | -One of realised_actual |
windowrequireddata.window | object | - |
fromrequireddata.window.from | string | - |
torequireddata.window.to | string | - |
labelrequireddata.window.label | string | - |
basisrequireddata.basis | object | - |
answerrequireddata.answer | object | - |
revenuerequireddata.revenue | object | - |
customerChargesrequireddata.revenue.customerCharges | number | USD as a JSON number (engine output, up to 6 decimal places) |
platformFeerequireddata.revenue.platformFee | number | USD as a JSON number (engine output, up to 6 decimal places) |
feeCertaintyrequireddata.revenue.feeCertainty | string | -One of exact, upper_bound |
operatorRevenuerequireddata.revenue.operatorRevenue | number | USD as a JSON number (engine output, up to 6 decimal places) |
costrequireddata.cost | object | - |
bookedrequireddata.cost.booked | number | USD as a JSON number (engine output, up to 6 decimal places) |
unbookedAttemptCostrequireddata.cost.unbookedAttemptCost | number | USD as a JSON number (engine output, up to 6 decimal places) |
unbookedAttemptsrequireddata.cost.unbookedAttempts | integer | - |
totalrequireddata.cost.total | number | USD as a JSON number (engine output, up to 6 decimal places) |
grossrequireddata.gross | number | USD as a JSON number (engine output, up to 6 decimal places) |
grossPctrequireddata.grossPct | number | null | - |
exposurerequireddata.exposure | object | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
List per-call realised margin
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
One row per session with its charge and every supplier attempt beneath it. Paged (limit up to 200).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
from | query | string | ISO timestamp; default 24 hours before to |
to | query | string | ISO timestamp; default now |
customerId | query | string (uuid) | - |
customerTrunkId | query | string (uuid) | - |
supplierTrunkId | query | string (uuid) | - |
kind | query | string | voice (default) or all, which includes SMSOne of voice, all |
negativeOnly | query | boolean | Only sessions that lost money |
failoverOnly | query | boolean | Only sessions that needed more than one attempt |
limit | query | integer | - |
offset | query | integer | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
rowsrequireddata.rows | object[] | - |
sessionKeyrequireddata.rows[].sessionKey | string | - |
callUuidrequireddata.rows[].callUuid | string | null | - |
atrequireddata.rows[].at | string (date-time) | ISO-8601 timestamp (UTC) |
destinationrequireddata.rows[].destination | string | null | - |
destinationNamerequireddata.rows[].destinationName | string | null | - |
customerTrunkIdrequireddata.rows[].customerTrunkId | string (uuid) | null | - |
statusrequireddata.rows[].status | string | null | - |
durationSecondsrequireddata.rows[].durationSeconds | integer | - |
billedSecondsrequireddata.rows[].billedSeconds | integer | null | - |
billingIncrementrequireddata.rows[].billingIncrement | string | null | - |
sellRaterequireddata.rows[].sellRate | number | null | USD as a JSON number (engine output, up to 6 decimal places) |
chargerequireddata.rows[].charge | number | USD as a JSON number (engine output, up to 6 decimal places) |
bookedCostrequireddata.rows[].bookedCost | number | USD as a JSON number (engine output, up to 6 decimal places) |
attemptsrequireddata.rows[].attempts | object[] | - |
ordinalrequireddata.rows[].attempts[].ordinal | integer | - |
supplierrequireddata.rows[].attempts[].supplier | string | null | - |
vendorTrunkIdrequireddata.rows[].attempts[].vendorTrunkId | string (uuid) | null | - |
outcomerequireddata.rows[].attempts[].outcome | string | - |
sipStatusrequireddata.rows[].attempts[].sipStatus | integer | null | - |
wonrequireddata.rows[].attempts[].won | boolean | - |
answeredSecondsrequireddata.rows[].attempts[].answeredSeconds | integer | null | - |
buyRaterequireddata.rows[].attempts[].buyRate | number | null | USD as a JSON number (engine output, up to 6 decimal places) |
costBasisrequireddata.rows[].attempts[].costBasis | string | -One of booked, derived, none |
derivedCostrequireddata.rows[].attempts[].derivedCost | number | null | USD as a JSON number (engine output, up to 6 decimal places) |
attemptCostrequireddata.rows[].attemptCost | number | USD as a JSON number (engine output, up to 6 decimal places) |
marginrequireddata.rows[].margin | number | USD as a JSON number (engine output, up to 6 decimal places) |
flagsrequireddata.rows[].flags | string[] | - |
totalrequireddata.total | integer | - |
limitrequireddata.limit | integer | - |
offsetrequireddata.offset | integer | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Get the realised margin of one call
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Parameters
| Name | In | Type | Description |
|---|---|---|---|
callUuidrequired | path | string | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as SwitchSessionMargin, shown earlier on this page. |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
List supplier rate decks
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Newest first, up to 500, with row counts and the supplier trunks each deck prices.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
supplierId | query | string (uuid) | Only decks from this provider |
trunkId | query | string (uuid) | Only decks that price this supplier trunk |
status | query | string | -One of draft, uploaded, invalid, validated, pending_approval, scheduled, active, expired, rolled_back |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
decksrequireddata.decks | object[] | - |
idrequireddata.decks[].id | string (uuid) | - |
supplierIdrequireddata.decks[].supplierId | string (uuid) | null | The provider who sent it; null for a deck recorded before its provider was |
namerequireddata.decks[].name | string | - |
currencyrequireddata.decks[].currency | string | -max 3 chars |
versionrequireddata.decks[].version | integer | - |
statusrequireddata.decks[].status | string | -One of draft, uploaded, invalid, validated, pending_approval, scheduled, active, expired, rolled_back |
effectiveFromrequireddata.decks[].effectiveFrom | string (date-time) | null | ISO-8601 timestamp (UTC) |
expiresAtrequireddata.decks[].expiresAt | string (date-time) | null | ISO-8601 timestamp (UTC) |
sourcerequireddata.decks[].source | string | null | -One of portal, csv, api, email, sftp |
sourceRefrequireddata.decks[].sourceRef | string | null | - |
approvedAtrequireddata.decks[].approvedAt | string (date-time) | null | ISO-8601 timestamp (UTC) |
validationrequireddata.decks[].validation | object | null | The last validation result; null before the deck is validated |
checkedAtrequireddata.decks[].validation.checkedAt | string | - |
rowsrequireddata.decks[].validation.rows | integer | - |
destinationsrequireddata.decks[].validation.destinations | integer | - |
errorsrequireddata.decks[].validation.errors | object[] | - |
warningsrequireddata.decks[].validation.warnings | object[] | - |
maxIncreasePctdata.decks[].validation.maxIncreasePct | number | - |
supersedesIdrequireddata.decks[].supersedesId | string (uuid) | null | - |
rolledBackAtrequireddata.decks[].rolledBackAt | string (date-time) | null | ISO-8601 timestamp (UTC) |
notesrequireddata.decks[].notes | string | null | - |
createdAtrequireddata.decks[].createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
updatedAtrequireddata.decks[].updatedAt | string (date-time) | ISO-8601 timestamp (UTC) |
rowCountrequireddata.decks[].rowCount | integer | - |
trunksrequireddata.decks[].trunks | object[] | Supplier trunks the deck prices |
idrequireddata.decks[].trunks[].id | string (uuid) | - |
labelrequireddata.decks[].trunks[].label | string | - |
mutablerequireddata.decks[].mutable | boolean | Whether rows can still be edited |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Create a supplier rate deck
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Creates a draft deck (version 1, or the next version of an existing name for that provider). Load rows with PUT /rate-decks/{id}/rows.
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Request body (application/json)
| Field | Type | Description |
|---|---|---|
supplierId | string (uuid) | null | - |
namerequired | string | -max 160 chars |
currency | string | -max 3 chars |
source | string | null | -One of portal, csv, api, email, sftp |
sourceRef | string | null | -max 500 chars |
effectiveFrom | string | null | -max 40 chars |
expiresAt | string | null | -max 40 chars |
trunkIds | string (uuid)[] | - |
notes | string | null | -max 4000 chars |
Response 201
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as SwitchRateDeck, shown earlier on this page. |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Get a supplier rate deck
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
The deck, its trunks and row count. Rows themselves are read from the supplier trunk rates.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as SwitchRateDeck, shown earlier on this page. |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Delete a rate deck
DELETE/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Deletes the deck and its rows. An active deck must be rolled back first.
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
deletedrequireddata.deleted | boolean | -One of true |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support. - Also
STALE_WRITE
List every version of a rate deck
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
All versions sharing this deck's name and provider, newest first.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
namerequireddata.name | string | - |
versionsrequireddata.versions | object[] | - |
idrequireddata.versions[].id | string (uuid) | - |
supplierIdrequireddata.versions[].supplierId | string (uuid) | null | The provider who sent it; null for a deck recorded before its provider was |
namerequireddata.versions[].name | string | - |
currencyrequireddata.versions[].currency | string | -max 3 chars |
versionrequireddata.versions[].version | integer | - |
statusrequireddata.versions[].status | string | -One of draft, uploaded, invalid, validated, pending_approval, scheduled, active, expired, rolled_back |
effectiveFromrequireddata.versions[].effectiveFrom | string (date-time) | null | ISO-8601 timestamp (UTC) |
expiresAtrequireddata.versions[].expiresAt | string (date-time) | null | ISO-8601 timestamp (UTC) |
sourcerequireddata.versions[].source | string | null | -One of portal, csv, api, email, sftp |
sourceRefrequireddata.versions[].sourceRef | string | null | - |
approvedAtrequireddata.versions[].approvedAt | string (date-time) | null | ISO-8601 timestamp (UTC) |
validationrequireddata.versions[].validation | object | null | The last validation result; null before the deck is validated |
checkedAtrequireddata.versions[].validation.checkedAt | string | - |
rowsrequireddata.versions[].validation.rows | integer | - |
destinationsrequireddata.versions[].validation.destinations | integer | - |
errorsrequireddata.versions[].validation.errors | object[] | - |
warningsrequireddata.versions[].validation.warnings | object[] | - |
maxIncreasePctdata.versions[].validation.maxIncreasePct | number | - |
supersedesIdrequireddata.versions[].supersedesId | string (uuid) | null | - |
rolledBackAtrequireddata.versions[].rolledBackAt | string (date-time) | null | ISO-8601 timestamp (UTC) |
notesrequireddata.versions[].notes | string | null | - |
createdAtrequireddata.versions[].createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
updatedAtrequireddata.versions[].updatedAt | string (date-time) | ISO-8601 timestamp (UTC) |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Compare a rate deck with the prices in force
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Per supplier trunk the deck covers, what activating it would change against the rows pricing calls now. Writes nothing.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
deckIdrequireddata.deckId | string (uuid) | - |
namerequireddata.name | string | - |
versionrequireddata.version | integer | - |
statusrequireddata.status | string | -One of draft, uploaded, invalid, validated, pending_approval, scheduled, active, expired, rolled_back |
effectiveFromrequireddata.effectiveFrom | string (date-time) | null | ISO-8601 timestamp (UTC) |
trunksrequireddata.trunks | object[] | - |
trunkIdrequireddata.trunks[].trunkId | string (uuid) | - |
labelrequireddata.trunks[].label | string | - |
diffrequireddata.trunks[].diff | object | What a change does to live pricing, with the biggest movers |
removalModerequireddata.trunks[].diff.removalMode | string | -One of merge, replace |
changeModerequireddata.trunks[].diff.changeMode | string | -One of amendment, full_replacement |
liverequireddata.trunks[].diff.live | integer | Prefixes priced on the live deck now |
incomingrequireddata.trunks[].diff.incoming | integer | Prefixes the new rows price |
addedrequireddata.trunks[].diff.added | integer | - |
changedrequireddata.trunks[].diff.changed | integer | - |
rateChangedrequireddata.trunks[].diff.rateChanged | integer | - |
incrementOnlyrequireddata.trunks[].diff.incrementOnly | integer | Changed rows where only the billing increment moved |
unchangedrequireddata.trunks[].diff.unchanged | integer | - |
removedrequireddata.trunks[].diff.removed | integer | Live prefixes the new rows do not mention |
originScopedrequireddata.trunks[].originScoped | integer | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Set which supplier trunks a rate deck prices
PUT/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
trunkIdsrequired | string (uuid)[] | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as SwitchRateDeck, shown earlier on this page. |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support. - Also
STALE_WRITE
Replace the rows of a draft rate deck
PUT/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Up to 200,000 rows, replacing whatever the deck held. Rows are stored pending and price nothing until the deck is activated. Validation runs straight after, and the validated deck is returned. Rows can only be changed while the deck is draft, uploaded, invalid or validated (mutable: true); an active deck is changed by opening a new version.
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
rowsrequired | object[] | - |
prefixrequiredrows[].prefix | string | -max 24 chars |
raterequiredrows[].rate | number | string | Price per minute; a number or a decimal string. Blank is refused, 0 is a real price. |
originrows[].origin | string | Caller-origin prefix; omit for any originmax 24 chars |
destinationNamerows[].destinationName | string | null | -max 96 chars |
countryrows[].country | string | null | -max 64 chars |
mccrows[].mcc | string | null | -max 8 chars |
mncrows[].mnc | string | null | -max 8 chars |
jurisdictionrows[].jurisdiction | string | null | -max 16 chars |
connectionFeerows[].connectionFee | number | string | null | - |
minChargedSecondsrows[].minChargedSeconds | integer | null | -min 0 |
billingIncrementrows[].billingIncrement | string | null | -max 10 chars |
effectiveFromrows[].effectiveFrom | string | null | -max 40 chars |
endDaterows[].endDate | string | null | -max 40 chars |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as SwitchRateDeck, shown earlier on this page. |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support. - Also
STALE_WRITE
Open a new draft version of a rate deck
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Copies this deck's rows and trunks into version n+1 as a draft, so an active deck can be repriced without editing it in place.
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Response 201
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as SwitchRateDeck, shown earlier on this page. |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support. - Also
STALE_WRITE
Validate a rate deck
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Checks the rows (missing prices, duplicate prefixes, increases) and stores the result on the deck. A deck with errors becomes invalid and cannot be activated.
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as SwitchRateDeck, shown earlier on this page. |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support. - Also
STALE_WRITE
Submit a rate deck for approval
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as SwitchRateDeck, shown earlier on this page. |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support. - Also
STALE_WRITE
Approve a rate deck, now or from a future date
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
With no effectiveFrom (or a past one) the deck is activated immediately. A future effectiveFrom schedules it and emits the cost_rate.scheduled webhook.
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
effectiveFrom | string | null | -max 40 chars |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as SwitchRateDeck, shown earlier on this page. |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support. - Also
STALE_WRITE
Activate a rate deck
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Makes the deck's rows price calls on its trunks from now on and supersedes the deck they replace. Exactly one deck is active per trunk.
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as SwitchRateDeck, shown earlier on this page. |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support. - Also
STALE_WRITE
Roll back an active rate deck
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Withdraws the deck and restores the one it superseded (named in restoredDeckId). Emits the cost_rate.rolled_back webhook.
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
idrequireddata.id | string (uuid) | - |
supplierIdrequireddata.supplierId | string (uuid) | null | The provider who sent it; null for a deck recorded before its provider was |
namerequireddata.name | string | - |
currencyrequireddata.currency | string | -max 3 chars |
versionrequireddata.version | integer | - |
statusrequireddata.status | string | -One of draft, uploaded, invalid, validated, pending_approval, scheduled, active, expired, rolled_back |
effectiveFromrequireddata.effectiveFrom | string (date-time) | null | ISO-8601 timestamp (UTC) |
expiresAtrequireddata.expiresAt | string (date-time) | null | ISO-8601 timestamp (UTC) |
sourcerequireddata.source | string | null | -One of portal, csv, api, email, sftp |
sourceRefrequireddata.sourceRef | string | null | - |
approvedAtrequireddata.approvedAt | string (date-time) | null | ISO-8601 timestamp (UTC) |
validationrequireddata.validation | object | null | The last validation result; null before the deck is validated |
checkedAtrequireddata.validation.checkedAt | string | - |
rowsrequireddata.validation.rows | integer | - |
destinationsrequireddata.validation.destinations | integer | - |
errorsrequireddata.validation.errors | object[] | - |
warningsrequireddata.validation.warnings | object[] | - |
maxIncreasePctdata.validation.maxIncreasePct | number | - |
supersedesIdrequireddata.supersedesId | string (uuid) | null | - |
rolledBackAtrequireddata.rolledBackAt | string (date-time) | null | ISO-8601 timestamp (UTC) |
notesrequireddata.notes | string | null | - |
createdAtrequireddata.createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
updatedAtrequireddata.updatedAt | string (date-time) | ISO-8601 timestamp (UTC) |
rowCountrequireddata.rowCount | integer | - |
trunksrequireddata.trunks | object[] | Supplier trunks the deck prices |
idrequireddata.trunks[].id | string (uuid) | - |
labelrequireddata.trunks[].label | string | - |
mutablerequireddata.mutable | boolean | Whether rows can still be edited |
restoredDeckIdrequireddata.restoredDeckId | string (uuid) | null | - |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support. - Also
STALE_WRITE
Show what a blank rating or limit field inherits
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Your operator defaults, the platform fallbacks, and the inheritance chain for each field in plain words.
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
operatorrequireddata.operator | object | - |
markupPctrequireddata.operator.markupPct | number | null | - |
dailySpendCaprequireddata.operator.dailySpendCap | number | null | USD, a JSON number |
maxConcurrentCallsrequireddata.operator.maxConcurrentCalls | number | null | - |
billingIncrementrequireddata.operator.billingIncrement | string | null | - |
platformrequireddata.platform | object | - |
billingIncrementrequireddata.platform.billingIncrement | string | -One of 1/1 |
maxConcurrentCallsrequireddata.platform.maxConcurrentCalls | enum | null | -One of null |
maxCpsrequireddata.platform.maxCps | enum | null | -One of null |
chainsrequireddata.chains | object | Field name -> how a blank resolves |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
List sell decks
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Every version of every sell deck, with how many customers and trunks each one reaches.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
status | query | string | -One of draft, active, superseded, archived |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
decksrequireddata.decks | object[] | - |
idrequireddata.decks[].id | string (uuid) | - |
namerequireddata.decks[].name | string | - |
versionrequireddata.decks[].version | integer | - |
statusrequireddata.decks[].status | string | -One of draft, active, superseded, archived |
currencyrequireddata.decks[].currency | string | -max 3 chars |
isSystemDefaultrequireddata.decks[].isSystemDefault | boolean | - |
defaultRatePerUnitrequireddata.decks[].defaultRatePerUnit | number | null | Catch-all price for destinations the deck does not list (a JSON number) |
chargingrequireddata.decks[].charging | object | - |
minimumDurationSecondsrequireddata.decks[].charging.minimumDurationSeconds | integer | null | - |
firstIntervalSecondsrequireddata.decks[].charging.firstIntervalSeconds | integer | null | - |
subsequentIntervalSecondsrequireddata.decks[].charging.subsequentIntervalSeconds | integer | null | - |
setupFeerequireddata.decks[].charging.setupFee | number | null | Per-call setup fee (a JSON number) |
graceSecondsrequireddata.decks[].charging.graceSeconds | integer | null | - |
roundingrequireddata.decks[].charging.rounding | string | null | -One of up, nearest, down |
effectiveFromrequireddata.decks[].effectiveFrom | string (date-time) | null | ISO-8601 timestamp (UTC) |
notesrequireddata.decks[].notes | string | null | - |
updatedAtrequireddata.decks[].updatedAt | string (date-time) | ISO-8601 timestamp (UTC) |
activeRatesrequireddata.decks[].activeRates | integer | Rows in the deck |
customersOnItrequireddata.decks[].customersOnIt | integer | Customers whose default deck this is |
trunksNamingItrequireddata.decks[].trunksNamingIt | integer | Trunks that name this deck directly |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Create a sell deck
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Creates a draft (version 1, or the next version of an existing name). Load prices, then publish.
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Request body (application/json)
| Field | Type | Description |
|---|---|---|
namerequired | string | -max 160 chars |
currency | string | -max 3 chars |
defaultRatePerUnit | number | string | null | Catch-all price; null or "" clears it |
minimumDurationSeconds | integer | null | -0 to 3600 |
firstIntervalSeconds | integer | null | Set together with subsequentIntervalSeconds, or neither1 to 3600 |
subsequentIntervalSeconds | integer | null | -1 to 3600 |
setupFee | number | string | null | - |
graceSeconds | integer | null | -0 to 120 |
rounding | string | null | -One of up, nearest, down |
notes | string | null | - |
effectiveFrom | string | null | ISO timestamp |
Response 201
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
idrequireddata.id | string (uuid) | - |
namerequireddata.name | string | - |
versionrequireddata.version | integer | - |
statusrequireddata.status | string | -One of draft, active, superseded, archived |
currencyrequireddata.currency | string | -max 3 chars |
isSystemDefaultrequireddata.isSystemDefault | boolean | - |
defaultRatePerUnitrequireddata.defaultRatePerUnit | number | null | Catch-all price for destinations the deck does not list (a JSON number) |
chargingrequireddata.charging | object | - |
minimumDurationSecondsrequireddata.charging.minimumDurationSeconds | integer | null | - |
firstIntervalSecondsrequireddata.charging.firstIntervalSeconds | integer | null | - |
subsequentIntervalSecondsrequireddata.charging.subsequentIntervalSeconds | integer | null | - |
setupFeerequireddata.charging.setupFee | number | null | Per-call setup fee (a JSON number) |
graceSecondsrequireddata.charging.graceSeconds | integer | null | - |
roundingrequireddata.charging.rounding | string | null | -One of up, nearest, down |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Get a sell deck with its reach and versions
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Parameters
| Name | In | Type | Description |
|---|---|---|---|
deckIdrequired | path | string | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
idrequireddata.id | string (uuid) | - |
namerequireddata.name | string | - |
versionrequireddata.version | integer | - |
statusrequireddata.status | string | -One of draft, active, superseded, archived |
currencyrequireddata.currency | string | -max 3 chars |
isSystemDefaultrequireddata.isSystemDefault | boolean | - |
defaultRatePerUnitrequireddata.defaultRatePerUnit | number | null | Catch-all price for destinations the deck does not list (a JSON number) |
chargingrequireddata.charging | object | - |
minimumDurationSecondsrequireddata.charging.minimumDurationSeconds | integer | null | - |
firstIntervalSecondsrequireddata.charging.firstIntervalSeconds | integer | null | - |
subsequentIntervalSecondsrequireddata.charging.subsequentIntervalSeconds | integer | null | - |
setupFeerequireddata.charging.setupFee | number | null | Per-call setup fee (a JSON number) |
graceSecondsrequireddata.charging.graceSeconds | integer | null | - |
roundingrequireddata.charging.rounding | string | null | -One of up, nearest, down |
effectiveFromrequireddata.effectiveFrom | string (date-time) | null | ISO-8601 timestamp (UTC) |
notesrequireddata.notes | string | null | - |
supersedesIdrequireddata.supersedesId | string (uuid) | null | - |
approvedAtrequireddata.approvedAt | string (date-time) | null | ISO-8601 timestamp (UTC) |
createdAtrequireddata.createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
updatedAtrequireddata.updatedAt | string (date-time) | ISO-8601 timestamp (UTC) |
activeRatesrequireddata.activeRates | integer | - |
customersDefaultingToItrequireddata.customersDefaultingToIt | object[] | - |
idrequireddata.customersDefaultingToIt[].id | string (uuid) | - |
labelrequireddata.customersDefaultingToIt[].label | string | null | - |
trunksNamingItrequireddata.trunksNamingIt | object[] | - |
idrequireddata.trunksNamingIt[].id | string (uuid) | - |
labelrequireddata.trunksNamingIt[].label | string | null | - |
subAccountIdrequireddata.trunksNamingIt[].subAccountId | string (uuid) | - |
versionsrequireddata.versions | object[] | - |
idrequireddata.versions[].id | string (uuid) | - |
versionrequireddata.versions[].version | integer | - |
statusrequireddata.versions[].status | string | -One of draft, active, superseded, archived |
effectiveFromrequireddata.versions[].effectiveFrom | string (date-time) | null | ISO-8601 timestamp (UTC) |
createdAtrequireddata.versions[].createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Update a sell deck's name, notes or charging profile
PATCH/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Superseded and archived decks cannot change. Changing the charging profile of an ACTIVE deck reprices every trunk on it from the next call, and is logged as a warning.
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
deckIdrequired | path | string | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
name | string | -max 160 chars |
currency | string | -max 3 chars |
defaultRatePerUnit | number | string | null | Catch-all price; null or "" clears it |
minimumDurationSeconds | integer | null | -0 to 3600 |
firstIntervalSeconds | integer | null | Set together with subsequentIntervalSeconds, or neither1 to 3600 |
subsequentIntervalSeconds | integer | null | -1 to 3600 |
setupFee | number | string | null | - |
graceSeconds | integer | null | -0 to 120 |
rounding | string | null | -One of up, nearest, down |
notes | string | null | - |
effectiveFrom | string | null | ISO timestamp |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as SwitchSellDeck, shown earlier on this page. |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
List the prices in a sell deck
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Parameters
| Name | In | Type | Description |
|---|---|---|---|
deckIdrequired | path | string | - |
search | query | string | Prefix search (digits) |
limit | query | integer | Default 100, max 1000 |
offset | query | integer | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
rowsrequireddata.rows | object[] | - |
idrequireddata.rows[].id | string (uuid) | - |
deckIdrequireddata.rows[].deckId | string (uuid) | - |
prefixrequireddata.rows[].prefix | string | - |
originPrefixrequireddata.rows[].originPrefix | string | "" = any origin |
ratePerUnitrequireddata.rows[].ratePerUnit | money | USD as a decimal string with exactly 6 places, e.g. "0.012500". |
billingIncrementrequireddata.rows[].billingIncrement | string | null | null = inherit the trunk or customer default |
destinationNamerequireddata.rows[].destinationName | string | null | - |
createdAtrequireddata.rows[].createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
updatedAtrequireddata.rows[].updatedAt | string (date-time) | ISO-8601 timestamp (UTC) |
totalrequireddata.total | integer | - |
limitrequireddata.limit | integer | - |
offsetrequireddata.offset | integer | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Replace the prices in a draft sell deck
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Up to 200,000 rows, replacing whatever the draft held (last row wins per prefix and origin). Published decks are never overwritten; open a new version instead.
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
deckIdrequired | path | string | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
rowsrequired | object[] | - |
prefixrequiredrows[].prefix | string | -max 24 chars |
raterequiredrows[].rate | number | string | A blank is refused; 0 is a real price |
originrows[].origin | string | null | -max 24 chars |
billingIncrementrows[].billingIncrement | string | null | "first/subsequent", e.g. 60/60; anything else is stored as inherit |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
loadedrequireddata.loaded | integer | - |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Open a new draft version of a sell deck
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Copies the deck's charging profile and prices into version n+1 as a draft. Publishing it is what moves prices.
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
deckIdrequired | path | string | - |
Response 201
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
idrequireddata.id | string (uuid) | - |
namerequireddata.name | string | - |
versionrequireddata.version | integer | - |
statusrequireddata.status | string | -One of draft, active, superseded, archived |
currencyrequireddata.currency | string | -max 3 chars |
isSystemDefaultrequireddata.isSystemDefault | boolean | - |
defaultRatePerUnitrequireddata.defaultRatePerUnit | number | null | Catch-all price for destinations the deck does not list (a JSON number) |
chargingrequireddata.charging | object | - |
minimumDurationSecondsrequireddata.charging.minimumDurationSeconds | integer | null | - |
firstIntervalSecondsrequireddata.charging.firstIntervalSeconds | integer | null | - |
subsequentIntervalSecondsrequireddata.charging.subsequentIntervalSeconds | integer | null | - |
setupFeerequireddata.charging.setupFee | number | null | Per-call setup fee (a JSON number) |
graceSecondsrequireddata.charging.graceSeconds | integer | null | - |
roundingrequireddata.charging.rounding | string | null | -One of up, nearest, down |
copiedRatesrequireddata.copiedRates | integer | - |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Publish a sell deck (preview first, then confirm)
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Without confirm: true this only reports whose prices would change and writes nothing. With it, the deck becomes active, the previous version is superseded, and its prices are written onto every trunk that resolves to it, from the next call onward.
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
deckIdrequired | path | string | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
confirm | boolean | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
publisheddata.published | boolean | -One of true |
wouldChangedata.wouldChange | object | - |
ratesrequireddata.wouldChange.rates | integer | - |
trunksrequireddata.wouldChange.trunks | integer | - |
messagerequireddata.wouldChange.message | string | - |
trunksdata.trunks | integer | - |
rowsWrittendata.rowsWritten | integer | - |
rowsSupersededdata.rowsSuperseded | integer | - |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Set or clear the system default sell deck
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
The deck used by trunks set to "system default". Only an active deck qualifies; send deckId: null to clear it.
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Request body (application/json)
| Field | Type | Description |
|---|---|---|
deckId | string (uuid) | null | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
systemDefaultDeckIdrequireddata.systemDefaultDeckId | string (uuid) | null | - |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Look up the buy and sell price for a destination
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Read-only. The buy side needs a supplier trunkId; the sell side is resolved for the customer or customer trunk named (or your own sell rates). Each side is a rating outcome, so "no matching rate" is distinguishable from a price of 0. margin is present only when both sides are rated.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
destinationrequired | query | string | - |
trunkId | query | string (uuid) | Supplier trunk for the buy side |
customerId | query | string (uuid) | - |
customerTrunkId | query | string (uuid) | - |
origin | query | string | Caller number, for origin-based rates |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
destinationrequireddata.destination | string | - |
originrequireddata.origin | string | null | - |
buyrequireddata.buy | object | null | null when no trunkId was givenSame fields as SwitchRatingOutcome, shown earlier on this page. |
sellrequireddata.sell | object | A price, or the reason there is none. Only kind = rated carries a rate.Same fields as SwitchRatingOutcome, shown earlier on this page. |
marginrequireddata.margin | number | null | sell minus buy per minute, a JSON number; null unless both are rated |
atrequireddata.at | string (date-time) | ISO-8601 timestamp (UTC) |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
List your operator sell rates
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
The operator-wide A-Z sell rates, by prefix.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
search | query | string | Prefix search (digits) |
limit | query | integer | Default 100, max 1000 |
offset | query | integer | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
rowsrequireddata.rows | object[] | - |
idrequireddata.rows[].id | string (uuid) | - |
prefixrequireddata.rows[].prefix | string | - |
originPrefixrequireddata.rows[].originPrefix | string | "" = any origin |
ratePerUnitrequireddata.rows[].ratePerUnit | money | USD as a decimal string with exactly 6 places, e.g. "0.012500". |
billingIncrementrequireddata.rows[].billingIncrement | string | null | null = inherit the trunk default |
createdAtrequireddata.rows[].createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
updatedAtrequireddata.rows[].updatedAt | string (date-time) | ISO-8601 timestamp (UTC) |
totalrequireddata.total | integer | - |
limitrequireddata.limit | integer | - |
offsetrequireddata.offset | integer | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Add or update one operator sell rate
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Upserts by prefix and origin. Emits the sell_rate.changed webhook.
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Request body (application/json)
| Field | Type | Description |
|---|---|---|
prefixrequired | string | -max 24 chars |
raterequired | number | Price per minute, as a JSON numbermin 0 |
origin | string | -max 24 chars |
billingIncrement | string | e.g. 60/60 or 1/1; omit to inherit the trunk defaultmax 10 chars |
Response 201
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as SwitchSellRate, shown earlier on this page. |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Add or update operator sell rates in bulk
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Up to 50,000 rows in one transaction; the last row wins per prefix and origin. Emits one sell_rate.changed webhook.
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Request body (application/json)
| Field | Type | Description |
|---|---|---|
rowsrequired | object[] | - |
prefixrequiredrows[].prefix | string | -max 24 chars |
raterequiredrows[].rate | number | Price per minute, as a JSON numbermin 0 |
originrows[].origin | string | -max 24 chars |
billingIncrementrows[].billingIncrement | string | e.g. 60/60 or 1/1; omit to inherit the trunk defaultmax 10 chars |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
appliedrequireddata.applied | integer | - |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Delete an operator sell rate
DELETE/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
deletedrequireddata.deleted | boolean | -One of true |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Clear operator sell rates
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Deletes the listed prefixes, or EVERY operator sell rate when prefixes is omitted.
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Request body (application/json)
| Field | Type | Description |
|---|---|---|
prefixes | string[] | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
deletedrequireddata.deleted | integer | - |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Read a rate sheet and propose a column mapping
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 10 requests per minute
Step 1 of the guided import into any switch deck (your own sell deck, a supplier trunk or a customer trunk). Returns the detected columns, a sample and warnings. Writes nothing.
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Request body (multipart/form-data)
| Field | Type | Description |
|---|---|---|
targetKindrequired | string | -One of operator, supplier, customer |
targetId | string (uuid) | - |
targetTrunkId | string (uuid) | - |
defaultIncrement | string | - |
changeMode | string | -One of amendment, full_replacement |
effectiveFrom | string (date-time) | - |
timezone | string | -max 64 chars |
fxRate | string | Units of USD per 1 unit of the sheet currency; required to apply a non-USD sheet |
replace | string | Legacy form of changeMode=full_replacementOne of true, false |
mapping | string | The confirmed column mapping from the parse step, as JSON text |
filerequired | string | The rate sheet (CSV or XLSX), sent LAST |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
targetLabelrequireddata.targetLabel | string | - |
mappingrequireddata.mapping | object | Detected column mapping; send it back (as JSON) on diff and apply |
rawSamplerequireddata.rawSample | any[][] | The first 8 raw rows |
previewRowsrequireddata.previewRows | object[] | Up to 50 parsed rows |
rowCountrequireddata.rowCount | integer | - |
warningsrequireddata.warnings | object[] | - |
currencyrequireddata.currency | string | - |
summaryrequireddata.summary | object | - |
overLimitrequireddata.overLimit | boolean | - |
maxRowsrequireddata.maxRows | integer | - |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Preview what a rate sheet would change
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Dry run: compares the sheet with the target deck's live rows and reports added, changed and removed prefixes. changeMode decides whether omitted prefixes stop pricing. Writes nothing.
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Request body (multipart/form-data)
| Field | Type | Description |
|---|---|---|
targetKindrequired | string | -One of operator, supplier, customer |
targetId | string (uuid) | - |
targetTrunkId | string (uuid) | - |
defaultIncrement | string | - |
changeMode | string | -One of amendment, full_replacement |
effectiveFrom | string (date-time) | - |
timezone | string | -max 64 chars |
fxRate | string | Units of USD per 1 unit of the sheet currency; required to apply a non-USD sheet |
replace | string | Legacy form of changeMode=full_replacementOne of true, false |
mapping | string | The confirmed column mapping from the parse step, as JSON text |
filerequired | string | The rate sheet (CSV or XLSX), sent LAST |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
targetLabelrequireddata.targetLabel | string | - |
rowCountdata.rowCount | integer | - |
currencyrequireddata.currency | string | - |
warningsrequireddata.warnings | object[] | - |
diffdata.diff | object | What a change does to live pricing, with the biggest moversSame fields as SwitchRateDeckDiff, shown earlier on this page. |
applieddata.applied | integer | Rows written (apply) or queued (scheduled apply) |
replaceddata.replaced | boolean | - |
scheduleddata.scheduled | boolean | Present when a future effectiveFrom queued the sheetOne of true |
effectiveFromdata.effectiveFrom | string | - |
originScopeddata.originScoped | integer | Origin-scoped live rows a sheet cannot express, counted not changed |
overLimitdata.overLimit | boolean | - |
maxRowsdata.maxRows | integer | - |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Apply a rate sheet to a switch deck
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 20 requests per minute
Writes the sheet in one transaction and reports what landed. A non-USD sheet needs fxRate. For supplier decks a future effectiveFrom queues the change for that moment instead (the result then has scheduled: true).
Test keys: refused with 403 TEST_KEY_NOT_ALLOWED. The Switch has no test mode, so a change always applies to your live configuration. Test keys can still read Switch data.
Request body (multipart/form-data)
| Field | Type | Description |
|---|---|---|
targetKindrequired | string | -One of operator, supplier, customer |
targetId | string (uuid) | - |
targetTrunkId | string (uuid) | - |
defaultIncrement | string | - |
changeMode | string | -One of amendment, full_replacement |
effectiveFrom | string (date-time) | - |
timezone | string | -max 64 chars |
fxRate | string | Units of USD per 1 unit of the sheet currency; required to apply a non-USD sheet |
replace | string | Legacy form of changeMode=full_replacementOne of true, false |
mapping | string | The confirmed column mapping from the parse step, as JSON text |
filerequired | string | The rate sheet (CSV or XLSX), sent LAST |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as SwitchDeckSheetResult, shown earlier on this page. |
Response 202
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
approvalRequireddata.approvalRequired | boolean | -One of true |
approvalRequestIddata.approvalRequestId | string (uuid) | null | - |
permissiondata.permission | string | - |
expiresAtdata.expiresAt | string (date-time) | - |
messagedata.message | string | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 402
SWITCH_SUBSCRIPTION_REQUIRED: the account has no active Switch plan or trial. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.