Switch API reference
Switch: rating
Rate decks, sell decks and sell rates: what you pay and what you charge.
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
destinationrequiredquery · string
originquery · string
customerIdquery · string (uuid)
customerTrunkIdquery · string (uuid)
secondsquery · integer
Reference call length for the margin estimate
Response 200
datarequiredobject
atrequiredstring (date-time) · data.at
ISO-8601 timestamp (UTC)inputrequiredobject · data.input
The destination, routed number, origin, customer, trunk and reference call length usedbasisrequiredobject · data.basis
resolvedrequiredboolean · data.basis.resolved
detailrequiredstring · data.basis.detail
routingKindrequiredstring · data.basis.routingKind
One offixed,group,dialplan,noneroutingNamerequiredstring | null · data.basis.routingName
selectionModerequiredstring | null · data.basis.selectionMode
maxAttemptsrequiredinteger | null · data.basis.maxAttempts
sellrequiredobject · data.sell
outcomerequiredobject | null · data.sell.outcome
A price, or the reason there is none. Only kind = rated carries a rate.kindrequiredstring · data.sell.outcome.kind
One ofrated,no_matching_rate,not_yet_effective,expired,forbidden,rating_failed,not_billableratenumber · data.sell.outcome.rate
Present when kind = rated. May legitimately be 0.matchedPrefixstring · data.sell.outcome.matchedPrefix
deckVersioninteger | null · data.sell.outcome.deckVersion
sourcestring · data.sell.outcome.source
destinationstring · data.sell.outcome.destination
effectiveFromstring · data.sell.outcome.effectiveFrom
expiredAtstring · data.sell.outcome.expiredAt
reasonstring · data.sell.outcome.reason
Why it is forbidden or failedbillingRaterequirednumber | null · data.sell.billingRate
USD as a JSON number (engine output, up to 6 decimal places)matchedPrefixrequiredstring | null · data.sell.matchedPrefix
billingIncrementrequiredstring · data.sell.billingIncrement
suppliersrequiredobject[] · data.suppliers
vendorTrunkIdrequiredstring (uuid) | null · data.suppliers[].vendorTrunkId
labelrequiredstring · data.suppliers[].label
kindrequiredstring · data.suppliers[].kind
One ofsupplier trunk,marketplace routechainOrdinalrequiredinteger | null · data.suppliers[].chainOrdinal
Attempt position in the failover chain; null if past the attempt ceilingoutcomerequiredobject | null · data.suppliers[].outcome
A price, or the reason there is none. Only kind = rated carries a rate.Same fields as SwitchRatingOutcome, shown earlier on this page.billingRaterequirednumber | null · data.suppliers[].billingRate
USD as a JSON number (engine output, up to 6 decimal places)sourcerequiredstring · data.suppliers[].source
One ofsupplier deck,trunk default,marketplace listing,unpricedmatchedPrefixrequiredstring | null · data.suppliers[].matchedPrefix
deckIdrequiredstring (uuid) | null · data.suppliers[].deckId
deckVersionrequiredinteger | null · data.suppliers[].deckVersion
billingIncrementrequiredstring · data.suppliers[].billingIncrement
excludedrequiredobject | null · data.suppliers[].excluded
stagerequiredstring · data.suppliers[].excluded.stage
reasonrequiredstring · data.suppliers[].excluded.reason
detailrequiredstring · data.suppliers[].excluded.detail
selectedrequiredobject | null · data.selected
vendorTrunkIdrequiredstring (uuid) | null · data.selected.vendorTrunkId
labelrequiredstring · data.selected.label
kindrequiredstring · data.selected.kind
One ofsupplier trunk,marketplace routechainOrdinalrequiredinteger | null · data.selected.chainOrdinal
Attempt position in the failover chain; null if past the attempt ceilingoutcomerequiredobject | null · data.selected.outcome
A price, or the reason there is none. Only kind = rated carries a rate.Same fields as SwitchRatingOutcome, shown earlier on this page.billingRaterequirednumber | null · data.selected.billingRate
USD as a JSON number (engine output, up to 6 decimal places)sourcerequiredstring · data.selected.source
One ofsupplier deck,trunk default,marketplace listing,unpricedmatchedPrefixrequiredstring | null · data.selected.matchedPrefix
deckIdrequiredstring (uuid) | null · data.selected.deckId
deckVersionrequiredinteger | null · data.selected.deckVersion
billingIncrementrequiredstring · data.selected.billingIncrement
excludedrequiredobject | null · data.selected.excluded
stagerequiredstring · data.selected.excluded.stage
reasonrequiredstring · data.selected.excluded.reason
detailrequiredstring · data.selected.excluded.detail
configuredMarginrequiredobject · data.configuredMargin
kindrequiredstring · data.configuredMargin.kind
One ofconfigured_estimateperMinuterequirednumber | null · data.configuredMargin.perMinute
USD as a JSON number (engine output, up to 6 decimal places)perMinutePctrequirednumber | null · data.configuredMargin.perMinutePct
referenceCallrequiredobject | null · data.configuredMargin.referenceCall
Revenue, cost and margin of a call of the reference length, increment-aware (JSON numbers)rangerequiredobject | null · data.configuredMargin.range
explainrequiredobject[] · data.configuredMargin.explain
labelrequiredstring · data.configuredMargin.explain[].label
valuerequiredstring · data.configuredMargin.explain[].value
notestring · data.configuredMargin.explain[].note
sourcestring · data.configuredMargin.explain[].source
traceIdrequiredstring (uuid) · data.traceId
The route trace this analysis ran onverdictrequiredobject · data.verdict
sideEffectsrequiredobject · data.sideEffects
createdCdrrequiredboolean · data.sideEffects.createdCdr
One offalsemovedBalancerequiredboolean · data.sideEffects.movedBalance
One offalseconsumedCapacityrequiredboolean · data.sideEffects.consumedCapacity
One offalse
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
customerIdquery · string (uuid)
customerTrunkIdquery · string (uuid)
Response 200
datarequiredobject
suppliersrequiredobject[] · data.suppliers
vendorTrunkIdrequiredstring (uuid) · data.suppliers[].vendorTrunkId
labelrequiredstring · data.suppliers[].label
statusrequiredstring · data.suppliers[].status
viarequiredobject[] · data.suppliers[].via
sourcerequiredstring · data.suppliers[].via[].source
One offixed target,route group,failover group,dialplan rulegroupIdrequiredstring (uuid) | null · data.suppliers[].via[].groupId
groupNamerequiredstring | null · data.suppliers[].via[].groupName
prefixrequiredstring | null · data.suppliers[].via[].prefix
priorityrequiredinteger | null · data.suppliers[].via[].priority
defaultRatePerUnitrequiredmoney | null · data.suppliers[].defaultRatePerUnit
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".activeRateRowsrequiredinteger · data.suppliers[].activeRateRows
unpricedrequiredboolean · data.suppliers[].unpriced
True when the trunk has no rates and no default: calls to it cannot be costedbillingIncrementrequiredstring · data.suppliers[].billingIncrement
routingrequiredobject · data.routing
kindrequiredstring · data.routing.kind
One offixed,group,dialplan,nonenamerequiredstring | null · data.routing.name
selectionModerequiredstring | null · data.routing.selectionMode
maxAttemptsrequiredinteger | null · data.routing.maxAttempts
trunkIdsrequiredstring (uuid)[] · data.routing.trunkIds
ambiguousrequiredstring | null · data.ambiguous
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
fromquery · string
ISO timestamp; default 24 hours beforetotoquery · string
ISO timestamp; default nowcustomerIdquery · string (uuid)
customerTrunkIdquery · string (uuid)
supplierTrunkIdquery · string (uuid)
kindquery · string
voice (default) or all, which includes SMSOne of voice, all
Response 200
datarequiredobject
kindrequiredstring · data.kind
One ofrealised_actualwindowrequiredobject · data.window
fromrequiredstring · data.window.from
torequiredstring · data.window.to
labelrequiredstring · data.window.label
basisrequiredobject · data.basis
answerrequiredobject · data.answer
revenuerequiredobject · data.revenue
customerChargesrequirednumber · data.revenue.customerCharges
USD as a JSON number (engine output, up to 6 decimal places)platformFeerequirednumber · data.revenue.platformFee
USD as a JSON number (engine output, up to 6 decimal places)feeCertaintyrequiredstring · data.revenue.feeCertainty
One ofexact,upper_boundoperatorRevenuerequirednumber · data.revenue.operatorRevenue
USD as a JSON number (engine output, up to 6 decimal places)costrequiredobject · data.cost
bookedrequirednumber · data.cost.booked
USD as a JSON number (engine output, up to 6 decimal places)unbookedAttemptCostrequirednumber · data.cost.unbookedAttemptCost
USD as a JSON number (engine output, up to 6 decimal places)unbookedAttemptsrequiredinteger · data.cost.unbookedAttempts
totalrequirednumber · data.cost.total
USD as a JSON number (engine output, up to 6 decimal places)grossrequirednumber · data.gross
USD as a JSON number (engine output, up to 6 decimal places)grossPctrequirednumber | null · data.grossPct
exposurerequiredobject · data.exposure
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
fromquery · string
ISO timestamp; default 24 hours beforetotoquery · string
ISO timestamp; default nowcustomerIdquery · string (uuid)
customerTrunkIdquery · string (uuid)
supplierTrunkIdquery · string (uuid)
kindquery · string
voice (default) or all, which includes SMSOne of voice, allnegativeOnlyquery · boolean
Only sessions that lost moneyfailoverOnlyquery · boolean
Only sessions that needed more than one attemptlimitquery · integer
offsetquery · integer
Response 200
datarequiredobject
rowsrequiredobject[] · data.rows
sessionKeyrequiredstring · data.rows[].sessionKey
callUuidrequiredstring | null · data.rows[].callUuid
atrequiredstring (date-time) · data.rows[].at
ISO-8601 timestamp (UTC)destinationrequiredstring | null · data.rows[].destination
destinationNamerequiredstring | null · data.rows[].destinationName
customerTrunkIdrequiredstring (uuid) | null · data.rows[].customerTrunkId
statusrequiredstring | null · data.rows[].status
durationSecondsrequiredinteger · data.rows[].durationSeconds
billedSecondsrequiredinteger | null · data.rows[].billedSeconds
billingIncrementrequiredstring | null · data.rows[].billingIncrement
sellRaterequirednumber | null · data.rows[].sellRate
USD as a JSON number (engine output, up to 6 decimal places)chargerequirednumber · data.rows[].charge
USD as a JSON number (engine output, up to 6 decimal places)bookedCostrequirednumber · data.rows[].bookedCost
USD as a JSON number (engine output, up to 6 decimal places)attemptsrequiredobject[] · data.rows[].attempts
ordinalrequiredinteger · data.rows[].attempts[].ordinal
supplierrequiredstring | null · data.rows[].attempts[].supplier
vendorTrunkIdrequiredstring (uuid) | null · data.rows[].attempts[].vendorTrunkId
outcomerequiredstring · data.rows[].attempts[].outcome
sipStatusrequiredinteger | null · data.rows[].attempts[].sipStatus
wonrequiredboolean · data.rows[].attempts[].won
answeredSecondsrequiredinteger | null · data.rows[].attempts[].answeredSeconds
buyRaterequirednumber | null · data.rows[].attempts[].buyRate
USD as a JSON number (engine output, up to 6 decimal places)costBasisrequiredstring · data.rows[].attempts[].costBasis
One ofbooked,derived,nonederivedCostrequirednumber | null · data.rows[].attempts[].derivedCost
USD as a JSON number (engine output, up to 6 decimal places)attemptCostrequirednumber · data.rows[].attemptCost
USD as a JSON number (engine output, up to 6 decimal places)marginrequirednumber · data.rows[].margin
USD as a JSON number (engine output, up to 6 decimal places)flagsrequiredstring[] · data.rows[].flags
totalrequiredinteger · data.total
limitrequiredinteger · data.limit
offsetrequiredinteger · data.offset
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
callUuidrequiredpath · string
Response 200
datarequiredobject
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
supplierIdquery · string (uuid)
Only decks from this providertrunkIdquery · string (uuid)
Only decks that price this supplier trunkstatusquery · string
One of draft, uploaded, invalid, validated, pending_approval, scheduled, active, expired, rolled_back
Response 200
datarequiredobject
decksrequiredobject[] · data.decks
idrequiredstring (uuid) · data.decks[].id
supplierIdrequiredstring (uuid) | null · data.decks[].supplierId
The provider who sent it; null for a deck recorded before its provider wasnamerequiredstring · data.decks[].name
currencyrequiredstring · data.decks[].currency
max 3 charsversionrequiredinteger · data.decks[].version
statusrequiredstring · data.decks[].status
One ofdraft,uploaded,invalid,validated,pending_approval,scheduled,active,expired,rolled_backeffectiveFromrequiredstring (date-time) | null · data.decks[].effectiveFrom
ISO-8601 timestamp (UTC)expiresAtrequiredstring (date-time) | null · data.decks[].expiresAt
ISO-8601 timestamp (UTC)sourcerequiredstring | null · data.decks[].source
One ofportal,csv,api,email,sftpsourceRefrequiredstring | null · data.decks[].sourceRef
approvedAtrequiredstring (date-time) | null · data.decks[].approvedAt
ISO-8601 timestamp (UTC)validationrequiredobject | null · data.decks[].validation
The last validation result; null before the deck is validatedcheckedAtrequiredstring · data.decks[].validation.checkedAt
rowsrequiredinteger · data.decks[].validation.rows
destinationsrequiredinteger · data.decks[].validation.destinations
errorsrequiredobject[] · data.decks[].validation.errors
warningsrequiredobject[] · data.decks[].validation.warnings
maxIncreasePctnumber · data.decks[].validation.maxIncreasePct
supersedesIdrequiredstring (uuid) | null · data.decks[].supersedesId
rolledBackAtrequiredstring (date-time) | null · data.decks[].rolledBackAt
ISO-8601 timestamp (UTC)notesrequiredstring | null · data.decks[].notes
createdAtrequiredstring (date-time) · data.decks[].createdAt
ISO-8601 timestamp (UTC)updatedAtrequiredstring (date-time) · data.decks[].updatedAt
ISO-8601 timestamp (UTC)rowCountrequiredinteger · data.decks[].rowCount
trunksrequiredobject[] · data.decks[].trunks
Supplier trunks the deck pricesidrequiredstring (uuid) · data.decks[].trunks[].id
labelrequiredstring · data.decks[].trunks[].label
mutablerequiredboolean · data.decks[].mutable
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)
supplierIdstring (uuid) | null
namerequiredstring
max 160 charscurrencystring
max 3 charssourcestring | null
One ofportal,csv,api,email,sftpsourceRefstring | null
max 500 charseffectiveFromstring | null
max 40 charsexpiresAtstring | null
max 40 charstrunkIdsstring (uuid)[]
notesstring | null
max 4000 chars
Response 201
datarequiredobject
Same fields as SwitchRateDeck, shown earlier on this page.
Response 202
datarequiredobject
approvalRequiredboolean · data.approvalRequired
One oftrueapprovalRequestIdstring (uuid) | null · data.approvalRequestId
permissionstring · data.permission
expiresAtstring (date-time) · data.expiresAt
messagestring · data.message
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
idrequiredpath · string
Response 200
datarequiredobject
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
idrequiredpath · string
Response 200
datarequiredobject
deletedrequiredboolean · data.deleted
One oftrue
Response 202
datarequiredobject
approvalRequiredboolean · data.approvalRequired
One oftrueapprovalRequestIdstring (uuid) | null · data.approvalRequestId
permissionstring · data.permission
expiresAtstring (date-time) · data.expiresAt
messagestring · data.message
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
idrequiredpath · string
Response 200
datarequiredobject
namerequiredstring · data.name
versionsrequiredobject[] · data.versions
idrequiredstring (uuid) · data.versions[].id
supplierIdrequiredstring (uuid) | null · data.versions[].supplierId
The provider who sent it; null for a deck recorded before its provider wasnamerequiredstring · data.versions[].name
currencyrequiredstring · data.versions[].currency
max 3 charsversionrequiredinteger · data.versions[].version
statusrequiredstring · data.versions[].status
One ofdraft,uploaded,invalid,validated,pending_approval,scheduled,active,expired,rolled_backeffectiveFromrequiredstring (date-time) | null · data.versions[].effectiveFrom
ISO-8601 timestamp (UTC)expiresAtrequiredstring (date-time) | null · data.versions[].expiresAt
ISO-8601 timestamp (UTC)sourcerequiredstring | null · data.versions[].source
One ofportal,csv,api,email,sftpsourceRefrequiredstring | null · data.versions[].sourceRef
approvedAtrequiredstring (date-time) | null · data.versions[].approvedAt
ISO-8601 timestamp (UTC)validationrequiredobject | null · data.versions[].validation
The last validation result; null before the deck is validatedcheckedAtrequiredstring · data.versions[].validation.checkedAt
rowsrequiredinteger · data.versions[].validation.rows
destinationsrequiredinteger · data.versions[].validation.destinations
errorsrequiredobject[] · data.versions[].validation.errors
warningsrequiredobject[] · data.versions[].validation.warnings
maxIncreasePctnumber · data.versions[].validation.maxIncreasePct
supersedesIdrequiredstring (uuid) | null · data.versions[].supersedesId
rolledBackAtrequiredstring (date-time) | null · data.versions[].rolledBackAt
ISO-8601 timestamp (UTC)notesrequiredstring | null · data.versions[].notes
createdAtrequiredstring (date-time) · data.versions[].createdAt
ISO-8601 timestamp (UTC)updatedAtrequiredstring (date-time) · data.versions[].updatedAt
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
idrequiredpath · string
Response 200
datarequiredobject
deckIdrequiredstring (uuid) · data.deckId
namerequiredstring · data.name
versionrequiredinteger · data.version
statusrequiredstring · data.status
One ofdraft,uploaded,invalid,validated,pending_approval,scheduled,active,expired,rolled_backeffectiveFromrequiredstring (date-time) | null · data.effectiveFrom
ISO-8601 timestamp (UTC)trunksrequiredobject[] · data.trunks
trunkIdrequiredstring (uuid) · data.trunks[].trunkId
labelrequiredstring · data.trunks[].label
diffrequiredobject · data.trunks[].diff
What a change does to live pricing, with the biggest moversremovalModerequiredstring · data.trunks[].diff.removalMode
One ofmerge,replacechangeModerequiredstring · data.trunks[].diff.changeMode
One ofamendment,full_replacementliverequiredinteger · data.trunks[].diff.live
Prefixes priced on the live deck nowincomingrequiredinteger · data.trunks[].diff.incoming
Prefixes the new rows priceaddedrequiredinteger · data.trunks[].diff.added
changedrequiredinteger · data.trunks[].diff.changed
rateChangedrequiredinteger · data.trunks[].diff.rateChanged
incrementOnlyrequiredinteger · data.trunks[].diff.incrementOnly
Changed rows where only the billing increment movedunchangedrequiredinteger · data.trunks[].diff.unchanged
removedrequiredinteger · data.trunks[].diff.removed
Live prefixes the new rows do not mentionoriginScopedrequiredinteger · data.trunks[].originScoped
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
idrequiredpath · string
Request body (application/json)
trunkIdsrequiredstring (uuid)[]
Response 200
datarequiredobject
Same fields as SwitchRateDeck, shown earlier on this page.
Response 202
datarequiredobject
approvalRequiredboolean · data.approvalRequired
One oftrueapprovalRequestIdstring (uuid) | null · data.approvalRequestId
permissionstring · data.permission
expiresAtstring (date-time) · data.expiresAt
messagestring · data.message
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
idrequiredpath · string
Request body (application/json)
rowsrequiredobject[]
prefixrequiredstring · rows[].prefix
max 24 charsraterequirednumber | string · rows[].rate
Price per minute; a number or a decimal string. Blank is refused, 0 is a real price.originstring · rows[].origin
Caller-origin prefix; omit for any originmax 24 charsdestinationNamestring | null · rows[].destinationName
max 96 charscountrystring | null · rows[].country
max 64 charsmccstring | null · rows[].mcc
max 8 charsmncstring | null · rows[].mnc
max 8 charsjurisdictionstring | null · rows[].jurisdiction
max 16 charsconnectionFeenumber | string | null · rows[].connectionFee
minChargedSecondsinteger | null · rows[].minChargedSeconds
min 0billingIncrementstring | null · rows[].billingIncrement
max 10 charseffectiveFromstring | null · rows[].effectiveFrom
max 40 charsendDatestring | null · rows[].endDate
max 40 chars
Response 200
datarequiredobject
Same fields as SwitchRateDeck, shown earlier on this page.
Response 202
datarequiredobject
approvalRequiredboolean · data.approvalRequired
One oftrueapprovalRequestIdstring (uuid) | null · data.approvalRequestId
permissionstring · data.permission
expiresAtstring (date-time) · data.expiresAt
messagestring · data.message
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
idrequiredpath · string
Response 201
datarequiredobject
Same fields as SwitchRateDeck, shown earlier on this page.
Response 202
datarequiredobject
approvalRequiredboolean · data.approvalRequired
One oftrueapprovalRequestIdstring (uuid) | null · data.approvalRequestId
permissionstring · data.permission
expiresAtstring (date-time) · data.expiresAt
messagestring · data.message
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
idrequiredpath · string
Response 200
datarequiredobject
Same fields as SwitchRateDeck, shown earlier on this page.
Response 202
datarequiredobject
approvalRequiredboolean · data.approvalRequired
One oftrueapprovalRequestIdstring (uuid) | null · data.approvalRequestId
permissionstring · data.permission
expiresAtstring (date-time) · data.expiresAt
messagestring · data.message
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
idrequiredpath · string
Response 200
datarequiredobject
Same fields as SwitchRateDeck, shown earlier on this page.
Response 202
datarequiredobject
approvalRequiredboolean · data.approvalRequired
One oftrueapprovalRequestIdstring (uuid) | null · data.approvalRequestId
permissionstring · data.permission
expiresAtstring (date-time) · data.expiresAt
messagestring · data.message
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
idrequiredpath · string
Request body (application/json)
effectiveFromstring | null
max 40 chars
Response 200
datarequiredobject
Same fields as SwitchRateDeck, shown earlier on this page.
Response 202
datarequiredobject
approvalRequiredboolean · data.approvalRequired
One oftrueapprovalRequestIdstring (uuid) | null · data.approvalRequestId
permissionstring · data.permission
expiresAtstring (date-time) · data.expiresAt
messagestring · data.message
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
idrequiredpath · string
Response 200
datarequiredobject
Same fields as SwitchRateDeck, shown earlier on this page.
Response 202
datarequiredobject
approvalRequiredboolean · data.approvalRequired
One oftrueapprovalRequestIdstring (uuid) | null · data.approvalRequestId
permissionstring · data.permission
expiresAtstring (date-time) · data.expiresAt
messagestring · data.message
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
idrequiredpath · string
Response 200
datarequiredobject
idrequiredstring (uuid) · data.id
supplierIdrequiredstring (uuid) | null · data.supplierId
The provider who sent it; null for a deck recorded before its provider wasnamerequiredstring · data.name
currencyrequiredstring · data.currency
max 3 charsversionrequiredinteger · data.version
statusrequiredstring · data.status
One ofdraft,uploaded,invalid,validated,pending_approval,scheduled,active,expired,rolled_backeffectiveFromrequiredstring (date-time) | null · data.effectiveFrom
ISO-8601 timestamp (UTC)expiresAtrequiredstring (date-time) | null · data.expiresAt
ISO-8601 timestamp (UTC)sourcerequiredstring | null · data.source
One ofportal,csv,api,email,sftpsourceRefrequiredstring | null · data.sourceRef
approvedAtrequiredstring (date-time) | null · data.approvedAt
ISO-8601 timestamp (UTC)validationrequiredobject | null · data.validation
The last validation result; null before the deck is validatedcheckedAtrequiredstring · data.validation.checkedAt
rowsrequiredinteger · data.validation.rows
destinationsrequiredinteger · data.validation.destinations
errorsrequiredobject[] · data.validation.errors
warningsrequiredobject[] · data.validation.warnings
maxIncreasePctnumber · data.validation.maxIncreasePct
supersedesIdrequiredstring (uuid) | null · data.supersedesId
rolledBackAtrequiredstring (date-time) | null · data.rolledBackAt
ISO-8601 timestamp (UTC)notesrequiredstring | null · data.notes
createdAtrequiredstring (date-time) · data.createdAt
ISO-8601 timestamp (UTC)updatedAtrequiredstring (date-time) · data.updatedAt
ISO-8601 timestamp (UTC)rowCountrequiredinteger · data.rowCount
trunksrequiredobject[] · data.trunks
Supplier trunks the deck pricesidrequiredstring (uuid) · data.trunks[].id
labelrequiredstring · data.trunks[].label
mutablerequiredboolean · data.mutable
Whether rows can still be editedrestoredDeckIdrequiredstring (uuid) | null · data.restoredDeckId
Response 202
datarequiredobject
approvalRequiredboolean · data.approvalRequired
One oftrueapprovalRequestIdstring (uuid) | null · data.approvalRequestId
permissionstring · data.permission
expiresAtstring (date-time) · data.expiresAt
messagestring · data.message
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
datarequiredobject
operatorrequiredobject · data.operator
markupPctrequirednumber | null · data.operator.markupPct
dailySpendCaprequirednumber | null · data.operator.dailySpendCap
USD, a JSON numbermaxConcurrentCallsrequirednumber | null · data.operator.maxConcurrentCalls
billingIncrementrequiredstring | null · data.operator.billingIncrement
platformrequiredobject · data.platform
billingIncrementrequiredstring · data.platform.billingIncrement
One of1/1maxConcurrentCallsrequiredenum | null · data.platform.maxConcurrentCalls
One ofnullmaxCpsrequiredenum | null · data.platform.maxCps
One ofnullchainsrequiredobject · data.chains
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
statusquery · string
One of draft, active, superseded, archived
Response 200
datarequiredobject
decksrequiredobject[] · data.decks
idrequiredstring (uuid) · data.decks[].id
namerequiredstring · data.decks[].name
versionrequiredinteger · data.decks[].version
statusrequiredstring · data.decks[].status
One ofdraft,active,superseded,archivedcurrencyrequiredstring · data.decks[].currency
max 3 charsisSystemDefaultrequiredboolean · data.decks[].isSystemDefault
defaultRatePerUnitrequirednumber | null · data.decks[].defaultRatePerUnit
Catch-all price for destinations the deck does not list (a JSON number)chargingrequiredobject · data.decks[].charging
minimumDurationSecondsrequiredinteger | null · data.decks[].charging.minimumDurationSeconds
firstIntervalSecondsrequiredinteger | null · data.decks[].charging.firstIntervalSeconds
subsequentIntervalSecondsrequiredinteger | null · data.decks[].charging.subsequentIntervalSeconds
setupFeerequirednumber | null · data.decks[].charging.setupFee
Per-call setup fee (a JSON number)graceSecondsrequiredinteger | null · data.decks[].charging.graceSeconds
roundingrequiredstring | null · data.decks[].charging.rounding
One ofup,nearest,downeffectiveFromrequiredstring (date-time) | null · data.decks[].effectiveFrom
ISO-8601 timestamp (UTC)notesrequiredstring | null · data.decks[].notes
updatedAtrequiredstring (date-time) · data.decks[].updatedAt
ISO-8601 timestamp (UTC)activeRatesrequiredinteger · data.decks[].activeRates
Rows in the deckcustomersOnItrequiredinteger · data.decks[].customersOnIt
Customers whose default deck this istrunksNamingItrequiredinteger · data.decks[].trunksNamingIt
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)
namerequiredstring
max 160 charscurrencystring
max 3 charsdefaultRatePerUnitnumber | string | null
Catch-all price; null or "" clears itminimumDurationSecondsinteger | null
0 to 3600firstIntervalSecondsinteger | null
Set together with subsequentIntervalSeconds, or neither1 to 3600subsequentIntervalSecondsinteger | null
1 to 3600setupFeenumber | string | null
graceSecondsinteger | null
0 to 120roundingstring | null
One ofup,nearest,downnotesstring | null
effectiveFromstring | null
ISO timestamp
Response 201
datarequiredobject
idrequiredstring (uuid) · data.id
namerequiredstring · data.name
versionrequiredinteger · data.version
statusrequiredstring · data.status
One ofdraft,active,superseded,archivedcurrencyrequiredstring · data.currency
max 3 charsisSystemDefaultrequiredboolean · data.isSystemDefault
defaultRatePerUnitrequirednumber | null · data.defaultRatePerUnit
Catch-all price for destinations the deck does not list (a JSON number)chargingrequiredobject · data.charging
minimumDurationSecondsrequiredinteger | null · data.charging.minimumDurationSeconds
firstIntervalSecondsrequiredinteger | null · data.charging.firstIntervalSeconds
subsequentIntervalSecondsrequiredinteger | null · data.charging.subsequentIntervalSeconds
setupFeerequirednumber | null · data.charging.setupFee
Per-call setup fee (a JSON number)graceSecondsrequiredinteger | null · data.charging.graceSeconds
roundingrequiredstring | null · data.charging.rounding
One ofup,nearest,down
Response 202
datarequiredobject
approvalRequiredboolean · data.approvalRequired
One oftrueapprovalRequestIdstring (uuid) | null · data.approvalRequestId
permissionstring · data.permission
expiresAtstring (date-time) · data.expiresAt
messagestring · data.message
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
deckIdrequiredpath · string
Response 200
datarequiredobject
idrequiredstring (uuid) · data.id
namerequiredstring · data.name
versionrequiredinteger · data.version
statusrequiredstring · data.status
One ofdraft,active,superseded,archivedcurrencyrequiredstring · data.currency
max 3 charsisSystemDefaultrequiredboolean · data.isSystemDefault
defaultRatePerUnitrequirednumber | null · data.defaultRatePerUnit
Catch-all price for destinations the deck does not list (a JSON number)chargingrequiredobject · data.charging
minimumDurationSecondsrequiredinteger | null · data.charging.minimumDurationSeconds
firstIntervalSecondsrequiredinteger | null · data.charging.firstIntervalSeconds
subsequentIntervalSecondsrequiredinteger | null · data.charging.subsequentIntervalSeconds
setupFeerequirednumber | null · data.charging.setupFee
Per-call setup fee (a JSON number)graceSecondsrequiredinteger | null · data.charging.graceSeconds
roundingrequiredstring | null · data.charging.rounding
One ofup,nearest,downeffectiveFromrequiredstring (date-time) | null · data.effectiveFrom
ISO-8601 timestamp (UTC)notesrequiredstring | null · data.notes
supersedesIdrequiredstring (uuid) | null · data.supersedesId
approvedAtrequiredstring (date-time) | null · data.approvedAt
ISO-8601 timestamp (UTC)createdAtrequiredstring (date-time) · data.createdAt
ISO-8601 timestamp (UTC)updatedAtrequiredstring (date-time) · data.updatedAt
ISO-8601 timestamp (UTC)activeRatesrequiredinteger · data.activeRates
customersDefaultingToItrequiredobject[] · data.customersDefaultingToIt
idrequiredstring (uuid) · data.customersDefaultingToIt[].id
labelrequiredstring | null · data.customersDefaultingToIt[].label
trunksNamingItrequiredobject[] · data.trunksNamingIt
idrequiredstring (uuid) · data.trunksNamingIt[].id
labelrequiredstring | null · data.trunksNamingIt[].label
subAccountIdrequiredstring (uuid) · data.trunksNamingIt[].subAccountId
versionsrequiredobject[] · data.versions
idrequiredstring (uuid) · data.versions[].id
versionrequiredinteger · data.versions[].version
statusrequiredstring · data.versions[].status
One ofdraft,active,superseded,archivedeffectiveFromrequiredstring (date-time) | null · data.versions[].effectiveFrom
ISO-8601 timestamp (UTC)createdAtrequiredstring (date-time) · data.versions[].createdAt
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
deckIdrequiredpath · string
Request body (application/json)
namestring
max 160 charscurrencystring
max 3 charsdefaultRatePerUnitnumber | string | null
Catch-all price; null or "" clears itminimumDurationSecondsinteger | null
0 to 3600firstIntervalSecondsinteger | null
Set together with subsequentIntervalSeconds, or neither1 to 3600subsequentIntervalSecondsinteger | null
1 to 3600setupFeenumber | string | null
graceSecondsinteger | null
0 to 120roundingstring | null
One ofup,nearest,downnotesstring | null
effectiveFromstring | null
ISO timestamp
Response 200
datarequiredobject
Same fields as SwitchSellDeck, shown earlier on this page.
Response 202
datarequiredobject
approvalRequiredboolean · data.approvalRequired
One oftrueapprovalRequestIdstring (uuid) | null · data.approvalRequestId
permissionstring · data.permission
expiresAtstring (date-time) · data.expiresAt
messagestring · data.message
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
deckIdrequiredpath · string
searchquery · string
Prefix search (digits)limitquery · integer
Default 100, max 1000offsetquery · integer
Response 200
datarequiredobject
rowsrequiredobject[] · data.rows
idrequiredstring (uuid) · data.rows[].id
deckIdrequiredstring (uuid) · data.rows[].deckId
prefixrequiredstring · data.rows[].prefix
originPrefixrequiredstring · data.rows[].originPrefix
"" = any originratePerUnitrequiredmoney · data.rows[].ratePerUnit
USD as a decimal string with exactly 6 places, e.g. "0.012500".billingIncrementrequiredstring | null · data.rows[].billingIncrement
null = inherit the trunk or customer defaultdestinationNamerequiredstring | null · data.rows[].destinationName
createdAtrequiredstring (date-time) · data.rows[].createdAt
ISO-8601 timestamp (UTC)updatedAtrequiredstring (date-time) · data.rows[].updatedAt
ISO-8601 timestamp (UTC)totalrequiredinteger · data.total
limitrequiredinteger · data.limit
offsetrequiredinteger · data.offset
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
deckIdrequiredpath · string
Request body (application/json)
rowsrequiredobject[]
prefixrequiredstring · rows[].prefix
max 24 charsraterequirednumber | string · rows[].rate
A blank is refused; 0 is a real priceoriginstring | null · rows[].origin
max 24 charsbillingIncrementstring | null · rows[].billingIncrement
"first/subsequent", e.g. 60/60; anything else is stored as inherit
Response 200
datarequiredobject
loadedrequiredinteger · data.loaded
Response 202
datarequiredobject
approvalRequiredboolean · data.approvalRequired
One oftrueapprovalRequestIdstring (uuid) | null · data.approvalRequestId
permissionstring · data.permission
expiresAtstring (date-time) · data.expiresAt
messagestring · data.message
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
deckIdrequiredpath · string
Response 201
datarequiredobject
idrequiredstring (uuid) · data.id
namerequiredstring · data.name
versionrequiredinteger · data.version
statusrequiredstring · data.status
One ofdraft,active,superseded,archivedcurrencyrequiredstring · data.currency
max 3 charsisSystemDefaultrequiredboolean · data.isSystemDefault
defaultRatePerUnitrequirednumber | null · data.defaultRatePerUnit
Catch-all price for destinations the deck does not list (a JSON number)chargingrequiredobject · data.charging
minimumDurationSecondsrequiredinteger | null · data.charging.minimumDurationSeconds
firstIntervalSecondsrequiredinteger | null · data.charging.firstIntervalSeconds
subsequentIntervalSecondsrequiredinteger | null · data.charging.subsequentIntervalSeconds
setupFeerequirednumber | null · data.charging.setupFee
Per-call setup fee (a JSON number)graceSecondsrequiredinteger | null · data.charging.graceSeconds
roundingrequiredstring | null · data.charging.rounding
One ofup,nearest,downcopiedRatesrequiredinteger · data.copiedRates
Response 202
datarequiredobject
approvalRequiredboolean · data.approvalRequired
One oftrueapprovalRequestIdstring (uuid) | null · data.approvalRequestId
permissionstring · data.permission
expiresAtstring (date-time) · data.expiresAt
messagestring · data.message
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
deckIdrequiredpath · string
Request body (application/json)
confirmboolean
Response 200
datarequiredobject
publishedboolean · data.published
One oftruewouldChangeobject · data.wouldChange
ratesrequiredinteger · data.wouldChange.rates
trunksrequiredinteger · data.wouldChange.trunks
messagerequiredstring · data.wouldChange.message
trunksinteger · data.trunks
rowsWritteninteger · data.rowsWritten
rowsSupersededinteger · data.rowsSuperseded
Response 202
datarequiredobject
approvalRequiredboolean · data.approvalRequired
One oftrueapprovalRequestIdstring (uuid) | null · data.approvalRequestId
permissionstring · data.permission
expiresAtstring (date-time) · data.expiresAt
messagestring · data.message
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)
deckIdstring (uuid) | null
Response 200
datarequiredobject
systemDefaultDeckIdrequiredstring (uuid) | null · data.systemDefaultDeckId
Response 202
datarequiredobject
approvalRequiredboolean · data.approvalRequired
One oftrueapprovalRequestIdstring (uuid) | null · data.approvalRequestId
permissionstring · data.permission
expiresAtstring (date-time) · data.expiresAt
messagestring · data.message
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
destinationrequiredquery · string
trunkIdquery · string (uuid)
Supplier trunk for the buy sidecustomerIdquery · string (uuid)
customerTrunkIdquery · string (uuid)
originquery · string
Caller number, for origin-based rates
Response 200
datarequiredobject
destinationrequiredstring · data.destination
originrequiredstring | null · data.origin
buyrequiredobject | null · data.buy
null when no trunkId was givenSame fields as SwitchRatingOutcome, shown earlier on this page.sellrequiredobject · data.sell
A price, or the reason there is none. Only kind = rated carries a rate.Same fields as SwitchRatingOutcome, shown earlier on this page.marginrequirednumber | null · data.margin
sell minus buy per minute, a JSON number; null unless both are ratedatrequiredstring (date-time) · data.at
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
searchquery · string
Prefix search (digits)limitquery · integer
Default 100, max 1000offsetquery · integer
Response 200
datarequiredobject
rowsrequiredobject[] · data.rows
idrequiredstring (uuid) · data.rows[].id
prefixrequiredstring · data.rows[].prefix
originPrefixrequiredstring · data.rows[].originPrefix
"" = any originratePerUnitrequiredmoney · data.rows[].ratePerUnit
USD as a decimal string with exactly 6 places, e.g. "0.012500".billingIncrementrequiredstring | null · data.rows[].billingIncrement
null = inherit the trunk defaultcreatedAtrequiredstring (date-time) · data.rows[].createdAt
ISO-8601 timestamp (UTC)updatedAtrequiredstring (date-time) · data.rows[].updatedAt
ISO-8601 timestamp (UTC)totalrequiredinteger · data.total
limitrequiredinteger · data.limit
offsetrequiredinteger · data.offset
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)
prefixrequiredstring
max 24 charsraterequirednumber
Price per minute, as a JSON numbermin 0originstring
max 24 charsbillingIncrementstring
e.g. 60/60 or 1/1; omit to inherit the trunk defaultmax 10 chars
Response 201
datarequiredobject
Same fields as SwitchSellRate, shown earlier on this page.
Response 202
datarequiredobject
approvalRequiredboolean · data.approvalRequired
One oftrueapprovalRequestIdstring (uuid) | null · data.approvalRequestId
permissionstring · data.permission
expiresAtstring (date-time) · data.expiresAt
messagestring · data.message
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)
rowsrequiredobject[]
prefixrequiredstring · rows[].prefix
max 24 charsraterequirednumber · rows[].rate
Price per minute, as a JSON numbermin 0originstring · rows[].origin
max 24 charsbillingIncrementstring · rows[].billingIncrement
e.g. 60/60 or 1/1; omit to inherit the trunk defaultmax 10 chars
Response 200
datarequiredobject
appliedrequiredinteger · data.applied
Response 202
datarequiredobject
approvalRequiredboolean · data.approvalRequired
One oftrueapprovalRequestIdstring (uuid) | null · data.approvalRequestId
permissionstring · data.permission
expiresAtstring (date-time) · data.expiresAt
messagestring · data.message
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
idrequiredpath · string
Response 200
datarequiredobject
deletedrequiredboolean · data.deleted
One oftrue
Response 202
datarequiredobject
approvalRequiredboolean · data.approvalRequired
One oftrueapprovalRequestIdstring (uuid) | null · data.approvalRequestId
permissionstring · data.permission
expiresAtstring (date-time) · data.expiresAt
messagestring · data.message
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)
prefixesstring[]
Response 200
datarequiredobject
deletedrequiredinteger · data.deleted
Response 202
datarequiredobject
approvalRequiredboolean · data.approvalRequired
One oftrueapprovalRequestIdstring (uuid) | null · data.approvalRequestId
permissionstring · data.permission
expiresAtstring (date-time) · data.expiresAt
messagestring · data.message
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)
targetKindrequiredstring
One ofoperator,supplier,customertargetIdstring (uuid)
targetTrunkIdstring (uuid)
defaultIncrementstring
changeModestring
One ofamendment,full_replacementeffectiveFromstring (date-time)
timezonestring
max 64 charsfxRatestring
Units of USD per 1 unit of the sheet currency; required to apply a non-USD sheetreplacestring
Legacy form of changeMode=full_replacementOne oftrue,falsemappingstring
The confirmed column mapping from the parse step, as JSON textfilerequiredstring
The rate sheet (CSV or XLSX), sent LAST
Response 200
datarequiredobject
targetLabelrequiredstring · data.targetLabel
mappingrequiredobject · data.mapping
Detected column mapping; send it back (as JSON) on diff and applyrawSamplerequiredany[][] · data.rawSample
The first 8 raw rowspreviewRowsrequiredobject[] · data.previewRows
Up to 50 parsed rowsrowCountrequiredinteger · data.rowCount
warningsrequiredobject[] · data.warnings
currencyrequiredstring · data.currency
summaryrequiredobject · data.summary
overLimitrequiredboolean · data.overLimit
maxRowsrequiredinteger · data.maxRows
Response 202
datarequiredobject
approvalRequiredboolean · data.approvalRequired
One oftrueapprovalRequestIdstring (uuid) | null · data.approvalRequestId
permissionstring · data.permission
expiresAtstring (date-time) · data.expiresAt
messagestring · data.message
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)
targetKindrequiredstring
One ofoperator,supplier,customertargetIdstring (uuid)
targetTrunkIdstring (uuid)
defaultIncrementstring
changeModestring
One ofamendment,full_replacementeffectiveFromstring (date-time)
timezonestring
max 64 charsfxRatestring
Units of USD per 1 unit of the sheet currency; required to apply a non-USD sheetreplacestring
Legacy form of changeMode=full_replacementOne oftrue,falsemappingstring
The confirmed column mapping from the parse step, as JSON textfilerequiredstring
The rate sheet (CSV or XLSX), sent LAST
Response 200
datarequiredobject
targetLabelrequiredstring · data.targetLabel
rowCountinteger · data.rowCount
currencyrequiredstring · data.currency
warningsrequiredobject[] · data.warnings
diffobject · data.diff
What a change does to live pricing, with the biggest moversSame fields as SwitchRateDeckDiff, shown earlier on this page.appliedinteger · data.applied
Rows written (apply) or queued (scheduled apply)replacedboolean · data.replaced
scheduledboolean · data.scheduled
Present when a future effectiveFrom queued the sheetOne oftrueeffectiveFromstring · data.effectiveFrom
originScopedinteger · data.originScoped
Origin-scoped live rows a sheet cannot express, counted not changedoverLimitboolean · data.overLimit
maxRowsinteger · data.maxRows
Response 202
datarequiredobject
approvalRequiredboolean · data.approvalRequired
One oftrueapprovalRequestIdstring (uuid) | null · data.approvalRequestId
permissionstring · data.permission
expiresAtstring (date-time) · data.expiresAt
messagestring · data.message
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)
targetKindrequiredstring
One ofoperator,supplier,customertargetIdstring (uuid)
targetTrunkIdstring (uuid)
defaultIncrementstring
changeModestring
One ofamendment,full_replacementeffectiveFromstring (date-time)
timezonestring
max 64 charsfxRatestring
Units of USD per 1 unit of the sheet currency; required to apply a non-USD sheetreplacestring
Legacy form of changeMode=full_replacementOne oftrue,falsemappingstring
The confirmed column mapping from the parse step, as JSON textfilerequiredstring
The rate sheet (CSV or XLSX), sent LAST
Response 200
datarequiredobject
Same fields as SwitchDeckSheetResult, shown earlier on this page.
Response 202
datarequiredobject
approvalRequiredboolean · data.approvalRequired
One oftrueapprovalRequestIdstring (uuid) | null · data.approvalRequestId
permissionstring · data.permission
expiresAtstring (date-time) · data.expiresAt
messagestring · data.message
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.