---
title: /v2/advertisers/{advertiserId}/campaigns/{campaignId}/spa/ad-groups/{adGroupId}/products
slug: campaign-reporting-apis/v2advertisersadvertiseridcampaignscampaignidspaad-groupsadgroupidproducts
docTags: 
createdAt: 2026-03-25T10:57:30.256Z
---

{
  "id": "QsjKyFn_iusKu1NTOiRL-",
  "type": "api-oas-v2",
  "data": {
    "method": "PUT",
    "url": "https://<pcm-domain>/v2/advertisers/{advertiserId}/campaigns/{campaignId}/spa/ad-groups/{adGroupId}/products",
    "servers": [
      {
        "url": "https://<pcm-domain>/v2/advertisers/{advertiserId}/campaigns/{campaignId}/spa/ad-groups/{adGroupId}/products",
        "description": "Generated server url"
      }
    ],
    "name": "",
    "description": "<p>Update products for an SPA ad group.</p>\n<p><strong>Rules:</strong></p>\n<ul>\n<li><em>bid</em> must be set whenever <em>bidOptimization</em> is MANUAL, otherwise <em>bid</em> must be null.</li>\n</ul>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "advertiserId",
          "type": "integer<int32>",
          "description": "",
          "format": "int32"
        },
        {
          "kind": "required",
          "name": "campaignId",
          "type": "integer<int32>",
          "description": "",
          "format": "int32"
        },
        {
          "kind": "required",
          "name": "adGroupId",
          "type": "integer<int32>",
          "description": "",
          "format": "int32"
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "ExternalSpaAdGroupProductUpdateRequest",
          "schema": [
            {
              "name": "filters",
              "kind": "optional",
              "type": "array",
              "description": "",
              "modelRef": "#/components/schemas/FilterValuesExternalSpaAdGroupProductUpdateFilterField",
              "customType": "FilterValuesExternalSpaAdGroupProductUpdateFilterField[]",
              "schema": [
                {
                  "name": "field",
                  "kind": "optional",
                  "type": "string<GTIN | EXCLUDED_GTIN | BRAND | CATEGORY_ID>",
                  "description": "",
                  "example": "",
                  "enum": [
                    "GTIN",
                    "EXCLUDED_GTIN",
                    "BRAND",
                    "CATEGORY_ID"
                  ]
                },
                {
                  "name": "values",
                  "kind": "optional",
                  "type": "array",
                  "description": "",
                  "example": "",
                  "itemType": "object",
                  "customType": "object[]",
                  "itemExample": "",
                  "itemDefault": ""
                }
              ]
            },
            {
              "name": "advertised",
              "kind": "optional",
              "type": "boolean",
              "description": "",
              "example": ""
            },
            {
              "name": "bid",
              "kind": "optional",
              "type": "number",
              "description": "",
              "example": "",
              "minimum": 0.01
            },
            {
              "name": "bidOptimization",
              "kind": "optional",
              "type": "string<MANUAL | CONVERSIONS | BALANCED | AWARENESS>",
              "description": "Bid optimization enables automated bidding: CONVERSIONS, BALANCED, and AWARENESS set the bid using the lower bound, midpoint, and upper bound of the suggested bid, respectively.\nMANUAL requires setting the bid explicitly.\n",
              "example": "",
              "enum": [
                "MANUAL",
                "CONVERSIONS",
                "BALANCED",
                "AWARENESS"
              ]
            }
          ],
          "modelRef": "#/components/schemas/ExternalSpaAdGroupProductUpdateRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "401",
        "description": "Unauthorized",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "403",
        "description": "Forbidden",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "404",
        "description": "Not Found",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ExceptionResponse",
            "schema": [
              {
                "name": "messages",
                "kind": "optional",
                "type": "array",
                "description": "",
                "example": "",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              }
            ],
            "modelRef": "#/components/schemas/ExceptionResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "422",
        "description": "Unprocessable Entity",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ExceptionResponse",
            "schema": [
              {
                "name": "messages",
                "kind": "optional",
                "type": "array",
                "description": "",
                "example": "",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              }
            ],
            "modelRef": "#/components/schemas/ExceptionResponse",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "T3_iouqtTZ_UQFiT-Hn9j",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PUT \\\n     --url https://<pcm-domain>/v2/advertisers/{advertiserId}/campaigns/{campaignId}/spa/ad-groups/{adGroupId}/products \\\n     --header 'accept: application/json'"
        },
        {
          "id": "96LmH17wF3l79Nv2vLXKu",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'PUT',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://<pcm-domain>/v2/advertisers/{advertiserId}/campaigns/{campaignId}/spa/ad-groups/{adGroupId}/products\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "oNSZkecqkbccJ5ijpeuMb",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://<pcm-domain>/v2/advertisers/{advertiserId}/campaigns/{campaignId}/spa/ad-groups/{adGroupId}/products\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "Qq-DBbeXWP5cgj34WtSYY",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://<pcm-domain>/v2/advertisers/{advertiserId}/campaigns/{campaignId}/spa/ad-groups/{adGroupId}/products\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "T3_iouqtTZ_UQFiT-Hn9j"
    },
    "results": {
      "languages": [
        {
          "id": "RRW--d-uwlg-t4lQzQmOI",
          "language": "200",
          "code": "// OK\n"
        },
        {
          "id": "uW5Rf282_XUHmIGCgeTaz",
          "language": "401",
          "code": "// Unauthorized\n"
        },
        {
          "id": "z994Sb8qEuFw0cXOVXx0V",
          "language": "403",
          "code": "// Forbidden\n"
        },
        {
          "id": "FP6yZlb4PeOFxmsP3Wd_j",
          "language": "404",
          "code": "// Not Found\n{\n  \"messages\": [\n    \"\"\n  ]\n}"
        },
        {
          "id": "EAkTpZQExRS2FkBfBIsih",
          "language": "422",
          "code": "// Unprocessable Entity\n{\n  \"messages\": [\n    \"\"\n  ]\n}"
        }
      ],
      "selectedLanguageId": "RRW--d-uwlg-t4lQzQmOI"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}