> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agribackup.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Check TRACES NT Credential Delegation Status

> Verify that your stored TRACES NT credentials are valid and the connection to the EU TRACES NT SOAP API is active and ready for DDS submission.

Before triggering a Due Diligence Statement submission, you can proactively verify that AgriBackup's delegation to TRACES NT is healthy. This endpoint retrieves the stored credential from HashiCorp Vault, decrypts it in-memory using the Transit Engine, and executes a live connection test against the TRACES NT SOAP API — returning the result immediately. Use this endpoint during onboarding, after rotating your TRACES NT credentials, or to diagnose DDS submission failures.

**`GET /api/v1/enterprise/eudr/credentials/traces/status`**

## Request Parameters

This endpoint requires no request body and accepts no query parameters. Authentication is performed via your enterprise API key.

## Code Examples

<CodeGroup>
  ```python Python theme={null}
  import agribackup
  from agribackup.rest import ApiException

  configuration = agribackup.Configuration(host="https://live.agribackup.com/api/v1")
  configuration.api_key["ApiKeyAuth"] = "sk_live_YOUR_API_KEY"

  with agribackup.ApiClient(configuration) as api_client:
      try:
          api_instance = agribackup.EnterpriseCredentialsApi(api_client)
          response = api_instance.get_traces_credentials_status()
          print(f"Valid: {response.valid}, Message: {response.message}")
      except ApiException as e:
          print("Exception when calling API: %s\n" % e)
  ```

  ```javascript Node.js theme={null}
  import { AgriBackupClient } from "@agribackup/sdk";

  const client = new AgriBackupClient({
    apiKey: "sk_live_YOUR_API_KEY",
    baseUrl: "https://live.agribackup.com/api/v1",
  });

  async function checkDelegationStatus() {
    try {
      const response = await client.credentials.getTracesCredentialsStatus();
      console.log(`Valid: ${response.valid}, Message: ${response.message}`);
    } catch (error) {
      console.error(error);
    }
  }

  checkDelegationStatus();
  ```

  ```bash cURL theme={null}
  curl --request GET \
    --url https://live.agribackup.com/api/v1/enterprise/eudr/credentials/traces/status \
    --header "Authorization: Bearer sk_live_YOUR_API_KEY"
  ```
</CodeGroup>

## Response

A `200 OK` response is returned regardless of whether the delegation check passes or fails — use the `valid` field to determine the actual connection state. A `false` value with an explanatory `message` indicates you should re-ingest your credentials or contact your TRACES NT account administrator.

```json theme={null}
{
  "valid": true,
  "message": "Connected to TRACES NT SOAP API",
  "username": "eudr_enterprise_user",
  "lastVerified": "2026-06-19T12:00:00Z"
}
```

<ResponseField name="valid" type="boolean">
  `true` if the stored credentials successfully authenticated against the TRACES NT SOAP API; `false` if the connection test failed (for example, due to an expired token, incorrect password, or account suspension).
</ResponseField>

<ResponseField name="message" type="string">
  A human-readable status or error message returned by the TRACES NT client during the connection test. On success this is typically `"Connected to TRACES NT SOAP API"`. On failure it will contain the SOAP fault or authentication error detail.
</ResponseField>

<ResponseField name="username" type="string | null">
  The TRACES NT username associated with the stored credentials, if one was provided at ingestion time. Returns `null` if a token-only credential was ingested without a `username`.
</ResponseField>

<ResponseField name="lastVerified" type="string (ISO 8601)">
  The UTC timestamp of the most recent connection validation check, formatted as an ISO 8601 date-time string. This reflects when this specific status check was executed.
</ResponseField>

## Error Responses

| HTTP Status             | Error Code     | Description                                                                                                                                                                                |
| ----------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `401 Unauthorized`      | `UNAUTHORIZED` | The `Authorization` header is absent or the bearer token is not recognised.                                                                                                                |
| `403 Forbidden`         | `FORBIDDEN`    | Your API key does not have the required scope to read credential delegation status.                                                                                                        |
| `404 Not Found`         | `NOT_FOUND`    | No TRACES NT credentials have been ingested for this organization yet. Call the [Ingest Credentials](/sdks/enterprise-credentials/ingest-traces-nt-credentials-into-vault) endpoint first. |
| `429 Too Many Requests` | `RATE_LIMITED` | You have exceeded the hourly rate limit. Check `X-RateLimit-Reset` for your reset time.                                                                                                    |

```json theme={null}
{
  "code": "NOT_FOUND",
  "message": "No TRACES NT credentials found for this organization",
  "details": []
}
```
