Canonical diligence examples
Use the generated examples below as your migration rehearsal path, then move your app logic onto the downloaded starter files or your own typed client wrapper.
#!/usr/bin/env bash
set -euo pipefail
API_BASE_URL="${API_BASE_URL:-https://api.dutyclaims.com}"
TOKEN="${TOKEN:-dcp_live_replace_me}"
CSV_PATH="${CSV_PATH:-./sample-entries.csv}"
curl -X POST "${API_BASE_URL}/v1/diligence/submit" \
-H "Authorization: Bearer ${TOKEN}" \
-F "seller_name=Acme Imports" \
-F "requires_protest_documentation=false" \
-F "file=@${CSV_PATH};type=text/csv"
#!/usr/bin/env bash
set -euo pipefail
API_BASE_URL="${API_BASE_URL:-https://api.dutyclaims.com}"
TOKEN="${TOKEN:-dcp_live_replace_me}"
JOB_ID="${JOB_ID:-00000000-0000-4000-8000-000000000000}"
curl "${API_BASE_URL}/v1/diligence/status/${JOB_ID}" \
-H "Authorization: Bearer ${TOKEN}" \
-H "Accept: application/json"
#!/usr/bin/env bash
set -euo pipefail
API_BASE_URL="${API_BASE_URL:-https://api.dutyclaims.com}"
TOKEN="${TOKEN:-dcp_live_replace_me}"
JOB_ID="${JOB_ID:-00000000-0000-4000-8000-000000000000}"
curl -X POST "${API_BASE_URL}/v1/diligence/jobs/${JOB_ID}/resume" \
-H "Authorization: Bearer ${TOKEN}" \
-H "Accept: application/json"