AccessLink Documentation
Url
You can login and access the DeliSky ordering system with the following URL:
https://hub.delisky.com/access-link/order-catering?{query}
Query Parameters
All parameters have to be url encoded.
Authentication/Identification
In order to authenticate we need the following parameters:
- apiKey
-
string
required
Your API key - reference
-
string
required
An identifier for the order (yet to be made), unique in your system - authToken
-
string
required
Authentication token, see instructions on how to generate it below
Airport filtering
The airport for which the caterers will be displayed is defined by either ICAO or IATA code:
- icao
-
string
icao or iata is required
ICAO code - iata
-
string
iata or icao is required
IATA code
Order properties
The following parameters are all optional. Use them to set order details upfront.
- contactName
-
string
optional
Name of responsible contact - contactPhone
-
string
optional
Phone of responsible contact - contactEmail
-
string
optional
Email of responsible contact - handling
-
string
optional
The handler's name - deliveryDateTime
-
string
optional
format: yyyy-MM-ddTHH:mm
Delivery Date/Time (UTC) - flightTime
-
string
optional
format: hh:mm
Expected duration of flight - typeOfFlight
-
string
optional
"international" or "domestic"
Type of Flight - faOnBoard
-
bool
optional
Specifies if a flight attendant is on board - numOfPax
-
int
optional
Estimated number of passengers - acRegistration
-
string
optional
Aircraft registration - flightNumber
-
string
optional
Flight number - oven
-
string
optional
"Oven", "Microwave" or "Oven, Microwave"
Heating equipment
Groups
- group
-
string
optional
Group name
It is possible to assign an order to a specific group. Groups can be used to customize webhook URLs. Manage your groups in the @Html.ActionLink("Developer Dashboard", "Index", new { controller = "Home", area = "Dev" } ).
Example:
| Group name | Webhook URL |
|---|---|
| default | https://webhooks.delisky.com |
| test | https://test.webhooks.delisky.com |
Authentication token
The auth token contains a timestamp and expires after 10 minutes.
Note for existing integrations: tokens previously signed over
[username]:[useragent]:[timestamp] are still accepted by our
validator during a migration window. New integrations should use the simpler
formula below; the User-Agent variant will be removed once all known partners
have migrated.
How to generate the auth token
-
We need the following elements to generate the auth token:
- user name identify the user on our system
- user key used as key for the hashing
- timestamp (unix timestamp; seconds since 1970-01-01 00:00:00 UTC) make the token temporary
- Concat user name and timestamp using the colon as separator. [username]:[timestamp]
- Generate a SHA256 hash (HMAC variant) of the above, using the user key as key
- Convert the hash to a base64 string and concat user name and timestamp separated by colons. ([hash]:[username]:[timestamp])
- Convert the whole thing to a base64 string.
JavaScript Example
// Sample Data:
// var userName = "SampleUser";
// var userKey = "c4d6cafe6cf341dffe8af44e9eae5c5af01b920397422a05304597ce1dd6aa32";
// var timeStamp = 1483667814;
function generateToken(userName, userKey, timeStamp) {
var message = [userName, timeStamp].join(":");
// message = "SampleUser:1483667814"
var hash = CryptoJS.HmacSHA256(message, userKey);
var hashLeft = CryptoJS.enc.Base64.stringify(hash);
// hashLeft = "MCoeAI23jCEj8H+yG+fWCTwINbjYaeA8QSs2SgOCBS8="
var hashRight = userName + ":" + timeStamp;
// hashRight = "SampleUser:1483667814"
var token = CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(hashLeft + ":" + hashRight));
// token = "TUNvZUFJMjNqQ0VqOEgreUcrZldDVHdJTmJqWWFlQThRU3MyU2dPQ0JTOD06U2FtcGxlVXNlcjoxNDgzNjY3ODE0"
return token;
}
C# Example
// Sample Data:
// var userName = "SampleUser";
// var userKey = "c4d6cafe6cf341dffe8af44e9eae5c5af01b920397422a05304597ce1dd6aa32";
// var timeStamp = 1483667814;
public string GenerateToken(string userName, string userKey, long timeStamp)
{
var message = string.Join(":", userName, timeStamp);
// message = "SampleUser:1483667814"
var hashLeft = "";
var hashRight = "";
using (HMAC hmac = new HMACSHA256(Encoding.UTF8.GetBytes(userKey)))
{
hmac.ComputeHash(Encoding.UTF8.GetBytes(message));
hashLeft = Convert.ToBase64String(hmac.Hash);
// hashLeft = "MCoeAI23jCEj8H+yG+fWCTwINbjYaeA8QSs2SgOCBS8="
hashRight = string.Join(":", new string[] { userName, timeStamp.ToString() });
// hashRight = "SampleUser:1483667814"
}
var token = Convert.ToBase64String(Encoding.UTF8.GetBytes(string.Join(":", hashLeft, hashRight)));
// token = "TUNvZUFJMjNqQ0VqOEgreUcrZldDVHdJTmJqWWFlQThRU3MyU2dPQ0JTOD06U2FtcGxlVXNlcjoxNDgzNjY3ODE0"
return token;
}