Skip to main content

Data access

The Customer API lets you execute queries and manipulate customer data.

API quick overview

GET: Get all customers

Get all customer objects from the API.
Endpoint: /webapi/customers

Query parameters

  • Page: Specify the page of results to return.
  • Size: Specify the number of records to return in one request, specified as an integer from 1 to 50.

Returns: The JSON result with the paged customer objects.

Example input and result

GET:
https://<baseurl>/webapi/customers/{id}

Example result:
{
data: [
...,
{
"id": 1,
"intials": ""
"lastname": ""
"email": ""
"iban": ""
"newDebtCollectionDate": ""
"address": ""
"dateOfBirth": ""
"phoneNumber": ""
},
...
],
pageNumber: 1,
pageSize: 1,
totalPages: 1,
totalRecords: 1
}

GET: Get customer by id

Get all customer objects from the API.
Endpoint: /webapi/customers/{id}

Returns: The JSON result with the customer object.

Example input and result

GET:
https://<baseurl>/webapi/customers/{id}

Example result:
{
"id": 1,
"intials": ""
"lastname": ""
"email": ""
"iban": ""
"newDebtCollectionDate": ""
"address": ""
"dateOfBirth": ""
"phoneNumber": ""
}

POST: Acknowledge a customer

When the request to change the direct debit date is acknowledged, the customer receives an automated e-mail informing them that their request has successfully been processed. In this e-mail we include the datedate (dd-MM-yyyy) on which the change comes into effect.
Therefore including the new debt collection date is required.

Endpoint: /webapi/customers/{id}/acknowledge
Returns: 204 No Content status code

Example input and result

POST:
https://<baseurl>/webapi/customers/{id}/acknowledge

Example input:
{
"newDebtCollectionDate": "dd-MM-yyyy"
}

POST: Decline a customer

When the request to change the direct debit date is declined, the customer receives an automated e-mail informing them that their request has not been processed. We also communicate the reason why. Therefore we require a post including the rejection reason. The table below describes the various reasons, including a brief description of the contents of the e-mail a customer receives.

Endpoint: /webapi/customers/{id}/decline
Returns: 204 No Content status code

Example input and result

POST:
https://<baseurl>/webapi/customers/{id}/decline

Example input:
{
"reason": "Reason",
"message: "string"
}

Reasons

Finbuddy has several flows that are triggered when a request is rejected, including an automated e-mail to the customer explaining why the request has not been approved. To trigger the appropriate flow, an ‘explanation’ must be sent along with it. Below is a list of the available predefined explanations:

ReasonDescriptionEmail flow
NO_CUSTOMERThe user is not a customer (anymore)Informs the submitter by e-mail they do not seem to be a customer at this time and to contact our partner if this is incorrect.
NO_DIRECT_DEBITThe customer does not have direct debit as a payment methodInforms the customer by e-mail that payment does not take place via direct debit. Customer is referred to partner to apply for direct debit.
INCORRECT_BANK_ACCOUNTThe bank account number provided in the request does not match the bank account number registeredInforms the customer by e-mail that the accounts do not match and asks to try again with the correct account number.
DATE_ALREADY_SETThe requested new date is the same as the current direct debit dateThis reason is registered for dashboarding purposes only. Customers will still receive a success e-mail.
NO_AUTHORIZATIONThe contract is not in the name of the person requesting the change and therefore is not authorized to request a changeInforms the submitter the contract is not in their name. We will send an email to resubmit by the contract holder.
NO_PERMISSIONThe customer is under guardianship and not allowed to request changesInforms customer they can not apply themselves, possibly because they are under guardianship. We will send an e-mail to resubmit via the guardian or to contact partner if guardanship no longer applies.