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   
ParameterTypeRequiredDescription
ReferenceId StringRequired for ProviderThe ReferenceID assigned to the Provider's merchant.
  • Maximum 50 characters
  • Parameter is null or empty for Direct Merchants
  • MTCNumberStringRequiredThe MTC number assigned to the account.
  • Maximum 32 characters
  • Number only string
  • ForwardNumber StringOptionalThe number that receives MTC messages.
  • Maximum 32 characters.
  • Null value will not update setting
  • Source StringOptionalThe name or description of the MTC Number.
  • Maximum 50 characters
  • Null value will not update setting
  • PrimaryNumber bool(0,1)OptionalSets the MTC as the primary number if no other number is set to primary.
  • Null value will not update setting
  • LeadDisabled bool(0,1)OptionalDisables the sending of Lead emails for the MTC number.
  • Null value will not update setting.
  • IsAgentInitiationDisabledbool(0,1)OptionalPrevents agents from starting MTC conversations.
  • Null value will not update setting
  • Response

    Response  
    ParameterTypeDescription
    ReferenceIDStringThe ReferenceId provided by the user.
    PhoneNumberStringThe new provisioned MTC number.
    StatusStringWill contain one of the following messages:
    0 = Success
  • “Success”

  • 1 = Failure
  • “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 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
    }