Skip to main content
GET
https://campaignservice-staging.withbenji.com
/
campaigns
/
{id}
Get Campaign
curl --request GET \
  --url https://campaignservice-staging.withbenji.com/campaigns/{id} \
  --header 'x-api-key: <api-key>'
{
    "code": "ok",
    "data": {
        "campaign": {
            "base_reward": 1,
            "campaign_logo": "testcampaign.png",
            "campaign_type": 1,
            "created_date": "2024-11-20T00:30:57.256493+00:00",
            "description": "This is a test campaign",
            "end_date": null,
            "id": 1,
            "is_active": 1,
            "is_deleted": 0,
            "merchant_id": 1,
            "name": "Test Campaign",
            "owner_id": 5,
            "partner_id": 3,
            "start_date": "2024-11-14T03:18:06+00:00",
            "total_rewards": 100,
            "trigger_type": 1
        }
    }
}
The x-api-key header value to be used on this API is your partner API key, which can be generated through the dashboard.
id
integer
required
The Benji Platform ID of the campaign

Return values

campaign
object
A campaign object property
{
    "code": "ok",
    "data": {
        "campaign": {
            "base_reward": 1,
            "campaign_logo": "testcampaign.png",
            "campaign_type": 1,
            "created_date": "2024-11-20T00:30:57.256493+00:00",
            "description": "This is a test campaign",
            "end_date": null,
            "id": 1,
            "is_active": 1,
            "is_deleted": 0,
            "merchant_id": 1,
            "name": "Test Campaign",
            "owner_id": 5,
            "partner_id": 3,
            "start_date": "2024-11-14T03:18:06+00:00",
            "total_rewards": 100,
            "trigger_type": 1
        }
    }
}
Note that you will only receive data that you as a loyalty patner or merchant partner are allowed to see based on the permissions in the access token you provide to the API