- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
I cannot find an API endpoint to cancel/unpost an invoice that is in draft status. I tried to delete it and I get "Only Cancelled invoices can be deleted." Can someone link me to this API call?
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
@will I believe you simply need to do an update to the invoice and change the status from "Draft" to "Canceled". This will cause the invoice to be cancelled in the system. Once the status is set to 'Canceled' you should be able to delete.
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Thanks @feisley - there is a hybrid of API nomenclature and practices going on within Zuora's REST wrapper on it's SOAP api, and I am using the REST api. For instance, to cancel a subscription, you make a PUT request to https://rest.zuora.com/v1/subscriptions/{subscription-key}/cancel.
For anyone looking for the REST version of how to do this: https://www.zuora.com/developer/api-reference/#operation/Object_PUTInvoice
params = { Id: "XXXXXXX", Status: "Canceled" } client.put("/v1/object/invoice/XXXXXXX", params)
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
@will I believe you simply need to do an update to the invoice and change the status from "Draft" to "Canceled". This will cause the invoice to be cancelled in the system. Once the status is set to 'Canceled' you should be able to delete.
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Thanks @feisley - there is a hybrid of API nomenclature and practices going on within Zuora's REST wrapper on it's SOAP api, and I am using the REST api. For instance, to cancel a subscription, you make a PUT request to https://rest.zuora.com/v1/subscriptions/{subscription-key}/cancel.
For anyone looking for the REST version of how to do this: https://www.zuora.com/developer/api-reference/#operation/Object_PUTInvoice
params = { Id: "XXXXXXX", Status: "Canceled" } client.put("/v1/object/invoice/XXXXXXX", params)