Aller au contenu

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.

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://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.

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.

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.

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.

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"

Nous utilisons des cookies et des analyses respectueuses de la vie privée

Nous utilisons des cookies essentiels pour l'authentification et des analyses respectueuses de la vie privée (auto-hébergées, respectent Do Not Track). Aucun suivi publicitaire ou tiers. En savoir plus dans notre Politique de confidentialité