Xero API - response when request has valid and invalid elements - xero-api

I'm using the Xero API to post multiple invoices to Xero.
This works fine if all the invoices are valid. I get a HTTP 200 response with the GUIDs of the newly created invoices.
However, if one of the invoices has an error I get a BadRequest response with a ValidationException.
I would expect the xero system to work transactionally, and if any of the invoices have a validation error, then none of them would be created. However, what I'm observing is that the valid invoices from my request are still created in the system, even when there is an invalid one present in the request.
The problem is that the response from the Xero API just has the details of the validation error. Nowhere in the response do I get the details of the newly created valid invoices. So I have no way of knowing what the GUIDs of those new invoices are.
Has anyone else experienced a problem like this, and how did they overcome it?
I am reluctant to send the invoices individually as their own guidance recommends posting multiple entities at once to avoid exceeding the rate limits of the API.

By default, the Xero API returns a "summarized" view of your errors when one or more resources in a PUT/POST request are invalid.
If you take a look at the Creating many resources section on this page of our docs you'll see an example of how to turn this off using the query parameter ?SummarizeErrors=false.
Cheers,
Matt

Related

eBay REST API order endpoint not getting all orders

I'm using the eBay RESTful APIs to get data from my eBay account. I'm using the getOrders endpoint to gather all the orders on my account in the last 90 days. Here is the endpoint documentation: documentation. When I send the request, the endpoint returns with around 70 orders instead of the full. It should be a lot more than that. I've checked for pagination and there is none. I tried searching for a specific OrderID in the result from the request and the order wasn't present. However, when I supply the request with the OrderID I am trying to find, it finds the order perfectly and returns information about it. But when I use it to list all of the orders, the order does not appear in the result.
Here is my request URL:
https://api.ebay.com/sell/fulfillment/v1/order?limit=200
All the authorization is correct and headers as I am not getting an error when sending the request. Just the data that is returned, isn't complete. Any help would be great, thanks
I have removed filters and some headers, but they haven't changed anything

Hosted Payment Page and http response

We are investigating and issue where the payment action is successful but we haven't received a response from Global payments. We believe this is the root cause. We are obviously keen to confirm this. Does global payments track the responses sent back to the customer. If so if we specified a specific date and time is it possible to get logs?
On separate thread how can we determine when the submit button has been clicked when we are using a Hosted Payment Page.
We made a payment to global payments which went through but the subsequent actions that depended on the response from global payment didn't fire.
These things are usually just a misconfiguration in the response URL of the HPP. Please contact us directly at developers#globalpay.com and we will be able to discuss more specifics about your implementation which may not be suitable for more public forums.
Thanks

Check paypal donation thought API access

Reading almost the whole API reference of paypal, i am almost sure that they do not provide any kind of API method regarding donations. However i would like to check whether someone donates something to my paypal account and get some details of this transaction.
I thought of using the Activities Search REST API, however it was responding with -> "No permission for the requested operation" while i was testing it with my sandbox business account.
Anyone got any idea of how to claim this details? Do i missing something?
My last thought, was to use gmail API's to read the incoming emails that i am receiving (from paypal) when i got a donation, however i believe it's not a good solution, so its my last choice.

How to get payout using PayPal API, with only batch_sender_id

Sometimes the PayPal API fails to give back a payout_id but still processes a payment (i.e. because the server is down).
I have some payments that I would like to fetch information for, but only have the batch_sender_id (the id that I gave each payment).
Is there a way to get the payment information with PayPal's API? There doesn't seem to be a way to fetch payments without the payout_id.
Resubmit with the same batch_sender_id, it should return html code 400 with a link to the resource that contains the previously submitted request. So before making a request to PayPal be sure to store the batch_sender_id so you can re-request later if you do not get a response.

Make 1shoppingcart process CC orders sent via HTTP from external script

I need to make 1shoppingcart process orders, coming from my script via HTTP (GET or POST).
I would send credit card, and other payment details in XML, JSON, or whatever format is required.
And want 1shoppingCart return results in HTTP response (Error code/text or Success message)
It that possible via some API? Or I will have to "manually" fake the forms submissions to 1SC, and the parse responses to obtain the result?
The 1SC checkout pages are designed to prevent this kind of activity. The API does not provide any method to send orders to the system in any way.
Basically, what you are asking is not possible and attempting to do so would result in having your account closed.
Sorry for the bad news.
Source: QA Analyst for 1SC (ME!)