Leveranciers

Beheer leveranciersgegevens. Leveranciers worden gekoppeld aan preadviezen.

Endpoints

MethodePadBeschrijving
GET/suppliersAlle leveranciers ophalen
POST/suppliersLeverancier aanmaken
GET/suppliers/:idSpecifieke leverancier ophalen
PUT/suppliers/:idLeverancier bijwerken
DELETE/suppliers/:idLeverancier verwijderen

Alle leveranciers ophalen

GET /suppliers

Response 200 OK

[
  {
    "id": 3,
    "address_id": null,
    "name": "Leverancier BV",
    "attention": "T.a.v. Inkoop",
    "address": "Industrieweg 10",
    "zipcode": "3000 AA",
    "town": "Rotterdam",
    "country": "NL",
    "phone": "010-9876543",
    "website": "https://leverancier.nl"
  }
]

Leverancier aanmaken

POST /suppliers

Request

{
  "name": "Leverancier BV",
  "attention": "T.a.v. Inkoop",
  "address": "Industrieweg 10",
  "zipcode": "3000 AA",
  "town": "Rotterdam",
  "country": "NL",
  "phone": "010-9876543",
  "website": "https://leverancier.nl"
}
VeldTypeVerplichtBeschrijving
namestringBedrijfsnaam
attentionstringNeeT.a.v. / contactpersoon
addressstringNeeAdres
zipcodestringNeePostcode
townstringNeePlaats
countrystringNeeLand (ISO code)
phonestringNeeTelefoonnummer
websitestringNeeWebsite URL

Response 204 No Content

Specifieke leverancier ophalen

GET /suppliers/:id

Response 200 OK

Retourneert hetzelfde formaat als in de lijst, inclusief address_type.

Leverancier bijwerken

PUT /suppliers/:id

Request

Zelfde velden als bij aanmaken.

Response 204 No Content

Leverancier verwijderen

DELETE /suppliers/:id

Response 204 No Content