### business-establishment.get.example Source: https://developers.lucca.fr/api-reference/latest/organization/get-business-establishment Example of a GET request for a business establishment. ```APIDOC ## GET /business-establishments/{id} ### Description Retrieves details of a specific business establishment. ### Method GET ### Endpoint /business-establishments/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the business establishment. ### Response #### Success Response (200) - **id** (string) - The unique identifier of the business establishment. - **type** (string) - The type of the resource, always 'business-establishment'. - **url** (string) - The URL of the business establishment resource. - **name** (string) - The name of the business establishment. - **remoteId** (string) - The remote identifier of the business establishment. - **legalEntity** (object) - An object representing the legal entity associated with the business establishment. - **id** (string) - The unique identifier of the legal entity. - **type** (string) - The type of the resource, always 'legal-entity'. - **url** (string) - The URL of the legal entity resource. - **taxIdentificationNumber** (object) - The tax identification number. - **format** (string) - The format of the tax identification number (e.g., 'franceSIRET'). - **value** (string) - The tax identification number value. - **address** (object) - The address of the business establishment. - **addressLines** (array) - An array of strings representing the address lines. - **postalCode** (string) - The postal code of the address. - **locality** (string) - The city or locality. - **administrativeArea** (string) - The administrative area (e.g., state, province). - **countryCode** (string) - The ISO 3166-1 alpha-2 country code. - **timezoneId** (string) - The identifier for the timezone of the business establishment. - **isArchived** (boolean) - Indicates if the business establishment is archived. - **lastArchivedAt** (string) - The timestamp when the business establishment was last archived (ISO 8601 format), or null. - **createdAt** (string) - The timestamp when the business establishment was created (ISO 8601 format). - **lastUpdatedAt** (string) - The timestamp when the business establishment was last updated (ISO 8601 format). - **links** (object) - Links to related resources. - **embedded** (object) - Embedded resources. #### Response Example ```json { "id": "5", "type": "business-establishment", "url": "https://example.ilucca.net/lucca-api/business-establishments/5", "name": "Lucca Marseille", "remoteId": "00004", "legalEntity": { "id": "123", "type": "legal-entity", "url": "https://example.ilucca.net/lucca-api/legal-entities/123" }, "taxIdentificationNumber": { "format": "franceSIRET", "value": "0000000000000" }, "address": { "addressLines": [ "Lucca", "10 Place de la Joliette", "Les Docks Atrium 10.2" ], "postalCode": "13002", "locality": "Marseille", "administrativeArea": "Bouches-du-Rhône", "countryCode": "FRA" }, "timezoneId": "Europe/Paris", "isArchived": false, "lastArchivedAt": null, "createdAt": "2024-05-23T13:45:26.0001Z", "lastUpdatedAt": "2024-05-23T13:45:26.0001Z", "links": {}, "embedded": { "legal-entity": { "123": { "id": "123", "type": "legal-entity" } } } } ``` ``` -------------------------------- ### Employment Templates GET Example Source: https://developers.lucca.fr/api-reference/latest/employments/get-employment-templates This example demonstrates how to retrieve a list of employment templates. It includes pagination parameters and shows the structure of the response. ```json { "type": "employment-templates", "url": "https://example.ilucca.net/lucca-api/employment-templates?limit=25", "totalCount": 27, "items": [ { "id": "12", "type": "employment-template", "url": "https://example.ilucca.net/lucca-api/employment-templates/12", "title": "Internship", "legalEntities": [ { "id": "123", "type": "legal-entity", "url": "https://example.ilucca.net/lucca-api/legal-entities/123" } ], "term": "fixed", "audience": "student", "t9n": { "title": { "fr-FR": "Convention de stage" } }, "createdAt": "2024-04-15T23:12:54.0001Z", "lastUpdatedAt": "2024-04-15T23:12:54.0001Z", "links": { "extensionDefinitions": { "href": "https://example.ilucca.net/lucca-api/employee-extension-definitions?extends.type=employment-template&extendedEmploymentTemplate.id=12" } } } ], "links": { "prev": null, "next": { "href": "https://example.ilucca.net/lucca-api/employment-templates?page=!sdk87Sdh&limit=25" } }, "embedded": {} } ``` -------------------------------- ### Taxonomy Label GET Example Source: https://developers.lucca.fr/api-reference/latest/taxonomies/get-taxonomy-label This example demonstrates a successful GET request for a taxonomy label, showing the expected response structure. ```json { "id": "8751", "type": "taxonomy-label", "url": "https://example.ilucca.net/lucca-api/taxonomy-labels/8751", "taxonomy": { "id": "45", "type": "taxonomy", "url": "https://example.ilucca.net/lucca-api/taxonomies/45" }, "name": "XL", "remoteId": "tshirtSize.extraLarge", "createdAt": "2025-01-23T19:45:23Z", "lastUpdatedAt": "2025-01-23T19:45:23Z", "isArchived": false, "lastArchivedAt": null, "t9n": {}, "links": {}, "embedded": {} } ``` -------------------------------- ### Get Employment Template Example Source: https://developers.lucca.fr/api-reference/latest/employments/get-employment-template Example of how to retrieve an employment template. ```APIDOC ## GET /employment-templates/{id} ### Description Retrieves a specific employment template by its ID. ### Method GET ### Endpoint /employment-templates/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the employment template. ### Response #### Success Response (200) - **id** (string) - The unique identifier of the employment template. - **type** (string) - The type of the object, which is 'employment-template'. - **url** (string) - The URL of the employment template resource. - **title** (string) - The title or name of the employment template. - **legalEntities** (array) - A list of legal entities associated with the employment template. - **id** (string) - The unique identifier of the legal entity. - **type** (string) - The type of the object, which is 'legal-entity'. - **url** (string) - The URL of the legal entity resource. - **term** (string) - The term of the employment (e.g., 'permanent', 'fixed'). - **audience** (string) - The intended audience for the employment template (e.g., 'student'). - **t9n** (object) - Translation object for the employment template. - **title** (object) - Object containing translated titles for different languages. - **fr-FR** (string) - French (France) translation of the title. - **createdAt** (string) - UTC timestamp of when the employment template was created. - **lastUpdatedAt** (string) - UTC timestamp of when the employment template was last updated. - **links** (object) - Links related to the employment template. - **extensionDefinitions** (object) - Link to extension definitions. - **href** (string) - URL for extension definitions. - **embedded** (object) - Embedded resources. ### Request Example ```json { "example": "employment-template.get.example" } ``` ### Response Example ```json { "id": "12", "type": "employment-template", "url": "https://example.ilucca.net/lucca-api/employment-templates/12", "title": "Internship", "legalEntities": [ { "id": "123", "type": "legal-entity", "url": "https://example.ilucca.net/lucca-api/legal-entities/123" } ], "term": "fixed", "audience": "student", "t9n": { "title": { "fr-FR": "Convention de stage" } }, "createdAt": "2024-04-15T23:12:54.0001Z", "lastUpdatedAt": "2024-04-15T23:12:54.0001Z", "links": { "extensionDefinitions": { "href": "https://example.ilucca.net/lucca-api/employee-extension-definitions?extends.type=employment-template&extendedEmploymentTemplate.id=12" } }, "embedded": {} } ``` ``` -------------------------------- ### Employment GET Example Source: https://developers.lucca.fr/api-reference/latest/employments/get-employment Example of an employment resource, including references to the employee and legal entity. ```json { "id": "4561", "type": "employment", "url": "https://example.ilucca.net/lucca-api/employments/4561", "remoteId": "EMPLOYMENT#4512-ac", "employee": { "id": "416", "type": "employee", "url": "https://example.ilucca.net/lucca-api/employees/416" }, "legalEntity": { "id": "123", "type": "legal-entity", "url": "https://example.ilucca.net/lucca-api/legal-entities/123" }, "status": "active", "start": { "date": "2024-01-01" }, "end": null, "document": { "id": "74411", "type": "file", "url": "https://example.ilucca.net/lucca-api/files/74411" }, "template": { "id": "4", "type": "employment-template", "url": "https://example.ilucca.net/lucca-api/employment-templates/4" }, "createdAt": "2024-04-15T23:12:54.0001Z", "lastUpdatedAt": "2024-04-15T23:12:54.0001Z" } ``` -------------------------------- ### Employee GET Example Source: https://developers.lucca.fr/api-reference/latest/employments/get-employment Example of an employee resource, including their applicable employment and job position. ```json { "id": "416", "type": "employee", "url": "https://example.ilucca.net/lucca-api/employees/416", "remoteId": "00002345", "portrait": { "id": "66512232", "type": "portrait", "url": "https://example.ilucca.net/lucca-api/portraits/66512232" }, "givenName": "Edward", "familyName": "Atkinson", "employeeNumber": "E000124", "status": "active", "email": "eatkinson@acme.corp", "birthDay": { "day": 22, "month": 12 }, "phoneNumber": "+33145784512", "applicableEmployment": { "id": "154", "type": "employment", "url": "https://example.ilucca.net/lucca-api/employments/154" }, "applicableJobPosition": { "id": "74", "type": "job-position", "url": "https://example.ilucca.net/lucca-api/job-positions/74" }, "createdAt": "2024-04-15T23:12:54.0001Z", "lastUpdatedAt": "2024-04-15T23:12:54.0001Z", "links": { "portrait": { "href": "https://example.ilucca.net/lucca-api/files/66512232?token=eyJhbGciOi" }, "employments": { "href": "https://example.ilucca.net/lucca-api/employments?employee.id=416" }, "jobPositions": { "href": "https://example.ilucca.net/lucca-api/job-positions?employment.employee.id=416" }, "personalRecord": { "href": "https://example.ilucca.net/lucca-api/employee-personal-records?employee.id=416" } } } ``` -------------------------------- ### Get Business Establishment Example Source: https://developers.lucca.fr/api-reference/latest/organization/get-business-establishment This example shows the structure of a business establishment object, including its ID, name, address, and associated legal entity. It also contains metadata like creation and update timestamps. ```json { "id": "5", "type": "business-establishment", "url": "https://example.ilucca.net/lucca-api/business-establishments/5", "name": "Lucca Marseille", "remoteId": "00004", "legalEntity": { "id": "123", "type": "legal-entity", "url": "https://example.ilucca.net/lucca-api/legal-entities/123" }, "taxIdentificationNumber": { "format": "franceSIRET", "value": "0000000000000" }, "address": { "addressLines": [ "Lucca", "10 Place de la Joliette", "Les Docks Atrium 10.2" ], "postalCode": "13002", "locality": "Marseille", "administrativeArea": "Bouches-du-Rhône", "countryCode": "FRA" }, "timezoneId": "Europe/Paris", "isArchived": false, "lastArchivedAt": null, "createdAt": "2024-05-23T13:45:26.0001Z", "lastUpdatedAt": "2024-05-23T13:45:26.0001Z", "links": {}, "embedded": { "legal-entity": { "123": { "id": "123", "type": "legal-entity" } } } } ``` -------------------------------- ### Employment GET Example Source: https://developers.lucca.fr/api-reference/latest/employments/get-employment An example of a GET request for employment details. ```APIDOC ## GET /employments/{id} ### Description Retrieves the details of a specific employment record. ### Endpoint `/employments/{id}` ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the employment. ### Response #### Success Response (200) - **id** (string) - The unique identifier of the employment. - **type** (string) - The resource type, always 'employment'. - **url** (string) - The URL of the employment resource. - **remoteId** (string) - The remote system's identifier for the employment. - **employee** (object) - Reference to the employee associated with this employment. - **id** (string) - The unique identifier of the employee. - **type** (string) - The resource type, always 'employee'. - **url** (string) - The URL of the employee resource. - **legalEntity** (object) - Reference to the legal entity associated with this employment. - **id** (string) - The unique identifier of the legal entity. - **type** (string) - The resource type, always 'legal-entity'. - **url** (string) - The URL of the legal entity resource. - **status** (string) - The current status of the employment (e.g., 'active', 'inactive'). - **start** (object) - The start date of the employment. - **date** (string) - The start date in 'YYYY-MM-DD' format. - **end** (object or null) - The end date of the employment, if applicable. - **date** (string) - The end date in 'YYYY-MM-DD' format. - **document** (object) - Reference to the employment document. - **id** (string) - The unique identifier of the document. - **type** (string) - The resource type, always 'file'. - **url** (string) - The URL of the document resource. - **template** (object) - Reference to the employment template. - **id** (string) - The unique identifier of the template. - **type** (string) - The resource type, always 'employment-template'. - **url** (string) - The URL of the template resource. - **createdAt** (string) - The date and time the employment was created. - **lastUpdatedAt** (string) - The date and time the employment was last updated. ### Response Example ```json { "id": "4561", "type": "employment", "url": "https://example.ilucca.net/lucca-api/employments/4561", "remoteId": "EMPLOYMENT#4512-ac", "employee": { "id": "416", "type": "employee", "url": "https://example.ilucca.net/lucca-api/employees/416" }, "legalEntity": { "id": "123", "type": "legal-entity", "url": "https://example.ilucca.net/lucca-api/legal-entities/123" }, "status": "active", "start": { "date": "2024-01-01" }, "end": null, "document": { "id": "74411", "type": "file", "url": "https://example.ilucca.net/lucca-api/files/74411" }, "template": { "id": "4", "type": "employment-template", "url": "https://example.ilucca.net/lucca-api/employment-templates/4" }, "createdAt": "2024-04-15T23:12:54.0001Z", "lastUpdatedAt": "2024-04-15T23:12:54.0001Z" } ``` ``` -------------------------------- ### Get Taxonomy Labels Example Source: https://developers.lucca.fr/api-reference/latest/taxonomies/get-taxonomy-labels Example of how to retrieve taxonomy labels. This GET request demonstrates fetching a paginated list of labels. ```APIDOC ## GET /taxonomy-labels ### Description Retrieves a list of taxonomy labels. Supports pagination and filtering. ### Method GET ### Endpoint /taxonomy-labels ### Query Parameters - **limit** (integer) - Optional - The maximum number of items to return. - **page** (string) - Optional - Identifier for the next page of results. ### Response #### Success Response (200) - **type** (string) - The type of the resource, e.g., "taxonomy-labels". - **url** (string) - The URL for the current request. - **totalCount** (integer) - The total number of available taxonomy labels. - **items** (array) - An array of taxonomy label objects. - **id** (string) - The unique identifier for the taxonomy label. - **type** (string) - The type of the resource, e.g., "taxonomy-label". - **url** (string) - The URL of the specific taxonomy label. - **name** (string) - The name of the taxonomy label. - **remoteId** (string) - The remote identifier for the taxonomy label. - **createdAt** (string) - The date and time the label was created. - **lastUpdatedAt** (string) - The date and time the label was last updated. - **isArchived** (boolean) - Indicates if the label is archived. - **lastArchivedAt** (string) - The date and time the label was archived. - **links** (object) - Links for pagination. - **prev** (string) - URL for the previous page, or null if none. - **next** (string) - URL for the next page, or null if none. ### Request Example ```json { "example": "https://example.ilucca.net/lucca-api/taxonomy-labels?limit=25" } ``` ### Response Example ```json { "example": { "type": "taxonomy-labels", "url": "https://example.ilucca.net/lucca-api/taxonomy-labels?limit=25", "totalCount": 872, "items": [ { "id": "8751", "type": "taxonomy-label", "url": "https://example.ilucca.net/lucca-api/taxonomy-labels/8751", "taxonomy": { "id": "45", "type": "taxonomy", "url": "https://example.ilucca.net/lucca-api/taxonomies/45" }, "name": "XL", "remoteId": "tshirtSize.extraLarge", "createdAt": "2025-01-23T19:45:23Z", "lastUpdatedAt": "2025-01-23T19:45:23Z", "isArchived": false, "lastArchivedAt": null, "t9n": {}, "links": {} } ], "links": { "prev": null, "next": { "href": "https://example.ilucca.net/lucca-api/taxonomy-labels?page=2qs1dqsd45&limit=25" } }, "embedded": {} } } ``` ``` -------------------------------- ### Example Employee Personal Records GET Request Source: https://developers.lucca.fr/api-reference/latest/employees/get-employee-personal-records This example demonstrates a GET request to retrieve employee personal records. It includes query parameters for pagination and shows the structure of the expected response, including embedded employee details. ```json { "type": "employee-personal-records", "url": ">- https://example.ilucca.net/lucca-api/employee-personal-records?page=qsdkuh&limit=25", "items": [ { "id": "897", "type": "employee-personal-record", "url": "https://example.ilucca.net/lucca-api/employee-personal-records/897", "employee": { "id": "416", "type": "employee", "url": "https://example.ilucca.net/lucca-api/employees/416" }, "title": "mister", "legalGender": "male", "birthDate": "1989-12-21", "insuranceNumber": { "format": "frenchSSN", "value": "1760774865895 37" }, "nationalitiesCountryCodes": [ "FRA" ], "bankAccount": { "format": "iban", "bankName": "BNP Paribas", "accountIdentifier": "FR7630006000011234567890189", "bankIdentifier": null }, "phoneNumber": "+33456789634", "email": "jdoe13@gmail.com", "links": {} } ], "totalCount": 203, "links": { "prev": null, "next": { "href": ">- https://example.ilucca.net/lucca-api/employee-personal-records?page=!sdk87Sdh&limit=25" } }, "embedded": { "employee": { "416": { "id": "416", "type": "employee", "url": "https://example.ilucca.net/lucca-api/employees/416", "remoteId": "00002345", "portrait": { "id": "66512232", "type": "portrait", "url": "https://example.ilucca.net/lucca-api/portraits/66512232" }, "givenName": "Edward", "familyName": "Atkinson", "employeeNumber": "E000124", "status": "active", "email": "eatkinson@acme.corp", "birthDay": { "day": 22, "month": 12 }, "phoneNumber": "+33145784512", "applicableEmployment": { "id": "154", "type": "employment", "url": "https://example.ilucca.net/lucca-api/employments/154" }, "applicableJobPosition": { "id": "74", "type": "job-position", "url": "https://example.ilucca.net/lucca-api/job-positions/74" }, "createdAt": "2024-04-15T23:12:54.0001Z", "lastUpdatedAt": "2024-04-15T23:12:54.0001Z", "links": { "portrait": { "href": ">- https://example.ilucca.net/lucca-api/files/66512232?token=eyJhbGciOi" }, "employments": { "href": ">- https://example.ilucca.net/lucca-api/employments?employee.id=416" }, "jobPositions": { "href": ">- https://example.ilucca.net/lucca-api/job-positions?employment.employee.id=416" }, "personalRecord": { "href": ">- https://example.ilucca.net/lucca-api/employee-personal-records?employee.id=416" } } } } } } ``` -------------------------------- ### GET Business Establishments Example Source: https://developers.lucca.fr/api-reference/latest/organization/list-business-establishments This example demonstrates how to fetch a list of business establishments. It shows the structure of the response, including pagination details and embedded legal entity information. ```json { "type": "business-establishments", "url": "https://example.ilucca.net/lucca-api/business-establishments?limit=25", "totalCount": 28, "items": [ { "id": "5", "type": "business-establishment", "url": "https://example.ilucca.net/lucca-api/business-establishments/5", "name": "Lucca Marseille", "remoteId": "00004", "legalEntity": { "id": "123", "type": "legal-entity", "url": "https://example.ilucca.net/lucca-api/legal-entities/123" }, "taxIdentificationNumber": { "format": "franceSIRET", "value": "0000000000000" }, "address": { "addressLines": [ "Lucca", "10 Place de la Joliette", "Les Docks Atrium 10.2" ], "postalCode": "13002", "locality": "Marseille", "administrativeArea": "Bouches-du-Rhône", "countryCode": "FRA" }, "timezoneId": "Europe/Paris", "isArchived": false, "lastArchivedAt": null, "createdAt": "2024-05-23T13:45:26.0001Z", "lastUpdatedAt": "2024-05-23T13:45:26.0001Z", "links": {} } ], "links": { "prev": null, "next": { "href": "https://example.ilucca.net/lucca-api/business-establishments?page=!sdk87Sdh&limit=25" } }, "embedded": { "legal-entity": { "123": { "id": "123", "type": "legal-entity", "url": "https://example.ilucca.net/lucca-api/legal-entities/123", "legalName": "Lucca S.A.S.", "remoteId": "LE:83.2938", "countryCode": "FRA", "currencyCode": "EUR", "taxIdentificationNumber": { "format": "franceSIREN", "value": "44163769100128" }, "industryCode": { "format": "franceAPE", "value": "7022Z" }, "createdAt": "2024-01-01T08:34:23.0001Z", "lastUpdatedAt": "2024-01-01T08:34:23.0001Z", "lastArchivedAt": null, "links": { "businessEstablishments": { "href": "https://example.ilucca.net/lucca-api/business-establishments?legalEntity.id=123" } } } } } } ``` -------------------------------- ### Not Found Example (404) Source: https://developers.lucca.fr/api-reference/latest/taxonomies/get-taxonomy-label This example represents a 'Not Found' response, indicating that the requested resource does not exist or has been deleted. ```json { "type": "https://tools.ietf.org/html/rfc7231#section-6.5.4", "title": "Not Found", "status": 404, "instance": "https://example.ilucca.net/lucca-api/employees/1573" } ``` -------------------------------- ### Example of Sorting by Property Source: https://developers.lucca.fr/documentation/guidelines An example demonstrating the use of the 'sort' query parameter for a specific property. ```text /employees?sort=lastName ``` -------------------------------- ### Webhook Endpoint GET Example Source: https://developers.lucca.fr/api-reference/latest/webhooks/get-webhook-endpoint This example demonstrates the structure of a successful response when retrieving a webhook endpoint. It includes all relevant details about the endpoint's configuration and status. ```json { "id": "456789412", "type": "webhook-endpoint", "url": ">- https://example.ilucca.net/lucca-api/webhook-endpoints/93847DF7FDSF6D87SF", "name": "Test", "apiVersion": "2024-11-01", "webhookUrl": "https://i-am-aweso.me/lucca-webhooks/123", "topics": [ "employee.created", "employee.updated", "employee.deleted" ], "status": "active", "createdAt": "2023-04-23T09:23:54.001Z", "lastUpdatedAt": "2023-04-23T09:23:54.001Z", "links": {}, "embedded": {} } ``` -------------------------------- ### Professions GET Example Source: https://developers.lucca.fr/api-reference/latest/employee-job-qualifications/get-professions This example demonstrates how to retrieve a list of professions with pagination. It shows the structure of the response, including the total count, items, and navigation links. ```json { "type": "professions", "url": "https://example.ilucca.net/lucca-api/professions?limit=25", "totalCount": 29, "items": [ { "id": "89", "type": "profession", "url": "https://example.ilucca.net/lucca-api/professions/89", "title": "Developer", "isArchived": false, "t9n": { "title": { "fr-FR": "Développeur" } }, "links": {} } ], "links": { "prev": null, "next": { "href": ">- https://example.ilucca.net/lucca-api/professions?page=!43df&limit=25" } }, "embedded": {} } ``` -------------------------------- ### Example Event Reference Source: https://developers.lucca.fr/api-reference/latest/webhooks/get-webhook-delivery-attempts This example demonstrates the structure of a reference to an event resource. It includes the event's ID, type, and a URL for accessing the event details. ```json { "id": '2455623', "type": 'employee.created', "url": 'https://example.ilucca.net/lucca-api/events/2455623' } ``` -------------------------------- ### Webhook Delivery Attempt GET Example Source: https://developers.lucca.fr/api-reference/latest/webhooks/get-webhook-delivery-attempt This example shows the structure of a webhook delivery attempt object when retrieved via a GET request. It includes details about the attempt, the delivery, the event, and associated data. ```json { "id": "874", "type": "webhook-delivery-attempt", "url": "https://example.ilucca.net/lucca-api/webhook-delivery-attempts/874", "signature": "9087FD897DSF87D67F78SD6F876SD78F6SD7886F78SD6F87SD678F6SD78F6SD786FS876F78SD6F786FYJHXWYCV78C6FV7868S7FDS78", "webhookDelivery": { "id": "87", "type": "webhook-delivery", "url": "https://example.ilucca.net/lucca-api/webhook-deliveries/87" }, "isSuccessful": true, "responseStatusCode": 202, "errorResponseBody": "", "createdAt": "2024-04-03T09:23:56.235Z", "links": {}, "embedded": { "webhook-delivery": { "87": { "id": "87", "type": "webhook-delivery", "url": "https://example.ilucca.net/lucca-api/webhook-deliveries/87", "nextAttemptAt": "2023-08-29T09:12:33.001Z", "attemptsCount": 2, "status": "delivered", "event": { "id": "123", "type": "event", "url": "https://example.ilucca.net/lucca-api/events/123" }, "webhookEndpoint": { "id": "12", "type": "webhook-endpoint", "url": "https://example.ilucca.net/lucca-api/webhook-endpoints/12" }, "links": { "attempts": { "href": "https://example.ilucca.net/lucca-api/webhook-delivery-attempts?webhookDelivery.id=87" } } } }, "event": { "123": { "id": "123", "type": "event", "url": "https://example.ilucca.net/lucca-api/events/123", "apiVersion": "2024-01-01", "topic": "employee.updated", "occurredAt": "2024-02-01T09:34:23.001Z", "source": "https://example.ilucca.net", "businessEstablishment": { "id": "12", "type": "business-establishment", "url": "https://example.ilucca.net/lucca-api/business-establishments/12" }, "data": { "id": "416", "type": "employee", "url": "https://example.ilucca.net/lucca-api/employees/416", "remoteId": "00002345", "portrait": { "id": "66512232", "type": "portrait", "url": "https://example.ilucca.net/lucca-api/portraits/66512232" }, "givenName": "Edward", "familyName": "Atkinson", "employeeNumber": "E000124", "status": "active", "email": "eatkinson@acme.corp", "birthDay": { "day": 22, "month": 12 }, "phoneNumber": "+33145784512", "applicableEmployment": { "id": "154", "type": "employment", "url": "https://example.ilucca.net/lucca-api/employments/154" }, "applicableJobPosition": { "id": "74", "type": "job-position", "url": "https://example.ilucca.net/lucca-api/job-positions/74" }, "createdAt": "2024-04-15T23:12:54.0001Z", "lastUpdatedAt": "2024-04-15T23:12:54.0001Z" }, "previousAttributes": { "givenName": "Ed" }, "links": { "retry": { "href": "https://example.ilucca.net/lucca-api/webhook-deliveries" } } } } } } ``` -------------------------------- ### HTTP Request Example Source: https://developers.lucca.fr/documentation/using-api/paging Example of an HTTP GET request to retrieve a paginated list of employees, including total count and links, with a limit of 25 items per page. ```APIDOC ## GET /lucca-api/employees ### Description Retrieves a paginated list of employees. Supports filtering and inclusion of metadata like total count and navigation links. ### Method GET ### Endpoint /lucca-api/employees ### Query Parameters - **include** (string) - Optional - Specifies which additional data to include in the response. Can be `totalCount` and/or `links`. - **limit** (int) - Optional - The maximum number of items to return per page. Minimum is 0, maximum may vary by endpoint. - **page** (string or int) - Optional - For cursor-based pagination, this is the continuation token from a previous request. If provided as an integer (starting at 1), it requests indexed pages (not recommended). ### Request Example ```http GET /lucca-api/employees?include=totalCount,links&limit=25 HTTP/1.1 Host: example.ilucca.net Authorization: Bearer Api-Version: Accept: application/json ``` ### Response #### Success Response (200) - **items** (array) - The resources in the current page. - **totalCount** (int) - The total number of resources across all pages (only if `include=totalCount` is requested). - **links** (object) - Contains links to the previous and next pages (only if `include=links` is requested). - **prev** (object) - Link to the previous page. - **href** (string) - URL for the previous page. - **next** (object) - Link to the next page. - **href** (string) - URL for the next page. #### Response Example ```json { "url": "https://example.ilucca.net/lucca-api/employees", "type": "employees", "items": [], "totalCount": 2127, "links": { "prev": { "href": "https://example.ilucca.net/lucca-api/employees?include=totalCount,links&limit=25&page=!8e7" }, "next": { "href": "https://example.ilucca.net/lucca-api/employees?include=totalCount,links&limit=25&page=!S7DHF" } } } ``` ``` -------------------------------- ### HTTP Example for Filtering by Property Source: https://developers.lucca.fr/documentation/guidelines Demonstrates an HTTP GET request filtering employees by their 'payrollIdentifier'. Query parameter names should match property names and use camelCase. ```http GET /lucca-api/employees?payrollIdentifier=00123 HTTPS/1.1 ``` -------------------------------- ### Example Employee Data Source: https://developers.lucca.fr/api-reference/latest/employees/get-employees This example demonstrates the structure of a successful response when retrieving a list of employees. It includes pagination details and individual employee records with their associated links. ```json { "type": "employees", "url": "https://example.ilucca.net/lucca-api/employees?limit=25", "totalCount": 647, "items": [ { "id": "416", "type": "employee", "url": "https://example.ilucca.net/lucca-api/employees/416", "remoteId": "00002345", "portrait": { "id": "66512232", "type": "portrait", "url": "https://example.ilucca.net/lucca-api/portraits/66512232" }, "givenName": "Edward", "familyName": "Atkinson", "employeeNumber": "E000124", "status": "active", "email": "eatkinson@acme.corp", "birthDay": { "day": 22, "month": 12 }, "phoneNumber": "+33145784512", "applicableEmployment": { "id": "154", "type": "employment", "url": "https://example.ilucca.net/lucca-api/employments/154" }, "applicableJobPosition": { "id": "74", "type": "job-position", "url": "https://example.ilucca.net/lucca-api/job-positions/74" }, "createdAt": "2024-04-15T23:12:54.0001Z", "lastUpdatedAt": "2024-04-15T23:12:54.0001Z", "links": { "portrait": { "href": "https://example.ilucca.net/lucca-api/files/66512232?token=eyJhbGciOi" }, "employments": { "href": "https://example.ilucca.net/lucca-api/employments?employee.id=416" }, "jobPositions": { "href": "https://example.ilucca.net/lucca-api/job-positions?employment.employee.id=416" }, "personalRecord": { "href": "https://example.ilucca.net/lucca-api/employee-personal-records?employee.id=416" } } } ], "links": { "prev": null, "next": { "href": "https://example.ilucca.net/lucca-api/employees?page=!sdk87Sdh&limit=25" } } } ``` -------------------------------- ### Install Spectral CLI Source: https://developers.lucca.fr/documentation/guidelines Install the Spectral command-line interface globally using npm. This tool is used for linting API specifications. ```bash npm install -g @stoplight/spectral ```