I am trying to get the Shopify orders list with the latest version of rest pagination API. There are totally of 1000 orders. I set a limit of 200. First page of API hit is working properly. While I am hitting the second page with page info I am getting error as below. Can you help me please regarding this.
Rest API URL: GET https://the-commerce-shop-1.myshopify.com/admin/api/2020-01/orders.json?limit=200&page_info=eyJzdGF0dXMiOiJhbnkiLCJsYXN0X2lkIjoxODY4Njk3NjY1NTkxLCJsYXN0X3ZhbHVlIjoiMjAxOS0xMS0yNSAwOTozNjo1OSIsImRpcmVjdGlvbiI6Im5leHQifQ&status=any
Error: Message: Client error: GET https://the-commerce-shop-1.myshopify.com/admin/api/2020-01/orders.json?limit=200&page_info=eyJzdGF0dXMiOiJhbnkiLCJsYXN0X2lkIjoxODY4Njk3NjY1NTkxLCJsYXN0X3ZhbHVlIjoiMjAxOS0xMS0yNSAwOTozNjo1OSIsImRpcmVjdGlvbiI6Im5leHQifQ&status=any resulted in a 400 Bad Request response:\n{\"errors\":{\"status\":\"status cannot be passed when page_info is present. See https:\/\/help.shopify.com\/api\/guides\/pag (truncated...)\n, Line: 113"
First you ask for orders with nothing but the status you want and a limit. That initates the paging.
Once you are through your first 200 orders, you no longer call the endpoint with status or limit, you simply use paging.
That works.
Related
When I try to update the existing client with https://api.xero.com/workflowmax/3.0/client.api/update this endpoint, I am getting a 500 error without any details.client list and get endpoints working fine. I tried with one field update. That also failing. any suggestions for this?
Please can you raise a case with Xero (api#xero.com) and include the client id for your app, the tenant name, the time and date of the most recent error and the payload that you were sending.
I am attempting to create a single opening balances record against an existing employee but keep getting a 400 Bad Request response with this detail...
At least one NZ opening balance item is required in the request
I am following the instructions as per this documentation...
https://developer.xero.com/documentation/api/payrollnz/employeeopeningbalances#post-opening-balances
URL : {DestinationID} is properly replaced with the employee GUIDhttps://api.xero.com/payroll.xro/2.0/employees/{DestinationID}/openingBalances
JSON Body[{"periodEndDate":"2011-01-30T00:00:00","daysPaid":5.00,"unpaidWeeks":0.00,"grossEarnings":1442.31}]
The Xero forums and support is pretty unreliable so I'm posting here in the hopes for a better response.
After some trial and error using the API Explorer that Xero provides I was able to get it working using their example....
I eventually learned that daysPaid and unpaidWeeks must both be integer whole numbers or else it fails.... The error message provided is misleading but this resolves the problem.
I am trying to debug a 404 issue for a product using the ShopifyBuy client api. The product is always returning 404 and I am unable to understand why.
The code below is where the issue is happening. The variable productId has a valid id for an active product in the Shopify store but client.fetchProduct returns 404. I suspect this is an issue in Shopify but getting help from support is taking forever.
var productId = productDiv.data("shopify-id");
client.fetchProduct(productId).then(function (fetchedProduct) {
productDiv.data("product", fetchedProduct);
});
Request URL: https://shop.mysite.co/api/apps/6/product_listings/[productId]
Has anyone seen this issue before to point me to the right direction here?
Thanks
I have been working with the Twitter API [followers/ids] for a few of our accounts but recent got stuck with a confusing state.
Usually twitter returns a next_cursor when there are still some records remaining in next page(s). It works fine with iteration but recently when I tried to request followers/ids for one of our accounts which doesn't have a lot of followers (just over 4200) and all can be returned in single request. Even though, the API returns all the followers in a single request but strangely the next_cursor is still present.
So when I try to make another (2nd) request with that cursor, only one record is returned which is not present in the first set of records.
What should I consider that how much followers the user actually have?
Total Followers: 4224
1st Request: 4224 [next_cursor: present]
2nd Request with cursor: 1
This is creating confusion as it is 4224 or 4225?
Attaching a screenshot
I am receiving a 422 Unprocessable Entity error when attempting to add a tracking number to a fulfillment to an order via a POST to the below url with the message body below. The order is still open and all lines should be fulfilled with the same tracking number. The error body received is "All line items of a fulfillment must use the same fulfillment service". I am able to authenticate successfully first and the GET API for this order works correctly.
https://*.myshopify.com/admin/orders/{order id}/fulfillments.json
You cannot create a single fulfillment where line items cannot be contained in the same shipment. Check the line items you are trying to fulfill, if one of them uses a different service, you won't be able to create that fulfillment.
Instead you'll need to create N separate fulfillments where N is the distinct number of fulfillment services for the line items in that order.