A customer (klant) in one administration: the customer terms of a relation (Relations). One relation can have a customer row in several administrations, with a different debtor_id in each, and even more than one in the same administration.

Label in Fledge: Debiteuren

URLhttps://odata-api.fledge.nl/v2-8/Debtors
Keyadministration_iddebtor_id
AdministrationRows belong to one administration: always filter on administration_id.
OperationsGET listGET onePOSTPATCHDELETE
Read licensesBASISBASISAPPURENPC
Write licensesFINANCIEELVERKOOP
ScopesFLEDGE_PORTALFLEDGE_TERMINAL

Example requests

A page of rows, with only the fields you need. See Authentication for the token.

curl -G "https://odata-api.fledge.nl/v2-8/Debtors" \
  --data-urlencode '$filter=administration_id eq 1' \
  --data-urlencode '$select=debtor_id,apply_vat,company_name,credit_limit' \
  --data-urlencode '$top=50' \
  -H "Authorization: Bearer $TOKEN"
const url = new URL('https://odata-api.fledge.nl/v2-8/Debtors');
url.searchParams.set('$filter', 'administration_id eq 1');
url.searchParams.set('$select', 'debtor_id,apply_vat,company_name,credit_limit');
url.searchParams.set('$top', '50');

const response = await fetch(url, { headers: { Authorization: `Bearer ${token}` } });
const { value } = await response.json();
var url = "https://odata-api.fledge.nl/v2-8/Debtors" + "?" + string.Join("&",
    "$filter=" + Uri.EscapeDataString("administration_id eq 1"),
    "$select=" + Uri.EscapeDataString("debtor_id,apply_vat,company_name,credit_limit"),
    "$top=" + Uri.EscapeDataString("50"));

http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var json = await http.GetStringAsync(url);

One row by its key:

GET https://odata-api.fledge.nl/v2-8/Debtors(administration_id=1,debtor_id={debtor_id})

Fields

FieldTypeDescription
administration_idkeyInt32Administratienummer
debtor_idkeyInt32Debiteurnummer

The customer number. Unrelated to relation_id.

accordance_idInt32Nummer geaccodeerde
activeInt32Actief (0 = niet actief, 2 = actief, 4 = open saldo)
  • 0 Not active
  • 2 Active
  • 4 Open balance
agent_idInt32Agent
agreement_dateDateDatum accodering
agreement_documentStringDokument accodering
apply_vatBooleanBtw berekenen ja/nee

Whether VAT is charged. The app sets it from the country and is_private: false outside the EU and for businesses in another EU country, true for private persons in the Netherlands or the EU, a choice for Dutch businesses. Older customers can still have another value: read it, don't derive it.

assurance_dossierStringVerzekeringsdossier
bank_account_idStringRekeningnummer (evt. IBAN)
bank_idInt32Banknummer
bank_locationStringVestigingsplaats bank
bicStringBIC: Bank Identification Number (swift-code)
calculation_method_idInt32Berekeningwijze: Berekeningswijzenummer
chamber_of_commerce_numberStringKvK nummer: Kamer van koophandel nummer
company_nameStringBedrijfsnaam

The customer's name. Usually the relation's company_name_1, but older data can differ.

country_code_idInt32Landkode
credit_insurance_idInt32Verzekeringsnummer
credit_limitInt32Kredietlimiet

The credit limit, checked on the invoice customer's open amounts.

currency_code_idInt32Valutanummer
date_last_updatedDateTimeOffsetGewijzigd: Datum/tijd laatste wijziging
debtor_group_idInt32Debiteurgroep nummer

The customer group (klantgroep), a configurable way to segment customers.

delivery_condition_idInt32Levering konditie: Leverings koditie nummer

The delivery term (DeliveryConditions, navigation DeliveryCondition).

delivery_method_idInt32Verzendmethode nummer

The shipping method (ShippingMethods).

discount_group_idInt32Kortinggroepnummer

The customer's discount group; with DebtorGroupArticleGroupDiscounts it gives a discount per article discount group.

district_idInt32Rayon
id_in_charStringDebiteurnummer

The customer number as text; some customers quote it as their reference on an order.

