Difference between revisions of "Update Business Card details"
Ashley DeBon (talk | contribs) (Created page with "== Update Business Card == === Base URL === https://apimobile.callproof.com === Endpoint === /api/edit-business-cards/{id} === Purpose === Updates an existing business card...") |
Ashley DeBon (talk | contribs) (→Successful Response (200)) |
||
| Line 61: | Line 61: | ||
| business_card_image || file || No || New front image for the business card | | business_card_image || file || No || New front image for the business card | ||
|} | |} | ||
| + | |||
| + | === cURL Example for Android === | ||
| + | <pre> | ||
| + | curl --location --request POST 'https://apimobile.callproof.com/api/edit-business-cards/{id}' \ | ||
| + | --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ | ||
| + | --form 'first_name=YOUR_FIRST_NAME' | ||
| + | </pre> | ||
| + | === cURL Example for iOS === | ||
| + | <pre> | ||
| + | curl --location --request POST 'https://apimobile.callproof.com/api/edit-business-cards/{id}' \ | ||
| + | --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ | ||
| + | --form 'first_name=YOUR_FIRST_NAME' | ||
| + | </pre> | ||
=== Successful Response (200) === | === Successful Response (200) === | ||
Latest revision as of 13:59, 17 July 2026
Contents
Update Business Card
Base URL
https://apimobile.callproof.com
Endpoint
/api/edit-business-cards/{id}
Purpose
Updates an existing business card’s details for the authenticated user. Optionally replaces the front image. If a new email is provided, it must not already belong to another of the user’s business cards.
HTTP Method
POST
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer access token |
| Content-Type | Conditional | Use multipart/form-data when uploading a new image
|
Security
- Yes – Requires Bearer Token authentication.
Parameters
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | Unique identifier of the business card to update |
Query Parameters
None.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| first_name | string | No | Updated first name |
| last_name | string | No | Updated last name |
| title | string | No | Updated job title |
| company_name | string | No | Updated company name |
| address | string | No | Updated address (maximum 255 characters) |
| website | string | No | Updated website |
| string | No | Updated email (must be a valid email format; must not already exist on another card for the same user, unless it is unchanged) | |
| phone_number | string | No | Updated phone number (digits only; 7–15 characters when provided) |
| notes | string | No | Updated notes |
| business_card_image | file | No | New front image for the business card |
cURL Example for Android
curl --location --request POST 'https://apimobile.callproof.com/api/edit-business-cards/{id}' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--form 'first_name=YOUR_FIRST_NAME'
cURL Example for iOS
curl --location --request POST 'https://apimobile.callproof.com/api/edit-business-cards/{id}' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--form 'first_name=YOUR_FIRST_NAME'
Successful Response (200)
Indicates that the business card was 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, "The Business card details updated successfully.") |
| uri | string | Requested resource URI |
Error Responses
| Status Code | Meaning |
|---|---|
| 200 | Validation failed – response body uses clientStatusCode 401 with the first validation error message
|
| 400 | Bad Request – the business card could not be updated |
| 401 | Unauthorized – missing, invalid, or expired Bearer token |
- Validation (HTTP 200, clientStatusCode 401) – Invalid email, invalid phone number, or address longer than 255 characters.
- 400 – Email already exists ("Email already exists"), or another update error (for example, "Error while updating the business card details").
- 401 – Authentication failed or the access token is missing/expired.