curl --request POST \
--url https://api.affinity.co/v2/companies/{companyId}/fields/{fieldId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"value": {
"type": "company",
"data": {
"id": 1
}
}
}
'
{
"errors": [
{
"code": "bad-request",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "authorization",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "not-found",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "authentication",
"message": "<string>"
}
]
}Companies
Update a single field value on a Company
Update a single field value on a company.
POST
/
v2
/
companies
/
{companyId}
/
fields
/
{fieldId}
curl --request POST \
--url https://api.affinity.co/v2/companies/{companyId}/fields/{fieldId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"value": {
"type": "company",
"data": {
"id": 1
}
}
}
'
{
"errors": [
{
"code": "bad-request",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "authorization",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "not-found",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "authentication",
"message": "<string>"
}
]
}Authorizations
A static Affinity API key, presented as a bearer token.
Path Parameters
Company ID
Required range:
1 <= x <= 9007199254740991Field ID
Examples:
"affinity-data-location"
"field-1234"
Body
application/json
- CompaniesValueUpdate
- CompanyValueUpdate
- DateValue
- DropdownValueUpdate
- DropdownsValueUpdate
- FloatValue
- FloatsValue
- LocationValue
- LocationsValue
- PersonValueUpdate
- PersonsValueUpdate
- RankedDropdownValueUpdate
- TextValue
- TextsValue
Show child attributes
Show child attributes
Example:
{ "type": "company-multi", "data": [{ "id": 1 }, { "id": 2 }] }
Response
No Content
Was this page helpful?