The roles of a relation's addresses: one row per address and address type (AddressTypes). One address can play several roles and one role can be on several addresses. Which address type is the invoice, delivery, quotation or confirmation address is configured per administration: read_setting ADDRESSES_PEOPLE_ROLES_INITIAL.

Label in Fledge: Relatie adres rollen

URLhttps://odata-api.fledge.nl/v2-8/RelationAddressTypes
Keyaddress_type_idrelation_address_idrelation_idsequence
AdministrationShared by all administrations.
OperationsGET listGET onePOSTPATCHDELETE
Read licensesBASIS
Write licensesBASIS
ScopesFLEDGE_PORTAL

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/RelationAddressTypes" \
  --data-urlencode '$select=address_type_id,relation_address_id,relation_id,sequence,is_primary' \
  --data-urlencode '$top=50' \
  -H "Authorization: Bearer $TOKEN"
const url = new URL('https://odata-api.fledge.nl/v2-8/RelationAddressTypes');
url.searchParams.set('$select', 'address_type_id,relation_address_id,relation_id,sequence,is_primary');
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/RelationAddressTypes" + "?" + string.Join("&",
    "$select=" + Uri.EscapeDataString("address_type_id,relation_address_id,relation_id,sequence,is_primary"),
    "$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/RelationAddressTypes(address_type_id={address_type_id},relation_address_id={relation_address_id},relation_id={relation_id},sequence={sequence})

Fields

FieldTypeDescription
sequencekeyInt32Volgorde

The order within the role, used after is_primary.

address_type_idkeyInt32Rol aders: Rol van het adres (verwijzing naar arol)

The role (AddressTypes). 1 is always visit (bezoek), 2 post; the other ids are configured.

relation_address_idkeyInt32Adresnummer
relation_idkeyInt32Relatie
is_primaryBooleanPrimaire adres

The address to use for this role. Setting one primary clears the others of the relation and type.

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
AddressTypeAddressTypesone
RelationRelationsone
RelationAddressRelationAddressesone
Wingman