Contact
Customer contact management
GET /api/v1/contacts
Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.
Paramètres#
| Nom |
Emplacement |
Type |
Requis |
Description |
customer_id |
query |
string |
non |
|
search |
query |
string |
non |
|
per_page |
query |
string |
non |
|
Réponses#
| Statut |
Description |
| 200 |
For non-paginated data, return as before |
Exemple de requête#
curl -X GET "https://app.encryptinvoice.com/api/v1/contacts" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json"
POST /api/v1/contacts
Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.
Corps de la requête#
| Champ |
Type |
Requis |
Description |
customer_id |
integer |
oui |
|
name |
string |
oui |
|
email |
string |
non |
|
phone |
string |
non |
|
position |
string |
non |
|
is_primary |
boolean |
non |
|
notes |
string |
non |
|
Réponses#
| Statut |
Description |
| 201 |
For non-paginated data, return as before |
| 422 |
|
| 403 |
|
Exemple de requête#
curl -X POST "https://app.encryptinvoice.com/api/v1/contacts" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"customer_id": 1,
"name": "string",
"email": "string",
"phone": "string",
"position": "string",
"is_primary": true,
"notes": "string"
}'
GET /api/v1/contacts/{id}
Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.
Paramètres#
| Nom |
Emplacement |
Type |
Requis |
Description |
id |
path |
integer |
oui |
|
Réponses#
| Statut |
Description |
| 200 |
For non-paginated data, return as before |
Exemple de requête#
curl -X GET "https://app.encryptinvoice.com/api/v1/contacts/{id}" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json"
PUT /api/v1/contacts/{id}
Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.
Paramètres#
| Nom |
Emplacement |
Type |
Requis |
Description |
id |
path |
integer |
oui |
|
Corps de la requête#
| Champ |
Type |
Requis |
Description |
customer_id |
integer |
non |
|
name |
string |
non |
|
email |
string |
non |
|
phone |
string |
non |
|
position |
string |
non |
|
is_primary |
boolean |
non |
|
notes |
string |
non |
|
Réponses#
| Statut |
Description |
| 200 |
For non-paginated data, return as before |
| 422 |
|
| 403 |
|
Exemple de requête#
curl -X PUT "https://app.encryptinvoice.com/api/v1/contacts/{id}" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"customer_id": 1,
"name": "string",
"email": "string",
"phone": "string",
"position": "string",
"is_primary": true,
"notes": "string"
}'
DELETE /api/v1/contacts/{id}
Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.
Paramètres#
| Nom |
Emplacement |
Type |
Requis |
Description |
id |
path |
integer |
oui |
|
Réponses#
| Statut |
Description |
| 200 |
For non-paginated data, return as before |
Exemple de requête#
curl -X DELETE "https://app.encryptinvoice.com/api/v1/contacts/{id}" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json"