GET client-brand-status

A call to be used after requesting a new client/brand to find out whether it's been approved yet and if so, what the ID is, or what ID the client/brand 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 client-brand

OUTPUT - pending JSON sample

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

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

OUTPUT - approved JSON sample

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

{
    "data": {
        "status": "approved",
        "date": "2017-12-12 10:04:00",
        "client_id": 1,
        "client_name": "Avalon",
        "brand_id": 5,
        "brand_name": "David"
    }
}
        

where client_id is id of approved client and brand_id is id of approved brand (can be null when only client was requested)

OUTPUT - matched JSON sample

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

{
    "data": {
        "status": "matched",
        "date": "2017-12-12 10:04:00",
        "client_id": 1,
        "client_name": "Avalon",
        "brand_id": 5,
        "brand_name": "David"
    }
}
        

where client_id is id of matched client and brand_id is id of matched brand (can be null when only client was requested)

OUTPUT - rejected JSON sample

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

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