Getting Started
We allow our customers and partners to fully integrate with our services. The Digicust API is extensive, well-documented, and easy to get started with.
Prerequisites
You have an active customer account
You have a user account with email-password authentication
Your execution strategy is properly set up. An execution strategy defines how customs cases are being processed. You can manage your execution strategies in our web app.
If you do not fulfill the above prerequisites, please create a new account with https://app.digicust.com/
Authentication
You need an access token for all requests. Fetch your access token with the following code:
curl -X 'POST' \
'https://api.digicust.com/generic/api/auth/authenticate' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"username": "<YOUR USERNAME>",
"password": "<YOUR PASSWORD>"
}'const authenticate = async () => {
const data = {
username: '<YOUR USERNAME>',
password: '<YOUR PASSWORD>',
};
try {
const response = await fetch('https://api.digicust.com/generic/api/auth/authenticate', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(data),
});
const jsonData = await response.json();
if (!response.ok) {
throw new Error(jsonData.error || 'Something went wrong');
}
const accessToken = jsonData.access_token;
console.log(accessToken);
// Save accessToken in some variable, or use directly
// ...
} catch (err) {
console.error('Error:', err);
}
};For more details: https://api.digicust.com/generic/api-docs/#/Auth/post_api_auth_authenticate
Documentation
Find detailed documentation on available endpoints here:
Last updated
Was this helpful?