Switch API reference
Switch: invoicing
Invoices, credit notes, payables, netting, settlement and ageing.
BrowseSwitch: invoicing
List customer invoices
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Parameters
customerIdquery · string (uuid)
statusquery · string
One of draft, open, partial, paid, overdue, voidlimitquery · integer
Page size (default 50, max 500)offsetquery · integer
Response 200
datarequiredobject
rowsrequiredobject[] · data.rows
idrequiredstring (uuid) · data.rows[].id
customerIdrequiredstring (uuid) · data.rows[].customerId
invoiceNumberrequiredstring · data.rows[].invoiceNumber
Sequential per operator, gap-freeperiodStartrequiredstring (date-time) | null · data.rows[].periodStart
ISO-8601 timestamp (UTC)periodEndrequiredstring (date-time) | null · data.rows[].periodEnd
ISO-8601 timestamp (UTC)issueDaterequiredstring (date-time) · data.rows[].issueDate
ISO-8601 timestamp (UTC)dueDaterequiredstring (date-time) | null · data.rows[].dueDate
ISO-8601 timestamp (UTC)currencyrequiredstring · data.rows[].currency
max 3 charssubtotalrequiredmoney · data.rows[].subtotal
USD as a decimal string with exactly 6 places, e.g. "0.012500".taxrequiredmoney · data.rows[].tax
USD as a decimal string with exactly 6 places, e.g. "0.012500".totalrequiredmoney · data.rows[].total
USD as a decimal string with exactly 6 places, e.g. "0.012500".amountPaidrequiredmoney · data.rows[].amountPaid
USD as a decimal string with exactly 6 places, e.g. "0.012500".statusrequiredstring · data.rows[].status
One ofdraft,open,partial,paid,overdue,voidoverduerequiredboolean · data.rows[].overdue
notesrequiredstring | null · data.rows[].notes
replacesInvoiceIdstring (uuid) | null · data.rows[].replacesInvoiceId
sentAtstring (date-time) | null · data.rows[].sentAt
ISO-8601 timestamp (UTC)sendCountinteger · data.rows[].sendCount
customerLabelstring | null · data.rows[].customerLabel
On list rowstotalrequiredinteger · 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.
Issue an invoice from a reviewed preview
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
- Moves money
- Issues, voids or settles a billing document.
Irreversible: allocates the next invoice number and claims the usage. Requires the reviewToken from a preview that still matches live data. Does not send the invoice; use POST /switch/invoices/{id}/send.
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)
customerIdrequiredstring (uuid)
periodStartrequiredstring
ISO-8601 date or timestamp; start of the billing periodperiodEndrequiredstring
ISO-8601 date or timestamp; end of the billing periodnotesstring | null
max 2000 charsincludeBroughtForwardboolean
Also bill priced, still-unbilled usage from before the periodapplyCreditsboolean
Consume the customer's open credit notes on this invoiceexcludeUnratedobject | null
Issue despite unpriced usage, leaving it unbilled for the stated reason (needs the billing adjustment permission)reasonrequiredstring · excludeUnrated.reason
max 2000 charsreviewTokenrequiredstring
max 120 chars
Response 201
datarequiredobject
idrequiredstring (uuid) · data.id
customerIdrequiredstring (uuid) · data.customerId
invoiceNumberrequiredstring · data.invoiceNumber
Sequential per operator, gap-freeperiodStartrequiredstring (date-time) | null · data.periodStart
ISO-8601 timestamp (UTC)periodEndrequiredstring (date-time) | null · data.periodEnd
ISO-8601 timestamp (UTC)issueDaterequiredstring (date-time) · data.issueDate
ISO-8601 timestamp (UTC)dueDaterequiredstring (date-time) | null · data.dueDate
ISO-8601 timestamp (UTC)currencyrequiredstring · data.currency
max 3 charssubtotalrequiredmoney · data.subtotal
USD as a decimal string with exactly 6 places, e.g. "0.012500".taxrequiredmoney · data.tax
USD as a decimal string with exactly 6 places, e.g. "0.012500".totalrequiredmoney · data.total
USD as a decimal string with exactly 6 places, e.g. "0.012500".amountPaidrequiredmoney · data.amountPaid
USD as a decimal string with exactly 6 places, e.g. "0.012500".statusrequiredstring · data.status
One ofdraft,open,partial,paid,overdue,voidoverduerequiredboolean · data.overdue
notesrequiredstring | null · data.notes
replacesInvoiceIdstring (uuid) | null · data.replacesInvoiceId
sentAtstring (date-time) | null · data.sentAt
ISO-8601 timestamp (UTC)sendCountinteger · data.sendCount
customerLabelstring | null · data.customerLabel
On list rowsreviewDigestrequiredstring | null · data.reviewDigest
previewobject · data.preview
customerrequiredobject · data.preview.customer
idrequiredstring (uuid) · data.preview.customer.id
labelrequiredstring · data.preview.customer.label
legalNamerequiredstring · data.preview.customer.legalName
currencyrequiredstring · data.preview.customer.currency
periodrequiredobject · data.preview.period
startrequiredstring · data.preview.period.start
endrequiredstring · data.preview.period.end
timezonerequiredstring · data.preview.period.timezone
labelrequiredstring · data.preview.period.label
dueDaterequiredstring · data.preview.dueDate
paymentTermsDaysrequiredinteger · data.preview.paymentTermsDays
currencyrequiredstring · data.preview.currency
usagerequiredobject · data.preview.usage
Billable, rated-at-zero, by-trunk and by-channel usagebroughtForwardrequiredobject · data.preview.broughtForward
unratedrequiredobject · data.preview.unrated
Usage that could not be priced. Blocks issue unless excluded with a reason.linesrequiredobject[] · data.preview.lines
chargesrequirednumber · data.preview.charges
US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string)creditsrequiredobject · data.preview.credits
taxrequiredobject · data.preview.tax
totalrequirednumber · data.preview.total
US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string)provenancerequiredobject · data.preview.provenance
reviewTokenstring · data.preview.reviewToken
Pass to POST /switch/invoices to issue exactly what was reviewed
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. - Also
INVOICE_REVIEW_STALE,INVOICE_UNRATED_USAGE
Preview an invoice before issuing it
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
- Moves money
- Issues, voids or settles a billing document.
A read: allocates no number and claims no usage. Returns every figure the invoice would carry, the usage it could not price, and a review token. Issue with that token; if live data changes in between, issuing fails with INVOICE_REVIEW_STALE.
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)
customerIdrequiredstring (uuid)
periodStartrequiredstring
ISO-8601 date or timestamp; start of the billing periodperiodEndrequiredstring
ISO-8601 date or timestamp; end of the billing periodnotesstring | null
max 2000 charsincludeBroughtForwardboolean
Also bill priced, still-unbilled usage from before the periodapplyCreditsboolean
Consume the customer's open credit notes on this invoiceexcludeUnratedobject | null
Issue despite unpriced usage, leaving it unbilled for the stated reason (needs the billing adjustment permission)reasonrequiredstring · excludeUnrated.reason
max 2000 charsreleaseInvoiceIdstring (uuid) | null
Reissue only: review as if this invoice were already voided
Response 200
datarequiredobject
Same fields as SwitchInvoicePreview, 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 an invoice with lines, payments and history
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Parameters
idrequiredpath · string
Response 200
datarequiredobject
idrequiredstring (uuid) · data.id
customerIdrequiredstring (uuid) · data.customerId
invoiceNumberrequiredstring · data.invoiceNumber
Sequential per operator, gap-freeperiodStartrequiredstring (date-time) | null · data.periodStart
ISO-8601 timestamp (UTC)periodEndrequiredstring (date-time) | null · data.periodEnd
ISO-8601 timestamp (UTC)issueDaterequiredstring (date-time) · data.issueDate
ISO-8601 timestamp (UTC)dueDaterequiredstring (date-time) | null · data.dueDate
ISO-8601 timestamp (UTC)currencyrequiredstring · data.currency
max 3 charssubtotalrequiredmoney · data.subtotal
USD as a decimal string with exactly 6 places, e.g. "0.012500".taxrequiredmoney · data.tax
USD as a decimal string with exactly 6 places, e.g. "0.012500".totalrequiredmoney · data.total
USD as a decimal string with exactly 6 places, e.g. "0.012500".amountPaidrequiredmoney · data.amountPaid
USD as a decimal string with exactly 6 places, e.g. "0.012500".statusrequiredstring · data.status
One ofdraft,open,partial,paid,overdue,voidoverduerequiredboolean · data.overdue
notesrequiredstring | null · data.notes
replacesInvoiceIdstring (uuid) | null · data.replacesInvoiceId
sentAtstring (date-time) | null · data.sentAt
ISO-8601 timestamp (UTC)sendCountinteger · data.sendCount
customerLabelstring | null · data.customerLabel
On list rowslinesrequiredobject[] · data.lines
Invoice lines in print orderpaymentsrequiredobject[] · data.payments
idrequiredstring (uuid) · data.payments[].id
amountrequiredmoney · data.payments[].amount
USD as a decimal string with exactly 6 places, e.g. "0.012500".methodrequiredstring | null · data.payments[].method
referencerequiredstring | null · data.payments[].reference
paidAtrequiredstring (date-time) · data.payments[].paidAt
ISO-8601 timestamp (UTC)createdAtrequiredstring (date-time) · data.payments[].createdAt
ISO-8601 timestamp (UTC)customerrequiredobject | null · data.customer
idrequiredstring (uuid) · data.customer.id
labelrequiredstring · data.customer.label
sourcerequiredstring | null · data.customer.source
currencyrequiredstring · data.customer.currency
countryBreakdownrequiredobject · data.countryBreakdown
Voice usage on this invoice by destination country (derived, read-only)billingProfilerequiredobject | null · data.billingProfile
The billing identity frozen onto the document at issueidentityFrozenrequiredboolean · data.identityFrozen
exclusionsrequiredobject[] · data.exclusions
Usage consciously left unbilled on this run, with the reasonreplacesrequiredobject | null · data.replaces
idrequiredstring (uuid) · data.replaces.id
invoiceNumberrequiredstring · data.replaces.invoiceNumber
statusrequiredstring · data.replaces.status
One ofdraft,open,partial,paid,overdue,voidreplacedByrequiredobject | null · data.replacedBy
idrequiredstring (uuid) · data.replacedBy.id
invoiceNumberrequiredstring · data.replacedBy.invoiceNumber
statusrequiredstring · data.replacedBy.status
One ofdraft,open,partial,paid,overdue,void
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.
Record a payment received against an invoice
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
- Moves money
- Issues, voids or settles a billing document.
Updates amountPaid and the status (partial or paid). Overpayment is refused.
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)
amountrequirednumber
Amount received, in the document currencymin 0methodstring | null
max 32 charsreferencestring | null
max 160 chars
Response 201
datarequiredobject
Same fields as SwitchInvoice, 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.
Void an invoice
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
- Moves money
- Issues, voids or settles a billing document.
A correction, never an erasure: needs a reason, refuses an invoice that has payments against it (issue a credit note instead), and releases the usage it claimed so it can be billed again. Applied credit notes are returned to the customer.
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)
reasonrequiredstring
max 2000 chars
Response 200
datarequiredobject
idrequiredstring (uuid) · data.id
customerIdrequiredstring (uuid) · data.customerId
invoiceNumberrequiredstring · data.invoiceNumber
Sequential per operator, gap-freeperiodStartrequiredstring (date-time) | null · data.periodStart
ISO-8601 timestamp (UTC)periodEndrequiredstring (date-time) | null · data.periodEnd
ISO-8601 timestamp (UTC)issueDaterequiredstring (date-time) · data.issueDate
ISO-8601 timestamp (UTC)dueDaterequiredstring (date-time) | null · data.dueDate
ISO-8601 timestamp (UTC)currencyrequiredstring · data.currency
max 3 charssubtotalrequiredmoney · data.subtotal
USD as a decimal string with exactly 6 places, e.g. "0.012500".taxrequiredmoney · data.tax
USD as a decimal string with exactly 6 places, e.g. "0.012500".totalrequiredmoney · data.total
USD as a decimal string with exactly 6 places, e.g. "0.012500".amountPaidrequiredmoney · data.amountPaid
USD as a decimal string with exactly 6 places, e.g. "0.012500".statusrequiredstring · data.status
One ofdraft,open,partial,paid,overdue,voidoverduerequiredboolean · data.overdue
notesrequiredstring | null · data.notes
replacesInvoiceIdstring (uuid) | null · data.replacesInvoiceId
sentAtstring (date-time) | null · data.sentAt
ISO-8601 timestamp (UTC)sendCountinteger · data.sendCount
customerLabelstring | null · data.customerLabel
On list rowsreleasedCallsrequiredinteger · data.releasedCalls
returnedCreditNotesrequiredinteger · data.returnedCreditNotes
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.
Void an invoice and issue its replacement
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
- Moves money
- Issues, voids or settles a billing document.
Voids this invoice and issues a replacement over the same period in one step. Preview the replacement first (with releaseInvoiceId) and pass its review token. If the void succeeds but the issue fails, the original stays void and its usage is unbilled; the error says so.
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)
reasonrequiredstring
max 2000 charsreviewTokenrequiredstring
max 120 charsnotesstring | null
max 2000 charsincludeBroughtForwardboolean
applyCreditsboolean
excludeUnratedobject | null
reasonrequiredstring · excludeUnrated.reason
max 2000 chars
Response 201
datarequiredobject
idrequiredstring (uuid) · data.id
customerIdrequiredstring (uuid) · data.customerId
invoiceNumberrequiredstring · data.invoiceNumber
Sequential per operator, gap-freeperiodStartrequiredstring (date-time) | null · data.periodStart
ISO-8601 timestamp (UTC)periodEndrequiredstring (date-time) | null · data.periodEnd
ISO-8601 timestamp (UTC)issueDaterequiredstring (date-time) · data.issueDate
ISO-8601 timestamp (UTC)dueDaterequiredstring (date-time) | null · data.dueDate
ISO-8601 timestamp (UTC)currencyrequiredstring · data.currency
max 3 charssubtotalrequiredmoney · data.subtotal
USD as a decimal string with exactly 6 places, e.g. "0.012500".taxrequiredmoney · data.tax
USD as a decimal string with exactly 6 places, e.g. "0.012500".totalrequiredmoney · data.total
USD as a decimal string with exactly 6 places, e.g. "0.012500".amountPaidrequiredmoney · data.amountPaid
USD as a decimal string with exactly 6 places, e.g. "0.012500".statusrequiredstring · data.status
One ofdraft,open,partial,paid,overdue,voidoverduerequiredboolean · data.overdue
notesrequiredstring | null · data.notes
replacesInvoiceIdstring (uuid) | null · data.replacesInvoiceId
sentAtstring (date-time) | null · data.sentAt
ISO-8601 timestamp (UTC)sendCountinteger · data.sendCount
customerLabelstring | null · data.customerLabel
On list rowsreplacesInvoiceNumberrequiredstring · data.replacesInvoiceNumber
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
INVOICE_REVIEW_STALE,INVOICE_UNRATED_USAGE
Email an invoice to its recipients
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 60 requests per 10 minutes
- Sends email
- Emails the invoice to its recipients.
Safe to repeat. Sends to the billing contacts, or to up to 20 addresses in to. Only accepted sends count as delivered.
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)
tostring (email)[]
Response 200
datarequiredobject
sentrequiredboolean · data.sent
torequiredstring[] · data.to
Addresses the mail transport acceptedfailedrequiredany[] · data.failed
Addresses that could not be sent tosendCountrequiredinteger · data.sendCount
sentAtrequiredstring (date-time) | null · data.sentAt
ISO-8601 timestamp (UTC)
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.
Render an invoice as printable HTML
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Parameters
idrequiredpath · string
Response 200 (text/html)
The invoice as a standalone HTML document.
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.
Download an invoice as XML
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Parameters
idrequiredpath · string
Response 200 (application/xml)
The invoice as a structured XML document.
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.
Download an invoice as PDF
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Parameters
idrequiredpath · string
Response 200 (application/pdf)
The invoice PDF, as an attachment.
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 credit notes
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Parameters
customerIdquery · string (uuid)
limitquery · integer
Page size (default 50, max 500)offsetquery · integer
Response 200
datarequiredobject[]
idrequiredstring (uuid) · data[].id
customerIdrequiredstring (uuid) · data[].customerId
creditNoteNumberrequiredstring · data[].creditNoteNumber
invoiceIdrequiredstring (uuid) | null · data[].invoiceId
amountrequiredmoney · data[].amount
USD as a decimal string with exactly 6 places, e.g. "0.012500".reasonrequiredstring | null · data[].reason
statusrequiredstring · data[].status
issued (open credit) or appliedcreatedAtrequiredstring (date-time) · data[].createdAt
ISO-8601 timestamp (UTC)customerLabelstring | null · data[].customerLabel
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.
Issue a credit note to a customer
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
- Moves money
- Issues, voids or settles a billing document.
Open credit reduces net receivables and can be applied to a later invoice with applyCredits. invoiceId, when given, must belong to the same customer.
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)
customerIdrequiredstring (uuid)
amountrequirednumber
min 0reasonstring | null
max 2000 charsinvoiceIdstring (uuid) | null
Response 201
datarequiredobject
Same fields as SwitchCreditNote, 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 accounts-receivable ageing
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Outstanding customer invoice balances by days past due. totalOutstanding is net of open credit notes; the buckets are gross.
Response 200
datarequiredobject
totalOutstandingrequirednumber · data.totalOutstanding
US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string)grossOutstandingrequirednumber · data.grossOutstanding
US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string)creditNotesOpenrequirednumber · data.creditNotesOpen
US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string)openCountrequiredinteger · data.openCount
bucketsrequiredobject · data.buckets
currentrequirednumber · data.buckets.current
US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string)d1_30requirednumber · data.buckets.d1_30
US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string)d31_60requirednumber · data.buckets.d31_60
US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string)d61_90requirednumber · data.buckets.d61_90
US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string)d90plusrequirednumber · data.buckets.d90plus
US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger 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. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
List supplier payables
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Parameters
vendorTrunkIdquery · string (uuid)
statusquery · string
One of draft, open, partial, paid, overdue, voidlimitquery · integer
Page size (default 50, max 500)offsetquery · integer
Response 200
datarequiredobject
rowsrequiredobject[] · data.rows
idrequiredstring (uuid) · data.rows[].id
vendorTrunkIdrequiredstring (uuid) · data.rows[].vendorTrunkId
payableNumberrequiredstring · data.rows[].payableNumber
periodStartrequiredstring (date-time) | null · data.rows[].periodStart
ISO-8601 timestamp (UTC)periodEndrequiredstring (date-time) | null · data.rows[].periodEnd
ISO-8601 timestamp (UTC)issueDaterequiredstring (date-time) · data.rows[].issueDate
ISO-8601 timestamp (UTC)dueDaterequiredstring (date-time) | null · data.rows[].dueDate
ISO-8601 timestamp (UTC)currencyrequiredstring · data.rows[].currency
max 3 charssubtotalrequiredmoney · data.rows[].subtotal
USD as a decimal string with exactly 6 places, e.g. "0.012500".totalrequiredmoney · data.rows[].total
USD as a decimal string with exactly 6 places, e.g. "0.012500".amountPaidrequiredmoney · data.rows[].amountPaid
USD as a decimal string with exactly 6 places, e.g. "0.012500".statusrequiredstring · data.rows[].status
One ofdraft,open,partial,paid,overdue,voidnotesrequiredstring | null · data.rows[].notes
overdueboolean · data.rows[].overdue
trunkLabelstring | null · data.rows[].trunkLabel
On list rowscreatedAtrequiredstring (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
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.
Raise a payable for a supplier trunk over a period
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
- Moves money
- Issues, voids or settles a billing document.
Totals the supplier cost of the usage on that trunk in the period and claims it, so it cannot be paid twice.
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)
vendorTrunkIdrequiredstring (uuid)
periodStartrequiredstring
ISO-8601 date or timestamp; start of the billing periodperiodEndrequiredstring
ISO-8601 date or timestamp; end of the billing periodnotesstring | null
max 2000 chars
Response 201
datarequiredobject
Same fields as SwitchPayable, 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 payable with lines and payments
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Parameters
idrequiredpath · string
Response 200
datarequiredobject
idrequiredstring (uuid) · data.id
vendorTrunkIdrequiredstring (uuid) · data.vendorTrunkId
payableNumberrequiredstring · data.payableNumber
periodStartrequiredstring (date-time) | null · data.periodStart
ISO-8601 timestamp (UTC)periodEndrequiredstring (date-time) | null · data.periodEnd
ISO-8601 timestamp (UTC)issueDaterequiredstring (date-time) · data.issueDate
ISO-8601 timestamp (UTC)dueDaterequiredstring (date-time) | null · data.dueDate
ISO-8601 timestamp (UTC)currencyrequiredstring · data.currency
max 3 charssubtotalrequiredmoney · data.subtotal
USD as a decimal string with exactly 6 places, e.g. "0.012500".totalrequiredmoney · data.total
USD as a decimal string with exactly 6 places, e.g. "0.012500".amountPaidrequiredmoney · data.amountPaid
USD as a decimal string with exactly 6 places, e.g. "0.012500".statusrequiredstring · data.status
One ofdraft,open,partial,paid,overdue,voidnotesrequiredstring | null · data.notes
overdueboolean · data.overdue
trunkLabelstring | null · data.trunkLabel
On list rowscreatedAtrequiredstring (date-time) · data.createdAt
ISO-8601 timestamp (UTC)updatedAtrequiredstring (date-time) · data.updatedAt
ISO-8601 timestamp (UTC)linesrequiredobject[] · data.lines
paymentsrequiredobject[] · data.payments
Same fields as SwitchPayment, shown earlier on this page.trunkrequiredobject | null · data.trunk
idrequiredstring (uuid) · data.trunk.id
labelrequiredstring · data.trunk.label
settlementModerequiredstring | null · data.trunk.settlementMode
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.
Record a payment made to a supplier
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
- Moves money
- Issues, voids or settles a billing document.
Payments larger than the outstanding balance, or against a void payable, are refused.
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)
amountrequirednumber
Amount received, in the document currencymin 0methodstring | null
max 32 charsreferencestring | null
max 160 chars
Response 201
datarequiredobject
Same fields as SwitchPayable, 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.
Void a payable
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
- Moves money
- Issues, voids or settles a billing document.
Releases the usage it claimed so a corrected payable can pick it up. Voiding an already void payable is a no-op.
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
vendorTrunkIdrequiredstring (uuid) · data.vendorTrunkId
payableNumberrequiredstring · data.payableNumber
periodStartrequiredstring (date-time) | null · data.periodStart
ISO-8601 timestamp (UTC)periodEndrequiredstring (date-time) | null · data.periodEnd
ISO-8601 timestamp (UTC)issueDaterequiredstring (date-time) · data.issueDate
ISO-8601 timestamp (UTC)dueDaterequiredstring (date-time) | null · data.dueDate
ISO-8601 timestamp (UTC)currencyrequiredstring · data.currency
max 3 charssubtotalrequiredmoney · data.subtotal
USD as a decimal string with exactly 6 places, e.g. "0.012500".totalrequiredmoney · data.total
USD as a decimal string with exactly 6 places, e.g. "0.012500".amountPaidrequiredmoney · data.amountPaid
USD as a decimal string with exactly 6 places, e.g. "0.012500".statusrequiredstring · data.status
One ofdraft,open,partial,paid,overdue,voidnotesrequiredstring | null · data.notes
overdueboolean · data.overdue
trunkLabelstring | null · data.trunkLabel
On list rowscreatedAtrequiredstring (date-time) · data.createdAt
ISO-8601 timestamp (UTC)updatedAtrequiredstring (date-time) · data.updatedAt
ISO-8601 timestamp (UTC)releasedCallsrequiredinteger · data.releasedCalls
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.
Get accounts-payable ageing
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
What you owe suppliers on open payables, by days past due.
Response 200
datarequiredobject
totalOwedrequirednumber · data.totalOwed
US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string)openCountrequiredinteger · data.openCount
bucketsrequiredobject · data.buckets
currentrequirednumber · data.buckets.current
US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string)d1_30requirednumber · data.buckets.d1_30
US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string)d31_60requirednumber · data.buckets.d31_60
US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string)d61_90requirednumber · data.buckets.d61_90
US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger string)d90plusrequirednumber · data.buckets.d90plus
US dollars as a JSON number rounded to 6 decimals (a computed figure, not a ledger 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. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
List bilateral counterparties
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
A counterparty pairs a customer you sell to with a supplier trunk you buy from, so the two balances can be netted.
Response 200
datarequiredobject[]
idrequiredstring (uuid) · data[].id
namerequiredstring · data[].name
customerIdrequiredstring (uuid) | null · data[].customerId
The customer side of this counterpartyvendorTrunkIdrequiredstring (uuid) | null · data[].vendorTrunkId
The supplier side of this counterpartycurrencyrequiredstring · data[].currency
nettingEnabledrequiredboolean · data[].nettingEnabled
notesrequiredstring | null · data[].notes
customerLabelstring | null · data[].customerLabel
trunkLabelstring | null · data[].trunkLabel
createdAtrequiredstring (date-time) · data[].createdAt
ISO-8601 timestamp (UTC)updatedAtrequiredstring (date-time) · data[].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. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Create a bilateral counterparty
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.
Request body (application/json)
namerequiredstring
max 160 charscustomerIdstring (uuid) | null
vendorTrunkIdstring (uuid) | null
currencystring | null
max 3 charsnettingEnabledboolean
notesstring | null
max 2000 chars
Response 201
datarequiredobject
Same fields as SwitchCounterparty, 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.
Update a bilateral counterparty
PATCH/
- 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)
namestring
max 160 charscustomerIdstring (uuid) | null
vendorTrunkIdstring (uuid) | null
currencystring | null
max 3 charsnettingEnabledboolean
notesstring | null
max 2000 chars
Response 200
datarequiredobject
Same fields as SwitchCounterparty, 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.
Delete a bilateral counterparty
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.
Run netting for a counterparty over a period
POST/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Open receivables (less issued credit notes) minus open payables in the period give one net figure and direction. The run is recorded as final and fires the netting.run webhook; the money itself moves off-platform.
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)
periodStartrequiredstring
ISO date or datetimeperiodEndrequiredstring
ISO date or datetime (exclusive)notesstring | null
max 2000 chars
Response 201
datarequiredobject
idrequiredstring (uuid) · data.id
counterpartyIdrequiredstring (uuid) · data.counterpartyId
counterpartyNamerequiredstring · data.counterpartyName
periodStartrequiredstring (date-time) | null · data.periodStart
ISO-8601 timestamp (UTC)periodEndrequiredstring (date-time) | null · data.periodEnd
ISO-8601 timestamp (UTC)arTotalrequiredmoney · data.arTotal
USD as a decimal string with exactly 6 places, e.g. "0.012500".apTotalrequiredmoney · data.apTotal
USD as a decimal string with exactly 6 places, e.g. "0.012500".netAmountrequiredmoney · data.netAmount
Absolute net amount; see direction USD as a decimal string with exactly 6 places, e.g. "0.012500".directionrequiredstring · data.direction
One ofreceivable,payable,settledstatusrequiredstring · data.status
notesrequiredstring | null · data.notes
createdAtrequiredstring (date-time) · data.createdAt
ISO-8601 timestamp (UTC)
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 netting runs
GET/
- Access
- API key. Scoped keys need
switch:manage. - Rate limit
- 100 requests per second (the default)
Settlements that offset what a bilateral counterparty owes you against what you owe them (latest 200).
Parameters
counterpartyIdquery · string (uuid)
Response 200
datarequiredobject[]
idrequiredstring (uuid) · data[].id
counterpartyIdrequiredstring (uuid) · data[].counterpartyId
counterpartyNamerequiredstring | null · data[].counterpartyName
periodStartrequiredstring (date-time) | null · data[].periodStart
ISO-8601 timestamp (UTC)periodEndrequiredstring (date-time) | null · data[].periodEnd
ISO-8601 timestamp (UTC)arTotalrequiredmoney · data[].arTotal
USD as a decimal string with exactly 6 places, e.g. "0.012500".apTotalrequiredmoney · data[].apTotal
USD as a decimal string with exactly 6 places, e.g. "0.012500".netAmountrequiredmoney · data[].netAmount
USD as a decimal string with exactly 6 places, e.g. "0.012500".directionrequiredstring · data[].direction
statusrequiredstring · data[].status
notesrequiredstring | null · data[].notes
createdAtrequiredstring (date-time) · data[].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. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.