SubscriptionFlow API Use
This document covers the basics & how-to for SubscriptionFlow REST API.
1. Web service architecture
We use RESTful web services for SubscriptionFlow API with standard JSON responses.
2. Authentication / Authorization
For API authorization, we use the predominant type of access token used with OAuth 2.0 called Bearer Token. But the question is how to get the bearer token to interact with our API. Please go through the link attached and follow up steps to get the OAuth Client ID.
3. Now, you have to obtain the bearer token by using the client_id & client_secret.
Endpoint to get token: https://{you-instance-name}.subscriptionflow.com/oauth/token
Request type: POST
Request body params: client_id, client_secret, grant_type
You will find client_id & client_secret from instance and grant_type is always “client_credentials”
For example:
Post Request in Postman
4. Using API endpoints
All available endpoints are usually available in API documentation which can be found at;
https://{instance-name}.subscriptionflow.com/api/documentation
{instance-name} will be replaced by your account name. For example https://demo.subscriptionflow.com/api/documentation
Let's quickly see how to make a simple request for fetching a list of all customers
All API Endpoints except /oauth/token are prefixed by /API/v1
Endpoint: https://{instance}.subscriptionflow.com/api/v1/customers
Please note: Don’t forget to send your bearer token in headers for authorization
Post Request in Postman
Sending GET requests to the above endpoint will return the customer list.
Post Request in Postman
You can use /api/v1/{module}/filter endpoint to filter out records by applying multiple operations and much more. All endpoint details can be found in the API documentation, which is available at:
https://{instance-name}.subscriptionflow.com/api/documentation
Alternatively, you can utilize the demo account documentation for swift reference, as it doesn't require any login.
https://demo.subscriptionflow.com/api/documentation
Comments
0 comments
Please sign in to leave a comment.