Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetProduct Endpoint Behavior #7

Open
zswilliams opened this issue Oct 27, 2023 · 1 comment
Open

GetProduct Endpoint Behavior #7

zswilliams opened this issue Oct 27, 2023 · 1 comment

Comments

@zswilliams
Copy link
Contributor

It's unclear if this is a Sellbrite issue, but it may be. I'm logging it here, along with the question in Sellbrites discussion area.

Sellbrite/Sellbrite-API#23

In short, we send an Array of SKU's to the Products endpoint, per their documentation. See below example.

$p = new TrollAndToad\Sellbrite\Products\GetProduct($accountToken, $secretKey);
$skus = array('PRT-360', 'PRT-361', 'PRT-362', 'PRT-363','PRT-364','PRT-365','PRT-366','PRT-367','PRT-368','PRT-369');
$response = $p->sendRequest(1, 10, $skus);
$result = $response->getBody()->getContents();

The API returns ONLY the data for the final sku in the list, PRT-369.

If no skus are submitted, the Products endpoint returns the page # and # of items up to the limit as expected.

Ideally, would like to determine if this is an issue with the request, or an issue with the response, so it can be escalated to Sellbrite if required.

@zswilliams
Copy link
Contributor Author

Response from someone in the official API thread.

Looking at the documentation here, you would pass in the array of skus as a JSON query parameter, not as a URL parameter. You would do a GET call to the endpoint https://api.sellbrite.com/v1/products and then pass in a JSON object with the array. You may need to also include the page parameter, but I haven't tested that.

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

No branches or pull requests

1 participant