Workflowmax client update endpoint giving 500 error - xero-api

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.

Related

Workday Rest API - POST Call For Work Email Change

I currently have a use case where I need to update work email for users in Workday using Workday Rest API. I have added all the required scopes and BP permissions but still have been receiving the below error when I try to do the POST staffing/workers/{ID}/workContactInformationChanges
{
"error": "not found: staffing",
"code": "S21"
}
Is there any additional permissions that need to be enabled in order to get access to the staffing api collection?
When I was setting up the connection to Workday I had included too much info in the connection URL and was getting this same error,
ex: https://wdX-impl-servicesX.workday.com/ccx/api/v1/XXXx1
Here is what I shortened it to:
ex: https://wdX-impl-servicesX.workday.com
This allowed the API call to construct the rest of the URL... otherwise it was constructing the URL incorrectly like this:
https://wdX-impl-servicesX.workday.com/ccx/api/v1/XXXx1/ccx/api/v1/XXXx1/filename

Unable to POST NZ employee openingBalances to Xero?

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.

Shopify collect orders with rest API error

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.

How to set shipping method using “cart_shipping.method” in magento api v1

I want to set shipping method using "cart_shipping.method" but it's giving me fetal error. Error message is "Uncaught SoapFault exception: [1062] Shipping method is not available". I am using method like that
$result = $proxy->call($sessionId, 'cart_shipping.method', array(1402,'flatrate'));
I had the same problem because I was using test information which was not valid in the address call (cart_customer.addresses (SOAP V1) or shoppingCartCustomerAddresses (SOAP V2)).
So try a valid address which also works in the front end. For example, if you use the wrong country, magento will probably think: shipping is not available for this country. And then throw the 1062 error you experienced.
Maybe you had the same problem.
(btw I am using this as an example: https://magento.stackexchange.com/questions/6424/how-to-create-order-using-magento-web-services-in-php)

What is the correct value or status code to indicate that a username record could not be updated?

I'm implementing a basic service to add usernames to user records in a database. The service first checks if the username exists and if it does returns some value to tell the client that the username is already taken. If the username is available it updates the user record and returns "OK". In this application the client is a native IOS mobile app and the server is node.js. But that shouldn't be relevant to this question.
For this service, what would you recommend I use as my return values? For example, when successful should I return a status code 200? A boolean value? A custom string? Similarly for the unsuccessful condition what would the recommended and customary return value be?
The status 201 is intented to be used when some resource is created. So when your user is created you should set status code 201 and set it to 200 when the same request does an update. Additionally you can return the ID id the created/updated user. IMHO you should keep create and update as separate services.
You can use apporpriate 4xx errors (Refer link) when errors happen. Always keep a status message attribute in your response if your response is XML or JSON. You can set appropriate messages into this and the mobile app can check this message based on the HTTP Status Code you give.
I would return a 201 for the successful condition and a 400 or 409 for the unsuccessful condition.
Hope that helps!
Brandon