# Debtors

> A customer (klant) in one administration: the customer terms of a relation (Relations).

Subject: Relations.

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.

| | |
| --- | --- |
| URL | `https://odata-api.fledge.nl/v2-8/Debtors` |
| Key | `administration_id`, `debtor_id` |
| Administration-specific | yes: always filter on `administration_id` |
| Operations | GET list, GET one, POST, PATCH, DELETE |
| Read licenses | BASIS, BASISAPP, URENPC |
| Write licenses | FINANCIEEL, VERKOOP |
| Scopes | FLEDGE_PORTAL, FLEDGE_TERMINAL |

> **Watch out:** active is a financial status (0 not active, 2 active, 4 open balance), not whether the customer is archived. An archived customer is one whose relation is archived: Relation/is_active eq 0.

## Example requests

```http
GET https://odata-api.fledge.nl/v2-8/Debtors?$filter=administration_id eq 1&$select=debtor_id,apply_vat,company_name,credit_limit&$top=50
GET https://odata-api.fledge.nl/v2-8/Debtors(administration_id=1,debtor_id={debtor_id})
```

## Fields

| Field | Type | Description |
| --- | --- | --- |
| `administration_id` (key) | Int32 | Administratienummer |
| `debtor_id` (key) | Int32, not null | Debiteurnummer. The customer number. Unrelated to relation_id. |
| `accordance_id` | Int32 | Nummer geaccodeerde |
| `active` | Int32 | Actief (0 = niet actief, 2 = actief, 4 = open saldo). Values: 0 = Not active; 2 = Active; 4 = Open balance |
| `agent_id` | Int32 | Agent |
| `agreement_date` | Date | Datum accodering |
| `agreement_document` | String | Dokument accodering |
| `apply_vat` | Boolean | Btw 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_dossier` | String | Verzekeringsdossier |
| `bank_account_id` | String | Rekeningnummer (evt. IBAN) |
| `bank_id` | Int32 | Banknummer |
| `bank_location` | String | Vestigingsplaats bank |
| `bic` | String | BIC: Bank Identification Number (swift-code) |
| `calculation_method_id` | Int32 | Berekeningwijze: Berekeningswijzenummer |
| `chamber_of_commerce_number` | String | KvK nummer: Kamer van koophandel nummer |
| `company_name` | String | Bedrijfsnaam. The customer's name. Usually the relation's company_name_1, but older data can differ. |
| `country_code_id` | Int32 | Landkode |
| `credit_insurance_id` | Int32 | Verzekeringsnummer |
| `credit_limit` | Int32 | Kredietlimiet. The credit limit, checked on the invoice customer's open amounts. |
| `currency_code_id` | Int32 | Valutanummer |
| `date_last_updated` | DateTimeOffset | Gewijzigd: Datum/tijd laatste wijziging |
| `debtor_group_id` | Int32 | Debiteurgroep nummer. The customer group (klantgroep), a configurable way to segment customers. |
| `delivery_condition_id` | Int32 | Levering konditie: Leverings koditie nummer. The delivery term (DeliveryConditions, navigation DeliveryCondition). |
| `delivery_method_id` | Int32 | Verzendmethode nummer. The shipping method (ShippingMethods). |
| `discount_group_id` | Int32 | Kortinggroepnummer. The customer's discount group; with DebtorGroupArticleGroupDiscounts it gives a discount per article discount group. |
| `district_id` | Int32 | Rayon |
| `id_in_char` | String | Debiteurnummer. The customer number as text; some customers quote it as their reference on an order. |
| `intercompany_number_admin` | Int32 | Intercompany Admin: Intercompany nummer admin. nr. |
| `intercompany_number_cons` | Int32 | Intercompany Cons.: Intercompany nummer cons. nr. |
| `intercompany_number_elim` | Int32 | Intercompany Elim.: Intercompany nummer elim. nr. |
| `invoice_debtor` | Int32 | Factuurdebiteur. 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_id` | Int32 | Aanmaningsnummer |
| `invoice_to` | String | Factuur tav |
| `is_compilation_invoice` | Boolean | Verzamelfactuur ja/nee. Combine this customer's orders on one invoice (verzamelfactuur). |
| `is_digital_invoice` | Boolean | Digitaal factureren (j/n) |
| `is_private` | Boolean | Particulier (j/n). A private person rather than a company. |
| `language_id` | Int32 | Taalkode |
| `layout_set_id` | Int32 | Layout |
| `location` | String | Woonplaats. The city, as text. |
| `mailing_code_id` | Int32 | Mailingkode |
| `main_debtor` | Int32 | Hoofddebiteurnummer. The main customer (hoofdklant) this one belongs to, for example in a group of companies. |
| `number_of_invoices` | Int32 | Aantal facturen |
| `order_acknowledgment_to` | String | Orderbevestiging tav |
| `order_confirmation_layout_id` | Int32 | Orderbevestigingsnummer |
| `order_discount` | Decimal | Orderkorting %: 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_allowed` | Boolean | Deellev. toegestaan: Deellevering toegestaan ja/nee. Part of an order may be delivered and the rest later (deellevering toegestaan). |
| `payment_authorization_id` | Int32 | Machtigingsnummer |
| `payment_condition_id` | Int32 | Betalingskonditie. The payment term (PaymentConditions, navigation PaymentTerm). |
| `price_agreement_id` | Int32 | Prijsafspraak nummer |
| `relation_address_id` | Int32 | Adresnummer |
| `relation_id` | Int32 | Relatienummer. The relation (Relations) this customer is. |
| `remark` | String | Opmerking |
| `route_id` | Int32 | Route nummer |
| `sales_blockage` | Boolean | Blokkeren 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_name` | String | Zoeknaam. 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_id` | String | Statistieknummer |
| `trademark_id` | Int32 | Handelsmerk id |
| `value` | Int32 | Waarde van een debiteur |
| `vat_number` | String | BTW-nummer |
| `volume_discount_id` | Int32 | Kwantumkortingnummer |

## Relations

- `Administration` → [Administrations](https://docs.fledge.nl/en/api/reference/Administrations.md) (one)
- `Agent` → [Agents](https://docs.fledge.nl/en/api/reference/Agents.md) (one)
- `Bank` → [Banks](https://docs.fledge.nl/en/api/reference/Banks.md) (one)
- `CalculationMethod` → [CalculationMethods](https://docs.fledge.nl/en/api/reference/CalculationMethods.md) (one)
- `CountryCode` → [CountryCodes](https://docs.fledge.nl/en/api/reference/CountryCodes.md) (one)
- `CreditInsurance` → [CreditInsurances](https://docs.fledge.nl/en/api/reference/CreditInsurances.md) (one)
- `DebtorDiscountGroup` → [DebtorDiscountGroups](https://docs.fledge.nl/en/api/reference/DebtorDiscountGroups.md) (one)
- `DebtorGroup` → [DebtorGroups](https://docs.fledge.nl/en/api/reference/DebtorGroups.md) (one)
- `DeliveryCondition` → [DeliveryConditions](https://docs.fledge.nl/en/api/reference/DeliveryConditions.md) (one)
- `District` → [Districts](https://docs.fledge.nl/en/api/reference/Districts.md) (one)
- `InvoiceReminderType` → [InvoiceReminderTypes](https://docs.fledge.nl/en/api/reference/InvoiceReminderTypes.md) (one)
- `LanguageCode` → [LanguageCodes](https://docs.fledge.nl/en/api/reference/LanguageCodes.md) (one)
- `LayoutSet` → [LayoutSets](https://docs.fledge.nl/en/api/reference/LayoutSets.md) (one)
- `MailingCode` → [MailingCodes](https://docs.fledge.nl/en/api/reference/MailingCodes.md) (one)
- `OrderConfirmationLayout` → [OrderConfirmationLayouts](https://docs.fledge.nl/en/api/reference/OrderConfirmationLayouts.md) (one)
- `PaymentAuthorization` → [PaymentAuthorizations](https://docs.fledge.nl/en/api/reference/PaymentAuthorizations.md) (one)
- `PaymentTerm` → [PaymentConditions](https://docs.fledge.nl/en/api/reference/PaymentConditions.md) (one)
- `PriceAgreement` → [PriceAgreements](https://docs.fledge.nl/en/api/reference/PriceAgreements.md) (one)
- `Relation` → [Relations](https://docs.fledge.nl/en/api/reference/Relations.md) (one)
- `RelationAddress` → [RelationAddresses](https://docs.fledge.nl/en/api/reference/RelationAddresses.md) (one)
- `ShippingMethod` → [ShippingMethods](https://docs.fledge.nl/en/api/reference/ShippingMethods.md) (one)
- `VolumeDiscount` → [VolumeDiscounts](https://docs.fledge.nl/en/api/reference/VolumeDiscounts.md) (one)
- `DebtorBranches` → [DebtorBranches](https://docs.fledge.nl/en/api/reference/DebtorBranches.md) (many)
- `DebtorUnsettledItems` → [DebtorUnsettledItems](https://docs.fledge.nl/en/api/reference/DebtorUnsettledItems.md) (many)
- `DocumentLinks` → [DocumentLinks](https://docs.fledge.nl/en/api/reference/DocumentLinks.md) (many)
- `ProductionOrderHeaders` → [ProductionOrderHeaders](https://docs.fledge.nl/en/api/reference/ProductionOrderHeaders.md) (many)
- `QuoteCalculationHeaders` → [QuoteCalculationHeaders](https://docs.fledge.nl/en/api/reference/QuoteCalculationHeaders.md) (many)
- `SalesOrderHeaders` → [SalesOrderHeaders](https://docs.fledge.nl/en/api/reference/SalesOrderHeaders.md) (many)
- `SalesQuotationHeaders` → [SalesQuotationHeaders](https://docs.fledge.nl/en/api/reference/SalesQuotationHeaders.md) (many)
- `ServiceObjects` → [ServiceObjects](https://docs.fledge.nl/en/api/reference/ServiceObjects.md) (many)

## Actions

- `GET Debtors/nextId(…)` — returns DebtorNextIdResultDto

---

Source: https://docs.fledge.nl/en/api/reference/Debtors
