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
| URL | https://odata-api.fledge.nl/v2-8/Relations |
|---|---|
| Key | relation_id |
| Administration | Shared by all administrations. |
| Operations | GET listGET onePOSTPATCHDELETE |
| Read licenses | BASISBASISAPPURENPC |
| Write licenses | BASISBASISAPP |
| Scopes | FLEDGE_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
| Field | Type | Description |
|---|---|---|
relation_idkey | Int32 | Relatie |
agent_id | Int32 | verwijzing naar de tabel agnt (agent) |
budget_id | Int32 | Budgetnummer |
chamber_of_commerce_number | String | kvk-nummer: Kamer van koophandel nummer |
city | String | Plaats A copy of the city of the primary visit address. Use RelationAddresses for addresses. |
company_name_1 | String | Bedrijfsnaam The name. company_name_2 and company_name_3 continue it. |
company_name_2 | String | Bedrijfsnaam |
company_name_3 | String | Bedrijfsnaam |
country_code_id | Int32 | Landcode A copy of the country of the primary visit address. |
custom_field_1 | String | Vrije veld 1 |
custom_field_10 | String | Vrije veld 10 |
custom_field_2 | String | Vrije veld 2 |
custom_field_3 | String | Vrije veld 3 |
custom_field_4 | String | Vrije veld 4 |
custom_field_5 | String | Vrije veld 5 |
custom_field_6 | String | Vrije veld 6 |
custom_field_7 | String | Vrije veld 7 |
custom_field_8 | String | Vrije veld 8 |
custom_field_9 | String | Vrije veld 9 |
date_first_contact | Date | Datum eerste kontakt |
date_last_contact | Date | Datum laatste kontakt |
email | String | |
staff_size_id | Int32 | Pers. grootte: Personeels grootte |
employees_quantity | Int32 | Aantal medewerkers |
fax | String | Faxnummer |
has_invoices | Boolean | Actief: 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_service | Boolean | Service/dienstverlening (j/n) |
has_telemarketing_preference | Boolean | Voorkeur relatie van een TM agent (ja/nee) |
helpdesk_status | Int32 | HD-status van de relatie. |
internal_agent | Int32 | interne agent |
is_active | Int32 | Actief: 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_creditor | Boolean | Is relatie een crediteur Can be out of date. Whether the relation is a supplier is whether it has a Creditors row. |
is_dealer | Boolean | vertegenwoordiger/dealer (j/n) |
is_debtor | Boolean | Is relatie een debiteur Can be out of date. Whether the relation is a customer is whether it has a Debtors row. |
is_employee | Boolean | Is relatie een medewerker Employees are relations too; leave them out (is_employee eq false) when listing companies. |
is_manufacturer | Boolean | fabrikant (ja/nee) |
is_used_external | Int32 | Extern in gebruik (0/1) |
is_wholesaler | Boolean | groothandel/importeur (ja/nee) |
language_code | Int32 | Taalkode |
legal_form_id | Int32 | Rechtsvorm nummer |
mailing_id | Int32 | Mailingkode |
origin_id | Int32 | Herkomst relatie |
parent_relation | Int32 | Moeder relatie |
postal_code | String | Postcode van het primaire bezoekadres A copy of the postal code of the primary visit address. Use RelationAddresses for addresses. |
reason_not_active_id | Int32 | Reden niet actief nummer |
relation_id_char | String | Relatienummer |
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. |
selection | String | Selecties A generated search string. Don't filter or parse it. |
source_id | Int32 | Bronnummer |
status | Int32 | Status van de relatie |
suspect_number | String | Suspectnr.: Suspectnummer (koppeling met bcd) |
telemarketing_agent | Int32 | TM-agent: Telemarketing agent |
telemarketing_or_sales | Boolean | Telemarketing/Verkoop: Telemarketing of verkoop |
telephone | String | Telefoonnummer |
use_contact_person_fax | Boolean | Gebruik eigen fax.nr.: Gebruik persoonlijk faxnummer van contactpersoon |
use_contact_person_telephone | Boolean | Gebruik perdoonlijk tel.nr.: Gebruik persoonlijk telefoonnummer van contactpersoon |
website | String | Website |
workplaces | Int32 | Aantal 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.
| Navigation | Entity set | |
|---|---|---|
Agent | Agents | one |
Budget | Budgets | one |
CountryCode | CountryCodes | one |
LanguageCodes | LanguageCodes | one |
LegalForms | LegalForms | one |
MailingCodes | MailingCodes | one |
NotActiveReasons | NotActiveReasons | one |
Source | Sources | one |
StaffSize | StaffSizes | one |
CreditInsurances | CreditInsurances | many |
Creditors | Creditors | many |
Debtors | Debtors | many |
DocumentLinks | DocumentLinks | many |
Employees | Employees | many |
ProductionOrderHeaders | ProductionOrderHeaders | many |
RelationAddresses | RelationAddresses | many |
RelationBranches | RelationBranches | many |
RelationContactPeople | RelationContactPeople | many |
RelationInterests | RelationInterests | many |
RelationStatusLinks | RelationStatusLinks | many |
SalesQuotationHeaders | SalesQuotationHeaders | many |
ServiceObjects | ServiceObjects | many |