Giter Site home page Giter Site logo

Comments (8)

moltar avatar moltar commented on August 27, 2024

Hi @matthew-r-clark, could you please post the responses from the API, when you are hitting the API directly.

Ofc, please delete any sensitive data.

It looks like there is some undocumented data difference in these responses, potentially and our validator is missing that.

from amazon-advertising-api-sdk.

matthew-r-clark avatar matthew-r-clark commented on August 27, 2024

Thank you for following up, @moltar!

Here is the response that I'm getting from https://advertising-api.amazon.com/sb/campaigns

[
    {
        "name": "[brand] Store.Image",
        "budget": 200.0,
        "bidOptimization": true,
        "portfolioId": --portfolioId--,
        "adFormat": "productCollection",
        "campaignId": --campaignId--,
        "budgetType": "daily",
        "startDate": "20210309",
        "state": "enabled",
        "servingStatus": "running",
        "creative": {
            "brandName": --brandName--,
            "brandLogoAssetID": "amzn1.assetlibrary.asset1.edbceb790b7a538eb4ec2509b7e14fa5:version_v1",
            "headline": --headline--,
            "shouldOptimizeAsins": false,
            "asins": [
                "B07H8NS5MS"
            ],
            "brandLogoUrl": --brandLogoUrl--
        },
        "landingPage": {
            "pageType": "store",
            "url": --landingPageUrl--
        }
    },
    {
        "name": "[brand] Store.Product",
        "budget": 800.0,
        "bidOptimization": false,
        "bidMultiplier": -95.0,
        "portfolioId": --portfolioId--,
        "adFormat": "productCollection",
        "campaignId": --campaignId--,
        "budgetType": "daily",
        "startDate": "20210312",
        "state": "enabled",
        "servingStatus": "running",
        "creative": {
            "brandName": --brandName--,
            "brandLogoAssetID": "amzn1.assetlibrary.asset1.edbceb790b7a538eb4ec2509b7e14fa5:version_v1",
            "headline": --headline--,
            "shouldOptimizeAsins": false,
            "asins": [
                "B07H8NS5MS"
            ],
            "brandLogoUrl": --brandLogoUrl--
        },
        "landingPage": {
            "pageType": "store",
            "url": --landingPageUrl--
        }
    },
    {
        "name": "[brand] Store.Image_DEV",
        "budget": 50.0,
        "bidOptimization": true,
        "portfolioId": --portfolioId--,
        "adFormat": "productCollection",
        "campaignId": --campaignId--,
        "budgetType": "daily",
        "startDate": "20210402",
        "state": "paused",
        "servingStatus": "paused",
        "creative": {
            "brandName": --brandName--,
            "brandLogoAssetID": "amzn1.assetlibrary.asset1.edbceb790b7a538eb4ec2509b7e14fa5:version_v1",
            "headline": --headline--,
            "shouldOptimizeAsins": false,
            "asins": [
                "B07H8NS5MS"
            ],
            "brandLogoUrl": --brandLogoUrl--
        },
        "landingPage": {
            "pageType": "store",
            "url": --landingPageUrl--
        }
    },
    {
        "name": "Brand Video Campaign",
        "budget": 40.0,
        "adFormat": "video",
        "campaignId": --campaignId--,
        "budgetType": "daily",
        "startDate": "20200729",
        "state": "paused",
        "servingStatus": "paused",
        "creative": {
            "asins": [
                "B07H8NS5MS"
            ],
            "videoMediaIds": [
                "amzn1.adex.media1.b93c1a17-d818-4eb3-90fd-3713580c7c5f"
            ],
            "type": "video"
        },
        "landingPage": {
            "pageType": "detailPage",
            "url": --landingPageUrl--
        }
    },
    {
        "name": "Campaign - 9/23/2020 15:26:16",
        "budget": 150.0,
        "portfolioId": --portfolioId--,
        "adFormat": "video",
        "campaignId": --campaignId--,
        "budgetType": "daily",
        "startDate": "20200923",
        "state": "paused",
        "servingStatus": "paused",
        "creative": {
            "asins": [
                "B07H8NS5MS"
            ],
            "videoMediaIds": [
                "amzn1.adex.media1.18f85b0c-5c32-4320-9b58-d4aa9a252d1b"
            ],
            "type": "video"
        },
        "landingPage": {
            "pageType": "detailPage",
            "url": --landingPageUrl--
        }
    },
    {
        "name": "Video",
        "budget": 150.0,
        "portfolioId": --portfolioId--,
        "adFormat": "video",
        "campaignId": --campaignId--,
        "budgetType": "daily",
        "startDate": "20210305",
        "state": "paused",
        "servingStatus": "paused",
        "creative": {
            "asins": [
                "B07H8NS5MS"
            ],
            "videoMediaIds": [
                "amzn1.adex.media1.18f85b0c-5c32-4320-9b58-d4aa9a252d1b"
            ],
            "type": "video"
        },
        "landingPage": {
            "pageType": "detailPage",
            "url": --landingPageUrl--
        }
    },
    {
        "name": "Video v2",
        "budget": 200.0,
        "portfolioId": --portfolioId--,
        "adFormat": "video",
        "campaignId": --campaignId--,
        "budgetType": "daily",
        "startDate": "20210319",
        "state": "enabled",
        "servingStatus": "running",
        "creative": {
            "asins": [
                "B07H8NS5MS"
            ],
            "videoMediaIds": [
                "amzn1.adex.media1.65782f90-9b18-4400-9b09-45d22d7a2fb3"
            ],
            "type": "video"
        },
        "landingPage": {
            "pageType": "detailPage",
            "url": --landingPageUrl--
        }
    },
    {
        "name": "Video v3",
        "budget": 400.0,
        "portfolioId": --portfolioId--,
        "adFormat": "video",
        "campaignId": --campaignId--,
        "budgetType": "daily",
        "startDate": "20210330",
        "state": "enabled",
        "servingStatus": "running",
        "creative": {
            "asins": [
                "B07H8NS5MS"
            ],
            "videoMediaIds": [
                "amzn1.adex.media1.d0938098-2c53-4c53-84fe-d66e80564f57"
            ],
            "type": "video"
        },
        "landingPage": {
            "pageType": "detailPage",
            "url": --landingPageUrl--
        }
    }
]

