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.

Re: JSON schemas for Webhooks and API

JSON schemas for Webhooks and API

andrew2019
Tourist
3 0 5
Hello,

 

We are integrating with Shopify using webhooks and API. We want to validate the data we receive and don't want to guess creating our own JSON schemas. Do you know a place or a way for getting JSON schemas we can trust for below data sources?

 

Webhooks:
1. orders/create
2. customers/create

 

API methods:
1. GET /admin/api/#{api_version}/checkouts.json - Retrieves abandoned checkouts
2. GET /admin/api/#{api_version}//products.json - Retrieves a list of products.

 

Replies 6 (6)

Alex
Shopify Staff
1561 81 343

The corresponding resources as they are serialized in the admin should mirror exactly what's sent in the webhooks. Inspecting a customer resource, for example, should effectively blueprint what a payload will look like.

 

Alternatively, you could create a test webhook (or a real one) on a development store, and trigger that webhook to fire at your app, and use that to build out an expectation of the shape of the request.

 

From there, keep your eyes on the change log. If we ship anything that could change the expected shape of these resources, we intend to let you know what to expect.

 

Cheers.

Alex | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

andrew2019
Tourist
3 0 5

This is something I called guessing, but thank you for the response.

sheldonfrith
Visitor
2 0 1

This is definitely needed. "should match" is not good enough.

marbuthnott
Visitor
1 0 0

Hi,

 

Just checking in to confirm that you guys don't have a schema for Shopify webhooks?

 

Specifically looking at 'orders/fulfilled' and 'customers/create'.

 

Many thanks,

Magnus

ctownsend
Visitor
1 0 1

This would be very useful, especially when using languages that are strongly typed. Is it possible to request this feature?

 

Json Schemas for all endpoints

grant14
Visitor
1 0 1

Yep +1