Quickstart: Create Your First Case
This quickstart guide will walk you through creating your first debt collection case using the Debitura Customer API. You'll learn the essential steps to submit a case and verify it was created successfully.
Prerequisites
Before you begin, ensure you have:
- Your API credentials (API key and secret)
- A development environment capable of making HTTP requests
- Basic information about the debtor and debt
Step 1: Authenticate
First, you need to authenticate with the API to obtain an access token.
Endpoint: POST /api/auth/token
POST /api/auth/token
Content-Type: application/json
{
"apiKey": "your-api-key",
"apiSecret": "your-api-secret"
}
Response:
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresIn": 3600
}
Step 2: Prepare Case Data
Gather the required information for your case:
- Debtor information (name, address, contact details)
- Debt details (amount, invoice number, due date)
- Your internal reference number
- Case priority and preferences
Example case data:
{
"debtorName": "Example Company ApS",
"debtorCvr": "12345678",
"debtorEmail": "contact@example.com",
"debtorPhone": "+4512345678",
"debtorAddress": {
"street": "Example Street 123",
"postalCode": "2100",
"city": "Copenhagen",
"country": "DK"
},
"principalAmount": 15000.00,
"currency": "DKK",
"invoiceNumber": "INV-2024-001",
"dueDate": "2024-01-15",
"referenceNumber": "YOUR-REF-123"
}
Step 3: Create the Case
Make a POST request to the cases endpoint with your prepared data.
Endpoint: POST /api/cases
POST /api/cases
Authorization: Bearer your-access-token
Content-Type: application/json
{
"debtorName": "Example Company ApS",
"debtorCvr": "12345678",
// ... rest of case data
}
Response:
{
"caseId": "550e8400-e29b-41d4-a716-446655440000",
"caseNumber": "DEB-2024-12345",
"status": "Created",
"createdAt": "2024-01-02T10:30:00Z",
"referenceNumber": "YOUR-REF-123"
}
Step 4: Verify Case Creation
You can verify your case was created by querying the case details:
Endpoint: GET /api/cases/{caseId}
GET /api/cases/550e8400-e29b-41d4-a716-446655440000
Authorization: Bearer your-access-token
Response:
{
"caseId": "550e8400-e29b-41d4-a716-446655440000",
"caseNumber": "DEB-2024-12345",
"status": "Created",
"debtorName": "Example Company ApS",
"principalAmount": 15000.00,
"createdAt": "2024-01-02T10:30:00Z"
// ... additional case details
}
What's Next?
Congratulations! You've created your first case. Now you can:
- Set up webhooks to receive real-time updates
- Track case status throughout the collection process
- Explore the complete workflow for case creation
- Review integration examples for your platform
Common Issues
If you encounter issues, check:
- Your API credentials are correct and active
- All required fields are provided
- Date formats are in ISO 8601 format
- Currency codes are valid (ISO 4217)
- CVR numbers are valid for Danish companies
For more help, see our Troubleshooting Guide.
Need to handle multiple cases? Check out our batch creation workflow in the Integration Examples.