Searching...

Matching results

    Request

    A request is an interaction between two companies. In the case of a partnership request, both companies do not know each other. Other kind of request such as transfer gateways require both companies to be already partners. Requests can be accepted or rejected.

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

    Field Description Read Only Type
    uid Request's unique identifier. true uid
    message Explanatory message about the purpose of this request. false string
    date Date time when the request was sent. true timestamp
    type Request's type. Possible values are: 'TRANSFER_GATEWAY' or 'PARTNERSHIP' true timestamp
    requestBy UID and name of the company sending this request true string

    This is a complete representation of a Request.

    {
       "uid": "",
       "message": "",
       "date": "",
       "type": "",
       "requestBy": {                   
          "uid"  : "",
          "name" : ""
       }
    }

    /api/v1/requests/

    Returns a paginated list of requests 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 request which will be returned.
    If fields parameter is missing, only the following attributes of the request are returned : uid, type, date.

    More information about paging, filtering, and sorting here

    Request

    GET https://na.airvantage.net/api/v1/requests?fields=uid,type,requestBy

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    ...
    {
       "items" : [
       {
          "uid": "cde6b26d3c344c0780f06caa26cf7113",
          "type": "TRANSFER_GATEWAY",
          "requestBy": {
             "uid"  : 1,
             "name" : "Sierra Wireless"
       }],
       "count": 1,
       "size": 1,
       "offset": 0
    }
    Name Description Use Default Type Operand
    uid Find the request by its uid optional null uid =
    requestBy Find requests sent by a given company. optional null uid =
    before Find requests sent before a given date. optional null timestamp <=
    after Find requests sent after a given date. optional null timestamp >=
    types Find requests which type is in the given list. optional null string list in
    company Set the context company. optional caller's company uid =
    HTTP Method GET
    Requires Authentication Yes
    Rate Limited Yes
    Headers None
    Permissions accountNetwork.partners.requests.acceptReject
    entities.gateways.transfers.acceptReject
    Fields uid, type, date, message, requestBy

    /api/v1/requests/{uid}

    Get complete details of a request.

    Request

    GET https://na.airvantage.net/api/v1/requests/cde6b26d3c344c0780f06caa26cf7113

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    ...
    {
       "uid": "cde6b26d3c344c0780f06caa26cf7113",
       "message": "Accept this!!",
       "date": "98547123658",
       "type": "TRANSFER_GATEWAY",
       "requestBy": {                  
          "uid"  : 1,
          "name" : "Sierra Wireless"
       }
    }
    Name Description Use Default Type
    company Set the context company. optional caller's company uid
    Name Description
    request.unknown The specified uid does not match with any request.
    HTTP Method GET
    Requires Authentication Yes
    Rate Limited Yes
    Headers None
    Permissions accountNetwork.partners.requests.acceptReject
    entities.gateways.transfers.acceptReject

    /api/v1/requests/{uid}/accept

    Accepts pending requests. This will launch the operation that executes the main process. It is possible to send back a message to the enquirer.

    Request

    POST https://na.airvantage.net/api/v1/requests/cde6b26d3c344c0780f06caa26cf7113/accept
    Content-Type: application/json
    ...
    
    {
       "message" : "100 gateways accepted"
    }

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    ...
    {
       "operation": "cde6b26d3c344c0780f06caa26cf7113"
    }
    Name Description Use Default Type
    company Set the context company. optional caller's company uid
    Name Description
    request.unknown The specified uid does not match with any request.
    request.invalid Request state is not in 'WAITING_FOR_ACCEPTANCE'
    HTTP Method POST
    Requires Authentication Yes
    Rate Limited Yes
    Headers None
    Permissions accountNetwork.partners.requests.acceptReject
    entities.gateways.transfers.acceptReject

    /api/v1/requests/{uid}/reject

    Rejects pending requests. It is possible to send back an explanatory message to the enquirer.

    Request

    POST https://na.airvantage.net/api/v1/requests/cde6b26d3c344c0780f06caa26cf7113/reject
    Content-Type: application/json
    ...
    
    {
       "message" : "I dont want your 100 gateways"
    }

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    ...
    {
       "uid" : "cde6b26d3c344c0780f06caa26cf7113",
       "message": "I dont want your 100 gateways",
       "state": "REJECTED"
    }
    Name Description Use Default Type
    company Set the context company. optional caller's company uid
    Name Description
    request.unknown The specified uid does not match with any request.
    request.invalid Request state is not in 'WAITING_FOR_ACCEPTANCE'
    HTTP Method POST
    Requires Authentication Yes
    Rate Limited Yes
    Headers None
    Permissions accountNetwork.partners.requests.acceptReject
    entities.gateways.transfers.acceptReject
    TOP