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?
I apologize for the delay in my response.
That is correct, how UUIDs work on our API it will return you
Which if you decode it with base64 it translates to
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.
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.
That is a great suggestion! I will add that to our docs