Skip to content
Markets open

API reference

Route blends

Blended routes that spread traffic across several member routes.

7 operationsBase URL https://packetexchange.io/api/v1Postman collection

Preview a blended route

POST/api/v1/routes/blends/preview

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Request body (application/json)

FieldTypeDescription
membersrequiredobject[]-
memberRouteIdmembers[].memberRouteIdstring (uuid) | null-
memberVendorTrunkIdmembers[].memberVendorTrunkIdstring (uuid) | null-
raterequiredmembers[].ratenumber-min 0
weightPctrequiredmembers[].weightPctnumber-0 to 100
routeTypemembers[].routeTypestring-One of direct, premium, standard, ncli
capacitymembers[].capacityinteger-min 0
maxCpsmembers[].maxCpsinteger-min 0
prioritymembers[].priorityinteger-1 to 20
enabledmembers[].enabledboolean-
typestring-One of voice, sms
countryCodestring-
numberTypestring-One of mobile, fixed, both

Response 200

FieldTypeDescription
datarequiredobject-
blendedRaterequireddata.blendedRatenumberWeighted rate (display figure)
capacityrequireddata.capacitynumber-
memberCountrequireddata.memberCountinteger-
membersrequireddata.membersobject[]-
coveragerequireddata.coverageobject | null-
coverageSummaryrequireddata.coverageSummarystring | null-

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 409CONFLICT (or a code-specific 409): the change clashes with existing state.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Propose the cheapest complete blend for a destination

POST/api/v1/routes/blends/propose

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
20 requests per minute

Request body (application/json)

FieldTypeDescription
typestring-default "voice"One of voice, sms
countryCoderequiredstring-
numberTypestring-default "both"One of mobile, fixed, both

Response 200

FieldTypeDescription
datarequiredobjectProposed members, their coverage and a coverage summary

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 409CONFLICT (or a code-specific 409): the change clashes with existing state.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

List your blended routes

GET/api/v1/routes/blends

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Response 200

FieldTypeDescription
datarequiredobject[]-

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Create a blended route

POST/api/v1/routes/blends

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
30 requests per minute

Refused when no member is enabled, or when the blend cannot carry the destination it claims unless acknowledgeIncomplete is set.

Request body (application/json)

FieldTypeDescription
namerequiredstring-max 255 chars
typerequiredstring-One of voice, sms
countryrequiredstring-max 100 chars
countryCoderequiredstring-
prefixstring[]-
destinationNamestring-max 255 chars
cliTypestring-One of full_cli, ncli, local_cli, mixed_cli
billingIncrementstring-
visibilitystring-One of public, private
dialerCompatibleboolean-
membersrequiredobject[]-
memberRouteIdmembers[].memberRouteIdstring (uuid) | null-
memberVendorTrunkIdmembers[].memberVendorTrunkIdstring (uuid) | null-
raterequiredmembers[].ratenumber-min 0
weightPctrequiredmembers[].weightPctnumber-0 to 100
routeTypemembers[].routeTypestring-One of direct, premium, standard, ncli
capacitymembers[].capacityinteger-min 0
maxCpsmembers[].maxCpsinteger-min 0
prioritymembers[].priorityinteger-1 to 20
enabledmembers[].enabledboolean-
numberTypestring-One of mobile, fixed, both
acknowledgeIncompleteboolean-

Response 201

FieldTypeDescription
datarequiredobject-

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 409CONFLICT (or a code-specific 409): the change clashes with existing state.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Get a blended route

GET/api/v1/routes/blends/{id}

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
idrequireddata.idstring (uuid)-
namerequireddata.namestring-
typerequireddata.typestring-One of voice, sms
countryrequireddata.countrystring-
countryCoderequireddata.countryCodestring-
visibilityrequireddata.visibilitystring-One of public, private
statusrequireddata.statusstring-One of active, paused, suspended, pending_review
numberTyperequireddata.numberTypestring | null-
coveragerequireddata.coverageobject | null-
coverageSummaryrequireddata.coverageSummarystring | null-
createdAtrequireddata.createdAtstring (date-time)ISO-8601 timestamp (UTC)

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 404NOT_FOUND: no such resource on your account.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Update a blended route

PATCH/api/v1/routes/blends/{id}

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Parameters

NameInTypeDescription
idrequiredpathstring-

Request body (application/json)

FieldTypeDescription
namestring-max 255 chars
visibilitystring-One of public, private
dialerCompatibleboolean-
membersobject[]-
memberRouteIdmembers[].memberRouteIdstring (uuid) | null-
memberVendorTrunkIdmembers[].memberVendorTrunkIdstring (uuid) | null-
raterequiredmembers[].ratenumber-min 0
weightPctrequiredmembers[].weightPctnumber-0 to 100
routeTypemembers[].routeTypestring-One of direct, premium, standard, ncli
capacitymembers[].capacityinteger-min 0
maxCpsmembers[].maxCpsinteger-min 0
prioritymembers[].priorityinteger-1 to 20
enabledmembers[].enabledboolean-
numberTypestring-One of mobile, fixed, both
acknowledgeIncompleteboolean-

Response 200

FieldTypeDescription
datarequiredobject-

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 404NOT_FOUND: no such resource on your account.
  • 409CONFLICT (or a code-specific 409): the change clashes with existing state.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Archive a blended route

DELETE/api/v1/routes/blends/{id}

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
archivedrequireddata.archivedboolean-One of true

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 404NOT_FOUND: no such resource on your account.
  • 409CONFLICT (or a code-specific 409): the change clashes with existing state.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.