Request History

Keep track of all access requests made to users

The request history endpoint (business/request-history) allows you to access all requests that have been made to individuals on Amala. This history is sorted by date from oldest to newest.

Endpoint

GET https://api.amala.cloud/v1/business/request-history

The history can be filtered by a status field. This status field will have one of three values:

  • pending - The individual has not responded to the request

  • granted - The individual has approved the request

  • revoked - The individual has denied the request or a previously approved request has now been denied.

Example Request:

curl "http://api.amala.cloud/v1/business/request-history?api_key=94c9a525f3d3ac72e9f953d0be4dfea1"

Response:

Status: 200 OK

Body:

{
    "status": "Success",
    "data": [
        {
            "id": "4661bddc-8976-49e5-8b0f-dddd8f1cd81b",
            "requester": "Amala",
            "authorizer_first_name": "Jane",
            "authorizer_last_name": "Smith",
            "authorizer_amala_id": "JS168194",
            "status": "granted",
            "date": "10th May, 2023, 02:24 PM"
        },
        {
            "id": "c19a5ada-2f57-4364-a563-a14fe871d160",
            "requester": "Amala",
            "authorizer_first_name": "John",
            "authorizer_last_name": "Doe",
            "authorizer_amala_id": "JD447812",
            "status": "pending",
            "date": "14th June, 2023, 08:36 AM"
        }
    ]
}

Using the status filter:

Example Request:

curl "http://api.amala.cloud/v1/business/request-history?api_key=94c9a525f3d3ac72e9f953d0be4dfea1&status=pending"

Response:

{
    "status": "Success",
    "data": [
        {
            "id": "c19a5ada-2f57-4364-a563-a14fe871d160",
            "requester": "Amala",
            "authorizer_first_name": "John",
            "authorizer_last_name": "Doe",
            "authorizer_amala_id": "JD447812",
            "status": "pending",
            "date": "14th June, 2023, 08:36 AM"
        }
    ]
}

Response status codes

200 - OK
400 - Bad Request
401 - Unauthorized

Last updated