This section outlines basic details of Fize API endpoints and connection. It includes information about parameters required by the API's to yield a response. It also outlines basic definitions of the response codes with respect to HTTP request and the policy data.
API Endpoint List
Fize API endpoints are listed below.
API | Description |
---|---|
/policies/status | API to fetch the status of the policy request. It gives status per request. |
/policies | API endpoint to return data of policies for a policy request made from the client side. |
/policies/basic | API endpoint to return a list of policies with the structure of the basic policy in policies. |
/policies/holder | API endpoint to return a list of policies with the structure of the policy holder in policies. |
/policies/documents | API endpoint to return a list of policies with the structure of the policy documents in policies. |
/policies/discount | API endpoint to list all the discounts applied for the policy |
/policies/detail | API endpoint to return policy-details section for a policy record |
Connection ID
For each request of the policy data, a unique key is assigned to represent the whole data across the Fize domains. It is 16 characters in length and needs to be included within the HTTP request made to an endpoint. Within the request, this is defined as connection_id
.
Connection Credentials
Fize platform is multi-tenant platform that acquire the policy data. To retrieve the policy data for further consumption, Fize requires the information of the client with which the data is acquired. Each client is identified on the basis of 2 parameters for each endpoint request.
For the sync APIs, these are part of the HTTP Request Body and the Authorization key names for the Sync API Endpoints are:
client_id
client_secret_key
Similarly for the Incremental API endpoints, these are part of the request header with following names:
Fz-Client-Id
Fz-Client-Secret-Key
The Client ID's "
Fz-Client-Id
/client_id
" and Secret Keys "Fz-Client-Secret-Key
/client_secret_key
" will be provided during onboarding with Fize.
Fz-Client-Id
/client_id
andFz-Client-Secret-Key
/client_secret_key
ensures that a clients are authorised to use the Fize REST API.
The
Fz-Client-Secret-Key
will be hosted on your backend service and be treated as a password. It should not to be shared with unauthorised parties.
Common Status Code
These status codes will come in response to the Policy APIs' response.
Code | HTTP Code | Possible Reason |
---|---|---|
INVALID_REQUEST | 400 | - Invalid connection_Id provided.- If the data send in headers or body is not proper. |
INVALID_AUTH | 401 | Invalid Fz-Client-Id or Fz-Client-Secret-Key provided in the header. In this case please check your client details. |
NOT_AUTHORIZED_CLIENT | 401 | Not authorized to access the data for this connection_id. |
INVALID_CONNECTION_ID | 400 | Invalid connection_Id provided. |
LOGIN_IN_PROGRESS | 202 | Fize system's data acquiring process is in progress and currently the specified client is validating account credentials. |
LOGIN_FAILED | 400 | Request is not processed due to a login failure by an incorrect credential. |
INTERNAL_SERVER_ERROR | 500 | Something went wrong while processing the API request. |
Status Code for Async Pulling
Policy Status is used to show the status of async pulling for policy requests.
Code | HTTP Code | Description |
---|---|---|
IN_QUEUE | 202 | Data request will process soon. |
IN_PROGRESS | 202 | Data request is in process and will be ready soon to consume. |
PARTIALLY_COMPLETED | 200 | Data request is partially completed. Acquired data can be fetched if this status is received. |
COMPLETED | 200 | Data request is completed. Complete data for the respective section is available and ready to consume. |
NOT_SUBSCRIBED | 400 | Data for this section was not requested. |
NOT_AVAILABLE | 400 | Data is not available for that section. |
FAILED | 500 | Data Request failed. |