6. Create an owner
Reconstructed — end-user docs “Création propriétaire” + schema createOwner / OwnerInput.
This path does not appear in graphql-calls.json. The examples below are derived from the official schema.
Data model
An Owner embeds a profile: ProfileInput!:
type: personal_profile→ natural persontype: moral_profile→ legal entity (SCI, company…)
Notable required fields: isInvoicingEntity, profile.bankAccount, and for identity profile.identity.housingAddress.
Natural person
- GraphQL
- Node.js
- curl
mutation createOwner($owner: OwnerInput!) {
createOwner(owner: $owner) {
id
customReference
isInvoicingEntity
profile {
type
officialContact {
firstName
lastName
email
}
}
}
}
{
"owner": {
"isInvoicingEntity": true,
"externalId": "OWNER-EXT-001",
"customReference": "P-001",
"profile": {
"type": "personal_profile",
"bankAccount": {
"accountHolderName": "Alice Martin",
"iban": "FR76XXXXXXXXXXXXXXXXXXXXXXX",
"bic": "BNPAFRPP",
"bankName": "Example Bank"
},
"officialContact": {
"civility": "female",
"firstName": "Alice",
"lastName": "Martin",
"email": "[email protected]",
"mobilePhone": "+33600000000"
},
"identity": {
"housingAddress": {
"number": "10",
"street": "Rue de Rivoli",
"zip": "75001",
"city": "Paris",
"country": "FR"
}
}
}
}
}
const { createOwner } = await ublo(
`mutation createOwner($owner: OwnerInput!) {
createOwner(owner: $owner) { id customReference }
}`,
{ owner: { /* variables above */ } },
);
- Bearer
- Cookie session
curl -sS -X POST "$UBLO_GRAPHQL_URL" \
-H "Authorization: Bearer $UBLO_API_TOKEN" \
-H 'Content-Type: application/json' \
-d @create-owner.json
curl -sS -X POST "$UBLO_GRAPHQL_URL" \
-H 'Content-Type: application/json' \
-b cookies.txt \
-d @create-owner.json
civility values are defined by the CivilityType enum (female, male, undefined). Check other enums in the schema and validate them via introspection on your tenant.
Legal entity
Same mutation, with profile.type: "moral_profile" and profile.registration / official contacts per ProfileInput. On the business side (PDF), fill in company name, SIREN/SIRET, VAT, NAF, registered address, and billing address.
Link owner to unit
Depending on your schema version, ownership is pushed via updateUnit (unitOwnerships / Unit ownership domain) or dedicated mutations of the Unit ownership subdomain. Check UnitInputV2 / createUnitOwnership on your environment.