Skip to main content
PUT
Update a publisher-writer agreement
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

PUT /publisher-writer/agreements/ Description: Partial update inside a DB transaction. If territories is supplied, it is validated and checked for conflicts against the publisher/writer pair’s OTHER active agreements (excluding this one) — a conflict rolls back and returns 400. publisherId/ writerId are not reassignable through this endpoint (they are not read from the body by the service layer’s update path). Authorization:
  • Required role: admin or higher
Method: PUT

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

Partial update — any subset of AgreementCreateRequest's fields (excluding publisherId/writerId, which are immutable via this endpoint).

name
string
description
string
territories
object[]
contractNumber
string
contractDate
string<date-time>
startDate
string<date-time>
endDate
string<date-time>
status
enum<string>
Available options:
draft,
pending,
active,
expired,
terminated
isActive
boolean

Response

Agreement 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>