MTC Provision
MTC Provision API allows Providers and Direct Merchants to obtain a MTC number from US, UK, or AU. Optional settings include: Forward number, source (description), set as primary number, and disabling of lead generation. A WebServiceInvocation record is inserted for every use. Authorized users of the API will have an entry in the APIKey table.
Location:
WebAPI/Controllers/MTC/ProvisionMTCNumber/
URL:
- api.contactatonce.com/api/v1.0/provisionmtcnumber/
- api.contactatonce.co.uk/api/v1.0/provisionmtcnumber/
- api.contactatonce.com.au/api/v1.0/provisionmtcnumber/
Parameters
Authorization header: “basic” + space + ApiKey
Request | |||
---|---|---|---|
Parameter | Type | Required | Description |
ReferenceId | String | Required for Provider | The ReferenceID assigned to the Provider's merchant. |
AreaCode | String | Required for US and CA only | The area code for the new MTC number. |
ForwardNumber | String | Optional | The number that receives MTC messages. |
Source | String | Optional | The name or description of the MTC Number. |
PrimaryNumber | bool(0,1) | Sets the MTC as the primary number if no other number is set to primary. |
|
LeadDisabled | bool(0,1) | Disables the sending of Lead emails for the MTC number. |
Response
Response | ||
---|---|---|
Parameter | Type | Description |
ReferenceID | String | The ReferenceId provided by the user. |
PhoneNumber | String | The new provisioned MTC number. |
Status | String | Will contain one of the following messages: 0 = Success 1 = Failure |
Application Messages
- EventCode:
“MTCProvisionError” = 6400 - Error Messages:
“Failure to provision MTC number”
“Failure to retrieve any MTC numbers from {Provider Name}”
“The ReferenceId provided does not exist for specified provider”
“The area code provided is not a known format”
- Warning Messages:
“Primary number already exists, provisioning number as non primary.”
Application Tasks
Validation
- For provider, ensure referenceId matches a qualified merchant.
- AreaCode used for US, CA
- Check that max MTC number has not been reached by checking number of records in textToChatNumber table versus the number allowed by the featurePreference value.
Provisioning
- If user is DM, get MerchantId from directMerchantProvider table, otherwise use merchantid obtained from ReferenceId
- ProviderId set from APIKey
- Country set from Provider
- Set ProviderType from SmsManager
- Set Is Primary Number, ADF Disabled, Forward Number, Source
- Get current or default Greeting Setting and Whisper Settings for US and CA.
- Provision number with SmsManager
- AreaCode is used for US and CA
- Country is used for UK and AU
- Add phone number to TextToChatNumber table
- Update number in window config for primary numbers
- Return Provisioned MTC number
Notes
Provider’s country with US, CA, and tropo have area codes, UK and AU do not. US and UK have audio settings, AU does not (Not voice Enabled).