GET agency-status

A call to be used after requesting a new agency to find out whether it's been approved yet and if so, what the ID is, or what ID the agency has been matched to. Users can keep making this call (polling) at regular intervals (e.g. every 30 seconds) until the entry is no longer pending approval.

INPUT

As this method is accessed via a GET request there is no HTTP body so options can be specified via the URL.

parameter type description
request_id int ID received after POST or PATCH agency

OUTPUT - pending JSON sample

If accessing GET /api/agency-status/request_id/23 the following JSON would be returned:


{
    "data": {
        "status": "pending",
        "date": "2021-12-12 10:04:00"
    }
}
        

OUTPUT - approved JSON sample

If accessing GET /api/agency-status/request_id/23 the following JSON would be returned:


{
    "data": {
        "status": "approved",
        "date": "2017-12-12 10:04:00",
        "agency_id": 1,
        "agency_name": "Goodstuff",
        "organisation_type_id": 4,
        "organisation_type_name": "Media Agency"
    }
}
        

where agency_id is id of approved agency and organisation_type_id is id of approved organisatino type

where organisation is one of the followings:

Organisation ID Organisation Name
2 Barter Agency
3 DSP
4 Media Agency
5 Specialist Agency

OUTPUT - rejected JSON sample

If accessing GET /api/agency-status/request_id/23 the following JSON would be returned:


{
    "data": {
        "status": "rejected",
        "date": "2017-12-12 10:04:00",
        "reason": "Not a genuine agency"
    }
}