Champs & Mapping API ↔ WordPress
Custom Post Type job_offer
Les offres d'emploi sont stockées dans un Custom Post Type dédié :
| Propriété CPT | Valeur |
|---|---|
| Slug interne | job_offer |
| Slug URL public | /offres-emploi |
| Base REST API | nosemplois |
| Supports | title, editor, custom-fields |
| Archive | Activée |
| Visible dans REST | Oui (show_in_rest: true) |
Mapping complet des champs
Champs natifs du post
| Champ WordPress | Champ API HRMaps | Notes |
|---|---|---|
post_title | PositionTitle | Titre de l'offre |
post_content | PositionFormattedDescription.Content | HTML assaini via wp_kses_post() |
post_status | — | Toujours publish |
Meta fields personnalisées
| Meta WordPress | Champ API HRMaps | Type | Notes |
|---|---|---|---|
_position_id | PositionID | int | Clé d'unicité — utilisée pour détecter les doublons |
_apply_uri | ApplyURI | string | Lien de candidature direct HRMaps |
_organization_name | OrganizationName | string | Entité employeur |
_parent_organization_name | ParentOrganizationName | string | Organisation parente |
_industry | PositionIndustry.Name | string | Secteur d'activité |
_job_grade | JobGrade.Name | string | Niveau de poste |
_career_level | CareerLevel.Name | string | Niveau de carrière |
_schedule | PositionSchedule.Name | string | Type de temps de travail |
_schedule_work | PositionSchedule.WeeklyWorkDuration | string | Durée hebdomadaire |
_contract_type | PositionOfferingType.Name | string | Type de contrat (CDI, CDD…) |
_start_date | PositionStartDate | string | Tronqué à 9 caractères (substr(..., 0, 9)) |
_end_date | PositionEndDate | string | Date de fin de contrat |
_publication_date | PublicationStartDate | string | Date de mise en ligne |
_close_date | ApplicationCloseDate | string | Date limite de candidature |
_city | PositionLocation.CityName | string | Ville du poste |
_postal_code | PositionLocation.PostalCode | string | Code postal |
_adress | PositionLocation.AddressLine | string | Typo volontaire : un seul d |
_contenu | PositionFormattedDescription.Content | string | Résumé texte brut, 80 caractères max |
Typo
_adressLe meta key _adress (un seul d) est issu du code d'origine. Ne pas corriger sans mettre à jour toutes les requêtes et templates Elementor qui s'y réfèrent, sous peine de casser l'affichage des adresses.
Champ
_start_dateLa date de début est tronquée à 9 caractères via substr($job['PositionStartDate'], 0, 9). Le format attendu est YYYY-MM-DD (10 caractères ISO 8601) — il manque potentiellement le dernier chiffre. À surveiller si l'affichage des dates semble incorrect.
Exemple de réponse API (simplifié)
[
{
"PositionID": 1042,
"PositionTitle": "Chargé de communication H/F",
"IsArchived": false,
"ApplyURI": "https://niort-freres.hrmaps.cloud/...",
"OrganizationName": "Niort Frères",
"ParentOrganizationName": "Groupe Niort",
"PositionIndustry": { "Name": "Communication" },
"JobGrade": { "Name": "Cadre" },
"CareerLevel": { "Name": "Confirmé" },
"PositionSchedule": {
"Name": "Temps plein",
"WeeklyWorkDuration": "35h"
},
"PositionOfferingType": { "Name": "CDI" },
"PositionStartDate": "2025-03-01",
"PositionEndDate": null,
"PublicationStartDate": "2025-01-15",
"ApplicationCloseDate": "2025-02-28",
"PositionLocation": {
"CityName": "Niort",
"PostalCode": "79000",
"AddressLine": "12 rue de l'Exemple"
},
"PositionFormattedDescription": {
"Content": "<p>Description complète du poste...</p>"
}
}
]