# Inconsistency between IDs on purchase orders

**URL:** <https://community.shiphero.com/t/inconsistency-between-ids-on-purchase-orders/1218>\
**Category:** GraphQL API\
**Created:** [March 24, 2021, 11:32am UTC](https://community.shiphero.com/t/inconsistency-between-ids-on-purchase-orders/1218 "2021-03-24T11:32:41Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eduardo](https://avatars.discourse-cdn.com/v4/letter/e/6a8cbe/32.png) [@Eduardo](https://community.shiphero.com/u/Eduardo)\
**Post date:** [March 24, 2021, 11:32am UTC](https://community.shiphero.com/t/inconsistency-between-ids-on-purchase-orders/1218/1 "2021-03-24T11:32:41Z")

</div>

Hi, community!  
I’ve noticed that in some purchase order queries, the id of the PO and the po\_id that appear in the line items fields didn’t match, and the same for po\_number (that is empty) and vendor\_id.

Request ID: “605b1de7587592ddcdc7dfbd”

If you can provide me more info about this topic, it would be a great help! Thanks in advance,

Eduardo

---

<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:** [March 24, 2021, 1:34pm UTC](https://community.shiphero.com/t/inconsistency-between-ids-on-purchase-orders/1218/2 "2021-03-24T13:34:16Z")

</div>

Hi @Eduardo  
Thanks for pointing that out!

That might be because there are some IDs that are Base64 encoded, for example:

_ **UHVyY2hhc2VPcmRlcjo1MTk0ODg=** _

Is [the encoded version](https://www.base64decode.org/) of

_ **PurchaseOrder:519488** _

(Same for Vendor ID)

po\_numer on the line\_item level is returning empty, we will see if we can fix that, but in the meantime using the po\_number at the PO level should work for this purpose

```
query {
  purchase_order(id: "UHVyY2hhc2VPcmRlcjo1MTk0ODg=") {
    request_id
    complexity
    data {
      id
      po_number
    }
  }
}

```

Please let us know if that doesn’t help.  
Thanks in advance!  
Tom

---

<div class="post-metadata">

**Author:** ![Eduardo](https://avatars.discourse-cdn.com/v4/letter/e/6a8cbe/32.png) [@Eduardo](https://community.shiphero.com/u/Eduardo)\
**Post date:** [March 24, 2021, 3:32pm UTC](https://community.shiphero.com/t/inconsistency-between-ids-on-purchase-orders/1218/3 "2021-03-24T15:32:35Z")

</div>

Hi @tomasw ! Thanks for your reply

I got it, but the vendor\_id of the PO could be useless if we have some line items provided by differents vendors, so we need the vendor\_id inside line\_item connection.

Would it be possible for all IDs to have the same structure (encoded or not)? If this changes, it complicates the processing of data from different connections.

And thanks for your tip to catch the po\_number and ID from PO level!

---

<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:** [March 29, 2021, 8:12pm UTC](https://community.shiphero.com/t/inconsistency-between-ids-on-purchase-orders/1218/4 "2021-03-29T20:12:07Z")

</div>

Hi @Eduardo !  
My apologies for the delayed response! And I’m glad that tip helped!

As for the po\_id its should be with the same format for all line items, something like this:

“vendor\_id”: “319718”,

And then on the Vendors Query:

```
query {
      vendors {
        request_id
        complexity
        data(first: 10) {
          edges {
            node {
              id
              legacy_id
              name
              email
            }
          }
        }
      }
    }

```

legacy\_id should match the “vendor\_id”: “319718”, for that vendor

Let me know if I might be getting that wrong  
Thanks again!  
Tom

---

<div class="post-metadata">

**Author:** ![Eduardo](https://avatars.discourse-cdn.com/v4/letter/e/6a8cbe/32.png) [@Eduardo](https://community.shiphero.com/u/Eduardo)\
**Post date:** [March 30, 2021, 8:28am UTC](https://community.shiphero.com/t/inconsistency-between-ids-on-purchase-orders/1218/5 "2021-03-30T08:28:38Z")

</div>

Thanks @tomasw! But why this connection is using the legacy\_id? I thought it was deprecated. Is there any other connection where the legacy\_id is still active?

I’ve been using the vendor\_id without any problem until few weeks ago so it seem to me to have been a recent change. Exists any post or web where we can follow the changes/updates in your GraphQL API? It could be a great help.

Thanks in advance!

Eduardo

---

<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:** [April 3, 2021, 4:38pm UTC](https://community.shiphero.com/t/inconsistency-between-ids-on-purchase-orders/1218/6 "2021-04-03T16:38:24Z")

</div>

Hi @Eduardo  
We apologize for that! it looks like there was a change on the backend of the Public API that might have impacted this. Would you like for us to switch it to UUID?

> [@Eduardo](#):
>
> I’ve been using the vendor\_id without any problem until few weeks ago so it seem to me to have been a recent change. Exists any post or web where we can follow the changes/updates in your GraphQL API? It could be a great help.

We should be keeping you updated on the changes and format changes like this one should not take place so again we apologize for that.

Thanks again and please let me know if you need us to switch this ID format  
Tom

---

<div class="post-metadata">

**Author:** ![Eduardo](https://avatars.discourse-cdn.com/v4/letter/e/6a8cbe/32.png) [@Eduardo](https://community.shiphero.com/u/Eduardo)\
**Post date:** [April 6, 2021, 11:07am UTC](https://community.shiphero.com/t/inconsistency-between-ids-on-purchase-orders/1218/7 "2021-04-06T11:07:53Z")

</div>

Hi @tomasw, don’t worry about that!  
And yes, please, it will be better for me to use the UUID so I could have the same type of identifier on all connections.

> [@tomasw](#):
>
> Would you like for us to switch it to UUID?

Thanks for all!

---

<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:** [April 12, 2021, 11:58pm UTC](https://community.shiphero.com/t/inconsistency-between-ids-on-purchase-orders/1218/8 "2021-04-12T23:58:13Z")

</div>

Perfect! Thanks @Eduardo. We will let you know as soon as this gets worked on