intercompany_number_adminInt32Intercompany Admin: Intercompany nummer admin. nr.
intercompany_number_consInt32Intercompany Cons.: Intercompany nummer cons. nr.
intercompany_number_elimInt32Intercompany Elim.: Intercompany nummer elim. nr.
invoice_debtorInt32Factuurdebiteur

The customer on the invoice (klant op factuur) for this customer's orders; its own debtor_id unless it invoices to another.

invoice_reminder_type_idInt32Aanmaningsnummer
invoice_toStringFactuur tav
is_compilation_invoiceBooleanVerzamelfactuur ja/nee

Combine this customer's orders on one invoice (verzamelfactuur).

is_digital_invoiceBooleanDigitaal factureren (j/n)
is_privateBooleanParticulier (j/n)

A private person rather than a company.

language_idInt32Taalkode
layout_set_idInt32Layout
locationStringWoonplaats

The city, as text.

mailing_code_idInt32Mailingkode
main_debtorInt32Hoofddebiteurnummer

The main customer (hoofdklant) this one belongs to, for example in a group of companies.

number_of_invoicesInt32Aantal facturen
order_acknowledgment_toStringOrderbevestiging tav
order_confirmation_layout_idInt32Orderbevestigingsnummer
order_discountDecimalOrderkorting %: Orderkorting in procenten

The discount proposed for new order lines when neither a price agreement nor the customer's group discount (discount_group_id) gives one.

partial_deliveries_allowedBooleanDeellev. toegestaan: Deellevering toegestaan ja/nee

Part of an order may be delivered and the rest later (deellevering toegestaan).

payment_authorization_idInt32Machtigingsnummer
payment_condition_idInt32Betalingskonditie

The payment term (PaymentConditions, navigation PaymentTerm).

price_agreement_idInt32Prijsafspraak nummer
relation_address_idInt32Adresnummer
relation_idInt32Relatienummer

The relation (Relations) this customer is.

remarkStringOpmerking
route_idInt32Route nummer
sales_blockageBooleanBlokkeren in verkoop (ja/nee)

A blocked customer (blokkeren). Creating or changing its orders and quotations is refused; which further actions, such as invoicing, is configured in the setting BLOCK_SALES_ACTIONS.

search_nameStringZoeknaam

A search key, kept apart from the name: it can be shorter, abbreviated or older. To find a record by name, use query's search, which looks in all text fields.

statistics_idStringStatistieknummer
trademark_idInt32Handelsmerk id
valueInt32Waarde van een debiteur
vat_numberStringBTW-nummer
volume_discount_idInt32Kwantumkortingnummer

Relations

Read a related row or list in the same request with $expand, and give it its own $select; a list also needs a $top.

NavigationEntity set
AdministrationAdministrationsone
AgentAgentsone
BankBanksone
CalculationMethodCalculationMethodsone
CountryCodeCountryCodesone
CreditInsuranceCreditInsurancesone
DebtorDiscountGroupDebtorDiscountGroupsone
DebtorGroupDebtorGroupsone
DeliveryConditionDeliveryConditionsone
DistrictDistrictsone
InvoiceReminderTypeInvoiceReminderTypesone
LanguageCodeLanguageCodesone
LayoutSetLayoutSetsone
MailingCodeMailingCodesone
OrderConfirmationLayoutOrderConfirmationLayoutsone
PaymentAuthorizationPaymentAuthorizationsone
PaymentTermPaymentConditionsone
PriceAgreementPriceAgreementsone
RelationRelationsone
RelationAddressRelationAddressesone
ShippingMethodShippingMethodsone
VolumeDiscountVolumeDiscountsone
DebtorBranchesDebtorBranchesmany
DebtorUnsettledItemsDebtorUnsettledItemsmany
DocumentLinksDocumentLinksmany
ProductionOrderHeadersProductionOrderHeadersmany
QuoteCalculationHeadersQuoteCalculationHeadersmany
SalesOrderHeadersSalesOrderHeadersmany
SalesQuotationHeadersSalesQuotationHeadersmany
ServiceObjectsServiceObjectsmany

Actions

nextId

GET https://odata-api.fledge.nl/v2-8/Debtors/nextId(…)

Returns DebtorNextIdResultDto

Licenses: BASIS, FINANCIEEL, URENPC

Wingman