Documentation Examples
Examples
Common cases, ready to copy. Each example assumes the key in the HEYALINK_CLE variable.
PHP: publish a job offer
$reponse = (new GuzzleHttp\Client())->put('https://heyalink.com/api/emploi/v1/offres/CC-2026-014', [
'headers' => ['Authorization' => 'Bearer '.getenv('HEYALINK_CLE'), 'Idempotency-Key' => 'cc-2026-014-v1'],
'json' => ['titre' => 'Structural works site manager', 'lieu' => 'Toulouse (31)', 'type_contrat' => 'CDI'],
]);
Python: remove a job offer
import os, requests
requests.delete("https://heyalink.com/api/emploi/v1/offres/CC-2026-014",
headers={"Authorization": f"Bearer {os.environ['HEYALINK_CLE']}"}).raise_for_status()
Node.js: publish a training
await fetch('https://heyalink.com/api/formation/v1/formations/F-CACES-482', {
method: 'PUT',
headers: { Authorization: `Bearer ${process.env.HEYALINK_CLE}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ titre: 'CACES R482, site machinery', presentation: 'Operating excavators under 6 tonnes.', lien: 'https://www.example.com/trainings/caces-r482' }),
});
An LHEO catalogue
A sample file to import: catalogue-lheo.xml.