Create a publisher-writer agreement
POST /publisher-writer/agreements
Description
POST /publisher-writer/agreements Description: Creates a new agreement inside a DB transaction. Verifies the publisher and writer both exist for the tenant, validatesterritories (if supplied) against CISAC rules, and checks for
territory conflicts against any of this publisher/writer pair’s
other currently-active agreements — a conflicting territory rolls
back the transaction and returns 400. Defaults status to
draft and isActive to true when not supplied. The response
object does NOT include the nested publisher/writer relations
(those only get attached on scoped reads, not on the raw
.create() result).
Authorization:
- Required role:
adminor higher
Code Examples
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Body
Must reference an existing Publisher on this tenant.
Must reference an existing CWRWriter on this tenant.
Required by the model (allowNull:false); omitting it fails Sequelize validation.
Validated against CISAC territory rules, and checked for conflicts against this publisher/writer pair's other ACTIVE agreements.
draft, pending, active, expired, terminated Response
Agreement created
draft, pending, active, expired, terminated Only present when the record was loaded via the model's default scope (all reads; NOT present on the POST /agreements create response).
Only present when the record was loaded via the model's default scope (all reads; NOT present on the POST /agreements create response).