Contracts
Service contracts and subscription agreements.
Endpoints
GET /obapi/v1/contracts-- listGET /obapi/v1/contracts/{id}-- single with linesGET /obapi/v1/download/{id}?type=contract-- PDF
Parameters
page, per_page, status, sort
Status values
| Value | Description |
|---|---|
draft |
Draft contract |
validated |
Active / validated |
closed |
Closed / terminated |
Response (list)
{
"items": [
{
"id": "30",
"ref": "CT2405-0002",
"customer_ref": "SLA-2024-01",
"date_contract": "2024-01-01",
"status": "validated"
}
],
"pagination": { "..." }
}
Response (single)
{
"contract": {
"id": "30",
"ref": "CT2405-0002",
"customer_ref": "SLA-2024-01",
"supplier_ref": "",
"date_contract": "2024-01-01",
"created_at": "2023-12-15T10:00:00Z",
"updated_at": "2024-01-01T09:00:00Z",
"status": "validated",
"public_note": "",
"lines": [
{
"id": "55",
"position": 1,
"product_ref": "MAINT-GOLD",
"product_label": "Gold maintenance plan",
"description": "Annual maintenance contract",
"quantity": "12.00",
"unit_price_excl_tax": "500.00",
"vat_rate": "20.000",
"total_excl_tax": "6000.00",
"total_vat": "1200.00",
"total_incl_tax": "7200.00",
"date_start_planned": "2024-01-01",
"date_start_real": "2024-01-01",
"date_end_planned": "2024-12-31",
"date_end_real": null,
"status": "active"
}
]
}
}
Contract line statuses
| Value | Description |
|---|---|
inactive |
Service not yet started |
active |
Service running |
closed |
Service ended |
Download PDF
GET /obapi/v1/download/{id}?type=contract