API Versies
De API is beschikbaar in twee versies, Legacy API (v1) en Actuele API (v2), met verschillende gegevensindelingen en mogelijke verschillen in de naamgeving van eindpunten:
Actuele API (v2)
Formaat: JSON Verzoek: Gebruikt JSON voor verzoeken. Antwoord: Geeft antwoorden in JSON-formaat. Endpoint-namen: Endpoints kunnen verschillen in naamgeving van de Verouderde API (v1). Zorg ervoor dat je de juiste documentatie voor v2 raadpleegt.
Legacy API (v1)
Formaat: meestal XML Verzoek: Gebruikt XML voor verzoeken. Antwoord: Geeft antwoorden in XML-formaat. Endpoint-namen: Sommige endpoints kunnen verschillende namen hebben in vergelijking met de Actuele API (v2). Raadpleeg het Legacy API van de documentatie voor specifieke details.
Belangrijke opmerkingen
- Achterwaartse compatibiliteit: Beide versies bestaan naast elkaar, maar je moet de compatibiliteit met je applicatie controleren voordat je van versie wisselt.
- Eindpunt URLs: Geef de gewenste versie op in de URL van het eindpunt, bijvoorbeeld:
https://api.example.com/v1/endpointvoor Legacy APIhttps://api.example.com/v2/endpointvoor Actuele API
Voorbeeld van Verzoek en Antwoord
Actuele API:
- URL:
https://api-staging.billink.nl/v2/client/invoice/credit - Verzoek:
curl --location 'https://api-staging.billink.nl/v2/client/invoice/credit' \
--data '{
"billinkID": "d38a3439590889df026367bf01ddar621e687b8d278",
"billinkUsername": "usertest",
"invoices": [
{
"creditAmount": 1.5,
"description": "test credit",
"number": "KRKND-0001"
}
]
}'
- Reactie:
{
"result": "MSG",
"statuses": [
{
"code": 200,
"invoiceNumber": "KRKND-0001",
"message": "Credit applied: 1.50 EURO.; step restarted."
}
]
}
Legacy API:
- URL:
https://api-staging.billink.nl/v1/client/credit - Verzoek:
curl --location 'https://api-staging.billink.nl/v1/client/credit' \
--data '<API>
<VERSION></VERSION>
<CLIENTUSERNAME></CLIENTUSERNAME>
<CLIENTID></CLIENTID>
<ACTION></ACTION>
<INVOICES>
<ITEM>
<INVOICENUMBER></INVOICENUMBER>
<CREDITAMOUNT></CREDITAMOUNT>
<DESCRIPTION></DESCRIPTION>
</ITEM>
</INVOICES>
</API>'- Reactie:
What made this section unhelpful for you?
On this page
- API Versies