Skip to main content

Update Ad Set Collection

The Update Ad Set Collection API is designed to update the product selection within a specific Ad Set. This endpoint enables users to dynamically select or deselect products, ensuring the Ad Set reflects current strategic decisions and campaign goals.

  • Method: PUT

  • URL: https://<PA_RM_END_POINT>/rm/1.0/addSetCollection

  • Headers:

    • Content-Type: application/json
    • Authorization: Bearer ACCESS_TOKEN
  • Request Body:

    {
    "selectedProducts": ["xxxxxxxxxxxxxxxxxxxxxxx", "xxxxxxxxxxxxxxxxxxxxxxx"],
    "deselectedProducts": []
    }
    • selectedProducts (array of strings): Array of refIds for products that are to be selected for inclusion in the Ad Set. These refIds correspond to the identifiers of the products as returned by the List Ad Set Collection API.

    • deselectedProducts (array of strings): Array of refIds for products that are to be deselected from the Ad Set. These identifiers should also match the refIds provided by the List Ad Set Collection API.

  • Response Codes:

    • *200 OK

      Successful update. The response body will confirm the successful update of the Ad Set collection:

      {
      "message": "Ad Set collection updated successfully."
      }
    • Non-200*

      ResponsesIf an error occurs, such as a bad request or 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"
      }