Fetching a Case
You can use the id returned by the previous example to fetch a case using the following request:
curl -X 'GET' \
  'https://api.digicust.com/generic/api/<YOUR CUSTOMER ID>/<YOUR PROJECT ID>/cases/<YOUR CASE ID>' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer <YOUR ACCESS TOKEN>'var xhr = new XMLHttpRequest();
xhr.open('GET', 'https://api.digicust.com/generic/api/<YOUR CUSTOMER ID>/<YOUR PROJECT ID>/cases/<YOUR CASE ID>');
xhr.setRequestHeader('Authorization', 'Bearer <YOUR ACCESS TOKEN>');
xhr.setRequestHeader('Accept', 'application/json');
xhr.onreadystatechange = function () {
  if (xhr.readyState === 4) {
    console.log(xhr.status);
    console.log(xhr.responseText);
  }
};
xhr.send();
const axios = require('axios');
axios({
  method: 'get',
  url: 'https://api.digicust.com/generic/api/<YOUR CUSTOMER ID>/<YOUR PROJECT ID>/cases/<YOUR CASE ID>',
  headers: {
    'Authorization': 'Bearer <YOUR ACCESS TOKEN>',
    'Accept': 'application/json',
  },
})
.then(function (response) {
  console.log(response.data);
})
.catch(function (error) {
  console.log(error);
});
Imports System.Net
Imports System.IO
Dim request As HttpWebRequest = DirectCast(WebRequest.Create("https://api.digicust.com/generic/api/<YOUR CUSTOMER ID>/<YOUR PROJECT ID>/cases/<YOUR CASE ID>"), HttpWebRequest)
request.Method = "GET"
request.Headers("Authorization") = "Bearer <YOUR ACCESS TOKEN>"
request.Accept = "application/json"
Dim response As HttpWebResponse = DirectCast(request.GetResponse(), HttpWebResponse)
Dim reader As New StreamReader(response.GetResponseStream())
Console.WriteLine(reader.ReadToEnd())import requests
headers = {
    'Authorization': 'Bearer <YOUR ACCESS TOKEN>',
    'Accept': 'application/json',
}
response = requests.get('https://api.digicust.com/generic/api/<YOUR CUSTOMER ID>/<YOUR PROJECT ID>/cases/<YOUR CASE ID>', headers=headers)
print(response.json())
This case will give you among all other case information a status.value. This indicates the processing state of the customs case. A finished customs case will always have status processed.
Last updated
Was this helpful?
