Orders API: Voided/Cancelled Orders

Hello,
Orders with the OrderState “CANCELED” do not appear to have any line item detail when retrieved using the Orders API. Is there any way to get the items associated with the Canceled/Voided order using some other method? I can see that voided orders appear under transactions with all of the line items both on the register and on the dashboard.
I’m hoping to create a custom report that details all voided items, not just orders.

Thanks,
-Eric

Are these comp and void orders? Do you have an example order_id? :slightly_smiling_face:

Hi Bryan,

These are void orders. Using the Orders API, I can see that an order was voided (the OrderState is “CANCELED”), but not what was on the order.
An example order id is LxSnDzT1mGgNyMC4dmRScWzeV.

I have confirmed that order appears with line items on the Transactions section of the Square Dashboard. The order is all in strike-through, with a “Void” note underneath each item.

I’m hoping there is another way to get these line items out of the API since there does not appear to be a dashboard report that will do this.

Thanks,
-Eric

Looks like that order was voided by the Restaurants POS. Unfortunately voided items aren’t currently available with the Orders API. We’re constantly working to improve our features based on feedback like this, so I’ll be sure to share your request to the API product team. :slightly_smiling_face:

Thanks, Bryan. I appreciate you looking into this. :slight_smile:

Hi Eric,

If you are using the Orders API and retrieving orders with the OrderState “CANCELED”, it’s possible that the line item details may not be included in the response. This could be because the line items associated with a canceled order may have been removed or voided at the time of cancellation.

To retrieve the line item details associated with a voided order, you can try using the Transactions API instead of the Orders API. The Transactions API provides a more detailed view of all transactions processed through your Square account, including voided transactions and the line items associated with them.

You can retrieve voided transactions using the Transactions API by specifying the transaction type as “VOID” in your API request. The response should include all line item details associated with the voided transaction.

Here is an example API request to retrieve voided transactions using the Transactions API: