Skip to main content
POST
/
v1
/
claims
Create a claim
curl --request POST \
  --url https://api.done.app/v1/claims \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "schema_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "contract": {
    "price": 123,
    "activity_window": 123,
    "review_window": 123,
    "fulfillment_condition": {
      "event": "<string>",
      "match": {},
      "field": "<string>",
      "gt": 123,
      "gte": 123,
      "lt": 123,
      "lte": 123,
      "eq": 123
    },
    "timeout_outcome": "confirm"
  },
  "status": "OPEN",
  "status_since": "2023-11-07T05:31:56Z",
  "scheduled_outcome": "CONFIRMED"
}

Authorizations

Authorization
string
header
required

API token. Create one from the dashboard.

Body

application/json
schema_id
string<uuid>
required

ID of the schema to create the claim from.

customer_id
string<uuid>
required

ID of the customer this claim belongs to.

Response

Claim created

id
string<uuid>
required
user_id
string<uuid>
required
customer_id
string<uuid>
required

The customer this claim belongs to.

contract
object
required

The terms of a claim. Immutable once a claim is created.

status
enum<string>
required
Available options:
OPEN,
PENDING,
CONFIRMED,
FAILED
status_since
string<date-time>
required

When the claim entered its current status.

scheduled_outcome
enum<string> | null
required

Set when claim enters PENDING. Null while OPEN.

Available options:
CONFIRMED,
FAILED