# Create dashboard of orders and invoices

**URL:** <https://developer.squareup.com/forums/t/create-dashboard-of-orders-and-invoices/12012>\
**Category:** Questions\
**Tags:** orders-api, invoices-api\
**Created:** [February 1, 2024, 3:12pm UTC](https://developer.squareup.com/forums/t/create-dashboard-of-orders-and-invoices/12012 "2024-02-01T15:12:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Square4Life](https://avatars.discourse-cdn.com/v4/letter/s/e9bcb4/32.png) [@Square4Life](https://developer.squareup.com/forums/u/Square4Life)\
**Post date:** [February 1, 2024, 3:12pm UTC](https://developer.squareup.com/forums/t/create-dashboard-of-orders-and-invoices/12012/1 "2024-02-01T15:12:11Z")

</div>

I am looking to create a dashboard for us to track all orders that are places on our site as well as the invoices that are created. I tried using the SearchOrders API and it doesn’t appear to return customer data. Just the line items order details. I need to get the customer data including address, order line items. I will then call the invoices API to hopefully get the paid invoices and unpaid invoices so that I can have all the latest orders/invoices data in one place for our delivery drivers to see what needs to go out.

---

<div class="post-metadata">

**Author:** ![Square-Dev-AI](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/square-dev-ai/32/2513_2.png) [@Square-Dev-AI](https://developer.squareup.com/forums/u/Square-Dev-AI)\
**Post date:** [February 1, 2024, 3:12pm UTC](https://developer.squareup.com/forums/t/create-dashboard-of-orders-and-invoices/12012/2 "2024-02-01T15:12:34Z")

</div>

👋 I’m Square Dev AI, here to help answer your question!  
Based on the information you’ve provided, the following documentation will help answer your question:

> **[Orders API Overview](https://developer.squareup.com/docs/orders-api/what-it-does)**
>
> Learn more about processing orders with the Square Orders API.

> **[Invoices API Overview](https://developer.squareup.com/docs/invoices-api/overview)**
>
> Learn about using the Square Invoices API to request or automatically collect a payment from a customer for an order.

> **Additional Documentation**
>
> [Orders API: How It Works](https://developer.squareup.com/docs/orders-api/how-it-works)  
> [Retrieve, List, or Search Invoices](https://developer.squareup.com/docs/invoices-api/retrieve-list-search-invoices)  
> [Create Orders](https://developer.squareup.com/docs/orders-api/create-orders)

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.  
Otherwise one of our Developer Advocates will provide additional assistance shortly.

---

<div class="post-metadata">

**Author:** ![Square-Dev-AI](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/square-dev-ai/32/2513_2.png) [@Square-Dev-AI](https://developer.squareup.com/forums/u/Square-Dev-AI)\
**Post date:** [February 1, 2024, 4:36pm UTC](https://developer.squareup.com/forums/t/create-dashboard-of-orders-and-invoices/12012/3 "2024-02-01T16:36:40Z")

</div>

To achieve this, you would need to use a combination of the Orders API and the Customers API.

When you call the SearchOrders API, it returns the order details including the ‘customer\_id’ field. You can then use this ‘customer\_id’ to make a call to the RetrieveCustomer endpoint in the Customers API. This will give you the customer’s details including their address.

For the invoices, you can use the ListInvoices endpoint in the Invoices API to get a list of all invoices for a specific location. This will include both paid and unpaid invoices. Each invoice also includes a ‘customer\_id’ field which you can use to retrieve customer details as described above.

By combining the data from these API calls, you should be able to create a comprehensive dashboard with all the information you need.

_This answer was reviewed by @Bryan-Square._

---

<div class="post-metadata">

**Author:** ![Square4Life](https://avatars.discourse-cdn.com/v4/letter/s/e9bcb4/32.png) [@Square4Life](https://developer.squareup.com/forums/u/Square4Life)\
**Post date:** [February 3, 2024, 8:05pm UTC](https://developer.squareup.com/forums/t/create-dashboard-of-orders-and-invoices/12012/4 "2024-02-03T20:05:00Z")

</div>

If I have 300 customers in my Square customer directory and I need to retrieve customer details for 10-20 orders what is the most performant route? Should I call RetrieveCustomer 10-20 times for all the orders OR should I call listCustomers to get all 300 customers and then find each of the 10-20 customers details within that result? I use Node.

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [February 5, 2024, 7:34pm UTC](https://developer.squareup.com/forums/t/create-dashboard-of-orders-and-invoices/12012/5 "2024-02-05T19:34:06Z")

</div>

You can definitely call `RetrieveCustomer` with the `customer_id` for each order. 🙂
