I cant create a tag for EbaySDK, so Ebay API may be misleading. The SDK reference is below.
Why do some requests require "input" and where can they be found? The SDK notes don't seem clear on whats required per "call type".
Following the examples from http://devbay.net/sdk/guides/getting-started/basic-usage.html#working-with-responses I'm attempting to get a list of sold items. Since Ebay only keeps 90 days data, I've put no restrictions on my request.
Their example request is:
// Create the API request object.
$request = new Types\FindItemsByKeywordsRequest();
// Assign the keywords.
$request->keywords = 'Harry Potter';
// Output the response from the API.
if ($response->ack !== 'Success') {
foreach ($response->errorMessage->error as $error) {
printf("Error: %s\n", $error->message);
}
} else {
foreach ($response->searchResult->item as $item) {
printf("(%s) %s:%.2f\n", $item->itemId, $item->title, $item->sellingStatus->currentPrice->value);
}
}
mine is a bit more simple (and apparently incomplete)
$request = new Types\GetItemStatusRequestType;
$response = $service->getItemStatus();
if ($response->Ack !== 'Success') {
if (isset($response->Errors)) {
foreach ($response->Errors as $error) {
printf("Error: %s\n", $error->ShortMessage);
}
}
} else {
print_r($response->getItemStatus); //should return all avail values (works with other types of requests)
}
Here is the nasty error
DTS\eBaySDK\Shopping\Types\GetItemStatusResponseType Object
(
[values:DTS\eBaySDK\Types\BaseType:private] => Array
(
[Timestamp] => DateTime Object
(
[date] => 2016-03-23 00:28:28.391000
[timezone_type] => 2
[timezone] => Z
)
[Ack] => Failure
[Errors] => DTS\eBaySDK\Types\UnboundType Object
(
[data:DTS\eBaySDK\Types\UnboundType:private] => Array
(
[0] => DTS\eBaySDK\Shopping\Types\ErrorType Object
(
[values:DTS\eBaySDK\Types\BaseType:private] => Array
(
[ShortMessage] => Missing required input element.
[LongMessage] => Required input element is missing from the request.
[ErrorCode] => 1.19
[SeverityCode] => Error
[ErrorParameters] => DTS\eBaySDK\Types\UnboundType Object
(
[data:DTS\eBaySDK\Types\UnboundType:private] => Array
(
[0] => DTS\eBaySDK\Shopping\Types\ErrorParameterType Object
(
[values:DTS\eBaySDK\Types\BaseType:private] => Array
(
[ParamID] => 0
[Value] => ItemID
)
[attachment:DTS\eBaySDK\Types\BaseType:private] => Array
(
[data] =>
[mimeType] =>
)
)
)
[position:DTS\eBaySDK\Types\UnboundType:private] => 0
[class:DTS\eBaySDK\Types\UnboundType:private] => DTS\eBaySDK\Shopping\Types\ErrorType
[property:DTS\eBaySDK\Types\UnboundType:private] => ErrorParameters
[expectedType:DTS\eBaySDK\Types\UnboundType:private] => DTS\eBaySDK\Shopping\Types\ErrorParameterType
)
[ErrorClassification] => RequestError
)
[attachment:DTS\eBaySDK\Types\BaseType:private] => Array
(
[data] =>
[mimeType] =>
)
)
)
[position:DTS\eBaySDK\Types\UnboundType:private] => 0
[class:DTS\eBaySDK\Types\UnboundType:private] => DTS\eBaySDK\Shopping\Types\GetItemStatusResponseType
[property:DTS\eBaySDK\Types\UnboundType:private] => Errors
[expectedType:DTS\eBaySDK\Types\UnboundType:private] => DTS\eBaySDK\Shopping\Types\ErrorType
)
[Build] => E949_CORE_APILW_17769283_R1
[Version] => 949
)
[attachment:DTS\eBaySDK\Types\BaseType:private] => Array
(
[data] =>
[mimeType] =>
)
)
Error: Missing required input element.
It seems I'm not asking the request for something, but I have no idea.
The GetItemStatus call requires you provide an ItemID. See the following API reference: GetItemStatus
You state you are looking for a sales history. I don't believe this is the call you should be using. This is a function call that appears to be in the shopping API, which is more of a product search tool.
You probably want to be using 'GetOrders' API call if you are looking to get a particular accounts sales history. See the following: GetOrders