APIv3-php-library icon indicating copy to clipboard operation
APIv3-php-library copied to clipboard

ContactsAPI updateBatchContacts results in 404 when one of emails not found

Open ybert opened this issue 1 year ago • 1 comments

When I use $this->contactsApi->updateBatchContacts(new UpdateBatchContacts(['contacts' => $updateContacts])); with unknown emails in contact list in sendinblue I get a 404 error.

 [404] Client error: `POST https://api.sendinblue.com/v3/contacts/batch` resulted in a `404 Not Found` response:  
  {"code":"document_not_found","message":"No contact found for indexes 3,4"}    

I think it's wrong as a batch update should not return 404 error. The API doc here https://developers.sendinblue.com/reference/updatebatchcontacts mention that the API should return a 207 response with a list of successIds and a list of failureIds. For the moment I want to update 5000 contacts in one call and the call fails with no contact updated because one of the 5000 contacts is not in sendinblue.

Can you do something to fix it ?

ybert avatar Mar 07 '23 09:03 ybert