Introduction
The Starfish API gives access to the most important information within the Starfish platform, allowing clients to synchronise account and prescription information between Starfish and their own PMS or eCommerce system; create new accounts and upload prescriptions to help customers purchase prescription items online.
The platform also generates events which can be subscribed to using webhooks and the API will send your application as much or as little detail required to process the event in the client system.
GraphQL
As a GraphQL API it has several advantages over Rest APIs in that you can fetch as much or as little information as you need from the API. Some familiarity with GraphQL is recommended, and we provide some examples of common interactions, for example Paging or creating account holders.
We also provide a Postman collection that includes some example queries for you to test our API with. For this to work you will need to provide your API token and the endpoint for the API. You can acquire both of these by following the steps below.
Endpoint
The API is available to both EU and US clients
For EU clients:
https://<your client subdomain>.indigoshoprx.co.uk/graphql/v1
For US clients:
https://<your client subdomain>.indigoshoprx.com/graphql/v1
In non-production environments, there is also an interactive GraphiQL installation that you can use to make requests to the API from the web browser:
https://<your client subdomain>.demo.indigolighthouseomnichannel.com/graphiql
Authentication
To use API you need an api user. You can create one in control panel (Control panel -> Staff users -> API users). Take a note of an API token when user is created - you'll need to add it to the Authorization header when making requests to the API:
Authorization: Bearer <token>
Authorization
Some queries and mutations are restricted to certain API level access based on your contract length with Starfish. You will find the following note when it's the case: Requires advanced API access level. Please contact your company's contract manager to discuss your requirements.