# Null vendor returned from purchase\_orders query

**URL:** https://community.shiphero.com/t/null-vendor-returned-from-purchase-orders-query/1149
**Category:** GraphQL API
**Created:** [February 25, 2021, 9:38pm UTC](https://community.shiphero.com/t/null-vendor-returned-from-purchase-orders-query/1149 "2021-02-25T21:38:20Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![bbarrett](https://avatars.discourse-cdn.com/v4/letter/b/e9a140/32.png) [@bbarrett](https://community.shiphero.com/u/bbarrett)
#### Post date: [February 25, 2021, 9:38pm UTC](https://community.shiphero.com/t/null-vendor-returned-from-purchase-orders-query/1149/1 "2021-02-25T21:38:20Z")

</div>

Please run this query:

{purchase\_orders(created\_from:“20210223”){request\_id complexity data(sort:“created\_at” first:1 ){pageInfo{hasNextPage endCursor} edges{node{id account\_id po\_number created\_at date\_closed po\_date arrived\_at fulfillment\_status vendor\_id vendor{id name}}}}}}

This query returns a valid “vendor\_id” but the “vendor{id}” is null. All fields in the returned “vendor” are null.

Whats up with this? Why no vendor object? Is this a bug?

Id like to be able to get the vendor’s name in the purchase\_orders query.

---

<div class="post-metadata">

### Author: ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)
#### Post date: [February 26, 2021, 11:15am UTC](https://community.shiphero.com/t/null-vendor-returned-from-purchase-orders-query/1149/2 "2021-02-26T11:15:19Z")

</div>

Hi @bbarrett!  
The reason you are seeing this is that the PO has _ **Multiple Vendors** _ as a vendor, which means that not all of those products are from the same vendor.

![Screen Shot 2021-02-26 at 08.12.57](https://us1.discourse-cdn.com/flex020/uploads/shiphero/original/1X/5256e033be0b3fa32c0baa0062422e1ebff5e6e3.png)

The ID you are seeing in return is `"vendor_id": "VmVuZG9yOjA="`, which is [Base64 encoding](https://www.base64decode.org/) of `Vendor:0`

When there is no Vendor assigned to the PO we default that value to _ **Multiple Vendors** _

Let us know if that doesn’t help, if we could explain better or if there is anything else we could help with.  
Thanks in advance!  
Tom

---

<div class="post-metadata">

### Author: ![bbarrett](https://avatars.discourse-cdn.com/v4/letter/b/e9a140/32.png) [@bbarrett](https://community.shiphero.com/u/bbarrett)
#### Post date: [February 26, 2021, 2:21pm UTC](https://community.shiphero.com/t/null-vendor-returned-from-purchase-orders-query/1149/3 "2021-02-26T14:21:11Z")

</div>

Yes this does help. Thanks for explaining!
