Help Center
All API resources

Interconnects

Buying a route from Market View creates an interconnect between one of your accounts and the seller's route. Traffic sent with the route's tech prefix then terminates on it, billed per minute or per message from the account's balance. Purchasing is free; you pay only for traffic.

Buy a route (create an interconnect)

POST/buyers/interconnect

Buys a seller's route for one of your accounts, or for all of them, so you can send it traffic. Returns the tech prefix to put in front of the dialled number (voice) or to use for the route (SMS), the route type, and a link to a rate deck. Buying is free; you pay only for the traffic you send. The account must match the route: a voice account for a voice route, an SMPP account for an SMS route.

Send all fields in the form body. route_type is sms for SMS routes and voice otherwise. Anonymous routes show the seller as Anonymous. To get the route's rate deck, call Download a route's rate deck with the route's i_tariff rather than following rates_url. If i_account is not one of your accounts of the route's type, the response is not JSON: check the account before buying.

Parameters

  • addintegerform fieldRequired

    Must be 1 to perform the purchase.

    Example1
  • idintegerform fieldRequired

    The route's i_connection, from Market View or List seller routes.

    Example38
  • i_accountintegerform fieldRequired

    The buyer account to attach the route to. 0 attaches it to every one of your accounts of the matching type that does not already have it.

    Example1022
  • agreestringform fieldRequired

    Must be yes, confirming you accept the seller's terms and conditions.

    One ofyes

Errors

MessageWhen
"This API expects parameter add=1 for route purchase"add is missing or 0
"Error! You have to agree to seller terms and conditions to purchase the route (agree=yes)."agree is not exactly yes
"Error! Choose another account or route, this route is already purchased for this account."the account already has this route
"Error! Seller has blocked one of your accounts on this route, you can not purchase it until it gets unblocked."the seller has blocked any of your accounts on this route
"Error! Private route."the route is private and the seller has not opened it to you
POST/buyers/interconnect
curl --digest -u "$TCXC_USERNAME:$TCXC_API_KEY" -X POST \
  "https://apiv2.telecomsxchange.com/buyers/interconnect" \
  -d add=1 \
  -d id=38 \
  -d i_account=1022 \
  -d agree=yes
Response
{
  "status": "success",
  "message": "Interconnection with NorthStarTel completed",
  "rates_url": "https://members.telecomsxchange.com/accounts.php?download=38",
  "tech_prefix": "33270#",
  "route_type": "voice"
}

List interconnects

POST/interconnections/list

Lists the routes you have bought (your interconnects) across all your accounts, with the seller, route name, tech prefix, i_tariff, and whether you or the seller has blocked it. The same call can first block or unblock one interconnect: pass its i_purchased_route in block or unblock, and the list returned already reflects the change. A blocked interconnect carries none of your traffic. Free.

Check result, not status, for success. inactive_prs counts all your interconnects blocked by you or by the seller. Anonymous routes show vendor_login Anonymous and have no i_vendor. A block or unblock value that is not one of your interconnects is ignored.

Parameters

  • blockintegerform fieldOptional

    i_purchased_route of an interconnect to block.

    Example3
  • unblockintegerform fieldOptional

    i_purchased_route of an interconnect to unblock.

  • qstringform fieldOptional

    Search text matched against route name, account name, tech prefix and seller login (or the word Anonymous for anonymous routes). Up to 100 characters.

  • pagerintegerform fieldOptional

    Maximum number of interconnects to return.

    Default50
  • offintegerform fieldOptional

    Number of interconnects to skip, for paging.

    Default0
POST/interconnections/list
curl --digest -u "$TCXC_USERNAME:$TCXC_API_KEY" -X POST \
  "https://apiv2.telecomsxchange.com/interconnections/list" \
  -d block=3 \
  -d pager=50 \
  -d off=0
Response
{
  "result": "success",
  "purchased_routes": [
    {
      "i_purchased_route": "4",
      "vendor_login": "NorthStarTel",
      "connection_name": "Gold+",
      "i_tariff": "3",
      "tech_prefix": "36310#",
      "blocked": "0",
      "vendor_blocked": "0",
      "account_name": "Northwind",
      "i_vendor": "2",
      "smpp": "1",
      "anonymous": "0"
    },
    {
      "i_purchased_route": "9",
      "vendor_login": "Anonymous",
      "connection_name": "Premium CLI",
      "i_tariff": "41",
      "tech_prefix": "41822#",
      "blocked": "1",
      "vendor_blocked": "0",
      "account_name": "Northwind",
      "smpp": "0",
      "anonymous": "1"
    }
  ],
  "inactive_prs": 1
}