Searching...

Matching results

    Operator Account

    A company contracting services from an operator integrated in AirVantage has the possibility to monitor their subscriptions through it. An operator 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 Entity's unique identifier. true uid
    name Entity's name. false string
    smsAccount.uid Uid of the SMS account related to this account. false uid
    types Values of all custom types defined by the operator connection. false string array
    connection.uid Uid of the Operator connection linked to this account. false uid
    parameters Values of Account parameters defined by the operator connection 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.

    {
       "name" : "",
       "connection" : {
          "uid" : ""
       },
       "smsAccount" : {
           "uid" : ""
       },
       "types" : {
          "any_type_1" : [],
          "any_type_2": []
       },
       "parameters" : {
          "any_parameter_1" : "",
          "any_parameter_2" : ""
       }
    }

    /api/v1/operators/accounts

    Returns a paginated list of operator accounts with their complete details.

    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 operator account which will be returned.
    If fields parameter is missing, only the following attributes of the operator account are returned : uid, name.

    More information about paging, filtering, and sorting here

    Request

    GET https://na.airvantage.net/api/v1/operators/accounts?fields=uid,name,connection

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    {
       "items":    [
          {
             "uid" : "9038d1c809674f319fdd55cfd10604cf",
             "name" : "Telstra Account",
             "connection" : {
                "uid" : "e8ea695fdb2c434299136921b7eddb28",
                "name" : "Vodafone GDSP"
             }
          }
       ],
       "count": 1,
       "size": 1,
       "offset": 0
    }
    Name Description Use Default Type Operand
    uid Find the account matching the specified id. optional null uid string =
    name Find accounts whose name contains the given string. optional null string like
    connection Find accounts linked to the operator connection identified by the given uid. optional null uid string =
    operator Find accounts from a given operator. optional null uid string =
    company Set the context company. optional caller's company uid =
    HTTP Method GET
    Requires Authentication Yes
    Rate Limited Yes
    Headers None
    Permissions accountNetwork.operator.account.view
    Fields uid, name, connection, smsAccount, types, parameters

    /api/v1/operators/accounts/{uid}

    Gets complete details of an operator account.

    Request

    GET https://na.airvantage.net/api/v1/operators/accounts/4f20a1cdd3494f19b8959d00e230d91a
    ...

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    {
       "uid" : "4f20a1cdd3494f19b8959d00e230d91a",
       "name" : "My Operator Account",
       "connection" : {
          "uid" : "5b909116ee1749559c6941766168dae5",
          "name" : "AT&T"
       },
       "smsAccount" : {
          "uid" : "c90f50de1e0a4f9e8071f88bd6a20c43",
          "name" : "MySmsAccount"
       },
       "types" : {
          "PricePlan" : ["PP1", "PP2", "PP3"],
          "CityCode": ["CC1", "CC2"]
       },
       "parameters" : {
          "user" : "mickey",
          "password" : "pwd"
       }
    }
    Name Description
    operator.account.unknown The specified uid does not match with any account.
    HTTP Method GET
    Requires Authentication Yes
    Rate Limited Yes
    Headers None
    Permissions accountNetwork.operator.account.view

    /api/v1/operators/accounts

    Creates a new operator account. Name and connection must be provided. Parameters and customTypes may be required depending on what is described in the operator connection. If you want to link an external SMS account, then provide its uid.

    Request

    POST https://na.airvantage.net/api/v1/operators/accounts
    Content-Type: application/json
    ...
    {
       "name" : "My Operator Account",
       "connection" :{
          "uid" : "5b909116ee1749559c6941766168dae5"
       },
       "smsAccount" : {
           "uid" : "c90f50de1e0a4f9e8071f88bd6a20c43"
       },
       "types" : {
          "PricePlan" : ["PP1", "PP2", "PP3"],
          "CityCode": ["CC1", "CC2"]
       },
       "parameters" : {
          "user" : "mickey",
          "password" : "pwd"
       }
    }

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    {
       "uid" : "4f20a1cdd3494f19b8959d00e230d91a",
       "name" : "My Operator Account",
       "connection" : {
          "uid" : "5b909116ee1749559c6941766168dae5",
          "name" : "Vodafone GDSP"
       },
       "smsAccount": {
            "uid": "c90f50de1e0a4f9e8071f88bd6a20c43",
            "name": "MySMSAccount"
       },
       "types" : {
          "PricePlan" : ["PP1", "PP2", "PP3"],
          "CityCode": ["CC1", "CC2"]
       },
       "parameters" : {
          "user" : "mickey",
          "password" : "pwd"
       }
    }
    Name Description Use Default Type
    company Set the context company. optional caller's company uid
    Name Description
    operator.account.missing.name A name must be provided.
    operator.account.missing.connection An operation connection must be provided.
    operator.account.unknown.connection Provided connection does not exist.
    operator.account.missing.parameters Required parameters described in the operator connection are missing.
    operator.account.invalid.type.parameters Parameter value does not match the type described in the operator connection.
    operator.account.invalid.constraint.parameters Parameter value does not neet constraints described in the operator connection.
    operator.account.missing.types Required custom types described in the operator connection are missing.
    value.too.long Provided name is bigger than 50 characters.
    HTTP Method POST
    Requires Authentication Yes
    Rate Limited Yes
    Headers Content-type: application/json
    Permissions accountNetwork.operator.account.create

    /api/v1/operators/accounts/{uid}

    Edits the operator account identified by the uid. All fields but connection are editable.

    Request

    PUT https://na.airvantage.net/api/v1/operators/accounts/4f20a1cdd3494f19b8959d00e230d91a
    Content-Type: application/json
    ...
    {
       "name" : "My Operator Account",
       "smsAccount" : {
          "uid" : "acd3494f19b8959d11e230d4f20a1cd"
       },
       "types" : {
          "PricePlan" : ["PP1"],
          "CityCode": ["CC3"]
       },
       "parameters" : {
          "user" : "mickey",
          "password" : "pwd"
       }
    }

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    {
       "uid" : "4f20a1cdd3494f19b8959d00e230d91a",
       "name" : "My Operator Account",
       "connection" : {
          "uid" : "5b909116ee1749559c6941766168dae5",
          "name" : "AT&T"
       },
       "smsAccount" : {
          "uid" : "acd3494f19b8959d11e230d4f20a1cd",
          "name" : "MySmsAccount"
       },
       "types" : {
          "PricePlan" : ["PP1"],
          "CityCode": ["CC3"]
       },
       "parameters" : {
          "user" : "mickey",
          "password" : "pwd"
       }
    }
    Name Description
    operator.account.unknown The specified uid does not match with any account.
    operator.account.missing.name Name cannot be empty or null.
    operator.account.missing.parameters Required parameters described in the operator connection are missing.
    operator.account.invalid.type.parameters Parameter value does not match the type described in the operator connection.
    operator.account.invalid.constraint.parameters Parameter value does not neet constraints described in the operator connection.
    operator.account.missing.types Required custom types described in the operator connection are missing.
    value.too.long Provided name is bigger than 50 characters.
    HTTP Method PUT
    Requires Authentication Yes
    Rate Limited Yes
    Headers Content-type: application/json
    Permissions accountNetwork.operator.account.edit
    TOP