# How can I get customer Name and Email from api if there is no customer\_id in the order api?

**URL:** <https://developer.squareup.com/forums/t/how-can-i-get-customer-name-and-email-from-api-if-there-is-no-customer-id-in-the-order-api/5899>\
**Category:** Questions\
**Tags:** orders-api\
**Created:** [May 9, 2022, 8:53pm UTC](https://developer.squareup.com/forums/t/how-can-i-get-customer-name-and-email-from-api-if-there-is-no-customer-id-in-the-order-api/5899 "2022-05-09T20:53:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hapmton1122](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/hapmton1122/32/1149_2.png) [@hapmton1122](https://developer.squareup.com/forums/u/hapmton1122)\
**Post date:** [May 9, 2022, 8:53pm UTC](https://developer.squareup.com/forums/t/how-can-i-get-customer-name-and-email-from-api-if-there-is-no-customer-id-in-the-order-api/5899/1 "2022-05-09T20:53:13Z")

</div>

I have numerous orders from the orders api where there is no customer\_id, how can I get the customers name and email without a customer\_id? I need to get this data quick as we have an event and need to issue tickets through a different system.

---

<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:** [May 9, 2022, 10:28pm UTC](https://developer.squareup.com/forums/t/how-can-i-get-customer-name-and-email-from-api-if-there-is-no-customer-id-in-the-order-api/5899/2 "2022-05-09T22:28:18Z")

</div>

How were these orders generated and do you have an example Square `order_id`? 🙂

---

<div class="post-metadata">

**Author:** ![hapmton1122](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/hapmton1122/32/1149_2.png) [@hapmton1122](https://developer.squareup.com/forums/u/hapmton1122)\
**Post date:** [May 9, 2022, 11:21pm UTC](https://developer.squareup.com/forums/t/how-can-i-get-customer-name-and-email-from-api-if-there-is-no-customer-id-in-the-order-api/5899/3 "2022-05-09T23:21:12Z")

</div>

I have a bunch of order ids:  
d8pESq2BdmpcwCbo7TVv58gbkMBZY  
Php1YeTTmimWg50My6V7SfoKQWcZY  
XdpxViTU0CEcQ4IlP5lUABjtvUGZY

---

<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:** [May 10, 2022, 3:55pm UTC](https://developer.squareup.com/forums/t/how-can-i-get-customer-name-and-email-from-api-if-there-is-no-customer-id-in-the-order-api/5899/4 "2022-05-10T15:55:54Z")

</div>

Those orders are all Square online draft orders that have a fulfillment type of DIGITAL and the recipient isn’t known which is why there isn’t a customer associated to the order. 🙂

---

<div class="post-metadata">

**Author:** ![hapmton1122](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/hapmton1122/32/1149_2.png) [@hapmton1122](https://developer.squareup.com/forums/u/hapmton1122)\
**Post date:** [May 10, 2022, 4:46pm UTC](https://developer.squareup.com/forums/t/how-can-i-get-customer-name-and-email-from-api-if-there-is-no-customer-id-in-the-order-api/5899/5 "2022-05-10T16:46:07Z")

</div>

Yes. I figured that out and added some checks to account for draft. I also was able to grab the transaction if from the tenders object and make a call to get the transaction which can have the customer id. By adding that additional check, I was able to get all data if the. Us timer is was not in the order payload

---

<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:** [May 10, 2022, 4:55pm UTC](https://developer.squareup.com/forums/t/how-can-i-get-customer-name-and-email-from-api-if-there-is-no-customer-id-in-the-order-api/5899/6 "2022-05-10T16:55:29Z")

</div>

Are you calling the Transactions API or the Payments API to get the `customer_id`?
