Getting started

Welcome to APSIS Pro REST API documentation. This page is created so you can maximise the usage of APSIS Pro API and easily customise your integrations with our digital marketing solutions. Our technology is compatible with most of the well-known CRM platforms, as well as multiple CMS and third-party solutions, which means that this is an opportunity for you to set up your integrated environment according to your own preferences. The APSIS Pro REST API enables you to read and write data programmatically as well as to initiate many of the APSIS Pro functions.

Getting access to the REST API

In order to create API keys, your APSIS Pro account needs to be configured to get access to the REST API. If you want to place an order for the API or if you have any questions regarding access, please contact us at supportasia@efficy.com or +852 5804 3550.

Authentication

In order to authenticate to our REST API you need an API key. To generate your API key, please follow the following steps:
1. Log in to your APSIS account
2. Go to "Account tab" on the top of the page
3. Click on "Integrations"
4. Click "Generate" in the API key section. Do not use spaces or special characters when naming the API Key

Please note that it might take up to 5 minutes for the API key to be activated and used.

Using an API Key

When you connect to APSIS Pro Rest API, we recommend that you send the authentication in the HTTP Header base64 encoded, as illustrated in the curl example:

apiKeyID='Your API key'  \
base64EncodedApiKey=$(echo -n "$apiKeyID" | base64) \
auth="basic $base64EncodedApiKey" \

curl -I \
-H 'Content-type: application/json' \
-H 'Accept: application/json' \
-X GET \
-H 'Authorization: $auth' \
https://se.apidoc.anpasia.com:8443/v1/filter/all


Example: If the API key is "abc123" the Base64 encoded string would look like this: "Authorization: Basic YWJjMTIzOg=="

APSIS Pro REST API also allows HTTP basic authentication where the username is set to the API key and the password is empty.

Example: If the API key is "abc123" the HTTP URL would look like this: http://API_KEY:@API_METHOD_URL where "API_KEY" is your key and API_METHOD_URL is the URL to the API method you are calling. There is no password used for HTTP Basic authentication, so ensure that there is no spacing between the colon : and the at sign @.


Example: A call with the API key "abc123" to the CreateMailingList method looks like this: http://abc123:@se.apidoc.anpasia.com/v1/mailinglists/

Please note: Body and URL parameters could be case sensitive.

Code and HTTP Status Code

The "code" in the API response contains a status of how the API request went. In addition to the code in the content, the HTTP Status Code is also set to reflect the status of the request. These are the codes and HTTP Status Codes the APSIS API will return:

State Code Description
1 200 OK - successful API request
-1 500 Internal Server Error - there was an issue with the API server. Contact APSIS support with the request details to get this resolved.
-2 400 Validation Error - One or more parameters in the request are invalid.
-3 404 Not Found - the URL is incorrect and no API method is found to deal with the request.
-4 401 Unauthorized - lack of access rights to perform the API request, for example using an invalid API key.
-5 503 Busy - the API server is currently not available.
-6 503 API Disabled - the API service is temporarily offline for maintenance and is not available at the moment.
-7 503 Bad Request - the request is badly formatted
-8 405 Method not allowed - the API method is not allowed for the given request.
-9 429 Rate Limit - Too many requests.


It is best practice to be able to handle all these response codes.

Message

The message is a status description in text form and contains more than the code. If you should encounter an error, this message is helpful when debugging the issue.

Security

It is highly recommended that the usage of the API is limited to HTTPS only. Using HTTPS will ensure that all the API communication is SSL encrypted. Not using HTTPS means that your API calls and your API key could potentially be stolen and misused. For the same reason it is important to keep the API keys secure and to change them if you suspect any leak of a key. The API uses port 443 for SSL encrypted traffic, and the HTTPS URL is https://se.api.anpasia.com:443/

Support

Contact supportasia@efficy.com for any questions related to the APSIS REST API. When contacting support its always good to have customer name, prepare a detailed description of the problem and, if possible, attach logs. This makes it easier to get proper support and quickly fix the issue.