Authentication

Most API calls require the caller to be authenticated before any action takes place. The caller only needs to be authenticated once during any set a API calls. A caller's authentication token is valid for 1 hour, after which the authentication process must be repeated.

The following methods are available for all services. Replace <..service...> with your desired service.

Note: Most services requires authentication. Please read the information below before using other services.

Authenticate

http://ws.adido.org.uk/<...service..>/Authenticate

The Authenticate method is available with all services.

Parameters

Name Type Description Example
Username String API Username provided by Adido username
APIKey String API Key provided by Adido KEY-KEY-KEY-KEY-KEY

Response

Name Type Description Example
AuthenticateResponse String A session key, valid for 1 hour, which must be appended with your Private Key provided by Adido and MD5 encrypted (e.g MD5 = Session Key + Private Key). The result should then be sent back with each subsequent API call. XXX-XXX-XXX-XXX-XXX

Example

VB

Dim orders As New AdidoOrders.Orders
Dim sessionKey As String = orders.Authenticate("username", "KEY-KEY-KEY-KEY-KEY")
Dim key = GetMD5(sessionKey + privatekey)

C#

AdidoOrders.Orders orders = new AdidoOrders.Orders();
string sessionKey = orders.Authenticate("username", "KEY-KEY-KEY-KEY-KEY");
string key = GetMD5(sessionKey + privatekey);

PHP

$wsdl="http://ws.adido.org.uk/orders.asmx?wsdl";
$client=new soapclient($wsdl, 'wsdl');
$param=array('Username'=>'username', 'APIKey'=>'XXX-XXX-XXX-XXX-XXX');
echo $client->call('Authenticate', $param);

HTTP GET

http://ws.adido.org.uk/orders.asmx/Authenticate?Username=username&APIKey=XXX-XXX-XXX-XXX-XXX

IsAuthenticated

http://ws.adido.org.uk/<...service..>/IsAuthenticated

Indicates if the private key returned by Authenticate is still valid.

  • If true then the caller can continue to access the API without an authentication error.
  • If false then the caller should call Authenticate again to get a new private key.

Parameters

Name Type Description Example
Key String Private key, previously returned by Authenticate XXX-XXX-XXX-XXX-XXX

Response

Name Type Description Example
IsAuthenticatedResponse Boolean True = Authenticated, False = Not Authenticated true

Example

Dim IsAuthenticated as Boolean = orders.IsAuthenticated("XXX-XXX-XXX-XXX-XXX")

Example

VB

Dim orders As New AdidoOrders.Orders
Dim IsAuthenticated as Boolean = orders.IsAuthenticated("XXX-XXX-XXX-XXX-XXX")

C#

AdidoOrders.Orders orders = new AdidoOrders.Orders();
bool IsAuthenticated = orders.IsAuthenticated("XXX-XXX-XXX-XXX-XXX");

PHP

$wsdl="http://ws.adido.org.uk/orders.asmx?wsdl";
$client=new soapclient($wsdl, 'wsdl');
$param=array('Key'=>'XXX-XXX-XXX-XXX-XXX');
echo $client->call('IsAuthenticated', $param);

HTTP GET

http://ws.adido.org.uk/orders.asmx/IsAuthenticated?Key=XXX-XXX-XXX-XXX-XXX