Difference between revisions of "Update the Contact Company Details"
Ashley DeBon (talk | contribs) (Created page with "== Update Contact Company Details == === Base URL === https://apimobile.callproof.com === Endpoint === /api/contacts/{id}/company-details === Purpose === Updates company-le...") |
Ashley DeBon (talk | contribs) (→Successful Response (200)) |
||
| Line 43: | Line 43: | ||
| company_details || string || No || JSON string containing company custom field values to update for the contact | | company_details || string || No || JSON string containing company custom field values to update for the contact | ||
|} | |} | ||
| + | |||
| + | === cURL Example for Android === | ||
| + | <pre> | ||
| + | curl --location --request PUT 'https://apimobile.callproof.com/api/contacts/{id}/company-details' \ | ||
| + | --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ | ||
| + | --form 'parent_company_name=YOUR_PARENT_COMPANY_NAME' | ||
| + | </pre> | ||
| + | === cURL Example for iOS === | ||
| + | <pre> | ||
| + | curl --location --request PUT 'https://apimobile.callproof.com/api/contacts/{id}/company-details' \ | ||
| + | --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ | ||
| + | --form 'parent_company_name=YOUR_PARENT_COMPANY_NAME' | ||
| + | </pre> | ||
=== Successful Response (200) === | === Successful Response (200) === | ||
Latest revision as of 08:34, 17 July 2026
Contents
Update Contact Company Details
Base URL
https://apimobile.callproof.com
Endpoint
/api/contacts/{id}/company-details
Purpose
Updates company-level details for a specific contact. This includes the parent company name and company-related custom field values, so account company information can be maintained from the contact profile.
HTTP Method
PUT
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer access token |
Security
- Yes – Requires Bearer Token authentication.
Parameters
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string / integer | Yes | Unique identifier of the contact whose company details are being updated |
Query Parameters
None.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| parent_company_name | string | No | Parent company name to save on the contact |
| company_details | string | No | JSON string containing company custom field values to update for the contact |
cURL Example for Android
curl --location --request PUT 'https://apimobile.callproof.com/api/contacts/{id}/company-details' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--form 'parent_company_name=YOUR_PARENT_COMPANY_NAME'
cURL Example for iOS
curl --location --request PUT 'https://apimobile.callproof.com/api/contacts/{id}/company-details' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--form 'parent_company_name=YOUR_PARENT_COMPANY_NAME'
Successful Response (200)
Indicates that the contact’s company details were updated successfully.
| Field | Type | Description |
|---|---|---|
| clientStatusCode | integer | Status indicator for the client (for example, 200) |
| user_id | integer | Identifier of the authenticated user |
| company_id | integer | Identifier of the authenticated user’s company |
| message | string | Confirmation message (for example, "Account Company Details Updated Successfully") |
| uri | string | Requested resource URI |
Error Responses
| Status Code | Meaning |
|---|---|
| 400 | Bad Request – company details could not be updated successfully |
| 401 | Unauthorized – missing, invalid, or expired Bearer token |
- 400 – An error occurred while updating the parent company name or company custom field values (for example, "Error While Updating Account Company Details").
- 401 – Authentication failed or the access token is missing/expired.