A request for a credits available check can be carried out over http by means of different query string variables.
Endpoint: https://121prodata.co.uk/api/credits/
Method: GET
Various options need to be submitted by way of GET variables appended to the URL above.
These options are discussed in more detail below.
This is an encrypted token assigned to your account specifically. This is required to validate your request. It is important that you keep this confidential.
It will look something like the following: a6759ab14f79cbf159r803b4a4x3aa45
Once your account is enabled for API access you will be able to see this information within your account area. You will also have the facility to reset your API token should you need to.
We currently offer three forms of output: JSON, XML and plain text.
This will produce output as follows:
{"credits":"100000"}
This will produce output as follows:
<?xml version="1.0" encoding="UTF-8"?> <result> <credits>100000</status> </result>
This will produce output as follows:
100000
Please note: we recommend a 2 second delay between API calls.
Every response will be accompanied by a header. All header output will be plain text with an HTTP response code.
200: This is a good response and means everything went OK. The output will be in the format you requested.
400: This is an error response. The error detail will be specified in the plain text output. The following is a table of expected error messages.
HTTP Code | Message | Explanation |
---|---|---|
400 | no API method specified | This means no POST or GET variables were found. |
400 | https required | You have submitted a request via standard http. All requests must be made over https. |
400 | token required | The token has not been found within your request. Please ensure you include a "token" argument. |
400 | system in maintenance mode | The system is currently synchronising it's TPS/CTPS lists and is out of action until complete. Please try again in approximately 30 minutes. |
400 | failed to validate token | Your token was invalid. It was not found in our system. Please ensure its accuracy. |
These are non-working examples to explain the URL structure.