Aller au contenu
Sur cette page

Contact

Customer contact management

Display a listing of contacts

GET /api/v1/contacts

Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.

Portée du jeton API : contacts.view

Paramètres

Nom Emplacement Type Requis Description
customer_id query integer non
search query string non
sort query string non
page query integer non
per_page query integer non

Réponses

Statut Description
200 For non-paginated data, return as before
422

Exemple de requête

curl -X GET "https://kworia.com/api/v1/contacts" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "X-Organization-Id: {{organization_id}}" \
  -H "Accept: application/json"

Store a newly created contact

POST /api/v1/contacts

Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.

Portée du jeton API : contacts.create

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://kworia.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"
}'

Display the specified contact

GET /api/v1/contacts/{id}

Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.

Portée du jeton API : contacts.view

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://kworia.com/api/v1/contacts/{id}" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "X-Organization-Id: {{organization_id}}" \
  -H "Accept: application/json"

Update the specified contact

PUT /api/v1/contacts/{id}

Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.

Portée du jeton API : contacts.update

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://kworia.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"
}'

Remove the specified contact

DELETE /api/v1/contacts/{id}

Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.

Portée du jeton API : contacts.delete

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://kworia.com/api/v1/contacts/{id}" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "X-Organization-Id: {{organization_id}}" \
  -H "Accept: application/json"