MTC Update Number
MTC Update Number API allows Providers and Direct Merchants to update their MTC number. 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/UpdateMTCNumber/
URL:
- api.contactatonce.com/api/v1.0/updatemtcnumber/
- api.contactatonce.co.uk/api/v1.0/updatemtcnumber/
- api.contactatonce.com.au/api/v1.0/updatemtcnumber/
Parameters
Authorization header: “basic” + space + ApiKey
Request | |||
---|---|---|---|
Parameter | Type | Required | Description |
ReferenceId | String | Required for Provider | The ReferenceID assigned to the Provider's merchant. |
MTCNumber | String | Required | The MTC number assigned to the account. |
ForwardNumber | String | Optional | The number that receives MTC messages. |
Source | String | Optional | The name or description of the MTC Number. |
PrimaryNumber | bool(0,1) | Optional | Sets the MTC as the primary number if no other number is set to primary. |
LeadDisabled | bool(0,1) | Optional | Disables the sending of Lead emails for the MTC number. |
IsAgentInitiationDisabled | bool(0,1) | Optional | Prevents agents from starting MTC conversations. |
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:
“MTCNumberUpdateError” = 6402 - Error Messages:
“The ReferenceId provided does not exist for specified provider”
“The MTC number provided does not exist for given ReferenceId”
“A primary number already exists for the given ReferenceId.”
“There was an error updating the provided MTC number”
Application Tasks
Validation
- For provider, ensure referenceId matches a qualified merchant.
- Verify MTC number exists
- Verify MTC number is owned by provider/merchant combo
- If is primary number set the check for existing primary
- Validate Forward number
Provisioning
- If user is DM, get MerchantId from directMerchantProvider table, otherwise use merchantid obtained from ReferenceId
- ProviderId set from APIKey
- Set Is Primary Number, ADF Disabled, Forward Number, Source
- Update textToChatNumber table
- Update TrackedNumber table with forward to number
- Update number in window config for primary numbers only
- Return MTCNumber, ReferenceId, message, status
Sample Request
Header
Authorization basic 64AC79BA-B2CE-42CF-97EE-99A0A6DD2F2x
Body
{ "ReferenceId" : "", "MTCNumber" : "16788837498", "PrimaryNumber" : 0, "ForwardNumber" : "7705965503", "LeadDisabled" : 1, "IsAgentInitiationDisabled" : 1 }