Skip to content
This repository has been archived by the owner on Nov 6, 2019. It is now read-only.

AddFixedPriceItem Call... No <Item.Country> exists? #18

Open
fccardiff opened this issue May 28, 2015 · 11 comments
Open

AddFixedPriceItem Call... No <Item.Country> exists? #18

fccardiff opened this issue May 28, 2015 · 11 comments

Comments

@fccardiff
Copy link

Hi, I'm trying to make an AddFixedPriceItemCall. I'm using the ebayApiPostXmlRequest method, and my params are seen below:

params: {
            authToken: myAuthTokenIsHere,
            Item: {
                Country: 'US',
                Currency: 'USD',
                Description: description,
                ListingType: 'FixedPriceItem',
                PictureDetails: picturesArray,
                Quantity: '5',
                StartPrice: price
            },
}

I have auth tokens, etc. and all application tokens, I've simply omitted that code from here. Unfortunately, it's giving errors that the country doesn't exist, although it's obviously shown in my Item{} object. Is this a bug, or am I doing something wrong?

Thank you!

@thehuey
Copy link

thehuey commented May 29, 2015

Try looking at this page:
http://developer.ebay.com/DevZone/finding/Concepts/SiteIDToGlobalID.html

It might be that you need to pass a different ID value.

On Thu, May 28, 2015 at 12:32 PM, fccardiff [email protected]
wrote:

Hi, I'm trying to make an AddFixedPriceItemCall and my params are seen
below:
params: {
Item: {
Country: 'US',
Currency: 'USD',
Description: description,
ListingType: 'FixedPriceItem',
PictureDetails: picturesArray,
Quantity: '5',
StartPrice: price
},
}

I have auth tokens, etc. and all application tokens, I've simply omitted
that code from here. Unfortunately, it's giving errors that the country
doesn't exist, although it's obviously shown in my Item{} object. Is this a
bug, or am I doing something wrong?

Thank you!


Reply to this email directly or view it on GitHub
#18.

@fccardiff
Copy link
Author

Thanks for the help!
Unfortunately, I tried with Country: '0', Country: 'US', and Country: 'EBAY-US', and none have worked.

@fccardiff
Copy link
Author

Here's my full call in NodeJS - maybe I placed it in the wrong area?

var ebay = require('ebay-api');
ebay.ebayApiPostXmlRequest({
    serviceName: 'Trading',
    opType: 'AddFixedPriceItem',
    devName: myDevId,
    cert: myCertId,
    appName: myAppId,
    sandbox: true,
    title: title,
    params: {
        'authToken': myClientAuthToken,
        version: EBAY_API_VERSION,
        Item: {
            Country: 'EBAY-US', 
            Currency: 'USD',
            Description: description,
            ListingType: 'FixedPriceItem',
            PictureDetails: picturesArray,
            Quantity: '5',
            StartPrice: price
        },
    }
}, function (error, results) {
    if (error) {
        console.dir(error);
        process.exit(1);
    }
    console.dir(results);
});

@thehuey
Copy link

thehuey commented May 30, 2015

Your header might not have the right entries.

X-EBAY-SOA-GLOBAL-ID is passed as part of the auth. I'll look at this code
later this evening and see if I can get a working example for you.

On Fri, May 29, 2015 at 8:51 AM, fccardiff [email protected] wrote:

Here's my full call in NodeJS - maybe I placed it in the wrong area?
var ebay = require('ebay-api');
ebay.ebayApiPostXmlRequest({
serviceName: 'Trading',
opType: 'AddFixedPriceItem',
devName: myDevId,
cert: myCertId,
appName: myAppId,
sandbox: true,
title: title,
params: {
'authToken': myClientAuthToken,
version: EBAY_API_VERSION, // TODO No Item.Currency, Item.Country exists,
etc. Should be a quick fix
Item: {
Country: 'EBAY-US',
Currency: 'USD',
Description: description,
ListingType: 'FixedPriceItem',
PictureDetails: picturesArray,
Quantity: '5',
StartPrice: price
},
}
}, function (error, results) {
if (error) {
console.dir(error);
process.exit(1);
}
console.dir(results);
});


Reply to this email directly or view it on GitHub
#18 (comment)
.

@fccardiff
Copy link
Author

OK, thanks! It would really help if I could get this working :)

@thehuey
Copy link

thehuey commented May 30, 2015

Looking thru my code, I think you'll need a GlobalID = 'EBAY-US' as part of
your request. I haven't used AddFixedPriceItemCall using the node api yet.

On Sat, May 30, 2015 at 10:49 AM, fccardiff [email protected]
wrote:

OK, thanks! It would really help if I could get this working :)


Reply to this email directly or view it on GitHub
#18 (comment)
.

@fccardiff
Copy link
Author

Hm, unfortunately this is not seeming to fix it, either. I'm thinking that I'm missing something in the Item object, as I've also been getting issues such as No <Item.Currency> exists, No <Item.ListingDuration> exists, etc. Although ListingDuration isn't mentioned in my example above, even if I add it into my Item object, the API is acting as if it's missing. Is there something wrong with my Item object implementation possibly?

@fccardiff
Copy link
Author

Hm, I still can't manage to do it. Any clue why this wouldn't work?

Thanks!

@thehuey
Copy link

thehuey commented Jun 2, 2015

I haven't had a chance to play with this in detail yet. Busy weekend.
I'll try to take another look tonight.

On Mon, Jun 1, 2015 at 5:38 PM, fccardiff [email protected] wrote:

Hm, I still can't manage to do it. Any clue why this wouldn't work?

Thanks!


Reply to this email directly or view it on GitHub
#18 (comment)
.

@fccardiff
Copy link
Author

No worries, thanks!

On a side note, if this API doesn't end up working, should I just switch to XML?

@jimmyfio
Copy link

Did you find a solution to this? I have the same issue using the "AddItem" call.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants