Summary
This document details how to connect to the Argos Web API.
The following document describes:
- The parties
- The prerequisites for connecting to the Argos
Web API.
- Authenticating with the Argos Web API
- The available API specifications
Available APIs
A list of available APIs can be found
hereIntended Audience
The intended audience for
this document are developers or technical personnel wishing to connect to the
Argos Web API. A level of familiarity with programming, REST and web technology
is assumed
The Parties
Argos Financial Systems
Provides the Web API software, and technical support
The Argos Client
Owns the data and provides hosting for the web API software
Third Party Developer
Anyone wishing to connect and make requests to the web API
operated by the Argos Client
Document Conversions
Code
Any code examples (URLs, etc) will be presented in a fixed width font
User Supplied Data
User supplied data within a code example (ids, etc) will be
presented in italic fixed width font and surrounded
by curly braces, e.g. {id}.
Prerequisites
Authorisation
Authenticated requests are made with a username and
password. This should be set up for each user of the third-party application
that will connect to the web API. The Argos Client is responsible for setup and
maintenance of the external users.
Each session must be authorised using an external username
and password.
These will be setup and maintained by the Argos Client.
Authenticating will return a token for use in the other
requests. This token will expire 24 hours after creation
Sample Request
curl
-X POST -H "Content-Type: application/x-www-form-urlencoded" -d
'grant_type=password&username=<user>&password=<password>' "
https://api.argos.co.nz/WebApi/token"
Sample Response
{
"access_token": "<token-string>",
"token_type": "bearer",
"expires_in": 86399
}
Making a Request
Each request must be authenticated. The content of the
request should be in JSON format.
Content type
The request will require a content type header in the format
Content-Type:
application/json
Authorisation Token
The request will require an authorisation header in the
format
Bearer
<token-string>
Where <token-string> is the token obtained from the
authorisation request.
The API uses a REST format. Each request corresponds to a
separate URL.
Responses are in JSON format.
Response Codes
Standard REST HTTP response codes are used. A code of 200
indicates the request was processed. Note: a response code of 200 does not mean
the request succeeded, only that is was processed.