Skip to content

Link an upstream item to this item

POST
/api/v1/items/{itemId}/relationships/upstream
curl --request POST \
--url https://app.avera.io/api/v1/items/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/relationships/upstream \
--header 'Content-Type: application/json' \
--data '{ "relationshipTypeId": "example", "upstreamItemId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'

The path item becomes the downstream endpoint. Creation routes through the typed change seam, which enforces the relationship type’s allowed pairs and the downstream owner’s state gate. Endpoints are canonical ids, so the link survives item versioning untouched.

itemId
required
string format: uuid
Media typeapplication/json
object
relationshipTypeId
required
string
upstreamItemId
required
string format: uuid

Example generated

{
"relationshipTypeId": "example",
"upstreamItemId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

OK

Media type*/*
object
id
required
string format: uuid
relationshipTypeId
required
string
upstreamItemId
required
string format: uuid
downstreamItemId
required
string format: uuid
suspect
required
boolean
suspectReason
string | null
createdAt
required
string format: date-time
createdBy
required
string format: uuid
position
integer | null format: int64