Skip to content

Relate an existing record to an Entity

POST https://api.prosperworks.com/developer_api/v1/{{entity}}/{{entity_id}}/related

Please note that when relating records this way, both records have to exist in the system already.

Request body

1
2
3
4
5
6
{
  "resource": {
    "id": 2827700,
    "type": "opportunity"
  }
}

Example Requests

Relate Opportunity to Person

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
curl --location --request POST "https://api.prosperworks.com/developer_api/v1/people/{{example_person_id}}/related" \
  --header "X-PW-AccessToken: YOUR_TOKEN_HERE" \
  --header "X-PW-Application: developer_api" \
  --header "X-PW-UserEmail: YOUR_EMAIL_HERE" \
  --header "Content-Type: application/json" \
  --data "{
    \"resource\": {
        \"id\": 2827700,
        \"type\": \"opportunity\"
    }
}"
1
2
3
4
5
6
7
{
  "added": true,
  "resource": {
    "id": 2827700,
    "type": "opportunity"
  }
}