Finding an "AVAILABLE" MSISDN

This guide will walk you through how to find a MSISDN that is in an "AVAILABLE" state. In order to provision a Standard or Hosted Service, you need to have a mobile number that is "AVAILABLE" and not in any other state.

Performing a basic search

Searches are performed by applying a GET to the base path of a resource, and applying query parameters to refine your results.

See the Search MSISDNs section of the API spec for a complete reference.

To find an AVAILABLE MSISDN:

GET https://api-test.gamma.co.uk/mobile/v1/msisdns?status=AVAILABLE

This will return a list of MSISDN resources that are in the requested state:


[
	{
	
		"self": "http://api-test.gamma.co.uk/mobile/v1/msisdns/447000000001",
		"id": "447000000001",
		"channelPartnerId": 123,
		"type": "STANDARD",
		"pac": null,
		"status": "AVAILABLE"
	},
	{
	
		"self": "http://api-test.gamma.co.uk/mobile/v1/msisdns/447000000002",
		"id": "447000000002",
		"channelPartnerId": 123,
		"type": "HOSTED",
		"pac": null,
		"status": "AVAILABLE"
	}
]

Refining results

In the above example, we received MSISDNs that were AVAILABLE, but have a mixture of Types. You can only use "STANDARD" MSISDNs for provisioning Standard Services, and "HOSTED" for hosted. You can provide an extra query parameter to search for the Type of MSISDN you need for your particular provision. For example, to find HOSTED and AVAILABLE MSISDNs:

GET https://api-test.gamma.co.uk/mobile/v1/msisdns?status=AVAILABLE&type=HOSTED
[
	{
	
		"self": "http://api-test.gamma.co.uk/mobile/v1/msisdns/447000000002",
		"id": "447000000002",
		"channelPartnerId": 123,
		"type": "HOSTED",
		"pac": null,
		"status": "AVAILABLE"
	}
]