from amazon-advertising-api-sdk.

github-actions avatar github-actions commented on August 27, 2024

🎉 This issue has been resolved in version 3.1.15 🎉

The release is available on:

Your semantic-release bot 📦🚀

from amazon-advertising-api-sdk.

matthew-r-clark avatar matthew-r-clark commented on August 27, 2024

@moltar, thank you so much for the quick response!

However, it appears after installing the updated package, the issue persists.

I was checking the request params within the scaleleap package and it appears it is sending the request to the wrong amazon api endpoint.

This is what I'm seeing in my console when I test it:
image

And this is what's in the amazon documentation:
image

from amazon-advertising-api-sdk.

matthew-r-clark avatar matthew-r-clark commented on August 27, 2024

I was checking the two amazon api endpoints directly to see what the difference in response data was.

I get this for https://advertising-api.amazon.com/v2/hsa/campaigns:

[
    {
        "campaignId": --campaignId--,
        "name": "[brand] Store.Image",
        "budget": 200.0,
        "budgetType": "daily",
        "startDate": "20210309",
        "state": "enabled",
        "servingStatus": "running",
        "spendingPolicy": "asap",
        "portfolioId": --portfolioId--,
        "bidOptimization": true
    },
    {
        "campaignId": --campaignId--,
        "name": "[brand] Store.Product",
        "budget": 800.0,
        "budgetType": "daily",
        "startDate": "20210312",
        "state": "enabled",
        "servingStatus": "running",
        "spendingPolicy": "asap",
        "portfolioId": --portfolioId--,
        "bidOptimization": false,
        "bidMultiplier": -95.0
    },
    {
        "campaignId": --campaignId--,
        "name": "[brand] Store.Image_DEV",
        "budget": 50.0,
        "budgetType": "daily",
        "startDate": "20210402",
        "state": "paused",
        "servingStatus": "paused",
        "spendingPolicy": "asap",
        "portfolioId": --portfolioId--,
        "bidOptimization": true
    }
]

And then this for https://advertising-api.amazon.com/sb/campaigns (should be the same as what I sent previously):

[
    {
        "name": "[brand] Store.Image",
        "budget": 200.0,
        "bidOptimization": true,
        "portfolioId": --portfolioId--,
        "adFormat": "productCollection",
        "campaignId": --campaignId--,
        "budgetType": "daily",
        "startDate": "20210309",
        "state": "enabled",
        "servingStatus": "running",
        "creative": {
            "brandName": --brandName--,
            "brandLogoAssetID": "amzn1.assetlibrary.asset1.edbceb790b7a538eb4ec2509b7e14fa5:version_v1",
            "headline": --headline--,
            "shouldOptimizeAsins": false,
            "asins": [
                "B07H8NS5MS"
            ],
            "brandLogoUrl": --brandLogoUrl--
        },
        "landingPage": {
            "pageType": "store",
            "url": --landingPageUrl--
        }
    },
    {
        "name": "[brand] Store.Product",
        "budget": 800.0,
        "bidOptimization": false,
        "bidMultiplier": -95.0,
        "portfolioId": --portfolioId--,
        "adFormat": "productCollection",
        "campaignId": --campaignId--,
        "budgetType": "daily",
        "startDate": "20210312",
        "state": "enabled",
        "servingStatus": "running",
        "creative": {
            "brandName": --brandName--,
            "brandLogoAssetID": "amzn1.assetlibrary.asset1.edbceb790b7a538eb4ec2509b7e14fa5:version_v1",
            "headline": --headline--,
            "shouldOptimizeAsins": false,
            "asins": [
                "B07H8NS5MS"
            ],
            "brandLogoUrl": --brandLogoUrl--
        },
        "landingPage": {
            "pageType": "store",
            "url": --landingPageUrl--
        }
    },
    {
        "name": "[brand] Store.Image_DEV",
        "budget": 50.0,
        "bidOptimization": true,
        "portfolioId": --portfolioId--,
        "adFormat": "productCollection",
        "campaignId": --campaignId--,
        "budgetType": "daily",
        "startDate": "20210402",
        "state": "paused",
        "servingStatus": "paused",
        "creative": {
            "brandName": --brandName--,
            "brandLogoAssetID": "amzn1.assetlibrary.asset1.edbceb790b7a538eb4ec2509b7e14fa5:version_v1",
            "headline": --headline--,
            "shouldOptimizeAsins": false,
            "asins": [
                "B07H8NS5MS"
            ],
            "brandLogoUrl": --brandLogoUrl--
        },
        "landingPage": {
            "pageType": "store",
            "url": --landingPageUrl--
        }
    },
    {
        "name": "Brand Video Campaign",
        "budget": 40.0,
        "adFormat": "video",
        "campaignId": --campaignId--,
        "budgetType": "daily",
        "startDate": "20200729",
        "state": "paused",
        "servingStatus": "paused",
        "creative": {
            "asins": [
                "B07H8NS5MS"
            ],
            "videoMediaIds": [
                "amzn1.adex.media1.b93c1a17-d818-4eb3-90fd-3713580c7c5f"
            ],
            "type": "video"
        },
        "landingPage": {
            "pageType": "detailPage",
            "url": --landingPageUrl--
        }
    },
    {
        "name": "Campaign - 9/23/2020 15:26:16",
        "budget": 150.0,
        "portfolioId": --portfolioId--,
        "adFormat": "video",
        "campaignId": --campaignId--,
        "budgetType": "daily",
        "startDate": "20200923",
        "state": "paused",
        "servingStatus": "paused",
        "creative": {
            "asins": [
                "B07H8NS5MS"
            ],
            "videoMediaIds": [
                "amzn1.adex.media1.18f85b0c-5c32-4320-9b58-d4aa9a252d1b"
            ],
            "type": "video"
        },
        "landingPage": {
            "pageType": "detailPage",
            "url": --landingPageUrl--
        }
    },
    {
        "name": "Video",
        "budget": 150.0,
        "portfolioId": --portfolioId--,
        "adFormat": "video",
        "campaignId": --campaignId--,
        "budgetType": "daily",
        "startDate": "20210305",
        "state": "paused",
        "servingStatus": "paused",
        "creative": {
            "asins": [
                "B07H8NS5MS"
            ],
            "videoMediaIds": [
                "amzn1.adex.media1.18f85b0c-5c32-4320-9b58-d4aa9a252d1b"
            ],
            "type": "video"
        },
        "landingPage": {
            "pageType": "detailPage",
            "url": --landingPageUrl--
        }
    },
    {
        "name": "Video v2",
        "budget": 200.0,
        "portfolioId": --portfolioId--,
        "adFormat": "video",
        "campaignId": --campaignId--,
        "budgetType": "daily",
        "startDate": "20210319",
        "state": "enabled",
        "servingStatus": "running",
        "creative": {
            "asins": [
                "B07H8NS5MS"
            ],
            "videoMediaIds": [
                "amzn1.adex.media1.65782f90-9b18-4400-9b09-45d22d7a2fb3"
            ],
            "type": "video"
        },
        "landingPage": {
            "pageType": "detailPage",
            "url": --landingPageUrl--
        }
    },
    {
        "name": "Video v3",
        "budget": 400.0,
        "portfolioId": --portfolioId--,
        "adFormat": "video",
        "campaignId": --campaignId--,
        "budgetType": "daily",
        "startDate": "20210330",
        "state": "enabled",
        "servingStatus": "running",
        "creative": {
            "asins": [
                "B07H8NS5MS"
            ],
            "videoMediaIds": [
                "amzn1.adex.media1.d0938098-2c53-4c53-84fe-d66e80564f57"
            ],
            "type": "video"
        },
        "landingPage": {
            "pageType": "detailPage",
            "url": --landingPageUrl--
        }
    }
]

