Skip to main content

Prerequisites

Before you begin, make sure you have:
1

Account & Credentials

Contact [email protected] to request access. Credentials and API keys are provided after contract signing.
2

Organization Setup

Ensure you’re part of an organization with active groups
3

Service Access

Verify your group has access to verification services

Your First API Call

Let’s start by checking the API health:
curl https://api.anycheck.id/health
Response:
{
  "status": "healthy",
  "timestamp": "2024-01-15T10:30:00Z"
}

Basic Workflow

Step 1: Authenticate

Login to get your JWT token:
curl -X POST https://api.anycheck.id/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "password": "your_password"
  }'
Response:
{
  "success": true,
  "data": {
    "access_token": "eyJhbGc...",
    "refresh_token": "eyJhbGc...",
    "user": {
      "id": "user-uuid",
      "email": "[email protected]"
    }
  }
}
Save the access token for subsequent requests.

Step 2: Get Your Groups

Retrieve groups you have access to:
curl https://api.anycheck.id/profile \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
This returns your user profile including assigned groups.

Step 3: Get Available Services

Check which verification services are available to your group:
curl https://api.anycheck.id/services \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response:
{
  "success": true,
  "data": [
    {
      "id": "service-uuid-1",
      "name": "KTP Verification",
      "category": "Identity",
      "description": "Verify Indonesian national ID cards"
    },
    {
      "id": "service-uuid-2",
      "name": "BPKB Verification",
      "category": "Assets",
      "description": "Verify vehicle registration documents"
    }
  ]
}

Step 4: Create a Folder

Organize verifications in folders:
curl -X POST https://api.anycheck.id/folders \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "January 2024 Verifications",
    "group_id": "group-uuid"
  }'
Response:
{
  "success": true,
  "data": {
    "id": "folder-uuid",
    "name": "January 2024 Verifications",
    "group_id": "group-uuid",
    "created_at": "2024-01-15T10:30:00Z"
  }
}

Step 5: Create a Verification

Submit a document for verification:
curl -X POST https://api.anycheck.id/verifications \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "service_id": "service-uuid-1",
    "folder_id": "folder-uuid",
    "configuration": {
      "nik": "1234567890123456",
      "name": "John Doe",
      "birth_date": "1990-01-01"
    }
  }'
Response:
{
  "success": true,
  "data": {
    "id": "verification-uuid",
    "status": "IN_PROGRESS",
    "service": {
      "id": "service-uuid-1",
      "name": "KTP Verification"
    },
    "folder_id": "folder-uuid",
    "created_at": "2024-01-15T10:30:00Z"
  }
}

Step 6: Check Verification Status

Poll the verification status:
curl https://api.anycheck.id/verifications/verification-uuid \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response when complete:
{
  "success": true,
  "data": {
    "id": "verification-uuid",
    "status": "COMPLETED",
    "service": {
      "id": "service-uuid-1",
      "name": "KTP Verification"
    },
    "output": {
      "verified": true,
      "match_score": 0.95,
      "data": {
        "nik": "1234567890123456",
        "name": "JOHN DOE",
        "birth_date": "1990-01-01",
        "address": "Jakarta"
      }
    },
    "execution_time": 5.2,
    "completed_at": "2024-01-15T10:30:15Z"
  }
}

Using Webhooks

For async notifications, provide a webhook URL:
curl -X POST https://api.anycheck.id/verifications \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "service_id": "service-uuid-1",
    "folder_id": "folder-uuid",
    "configuration": {
      "nik": "1234567890123456"
    },
    "webhook_url": "https://your-app.com/webhook",
    "webhook_metadata": {
      "customer_id": "cust-123",
      "request_id": "req-456"
    }
  }'
Your webhook will receive:
{
  "verification_id": "verification-uuid",
  "status": "COMPLETED",
  "metadata": {
    "customer_id": "cust-123",
    "request_id": "req-456"
  },
  "output": {
    "verified": true,
    "match_score": 0.95
  }
}

Working with Drafts

Save verifications as drafts before submitting:

Create a Draft

curl -X POST https://api.anycheck.id/verifications/drafts \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "service_id": "service-uuid-1",
    "folder_id": "folder-uuid",
    "configuration": {
      "nik": "1234567890123456"
    }
  }'

Submit Draft for Verification

curl -X POST https://api.anycheck.id/verifications/drafts/draft-uuid/verify \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Error Handling

Handle common errors gracefully:
{
  "success": false,
  "error": {
    "code": "INVALID_CREDENTIALS",
    "message": "Email or password is incorrect"
  }
}
Solution: Verify credentials or refresh token.
{
  "success": false,
  "error": {
    "code": "INSUFFICIENT_CREDITS",
    "message": "Not enough credits to perform verification"
  }
}
Solution: Top up credits or contact admin.
{
  "success": false,
  "error": {
    "code": "SERVICE_UNAVAILABLE",
    "message": "Verification service is temporarily unavailable"
  }
}
Solution: Retry later or use draft mode.

Best Practices

Use Folders

Organize verifications by project or customer for easy management

Implement Webhooks

Use webhooks instead of polling for better efficiency

Handle Retries

Implement retry logic for failed verifications

Monitor Credits

Track credit usage to avoid service interruptions

Next Steps