Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Know Wich user done the order cancelation via API

Know Wich user done the order cancelation via API

Mcastillo
Shopify Partner
8 1 1

Hi, i created a webhook for the order cancelation event, but seeing the received JSON doesnt seem to contain the information of the user who cancellated the order.

 

this info is clearly visible on the storefront so i dont think that isnt included in the API, so i´ll be pretty gratefull if anyone can point where im missing out or confirm that in fact that info isnt contained into the JSON

Replies 3 (3)

Pcastro
Shopify Staff
15 0 4

Hello!

 

In order to confirm the data included in the JSON, you can visit Shopify Dev - Webhooks and scroll down to the Mandatory webhooks section, look for the Order row, and click Show response to unfold the contents of the orders/cancelled webhook payload.

 

Can you see any of the fields you need included there?

 

Best regards,

Paco

To learn more visit the Shopify Help Center or the Community Blog.

Mcastillo
Shopify Partner
8 1 1

Yes, i see the value 

user_id

but even in the documentation came as null.

 

and when i create my webhook and do a test event the data doesnt came, im using the version 22-04 of the API

Pcastro
Shopify Staff
15 0 4

Hello @Mcastillo  

 

I'm afraid that user_id does not represent user that cancelled the order: it is the user that created it if you created the order from the admin panel.

 

Cheers,

Paco

To learn more visit the Shopify Help Center or the Community Blog.