Deals
Deals in the sales pipeline, with value in cents and the stage they are in.
Deals in the sales pipeline, with value in cents and the stage they are in.
List deals
GET /deals
| Scope | Package | Idempotency-Key |
|---|---|---|
deals:read | Scale (API) | not used |
updated_since must be an ISO date-time; otherwise 400 invalid_request with field updated_since.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | 1 to 100. Default 25. |
offset | query | integer | Default 0. |
stage | query | string | |
contact_id | query | string | Contact id (e:…, p:…, m:…). |
updated_since | query | string (date-time) | ISO moment; only records changed at or after it. |
Request
curl "https://hevia.app/api/v1/deals?updated_since=2026-11-01T00:00:00Z" \
-H "Authorization: Bearer $HEVIA_KEY"Response
200 OK.
JSON
{
"data": [
{
"id": "3f1c2a9e-5b7d-4e21-9c0a-6d8e2f4b1a70",
"title": "Website relaunch",
"value_cents": 480000,
"currency": "EUR",
"stage": "proposal",
"contact_id": "e:anna@example.com",
"company_id": "3f1c2a9e-5b7d-4e21-9c0a-6d8e2f4b1a70",
"expected_close": "2026-12-15",
"created_at": "2026-11-10T09:30:00.000Z",
"updated_at": "2026-11-10T09:30:00.000Z",
"closed_at": "2026-11-10T09:30:00.000Z"
}
],
"pagination": {
"limit": 25,
"offset": 0,
"total": 1,
"next_offset": null
}
}Fields of Deal:
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
title | string | |
value_cents | integer | |
currency | string | |
stage | string | |
contact_id | string | null | |
company_id | string | null | |
expected_close | string | null | |
created_at | string (date-time) | |
updated_at | string (date-time) | |
closed_at | string | null |
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | Invalid request |
| 401 | unauthorized | Missing or invalid key |
| 403 | insufficient_scope | The key or token does not have the scope of the endpoint. |
| 403 | plan_required | The business's package does not include the API (Scale) or the feature of the endpoint. |
| 429 | rate_limited | Rate limit (120 requests per minute and key); see the RateLimit-* headers |
One deal
GET /deals/{id}
| Scope | Package | Idempotency-Key |
|---|---|---|
deals:read | Scale (API) | not used |
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string (uuid) | Id |
Request
curl "https://hevia.app/api/v1/deals/3f1c2a9e-5b7d-4e21-9c0a-6d8e2f4b1a70" \
-H "Authorization: Bearer $HEVIA_KEY"Response
200 OK.
JSON
{
"data": {
"id": "3f1c2a9e-5b7d-4e21-9c0a-6d8e2f4b1a70",
"title": "Website relaunch",
"value_cents": 480000,
"currency": "EUR",
"stage": "proposal",
"contact_id": "e:anna@example.com",
"company_id": "3f1c2a9e-5b7d-4e21-9c0a-6d8e2f4b1a70",
"expected_close": "2026-12-15",
"created_at": "2026-11-10T09:30:00.000Z",
"updated_at": "2026-11-10T09:30:00.000Z",
"closed_at": "2026-11-10T09:30:00.000Z"
}
}Fields of Deal:
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
title | string | |
value_cents | integer | |
currency | string | |
stage | string | |
contact_id | string | null | |
company_id | string | null | |
expected_close | string | null | |
created_at | string (date-time) | |
updated_at | string (date-time) | |
closed_at | string | null |
Errors
| Status | Code | When |
|---|---|---|
| 401 | unauthorized | Missing or invalid key |
| 403 | insufficient_scope | The key or token does not have the scope of the endpoint. |
| 403 | plan_required | The business's package does not include the API (Scale) or the feature of the endpoint. |
| 404 | not_found | Not found |
| 429 | rate_limited | Rate limit (120 requests per minute and key); see the RateLimit-* headers |
Create a deal
POST /deals
| Scope | Package | Idempotency-Key |
|---|---|---|
deals:write | Scale (API) | honoured |
value_cents is a whole number from 0 to 1 000 000 000 000. Without stage the deal starts in the first open stage of the pipeline.
Request body
JSON object DealInput.
| Field | Type | Description |
|---|---|---|
title (required) | string | |
value_cents | integer | |
currency | string | |
stage | string | Stage id of the pipeline; default: the first open stage. |
contact_id | string | |
company_id | string (uuid) | |
expected_close | string (date) | |
note | string |
Request
curl -X POST "https://hevia.app/api/v1/deals" \
-H "Authorization: Bearer $HEVIA_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"title":"Website relaunch","value_cents":480000,"currency":"EUR","contact_id":"e:anna@example.com"}'Response
200 Updated or replayed, 201 Created.
JSON
{
"data": {
"id": "3f1c2a9e-5b7d-4e21-9c0a-6d8e2f4b1a70",
"title": "Website relaunch",
"value_cents": 480000,
"currency": "EUR",
"stage": "proposal",
"contact_id": "e:anna@example.com",
"company_id": "3f1c2a9e-5b7d-4e21-9c0a-6d8e2f4b1a70",
"expected_close": "2026-12-15",
"created_at": "2026-11-10T09:30:00.000Z",
"updated_at": "2026-11-10T09:30:00.000Z",
"closed_at": "2026-11-10T09:30:00.000Z"
},
"created": true
}Fields of Deal:
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
title | string | |
value_cents | integer | |
currency | string | |
stage | string | |
contact_id | string | null | |
company_id | string | null | |
expected_close | string | null | |
created_at | string (date-time) | |
updated_at | string (date-time) | |
closed_at | string | null |
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | Invalid request |
| 401 | unauthorized | Missing or invalid key |
| 403 | insufficient_scope | The key or token does not have the scope of the endpoint. |
| 403 | plan_required | The business's package does not include the API (Scale) or the feature of the endpoint. |
| 409 | conflict | Idempotency-Key conflict (same key, different request, or still running) |
| 413 | payload_too_large | Body too large |
| 422 | invalid_request | Invalid body |
| 429 | rate_limited | Rate limit (120 requests per minute and key); see the RateLimit-* headers |