Skip to main content
POST
Add a territory to an agreement
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

POST /publisher-writer/agreements//territories Description: Appends a single territory to the agreement’s territories array inside a DB transaction. Rejects (400) if territoryCode is missing, if a territory with the same territoryCode already exists on this agreement, or if the new territory conflicts with one on any of this publisher/writer pair’s OTHER active agreements. Authorization:
  • Required role: admin or higher
Method: POST

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
territoryCode
string
required

CISAC TIS territory code, or a formula (e.g. "2136 BUT NOT 2250"). WW = worldwide.

Example:

"WW"

inclusionExclusion
enum<string>
required
Available options:
I,
E
prShare
number
required
Required range: 0 <= x <= 100
mrShare
number
required
Required range: 0 <= x <= 100
srShare
number
required
Required range: 0 <= x <= 100
startDate
string<date-time>
endDate
string<date-time> | null

Response

Territory added; full updated agreement returned

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>