Retrieve information about a single campaign group within a chain.
Contents
- Overview
- Version-specific information
- Permissions and authentication
- HTTP parameters
- Headers
- Example request & response
- Possible error responses
Overview
- Call name: get-campaign-group
- Endpoint URL: https://api0.spaaza.com/internal/get-campaign-group
- Request methods: GET
- Response Content-Type: application/json
- Auth required: yes
The get-campaign-group
endpoint is used to fetch a single campaign group by its ID. Campaign groups are collections of campaigns that share common timing and organizational properties.
Version-specific information
This endpoint was introduced in API version 1.5.8. No version-specific changes have been made since its introduction.
Permissions and authentication
This API call requires a valid Spaaza session. The session can be as follows:
- Admin authentication: the performing user needs to be logged in and have
read access
to the chain to which the campaign group belongs. - User authentication: a session generated by an end-user login.
HTTP parameters
The following HTTP parameters can be passed to the API:
Parameter | Description |
---|---|
chain_id | (integer, mandatory) The ID of the chain to which the campaign group belongs. |
id | (integer, mandatory) The ID of the campaign group to retrieve. |
Headers
The following headers can/must be passed to the API call:
Parameter | Description |
---|---|
N/A | N/A |
Example request & response
Request
Example curl request:
curl --location 'https://api0.spaaza.com/internal/get-campaign-group?chain_id=1743&id=1' \
--header 'X-Spaaza-Session-User-Id: 1548854' \
--header 'X-Spaaza-Session-Key: 564e5b4faa7f639dacf1983f1dae62155d5734b789b06b5986c43bfe2542854e' \
--header 'X-Spaaza-API-Version: 1.5.8'
Response
Example response:
{
"result": {
"code": 1,
"status": "ok"
},
"results": {
"campaign_group": {
"id": 1,
"campaign_ids": [2, 3],
"active_date_from": "2025-01-01T00:00:00+00:00",
"active_date_until": "2025-12-31T23:59:59+00:00",
"created_date": "2025-07-01T12:00:00+00:00",
"last_modified_date": "2025-09-15T14:30:00+00:00",
"last_updated_by": {
"user_id": 2,
"name": "Admin Spaaza"
},
"name": "Holiday Promotions 2025"
},
"result_type": "get-campaign-group"
}
}
Possible error responses
The following represents a list of possible error responses for the get-campaign-group
endpoint:
Code | Name and Description | HTTP Status Code |
---|---|---|
6 | no_valid_session The user needs to be logged in and a valid session key needs to be sent | 401 |
68 | permission_denied_or_non_existent This user has insufficient permissions for this object or the object does not exist. | 403 |
217 | chain_id_not_found No record has been found for that chain_id | 400 |
230 | entity_not_found The requested entity was not found. | 400 |
419 | parameter_invalid One of the parameters is invalid and should be in a different format. | 400 |