Clients

Votre répertoire de clients. Les clients sont référencés par les factures, devis, dépenses et entrées de temps.

GETLister les clients

GET/customers
ParamètreTypeDescription
pageintegerNuméro de page (défaut : 1)
limitintegerÉléments par page, max 100 (défaut : 20)
searchstringRecherche dans nom, courriel, entreprise
sortstringcreatedAt | -createdAt | name | -name
curl "https://paymavo.com/api/v1/customers?search=acme" \
  -H "Authorization: Bearer sk_live_xxx"

GETObtenir un client

GET/customers/{id}
curl https://paymavo.com/api/v1/customers/clx123 \
  -H "Authorization: Bearer sk_live_xxx"

POSTCréer un client

POST/customers
ParamètreTypeDescription
name*stringNom complet (max 200 car.)
email*emailAdresse courriel
phonestringTéléphone
companystringEntreprise
streetAddressstringAdresse
postalCodestringCode postal
citystringVille
provincestringProvince / état
countrystringPays
gstNumberstringNuméro TPS
qstNumberstringNuméro TVQ
taxExemptbooleanExonéré de taxe (défaut : false)
curl -X POST https://paymavo.com/api/v1/customers \
  -H "Authorization: Bearer sk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Sophie Tremblay", "email": "sophie@example.com", "company": "Studio ST" }'

PATCHModifier un client

PATCH/customers/{id}
curl -X PATCH https://paymavo.com/api/v1/customers/clx123 \
  -H "Authorization: Bearer sk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "+1-514-555-0100", "city": "Montréal" }'

DELETESupprimer un client

DELETE/customers/{id}
curl -X DELETE https://paymavo.com/api/v1/customers/clx123 \
  -H "Authorization: Bearer sk_live_xxx"