8. Create a rental folder
Reconstructed — PDF “Création dossier de location” + createRentalFolder / CreateRentalFolderInput.
Business mapping → API
| UI step (PDF) | API side |
|---|---|
| Signing collaborator | representativeId (required) |
| Effective / end dates, renewal | contractDetails (startDate, leaseEndingDate, leaseRenewalOption…) |
| Unit + tenant profile | units[] + profiles[] |
| Period / cycle / due date | invoicingConfig (+ contract fields) |
| Schedule / confirm move-in | folder event / state mutations (not captured — see RentalFolder schema) |
| Opening balance | dedicated accounting flow (often UI) |
Prerequisites
- Existing
unitId personalProfileIdormoralProfileIdrepresentativeId(collaborator / representative)- Ideally
accountingInvoiceConfigId - Unit + profile created beforehand (as indicated in the end-user docs)
Mutation
- GraphQL
- Node.js
- curl
mutation createRentalFolder($rentalFolder: CreateRentalFolderInput!) {
createRentalFolder(rentalFolder: $rentalFolder) {
id
reference
}
}
{
"rentalFolder": {
"representativeId": "00000000-0000-4000-8000-000000000050",
"accountingInvoiceConfigId": "00000000-0000-4000-8000-000000000060",
"externalId": "RF-EXT-001",
"isAutomaticInvoicingEnabled": true,
"isSubletting": false,
"units": [
{ "unitId": "00000000-0000-4000-8000-000000000020" }
],
"profiles": [
{
"personalProfileId": "00000000-0000-4000-8000-000000000070",
"associationType": "tenant",
"isProxySignatory": true
}
],
"contractDetails": {
"startDate": "2026-09-01",
"leaseEndingDate": "2029-08-31",
"leaseRenewalOption": "tacit",
"paymentDueDay": 5,
"invoiceFrequency": "monthly",
"securityDeposit": 300000
},
"invoicingConfig": {
"invoicingStartDate": "2026-09-01",
"invoicingFrequency": "monthly",
"invoicingTimeWindow": "current_period",
"dueDateMethod": "fixed_day",
"dueDatePositioning": "in_arrears",
"paymentDueDay": 5
}
}
}
const { createRentalFolder } = await ublo(
`mutation createRentalFolder($rentalFolder: CreateRentalFolderInput!) {
createRentalFolder(rentalFolder: $rentalFolder) { id reference }
}`,
{
rentalFolder: {
representativeId: process.env.REPRESENTATIVE_ID,
accountingInvoiceConfigId: process.env.INVOICE_CONFIG_ID,
externalId: 'RF-EXT-001',
units: [{ unitId: process.env.UNIT_ID }],
profiles: [
{
personalProfileId: process.env.TENANT_PROFILE_ID,
// associationType: check RentalFolderProfileAssociationTypeEnum
},
],
contractDetails: {
startDate: '2026-09-01',
leaseEndingDate: '2029-08-31',
leaseRenewalOption: 'tacit',
paymentDueDay: 5,
},
invoicingConfig: {
invoicingStartDate: '2026-09-01',
invoicingFrequency: 'monthly',
invoicingTimeWindow: 'current_period',
dueDateMethod: 'fixed_day',
dueDatePositioning: 'in_arrears',
paymentDueDay: 5,
},
},
},
);
- Bearer
- Cookie session
curl -sS -X POST "$UBLO_GRAPHQL_URL" \
-H "Authorization: Bearer $UBLO_API_TOKEN" \
-H 'Content-Type: application/json' \
-d @create-rental-folder.json
curl -sS -X POST "$UBLO_GRAPHQL_URL" \
-H 'Content-Type: application/json' \
-b cookies.txt \
-d @create-rental-folder.json
Enums to validate via introspection
Values for associationType, leaseRenewalOption, invoicingFrequency, etc. are illustrative. Introspect RentalFolderProfileAssociationTypeEnum, LeaseRenewalOptionTypeEnum, InvoicingFrequencyEnum, DueDateMethodEnum… before production. Exact names in your tenant schema are authoritative.
After create
- Verify the folder via
rentalFoldersPaginated/ detail query. - Schedule move-in / enable invoicing: look up event / state mutations in the schema (
RentalFolderdomain). - Opening balance: often a separate accounting flow (PDF steps 8–9) — confirm on your version.
See also
- Domain Location
- List rental folders