This guide discusses how to parse an API response.
In this example, you will store part of the response in a Database Field for later reference using GraphQL mutations in
The tutorial assumes the API returns JSON like:
It is also assumes that you want to store the
To follow the steps in this tutorial, you must understand the concept of Users and Database Fields. It is assumed that you have already created the User Profile and API Call Notification in the previous tutorials.
Parsing an API response is a four-step process:
As a first step, create a Property in the user profile. In this example, you will use
Add GraphQL mutation:
app/graphql/store_third_party_api_id.graphql
The mutation you created provides input for the Form called
app/forms/callback_third_party_api_id.liquid
Extend the API Call Notification by adding the proper callback, which executes the mutation with the input received from the third-party API:
app/api_calls/ping_example_com_on_user_sign_up.liquid
Didn't quite find what you are looking for or have feedback on how we can make the content better then we would love to hear from you. Please provide us feedback and we will get back to you shortly.