openapi: 3.0.3 info: title: 'Alklima Public API' description: "Welcome to the API documentation for the Alklima Public API. This API allows external applications to securely communicate with our platform, enabling the use of our Single Sign-On (SSO) features and the ability to post and retrieve data via our machine-to-machine API.\n\n## Overview\n\nThis API offers the following features:\n\n* **Single Sign-On (SSO)**: Integrate seamlessly with our platform using the SSO functionality. This allows users to log in to your application through our system and securely share personal data. The functionality is based on the OAuth2 protocol.\n* **Machine-to-Machine API**: Utilize our RESTful API to enable automated data exchange between your systems and our platform. This API is designed for machine-to-machine interactions and uses the Client Credentials Grant to provide secure access. You can post, retrieve, and edit data according to the defined scopes.\n\n## Authentication and Authorization\n\nOur API uses the OAuth2 protocol for both authentication and authorization. This provides a flexible and secure way to access various functionalities of the API. Depending on your use case, you can choose different OAuth2 grants:\n\n* **Authorization Code Grant (SSO)**: Used for Single Sign-On, where a user logs in via our platform and consents to share their data with your application.\n* **Client Credentials Grant (Machine-to-Machine)**: Used for automated server-to-server interactions, where a specific client is granted access to certain API endpoints based on assigned scopes.\n\n### Configuration file\n\nThe configuration file for our SSO sign-in is available at https://alklima.nl/.well-known/openid-configuration.\n\n## Support and Feedback\n\nIf you have any questions or need support with the API, please contact our support team at [support@superlatief.nl](mailto:support@superlatief.nl). We always welcome feedback to help us improve our service." version: 1.0.0 servers: - url: 'https://staging.alklima.nl' paths: /passport/me: get: summary: 'Get user details' operationId: getUserDetails description: 'Returns the details of the authenticated user. Only works when authenticated with the `code` grant type.' parameters: [] responses: 200: description: OK content: application/json: schema: type: object example: sub: 4F26DFDF-1243-4FFA-9C3B-600B77EE6A5B name: 'Kick Koel' given_name: Kick family_name: Koel gender: male account: 'Kikkerkoel B.V.' email: kikkerkoel@alklima.nl email_verified: true properties: sub: type: string example: 4F26DFDF-1243-4FFA-9C3B-600B77EE6A5B description: 'Unique key of the user.' enum: [] name: type: string example: 'Kick Koel' description: 'Full name of the user. Only when scope `profile` is used.' enum: [] given_name: type: string example: Kick description: 'First name (given name) of the user. Only when scope `profile` is used.' enum: [] family_name: type: string example: Koel description: 'Surname (family name) of the user, including middle name. Only when scope `profile` is used.' enum: [] gender: type: string example: male description: 'Gender of the user, if known. Else it will be `unknown`. Only when scope `profile` is used.' enum: [] account: type: string example: 'Kikkerkoel B.V.' description: 'Name of the account of the user. Only when scope `profile` is used.' enum: [] email: type: string example: kikkerkoel@alklima.nl description: 'Email address of the user. Only when scope `email` is used.' enum: [] email_verified: type: boolean example: true description: 'Indication if the user verified the email address. Only when scope `email` is used.' enum: [] required: - sub 401: description: Unauthorized content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Authenticating /oauth/authorize: get: summary: 'OAuth2 Authorize' operationId: oAuth2Authorize description: "This endpoint is used to authorize a user via the OAuth2 authorization code flow. It should be opened in a browser.\n\nWhen the URL is opened, the user of the Alklima website can log in (if not already authenticated on the website) and confirm the sharing of their data with the client (if they haven't done so previously). If the authorization process is successful, the user will be redirected to the `redirect_uri`.\n" parameters: - in: query name: response_type description: 'The OAuth2 response type.' example: code required: true schema: type: string description: 'The OAuth2 response type.' example: code nullable: false - in: query name: client_id description: 'The client ID issued to the client during registration.' example: 1 required: true schema: type: string description: 'The client ID issued to the client during registration.' example: 1 nullable: false - in: query name: redirect_uri description: 'The URI to redirect to after authorization is granted or denied.' example: 'https://yourapp.com/callback' required: true schema: type: string description: 'The URI to redirect to after authorization is granted or denied.' example: 'https://yourapp.com/callback' nullable: false - in: query name: scope description: 'The scope of the access request.' example: read required: false schema: type: 'openid profile email' description: 'The scope of the access request.' example: read nullable: false enum: - openid - profile - email - in: query name: state description: 'An opaque value used by the client to maintain state between the request and callback.' example: abc123 required: false schema: type: string description: 'An opaque value used by the client to maintain state between the request and callback.' example: abc123 nullable: false responses: 302: description: 'Redirects to the provided `redirect_uri` with the authorization code or error parameters.' content: application/json: schema: type: object nullable: true 400: description: 'Invalid request parameters.' content: application/json: schema: type: object nullable: true tags: - Authenticating security: [] /oauth/token: post: summary: 'Obtain Access Token' operationId: obtainAccessToken description: 'This endpoint issues an access token and optionally a refresh token for authorized clients via OAuth2.' parameters: [] responses: 200: description: 'Successful token issuance' content: application/json: schema: type: object example: access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c token_type: Bearer expires_in: 7200 properties: access_token: type: string example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c token_type: type: string example: Bearer expires_in: type: integer example: 7200 400: description: 'Invalid request parameters or authorization failure.' content: application/json: schema: type: object nullable: true tags: - Authenticating requestBody: required: true content: application/json: schema: type: object properties: grant_type: type: string description: 'The OAuth2 grant type.' example: client_credentials nullable: false enum: - client_credentials - code client_id: type: string description: 'The client ID issued to the client during registration.' example: 1 nullable: false client_secret: type: string description: 'The client secret issued to the client during registration.' example: secret nullable: false code: type: string description: 'The authorization code received from the authorization endpoint. Required for `code` grant type.' example: xyz123 nullable: false redirect_uri: type: string description: 'The URI to redirect to after authorization. Required for `code` grant type.' example: 'https://yourapp.com/callback' nullable: false scope: type: string description: 'The scope of the access request. Required for `client_credentials` grant type. Multiple scopes should be added as a space seperated list' example: 'leads returnorders' nullable: false enum: - leads - returnorders required: - grant_type - client_id - client_secret security: [] /passport/leads: get: summary: 'Get all leads' operationId: getAllLeads description: "Returns an overview of the leads. By using query parameters, you can\nadjust the amount of data per page or filter entities to retrieve only\nthe leads created since a specified date." parameters: - in: query name: page description: 'Page to request when data has pagination.' example: 6 required: false schema: type: integer description: 'Page to request when data has pagination.' example: 6 nullable: true - in: query name: per_page description: 'Number of items per page. Must be at least 1. Must not be greater than 1000.' example: 25 required: false schema: type: integer description: 'Number of items per page. Must be at least 1. Must not be greater than 1000.' example: 25 nullable: true - in: query name: since description: 'Filter for the items that are mutated since the datetime in UTC. Must be a valid date in the format Y-m-d H:i:s. Must be a date before or equal to now.' example: '2024-08-10 12:00:00' required: false schema: type: string description: 'Filter for the items that are mutated since the datetime in UTC. Must be a valid date in the format Y-m-d H:i:s. Must be a date before or equal to now.' example: '2024-08-10 12:00:00' nullable: true - in: query name: data description: 'Boolean indicating if the `data` element should be included in the response, default `false`.' example: false required: false schema: type: boolean description: 'Boolean indicating if the `data` element should be included in the response, default `false`.' example: false nullable: true - in: query name: selection description: 'Boolean indicating if the `selection` element should be included in the response, default `false`.' example: false required: false schema: type: boolean description: 'Boolean indicating if the `selection` element should be included in the response, default `false`.' example: false nullable: true - in: query name: advice description: 'Boolean indicating if the `advice` element should be included in the response, default `false`.' example: false required: false schema: type: boolean description: 'Boolean indicating if the `advice` element should be included in the response, default `false`.' example: false nullable: true responses: 200: description: '' content: application/json: schema: oneOf: - description: OK type: object example: data: - id: 1 firstname: Imke middlename: de lastname: Mol email: devries.mads@yahoo.nl phone: '+31101234567' discount_code: hwcf-es8o4v type: airco installation_date: next_three_months created_at: '2024-08-14T15:06:07+00:00' updated_at: '2024-08-14T15:06:07+00:00' lead_datetime: '2024-08-01T12:30:00+00:00' address: street: Barentspad street_number: '794' street_number_extension: null postcode: 3704MK city: Oirschot country: Nederland - id: 2 firstname: Ryan middlename: de lastname: Prins email: lukas45@gerritsen.nl phone: '+31204786235' discount_code: null type: heatpump installation_date: asap created_at: '2024-08-14T15:06:07+00:00' updated_at: '2024-08-14T15:06:07+00:00' lead_datetime: '2024-08-01T12:30:00+00:00' address: street: Ramautarsingel street_number: '4' street_number_extension: null postcode: 3015XB city: Sebaldeburen country: Nederland - id: 3 firstname: Julius middlename: 'van de' lastname: Yalçin email: deboer.femke@kort.nl phone: '+31186698731' discount_code: null type: heatpump installation_date: next_three_months created_at: '2024-08-14T15:06:07+00:00' updated_at: '2024-08-14T15:06:07+00:00' lead_datetime: '2024-08-01T12:30:00+00:00' address: street: Kuipersboulevard street_number: '2' street_number_extension: null postcode: 9801TA city: Westerlee country: Nederland - id: 4 firstname: Sander middlename: 'van de' lastname: Can email: iwolters@janszmuskustepasque.org phone: '+31789653265' discount_code: hwcf-es8o4v type: airco installation_date: later created_at: '2024-08-14T15:06:07+00:00' updated_at: '2024-08-14T15:06:07+00:00' lead_datetime: '2024-08-01T12:30:00+00:00' address: street: 'den Buytelaardreef' street_number: '1' street_number_extension: null postcode: 8521DE city: Altforst country: Nederland - id: 5 firstname: Tijmen middlename: de lastname: Maas email: msalet@dejonge.com phone: '+31614698523' discount_code: hwcf-es8o4v type: airco installation_date: next_three_months created_at: '2024-08-14T15:06:07+00:00' updated_at: '2024-08-14T15:06:07+00:00' lead_datetime: '2024-08-01T12:30:00+00:00' address: street: 'van de Walsingel' street_number: '267' street_number_extension: null postcode: 5684CP city: Offingawier country: Nederland links: first: 'https://alklima.nl/passport/leads?page=1' last: 'https://alklima.nl/passport/leads?page=5' prev: null next: 'https://alklima.nl/passport/leads?page=2' meta: current_page: 1 from: 1 last_page: 53 links: - url: null label: '« Previous' active: false - url: 'https://alklima.nl/passport/leads?page=1' label: '1' active: true - url: 'https://alklima.nl/passport/leads?page=2' label: '2' active: false - url: 'https://alklima.nl/passport/leads?page=3' label: '3' active: false - url: 'https://alklima.nl/passport/leads?page=2' label: 'Next »' active: false path: 'https://alklima.nl/passport/leads' per_page: 5 to: 5 total: 25 properties: data: type: array example: - id: 1 firstname: Imke middlename: de lastname: Mol email: devries.mads@yahoo.nl phone: '+31101234567' discount_code: hwcf-es8o4v type: airco installation_date: next_three_months created_at: '2024-08-14T15:06:07+00:00' updated_at: '2024-08-14T15:06:07+00:00' lead_datetime: '2024-08-01T12:30:00+00:00' address: street: Barentspad street_number: '794' street_number_extension: null postcode: 3704MK city: Oirschot country: Nederland - id: 2 firstname: Ryan middlename: de lastname: Prins email: lukas45@gerritsen.nl phone: '+31204786235' discount_code: null type: heatpump installation_date: asap created_at: '2024-08-14T15:06:07+00:00' updated_at: '2024-08-14T15:06:07+00:00' lead_datetime: '2024-08-01T12:30:00+00:00' address: street: Ramautarsingel street_number: '4' street_number_extension: null postcode: 3015XB city: Sebaldeburen country: Nederland - id: 3 firstname: Julius middlename: 'van de' lastname: Yalçin email: deboer.femke@kort.nl phone: '+31186698731' discount_code: null type: heatpump installation_date: next_three_months created_at: '2024-08-14T15:06:07+00:00' updated_at: '2024-08-14T15:06:07+00:00' lead_datetime: '2024-08-01T12:30:00+00:00' address: street: Kuipersboulevard street_number: '2' street_number_extension: null postcode: 9801TA city: Westerlee country: Nederland - id: 4 firstname: Sander middlename: 'van de' lastname: Can email: iwolters@janszmuskustepasque.org phone: '+31789653265' discount_code: hwcf-es8o4v type: airco installation_date: later created_at: '2024-08-14T15:06:07+00:00' updated_at: '2024-08-14T15:06:07+00:00' lead_datetime: '2024-08-01T12:30:00+00:00' address: street: 'den Buytelaardreef' street_number: '1' street_number_extension: null postcode: 8521DE city: Altforst country: Nederland - id: 5 firstname: Tijmen middlename: de lastname: Maas email: msalet@dejonge.com phone: '+31614698523' discount_code: hwcf-es8o4v type: airco installation_date: next_three_months created_at: '2024-08-14T15:06:07+00:00' updated_at: '2024-08-14T15:06:07+00:00' lead_datetime: '2024-08-01T12:30:00+00:00' address: street: 'van de Walsingel' street_number: '267' street_number_extension: null postcode: 5684CP city: Offingawier country: Nederland description: 'Array with objects containing the data of each entity.' enum: [] items: type: object properties: id: type: integer example: 1 description: 'ID of the lead.' enum: [] firstname: type: string example: Imke description: 'First name of the contact person of the lead.' enum: [] middlename: type: string example: de description: 'Middle name of the contact person of the lead.' enum: [] lastname: type: string example: Mol description: 'Last name of the contact person of the lead.' enum: [] email: type: string example: devries.mads@yahoo.nl description: 'Email address of the contact person of the lead.' enum: [] phone: type: string example: '+31101234567' description: 'Phone of the contact person of the lead, formatted in [E.164](https://en.wikipedia.org/wiki/E.164).' enum: [] discount_code: type: string example: hwcf-es8o4v description: 'Discount code used for the lead.' enum: [] type: type: string example: airco description: 'Type of the lead.' enum: - heatpump - airco installation_date: type: string example: next_three_months description: 'Preferred installation date.' enum: - asap - next_three_months - later created_at: type: string example: '2024-08-14T15:06:07+00:00' description: 'Datetime in UTC when the lead was created (in the API).' enum: [] updated_at: type: string example: '2024-08-14T15:06:07+00:00' description: 'Datetime in UTC when the lead was updated.' enum: [] lead_datetime: type: string example: '2024-08-01T12:30:00+00:00' description: 'Datetime in UTC when the lead was submitted (on the website).' enum: [] address: type: object properties: street: type: string example: Barentspad description: 'Street of the address of the lead.' enum: [] street_number: type: string example: '794' description: 'Street number of the address of the lead.' enum: [] street_number_extension: type: string example: null description: 'Street number extension of the address of the lead.' enum: [] postcode: type: string example: 3704MK description: 'Postcode of the address of the lead.' enum: [] city: type: string example: Oirschot description: 'City of the address of the lead.' enum: [] country: type: string example: Nederland description: 'Country of the address of the lead.' enum: [] required: - street - street_number - street_number_extension - postcode - city - country description: 'Object with the data of the address of the lead.' required: - id - firstname - middlename - lastname - email - phone - discount_code - type - installation_date - created_at - updated_at - lead_datetime - address links: type: object properties: first: type: string example: 'https://alklima.nl/passport/leads?page=1' last: type: string example: 'https://alklima.nl/passport/leads?page=5' prev: type: string example: null next: type: string example: 'https://alklima.nl/passport/leads?page=2' meta: type: object properties: current_page: type: integer example: 1 from: type: integer example: 1 last_page: type: integer example: 53 links: type: array example: - url: null label: '« Previous' active: false - url: 'https://alklima.nl/passport/leads?page=1' label: '1' active: true - url: 'https://alklima.nl/passport/leads?page=2' label: '2' active: false - url: 'https://alklima.nl/passport/leads?page=3' label: '3' active: false - url: 'https://alklima.nl/passport/leads?page=2' label: 'Next »' active: false items: type: object properties: url: type: string example: null label: type: string example: '« Previous' active: type: boolean example: false path: type: string example: 'https://alklima.nl/passport/leads' per_page: type: integer example: 5 to: type: integer example: 5 total: type: integer example: 25 required: - data - description: 'OK (all fields)' type: object example: data: - id: 1 firstname: Jett middlename: null lastname: Reichel email: Luther.Kunze@example.org phone: '+31101234567' discount_code: hwcf-es8o4v type: airco installation_date: asap created_at: '2024-10-07T10:25:54+00:00' updated_at: '2024-10-09T09:34:06+00:00' data: model: wall rooms: 2 room_volume: - 10 - 25 operating_principle: chill_heating year_of_construction: 2029 selection: - answer: 'Et et repudiandae quisquam temporibus ut.' question: 'Vel odio et in est totam optio necessitatibus deleniti aut.' - answer: 'Accusantium natus voluptatem vero velit animi.' question: 'Rerum qui est qui voluptas aut ut exercitationem voluptatem.' advice: 'Dolor harum et.' lead_datetime: '2024-08-01T12:30:00+00:00' address: street: 'Malvina Trail' street_number: '275' street_number_extension: null postcode: 1234AB city: 'West Kevonland' country: Colombia - id: 2 firstname: Jaylan middlename: null lastname: Wuckert email: Glennie_Watsica48@example.net phone: '+31101234567' discount_code: null type: heatpump installation_date: next_three_months created_at: '2024-10-07T10:26:15+00:00' updated_at: '2024-10-07T10:26:15+00:00' data: volume: 750 surface: 250 gas_usage: 1700 residents: 5 insulation: - floor - wall power_usage: 4500 building_type: detached_house delivery_system: radiators year_of_construction: '2000' selection: - answer: 'Alias doloremque commodi esse fugiat.' question: 'Reiciendis enim est.' - answer: 'Maxime aliquam occaecati fugiat est.' question: 'Odit nihil sed.' advice: 'At est blanditiis necessitatibus sapiente sed in illo ut distinctio.' lead_datetime: '2024-08-01T12:30:00+00:00' address: street: 'Hunter Green' street_number: '557' street_number_extension: null postcode: 1234AB city: 'East Ebonyshire' country: 'Netherlands Antilles' - id: 3 firstname: June middlename: null lastname: Blick email: Margarett52@example.org phone: '+31101234567' discount_code: null type: airco installation_date: asap created_at: '2024-10-07T12:15:27+00:00' updated_at: '2024-10-07T12:15:27+00:00' data: model: wall rooms: 2 room_volume: - 10 - 25 operating_principle: chill_heating year_of_construction: 2029 selection: - answer: 'Et delectus ipsa omnis voluptatem.' question: 'Qui quibusdam vitae.' - answer: 'Aliquam impedit enim corrupti consequuntur harum incidunt velit error.' question: 'Velit consequatur in deleniti rem omnis molestiae sed.' advice: 'Et blanditiis nesciunt quia modi voluptas pariatur et.' lead_datetime: '2024-08-01T12:30:00+00:00' address: street: 'Rempel Wall' street_number: '66' street_number_extension: null postcode: 1234AB city: 'South Edgardo' country: Spain - id: 4 firstname: Hazel middlename: null lastname: Hartmann email: Tania.Rohan@example.net phone: '+31101234567' discount_code: hwcf-es8o4v type: heatpump installation_date: next_three_months created_at: '2024-10-07T12:16:01+00:00' updated_at: '2024-10-07T12:16:01+00:00' data: volume: 750 surface: 250 gas_usage: 1700 residents: 5 insulation: - floor - wall power_usage: 4500 building_type: detached_house delivery_system: radiators year_of_construction: '2000' selection: - answer: 'Asperiores vel alias.' question: 'Culpa nisi voluptatem est sit.' - answer: 'Aliquid illum nobis nihil excepturi quaerat excepturi harum molestiae.' question: 'Et rerum harum.' advice: 'Magni praesentium harum dolores tempora.' lead_datetime: '2024-08-01T12:30:00+00:00' address: street: 'Elwyn Street' street_number: '427' street_number_extension: null postcode: 1234AB city: 'Port Santiago' country: Belize - id: 5 firstname: Eva middlename: null lastname: Keebler email: Keegan90@example.org phone: '+31101234567' discount_code: hwcf-es8o4v type: airco installation_date: asap created_at: '2024-10-07T12:16:13+00:00' updated_at: '2024-10-07T12:16:13+00:00' data: model: wall rooms: 2 room_volume: - 10 - 25 operating_principle: chill_heating year_of_construction: 2029 selection: - answer: 'Quis qui ducimus possimus voluptatem eligendi.' question: 'Distinctio fugiat quibusdam aut provident.' - answer: 'Id est tempore.' question: 'Minima quia labore veritatis quod.' advice: 'Facilis doloremque voluptatem eius est atque alias est.' lead_datetime: '2024-08-01T12:30:00+00:00' address: street: 'Walter Knoll' street_number: '109' street_number_extension: null postcode: 1234AB city: Ortizview country: China links: first: 'https://alklima.nl/passport/leads?page=1' last: 'https://alklima.nl/passport/leads?page=3' prev: null next: 'https://alklima.nl/passport/leads?page=2' meta: current_page: 1 from: 1 last_page: 3 links: - url: null label: '« Previous' active: false - url: 'https://alklima.nl/passport/leads?page=1' label: '1' active: true - url: 'https://alklima.nl/passport/leads?page=2' label: '2' active: false - url: 'https://alklima.nl/passport/leads?page=3' label: '3' active: false - url: 'https://alklima.nl/passport/leads?page=2' label: 'Next »' active: false path: 'https://alklima.nl/passport/leads' per_page: 5 to: 5 total: 11 properties: data: type: array example: - id: 1 firstname: Jett middlename: null lastname: Reichel email: Luther.Kunze@example.org phone: '+31101234567' discount_code: hwcf-es8o4v type: airco installation_date: asap created_at: '2024-10-07T10:25:54+00:00' updated_at: '2024-10-09T09:34:06+00:00' data: model: wall rooms: 2 room_volume: - 10 - 25 operating_principle: chill_heating year_of_construction: 2029 selection: - answer: 'Et et repudiandae quisquam temporibus ut.' question: 'Vel odio et in est totam optio necessitatibus deleniti aut.' - answer: 'Accusantium natus voluptatem vero velit animi.' question: 'Rerum qui est qui voluptas aut ut exercitationem voluptatem.' advice: 'Dolor harum et.' lead_datetime: '2024-08-01T12:30:00+00:00' address: street: 'Malvina Trail' street_number: '275' street_number_extension: null postcode: 1234AB city: 'West Kevonland' country: Colombia - id: 2 firstname: Jaylan middlename: null lastname: Wuckert email: Glennie_Watsica48@example.net phone: '+31101234567' discount_code: null type: heatpump installation_date: next_three_months created_at: '2024-10-07T10:26:15+00:00' updated_at: '2024-10-07T10:26:15+00:00' data: volume: 750 surface: 250 gas_usage: 1700 residents: 5 insulation: - floor - wall power_usage: 4500 building_type: detached_house delivery_system: radiators year_of_construction: '2000' selection: - answer: 'Alias doloremque commodi esse fugiat.' question: 'Reiciendis enim est.' - answer: 'Maxime aliquam occaecati fugiat est.' question: 'Odit nihil sed.' advice: 'At est blanditiis necessitatibus sapiente sed in illo ut distinctio.' lead_datetime: '2024-08-01T12:30:00+00:00' address: street: 'Hunter Green' street_number: '557' street_number_extension: null postcode: 1234AB city: 'East Ebonyshire' country: 'Netherlands Antilles' - id: 3 firstname: June middlename: null lastname: Blick email: Margarett52@example.org phone: '+31101234567' discount_code: null type: airco installation_date: asap created_at: '2024-10-07T12:15:27+00:00' updated_at: '2024-10-07T12:15:27+00:00' data: model: wall rooms: 2 room_volume: - 10 - 25 operating_principle: chill_heating year_of_construction: 2029 selection: - answer: 'Et delectus ipsa omnis voluptatem.' question: 'Qui quibusdam vitae.' - answer: 'Aliquam impedit enim corrupti consequuntur harum incidunt velit error.' question: 'Velit consequatur in deleniti rem omnis molestiae sed.' advice: 'Et blanditiis nesciunt quia modi voluptas pariatur et.' lead_datetime: '2024-08-01T12:30:00+00:00' address: street: 'Rempel Wall' street_number: '66' street_number_extension: null postcode: 1234AB city: 'South Edgardo' country: Spain - id: 4 firstname: Hazel middlename: null lastname: Hartmann email: Tania.Rohan@example.net phone: '+31101234567' discount_code: hwcf-es8o4v type: heatpump installation_date: next_three_months created_at: '2024-10-07T12:16:01+00:00' updated_at: '2024-10-07T12:16:01+00:00' data: volume: 750 surface: 250 gas_usage: 1700 residents: 5 insulation: - floor - wall power_usage: 4500 building_type: detached_house delivery_system: radiators year_of_construction: '2000' selection: - answer: 'Asperiores vel alias.' question: 'Culpa nisi voluptatem est sit.' - answer: 'Aliquid illum nobis nihil excepturi quaerat excepturi harum molestiae.' question: 'Et rerum harum.' advice: 'Magni praesentium harum dolores tempora.' lead_datetime: '2024-08-01T12:30:00+00:00' address: street: 'Elwyn Street' street_number: '427' street_number_extension: null postcode: 1234AB city: 'Port Santiago' country: Belize - id: 5 firstname: Eva middlename: null lastname: Keebler email: Keegan90@example.org phone: '+31101234567' discount_code: hwcf-es8o4v type: airco installation_date: asap created_at: '2024-10-07T12:16:13+00:00' updated_at: '2024-10-07T12:16:13+00:00' data: model: wall rooms: 2 room_volume: - 10 - 25 operating_principle: chill_heating year_of_construction: 2029 selection: - answer: 'Quis qui ducimus possimus voluptatem eligendi.' question: 'Distinctio fugiat quibusdam aut provident.' - answer: 'Id est tempore.' question: 'Minima quia labore veritatis quod.' advice: 'Facilis doloremque voluptatem eius est atque alias est.' lead_datetime: '2024-08-01T12:30:00+00:00' address: street: 'Walter Knoll' street_number: '109' street_number_extension: null postcode: 1234AB city: Ortizview country: China description: 'Array with objects containing the data of each entity.' enum: [] items: type: object properties: id: type: integer example: 1 description: 'ID of the lead.' enum: [] firstname: type: string example: Jett description: 'First name of the contact person of the lead.' enum: [] middlename: type: string example: null description: 'Middle name of the contact person of the lead.' enum: [] lastname: type: string example: Reichel description: 'Last name of the contact person of the lead.' enum: [] email: type: string example: Luther.Kunze@example.org description: 'Email address of the contact person of the lead.' enum: [] phone: type: string example: '+31101234567' description: 'Phone of the contact person of the lead, formatted in [E.164](https://en.wikipedia.org/wiki/E.164).' enum: [] discount_code: type: string example: hwcf-es8o4v description: 'Discount code used for the lead.' enum: [] type: type: string example: airco description: 'Type of the lead.' enum: - heatpump - airco installation_date: type: string example: asap description: 'Preferred installation date.' enum: - asap - next_three_months - later created_at: type: string example: '2024-10-07T10:25:54+00:00' description: 'Datetime in UTC when the lead was created (in the API).' enum: [] updated_at: type: string example: '2024-10-09T09:34:06+00:00' description: 'Datetime in UTC when the lead was updated.' enum: [] data: type: object properties: model: type: string example: wall description: 'Model type of the airco.' enum: - floor - wall - ceiling - unknown rooms: type: integer example: 2 description: 'Number of rooms to fit an airco.' enum: [] room_volume: type: array example: - 10 - 25 description: 'Volume of each of the rooms.' enum: [] items: type: integer operating_principle: type: string example: chill_heating description: 'Operating principle of the airco.' enum: - chill - chill_heating year_of_construction: type: integer example: 2029 description: 'Year of construction of the building.' enum: [] required: - model - rooms - room_volume - operating_principle - year_of_construction description: 'Object with data specific to the type of the lead.' selection: type: array example: - answer: 'Et et repudiandae quisquam temporibus ut.' question: 'Vel odio et in est totam optio necessitatibus deleniti aut.' - answer: 'Accusantium natus voluptatem vero velit animi.' question: 'Rerum qui est qui voluptas aut ut exercitationem voluptatem.' description: 'Array with objects of the questions and answers from the selection tool.' enum: [] items: type: object properties: answer: type: string example: 'Et et repudiandae quisquam temporibus ut.' description: 'The answer.' enum: [] question: type: string example: 'Vel odio et in est totam optio necessitatibus deleniti aut.' description: 'The question.' enum: [] required: - answer - question advice: type: string example: 'Dolor harum et.' description: 'Advice of the selection tool.' enum: [] lead_datetime: type: string example: '2024-08-01T12:30:00+00:00' description: 'Datetime in UTC when the lead was submitted (on the website).' enum: [] address: type: object properties: street: type: string example: 'Malvina Trail' description: 'Street of the address of the lead.' enum: [] street_number: type: string example: '275' description: 'Street number of the address of the lead.' enum: [] street_number_extension: type: string example: null description: 'Street number extension of the address of the lead.' enum: [] postcode: type: string example: 1234AB description: 'Postcode of the address of the lead.' enum: [] city: type: string example: 'West Kevonland' description: 'City of the address of the lead.' enum: [] country: type: string example: Colombia description: 'Country of the address of the lead.' enum: [] required: - street - street_number - street_number_extension - postcode - city - country description: 'Object with the data of the address of the lead.' required: - id - firstname - middlename - lastname - email - phone - discount_code - type - installation_date - created_at - updated_at - data - selection - advice - lead_datetime - address links: type: object properties: first: type: string example: 'https://alklima.nl/passport/leads?page=1' last: type: string example: 'https://alklima.nl/passport/leads?page=3' prev: type: string example: null next: type: string example: 'https://alklima.nl/passport/leads?page=2' meta: type: object properties: current_page: type: integer example: 1 from: type: integer example: 1 last_page: type: integer example: 3 links: type: array example: - url: null label: '« Previous' active: false - url: 'https://alklima.nl/passport/leads?page=1' label: '1' active: true - url: 'https://alklima.nl/passport/leads?page=2' label: '2' active: false - url: 'https://alklima.nl/passport/leads?page=3' label: '3' active: false - url: 'https://alklima.nl/passport/leads?page=2' label: 'Next »' active: false items: type: object properties: url: type: string example: null label: type: string example: '« Previous' active: type: boolean example: false path: type: string example: 'https://alklima.nl/passport/leads' per_page: type: integer example: 5 to: type: integer example: 5 total: type: integer example: 11 required: - data 401: description: Unauthorized content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Leads '/passport/leads/{id}': get: summary: 'Get a single lead' operationId: getASingleLead description: 'Returns the details of a single lead.' parameters: [] responses: 200: description: '' content: application/json: schema: oneOf: - description: 'OK (type: `airco`)' type: object example: data: id: 1 firstname: Imke middlename: de lastname: Mol email: devries.mads@yahoo.nl phone: '+31101234567' discount_code: hwcf-es8o4v type: airco created_at: '2024-08-14T15:06:07+00:00' updated_at: '2024-08-14T15:06:07+00:00' lead_datetime: '2024-08-01T12:30:00+00:00' address: street: Barentspad street_number: '794' street_number_extension: null postcode: 3704MK city: Oirschot country: Nederland data: model: wall rooms: 2 room_volume: - 10 - 25 operating_principle: chill_heating year_of_construction: 2024 selection: - answer: 'Odit accusantium dolores.' question: 'Aut nemo repudiandae est eligendi itaque sit est ad sapiente.' - answer: 'Voluptas sed dolor voluptas.' question: 'Voluptatum est et omnis et aut autem est est.' advice: 'Omnis iure qui voluptas iusto.' properties: data: type: object properties: id: type: integer example: 1 description: 'ID of the lead.' enum: [] firstname: type: string example: Imke description: 'First name of the contact person of the lead.' enum: [] middlename: type: string example: de description: 'Middle name of the contact person of the lead.' enum: [] lastname: type: string example: Mol description: 'Last name of the contact person of the lead.' enum: [] email: type: string example: devries.mads@yahoo.nl description: 'Email address of the contact person of the lead.' enum: [] phone: type: string example: '+31101234567' description: 'Phone of the contact person of the lead, formatted in [E.164](https://en.wikipedia.org/wiki/E.164).' enum: [] discount_code: type: string example: hwcf-es8o4v description: 'Discount code used for the lead.' enum: [] type: type: string example: airco description: 'Type of the lead.' enum: - heatpump - airco created_at: type: string example: '2024-08-14T15:06:07+00:00' description: 'Datetime in UTC when the lead was created (in the API).' enum: [] updated_at: type: string example: '2024-08-14T15:06:07+00:00' description: 'Datetime in UTC when the lead was updated.' enum: [] lead_datetime: type: string example: '2024-08-01T12:30:00+00:00' description: 'Datetime in UTC when the lead was submitted (on the website).' enum: [] address: type: object properties: street: type: string example: Barentspad description: 'Street of the address of the lead.' enum: [] street_number: type: string example: '794' description: 'Street number of the address of the lead.' enum: [] street_number_extension: type: string example: null description: 'Street number extension of the address of the lead.' enum: [] postcode: type: string example: 3704MK description: 'Postcode of the address of the lead.' enum: [] city: type: string example: Oirschot description: 'City of the address of the lead.' enum: [] country: type: string example: Nederland description: 'Country of the address of the lead.' enum: [] required: - street - street_number - street_number_extension - postcode - city - country description: 'Object with the data of the address of the lead.' data: type: object properties: model: type: string example: wall description: 'Model type of the airco.' enum: - floor - wall - ceiling - unknown rooms: type: integer example: 2 description: 'Number of rooms to fit an airco.' enum: [] room_volume: type: array example: - 10 - 25 description: 'Volume of each of the rooms.' enum: [] items: type: integer operating_principle: type: string example: chill_heating description: 'Operating principle of the airco.' enum: - chill - chill_heating year_of_construction: type: integer example: 2024 description: 'Year of construction of the building.' enum: [] required: - model - rooms - room_volume - operating_principle - year_of_construction description: 'Object with data specific to the type of the lead.' selection: type: array example: - answer: 'Odit accusantium dolores.' question: 'Aut nemo repudiandae est eligendi itaque sit est ad sapiente.' - answer: 'Voluptas sed dolor voluptas.' question: 'Voluptatum est et omnis et aut autem est est.' description: 'Array with objects of the questions and answers from the selection tool.' enum: [] items: type: object properties: answer: type: string example: 'Odit accusantium dolores.' description: 'The answer.' enum: [] question: type: string example: 'Aut nemo repudiandae est eligendi itaque sit est ad sapiente.' description: 'The question.' enum: [] required: - answer - question advice: type: string example: 'Omnis iure qui voluptas iusto.' description: 'Advice of the selection tool.' enum: [] required: - id - firstname - middlename - lastname - email - phone - discount_code - type - created_at - updated_at - lead_datetime - address - data - selection - advice description: 'Object with the data of the entity.' required: - data - description: 'OK (type: `heatpump`)' type: object example: data: id: 1 firstname: Imke middlename: de lastname: Mol email: devries.mads@yahoo.nl phone: '+31101234567' discount_code: hwcf-es8o4v type: airco created_at: '2024-08-14T15:06:07+00:00' updated_at: '2024-08-14T15:06:07+00:00' lead_datetime: '2024-08-01T12:30:00+00:00' address: street: Barentspad street_number: '794' street_number_extension: null postcode: 3704MK city: Oirschot country: België installation_date: asap data: volume: 99 surface: 82 gas_usage: 518 residents: 10 insulation: - floor - wall power_usage: 9374 building_type: terraced_house delivery_system: radiators year_of_construction: 2024 selection: - answer: null question: null - answer: 'Enim repellat ab ea dolorem ut perferendis.' question: 'Qui voluptatem ullam ipsa sit quisquam ipsa.' advice: 'Consequatur consequuntur ut accusamus rerum officiis.' properties: data: type: object properties: id: type: integer example: 1 description: 'ID of the lead.' enum: [] firstname: type: string example: Imke description: 'First name of the contact person of the lead.' enum: [] middlename: type: string example: de description: 'Middle name of the contact person of the lead.' enum: [] lastname: type: string example: Mol description: 'Last name of the contact person of the lead.' enum: [] email: type: string example: devries.mads@yahoo.nl description: 'Email address of the contact person of the lead.' enum: [] phone: type: string example: '+31101234567' description: 'Phone of the contact person of the lead, formatted in [E.164](https://en.wikipedia.org/wiki/E.164).' enum: [] discount_code: type: string example: hwcf-es8o4v description: 'Discount code used for the lead.' enum: [] type: type: string example: airco description: 'Type of the lead.' enum: - heatpump - airco created_at: type: string example: '2024-08-14T15:06:07+00:00' description: 'Datetime in UTC when the lead was created (in the API).' enum: [] updated_at: type: string example: '2024-08-14T15:06:07+00:00' description: 'Datetime in UTC when the lead was updated.' enum: [] lead_datetime: type: string example: '2024-08-01T12:30:00+00:00' description: 'Datetime in UTC when the lead was submitted (on the website).' enum: [] address: type: object properties: street: type: string example: Barentspad description: 'Street of the address of the lead.' enum: [] street_number: type: string example: '794' description: 'Street number of the address of the lead.' enum: [] street_number_extension: type: string example: null description: 'Street number extension of the address of the lead.' enum: [] postcode: type: string example: 3704MK description: 'Postcode of the address of the lead.' enum: [] city: type: string example: Oirschot description: 'City of the address of the lead.' enum: [] country: type: string example: België description: 'Country of the address of the lead.' enum: [] required: - street - street_number - street_number_extension - postcode - city - country description: 'Object with the data of the address of the lead.' installation_date: type: string example: asap description: 'Preferred installation date.' enum: - asap - next_three_months - later data: type: object properties: volume: type: integer example: 99 description: 'Volume of the building.' enum: [] surface: type: integer example: 82 description: 'Surface of the building.' enum: [] gas_usage: type: integer example: 518 description: 'Gas usage of the building in cubic meters.' enum: [] residents: type: integer example: 10 description: 'Number of residents in the building.' enum: [] insulation: type: array example: - floor - wall description: 'Array with insulation types of the building.' enum: - wall - roof - floor - glass - none items: type: string power_usage: type: integer example: 9374 description: 'Power usage of the building in kW/h.' enum: [] building_type: type: string example: terraced_house description: 'Building type.' enum: - detached_house - semi_detached_house - corner_house - terrace_house - apartment delivery_system: type: string example: radiators description: 'Type of delivery system for heating.' enum: - radiators - underfloor_heating - combination year_of_construction: type: integer example: 2024 description: 'Year of construction of the building.' enum: [] required: - volume - surface - gas_usage - residents - insulation - power_usage - building_type - delivery_system - year_of_construction description: 'Object with data specific to the type of the lead.' selection: type: array example: - answer: null question: null - answer: 'Enim repellat ab ea dolorem ut perferendis.' question: 'Qui voluptatem ullam ipsa sit quisquam ipsa.' description: 'Array with objects of the questions and answers from the selection tool.' enum: [] items: type: object properties: answer: type: string example: null description: 'The answer.' enum: [] question: type: string example: null description: 'The question.' enum: [] required: - answer - question advice: type: string example: 'Consequatur consequuntur ut accusamus rerum officiis.' description: 'Advice of the selection tool.' enum: [] required: - id - firstname - middlename - lastname - email - phone - discount_code - type - created_at - updated_at - lead_datetime - address - installation_date - data - selection - advice description: 'Object with the data of the entity.' required: - data 401: description: Unauthorized content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Leads parameters: - in: path name: id description: 'The ID of the lead.' example: 6 required: true schema: type: integer /passport/leads/airco: post: summary: 'Create new airco lead' operationId: createNewAircoLead description: "Stores a airco lead in the database. Returns the details of the lead.\n\nSome fields refer to the ETIM specification, which can be found at:\n* [ETIM EC011580 (English)](https://viewer.etim-international.com/class/EC011580)\n* [ETIM EC011580 (Dutch)](https://viewer.etim-international.com/class/EC011580?lang=nl-NL)\n\nFor a description of the fields in the return value, check the response of\n[Get a single lead](#tag/leads/GET/passport/leads/{id})." parameters: [] responses: 201: description: Created content: application/json: schema: type: object example: data: id: 1 firstname: Imke middlename: de lastname: Mol email: devries.mads@yahoo.nl phone: '+31101234567' discount_code: hwcf-es8o4v type: airco created_at: '2024-08-14T15:06:07+00:00' updated_at: '2024-08-14T15:06:07+00:00' lead_datetime: '2024-08-01T12:30:00+00:00' installation_date: asap address: street: Barentspad street_number: '794' street_number_extension: null postcode: 3704MK city: Oirschot country: Nederland advice: 'Officiis et molestiae amet quia cumque magni reprehenderit.' selection: - question: 'Fugit eligendi maiores.' answer: 'Est quaerat a dignissimos aliquid expedita quod dolorem blanditiis eaque.' - question: 'Non ipsum veritatis similique voluptatem commodi autem aliquam eveniet corrupti.' answer: 'Nostrum assumenda maiores.' data: rooms: 2 room_volume: - 10 - 25 operating_principle: chill_heating model: wall year_of_construction: 2024 properties: data: type: object properties: id: type: integer example: 1 firstname: type: string example: Imke middlename: type: string example: de lastname: type: string example: Mol email: type: string example: devries.mads@yahoo.nl phone: type: string example: '+31101234567' discount_code: type: string example: hwcf-es8o4v type: type: string example: airco created_at: type: string example: '2024-08-14T15:06:07+00:00' updated_at: type: string example: '2024-08-14T15:06:07+00:00' lead_datetime: type: string example: '2024-08-01T12:30:00+00:00' installation_date: type: string example: asap address: type: object properties: street: type: string example: Barentspad street_number: type: string example: '794' street_number_extension: type: string example: null postcode: type: string example: 3704MK city: type: string example: Oirschot country: type: string example: Nederland advice: type: string example: 'Officiis et molestiae amet quia cumque magni reprehenderit.' selection: type: array example: - question: 'Fugit eligendi maiores.' answer: 'Est quaerat a dignissimos aliquid expedita quod dolorem blanditiis eaque.' - question: 'Non ipsum veritatis similique voluptatem commodi autem aliquam eveniet corrupti.' answer: 'Nostrum assumenda maiores.' items: type: object properties: question: type: string example: 'Fugit eligendi maiores.' answer: type: string example: 'Est quaerat a dignissimos aliquid expedita quod dolorem blanditiis eaque.' data: type: object properties: rooms: type: integer example: 2 room_volume: type: array example: - 10 - 25 items: type: integer operating_principle: type: string example: chill_heating model: type: string example: wall year_of_construction: type: integer example: 2024 401: description: Unauthorized content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. 422: description: 'Unprocessable Content' content: application/json: schema: type: object example: message: 'General description about the error.' errors: foobar: - 'The foobar field is required.' barfoo: - 'The barfoo field must match the format Y-m-d.' - 'The barfoo field must be a date before or equal to today.' properties: message: type: string example: 'General description about the error.' errors: type: object properties: foobar: type: array example: - 'The foobar field is required.' items: type: string barfoo: type: array example: - 'The barfoo field must match the format Y-m-d.' - 'The barfoo field must be a date before or equal to today.' items: type: string tags: - Leads requestBody: required: true content: application/json: schema: type: object properties: firstname: type: string description: 'First name of the contact person of the lead. Must be at least 1 character.' example: Maarten nullable: false middlename: type: string description: 'Middle name of the contact person of the lead. Must be at least 1 character.' example: van nullable: true lastname: type: string description: 'Last name of the contact person of the lead. Must be at least 1 character.' example: Scholten nullable: false street: type: string description: 'Street of the address of the lead. Must be at least 1 character.' example: Smitsdreef nullable: false street_number: type: integer description: 'Street number of the address of the lead.' example: 12 nullable: false street_number_extension: type: string description: 'Street number extension of the address of the lead.' example: A nullable: true postcode: type: string description: 'Postcode of the address of the lead. Must be at least 6 characters. Must not be greater than 7 characters.' example: 7722XJ nullable: false city: type: string description: 'City of the address of the lead. Must be at least 1 character.' example: Rotterdam nullable: false country: type: string description: 'Country of the address of the lead. Must be at least 1 character.' example: Nederland nullable: false email: type: string description: 'Email address of the contact person of the lead. Must be a valid email address.' example: maarten.van.scholten@hotmail.com nullable: false phone: type: string description: 'A valid Dutch or Belgium phone number.' example: 010-1234567 nullable: false lead_datetime: type: string description: 'Date and time of the lead creation. Must be a valid date in the format Y-m-d\TH:i:sP. Must be a date before or equal to now.' example: '2024-08-01T14:30:00+02:00' nullable: false discount_code: type: string description: 'Validated discount code of the lead. The validation of the code **must** be done client side because this field accepts all strings. Must not be greater than 32 characters.' example: EHME-123456 nullable: true year_of_construction: type: integer description: 'Year of construction of the building. Must be at least 1750. Must not be greater than 2030.' example: 2024 nullable: false installation_date: type: string description: 'Preferred installation date.' example: '2024-08-31' nullable: false enum: - asap - next_three_months - later photos: type: array description: 'Uploaded photos encoded as Base64 string.' example: - 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII' items: type: string selection: type: array description: '' example: - question: 'Do you like our design unit over the normal units?' answer: 'Yes, I do!' items: type: object properties: question: type: string description: 'The question. Must be at least 1 character.' example: 'Do you like our design unit over the normal units?' nullable: false answer: type: string description: 'The answer. Must be at least 1 character.' example: 'Yes, I do!' nullable: false advice: type: string description: 'Advice of the selection tool. Must be at least 1 character.' example: 'ZEN lijn zwart' nullable: true rooms: type: integer description: 'Number of rooms to fit an airco. Must be at least 1.' example: 2 nullable: false room_volume: type: array description: 'Volume of each of the rooms. Number of elements must be equal to the value of `rooms`. Must be at least 1. Must not be greater than 1000.' example: - 1 items: type: integer operating_principle: type: string description: 'Operating principle of the airco (ETIM: `EF004139`).' example: chill_heating nullable: false enum: - chill - chill_heating model: type: string description: 'Model type of the airco (ETIM: `EF024942`, but simplified to few choices).' example: wall nullable: false enum: - floor - wall - ceiling - unknown required: - firstname - lastname - street - street_number - postcode - city - country - email - phone - lead_datetime - year_of_construction - installation_date - photos - rooms - room_volume - operating_principle - model /passport/leads/heatpump: post: summary: 'Create new heatpump lead' operationId: createNewHeatpumpLead description: "Stores a heatpump lead in the database. Returns the details of the lead.\n\nFor a description of the fields in the return value, check the response of\n[Get a single lead](#tag/leads/GET/passport/leads/{id})." parameters: [] responses: 201: description: Created content: application/json: schema: type: object example: data: id: 1 firstname: Imke middlename: de lastname: Mol email: devries.mads@yahoo.nl phone: '+31101234567' discount_code: hwcf-es8o4v type: heatpump created_at: '2024-08-14T15:06:07+00:00' updated_at: '2024-08-14T15:06:07+00:00' lead_datetime: '2024-08-01T12:30:00+00:00' installation_date: asap address: street: Barentspad street_number: '794' street_number_extension: null postcode: 3704MK city: Oirschot country: Nederland advice: 'Officiis et molestiae amet quia cumque magni reprehenderit.' selection: - question: 'Fugit eligendi maiores.' answer: 'Est quaerat a dignissimos aliquid expedita quod dolorem blanditiis eaque.' - question: 'Non ipsum veritatis similique voluptatem commodi autem aliquam eveniet corrupti.' answer: 'Nostrum assumenda maiores.' data: volume: 65 surface: 44 gas_usage: 57 residents: 10 insulation: - floor - wall power_usage: 916 building_type: terraced_house delivery_system: radiators year_of_construction: 2024 properties: data: type: object properties: id: type: integer example: 1 firstname: type: string example: Imke middlename: type: string example: de lastname: type: string example: Mol email: type: string example: devries.mads@yahoo.nl phone: type: string example: '+31101234567' discount_code: type: string example: hwcf-es8o4v type: type: string example: heatpump created_at: type: string example: '2024-08-14T15:06:07+00:00' updated_at: type: string example: '2024-08-14T15:06:07+00:00' lead_datetime: type: string example: '2024-08-01T12:30:00+00:00' installation_date: type: string example: asap address: type: object properties: street: type: string example: Barentspad street_number: type: string example: '794' street_number_extension: type: string example: null postcode: type: string example: 3704MK city: type: string example: Oirschot country: type: string example: Nederland advice: type: string example: 'Officiis et molestiae amet quia cumque magni reprehenderit.' selection: type: array example: - question: 'Fugit eligendi maiores.' answer: 'Est quaerat a dignissimos aliquid expedita quod dolorem blanditiis eaque.' - question: 'Non ipsum veritatis similique voluptatem commodi autem aliquam eveniet corrupti.' answer: 'Nostrum assumenda maiores.' items: type: object properties: question: type: string example: 'Fugit eligendi maiores.' answer: type: string example: 'Est quaerat a dignissimos aliquid expedita quod dolorem blanditiis eaque.' data: type: object properties: volume: type: integer example: 65 surface: type: integer example: 44 gas_usage: type: integer example: 57 residents: type: integer example: 10 insulation: type: array example: - floor - wall items: type: string power_usage: type: integer example: 916 building_type: type: string example: terraced_house delivery_system: type: string example: radiators year_of_construction: type: integer example: 2024 401: description: Unauthorized content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. 422: description: 'Unprocessable Content' content: application/json: schema: type: object example: message: 'General description about the error.' errors: foobar: - 'The foobar field is required.' barfoo: - 'The barfoo field must match the format Y-m-d.' - 'The barfoo field must be a date before or equal to today.' properties: message: type: string example: 'General description about the error.' errors: type: object properties: foobar: type: array example: - 'The foobar field is required.' items: type: string barfoo: type: array example: - 'The barfoo field must match the format Y-m-d.' - 'The barfoo field must be a date before or equal to today.' items: type: string tags: - Leads requestBody: required: true content: application/json: schema: type: object properties: firstname: type: string description: 'First name of the contact person of the lead. Must be at least 1 character.' example: Maarten nullable: false middlename: type: string description: 'Middle name of the contact person of the lead. Must be at least 1 character.' example: van nullable: true lastname: type: string description: 'Last name of the contact person of the lead. Must be at least 1 character.' example: Scholten nullable: false street: type: string description: 'Street of the address of the lead. Must be at least 1 character.' example: Smitsdreef nullable: false street_number: type: integer description: 'Street number of the address of the lead.' example: 12 nullable: false street_number_extension: type: string description: 'Street number extension of the address of the lead.' example: A nullable: true postcode: type: string description: 'Postcode of the address of the lead. Must be at least 6 characters. Must not be greater than 7 characters.' example: 7722XJ nullable: false city: type: string description: 'City of the address of the lead. Must be at least 1 character.' example: Rotterdam nullable: false country: type: string description: 'Country of the address of the lead. Must be at least 1 character.' example: Nederland nullable: false email: type: string description: 'Email address of the contact person of the lead. Must be a valid email address.' example: maarten.van.scholten@hotmail.com nullable: false phone: type: string description: 'A valid Dutch or Belgium phone number.' example: 010-1234567 nullable: false lead_datetime: type: string description: 'Date and time of the lead creation. Must be a valid date in the format Y-m-d\TH:i:sP. Must be a date before or equal to now.' example: '2024-08-01T14:30:00+02:00' nullable: false discount_code: type: string description: 'Validated discount code of the lead. The validation of the code **must** be done client side because this field accepts all strings. Must not be greater than 32 characters.' example: EHME-123456 nullable: true year_of_construction: type: integer description: 'Year of construction of the building. Must be at least 1750. Must not be greater than 2030.' example: 2024 nullable: false installation_date: type: string description: 'Preferred installation date.' example: '2024-08-31' nullable: false enum: - asap - next_three_months - later photos: type: array description: 'Uploaded photos encoded as Base64 string.' example: - 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII' items: type: string selection: type: array description: '' example: - question: 'Do you like our design unit over the normal units?' answer: 'Yes, I do!' items: type: object properties: question: type: string description: 'The question. Must be at least 1 character.' example: 'Do you like our design unit over the normal units?' nullable: false answer: type: string description: 'The answer. Must be at least 1 character.' example: 'Yes, I do!' nullable: false advice: type: string description: 'Advice of the selection tool. Must be at least 1 character.' example: 'ZEN lijn zwart' nullable: true building_type: type: string description: 'Building type.' example: terraced_house nullable: false enum: - detached_house - semi_detached_house - corner_house - terrace_house - apartment residents: type: integer description: 'Number of residents in the building. Must be at least 1. Must not be greater than 10.' example: 5 nullable: false surface: type: integer description: 'Surface of the building. Must be at least 1.' example: 50 nullable: false volume: type: integer description: 'Volume of the building. Must be at least 1.' example: 50 nullable: false insulation: type: array description: 'One or more types of insulation of the building. When the array contains the value `none`, no other elements are accepted.' example: - wall items: type: string enum: - wall - roof - floor - glass - none delivery_system: type: string description: 'Type of delivery system for heating.' example: underfloor_heating nullable: false enum: - radiators - underfloor_heating - combination gas_usage: type: integer description: 'Gas usage of the building in cubic meters. Must be at least 1.' example: 350 nullable: false power_usage: type: integer description: 'Power usage of the building in kW/h. Must be at least 1.' example: 3000 nullable: false required: - firstname - lastname - street - street_number - postcode - city - country - email - phone - lead_datetime - year_of_construction - installation_date - photos - building_type - residents - surface - volume - insulation - delivery_system - gas_usage - power_usage '/passport/leads/{lead_id}/photos': get: summary: 'Get all photos of a lead' operationId: getAllPhotosOfALead description: 'Returns a collection with all the photos of a single lead.' parameters: [] responses: 200: description: OK content: application/json: schema: type: object example: data: - id: 21 content: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAIAAADTED8xAAADMElEQVR4nOzVwQnAIBQFQYXff81RUkQCOyDj1YOPnbXWPmeTRef+/3O/OyBjzh3CD95BfqICMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMO0TAAD//2Anhf4QtqobAAAAAElFTkSuQmCC' created_at: '2024-08-19T13:55:04+00:00' - id: 22 content: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII' created_at: '2024-08-19T13:55:04+00:00' properties: data: type: array example: - id: 21 content: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAIAAADTED8xAAADMElEQVR4nOzVwQnAIBQFQYXff81RUkQCOyDj1YOPnbXWPmeTRef+/3O/OyBjzh3CD95BfqICMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMO0TAAD//2Anhf4QtqobAAAAAElFTkSuQmCC' created_at: '2024-08-19T13:55:04+00:00' - id: 22 content: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII' created_at: '2024-08-19T13:55:04+00:00' description: 'Array with objects containing the data of each entity.' enum: [] items: type: object properties: id: type: integer example: 21 description: 'ID of the photo.' enum: [] content: type: string example: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAIAAADTED8xAAADMElEQVR4nOzVwQnAIBQFQYXff81RUkQCOyDj1YOPnbXWPmeTRef+/3O/OyBjzh3CD95BfqICMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMK0CMO0TAAD//2Anhf4QtqobAAAAAElFTkSuQmCC' description: 'Base64 encoded string with the image data.' enum: [] created_at: type: string example: '2024-08-19T13:55:04+00:00' description: 'Datetime in UTC when the photo was created.' enum: [] required: - id - content - created_at required: - data 401: description: Unauthorized content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Leads parameters: - in: path name: lead_id description: 'The ID of the lead.' example: reiciendis required: true schema: type: string '/passport/leads/{lead_id}/photos/{id}': get: summary: 'Get a single photo of a lead' operationId: getASinglePhotoOfALead description: 'Returns the details of a single photo.' parameters: [] responses: 200: description: OK content: application/json: schema: type: object example: data: id: 22 content: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII' created_at: '2024-08-19T13:55:04+00:00' properties: data: type: object properties: id: type: integer example: 22 description: 'ID of the photo.' enum: [] content: type: string example: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII' description: 'Base64 encoded string with the image data.' enum: [] created_at: type: string example: '2024-08-19T13:55:04+00:00' description: 'Datetime in UTC when the photo was created.' enum: [] required: - id - content - created_at description: 'Object with the data of the entity.' required: - data 401: description: Unauthorized content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Leads parameters: - in: path name: lead_id description: 'The ID of the lead.' example: ut required: true schema: type: string - in: path name: id description: 'The ID of the photo.' example: nobis required: true schema: type: string /passport/returnorders: get: summary: 'Get all return orders' operationId: getAllReturnOrders description: "Returns an overview of the return orders. By using query parameters, you can\nadjust the amount of data per page or filter entities to retrieve only the return\norders that match the filter." parameters: - in: query name: page description: 'Page to request when data has pagination.' example: 5 required: false schema: type: integer description: 'Page to request when data has pagination.' example: 5 nullable: true - in: query name: per_page description: 'Number of items per page. Must be at least 1. Must not be greater than 1000.' example: 25 required: false schema: type: integer description: 'Number of items per page. Must be at least 1. Must not be greater than 1000.' example: 25 nullable: true - in: query name: since description: 'Filter for the items that are mutated since the datetime in UTC. Must be a valid date in the format Y-m-d H:i:s. Must be a date before or equal to now.' example: '2024-08-10 12:00:00' required: false schema: type: string description: 'Filter for the items that are mutated since the datetime in UTC. Must be a valid date in the format Y-m-d H:i:s. Must be a date before or equal to now.' example: '2024-08-10 12:00:00' nullable: true - in: query name: status description: 'Filter on the current status of the return orders.' example: NEW required: false schema: type: string description: 'Filter on the current status of the return orders.' example: NEW nullable: true enum: - NEW - WAITING_FOR_DATA - WAITING_FOR_INSTRUCTIONS - FETCH_INSTRUCTIONS - WAITING_FOR_FETCH - WAITING_FOR_ITEMS - REJECTED - CANCELED - COMPLETED - CONFIRM_COMPLETED - BOOKING_SHIPMENT - REJECTION_REASON - in: query name: date description: 'Filter on the creation date of the return order. Must be a valid date. Must be a date before or equal to today.' example: '2025-01-28' required: false schema: type: string description: 'Filter on the creation date of the return order. Must be a valid date. Must be a date before or equal to today.' example: '2025-01-28' nullable: true - in: query name: account description: 'Filter on the account of the return order, value must be the `id` of the account. Must be a valid UUID. The id of an existing record in the accounts table.' example: 33B90054-34E8-44D9-8D68-B6811021CC89 required: false schema: type: string description: 'Filter on the account of the return order, value must be the `id` of the account. Must be a valid UUID. The id of an existing record in the accounts table.' example: 33B90054-34E8-44D9-8D68-B6811021CC89 nullable: true - in: query name: contact_person description: 'Filter on the contact person of the return order, value must be the `id` of the contact person. Must be a valid UUID. The id of an existing record in the contact_people table.' example: 9A6B39A6-64F9-4808-8137-6F944EEB13B2 required: false schema: type: string description: 'Filter on the contact person of the return order, value must be the `id` of the contact person. Must be a valid UUID. The id of an existing record in the contact_people table.' example: 9A6B39A6-64F9-4808-8137-6F944EEB13B2 nullable: true responses: 200: description: OK content: application/json: schema: type: object example: data: - id: 1 order_number: '19124461' rma_number: 34345435 customer_reference: 'Garantie (afspraak met Hans)' status: NEW send_type: FETCH account: id: 33B90054-34E8-44D9-8D68-B6811021CC89 code: '212718' name: 'Kikkerkoel B.V.' contact_person: id: 9A6B39A6-64F9-4808-8137-6F944EEB13B2 firstname: Kick middlename: null lastname: Koel initials: K. email: kikkerkoel@alklima.nl created_at: '2020-05-14T08:03:08+00:00' updated_at: '2020-05-14T08:03:08+00:00' - id: 2 order_number: '19124490' rma_number: 34345436 customer_reference: 'Kroon Wilnis BV' status: WAITING_FOR_INSTRUCTIONS send_type: SEND account: id: 33B90054-34E8-44D9-8D68-B6811021CC89 code: '212718' name: 'Kikkerkoel B.V.' contact_person: id: 9A6B39A6-64F9-4808-8137-6F944EEB13B2 firstname: Kick middlename: null lastname: Koel initials: K. email: kikkerkoel@alklima.nl created_at: '2020-10-09T11:32:12+00:00' updated_at: '2020-10-09T11:32:12+00:00' - id: 3 order_number: '19124491' rma_number: null customer_reference: null status: NEW send_type: FETCH account: id: 33B90054-34E8-44D9-8D68-B6811021CC89 code: '212718' name: 'Kikkerkoel B.V.' contact_person: id: 9A6B39A6-64F9-4808-8137-6F944EEB13B2 firstname: Kick middlename: null lastname: Koel initials: K. email: kikkerkoel@alklima.nl created_at: '2020-10-09T11:34:20+00:00' updated_at: '2020-10-09T11:34:20+00:00' - id: 4 order_number: '19124492' rma_number: null customer_reference: null status: NEW send_type: FETCH account: id: 33B90054-34E8-44D9-8D68-B6811021CC89 code: '212718' name: 'Kikkerkoel B.V.' contact_person: id: 9A6B39A6-64F9-4808-8137-6F944EEB13B2 firstname: Kick middlename: null lastname: Koel initials: K. email: kikkerkoel@alklima.nl created_at: '2020-10-09T11:36:08+00:00' updated_at: '2020-10-09T11:36:08+00:00' - id: 5 order_number: '19124508' rma_number: null customer_reference: null status: NEW send_type: FETCH account: id: 33B90054-34E8-44D9-8D68-B6811021CC89 code: '212718' name: 'Kikkerkoel B.V.' contact_person: id: 9A6B39A6-64F9-4808-8137-6F944EEB13B2 firstname: Kick middlename: null lastname: Koel initials: K. email: kikkerkoel@alklima.nl created_at: '2020-11-24T16:30:51+00:00' updated_at: '2020-11-24T16:30:51+00:00' links: first: 'https://alklima.nl/passport/returnorders?page=1' last: 'https://alklima.nl/passport/returnorders?page=2' prev: null next: 'https://alklima.nl/passport/returnorders?page=2' meta: current_page: 1 from: 1 last_page: 10 links: - url: null label: '« Previous' active: false - url: 'https://alklima.nl/passport/returnorders?page=1' label: '1' active: true - url: 'https://alklima.nl/passport/returnorders?page=2' label: '2' active: false - url: 'https://alklima.nl/passport/returnorders?page=2' label: 'Next »' active: false path: 'https://alklima.nl/passport/returnorders' per_page: 5 to: 5 total: 50 properties: data: type: array example: - id: 1 order_number: '19124461' rma_number: 34345435 customer_reference: 'Garantie (afspraak met Hans)' status: NEW send_type: FETCH account: id: 33B90054-34E8-44D9-8D68-B6811021CC89 code: '212718' name: 'Kikkerkoel B.V.' contact_person: id: 9A6B39A6-64F9-4808-8137-6F944EEB13B2 firstname: Kick middlename: null lastname: Koel initials: K. email: kikkerkoel@alklima.nl created_at: '2020-05-14T08:03:08+00:00' updated_at: '2020-05-14T08:03:08+00:00' - id: 2 order_number: '19124490' rma_number: 34345436 customer_reference: 'Kroon Wilnis BV' status: WAITING_FOR_INSTRUCTIONS send_type: SEND account: id: 33B90054-34E8-44D9-8D68-B6811021CC89 code: '212718' name: 'Kikkerkoel B.V.' contact_person: id: 9A6B39A6-64F9-4808-8137-6F944EEB13B2 firstname: Kick middlename: null lastname: Koel initials: K. email: kikkerkoel@alklima.nl created_at: '2020-10-09T11:32:12+00:00' updated_at: '2020-10-09T11:32:12+00:00' - id: 3 order_number: '19124491' rma_number: null customer_reference: null status: NEW send_type: FETCH account: id: 33B90054-34E8-44D9-8D68-B6811021CC89 code: '212718' name: 'Kikkerkoel B.V.' contact_person: id: 9A6B39A6-64F9-4808-8137-6F944EEB13B2 firstname: Kick middlename: null lastname: Koel initials: K. email: kikkerkoel@alklima.nl created_at: '2020-10-09T11:34:20+00:00' updated_at: '2020-10-09T11:34:20+00:00' - id: 4 order_number: '19124492' rma_number: null customer_reference: null status: NEW send_type: FETCH account: id: 33B90054-34E8-44D9-8D68-B6811021CC89 code: '212718' name: 'Kikkerkoel B.V.' contact_person: id: 9A6B39A6-64F9-4808-8137-6F944EEB13B2 firstname: Kick middlename: null lastname: Koel initials: K. email: kikkerkoel@alklima.nl created_at: '2020-10-09T11:36:08+00:00' updated_at: '2020-10-09T11:36:08+00:00' - id: 5 order_number: '19124508' rma_number: null customer_reference: null status: NEW send_type: FETCH account: id: 33B90054-34E8-44D9-8D68-B6811021CC89 code: '212718' name: 'Kikkerkoel B.V.' contact_person: id: 9A6B39A6-64F9-4808-8137-6F944EEB13B2 firstname: Kick middlename: null lastname: Koel initials: K. email: kikkerkoel@alklima.nl created_at: '2020-11-24T16:30:51+00:00' updated_at: '2020-11-24T16:30:51+00:00' description: 'Array with objects containing the data of each entity.' enum: [] items: type: object properties: id: type: integer example: 1 description: 'ID of the return order.' enum: [] order_number: type: string example: '19124461' description: 'Order number of the sales order related to the return order.' enum: [] rma_number: type: integer example: 34345435 description: 'Number of the return order.' enum: [] customer_reference: type: string example: 'Garantie (afspraak met Hans)' description: 'Reference of the return order, submitted when creating the return order.' enum: [] status: type: string example: NEW description: 'The current staus of the return order.' enum: - NEW - WAITING_FOR_DATA - WAITING_FOR_INSTRUCTIONS - FETCH_INSTRUCTIONS - WAITING_FOR_FETCH - WAITING_FOR_ITEMS - REJECTED - CANCELED - COMPLETED - CONFIRM_COMPLETED - BOOKING_SHIPMENT - REJECTION_REASON send_type: type: string example: FETCH description: 'The method for returning the return order.' enum: - FETCH - SEND - NO_RETURN account: type: object properties: id: type: string example: 33B90054-34E8-44D9-8D68-B6811021CC89 description: 'Unique ID of the account.' enum: [] code: type: string example: '212718' description: 'Account code.' enum: [] name: type: string example: 'Kikkerkoel B.V.' description: 'Account name.' enum: [] required: - id - code - name description: 'Object with the data of the account of the return order.' contact_person: type: object properties: id: type: string example: 9A6B39A6-64F9-4808-8137-6F944EEB13B2 description: 'Unique ID of the contact person.' enum: [] firstname: type: string example: Kick description: 'First name of the contact person.' enum: [] middlename: type: string example: null description: 'Middle name of the contact person.' enum: [] lastname: type: string example: Koel description: 'Last name of the contact person.' enum: [] initials: type: string example: K. description: 'Initials of the contact person.' enum: [] email: type: string example: kikkerkoel@alklima.nl description: 'Email address of the contact person.' enum: [] required: - id - firstname - middlename - lastname - initials - email description: 'Object with the data of the contact person of the return order.' created_at: type: string example: '2020-05-14T08:03:08+00:00' description: 'Datetime in UTC when the return order was created.' enum: [] updated_at: type: string example: '2020-05-14T08:03:08+00:00' description: 'Datetime in UTC when the return order was updated.' enum: [] required: - id - order_number - rma_number - customer_reference - status - send_type - account - contact_person - created_at - updated_at links: type: object properties: first: type: string example: 'https://alklima.nl/passport/returnorders?page=1' last: type: string example: 'https://alklima.nl/passport/returnorders?page=2' prev: type: string example: null next: type: string example: 'https://alklima.nl/passport/returnorders?page=2' meta: type: object properties: current_page: type: integer example: 1 from: type: integer example: 1 last_page: type: integer example: 10 links: type: array example: - url: null label: '« Previous' active: false - url: 'https://alklima.nl/passport/returnorders?page=1' label: '1' active: true - url: 'https://alklima.nl/passport/returnorders?page=2' label: '2' active: false - url: 'https://alklima.nl/passport/returnorders?page=2' label: 'Next »' active: false items: type: object properties: url: type: string example: null label: type: string example: '« Previous' active: type: boolean example: false path: type: string example: 'https://alklima.nl/passport/returnorders' per_page: type: integer example: 5 to: type: integer example: 5 total: type: integer example: 50 required: - data 401: description: Unauthorized content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - 'Return Orders' '/passport/returnorders/{id}': get: summary: 'Get a single return order' operationId: getASingleReturnOrder description: 'Returns the details of a single return order.' parameters: [] responses: 200: description: OK content: application/json: schema: type: object example: data: id: 1 order_number: '22129302' status: WAITING_FOR_DATA send_type: FETCH rma_number: '234565677' customer_reference: 'Bouwmensen Utrecht' account: id: 33B90054-34E8-44D9-8D68-B6811021CC89 code: '212718' name: 'Kikkerkoel B.V.' contact_person: id: 9A6B39A6-64F9-4808-8137-6F944EEB13B2 firstname: Kick middlename: null lastname: Koel initials: K. email: kikkerkoel@alklima.nl order_date: '2024-08-10' pickup_date: '2024-09-01' is_available: true available_at: '2024-08-10' address: postcode: 3013AK city: Rotterdam country: Nederland addressline1: 'Stationsplein 45' addressline2: null addressline3: null lines: - order_line_id: 5965486 quantity: 2 approved_quantity: 2 description: Beschadiging status: REJECTED service_reference_number: - ABC-123 - ABC-456 serial_number: - 7IBS4426W191082 - 7IBS4426W193578 return_required: true reason: code: '800' description: Garantie item: id: 0873BF65-0127-414F-B4BC-EB9F2991A66A name: Ruimteklokthermostaat code: 'PAR-41 MAA' created_at: '2024-08-15T10:30:13+00:00' updated_at: '2024-08-15T10:57:15+00:00' properties: data: type: object properties: id: type: integer example: 1 description: 'ID of the return order.' enum: [] order_number: type: string example: '22129302' description: 'Order number of the sales order related to the return order.' enum: [] status: type: string example: WAITING_FOR_DATA description: 'The current staus of the return order.' enum: - NEW - WAITING_FOR_DATA - WAITING_FOR_INSTRUCTIONS - FETCH_INSTRUCTIONS - WAITING_FOR_FETCH - WAITING_FOR_ITEMS - REJECTED - CANCELED - COMPLETED - CONFIRM_COMPLETED - BOOKING_SHIPMENT - REJECTION_REASON send_type: type: string example: FETCH description: 'The method for returning the return order.' enum: - FETCH - SEND - NO_RETURN rma_number: type: string example: '234565677' description: 'Number of the return order.' enum: [] customer_reference: type: string example: 'Bouwmensen Utrecht' description: 'Reference of the return order, submitted when creating the return order.' enum: [] account: type: object properties: id: type: string example: 33B90054-34E8-44D9-8D68-B6811021CC89 description: 'Unique ID of the account.' enum: [] code: type: string example: '212718' description: 'Account code.' enum: [] name: type: string example: 'Kikkerkoel B.V.' description: 'Account name.' enum: [] required: - id - code - name description: 'Object with the data of the account of the return order.' contact_person: type: object properties: id: type: string example: 9A6B39A6-64F9-4808-8137-6F944EEB13B2 description: 'Unique ID of the contact person.' enum: [] firstname: type: string example: Kick description: 'First name of the contact person.' enum: [] middlename: type: string example: null description: 'Middle name of the contact person.' enum: [] lastname: type: string example: Koel description: 'Last name of the contact person.' enum: [] initials: type: string example: K. description: 'Initials of the contact person.' enum: [] email: type: string example: kikkerkoel@alklima.nl description: 'Email address of the contact person.' enum: [] required: - id - firstname - middlename - lastname - initials - email description: 'Object with the data of the contact person of the return order.' order_date: type: string example: '2024-08-10' description: 'Date of the sales order related to the return order.' enum: [] pickup_date: type: string example: '2024-09-01' description: 'Date when pick up of the return order is scheduled.' enum: [] is_available: type: boolean example: true description: 'Boolean indicating if the items of the return order are available for pick up at the moment the return order was created.' enum: [] available_at: type: string example: '2024-08-10' description: 'Date when the items of the return order are available for pick up.' enum: [] address: type: object properties: postcode: type: string example: 3013AK description: 'Postcode of the address.' enum: [] city: type: string example: Rotterdam description: 'City of the address.' enum: [] country: type: string example: Nederland description: 'Country of the address.' enum: [] addressline1: type: string example: 'Stationsplein 45' description: 'Address line 1 of the address.' enum: [] addressline2: type: string example: null description: 'Address line 2 of the address.' enum: [] addressline3: type: string example: null description: 'Address line 3 of the address.' enum: [] required: - postcode - city - country - addressline1 - addressline2 - addressline3 description: 'Object with the data of the pick up address of the return order.' lines: type: array example: - order_line_id: 5965486 quantity: 2 approved_quantity: 2 description: Beschadiging status: REJECTED service_reference_number: - ABC-123 - ABC-456 serial_number: - 7IBS4426W191082 - 7IBS4426W193578 return_required: true reason: code: '800' description: Garantie item: id: 0873BF65-0127-414F-B4BC-EB9F2991A66A name: Ruimteklokthermostaat code: 'PAR-41 MAA' description: 'Array containing objects for each line in the return order.' enum: [] items: type: object properties: order_line_id: type: integer example: 5965486 description: 'ID of the sales order line related to the line in the return order.' enum: [] quantity: type: integer example: 2 description: 'Number of items in the return order line that was submitted for the return order.' enum: [] approved_quantity: type: integer example: 2 description: 'Number of items in the return order line that was approved for the return order.' enum: [] description: type: string example: Beschadiging description: 'Description of the return order line, submitted when creating the return order.' enum: [] status: type: string example: REJECTED description: 'Status of the return order line' enum: - APPROVED - WAITING_FOR_JUDGEMENT - MORE_INFO_NEEDED - REJECTED service_reference_number: type: array example: - ABC-123 - ABC-456 description: 'Service reference number of each of the units of the return order line.' enum: [] items: type: string serial_number: type: array example: - 7IBS4426W191082 - 7IBS4426W193578 description: 'Serial number of each of the units of the return order line.' enum: [] items: type: string return_required: type: boolean example: true description: 'Boolean indicating if the items in the return order line should be returned.' enum: [] reason: type: object properties: code: type: string example: '800' description: 'Code of the reason.' enum: [] description: type: string example: Garantie description: 'Description of the reason.' enum: [] required: - code - description description: 'Object with the data of the reason of the return for the items in the return order line.' item: type: object properties: id: type: string example: 0873BF65-0127-414F-B4BC-EB9F2991A66A description: 'Unique ID of the item.' enum: [] name: type: string example: Ruimteklokthermostaat description: 'Name of the item.' enum: [] code: type: string example: 'PAR-41 MAA' description: 'Code of the item.' enum: [] required: - id - name - code description: 'Object with the data of the item in the return order line.' required: - order_line_id - quantity - approved_quantity - description - status - service_reference_number - serial_number - return_required - reason - item created_at: type: string example: '2024-08-15T10:30:13+00:00' description: 'Datetime in UTC when the return order was created.' enum: [] updated_at: type: string example: '2024-08-15T10:57:15+00:00' description: 'Datetime in UTC when the return order was updated.' enum: [] required: - id - order_number - status - send_type - rma_number - customer_reference - account - contact_person - order_date - pickup_date - is_available - available_at - address - lines - created_at - updated_at description: 'Object with the data of the entity.' required: - data 401: description: Unauthorized content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - 'Return Orders' parameters: - in: path name: id description: 'The ID of the return order.' example: 5 required: true schema: type: integer tags: - name: Authenticating description: "\nEndpoints for authenticating and fetching the details of the authenticated user." - name: Leads description: "\nEndpoints for creating and reading qualified leads.\n\nThe endpoints in this group need the leads scope when creating the token." - name: 'Return Orders' description: "\nEndpoints for reading the return orders.\n\nThe endpoints in this group need the returnorders scope when creating the token." components: securitySchemes: default: type: http scheme: bearer description: 'To request a token, a request must be sent to the token url with the client ID and client secret. To obtain the details for this operation, please contact our support at [support@superlatief.nl](mailto:support@superlatief.nl).' security: - default: []