Searching...

Matching results

    SMS Account

    A company contracting services from an SMS provider integrated in AirVantage has the possibility send SMS messages though it. An SMS account entity collects necessary information to establish connection with the service provider.

    Read only fields are computed by AirVantage and can only be seen on response fragments sent by find, create, or edit requests.

    Field Description Read Only Type
    uid SMS account unique identifier. true uid
    name SMS account name. false string
    provider.uid Uid of the SMS provider linked to the SMS account. false uid
    parameters Values of SMS account parameters defined by the SMS Provider false string

    This is a complete representation of a Entity. This fragment can be used for create or edit requests. Please refer to the fields section to know which fields can be modified.

    {
       "uid" : "",
       "name" : "",
       "provider" : {
          "uid": "",
          "name": ""
       },
       "parameters" : {
          "key" : "value"
       }
    }

    /api/v1/smsaccounts

    Returns a paginated list of SMS accounts.

    It is possible to restrain the result list using criteria parameters.

    The fields parameter has to be defined in order to specify the attributes of the SMS account which will be returned.
    If fields parameter is missing, only the following attributes of the SMS account are returned: uid, name.

    More information about paging, filtering, and sorting here

    Request

    GET https://na.airvantage.net/api/v1/smsaccounts?fields=uid,name,provider

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    {
       "items":    [
          {
             "uid" : "2f90fc80203149918ac11ea22214d97f",
             "name" : "HSL Account",
             "provider" : {
                "uid" : "5a6cd064d1ab428897c84f4e0e360fe1",
                "name" : "HSL"
             }
          }, {
             "uid" : "9038d1c809674f319fdd55cfd10604cf",
             "name" : "My SMS Account",
             "provider" : {
                "uid" : "98c3396df6a4481f80e5c5a23d0e0572",
                "name" : "SMS Provider (sample)"
             }
          }
       ],
       "count": 2,
       "size": 2,
       "offset": 0
    }
    Name Description Use Default Type Operand
    uid Find SMS account whose uid match with the specified id. optional null uid =
    name Find SMS accounts whose name contains the given string. optional null string like
    provider Find SMS accounts linked to the SMS provider matching the given provider uid. optional null uid =
    operator Find SMS accounts linked to a SMS provider compatible with the given operator. optional null uid =
    company Set the context company. optional caller's company uid =
    HTTP Method GET
    Requires Authentication Yes
    Rate Limited Yes
    Headers None
    Permissions accountNetwork.sms.account.view
    Fields uid, name, provider, parameters

    /api/v1/smsaccounts/{uid}

    Gets complete details of an SMS account.

    Request

    GET https://na.airvantage.net/api/v1/smsaccounts/2f90fc80203149918ac11ea22214d97f
    ...

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    {
       "uid" : "2f90fc80203149918ac11ea22214d97f",
       "name" : "My Account",
       "provider" : {
          "uid" : "54ed3b44d95a4d8db0a21b976cdab35e",
          "name" : "HSL"
       },
       "parameters" : {
          "user" : "mickey",
          "password" : "pwd"
       }
    }
    Name Description
    sms.account.unknown The specified uid does not match with any account.
    HTTP Method GET
    Requires Authentication Yes
    Rate Limited Yes
    Headers None
    Permissions accountNetwork.sms.account.view

    /api/v1/smsaccounts

    Creates a new SMS account. All fields are required.

    Request

    POST https://na.airvantage.net/api/v1/smsaccounts
    Content-Type: application/json
    ...
    {
       "name" : "My SMS Account",                       
       "provider" : {                                   
          "uid" : "98c3396df6a4481f80e5c5a23d0e0572"
       },
       "parameters" : {                                 
       
          "user" : "mickey",
          "password" : "pwd"
       }
    }

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    {
       "uid" : "2f90fc80203149918ac11ea22214d97f",
       "name" : "My SMS Account",
       "provider" : {
          "uid": "98c3396df6a4481f80e5c5a23d0e0572",
          "name": "SMS Provider (sample)"
       },
       "parameters" : {
          "user" : "mickey",
          "password" : "pwd"
       }
    }
    Name Description Use Default Type
    company Set the context company. optional caller's company uid
    Name Description
    sms.account.missing.provider Raised when SMS provider is missing
    sms.account.unknown.provider Raised when SMS provider is unknown
    sms.account.missing.name Raised when SMS account name is missing
    sms.account.missing.parameters Raised when SMS account parameters are missing
    sms.account.invalid.type.parameters Raised when SMS account parameters type is missing>
    sms.account.invalid.constraint.parameters Invalid constraint parameters
    value.too.long SMS account name too long
    HTTP Method POST
    Requires Authentication Yes
    Rate Limited Yes
    Headers Content-type: application/json
    Permissions accountNetwork.sms.account.create

    /api/v1/smsaccounts/{uid}

    Edits the SMS account identified by the uid. Only name and parameters are editable.

    Request

    PUT https://na.airvantage.net/api/v1/smsaccounts/2f90fc80203149918ac11ea22214d97f
    Content-Type: application/json
    ...
    {
       "name" : "My SMS Account",
       "parameters" : {
          "user" : "mickey",
          "password" : "pwd"
       }
    }

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    {
       "uid" : "2f90fc80203149918ac11ea22214d97f",
       "name" : "My SMS Account",
       "provider" : {
          "uid" : "54ed3b44d95a4d8db0a21b976cdab35e",
          "name" : "HSL"
       },
       "parameters" : {
          "user" : "mickey",
          "password" : "pwd"
       }
    }
    Name Description
    sms.account.unknown Given SMS account define by its uid was not found
    sms.account.missing.provider Raised when SMS provider is missing
    sms.account.unknown.provider Raised when SMS provider is unknown
    sms.account.missing.name Raised when SMS account name is missing
    sms.account.missing.parameters Raised when SMS account parameters are missing
    sms.account.invalid.type.parameters Raised when SMS account parameters type is missing>
    sms.account.invalid.constraint.parameters Invalid constraint parameters
    value.too.long SMS account name too long
    HTTP Method PUT
    Requires Authentication Yes
    Rate Limited Yes
    Headers Content-type: application/json
    Permissions accountNetwork.sms.account.edit

    /api/v1/smsaccounts/{uid}

    Deletes the SMS account identified by the uid. If the account is linked to an operator account, it's removed from it.

    Request

    DELETE https://na.airvantage.net/api/v1/smsaccounts/2f90fc80203149918ac11ea22214d97f

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Length: 0
    Name Description
    sms.account.unknown Given SMS account define by its uid was not found
    HTTP Method DELETE
    Requires Authentication Yes
    Rate Limited Yes
    Headers Content-type: application/json
    Permissions accountNetwork.sms.account.delete
    TOP