CRM
The CRM API exposes relation data. The fields are dynamically configured. The exposed data may differ between collections, as does the collection of relations. You can request the collection of relation data by using the collection ID (UUID). The methods below use the example value of 4d036265-2b90-423e-9e54-867bbe1fd5ef.
Accept header for requests to CRM
application/vnd.procurios.relation+json; version=1
Collections GET
Scope:
Get the CRM collections available to your access token.
Collections
Request
Response
[
{
"id": "4d036265-2b90-423e-9e54-867bbe1fd5ef",
"title": "Testcollectie",
"_links": {
"collection_schema": {
"href": "\/l\/relation_list_api\/collection\/4d036265-2b90-423e-9e54-867bbe1fd5ef\/schema"
},
"collection": {
"href": "\/l\/relation_list_api\/collection\/4d036265-2b90-423e-9e54-867bbe1fd5ef"
}
}
},
{
"id": "9eea0913-fed8-4851-b80f-58419c1612c6",
"title": "Testcollectie 2",
"_links": {
"collection_schema": {
"href": "\/l\/relation_list_api\/collection\/9eea0913-fed8-4851-b80f-58419c1612c6\/schema"
},
"collection": {
"href": "\/l\/relation_list_api\/collection\/9eea0913-fed8-4851-b80f-58419c1612c6"
}
}
}
]
Collection schema GET
Scope:
Get the collection schema to see which relation data will be exposed by the collection
Collection schema
Request
Response
{
"$id": "relations",
"$schema": "http:\/\/json-schema.org\/draft-07\/schema",
"type": "object",
"title": "A collection of relation data of \"Testcollectie\"",
"default": {},
"examples": [
{
"_links": {
"self": {
"href": "\/l\/relation_list_api\/collection\/4d036265-2b90-423e-9e54-867bbe1fd5ef?page=5"
},
"first": {
"href": "\/l\/relation_list_api\/collection\/4d036265-2b90-423e-9e54-867bbe1fd5ef?page=1"
},
"prev": {
"href": "\/l\/relation_list_api\/collection\/4d036265-2b90-423e-9e54-867bbe1fd5ef?page=4"
},
"next": {
"href": "\/l\/relation_list_api\/collection\/4d036265-2b90-423e-9e54-867bbe1fd5ef?page=6"
},
"last": {
"href": "\/l\/relation_list_api\/collection\/4d036265-2b90-423e-9e54-867bbe1fd5ef?page=18"
}
},
"count": 10,
"total": 176,
"relations": [
{
"first_name": "Some text",
"last_name": "Some text",
"initials": "Some text",
"default_address": {
"street": "Street",
"number": "123",
"number_add": "A",
"postcode": "1234 AA",
"town": "Town",
"country": "NL",
"country_name": "Netherlands, the"
},
"insertion": "Some text",
"profilePhoto": null,
"documents": [],
"relation_id": 123
},
{
"first_name": "Some text",
"last_name": "Some text",
"initials": "Some text",
"default_address": {
"street": "Street",
"number": "123",
"number_add": "A",
"postcode": "1234 AA",
"town": "Town",
"country": "NL",
"country_name": "Netherlands, the"
},
"insertion": "Some text",
"profilePhoto": {
"file_name": "profile_photo.png",
"mime_type": "image\/png",
"url": "https:\/\/api.core.milieudefensie.nl\/l\/library\/download\/urn:uuid:cea87149-3d05-4ed3-92f9-b842cfc04237\/profile_photo.png"
},
"documents": [
{
"file_name": "import.csv",
"mime_type": "text\/csv",
"url": "https:\/\/api.core.milieudefensie.nl\/l\/library\/download\/urn:uuid:30e79463-1201-4569-a097-374933b33b99\/import.csv"
},
{
"file_name": "export.csv",
"mime_type": "text\/csv",
"url": "https:\/\/api.core.milieudefensie.nl\/l\/library\/download\/urn:uuid:b8110f86-8e1f-488e-984e-88a74a4f652c\/export.csv"
}
],
"relation_id": 123
}
]
}
],
"required": [
"_links",
"count",
"total",
"relations"
],
"properties": {
"_links": {
"$id": "properties\/_links",
"type": "object",
"title": "Links for pagination",
"default": {},
"examples": [
{
"self": {
"href": "\/l\/relation_list_api\/collection\/4d036265-2b90-423e-9e54-867bbe1fd5ef?page=5"
},
"first": {
"href": "\/l\/relation_list_api\/collection\/4d036265-2b90-423e-9e54-867bbe1fd5ef?page=1"
},
"prev": {
"href": "\/l\/relation_list_api\/collection\/4d036265-2b90-423e-9e54-867bbe1fd5ef?page=4"
},
"next": {
"href": "\/l\/relation_list_api\/collection\/4d036265-2b90-423e-9e54-867bbe1fd5ef?page=6"
},
"last": {
"href": "\/l\/relation_list_api\/collection\/4d036265-2b90-423e-9e54-867bbe1fd5ef?page=18"
}
}
],
"required": [
"self",
"first",
"prev",
"next",
"last"
],
"properties": {
"self": {
"$id": "properties\/_links\/properties\/self",
"type": "object",
"title": "Links for pagination: self",
"default": {},
"examples": [
{
"href": "\/l\/relation_list_api\/collection\/4d036265-2b90-423e-9e54-867bbe1fd5ef?page=5"
}
],
"required": [
"href"
],
"properties": {
"href": {
"$id": "properties\/_links\/properties\/self\/properties\/href",
"type": "string",
"title": "Links for pagination: self => href",
"default": "",
"examples": [
"\/l\/relation_list_api\/collection\/4d036265-2b90-423e-9e54-867bbe1fd5ef?page=5"
]
}
}
},
"first": {
"$id": "properties\/_links\/properties\/first",
"type": "object",
"title": "Links for pagination: first",
"default": {},
"examples": [
{
"href": "\/l\/relation_list_api\/collection\/4d036265-2b90-423e-9e54-867bbe1fd5ef?page=1"
}
],
"required": [
"href"
],
"properties": {
"href": {
"$id": "properties\/_links\/properties\/first\/properties\/href",
"type": "string",
"title": "Links for pagination: first => href",
"default": "",
"examples": [
"\/l\/relation_list_api\/collection\/4d036265-2b90-423e-9e54-867bbe1fd5ef?page=1"
]
}
}
},
"prev": {
"$id": "properties\/_links\/properties\/prev",
"type": "object",
"title": "Links for pagination: prev",
"default": {},
"examples": [
{
"href": "\/l\/relation_list_api\/collection\/4d036265-2b90-423e-9e54-867bbe1fd5ef?page=4"
}
],
"required": [
"href"
],
"properties": {
"href": {
"$id": "properties\/_links\/properties\/prev\/properties\/href",
"type": "string",
"title": "Links for pagination: prev => href",
"default": "",
"examples": [
"\/l\/relation_list_api\/collection\/4d036265-2b90-423e-9e54-867bbe1fd5ef?page=4"
]
}
}
},
"next": {
"$id": "properties\/_links\/properties\/next",
"type": "object",
"title": "Links for pagination: next",
"default": {},
"examples": [
{
"href": "\/l\/relation_list_api\/collection\/4d036265-2b90-423e-9e54-867bbe1fd5ef?page=6"
}
],
"required": [
"href"
],
"properties": {
"href": {
"$id": "properties\/_links\/properties\/next\/properties\/href",
"type": "string",
"title": "Links for pagination: next => href",
"default": "",
"examples": [
"\/l\/relation_list_api\/collection\/4d036265-2b90-423e-9e54-867bbe1fd5ef?page=6"
]
}
}
},
"last": {
"$id": "properties\/_links\/properties\/last",
"type": "object",
"title": "Links for pagination: last",
"default": {},
"examples": [
{
"href": "\/l\/relation_list_api\/collection\/4d036265-2b90-423e-9e54-867bbe1fd5ef?page=18"
}
],
"required": [
"href"
],
"properties": {
"href": {
"$id": "properties\/_links\/properties\/last\/properties\/href",
"type": "string",
"title": "Links for pagination: last => href",
"default": "",
"examples": [
"\/l\/relation_list_api\/collection\/4d036265-2b90-423e-9e54-867bbe1fd5ef?page=18"
]
}
}
}
}
},
"count": {
"$id": "properties\/count",
"type": "integer",
"title": "Number of relations in this request",
"default": 0,
"examples": [
10
]
},
"total": {
"$id": "properties\/total",
"type": "integer",
"title": "Total number of relations in this collection",
"default": 0,
"examples": [
176
]
},
"search": {
"$id": "properties\/search",
"type": "array",
"title": "The possible search fields for this collection",
"default": [],
"properties": {
"0": {
"$id": "properties\/search\/properties\/phoneWork",
"title": "Werk telefoon",
"type": "object",
"default": null,
"required": [
"operator",
"value"
],
"properties": {
"operator": {
"type": "string",
"title": "Operator",
"items": {
"type": "string",
"enum": [
"=",
"!=",
"~",
"!~"
]
}
},
"value": {
"type": "string",
"title": "Value"
}
},
"examples": [
{
"operator": "=",
"value": "foo"
}
]
},
"$id": "properties\/search\/properties\/relationId",
"title": "Relatie ID",
"type": "object",
"default": null,
"required": [
"operator",
"value"
],
"properties": {
"operator": {
"type": "string",
"title": "Operator",
"items": {
"type": "string",
"enum": [
"=",
"!=",
"~",
"!~",
">",
">=",
"<",
"<="
]
}
},
"value": {
"type": "integer",
"title": "Value"
}
},
"examples": [
{
"operator": "=",
"value": 0
}
]
},
"examples": [
{
"phoneWork": {
"operator": "=",
"value": "foo"
},
"relationId": {
"operator": "=",
"value": 0
}
}
]
},
"sort": {
"$id": "properties\/sort",
"type": "array",
"title": "Fields that can be used to sort this collection",
"default": [],
"properties": [
{
"$id": "properties\/sort\/properties\/phoneWork",
"title": "Werk telefoon",
"type": "object",
"default": null,
"required": [
"direction"
],
"properties": {
"direction": {
"type": "string",
"title": "Direction",
"items": {
"type": "string",
"enum": [
"ASC",
"DESC"
]
}
}
}
},
{
"$id": "properties\/sort\/properties\/relationId",
"title": "Relatie ID",
"type": "object",
"default": null,
"required": [
"direction"
],
"properties": {
"direction": {
"type": "string",
"title": "Direction",
"items": {
"type": "string",
"enum": [
"ASC",
"DESC"
]
}
}
}
}
]
},
"relations": {
"$id": "properties\/relations",
"type": "array",
"title": "A collection of relation data of \"Testcollectie\"",
"default": [],
"examples": [
[
{
"first_name": "Some text",
"last_name": "Some text",
"initials": "Some text",
"default_address": {
"street": "Street",
"number": "123",
"number_add": "A",
"postcode": "1234 AA",
"town": "Town",
"country": "NL",
"country_name": "Netherlands, the"
},
"insertion": "Some text",
"profilePhoto": null,
"documents": [],
"relation_id": 123
},
{
"first_name": "Some text",
"last_name": "Some text",
"initials": "Some text",
"default_address": {
"street": "Street",
"number": "123",
"number_add": "A",
"postcode": "1234 AA",
"town": "Town",
"country": "NL",
"country_name": "Netherlands, the"
},
"insertion": "Some text",
"profilePhoto": {
"file_name": "profile_photo.png",
"mime_type": "image\/png",
"url": "https:\/\/api.core.milieudefensie.nl\/l\/library\/download\/urn:uuid:cea87149-3d05-4ed3-92f9-b842cfc04237\/profile_photo.png"
},
"documents": [
{
"file_name": "import.csv",
"mime_type": "text\/csv",
"url": "https:\/\/api.core.milieudefensie.nl\/l\/library\/download\/urn:uuid:30e79463-1201-4569-a097-374933b33b99\/import.csv"
},
{
"file_name": "export.csv",
"mime_type": "text\/csv",
"url": "https:\/\/api.core.milieudefensie.nl\/l\/library\/download\/urn:uuid:b8110f86-8e1f-488e-984e-88a74a4f652c\/export.csv"
}
],
"relation_id": 123
}
]
],
"items": {
"$id": "properties\/relations\/items",
"type": "array",
"anyOf": [
{
"$id": "properties\/relations\/items\/anyOf\/0",
"type": "object",
"title": "Relation data of one specific relation",
"default": {},
"examples": [
{
"first_name": "Some text",
"last_name": "Some text",
"initials": "Some text",
"default_address": {
"street": "Street",
"number": "123",
"number_add": "A",
"postcode": "1234 AA",
"town": "Town",
"country": "NL",
"country_name": "Netherlands, the"
},
"insertion": "Some text",
"profilePhoto": {
"file_name": "profile_photo.png",
"mime_type": "image\/png",
"url": "https:\/\/api.core.milieudefensie.nl\/l\/library\/download\/urn:uuid:cea87149-3d05-4ed3-92f9-b842cfc04237\/profile_photo.png"
},
"documents": [
{
"file_name": "import.csv",
"mime_type": "text\/csv",
"url": "https:\/\/api.core.milieudefensie.nl\/l\/library\/download\/urn:uuid:30e79463-1201-4569-a097-374933b33b99\/import.csv"
},
{
"file_name": "export.csv",
"mime_type": "text\/csv",
"url": "https:\/\/api.core.milieudefensie.nl\/l\/library\/download\/urn:uuid:b8110f86-8e1f-488e-984e-88a74a4f652c\/export.csv"
}
],
"relation_id": 123
}
],
"required": [
"first_name",
"last_name",
"initials",
"default_address",
"insertion",
"profilePhoto",
"documents",
"relation_id"
],
"properties": {
"first_name": {
"$id": "properties\/relations\/items\/anyOf\/0\/properties\/first_name",
"title": "Voornaam",
"type": "string",
"default": "",
"examples": [
"Some text"
]
},
"last_name": {
"$id": "properties\/relations\/items\/anyOf\/0\/properties\/last_name",
"title": "Achternaam",
"type": "string",
"default": "",
"examples": [
"Some text"
]
},
"initials": {
"$id": "properties\/relations\/items\/anyOf\/0\/properties\/initials",
"title": "Voorletters",
"type": "string",
"default": "",
"examples": [
"Some text"
]
},
"default_address": {
"$id": "properties\/relations\/items\/anyOf\/0\/properties\/default_address",
"title": "Standaardadres",
"type": "object",
"default": null,
"examples": [
{
"street": "Street",
"number": "123",
"number_add": "A",
"postcode": "1234 AA",
"town": "Town",
"country": "NL",
"country_name": "Netherlands, the"
}
],
"required": [
"street",
"number",
"number_add",
"postcode",
"town",
"country",
"country_name"
],
"properties": {
"street": {
"type": "string",
"title": "Street",
"examples": [
"Street"
]
},
"number": {
"type": "string",
"title": "Number",
"examples": [
"123"
]
},
"number_add": {
"type": "string",
"title": "Addition",
"examples": [
"A"
]
},
"postcode": {
"type": "string",
"title": "ZIP code",
"examples": [
"1234 AA"
]
},
"town": {
"type": "string",
"title": "Town",
"examples": [
"Town"
]
},
"country": {
"type": "string",
"minimum": 2,
"maximum": 2,
"title": "Country",
"examples": [
"NL"
]
},
"country_name": {
"type": "string",
"title": "Country name",
"examples": [
"Netherlands, the"
]
}
}
},
"insertion": {
"$id": "properties\/relations\/items\/anyOf\/0\/properties\/insertion",
"title": "Tussenvoegsel",
"type": "string",
"default": "",
"examples": [
"Some text"
]
},
"profilePhoto": {
"$id": "properties\/relations\/items\/anyOf\/0\/properties\/profilePhoto",
"type": "object",
"default": null,
"examples": [
{
"file_name": "profile_photo.png",
"mime_type": "image\/png",
"url": "https:\/\/api.core.milieudefensie.nl\/l\/library\/download\/urn:uuid:cea87149-3d05-4ed3-92f9-b842cfc04237\/profile_photo.png"
}
],
"required": [
"file_name",
"mime_type",
"url"
],
"properties": {
"file_name": {
"type": "string",
"title": "File name",
"default": "",
"examples": [
"profile_photo.png"
]
},
"mime_type": {
"type": "string",
"title": "Mime type",
"default": "",
"examples": [
"image\/png"
]
},
"url": {
"type": "string",
"title": "URL",
"default": "",
"examples": [
"https:\/\/api.core.milieudefensie.nl\/l\/library\/download\/urn:uuid:cea87149-3d05-4ed3-92f9-b842cfc04237\/profile_photo.png"
]
}
}
},
"documents": {
"$id": "properties\/relations\/items\/anyOf\/0\/properties\/documents",
"type": "array",
"default": [],
"examples": [
[
{
"file_name": "import.csv",
"mime_type": "text\/csv",
"url": "https:\/\/api.core.milieudefensie.nl\/l\/library\/download\/urn:uuid:30e79463-1201-4569-a097-374933b33b99\/import.csv"
},
{
"file_name": "export.csv",
"mime_type": "text\/csv",
"url": "https:\/\/api.core.milieudefensie.nl\/l\/library\/download\/urn:uuid:b8110f86-8e1f-488e-984e-88a74a4f652c\/export.csv"
}
]
],
"items": {
"type": "array",
"anyOf": [
{
"type": "object",
"default": null,
"examples": [
{
"file_name": "import.csv",
"mime_type": "text\/csv",
"url": "https:\/\/api.core.milieudefensie.nl\/l\/library\/download\/urn:uuid:30e79463-1201-4569-a097-374933b33b99\/import.csv"
}
],
"required": [
"file_name",
"mime_type",
"url"
],
"properties": {
"file_name": {
"type": "string",
"title": "File name",
"default": "",
"examples": [
"import.csv"
]
},
"mime_type": {
"type": "string",
"title": "Mime type",
"default": "",
"examples": [
"text\/csv"
]
},
"url": {
"type": "string",
"title": "URL",
"default": "",
"examples": [
"https:\/\/api.core.milieudefensie.nl\/ll\/library\/download\/urn:uuid:30e79463-1201-4569-a097-374933b33b99\/import.csv"
]
}
}
}
]
}
},
"relation_id": {
"$id": "properties\/relations\/items\/anyOf\/0\/properties\/relation_id",
"title": "Relatie ID",
"type": "integer",
"default": 0,
"examples": [
123
]
}
}
}
]
}
}
}
}
Collection GET
Scope:
Get the relation data of all relations in this collection
Parameters
Parameter | Type | Description |
---|---|---|
page | int | Returns the given page (default value: 1) |
results_per_page | int | Returns the number of results per page (default value: 500, maximum value: 500) |
sort | string | Show the results sorted by a specific sortable field. Format: <name-of-the-field>:<sort-order>. Sort order can be: "asc" or "desc". |
filter | string | The value is a string. For example: foo="string for foo"&bar=("one", "of", "these")&baz~"contains me". |
search | string | Filter results by the given search key |
Collection
Request
Response
{
"_links": {
"self": {
"href": "\/l\/relation_list_api\/collection\/4d036265-2b90-423e-9e54-867bbe1fd5ef?page=5"
},
"first": {
"href": "\/l\/relation_list_api\/collection\/4d036265-2b90-423e-9e54-867bbe1fd5ef?page=1"
},
"prev": {
"href": "\/l\/relation_list_api\/collection\/4d036265-2b90-423e-9e54-867bbe1fd5ef?page=4"
},
"next": {
"href": "\/l\/relation_list_api\/collection\/4d036265-2b90-423e-9e54-867bbe1fd5ef?page=6"
},
"last": {
"href": "\/l\/relation_list_api\/collection\/4d036265-2b90-423e-9e54-867bbe1fd5ef?page=18"
}
},
"count": 10,
"total": 176,
"relations": [
{
"first_name": "Some text",
"last_name": "Some text",
"initials": "Some text",
"default_address": {
"street": "Street",
"number": "123",
"number_add": "A",
"postcode": "1234 AA",
"town": "Town",
"country": "NL",
"country_name": "Netherlands, the"
},
"insertion": "Some text",
"profilePhoto": null,
"documents": [],
"relation_id": 123
},
{
"first_name": "Some text",
"last_name": "Some text",
"initials": "Some text",
"default_address": {
"street": "Street",
"number": "123",
"number_add": "A",
"postcode": "1234 AA",
"town": "Town",
"country": "NL",
"country_name": "Netherlands, the"
},
"insertion": "Some text",
"profilePhoto": {
"file_name": "profile_photo.png",
"mime_type": "image\/png",
"url": "https:\/\/api.core.milieudefensie.nl\/l\/library\/download\/urn:uuid:cea87149-3d05-4ed3-92f9-b842cfc04237\/profile_photo.png"
},
"documents": [
{
"file_name": "import.csv",
"mime_type": "text\/csv",
"url": "https:\/\/api.core.milieudefensie.nl\/l\/library\/download\/urn:uuid:30e79463-1201-4569-a097-374933b33b99\/import.csv"
},
{
"file_name": "export.csv",
"mime_type": "text\/csv",
"url": "https:\/\/api.core.milieudefensie.nl\/l\/library\/download\/urn:uuid:b8110f86-8e1f-488e-984e-88a74a4f652c\/export.csv"
}
],
"relation_id": 123
}
]
}