Provision & Activate

This guide will walk you through how to provision and manage a hosted 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.

Provision Hosted Service

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 Hosted Service.

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

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

POST https://api-test.gamma.co.uk/mobile/v1/services/hosted
{
	"channelPartnerId": "123",
	"msisdn": {
		"id": "447000000000"
	},
	"type":"YOUR_HOSTED_TYPE_HERE"
}

This request contains a "type" field. You may be provided with one or more "type" values. Each new Hosted Service must be given a type when it is created and the only way to change the type, if you have more than one, is to cease the service and set it up again. A type value is linked to your SIP trunk reference and/or your SMPP bind account, and therefore it would only be necessary to have multiple type values if you have multiple SIP trunks or SMPP binds serving different purposes. You must pick the one that relates to the SIP trunk or SMPP binds that you would like this service in particular to use.

The response will be 201 (Created), containing a response body of the newly created service including its ID. This ID will be needed to reference the service in future requests.

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

Activate Hosted 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 Hosted Service step.

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

PATCH https://api-test.gamma.co.uk/mobile/v1/services/hosted/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.