Retrieving order information from Chargebee.

Modified on: Fri, 3 Mar, 2023 at 4:42 PM

This article covers 

If there is a way to filter all orders by customer_id via API. 

How to retrieve the list of all orders filtered by customer_id via API?


Summary

  • The Order Export file that you would download will include one additional file “OrderLineItems.csv”
  • List orders API will now return, order’s id parameter was appended with a database ID if that order was deleted due to a customer, invoice, or subscription deletion


Solution

If you are directly using the List orders API then currently it wouldn’t be possible to filter orders via Customer ID as there is no such parameter available within this API, however, as a workaround, you can use List Invoice API wherein you would get the Customer Id parameter to filter. Post which you can take the Order ID from the output and then use the Retrieve an Order API to retrieve the order.


Order Export CSV


Orders.csv now contains one row for each unique order in Chargebee, so that you can more easily conduct order-level analysis and record-keeping without transforming the data


Can I  access the line item level data in the older orders.csv file?

Yes. That data now lives in the OrderLineItems.csv file


Will the OrderComments.csv file still be downloaded?

Yes, the order comments will still be available as part of the download


Will this impact exports via API?

Yes, there will be a minor upgrade to the list results, going forward when you list Orders via APIs you will now see deleted orders as part of the list. See the question on list order changes via API.


I have multiple shipments associated with an order, will that show up in my Chargebee export?

Right now, only the data associated with an order’s first shipment is captured in Chargebee. We’re planning to support multiple shipment tracking in Chargebee in the near future. If this is urgent for your business, please let me know, and I can put you in contact with our product management team.


List Order API change


Why are orders showing up as deleted that didn’t appear so before when I call the list order API?

Previously, when our list orders API returned deleted orders, the order ID was appended to include an additional database id if the order was deleted because a customer, invoice, or subscription was deleted. Now, all deleted orders are returned with their original id, regardless of the mechanism of deletion. You no longer have to remove the database ID to match deleted orders to existing order records in your system.


If you have further questions feel free to contact our Support Team.


Related Article
How to export order reference IDs?

List orders API

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.
×