The incorrect endpoint is not returning any arrays, which seems to be the likely reason why we are receiving that original error message. Also fyi, I'm not sure how the scaleleap package determines the api version (v2) and if this is always included, but if I try sending a GET request to https://advertising-api.amazon.com/v2/sb/campaigns, it returns a NOT_FOUND error.

from amazon-advertising-api-sdk.

moltar avatar moltar commented on August 27, 2024

Also fyi, I'm not sure how the scaleleap package determines the api version (v2) and if this is always included, but if I try sending a GET request to https://advertising-api.amazon.com/v2/sb/campaigns, it returns a NOT_FOUND error.

Their API organization is a huge mess and the version is not always included.

So it all depends on which version of the API you are looking at.

It appears that SB has been switched to v3 already, and we do not have support for that.

There is the API version switch at the top left, if you want to see the old docs.

We don't have the capacity to add this at the moment. If you wish to create a PR and migrate to v3 of SB API, we'll happily accept it.

from amazon-advertising-api-sdk.

NishealJ avatar NishealJ commented on August 27, 2024

@moltar I get this for list campaigns? can we move the landingPage attribute to partials instead of strict?

  {
      campaignId: ---campaignId-----,
      name: ' ---campaign_name-----',
      budget: 100,
      budgetType: 'daily',
      startDate: '20190612',
      state: 'paused',
      servingStatus: 'paused',
      spendingPolicy: 'asap',
      bidOptimization: true
    },

from amazon-advertising-api-sdk.

moltar avatar moltar commented on August 27, 2024

@NishealJ sure, please send a PR. Thanks

from amazon-advertising-api-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.