WebHook IDs vs GraphQL Ids

Good Afternoon,
When creating a purchase order through GraphQL we receive back a base64 encoded string of the type:Id. When a webhook is fired we receive back the id of the base64 encoded string.

In example for a Purchase order using the GraphQL Query/Mutation we receive back an id like “UHVyY2hhc2VPcmRlcjo1MDAwMQ==” which when decoded comes out to be “PurchaseOrder:50001”. When a purchase order webhook is received the body includes an id of 50001.

Can you confirm that this is working as expected or will there be a change when the Rest API gets deprecated?

Thanks!

Hi @kstolte
I apologize for the delay in my response.
That is correct, how UUIDs work on our API it will return you

“UHVyY2hhc2VPcmRlcjo1MDAwMQ==”

Which if you decode it with base64 it translates to

“PurchaseOrder:50001”

Being the 50001 the id of the purchase order (also displayed as legacy_id under purchase_order query

Let me know if this doesn’t respond to the question.
Thanks!
Tom

Yep just wanted to confirm!

I think this might be handy as an explanation regarding the id difference in the Webhook section of the docs.

Thanks!

That is a great suggestion! I will add that to our docs
Thanks again!
Tom