GET client-brand-status

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

Info

Where the term Client is used, this is now a reference to Advertiser

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 advertiser and brand_id is id of approved brand (can be null when only advertiser 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 advertiser and brand_id is id of matched brand (can be null when only advertiser 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"
    }
}