Comments (8)
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.
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.
🎉 This issue has been resolved in version 3.1.15 🎉
The release is available on:
Your semantic-release bot 📦🚀
from amazon-advertising-api-sdk.
@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:
And this is what's in the amazon documentation:
from amazon-advertising-api-sdk.
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.
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.
@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.
@NishealJ sure, please send a PR. Thanks
from amazon-advertising-api-sdk.
Related Issues (20)
- code: 'MODULE_NOT_FOUND' requestPath: '@scaleleap/amazon-marketplaces'
- Support: filter sponsored brands ad group by creative type
- TypeError: Cannot read property 'region' of undefined HOT 1
- update marketplace dependency in package.json HOT 2
- Can we download Amazon DSP and Attribution reports using ScaleLeap amazon-advertising-api-sdk? HOT 3
- Dependency Dashboard
- Not able to access NegativeTargeting api for Sponsored Displays HOT 1
- Sponsored Brands reports filter by product HOT 1
- Is it possible to get accessToken through refreshToken? HOT 3
- update marketplace dependency in package.json HOT 1
- Can we download Amazon Sponsored display snapshots using ScaleLeap amazon-advertising-api-sdk? HOT 9
- Please release the version with Sponsored Display snapshot operations
- SponsoredDisplaySnapshotOperation not working as expected HOT 10
- Decode error: keyword serving type "CAMPAIGN_INCOMPLETE"
- Can we implement the new testAccounts API operations? HOT 1
- Amazon Apis sends campaignId as number/integer HOT 9
- response param code needs to include SERVER_IS_BUSY
- Keywords and Other Report End Points are Deprecated by AWS
- Is this still maintained? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amazon-advertising-api-sdk.