These docs are for a deprecated API version. Visit here to refer the latest API docs.
We have two different categories of APIs - Merchant API and Subscriber Portal API. You can follow the below steps to get started with each type:
Merchant APIs
Token generation
You can generate merchant API tokens by visiting Loop Admin Portal > Settings > Manage API tokens > Generate new token > Fill in appropriate name > Select required scopes with permission > Generate
You can create multiple merchant API tokens with different scopes. The generated tokens can be managed from the Manage API tokens tab.
Consider these tokens as your password and don't share it with anyone. Usually, these are to be stored on the backend. An outsider with these tokens can take any action on your subscriptions permissible under its scope.
Authorization
Merchant API actions are authorized by the scopes provided while generating the token.
Making your first Merchant API call
You can hit any of the APIs except those listed under "Subscriber Portal” with the generated token, but you can start with Read customer details by email. It will fetch all the relevant customer details like first_name, last_name, customer_shopify_id etc. For testing purposes, you can provide your email to verify it quickly.
Are you still facing any issues?
In everyday scenarios, a Merchant API call will be successful if the merchant token is correct and the required scopes are given for the token. If this doesn't solve, please contact [email protected].
Subscriber Portal APIs
Token generation
Subscriber Portal API token for a specific customer can be generated in two different ways:
- Backend is available
OR - Headless systems
Backend is available
- Use generate token Merchant API
Headless systems
- Use send login link to customer identified by email Subscriber Portal API
- This API sends a notification with the token
- Merchant customizes this notification to redirect the customer to the custom headless portal along with the token
Authorization
Subscriber portal API actions are authorized by "Preferences" set in the "Customer portal" section of Loop admin, i.e. you will be able to reschedule an order only if you had enabled it in "Preferences" and post that hit the necessary API.
Making your first Customer API call
You can hit any of the "Subscriber Portal” APIs with the generated token, but you can start with read subscriptions API. It will send a Loop subscription portal login link to the given email. For testing purposes, you can provide your email to verify it quickly.
Are you still facing any issue?
Please feel free to contact [email protected]