XeroAPI/xero-php-oauth2

Issue with creating new contact.

nesh-ua opened this issue · 1 comments

I tried create new contact via AccountingApi with function createContacts(). When i sent contact with name "Test test (test > test)" i got result with contact_id and contact_name. But contact was not created. I think you have issue in your API (not with lib). As i understood the name "Test test (test > test)" is not correct in your API, but API didn't return validation error. Can you try check this?

@nesh-ua - When using the createContacts method the 3rd argument is called SummarizeErrors and is a boolean. The default is "true". So, if you don't pass a 3rd argument, you will get the default behavior of summarizing errors.

What that means is you'll get a 200ok returned and and array of contact that includes both the successful and invalid contacts are returned. If you inspect the properties of the response you'll one "HasValidationErrors": true

If you pass the 3rd argument as false, then you'll get a 400 response and an array of only invalid objects will be returned.

Hope that clarifies things.