Facture
Facture - Ajouter une nouvelle facture
POST votredomaine.com/api/invoices
Header
json
|
Champ |
Type |
Description |
|
Authorization |
String |
Jeton d'authentification d'accès de base. |
Paramètre
json
|
Champ |
Type |
Description |
|
clientid |
Number |
Obligatoire. Customer_id |
|
number |
Number |
Obligatoire. Numéro de facture |
|
date |
Date |
Obligatoire. Date de facturation |
|
currency |
Number |
Obligatoire. champ de devise |
|
newitems |
Déployer |
Obligatoire. Nouveaux articles à ajouter, description à l'appui, prix, quantité, longue_description, commande, nom de la taxe |
|
subtotal |
Décimal |
Obligatoire. calcul basé sur la quantité, le taux et la taxe de l'article |
|
total |
Décimal |
Obligatoire. calcul basé sur le sous-total, la remise et l'ajustement |
|
billing_street |
String |
Obligatoire. Adresse de la rue |
|
allowed_payment_modes |
Déployer |
Obligatoire. Modes de paiement |
|
billing_city (facultatif) |
String |
Facultatif. Nom de la ville pour la facturation |
|
billing_state (facultatif) |
String |
Facultatif. Nom de l'état pour la facturation |
|
billing_zip (facultatif) |
Number |
Facultatif. Code postal |
|
billing_country (facultatif) |
Number |
Facultatif. Code postal |
|
include_shipping (facultatif) |
booléen |
Facultatif. définissez oui si vous voulez ajouter une adresse de livraison Valeur par défaut:no |
|
show_shipping_on_invoice (facultatif) |
booléen |
Facultatif. Affiche les détails d'expédition sur la facture. |
|
shipping_street (facultatif) |
String |
Facultatif. Adresse d'expédition |
|
shipping_city (facultatif) |
String |
Facultatif. Nom de la ville pour l'expédition |
|
shipping_state (facultatif) |
String |
Facultatif. Nom de l'état pour l'expédition |
|
shipping_zip (facultatif) |
Number |
Facultatif. Code postal pour l'expédition |
|
shipping_country (facultatif) |
Number |
Facultatif. Code postal |
|
duedate (facultatif) |
Date |
Facultatif. Date d'échéance de la facture |
|
cancel_overdue_reminders (facultatif) |
booléen |
Facultatif. Empêcher l'envoi de reliquats en retard pour la facture |
|
tags (facultatif) |
String |
Facultatif. Tags (séparés par des virgules |
|
sale_agent (facultatif) |
Number |
Facultatif. Nom de l'agent de vente |
|
recurring (facultatif) |
String |
Facultatif. récurrent 1 à 12 ou personnalisé |
|
discount_type (facultatif) |
String |
Facultatif. type de réduction avant taxes / après taxes |
|
repeat_every_custom (facultatif) |
Number |
Facultatif. si récurrent est un écart de Number défini personnalisé |
|
repeat_type_custom (facultatif) |
String |
Facultatif. si la récurrence est personnalisée, définissez l'option d'écart jour/semaine/mois/année |
|
cycles (facultatif) |
Number |
Facultatif. Number de cycles 0 pour infini |
|
adminnote (facultatif) |
String |
Facultatif. notes de l'administrateur |
|
clientnote (facultatif) |
String |
Facultatif. remarques clients |
|
terms (facultatif) |
String |
Facultatif. Conditions |
Succès 200
json
|
Champ |
Type |
Description |
|
status |
booléen |
État de la demande. |
|
message |
String |
Facture ajoutée avec succès |
Erreur 4xx
json
|
Nom |
Type |
Description |
|
status |
booléen |
État de la demande. |
|
message |
String |
Échec de l'ajout de la facture |
|
newitems[] |
String |
Le champ Articles est obligatoire |
|
number |
String |
Le numéro de facture est déjà utilisé |
|
allowed_payment_modes[] |
String |
Le champ Autoriser le mode de paiement est obligatoire |
|
billing_street |
String |
Le champ Rue de facturation est obligatoire |
|
subtotal |
String |
Le champ Sous-total est obligatoire |
|
total |
String |
Le champ Total est obligatoire |
-
Réponse réussie
HTTP/1.1 200 OK{ "status": true, "message": "Invoice Added Successfully"}
-
Réponse d’erreur
HTTP/1.1 404 Not Found{ "status": false, "message": "Invoice Add Fail"}
Facture - Supprimer la facture
SUPPRIMER votredomaine.com/api/invoices/:id
Header
json
|
Champ |
Type |
Description |
|
Authorization |
String |
Jeton d'authentification d'accès de base. |
Succès 200
json
|
Champ |
Type |
Description |
|
status |
booléen |
État de la demande. |
|
message |
String |
Facture supprimée avec succès |
Erreur 4xx
json
|
Nom |
Type |
Description |
|
status |
booléen |
État de la demande. |
|
message |
String |
Échec de la suppression de la facture |
-
Réponse réussie
HTTP/1.1 200 OK{ "status": true, "message": "Invoice Deleted Successfully"}
-
Réponse d’erreur
HTTP/1.1 404 Not Found{ "status": false, "message": "Invoice Delete Fail"}
Facture - Demander des informations sur la facture
OBTENEZ votredomaine.com/api/invoices/:id
Header
json
|
Champ |
Type |
Description |
|
Authorization |
String |
Jeton d'authentification d'accès de base. |
Paramètre
json
|
Champ |
Type |
Description |
|
id |
Number |
Contacter l'identifiant unique |
Succès 200
json
|
Champ |
Type |
Description |
|
invoice |
Objet |
Informations sur la facture. |
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": "2","sent": "0","datesend": null,"clientid": "1","deleted_customer_name": null,"number": "2","prefix": "INV-","number_format": "1","datecreated": "2020-05-26 19:53:11","date": "2020-05-26","duedate": "2020-06-25","currency": "1","subtotal": "5.00","total_tax": "0.00","total": "5.00","adjustment": "0.00","addedfrom": "0","hash": "7bfac86da004df5364407574d4d1dbf2","status": "1","clientnote": null,"adminnote": null,"last_overdue_reminder": null,"cancel_overdue_reminders": "0","allowed_payment_modes": "['1']","token": null,"discount_percent": "0.00","discount_total": "0.00","discount_type": "","recurring": "0","recurring_type": null,"custom_recurring": "0","cycles": "0","total_cycles": "0","is_recurring_from": null,"last_recurring_date": null,"terms": null,"sale_agent": "0","billing_street": "","billing_city": "","billing_state": "","billing_zip": "","billing_country": null,"shipping_street": null,"shipping_city": null,"shipping_state": null,"shipping_zip": null,"shipping_country": null,"include_shipping": "0","show_shipping_on_invoice": "1","show_quantity_as": "1","project_id": "0","subscription_id": "0","symbol": "$","name": "USD","decimal_separator": ".","thousand_separator": ",","placement": "before","isdefault": "1","currencyid": "1","currency_name": "USD","total_left_to_pay": "5.00","items": [{"id": "2","rel_id": "2","rel_type": "invoice","description": "12MP Dual Camera with cover","long_description": "The JBL Cinema SB110 is a hassle-free soundbar","qty": "1.00","rate": "5.00","unit": "","item_order": "1"}],"attachments": [],"visible_attachments_to_customer_found": false,"client": {"userid": "1","company": "trueline","vat": "","phonenumber": "","country": "0","city": "","zip": "","state": "","address": "","website": "","datecreated": "2020-05-19 20:07:49","active": "1","leadid": null,"billing_street": "","billing_city": "","billing_state": "","billing_zip": "","billing_country": "0","shipping_street": "","shipping_city": "","shipping_state": "","shipping_zip": "","shipping_country": "0","longitude": null,"latitude": null,"default_language": "english","default_currency": "0","show_primary_contact": "0","stripe_id": null,"registration_confirmed": "1","addedfrom": "1"},"payments": [],"scheduled_email": null}
-
Réponse d’erreur
HTTP/1.1 404 Not Found{ "status": false, "message": "No data were found"}
Facture - Rechercher des informations sur la facture
OBTENEZ votredomaine.com/api/invoices/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 |
|
Invoice |
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": "19",
"sent": "0",
"datesend": null,
"clientid": "3",
"deleted_customer_name": null,
"number": "19",
"prefix": "INV-",
"number_format": "1",
"datecreated": "2020-08-18 21:19:51",
"date": "2020-07-04",
"duedate": "2020-08-03",
"currency": "1",
"subtotal": "20.00",
"total_tax": "1.80",
"total": "21.80",
"adjustment": "0.00",
"addedfrom": "1",
"hash": "809c0e4c9efba2a3bedfdb5871dc6240",
"status": "2",
"clientnote": "",
"adminnote": "",
"last_overdue_reminder": null,
"cancel_overdue_reminders": "0",
"allowed_payment_modes": "['1']",
"token": null,
"discount_percent": "0.00",
"discount_total": "0.00",
"discount_type": "",
"recurring": "0",
"recurring_type": null,
"custom_recurring": "0",
"cycles": "0",
"total_cycles": "0",
"is_recurring_from": null,
"last_recurring_date": null,
"terms": "",
"sale_agent": "0",
"billing_street": "",
"billing_city": "",
"billing_state": "",
"billing_zip": "",
"billing_country": "0",
"shipping_street": "",
"shipping_city": "",
"shipping_state": "",
"shipping_zip": "",
"shipping_country": "0",
"include_shipping": "0",
"show_shipping_on_invoice": "1",
"show_quantity_as": "1",
"project_id": "0",
"subscription_id": "0",
"userid": "3",
"company": "xyz",
"vat": "",
"phonenumber": "",
"country": "0",
"city": "",
"zip": "",
"state": "",
"address": "",
"website": "",
"active": "1",
"leadid": null,
"longitude": null,
"latitude": null,
"default_language": "",
"default_currency": "0",
"show_primary_contact": "0",
"stripe_id": null,
"registration_confirmed": "1",
"invoiceid": "19"
}}
-
Réponse d’erreur
HTTP/1.1 404 Not Found{ "status": false, "message": "No Data Were Found"}
Facture - Mettre à jour la facture
METTRE votredomaine.com/api/invoices/:id
Header
json
|
Champ |
Type |
Description |
|
Authorization |
String |
Jeton d'authentification d'accès de base. |
Paramètre
json
|
Champ |
Type |
Description |
|
clientid |
Number |
Identifiant client obligatoire. |
|
number |
Number |
Obligatoire. Numéro de facture |
|
date |
Date |
Obligatoire. Date de facturation |
|
currency |
Number |
Obligatoire. champ de devise |
|
newitems |
Déployer |
Obligatoire. Nouveaux éléments à ajouter |
|
subtotal |
Décimal |
Obligatoire. calcul basé sur la quantité, le taux et la taxe de l'article |
|
total |
Décimal |
Obligatoire. calcul basé sur le sous-total, la remise et l'ajustement |
|
billing_street |
String |
Obligatoire. Adresse de la rue |
|
allowed_payment_modes |
Déployer |
Obligatoire. Modes de paiement |
|
billing_city (facultatif) |
String |
Facultatif. Nom de la ville pour la facturation |
|
billing_state (facultatif) |
String |
Facultatif. Nom de l'état pour la facturation |
|
billing_zip (facultatif) |
Number |
Facultatif. Code postal |
|
billing_country (facultatif) |
Number |
Facultatif. Code postal |
|
include_shipping (facultatif) |
booléen |
Facultatif. définissez oui si vous voulez ajouter une adresse de livraison Valeur par défaut:no |
|
show_shipping_on_invoice (facultatif) |
booléen |
Facultatif. Affiche les détails d'expédition sur la facture. |
|
shipping_street (facultatif) |
String |
Facultatif. Adresse d'expédition |
|
shipping_city (facultatif) |
String |
Facultatif. Nom de la ville pour l'expédition |
|
shipping_state (facultatif) |
String |
Facultatif. Nom de l'état pour l'expédition |
|
shipping_zip (facultatif) |
Number |
Facultatif. Code postal pour l'expédition |
|
shipping_country (facultatif) |
Number |
Facultatif. Code postal |
|
duedate (facultatif) |
Date |
Facultatif. Date d'échéance de la facture |
|
cancel_overdue_reminders (facultatif) |
booléen |
Facultatif. Empêcher l'envoi de reliquats en retard pour la facture |
|
tags (facultatif) |
String |
Facultatif. Tags (séparés par des virgules |
|
sale_agent (facultatif) |
Number |
Facultatif. Nom de l'agent de vente |
|
recurring (facultatif) |
String |
Facultatif. récurrent 1 à 12 ou personnalisé |
|
discount_type (facultatif) |
String |
Facultatif. type de réduction avant taxes / après taxes |
|
repeat_every_custom (facultatif) |
Number |
Facultatif. si récurrent est un écart de Number défini personnalisé |
|
repeat_type_custom (facultatif) |
String |
Facultatif. si la récurrence est personnalisée, définissez l'option d'écart jour/semaine/mois/année |
|
cycles (facultatif) |
Number |
Facultatif. Number de cycles 0 pour infini |
|
adminnote (facultatif) |
String |
Facultatif. notes de l'administrateur |
|
items (facultatif) |
Déployer |
Facultatif. Articles existants avec ID |
|
removed_items (facultatif) |
Déployer |
Facultatif. Éléments à retirer |
|
clientnote (facultatif) |
String |
Facultatif. remarques clients |
|
terms (facultatif) |
String |
Facultatif. Conditions |
Erreur 4xx
json
|
Nom |
Type |
Description |
|
Number |
String |
Le numéro de facture est déjà utilisé |
-
Réponse réussie
HTTP/1.1 200 OK{ "status": false, "message": "Invoice Updated Successfully"}
-
Réponse d’erreur
HTTP/1.1 404 Not Found{ "status": false, "message": "Invoice Update Fail"}