Create a Stakeholder
Create a Stakeholder — POST
Physical person (type = PERSON)
Required fields: email (unique constraint)
curl --location 'https://api.stonal.io/datalake/v1/organizations/$organization/stakeholders' \
--header 'Authorization: Bearer $token' \
--header 'Content-Type: application/json' \
--data-raw '{
"type": "person",
"firstName": "John",
"lastName": "Doe",
"address": "string",
"postalCode": "string",
"city": "string",
"externalCode": "string",
"contactsDetails": [
{
"email": "john.doe@example.com",
"phoneNumber": "0123456789",
"additionalInfos": "string"
}
],
"isActive": true,
"fax": "string",
"function": "string"
}'
Legal entity (type = COMPANY)
Required fields: siren and companyName (unique constraint)
curl --location 'https://api.stonal.io/datalake/v1/organizations/$organization/stakeholders' \
--header 'Authorization: Bearer $token' \
--header 'Content-Type: application/json' \
--data-raw '{
"type": "company",
"companyName": "Acme Corporation",
"siren": 123456789,
"address": "string",
"postalCode": "string",
"city": "string",
"externalCode": "string",
"contactsDetails": [
{
"email": "john.doe@example.com",
"phoneNumber": "0123456789",
"additionalInfos": "string"
}
],
"isActive": true,
"fax": "string",
"function": "string"
}'
Response
A successful creation returns a HTTP 201 status with the uid of the created stakeholder.