Link a downstream item to this item
POST
/api/v1/items/{itemId}/relationships/downstream
const url = 'https://app.avera.io/api/v1/items/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/relationships/downstream';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"relationshipTypeId":"example","downstreamItemId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.avera.io/api/v1/items/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/relationships/downstream \ --header 'Content-Type: application/json' \ --data '{ "relationshipTypeId": "example", "downstreamItemId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'The path item becomes the upstream endpoint. Otherwise identical to the upstream form: the typed change seam enforces the relationship type’s allowed pairs and the downstream owner’s state gate.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”itemId
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
relationshipTypeId
required
string
downstreamItemId
required
string format: uuid
Example generated
{ "relationshipTypeId": "example", "downstreamItemId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “Responses”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