How to delete orders?

Hi brevo & community,

We use the order API to import orders into brevo and attach them to contacts.

Is there a way to delete orders?

Background: We would like to delete cancelled orders.
Alternatively, we considered setting a cancelled status and passing an empty array in the products field. But an empty array is rejected by the API.

We want to prevent users from forgetting to set the canceled flag when creating segments and people being contacted who should not be.

Thank you very much!

Hi there, thanks for your message!

Yes, unfortunately, we cannot accept an empty array in the product fields. Are you able to update the order value to cancelled via this endpoint Managing the status of the order?

Does this work for you? You should still be able to segment out the cancelled orders.

Please let me know! Thanks,

Hi Adam,

thank you for your reply!

Yes, this should be possible. But as I already mentioned, we wanted to eliminate the possibility of a user forgetting to segment out completely cancelled orders.

That’s why we would have liked to delete the entire order or delete all items, since selections are primarily made on the products.

But segment out cancelled orders is then the way to go.