← API documentatie

Inkoop API

Inhoud
GET /purchases

Inkopen ophalen

Geeft een gepagineerde lijst van inkopen, nieuwste eerst.

Parameter Beschrijving
customer_id Filter op leverancier.
from, to Inkopen tussen twee datums.
page, page_size Paginering, standaard 15 per pagina.
Verzoek
curl "https://financial.gyvex.com/api/purchases?from=2026-01-01" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer UW_API_SLEUTEL"
GET /purchases/{purchase}

Inkoop ophalen

Geeft een inkoop terug met regels. Voeg ?customer toe voor de leveranciergegevens. Gebruik de slug van de inkoop in de URL.

Verzoek
curl "https://financial.gyvex.com/api/purchases/a1b2c3?customer" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer UW_API_SLEUTEL"
POST /purchase/store

Inkoop aanmaken

Registreert een inkoop bij een leverancier. Bij succes volgt status 201.

Veld Verplicht Beschrijving
purchase_date Ja Datum van de inkoop.
customer_id Ja ID van de leverancier (een van uw relaties).
total_amount Ja Totaalbedrag.
vat Nee Btw-bedrag.
Verzoek
curl -X POST "https://financial.gyvex.com/api/purchase/store" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer UW_API_SLEUTEL" \
  -H "Content-Type: application/json" \
  -d '{"purchase_date": "2026-11-18", "customer_id": 12, "total_amount": 121.00, "vat": 21.00}'
PUT /purchase/{purchase}/update

Inkoop bijwerken

Werkt een inkoop bij. Alleen de meegestuurde velden worden gewijzigd.

Verzoek
curl -X PUT "https://financial.gyvex.com/api/purchase/a1b2c3/update" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer UW_API_SLEUTEL" \
  -H "Content-Type: application/json" \
  -d '{"total_amount": 150.00}'
DELETE /purchase/{purchase}

Inkoop verwijderen

Verwijdert een inkoop. Bij succes volgt status 204.

Verzoek
curl -X DELETE "https://financial.gyvex.com/api/purchase/a1b2c3" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer UW_API_SLEUTEL"

Hulp nodig bij uw koppeling?

Maak een ticket aan via "Mijn Gyvex" in uw dashboard. Met Premium krijgt u priority support, met reactie binnen 24 uur.