Jobs > Contracts

Mark as ended a confirmed contract

POST mark_as_ended confirmed contract

Endpoint

POST /api/v1/jobs/:job_id/contracts/:id/mark_as_ended

Request

Route

POST /api/v1/jobs/43/contracts/57/mark_as_ended

Headers

Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxNzMiLCJzY3AiOiJ1c2VyIiwiYXVkIjpudWxsLCJpYXQiOjE3NTMyNjYxNzMsImV4cCI6MTc1NTg1ODE3MywianRpIjoiNTI4MTNjN2QtNWZlNS00Mjc4LWI2MmUtMTc4OTkzZWFlMGUzIn0.8fBMaAn8B5WZlGa7OyNFCJ2wnfGF9GwWAaaT5ru302U
Host: example.org
Cookie: 

Body

{
}

Response

Simulated Response

Status

200

Headers

x-frame-options: SAMEORIGIN
x-xss-protection: 0
x-content-type-options: nosniff
x-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
content-type: application/json; charset=utf-8
vary: Accept, Origin
etag: W/"27483c2c3c522f16e8b05e7199ea4ff8"
cache-control: max-age=0, private, must-revalidate
x-request-id: 1552c1a7-ff7a-4b9b-b34e-7cba48641355
x-runtime: 0.011474
content-length: 173

Body

{
  "contract": {
    "id": 57,
    "days_to_expire": -3,
    "end_date": "2025-07-20",
    "job_driver_id": 61,
    "policy_schema": {
      "markable_as_ended": false
    },
    "start_date": "2025-07-16",
    "state": "expired"
  }
}