Introduction

API Authorization

An access token is used to authorize API. For each API call, an access token should be added to the HTTP header of the request like this:

authorization: access_token 1234567890abcdef

Get Started

Obtaining an access token

API key and secret can be generated for each ArcSite company. Go to Settings - Integrations - Apps to get them. The API Key and Secret will be automatically generated when the connection to Salesforce or I360 is successful. You can find them in the App Card of Salesforce or I360.

Untitled

IMPORTANT NOTE: Customers should store the key and secret safely.

Steps to get access token:

  1. Compose a string with the “api key” + “secret” + “current time” .
  2. Generate a signature of the string with the md5 method.
  3. Post to server url “/extapi/get_access_token/” to get the access token.

Unsersdanding API response

All API calls will return JSON with both a code and a data property. Exceptions to this will be specified in the documentation.

You should always attempt to JSON decode the response, then use the code property to determine if the API call succeeded. code for a successful API call would always be 0.

{
  "code": 0,
  "data": {...}
}

The data property of errors will include a message and a code to help you determine what went wrong. Non-zero error codes should never change so you can rely on them to make programming flow choices if necessary.