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

Description

DELETE /publisher-writer/agreements//territories/ Description: Removes the entry matching territoryCode from the agreement’s territories array inside a DB transaction. 404s if no territory with that code exists on the agreement. Authorization:
  • Required role: admin or higher
Method: DELETE

Code Examples

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string<uuid>
required
territoryCode
string
required

Response

Territory removed; 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>