How to Obtain (Extract) eBay Listing EAN which is not Visible (multi-variation listing? - ebay-api

wanted to know if there's a way to obtain the ean used by seller for a product listing on eBay, the ean does currently show up on eBay's item specifics area if its a multi-variation listing (only shows up if its a single product listing), so is there a way to obtain the ean used for a listing, here's an example of a listing which I would like to obtain the ean used: http://www.ebay.co.uk/itm/Luxury-Magnetic-Flip-Cover-Stand-Wallet-Leather-Case-For-Apple-iPhone-Models-/172423423931?var=&hash=item28253ca7bb:m:mUL-SeQQB128hGq-rt62LJw

You can call the GetItem operation in the Trading API. Below is an example XML request.
<?xml version="1.0" encoding="UTF-8"?>
<GetItemRequest
xmlns="urn:ebay:apis:eBLBaseComponents">
<RequesterCredentials>
<eBayAuthToken></eBayAuthToken>
</RequesterCredentials>
<ItemID>172423423931</ItemID>
<OutputSelector>Item.Variations.Variation.VariationProductListingDetails.EAN</OutputSelector>
</GetItemRequest>
A sample of the response from the API is below. The EAN information is contained in the Item.Variations.Variation.VariationProductListingDetails.EAN field.
<?xml version="1.0" encoding="UTF-8"?>
<GetItemResponse
xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>2017-02-17T10:12:13.699Z</Timestamp>
<Ack>Success</Ack>
<Version>991</Version>
<Build>E991_CORE_API_18167430_R1</Build>
<Item>
<Variations>
<Variation>
<VariationProductListingDetails>
<EAN>0702865347275</EAN>
</VariationProductListingDetails>
</Variation>
<Variation>
<VariationProductListingDetails>
<EAN>0702865347275</EAN>
</VariationProductListingDetails>
</Variation>
</Variations>
</Item>
</GetItemResponse>

Related

eBay SOAP Update Variation Stock Quantity

I am trying to update the stock quantity of a variation item in eBay, but my request fails.
I have a product with variants:
T-Shirt
Black
Blue
Champion Black
I want to change the Champion Black to 319.
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Header>
<RequesterCredentials xmlns="urn:ebay:apis:eBLBaseComponents">
<eBayAuthToken>X</eBayAuthToken>
</RequesterCredentials>
</soap:Header>
<soap:Body>
<ReviseInventoryStatusRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<MessageID>X</MessageID>
<Version>779</Version>
<InventoryStatus>
<SKU>Champion Black</SKU>
<ItemID>262620802157</ItemID>
<Quantity>319</Quantity>
</InventoryStatus>
</ReviseInventoryStatusRequest>
eBay responds with success, but they say the stock is 337:
<ReviseInventoryStatusResponse xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>2016-10-10T22:35:33.659Z</Timestamp>
<Ack>Success</Ack>
<CorrelationID>65055fdd-b574-4e98-85e8-0558b06d365a</CorrelationID>
<Version>987</Version>
<Build>E987_UNI_API5_18125388_R1</Build>
<InventoryStatus>
<SKU>Champion Black</SKU>
<ItemID>262620802157</ItemID>
<StartPrice>10.95</StartPrice>
<Quantity>337</Quantity>
</InventoryStatus>
The call is correct. eBay sends back the quantity available plus the quantity sold.

eBay CompleteSale API giving error in response

I am using the following xml for eBay CompleteSale API call:
<?xml version="1.0" encoding="utf-8"?>
<CompleteSaleRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<RequesterCredentials>
<eBayAuthToken>$auth_token</eBayAuthToken>
</RequesterCredentials>
<ItemID>$itemId</ItemID>
<TransactionID>$transId</TransactionID>
<FeedbackInfo>
<CommentText> string </CommentText>
<CommentType>Positive</CommentType>
<TargetUser></TargetUser>
</FeedbackInfo>
<Shipped>1</Shipped>
<Paid>1</Paid>
<ListingType>Half</ListingType>
<Shipment>
<ShipmentTrackingDetails>
<ShipmentTrackingNumber>$trackingNo</ShipmentTrackingNumber>
<ShippingCarrierUsed>$carrier</ShippingCarrierUsed>
</ShipmentTrackingDetails>
<ShippedTime>$shippingDate</ShippedTime>
</Shipment>
<ErrorLanguage> string </ErrorLanguage>
<MessageID> string </MessageID>
<Version>889</Version>
<ErrorHandling>BestEffort</ErrorHandling>
<WarningLevel>Low</WarningLevel>
</CompleteSaleRequest>
When I run the script, the tracking number gets updated in the eBay correctly, but the response XML gives error:
<?xml version="1.0" encoding="UTF-8"?>
<CompleteSaleResponse xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>2014-10-13T14:39:52.430Z</Timestamp>
<Ack>Failure</Ack>
<CorrelationID> string </CorrelationID>
<Errors>
<ShortMessage>Invalid shipment tracking number or carrier</ShortMessage>
<LongMessage>You have entered an incorrect shipment tracking number/carrier.</LongMessage>
<ErrorCode>2191111</ErrorCode>
<SeverityCode>Error</SeverityCode>
<ErrorClassification>RequestError</ErrorClassification>
</Errors>
<Errors>
<ShortMessage>Tracking numbers invalid</ShortMessage>
<LongMessage>The following Tracking Numbers are invalid : TRACKING_NUMBER_VALUE.</LongMessage>
<ErrorCode>21916897</ErrorCode>
<SeverityCode>Error</SeverityCode>
<ErrorParameters ParamID="0">
<Value>TRACKING_NUMBER_VALUE</Value>
</ErrorParameters>
<ErrorClassification>RequestError</ErrorClassification>
</Errors>
<Errors>
<ShortMessage>Internal error to the application.</ShortMessage>
<LongMessage>Internal error to the application.</LongMessage>
<ErrorCode>10007</ErrorCode>
<SeverityCode>Error</SeverityCode>
<ErrorClassification>RequestError</ErrorClassification>
</Errors>
<Errors>
<ShortMessage>An error occurred.</ShortMessage>
<LongMessage>An error number "{0}" occurred while processing your request.</LongMessage>
<ErrorCode>36</ErrorCode>
<SeverityCode>Error</SeverityCode>
<ErrorClassification>RequestError</ErrorClassification>
</Errors>
<Version>893</Version>
<Build>E893_CORE_APIXO_17070435_R1</Build>
</CompleteSaleResponse>
Why I am not getting the success in response?
The tracking Number is like: 1Z7X887R0368851221 and carrier is 'UPS'
Please help.
Thanks
Per eBay's own dev site:
Error 10007 ("Internal error to the application") indicates an error on the eBay server side, not an error in your application.
So you'd probably need to contact eBay about the specific issue, but my assumption is that while eBay will accept in any information into the Carrier and Tracking number fields, the format of the tracking number field must match some other critieria set by the carrier for inserting into another API upstream.
Have you tested the tracking number in UPS's own tracking mechanism? It returns a valid package tracking response?
Also, per the eBay dev site, if you are using UPS Mail Innovations rather than UPS, the carrier name to specifiy is UPS-MI.

Ebay API for listing one seller's items - GetSellerList

Anyone out there with experience with the Ebay API? I'm essentially trying to list all items for one shop on their website, so it's not going to be a public service usage. The GetSellerList method seems to be the way to go, but the documentation on the Ebay Website itself is very scant and not really well done at all.
http://developer.ebay.com/DevZone/XML/docs/reference/ebay/GetSellerList.html
I'm in the process of trying out the code samples and the problem I'm hitting now is whether or not I need a UserToken or not. #PITA
Thanks,
Here is about the minimum request I used that worked for me:
<?xml version="1.0" encoding="utf-8"?>
<GetSellerListRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<RequesterCredentials>
<eBayAuthToken>--Enter your AuthToken here--</eBayAuthToken>
</RequesterCredentials>
<ErrorLanguage>en_US</ErrorLanguage>
<WarningLevel>High</WarningLevel>
<StartTimeFrom>2013-06-01T21:59:59.005Z</StartTimeFrom>
<StartTimeTo>2013-09-26T21:59:59.005Z</StartTimeTo>
<EndTimeFrom>2013-09-26</EndTimeFrom>
<EndTimeTo>2013-11-26</EndTimeTo>
<GranularityLevel>Coarse</GranularityLevel>
<UserID>--Enter your seller's name here--</UserID>
<Pagination>
<EntriesPerPage>200</EntriesPerPage>
<PageNumber>1</PageNumber>
</Pagination>
<OutputSelector>ItemArray.Item.ItemID</OutputSelector>
<OutputSelector>ItemArray.Item.Quantity</OutputSelector>
<OutputSelector>ItemArray.Item.Title</OutputSelector>
<OutputSelector>ItemArray.Item.PrimaryCategory.CategoryID</OutputSelector>
<OutputSelector>ItemArray.Item.PrimaryCategory.CategoryName</OutputSelector>
</GetSellerListRequest>
I also had to add these headers to the request:
X-EBAY-API-APP-NAME -- Add yours here --
X-EBAY-API-CALL-NAME GetSellerList
X-EBAY-API-REQUEST-ENCODING XML
X-EBAY-API-SITEID 0
X-EBAY-API-DEV-NAME -- Add yours here --
X-EBAY-API-CERT-NAME -- Add yours here --
X-EBAY-API-COMPATIBILITY-LEVEL 825
I'm not sure which of the "-- Add yours here --" entries are public and which are private, so I'll aire on the side of caution and I'll let you get them for yourself.. :-)
With no eBayAuthToken entered, you get the following error:
<Errors>
<ShortMessage>Auth token is invalid.</ShortMessage>
<LongMessage>Validation of the authentication token in API request failed.</LongMessage>
<ErrorCode>931</ErrorCode>
<SeverityCode>Error</SeverityCode>
<ErrorClassification>RequestError</ErrorClassification>
</Errors>
I hope this helps.
<?xml version="1.0" encoding="utf-8"?>
<GetSellerListRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<RequesterCredentials>
<eBayAuthToken>$authToken</eBayAuthToken>
</RequesterCredentials>
<ErrorLanguage>en_US</ErrorLanguage>
<WarningLevel>High</WarningLevel>
<StartTimeFrom>2015-01-01T00:00:00.005Z</StartTimeFrom>
<StartTimeTo>2015-03-31T23:59:59.005Z</StartTimeTo>
<EndTimeFrom>2015-03-31T23:59:59.005Z</EndTimeFrom>
<EndTimeTo>2015-05-31T23:59:59.005Z</EndTimeTo>
<GranularityLevel>Coarse</GranularityLevel>
<UserID>----testuser----</UserID>
<Pagination>
<EntriesPerPage>200</EntriesPerPage>
<PageNumber>1</PageNumber>
</Pagination>
<OutputSelector>ItemArray.Item.ItemID</OutputSelector>
<OutputSelector>ItemArray.Item.Quantity</OutputSelector>
<OutputSelector>ItemArray.Item.Title</OutputSelector>
<OutputSelector>ItemArray.Item.PrimaryCategory.CategoryID</OutputSelector>
<OutputSelector>ItemArray.Item.PrimaryCategory.CategoryName</OutputSelector>
</GetSellerListRequest>
Header Request Values
$headers = array(
'X-EBAY-API-SITEID:'.SITEID,
'X-EBAY-API-CALL-NAME:GetSellerList',
'X-EBAY-API-REQUEST-ENCODING:'.RESPONSE_ENCODING,
'X-EBAY-API-COMPATIBILITY-LEVEL:' . API_COMPATIBILITY_LEVEL,
'X-EBAY-API-DEV-NAME:' . API_DEV_NAME,
'X-EBAY-API-APP-NAME:' . API_APP_NAME,
'X-EBAY-API-CERT-NAME:' . API_CERT_NAME,
'Content-Type: text/xml;charset=utf-8'
);

eBay : what value should be set for ShippingCostPaidByOption for return policy API

I'm working with ebay Trading API for listing the product but after I'm stucking in it where i need to set value for a option in Return policy Type API, I need to set ShippingCostPaidByOption with value either Paid by buyer or Paid by Seller?
Similarly I need to set RefundOption value either Money or Money or item replace.
To get the applicable RefundOption and ShippingCostPaidByOption values, call GeteBayDetails with DetailName set to ReturnPolicyDetails, and then look for the ReturnPolicyDetails.Refund.RefundOption and ReturnPolicyDetails.ShippingCostPaidBy.ShippingCostPaidByOption fields in the response. The value of the fields can be used in your AddItem request.
The following example can be used as a request to GeteBayDetails using the eBay API explorer.
<?xml version="1.0" encoding="utf-8"?>
<GeteBayDetailsRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<RequesterCredentials>
<eBayAuthToken>[ADD YOU OWN AUTH TOKEN</eBayAuthToken>
</RequesterCredentials>
<DetailName>ReturnPolicyDetails</DetailName>
</GeteBayDetailsRequest>
A typical response will look like the following.
<?xml version="1.0" encoding="UTF-8"?>
<GeteBayDetailsResponse xmlns="urn:ebay:apis:eBLBaseComponents">
<ReturnPolicyDetails>
<Refund>
<RefundOption>MoneyBackOrExchange</RefundOption>
<Description>Money back or exchange (buyer's choice)</Description>
</Refund>
</ReturnPolicyDetails>
<ShippingCostPaidBy>
<ShippingCostPaidByOption>Buyer</ShippingCostPaidByOption>
<Description>Buyer</Description>
</ShippingCostPaidBy>
</ReturnPolicyDetails>
</GeteBayDetailsResponse>

eBay API: GetOrders call returning no orders

I have placed test orders in the sandbox eBay account.
I am not able to get the orders listing from the GetOrders API call.
It retruns the success message but no orders are fetched.
Below are the API call details :
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns="urn:ebay:apis:eBLBaseComponents" ><soap:Header><RequesterCredentials><eBayAuthToken>...</eBayAuthToken><Credentials><AppId>Clarion89-2b36-4da6-b073-00dafbcff12</AppId><DevId>f79169c1-f95b-4d23-9fe2-547504ffb827</DevId><AuthCert>...</AuthCert></Credentials></RequesterCredentials></soap:Header><soap:Body><GetOrdersRequest><DetailLevel>ReturnAll</DetailLevel><Version>527</Version><CreateTimeFrom>2012-04-02T09:52:27.000Z</CreateTimeFrom><CreateTimeTo>2012-05-03T09:52:27.000Z</CreateTimeTo><OrderRole>Seller</OrderRole><OrderStatus>Active</OrderStatus><ListingType>FixedPriceItem</ListingType></GetOrdersRequest></soap:Body></soap:Envelope>
Response returned as below
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<GetOrdersResponse xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>2012-05-03T09:54:03.650Z</Timestamp>
<Ack>Success</Ack>
<Version>771</Version>
<Build>E771_CORE_BUNDLED_14795207_R1</Build>
<PaginationResult>
<TotalNumberOfPages>0</TotalNumberOfPages>
<TotalNumberOfEntries>0</TotalNumberOfEntries>
</PaginationResult>
<HasMoreOrders>false</HasMoreOrders>
<OrderArray/>
<OrdersPerPage>100</OrdersPerPage>
<PageNumber>1</PageNumber>
<ReturnedOrderCountActual>0</ReturnedOrderCountActual>
</GetOrdersResponse>
</soapenv:Body>
</soapenv:Envelope>
Please tell me why i am not getting order details
first of all i would use an higher version (i'm actually using 771 as compatibility level)
I used to have a similar problem at the very benning when i started coded for api, then i switched CreatedTime filter to NumberOfDays wich are the days to look back from today.
What language are you using to make the call?
Check your request parameters against your orders that are stored on ebay. It may happen that there are no orders matching the parameters you are entering in your call. Try entering the most basic request parameters like
<?xml version="1.0" encoding="utf-8"?>
<GetOrdersRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<RequesterCredentials>
<eBayAuthToken>[your authentication token]</eBayAuthToken>
</RequesterCredentials>
<CreateTimeFrom>2012-05-10T00:00:00.000Z</CreateTimeFrom>
<CreateTimeTo>2012-05-15T00:00:00.000Z</CreateTimeTo>
</GetOrdersRequest>
You can enter the dates as per your requirement but make sure you use the date format accepted by ebay.