À quoi sert la ressource « Hôtellerie et hébergement » ?
Types d’hébergement, unités (chambres, logements, emplacements, ménage, classement, meublés), plans tarifaires (saisons, restrictions, pension, annulation, arrhes ou acompte), réservations (séjour, canal, folio, paiements, fiche de police, groupes), blocages, ménage, incidents, communes et déclarations de taxe de séjour, canaux iCal — discriminant kind
Quels endpoints sont disponibles ?
| Méthode | Adresse | Action |
|---|---|---|
| GET | /api/v1/hotel_records et /{id} | lire (liste paginée ou un élément par identifiant) |
| POST | /api/v1/hotel_records | créer un élément |
| PUT | /api/v1/hotel_records/{id} | remplacer un élément |
| PATCH | /api/v1/hotel_records/{id} | modifier certains champs |
| DELETE | /api/v1/hotel_records/{id} | supprimer un élément |
Quels champs contient la ressource « Hôtellerie et hébergement » ?
| Champ | Type et description |
|---|---|
| id | string |
| tenantId | string |
| kind | room_type|unit|rate_plan|reservation|block|housekeeping|incident|tax_commune|tax_declaration|channel |
| legalEntityId | string (société exploitante, périmètre société) |
| createdAt | string |
| updatedAt | string |
| createdBy | string |
| code | string |
| name | string |
| nature | string |
| description | string |
| standardOccupancy | number |
| maxAdults | number |
| maxChildren | number |
| maxOccupancy | number |
| bedding | string |
| surfaceM2 | number |
| amenities | array |
| baseRateTTC | number |
| extraPersonTTC | number |
| overbookingLimit | number |
| active | boolean |
| sortOrder | number |
| number | string |
| roomTypeId | string |
| building | string |
| floor | string |
| accessiblePmr | boolean |
| smoking | boolean |
| connectingUnitId | string |
| housekeeping | string |
| housekeepingAt | string |
| housekeepingBy | string |
| classification | string |
| classificationDate | string |
| registrationNumber | string |
| primaryResidence | boolean |
| nightsCap | number |
| taxCommuneId | string |
| icalToken | string |
| notes | string |
| roomTypeIds | array |
| mealPlan | string |
| prices | object |
| seasons | array |
| weekdayAdjustPct | object |
| minStay | number |
| maxStay | number |
| closedToArrival | array |
| closedToDeparture | array |
| minAdvanceDays | number |
| breakfastTTC | number |
| mealsTTC | number |
| childMealPct | number |
| nonRefundable | boolean |
| freeCancellationHours | number |
| cancellationPenalty | premiere_nuit|pourcentage|totalite |
| cancellationPct | number |
| depositType | string |
| depositPct | number |
| depositDueDays | number |
| publicDescription | string |
| status | string |
| guestId | string |
| guestName | string |
| guestEmail | string |
| guestPhone | string |
| guestNationality | string |
| guestAddress | string |
| payerId | string |
| unitId | string |
| arrival | string |
| departure | string |
| eta | string |
| adults | number |
| childrenAges | array |
| channel | string |
| channelRef | string |
| commissionPct | number |
| ratePlanId | string |
| nights | array |
| taxCollectedByPlatform | boolean |
| taxExemptSeasonal | number |
| taxExemptEmergency | number |
| taxExemptOther | number |
| depositAmount | number |
| depositDueDate | string |
| guaranteeProvided | boolean |
| guaranteeReference | string |
| folio | array |
| payments | array |
| invoiceIds | array |
| policeForm | object (fiche individuelle de police R814-2 CESEDA : nom, prénoms, naissance, nationalité, domicile, contact, dates) |
| groupId | string |
| groupName | string |
| specialRequests | string |
| attachments | array |
| internalNotes | string |
| checkInAt | string |
| checkOutAt | string |
| cancelledAt | string |
| cancellationReason | string |
| cancellationPenaltyTTC | number |
| overbooked | boolean |
| icalFeedId | string |
| icalUid | string |
| icalSeenAt | string |
| toComplete | boolean |
| conflict | string |
| history | array |
| from | string |
| to | string |
| reason | maintenance|hors_service|proprietaire|autre |
| note | string |
| incidentId | string |
| date | string |
| type | depart|recouche|arrivee|inspection|grand_menage |
| assignedUserId | string |
| reservationId | string |
| startedAt | string |
| doneAt | string |
| inspectedAt | string |
| inspectedBy | string |
| title | string |
| priority | basse|normale|haute|urgente |
| reportedAt | string |
| reportedBy | string |
| resolvedAt | string |
| costHT | number |
| blocksUnit | boolean |
| inseeCode | string |
| collector | string |
| deliberationRef | string |
| deliberationDate | string |
| year | number |
| mode | reel|forfait |
| tariffs | object |
| proportionalRatePct | number |
| departmentalAdditional | boolean |
| regionalAdditionalPct | number |
| regionalAdditionalLabel | string |
| lowRentExemptionThreshold | number |
| flatAllowancePct | number |
| collectionPeriod | mensuelle|trimestrielle|semestrielle|annuelle |
| paymentDueDays | number |
| declarationUrl | string |
| communeId | string |
| periodFrom | string |
| periodTo | string |
| lines | array |
| totalCommunal | number |
| totalDepartmental | number |
| totalRegional | number |
| total | number |
| platformTotal | number |
| declaredAt | string |
| paidAt | string |
| paymentReference | string |
| flatCapacity | number |
| flatNights | number |
| platform | booking|airbnb|abritel|expedia|autre |
| importUrlSealed | string (URL d’import scellée côté serveur, illisible) |
| importUrlHint | string |
| importHost | string |
| autoSync | boolean |
| syncEveryMinutes | number |
| lastSyncAt | string |
| lastSyncOk | boolean |
| lastSyncMessage | string |
| lastSyncStats | object |
| collectsTouristTax | boolean |
Comment filtrer, trier et paginer ?
Exemple de lecture filtrée et triée : GET /api/v1/hotel_records?filter[kind]=…&sort=legalEntityId:desc&limit=50.
Le filtre est une égalité stricte sur un champ déclaré, le tri s’écrit champ:asc ou champ:desc, la page contient 50 éléments par défaut et 200 au plus, un champ inconnu renvoie une erreur 400 plutôt qu’un résultat faux.
Quelles autorisations faut-il ?
- Une offre qui inclut l’API publique : Enterprise.
- Une clé d’API créée dans Système › Intégrations, envoyée dans l’en-tête Authorization: Bearer, limitée au dossier qui l’a émise.
- Une portée accordée à la clé pour cette ressource : lecture, écriture et suppression.