A company or person Fledge deals with (relatie), shared by all administrations: customers, suppliers, prospects, employees, manufacturers. A relation is not a customer: the customer is its Debtors row in one administration, the supplier its Creditors row.

Label in Fledge: Relaties

URLhttps://odata-api.fledge.nl/v2-8/Relations
Keyrelation_id
AdministrationShared by all administrations.
OperationsGET listGET onePOSTPATCHDELETE
Read licensesBASISBASISAPPURENPC
Write licensesBASISBASISAPP
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/Relations" \
  --data-urlencode '$select=relation_id,city,company_name_1,country_code_id' \
  --data-urlencode '$top=50' \
  -H "Authorization: Bearer $TOKEN"
const url = new URL('https://odata-api.fledge.nl/v2-8/Relations');
url.searchParams.set('$select', 'relation_id,city,company_name_1,country_code_id');
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/Relations" + "?" + string.Join("&",
    "$select=" + Uri.EscapeDataString("relation_id,city,company_name_1,country_code_id"),
    "$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/Relations({relation_id})

Fields

FieldTypeDescription
relation_idkeyInt32Relatie
agent_idInt32verwijzing naar de tabel agnt (agent)
budget_idInt32Budgetnummer
chamber_of_commerce_numberStringkvk-nummer: Kamer van koophandel nummer
cityStringPlaats

A copy of the city of the primary visit address. Use RelationAddresses for addresses.

company_name_1StringBedrijfsnaam

The name. company_name_2 and company_name_3 continue it.

company_name_2StringBedrijfsnaam
company_name_3StringBedrijfsnaam
country_code_idInt32Landcode

A copy of the country of the primary visit address.

custom_field_1StringVrije veld 1
custom_field_10StringVrije veld 10
custom_field_2StringVrije veld 2
custom_field_3StringVrije veld 3
custom_field_4StringVrije veld 4
custom_field_5StringVrije veld 5
custom_field_6StringVrije veld 6
custom_field_7StringVrije veld 7
custom_field_8StringVrije veld 8
custom_field_9StringVrije veld 9
date_first_contactDateDatum eerste kontakt
date_last_contactDateDatum laatste kontakt
emailStringe-mail
staff_size_idInt32Pers. grootte: Personeels grootte
employees_quantityInt32Aantal medewerkers
faxStringFaxnummer
has_invoicesBooleanActief: Actieve relatie?

Despite its name, a second "active relation?" flag tied to financial activity (an open item, a lifted sales blockage). Not whether the relation has invoices.

has_serviceBooleanService/dienstverlening (j/n)
has_telemarketing_preferenceBooleanVoorkeur relatie van een TM agent (ja/nee)
helpdesk_statusInt32HD-status van de relatie.
internal_agentInt32interne agent
is_activeInt32Actief: Actieve relatie

Whether the relation is archived: 0 is archived, anything else (also empty) is active. Filter is_active ne 0 for active relations.

is_creditorBooleanIs relatie een crediteur

Can be out of date. Whether the relation is a supplier is whether it has a Creditors row.

is_dealerBooleanvertegenwoordiger/dealer (j/n)
is_debtorBooleanIs relatie een debiteur

Can be out of date. Whether the relation is a customer is whether it has a Debtors row.

is_employeeBooleanIs relatie een medewerker

Employees are relations too; leave them out (is_employee eq false) when listing companies.

is_manufacturerBooleanfabrikant (ja/nee)
is_used_externalInt32Extern in gebruik (0/1)
is_wholesalerBooleangroothandel/importeur (ja/nee)
language_codeInt32Taalkode
mailing_idInt32Mailingkode
origin_idInt32Herkomst relatie
parent_relationInt32Moeder relatie
postal_codeStringPostcode van het primaire bezoekadres

A copy of the postal code of the primary visit address. Use RelationAddresses for addresses.

reason_not_active_idInt32Reden niet actief nummer
relation_id_charStringRelatienummer
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.

selectionStringSelecties

A generated search string. Don't filter or parse it.

source_idInt32Bronnummer
statusInt32Status van de relatie
suspect_numberStringSuspectnr.: Suspectnummer (koppeling met bcd)
telemarketing_agentInt32TM-agent: Telemarketing agent
telemarketing_or_salesBooleanTelemarketing/Verkoop: Telemarketing of verkoop
telephoneStringTelefoonnummer
use_contact_person_faxBooleanGebruik eigen fax.nr.: Gebruik persoonlijk faxnummer van contactpersoon
use_contact_person_telephoneBooleanGebruik perdoonlijk tel.nr.: Gebruik persoonlijk telefoonnummer van contactpersoon
websiteStringWebsite
workplacesInt32Aantal werkplekken

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
AgentAgentsone
BudgetBudgetsone
CountryCodeCountryCodesone
LanguageCodesLanguageCodesone
LegalFormsLegalFormsone
MailingCodesMailingCodesone
NotActiveReasonsNotActiveReasonsone
SourceSourcesone
StaffSizeStaffSizesone
CreditInsurancesCreditInsurancesmany
CreditorsCreditorsmany
DebtorsDebtorsmany
DocumentLinksDocumentLinksmany
EmployeesEmployeesmany
ProductionOrderHeadersProductionOrderHeadersmany
RelationAddressesRelationAddressesmany
RelationBranchesRelationBranchesmany
RelationContactPeopleRelationContactPeoplemany
RelationInterestsRelationInterestsmany
RelationStatusLinksRelationStatusLinksmany
SalesQuotationHeadersSalesQuotationHeadersmany
ServiceObjectsServiceObjectsmany
Wingman