Common fields
Fields
All INFast API entities have the following fields in common.
-
id
: This is anObjectID
generated by INFast at the creation of each entity. It's the unique (and unmodifiable) identifier for each entity. -
portalId
: This is theid
of the Portal that owns the entity. -
metadata
: This field allows you to attach potential metadata to the entities you create or modify. More details in the dedicated section above. -
lastUpdate
: This is the date of the last modification of the entity.
Changes internal to INFast might update this lastUpdate
field without affecting the API output.
Sample
{
"id": "63e3c82675de4f6978054579",
"portalId": "63e3c82675de4f6978054555",
"lastUpdate": "2023-07-21T17:32:28Z",
"metadata": "NOTIONID=63e3c82675de4f6978054555",
...
}
Metadata
This field allows you to attach potential metadata to the entities you create or modify. The value you put in this field will be returned in all outputs of the entity. This functionality is designed to help you link INFast entities with the ones in your system.
Example
Let's assume you want to create a customer using data from your CRM:
curl -L -X POST 'https://api.infast.fr/api/v2/customers' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer [access_token]' \
--data-raw '{
"name": "Hervé Berthier",
"address": {
"street": "149 rue Pierre Sémard\nAppartement 2",
"postalCode": "29200",
"city": "Brest",
"country": "FRANCE"
},
"email": "customer@domain.com",
"metadata": "MY_CRM_ID=12166Q1S2"
}'
You just created a client with MY_CRM_ID=12166Q1S2
in the metadata
. When retrieving the customer, you retrieve this value in metadata
.
curl -L -X GET 'https://api.infast.fr/api/v2/customers/63e3c82675de4f6978054579' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer [access_token]' \
{
"data": {
"id": "63e3c82675de4f6978054579",
"portalId": "63e3c82675de4f6978054555",
"name": "Paul Berthier",
"address": {
"street": "149 rue Pierre Sémard\nAppartement 2",
"postalCode": "29200",
"city": "Brest",
"country": "FRANCE"
},
"metadata": "MY_CRM_ID=12166Q1S2",
...
}
}
Limitations
Please note that currently, the INFast API does not allow searching or querying against the metadata
field.
Moreover, this metadata
field is only accessible via the INFast API and does not appear in the INFast App.