Skip to main content

Campaign List API

The Campaign List API retrieves a paginated list of marketing campaigns within the Retail Media platform for a specific business unit ID.

  • Method: GET

  • URL: https://<PA_RM_END_POINT>/rm/1.0/campaign/{businessUnitId}?take=50&skip=0

  • Headers:

    • Content-Type: application/json
    • Authorization: Bearer ACCESS_TOKEN
  • Query Parameters:

    • take: Specifies the number of records to return.
    • skip: Specifies the number of records to skip.
  • Response Codes:

    • 200 OK

      A successful request returns a structured JSON containing an array of campaign details and pagination information:

      {
      "items": [
      {
      "id": "xxxxxxxxxxxxxxxxxxxxxxx",
      "name": "Name of the campaign",
      "startDate": "2024-05-03T00:00:00",
      "endDate": "2024-05-16T23:59:59",
      "dailyCap": 0,
      "dailySpentCredits": 0,
      "totalBudget": 0,
      "autoRenewBudget": false,
      "clicks": 0,
      "impressions": 0,
      "spentCredits": 0,
      "status": 10,
      "hasActiveAdSet": false
      },
      {
      "id": "xxxxxxxxxxxxxxxxxxxxxxx",
      "name": "Name of the campaign",
      "startDate": "2024-05-03T00:00:00",
      "endtDate": null,
      "dailyCap": 0,
      "dailySpentCredits": 0,
      "totalBudget": 0,
      "autoRenewBudget": false,
      "clicks": 0,
      "impressions": 0,
      "spentCredits": 0,
      "status": 10,
      "hasActiveAdSet": false
      }
      ],
      "totalItems": 33,
      "pageSize": 50,
      }

      This response includes:

      • items (array): An array of campaign objects containing details:
        • id (string): The unique identifier for the campaign.
        • name (string): The name of the campaign.
        • startDate (string): The start date of the campaign.
        • endDate (string): The end date of the campaign.
        • dailyCap (decimal): The daily budget cap for the campaign.
        • dailySpentCredits (decimal): The daily spent credits for the campaign.
        • totalBudget (decimal): The total budget for the campaign.
        • autoRenewBudget (boolean): Indicates if the budget is set to auto-renew.
        • clicks (integer): The number of clicks for the campaign.
        • impressions (integer): The number of impressions for the campaign.
        • spentCredits (decimal): The total spent credits for the campaign.
        • status (integer): The status of the campaign.
      • totalItems (integer): Total number of campaigns available.
      • pageSize (integer): Number of items per page.
    • Non-200 Responses

      If an error occurs (e.g., bad request, unauthorized access), the server will respond with an appropriate non-200 status code and include an error message in the response body:

      {
      "error": "Error message"
      }
      note

      Ensure that campaign data is accessed securely and only by authorized users to maintain confidentiality and integrity of the information.