Inconsistency between IDs on purchase orders

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

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 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

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!

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

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

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?

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

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.

Thanks for all!

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