← API documentation

Klanten API

Content
GET /customers

Retrieve customers

Returns a paginated list of your customers. Search by name or email address with query.

Parameter Description
query Search term for name or email address.
page, page_size Pagination, default 15 per page.
Request
curl "https://financial.gyvex.com/api/customers?query=doe&page_size=25" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer UW_API_SLEUTEL"
GET /customers/{customer}

Retrieve customer

Returns a customer. Use the customer's slug in the URL.

Request
curl "https://financial.gyvex.com/api/customers/john-doe" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer UW_API_SLEUTEL"
POST /customer/store

Create customer

Creates a new customer. Only name is required. An email address must be unique among your customers.

FieldRequiredDescription
nameYesName, maximum 255 characters.
emailNoValid email address, unique per customer.
phoneNoPhone number.
company_nameNoCompany name.
vat_numberNoVAT number.
billing_addressNoBilling address.
zip_code, city, countryNoPostal code, city and country.
notesNoInternal notes.
Request
curl -X POST "https://financial.gyvex.com/api/customer/store" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer UW_API_SLEUTEL" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "John Doe",
    "email": "john.doe@example.com",
    "phone": "+31612345678",
    "company_name": "Doe Enterprises",
    "vat_number": "NL123456789B01",
    "billing_address": "Voorbeeldstraat 1",
    "zip_code": "1234 AB",
    "city": "Amsterdam",
    "country": "Nederland"
  }'

On success you receive status 201 with the new customer and its id, which you then use as customer_id for invoices and quotes.

PUT /customer/{customer}/update

Update customer

Updates a customer. Only the fields you send are changed. Use the customer's slug in the URL.

Parameter Description
name, email Only the fields you send are changed.
phone, company_name, vat_number See creating a customer.
billing_address, zip_code, city, country Send the address fields together.
customer_type consumer or business.
Request
curl -X PUT "https://financial.gyvex.com/api/customer/john-doe/update" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer UW_API_SLEUTEL" \
  -H "Content-Type: application/json" \
  -d '{"phone": "+31698765432"}'
DELETE /customer/{customer}

Delete customer

Deletes a customer. A customer with invoices or quotes cannot be deleted (status 409). On success you receive status 204.

Request
curl -X DELETE "https://financial.gyvex.com/api/customer/john-doe" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer UW_API_SLEUTEL"

Need help with your integration?

Create a ticket via "My Gyvex" in your dashboard. With Premium you get priority support, with a reply within 24 hours.