Provision & Activate

This guide will walk you through how to provision and manage a mobile service using the Gamma Mobile API.

Authentication is not covered here. Please see the JSON Web Token section of the Authentication guide for information on authentication.

Create Company

A Company associated with a Channel Partner account can be created. It will then be possible to provision new services with this Company.

Companies can be created by POSTing to the 'companies' collection resource. The example below shows how this request may be structured. See the Create Company section of the API spec for a complete reference.

POST https://api-test.gamma.co.uk/mobile/v1/companies
{
	"channelPartnerId": 123,
	"name": "Test Company 1",
	"contact": {
		"name": "Tester",
		"email": "test@email.com",
		"phone": "000000000000"
	},
	"address": {
		"line1": "15 Kings Road West",
		"town": "Newbury",
		"county": "Berkshire",
		"postcode": "RG14 5BY"
	}
}

The response will contain the newly created company including its ID. This ID will be needed to reference the company in future requests. You can search for companies if you need to find the ID of an existing company.

You will also receive a "Location" Response Header that will contain the link to your newly created resource.

Create User

Users belong to a company and can be associated with multiple mobile services.

Users are created by POSTing to the 'users' collection resource. The example below shows how this request may be structured. See the Create User section of the API spec for a complete reference.

POST https://api-test.gamma.co.uk/mobile/v1/users
{
	"name": "Test User",
	"company": {
		"id": 1234
	}
}

The response will contain the newly created user including its ID. This ID will be needed to reference the user in future requests. You can search for users if you need to find the ID of an existing user.

You will also receive a "Location" Response Header that will contain the link to your newly created resource.

Provision Standard Service

A service can be provisioned once a Company is available and a User assigned to that company exists. Newly created services will be in the state of "SET_UP". No calls can be made, or charges applied, until the service is activated on the network; Activate Standard Service.

Services are created by POSTing to the 'services/standard' collection resource. The example below shows how this request may be structured. You will need to provide the ID of a MSISDN and SIM in an "AVAILABLE" state within the body of your request; Find an "AVAILABLE" MSISDN, Find an "AVAILABLE" SIM.

See the Create Service section of the API spec for a complete reference.

POST https://api-test.gamma.co.uk/mobile/v1/services/standard
{
	"channelPartnerId": 123,
	"configuration": {
		"bars": [],
		"networkServices": ["MOBILE_DATA", "DATA_ROAMING", "PREMIUM_SERVICES", "INTERNATIONAL_CALLING", "INTERNATIONAL_ROAMING"],
		"boltOns": ["UK_DATA_5GB"],
		"roamingConfiguration": {
			"notificationsAndCap": true,
			"euRoamingMaxCharge": "EU_008_9",
			"rowRoamingMaxCharge": "ROW_500_0"
		}
	},
	"msisdn": {
		"id": "447000000000"
	},
	"sim": {
		"id": "0000000000000000000"
	},
	"tariff": {
		"id": "BUSINESS_BASIC"
	},
	"user": {
		"id": 1234
	},
	"usageControls": {}
}

The response will contain the newly created service including its ID. This ID will be needed to reference the service in future requests. You can search for services if you need to find the ID of an existing service.

You will also receive a "Location" Response Header that will contain the link to your newly created resource.

Activate Standard Service

Newly created Services must be "activated" before they can be used. Once activated, mobile services will become available and charging will commence.

Activation is performed by setting the status of a service to "ACTIVE". The example below shows how this is done. Note that the URL used for this PATCH will be the same as was returned in the "Location" header of your POST request from the Provision Standard Service step.

See the Update Service section of the API spec for a complete reference.

PATCH https://api-test.gamma.co.uk/mobile/v1/services/standard/12345
{
	"status": "ACTIVE"
}

The response will be 202 (Accepted) with no content. This indicates that the change will not have been applied immediately. Resources will be locked while a change is being applied. This is indicated by the presence of the "LOCKED" value in the resource's "readOnlyAttributes" property. You can use the request history resource to track the progress of asynchronous requests.