Skip to main content
PATCH
Update an agreement's status
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

PATCH /publisher-writer/agreements//status Description: Sets status on the agreement. status must be one of the AgreementStatus enum values or the request is rejected with 400 before any transaction is opened. Does not otherwise validate a state-machine transition (e.g. terminatedactive is allowed). Authorization:
  • Required role: admin or higher
Method: PATCH

Code Examples

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Path Parameters

id
string<uuid>
required

Body

application/json
status
enum<string>
required
Available options:
draft,
pending,
active,
expired,
terminated

Response

Status updated

id
string<uuid>
tenantId
integer
publisherId
string<uuid>
writerId
string<uuid>
name
string
description
string | null
territories
object[]
contractNumber
string | null
contractDate
string<date-time> | null
startDate
string<date-time> | null
endDate
string<date-time> | null
status
enum<string>
Available options:
draft,
pending,
active,
expired,
terminated
isActive
boolean
default:true
publisher
object

Only present when the record was loaded via the model's default scope (all reads; NOT present on the POST /agreements create response).

writer
object

Only present when the record was loaded via the model's default scope (all reads; NOT present on the POST /agreements create response).

createdAt
string<date-time>
updatedAt
string<date-time>