> For the complete documentation index, see [llms.txt](https://guide.digicust.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.digicust.com/developer-api/fetching-a-case.md).

# Fetching a Case

You can use the `id` returned by the previous example to fetch a case using the following request:

{% tabs %}
{% tab title="CURL" %}

```bash
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>'
```

{% endtab %}

{% tab title="JavaScript (native)" %}

```javascript
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();

```

{% endtab %}

{% tab title="JavaScript (axios)" %}

```javascript
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);
});

```

{% endtab %}

{% tab title="Visual Basic.NET" %}

```visual-basic
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())
```

{% endtab %}

{% tab title="Python" %}

```python
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())

```

{% endtab %}
{% endtabs %}

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`.
