Skip to content

Raidus/amazon-advertising-api-node

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unofficial NodeJS Amazon Advertising API client library.

const _amazonAdvertisingApiNode = require('./amazon-advertising-api-node');

let client = _amazonAdvertisingApiNode({
    clientId: 'CLIENT_ID',
    clientSecret: 'CLIENT_SECRET',
    region: 'na',
    sandbox: true
});

listProfiles

client.getAccessToken({
    refreshToken: 'Atzr|Qei...',
}, response => {
    client.get({
        iface: 'profiles',
    }, response => {
        console.log(JSON.stringify(response, null, 2));
    });
});

createCampaigns

client.getAccessToken({
    refreshToken: 'Atzr|Qei...',
}, response => {
    client.setProfileId(958196612321322);

    client.post({
        iface: 'campaigns',
        data: [{
                name: 'Test Node Campaign One',
                campaignType: 'sponsoredProducts',
                targetingType: 'auto',
                state: 'enabled',
                dailyBudget: 1,
                startDate: '20200101'
            },
            {
                name: 'Test Node Campaign Two',
                campaignType: 'sponsoredProducts',
                targetingType: 'manual',
                state: 'enabled',
                dailyBudget: 2,
                startDate: '20200101'
            }]
    }, response => {
        console.log(JSON.stringify(response, null, 2));
    });
});

About

Unofficial NodeJS Advertising API client library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%