amzn / ads-advanced-tools-docs

Code samples and supplements for the Amazon Ads advanced tools center
https://advertising.amazon.com/API/docs/en-us/index
MIT No Attribution
84 stars 32 forks source link

Issue Report: /en-us/guides/reporting/v3/report-types/audience #278

Open albert-le-whoop opened 1 month ago

albert-le-whoop commented 1 month ago

Describe the bug I query for the audience DSP report type with group by param ["lineItem", "order"]. I also attach the relevant fields associated with each of those group by values from the documentation.

I get this response:

Response: {'code': '400', 'detail': 'configuration columns includes invalid values: (lineItemName, lineItemId, lineItemComments, lineItemType, omsLineItemId, orderName, orderId, orderCurrency, omsProposalId)

Description of what the documentation currently says https://advertising.amazon.com/API/docs/en-us/guides/reporting/v3/report-types/audience

I should be able to query for those values.

Description of what the documentation should say Documentation should say it isn't updated yet.

albert-le-whoop commented 1 month ago

Also, querying DSP reporting dspCampaign with ad for the groupBy filter doesn't work either.

glmcmull commented 4 weeks ago

Hi @albert-le-whoop

Thanks for the report! I'm not able to replicate your error, though. Can you post your full request body? For reference, here's mine:

{
        "name":"TEST",
        "startDate":"2024-05-05",
        "endDate":"2024-05-10",
        "configuration":{
            "adProduct": "DEMAND_SIDE_PLATFORM",
            "groupBy":["lineItem", "order"],
            "columns":["lineItemName", "lineItemId", "lineItemComments", "lineItemType", "omsLineItemId", "orderName", "orderId", "orderCurrency", "omsProposalId"],
            "reportTypeId":"dspAudience",
            "timeUnit":"SUMMARY",
            "filters": [{"field":"advertiserId","values":["......."]}],
            "format":"GZIP_JSON"
        }
    }

Response (after the successful request):

{
    "configuration": {
        "adProduct": "DEMAND_SIDE_PLATFORM",
        "columns": [
            "lineItemName",
            "lineItemId",
            "lineItemComments",
            "lineItemType",
            "omsLineItemId",
            "orderName",
            "orderId",
            "orderCurrency",
            "omsProposalId"
        ],
        "filters": [
            {
                "field": "advertiserId",
                "values": [
                    "..........."
                ]
            }
        ],
        "format": "GZIP_JSON",
        "groupBy": [
            "lineItem",
            "order"
        ],
        "reportTypeId": "dspAudience",
        "timeUnit": "SUMMARY"
    },
    "createdAt": "2024-06-18T21:08:19.786Z",
    "endDate": "2024-05-10",
    "failureReason": null,
    "fileSize": null,
    "generatedAt": null,
    "name": "TEST",
    "reportId": "123123123123",
    "startDate": "2024-05-05",
    "status": "PENDING",
    "updatedAt": "2024-06-18T21:08:19.786Z",
    "url": null,
    "urlExpiresAt": null
}

Same thing for the ad groupBy for the dspCampaign report type. My request goes through OK.