Client
Client - Ajouter un nouveau client
POST votredomaine.com/api/customers
Header
json
Champ |
Type |
Description |
Authorization |
String |
Jeton d'authentification d'accès de base. |
Paramètre
json
Champ |
Type |
Description |
company |
String |
Entreprise cliente obligatoire. |
vat (facultatif) |
String |
TVA en option. |
phonenumber (facultatif) |
String |
Téléphone client facultatif. |
website (facultatif) |
String |
Site Web client facultatif. |
groups_in (facultatif) |
Number[] |
Groupes de clients facultatifs. |
default_language (facultatif) |
String |
Langue facultative par défaut du client. |
default_currency (facultatif) |
String |
Devise par défaut facultative. |
address (facultatif) |
String |
Adresse du client facultative. |
city (facultatif) |
String |
Ville du client facultative. |
state (facultatif) |
String |
État client facultatif. |
zip (facultatif) |
String |
Code postal facultatif. |
partnership_type (facultatif) |
String |
Facultatif Type de partenariat client. |
country (facultatif) |
String |
Pays facultatif. |
billing_street (facultatif) |
String |
Adresse de facturation facultative : Rue. |
billing_city (facultatif) |
String |
Adresse de facturation facultative : ville. |
billing_state (facultatif) |
Number |
Adresse de facturation facultative : État. |
billing_zip (facultatif) |
String |
Adresse de facturation facultative : Code postal. |
billing_country (facultatif) |
String |
Adresse de facturation facultative : pays. |
shipping_street (facultatif) |
String |
Adresse de livraison facultative : Rue. |
shipping_city (facultatif) |
String |
Adresse de livraison facultative : Ville. |
shipping_state (facultatif) |
String |
Adresse de livraison facultative : État. |
shipping_zip (facultatif) |
String |
Adresse de livraison facultative : Zip. |
shipping_country (facultatif) |
String |
Adresse de livraison facultative : pays. |
Succès 200
json
Champ |
Type |
Description |
status |
booléen |
État de la demande. |
message |
String |
Client ajouté avec succès. |
Erreur 4xx
json
Nom |
Type |
Description |
status |
booléen |
État de la demande. |
message |
String |
Échec de l'ajout du client. |
-
Réponse réussie
HTTP/1.1 200 OK{ "status": true, "message": "Customer add successful."}
-
Réponse d’erreur
HTTP/1.1 404 Not Found{ "status": false, "message": "Customer add fail."}
Client - Supprimer un client
SUPPRIMER votredomaine.com/api/delete/customers/:id
Header
json
Champ |
Type |
Description |
Authorization |
String |
Jeton d'authentification d'accès de base. |
Paramètre
json
Champ |
Type |
Description |
identifiant |
Number |
Identifiant unique du client. |
Succès 200
json
Champ |
Type |
Description |
status |
String |
État de la demande. |
message |
String |
Client supprimé avec succès. |
Erreur 4xx
json
Nom |
Type |
Description |
status |
booléen |
État de la demande. |
message |
String |
Échec de la suppression du client. |
-
Réponse réussie
HTTP/1.1 200 OK{ "status": true, "message": "Customer Delete Successful."}
-
Réponse d’erreur
HTTP/1.1 404 Not Found{ "status": false, "message": "Customer Delete Fail."}
Client - Demander des informations sur le client
GET yourdomain.com/api/customers/:id
Header
json
Champ |
Type |
Description |
Authorization |
String |
Jeton d'authentification d'accès de base. |
Paramètre
json
Champ |
Type |
Description |
identifiant |
Number |
identifiant unique du client. |
Succès 200
json
Champ |
Type |
Description |
client |
Objet |
information. |
Erreur 4xx
json
Nom |
Type |
Description |
status |
booléen |
État de la demande. |
message |
String |
Aucune donnée n'a été trouvée. |
-
Réponse réussie
HTTP/1.1 200 OK
{
"id": "28",
"name": "Test1",
"description": null,
"status": "1",
"clientid": "11",
"billing_type": "3",
"start_date": "2019-04-19",
"deadline": "2019-08-30",
"customer_created": "2019-07-16",
"date_finished": null,
"progress": "0",
"progress_from_tasks": "1",
"customer_cost": "0.00",
"customer_rate_per_hour": "0.00",
"estimated_hours": "0.00",
"addedfrom": "5",
"rel_type": "customer",
"potential_revenue": "0.00",
"potential_margin": "0.00",
"external": "E",
...
}
-
Réponse d’erreur
HTTP/1.1 404 Not Found{ "status": false, "message": "No data were found"}
Client - Rechercher des informations sur le client
OBTENEZ votredomaine.com/api/customers/search/:keysearch
Header
json
Champ |
Type |
Description |
Authorization |
String |
Jeton d'authentification d'accès de base. |
Paramètre
json
Champ |
Type |
Description |
keysearch |
String |
Rechercher des mots-clés. |
Succès 200
json
Champ |
Type |
Description |
client |
Objet |
information. |
Erreur 4xx
json
Nom |
Type |
Description |
status |
booléen |
État de la demande. |
message |
String |
Aucune donnée n'a été trouvée. |
-
Réponse réussie
HTTP/1.1 200 OK
{
"id": "28",
"name": "Test1",
"description": null,
"status": "1",
"clientid": "11",
"billing_type": "3",
"start_date": "2019-04-19",
"deadline": "2019-08-30",
"customer_created": "2019-07-16",
"date_finished": null,
"progress": "0",
"progress_from_tasks": "1",
"customer_cost": "0.00",
"customer_rate_per_hour": "0.00",
"estimated_hours": "0.00",
"addedfrom": "5",
"rel_type": "customer",
"potential_revenue": "0.00",
"potential_margin": "0.00",
"external": "E",
...
}
-
Réponse d’erreur
HTTP/1.1 404 Not Found{ "status": false, "message": "No data were found"}
Client - Mettre à jour un client
PUT votredomaine.com/api/customers/:id
Header
json
Champ |
Type |
Description |
Authorization |
String |
Jeton d'authentification d'accès de base. |
Paramètre
json
Champ |
Type |
Description |
company |
String |
Entreprise cliente obligatoire. |
vat (facultatif) |
String |
TVA en option. |
phonenumber (facultatif) |
String |
Téléphone client facultatif. |
website (facultatif) |
String |
Site Web client facultatif. |
groups_in (facultatif) |
Number[] |
Groupes de clients facultatifs. |
default_language (facultatif) |
String |
Langue facultative par défaut du client. |
default_currency (facultatif) |
String |
Devise par défaut facultative. |
address (facultatif) |
String |
Adresse du client facultative. |
city (facultatif) |
String |
Ville du client facultative. |
state (facultatif) |
String |
État client facultatif. |
zip (facultatif) |
String |
Code postal facultatif. |
country (facultatif) |
String |
Pays facultatif. |
billing_street (facultatif) |
String |
Adresse de facturation facultative : Rue. |
billing_city (facultatif) |
String |
Adresse de facturation facultative : ville. |
billing_state (facultatif) |
Number |
Adresse de facturation facultative : État. |
billing_zip (facultatif) |
String |
Adresse de facturation facultative : Code postal. |
billing_country (facultatif) |
String |
Adresse de facturation facultative : pays. |
shipping_street (facultatif) |
String |
Adresse de livraison facultative : Rue. |
shipping_city (facultatif) |
String |
Adresse de livraison facultative : Ville. |
shipping_state (facultatif) |
String |
Adresse de livraison facultative : État. |
shipping_zip (facultatif) |
String |
Adresse de livraison facultative : Zip. |
shipping_country (facultatif) |
String |
Adresse de livraison facultative : pays. |
Succès 200
json
Champ |
Type |
Description |
status |
booléen |
État de la demande. |
message |
String |
Mise à jour client réussie. |
Erreur 4xx
json
Nom |
Type |
Description |
status |
booléen |
État de la demande. |
message |
String |
Échec de la mise à jour du client. |
-
Réponse réussie
HTTP/1.1 200 OK{ "status": true, "message": "Customer Update Successful."}
-
Réponse d’erreur
HTTP/1.1 404 Not Found{ "status": false, "message": "Customer Update Fail."}