If you encounter any issues configuring the embedded shopping experience, we’re here to help! Please reach out to your onboarding specialist for assistance.
Getting started
Requirements
To set up the embedded shopping experience, you will need:- An API Key (Instructions on how to get one available in Getting started with API Keys)
- A list of live clinic IDs
- A backend server to handle authentication requests
- Your mobile app to integrate the WebView or iFrame
API overview
The integration requires two API calls:- Generate an auto-authentication token for a client using this API.
- Create a Client and Patient (only if the client does not exist in our system).
API flow
1
Step 1: Request an Auto-Authentication Token
To authenticate a client, make a POST request to the Or, using a phone number:If the request is successful, you can skip Step 2 and proceed to Step 3.
/ext/v2/accounts/auto-auth/ endpoint.Request payload
You must provide aclinic_id (Clinic ID of the associated Clinic) and either client_email or client_phone_number. If both are available, we recommend using client_phone_number.Successful response
If the request is valid, the API will return an authentication token and relevant URLs.Error responses
- 401 Unauthorized: Invalid API token. Verify the token and header format.
-
400 Bad Request: Invalid JSON payload or validation errors.
-
404 Not Found: No client exists for the provided details. Proceed to Step 2 to create a Client and Patient.
2
Creating a Client and Patient
If Step 1 resulted in a 404 Not Found, you must create a Client and Patient in our system before retrying authentication.Make a POST request to the
/ext/v2/clinic-clients/ endpoint.Request payload
Successful response
Once you receive a 201 Created response, return to Step 1 and request an authentication token using the newly created Client’s email or phone number.3
Step 3: Using the Auto-Authentication Token
🚧 Ensure you received an auth token before proceeding! If Step 1 failed, check your payload or return to Step 2 to create a Client and Patient.Once you receive a successful response, take the
embed_url and return it in your API response for the WebView or iFrame integration.Implementing in React Native
Backend integration
Before implementing the WebView, you’ll need to create a backend API endpoint that handles the authentication flow described in Steps 1 and 2. This endpoint should:- Accept client information from your mobile app
- Make the POST request to
/ext/v2/accounts/auto-auth/with your API key - Handle the 404 response by creating a new client if needed (Step 2)
- Return the
embed_urlto your mobile app
https://api.your-backend.com/vetcove-auth that implements this logic. Replace API_URL in the example with your actual backend endpoint URL.