Skip to main content

Get campaign group

Retrieve information about a single campaign group within a chain.

Contents

Overview

  • Call name: get-campaign-group
  • Endpoint URL: https://{API hostname}/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:

ParameterDescription
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:

ParameterDescription
N/AN/A

Example request & response

Request

Example curl request:

curl --location 'https://{API hostname}/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:

CodeName and DescriptionHTTP Status Code
6no_valid_session
The user needs to be logged in and a valid session key needs to be sent
401
68permission_denied_or_non_existent
This user has insufficient permissions for this object or the object does not exist.
403
217chain_id_not_found
No record has been found for that chain_id
400
230entity_not_found
The requested entity was not found.
400
419parameter_invalid
One of the parameters is invalid and should be in a different format.
400