Get started

Documentation in Beta

This API and it's documentation are currently in beta. Both the API functionality and the documentation are liable to change and any software built upon this API may not be stable until the API leaves the beta testing stage.

Introduction

Welcome to the Telcom Developer documentation. We expose a public API service for developer use, which has a detailed OpenAPI 3 specification available in the API Reference.

If you would like to try the endpoints for yourself using Postman or a compatible API testing tool, you can download and use this Postman Collection JSON file

Product Search Lifecycle

  1. Create a Personal Access Token via the Telcom Customer Portal.
  2. Request a list of your Customer Accounts from the Customer Account Index endpoint.
  3. Customer Account Index endpoint returns an array of Customer Accounts.
  4. Search a Postcode or UDPRN on the Location Search endpoint.
  5. Location Search endpoint returns an array of Locations.
  6. Request a list of Carriers from the Carrier Index endpoint.
  7. Carrier Index endpoint returns an array of Carriers.
  8. Create a Search with the New Search endpoint sending an array of Carriers, a Location and a Customer Account ID.
  9. New Search endpoint returns a Search ID.
  10. Use the Search endpoint to check the search status.
  11. Request a list of Product Offers from Search Offers endpoint.

Create a Personal Access Token

Beta Personal Access Tokens

The portal functionality is not available during the beta period. To request access the API get in touch with Will Goodall.

Visit the Telcom Portal - Access Token management page and create a new Access Token.

Copy the Access Token value. The token value is only available to copy at the point of Access Token creation. The Access Token is used as the value for Bearer Authentication in your all HTTP requests to the Telcom APIs.

Configure your HTTP requests

All HTTP requests to our APIs require the following headers shown here formatted as the options object for a javascript fetch request.


  {
    method: 'GET',
    headers: {
      Accept: 'application/hal+json',
      'Content-Type': 'application/hal+json',
      Authorization: 'Bearer [PAT value eg: ey1234...]'
    }
  }
  

Index your Customer Accounts

Send a GET request to the Customer Account Index endpoint.

https://api.telcom.uk/user/customer-accounts

The API will return an array of Customer Accounts, we will use a Customer Account ID to create a search later in the process.

Search the Location API

Send a GET request to the Location Search endpoint with a postcode or a udprn as a parameter.

https://api.telcom.uk/locations?postcode=M4 1LN

https://api.telcom.uk/locations?udprn=24461489

The API will return a response as documented in the Location Search endpoint.

We will use a Location ID to create a Search later in the process.

Embeds

Additionally you can request the network status and distances from the Telcom Network via the _embed parameter.

https://api.telcom.uk/locations?postcode=M4 1LN&_embed=network

https://api.telcom.uk/locations?postcode=M4 1LN&_embed=distances

https://api.telcom.uk/locations?postcode=M4 1LN&_embed=network,distances

Look up available Carriers

Send a GET request to the Carrier Index endpoint.

https://api.telcom.uk/carriers

The API will return a response as documented in the Carrier Index endpoint.

Check Search status

Send a GET request to the Search endpoint with an embed argument like so.

https://api.telcom.uk/searches/{Search ID}?_embed=carrier-status

The response will return information about the search passed in the URL. There will be an _embedded key on the response object with contents like the following.


    "_embedded": {
        "carrier-status": [
            {
                "id": "00000000-0000-0000-0000-000000000000",
                "name": "Telcom",
                "status": "COMPLETED",
                "updated_at": "2024-06-05T10:51:59.000000Z"
            },
            {
                "id": "00000000-0000-0000-0000-000000000000",
                "name": "Luminet",
                "status": "PENDING",
                "updated_at": "2024-06-05T10:51:55.000000Z"
            }
        ]
    }

Each object in the carrier-status array will have a status key with the a value of "PENDING" | "COMPLETED" | "FAILED".

Once each status key has a value that does not equal "PENDING" it is safe to fetch the offers for the search as detailed in the next step.

Check for created offers

Send a GET request to the Search Offers endpoint.

https://api.telcom.uk/searches/{Search ID}/offers

The response will include an array of results, by default the results are paginated, alternatively you can request the results with no pagination.

https://api.telcom.uk/searches/{Search ID}/offers?noPagination