openapi: 3.0.3
info:
  title: ServicePlanner
  description: ''
  version: 1.0.0
servers:
  -
    url: 'https://api.service-planner.nl'
paths:
  /address:
    get:
      summary: list
      operationId: list
      description: "Middels deze functie kunt u een lijst met adressen ophalen.\n\nIndien de `next_page_url` aanwezig is zijn er meer pagina's met addressen. Adressen worden per 100 adressen teruggegeven."
      parameters:
        -
          in: query
          name: page
          description: 'the page number.'
          example: 1.0
          required: false
          schema:
            type: number
            description: 'the page number.'
            example: 1.0
        -
          in: query
          name: client_id
          description: 'show only addresses of the client with this id.'
          example: null
          required: false
          schema:
            type: number
            description: 'show only addresses of the client with this id.'
            example: null
        -
          in: query
          name: per_page
          description: 'number of results per page.  Valid options are 20, 100, 200, 500, 1000.'
          example: 20
          required: false
          schema:
            type: integer
            description: 'number of results per page.  Valid options are 20, 100, 200, 500, 1000.'
            example: 20
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  current_page: 1
                  data:
                    -
                      id: 1
                      profitemp_id: null
                      company_id: 1
                      client_id: 2
                      street: Dorpstraat
                      house_number: '1'
                      house_number_addition: null
                      zipcode: '1234 XX'
                      city: Amsterdam
                      type: invoice
                      geocode_lat: '52.3599976'
                      geocode_lng: '4.8852188'
                      country_id: 157
                      created_at: '2021-02-23T15:14:13.000000Z'
                      updated_at: '2021-05-04T07:50:09.000000Z'
                      old_address_id: 0
                      deleted_at: null
                  first_page_url: 'https://service-planner-app.test/api/address?page=1'
                  from: 1
                  next_page_url: 'https://service-planner-app.test/api/address?page=2'
                  path: 'https://service-planner-app.test/api/address'
                  per_page: 100
                  prev_page_url: null
                  to: 100
                properties:
                  current_page:
                    type: integer
                    example: 1
                  data:
                    type: array
                    example:
                      -
                        id: 1
                        profitemp_id: null
                        company_id: 1
                        client_id: 2
                        street: Dorpstraat
                        house_number: '1'
                        house_number_addition: null
                        zipcode: '1234 XX'
                        city: Amsterdam
                        type: invoice
                        geocode_lat: '52.3599976'
                        geocode_lng: '4.8852188'
                        country_id: 157
                        created_at: '2021-02-23T15:14:13.000000Z'
                        updated_at: '2021-05-04T07:50:09.000000Z'
                        old_address_id: 0
                        deleted_at: null
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        profitemp_id:
                          type: string
                          example: null
                        company_id:
                          type: integer
                          example: 1
                        client_id:
                          type: integer
                          example: 2
                        street:
                          type: string
                          example: Dorpstraat
                        house_number:
                          type: string
                          example: '1'
                        house_number_addition:
                          type: string
                          example: null
                        zipcode:
                          type: string
                          example: '1234 XX'
                        city:
                          type: string
                          example: Amsterdam
                        type:
                          type: string
                          example: invoice
                        geocode_lat:
                          type: string
                          example: '52.3599976'
                        geocode_lng:
                          type: string
                          example: '4.8852188'
                        country_id:
                          type: integer
                          example: 157
                        created_at:
                          type: string
                          example: '2021-02-23T15:14:13.000000Z'
                        updated_at:
                          type: string
                          example: '2021-05-04T07:50:09.000000Z'
                        old_address_id:
                          type: integer
                          example: 0
                        deleted_at:
                          type: string
                          example: null
                  first_page_url:
                    type: string
                    example: 'https://service-planner-app.test/api/address?page=1'
                  from:
                    type: integer
                    example: 1
                  next_page_url:
                    type: string
                    example: 'https://service-planner-app.test/api/address?page=2'
                  path:
                    type: string
                    example: 'https://service-planner-app.test/api/address'
                  per_page:
                    type: integer
                    example: 100
                  prev_page_url:
                    type: string
                    example: null
                  to:
                    type: integer
                    example: 100
      tags:
        - Addresses
    post:
      summary: add
      operationId: add
      description: 'Middels deze functie is het mogelijk om een adres toe te voegen.'
      parameters: []
      responses: {  }
      tags:
        - Addresses
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                client_id:
                  type: integer
                  description: 'The id of the client.'
                  example: 7
                street:
                  type: string
                  description: ''
                  example: Dorpstraat
                house_number:
                  type: string
                  description: ''
                  example: '1'
                house_number_addition:
                  type: string
                  description: ''
                  example: A
                zipcode:
                  type: string
                  description: ''
                  example: 6500AA
                city:
                  type: string
                  description: ''
                  example: Nijmegen
                type:
                  type: string
                  description: 'The type of the address. This is either `invoice` or `work`.'
                  example: work
                geocode_lat:
                  type: string
                  description: ''
                  example: '52.3599976'
                geocode_lng:
                  type: string
                  description: ''
                  example: '4.8852188'
                country_id:
                  type: integer
                  description: 'The id of the country. Use 157 for the Netherlands or 22 for Belgium.'
                  example: 157
              required:
                - client_id
                - type
                - country_id
  '/address/{id}':
    get:
      summary: show
      operationId: show
      description: 'Middels deze functie kunt u meer informatie over een adres ophalen.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n \"id\": ,\n \"company_id\": 1,\n \"client_id\": 1,\n \"street\": \"Dorpstraat 1\",\n \"house_number\": \"\",\n \"house_number_addition\": \"\",\n \"zipcode\": \"1234 VM\",\n \"city\": \"Tegelen\",\n \"type\": \"invoice\",\n \"geocode_lat\": \"\",\n \"geocode_lng\": \"\",\n \"country_id\": 157,\n \"created_at\": null,\n \"updated_at\": null,\n \"old_address_id\": 0,\n \"deleted_at\": null,\n \"client\": {\n       \"id\": 1,\n       \"profitemp_id\": 172,\n       \"company_id\": 1632,\n       \"client_number\": 8148,\n       \"gender\": \"M\",\n       \"first_name\": \"Dhr.\",\n       \"last_name\": \"aaaaa\",\n       \"company_name\": \"\",\n       \"email\": null,\n       \"email_alternative\": \"\",\n       \"email_invoice\": null,\n       \"appointment_confirmation\": 0,\n       \"phone\": \"\",\n       \"phone_note\": null,\n       \"phone_alternative\": \"\",\n       \"phone_alternative_note\": null,\n       \"note\": \"\",\n       \"email_option\": \"\",\n       \"work_address_same_as_invoice_address\": 0,\n       \"add_contact_person\": 0,\n       \"checked\": null,\n       \"deleted_at\": null,\n       \"created_at\": null,\n       \"updated_at\": null\n },\n}"
      tags:
        - Addresses
    put:
      summary: update
      operationId: update
      description: 'Middels deze functie is het mogelijk om een adres te updaten.'
      parameters: []
      responses: {  }
      tags:
        - Addresses
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                client_id:
                  type: integer
                  description: 'The id of the client. Example 1'
                  example: 11
                street:
                  type: string
                  description: ''
                  example: Dorpstraat
                house_number:
                  type: string
                  description: ''
                  example: '1'
                house_number_addition:
                  type: string
                  description: ''
                  example: A
                zipcode:
                  type: string
                  description: ''
                  example: 6500AA
                city:
                  type: string
                  description: ''
                  example: Nijmegen
                type:
                  type: string
                  description: 'The type of the address. This is either `invoice` or `work`.'
                  example: work
                geocode_lat:
                  type: string
                  description: ''
                  example: '52.3599976'
                geocode_lng:
                  type: string
                  description: ''
                  example: '4.8852188'
                country_id:
                  type: integer
                  description: 'The id of the country. Use 157 for the Netherlands or 22 for Belgium.'
                  example: 157
              required:
                - client_id
                - type
                - country_id
    delete:
      summary: delete
      operationId: delete
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Addresses
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the address.'
        example: 34241
        required: true
        schema:
          type: integer
  /appointment/types:
    get:
      summary: 'list types'
      operationId: listTypes
      description: 'Middels deze functie kunnen alle afspraaksoorten worden opgehaald. Deze kunnen gebruikt worden bij aanmaken van items of maken van afspraken.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "[\n{\n  \"id\": 4927,\n  \"profitemp_id\": null,\n  \"company_id\": 1411,\n  \"name\": \"Auto inspectie\",\n  \"location\": \"\",\n  \"time\": 30,\n  \"description\": \"het inspecteren van uw auto\",\n  \"priority\": 0,\n  \"max_distance\": \"\",\n  \"publicly_visible\": true,\n  \"created_at\": \"2021-11-17T09:08:48.000000Z\",\n  \"updated_at\": \"2021-11-17T09:08:48.000000Z\",\n  \"deleted_at\": null\n},\n]"
      tags:
        - Appointments
  /appointment:
    get:
      summary: list
      operationId: list
      description: 'Middels deze functie kunnen afspraken worden opgehaald'
      parameters:
        -
          in: query
          name: page
          description: 'the page number.'
          example: 1
          required: false
          schema:
            type: integer
            description: 'the page number.'
            example: 1
        -
          in: query
          name: users
          description: "a list with id's of the employees."
          example:
            - 1
            - 2
            - 3
          required: false
          schema:
            type: array
            description: "a list with id's of the employees."
            example:
              - 1
              - 2
              - 3
            items:
              type: integer
        -
          in: query
          name: client_id
          description: 'the id of a client.'
          example: null
          required: false
          schema:
            type: integer
            description: 'the id of a client.'
            example: null
        -
          in: query
          name: appointment_type
          description: 'appointment type id.'
          example:
            - 1
            - 2
          required: false
          schema:
            type: array
            description: 'appointment type id.'
            example:
              - 1
              - 2
            items:
              type: integer
        -
          in: query
          name: order
          description: 'The field for sorting appointments. Available options are `id`, `appointment_type_id`, `time_from`, `time`, `client_id`, `address_id`, `status`, `updated_at`, `created_at`.'
          example: null
          required: false
          schema:
            type: string
            description: 'The field for sorting appointments. Available options are `id`, `appointment_type_id`, `time_from`, `time`, `client_id`, `address_id`, `status`, `updated_at`, `created_at`.'
            example: null
        -
          in: query
          name: ordertype
          description: 'Sorting by ascending or descending. Available options are `asc` and `desc`.'
          example: asc
          required: false
          schema:
            type: string
            description: 'Sorting by ascending or descending. Available options are `asc` and `desc`.'
            example: asc
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n    \"current_page\": 2,\n    \"data\": [\n{\n    \"id\": 12345,\n    \"company_id\": ,\n    \"client_id\": ,\n    \"appointment_type_id\": ,\n    \"send_mail_to_client\": \"\",\n    \"prepared_at\": \"2016-11-16\",\n    \"planned_at\": \"2016-11-16\",\n    \"send_confirmed_at\": null,\n    \"send_at\": \"2016-11-16\",\n    \"confirmed_at\": null,\n    \"visited_at\": \"2020-08-11\",\n    \"send_reminder_at\": null,\n    \"send_reminder_2_at\": null,\n    \"not_visited_at\": null,\n    \"canceled_at\": \"2016-11-15\",\n    \"drive_time\": null,\n    \"time_from\": \"2016-11-16T09:00:00.000000Z\",\n    \"time_to\": \"2016-11-16T10:00:00.000000Z\",\n    \"time\": 60,\n    \"plan_from\": \"2016-11-01T00:00:00.000000Z\",\n    \"plan_to\": \"2016-11-30T23:59:59.000000Z\",\n    \"plan_next_date\": null,\n    \"address_geocode\": null,\n    \"address_id\": \"\",\n    \"description_intern\": \"\",\n    \"description_client\": null,\n    \"reminder_checked\": null,\n    \"created_at\": null,\n    \"updated_at\": \"2020-08-11T12:11:08.000000Z\",\n    \"time_from_order\": \"2016-11-16 09:00:00\",\n    \"plan_from_order\": \"2016-11-01 00:00:00\",\n    \"appointment_type\": {\n    \"id\": 1677,\n    \"company_id\": ,\n    \"name\": \"Onderhoud\",\n    \"location\": \"\",\n    \"time\": 0,\n    \"description\": \"\",\n    \"priority\": 0,\n    \"max_distance\": \"\",\n    \"created_at\": \"2020-08-11T09:46:24.000000Z\",\n    \"updated_at\": \"2020-08-11T09:46:24.000000Z\"\n},\n    \"services\": [\n   {\n       \"id\": ,\n       \"client_id\": ,\n       \"company_id\": ,\n       \"item_category_id\": null,\n       \"address_id\": ,\n       \"name\": \"TopLine Compact HRC 30/CW5\",\n       \"time\": \"55\",\n       \"appointment_type_id\": 1677,\n       \"user_id\": 0,\n       \"recurring\": 1,\n       \"plan_cycle\": \"24\",\n       \"date_from\": \"2019-03-01T00:00:00.000000Z\",\n       \"date_to\": null,\n       \"plan_next_date\": null,\n       \"reminders\": \"\",\n       \"contract\": \"Onderhoud 2jr\",\n       \"note\": \"Garantie tot:  17-6-2024\",\n       \"created_at\": \"2020-08-11T09:46:26.000000Z\",\n       \"updated_at\": null,\n       \"pivot\": {\n       \"appointment_id\": 282331,\n       \"service_id\": 114511\n   },\n       \"checklists\": []\n   }\n  ],\n      \"client\": {\n      \"id\": ,\n      \"company_id\": ,\n      \"client_number\": 8145,\n      \"gender\": \"M\",\n      \"first_name\": \"Fam.\",\n      \"last_name\": \"aaaa\",\n      \"company_name\": \"\",\n      \"email\": null,\n      \"email_alternative\": \"\",\n      \"email_invoice\": null,\n      \"appointment_confirmation\": 0,\n      \"phone\": \"\",\n      \"phone_note\": null,\n      \"phone_alternative\": \"\",\n      \"phone_alternative_note\": null,\n      \"note\": \"\",\n      \"email_option\": \"\",\n      \"work_address_same_as_invoice_address\": 0,\n      \"add_contact_person\": 0,\n      \"checked\": null,\n      \"deleted_at\": null,\n      \"created_at\": null,\n      \"updated_at\": null\n   },\n      \"work_orders\": [],\n      \"address\": {\n      \"id\": ,\n      \"company_id\": ,\n      \"client_id\": ,\n      \"street\": \"street 18\",\n      \"house_number\": \"\",\n      \"house_number_addition\": \"\",\n      \"zipcode\": \"1234 TH\",\n      \"city\": \"plaats\",\n      \"type\": \"work\",\n      \"geocode_lat\": \"51.----\",\n      \"geocode_lng\": \"6.000\",\n      \"country_id\": 157,\n      \"created_at\": null,\n      \"updated_at\": null,\n      \"old_address_id\": 0,\n      \"deleted_at\": null\n   }\n  }\n],\n    \"first_page_url\": \"....api/appointment?page=1\",\n    \"from\": 2,\n    \"last_page\": 158,\n    \"last_page_url\": \"....api/appointment?page=158\",\n    \"next_page_url\": \"....api/appointment?page=3\",\n    \"path\": \"....api/appointment\",\n    \"per_page\": \"1\",\n    \"prev_page_url\": \"....api/appointment?page=1\",\n    \"to\": 2,\n    \"total\": 158\n}"
      tags:
        - Appointments
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                page:
                  type: integer
                  description: ''
                  example: 8
    post:
      summary: add
      operationId: add
      description: "Middels deze functie is het mogelijk om een afspraak toe te voegen.<br /> <b>Gebruik bij voorkeur *plan_appointment:false </b>\n\nWilt u uitnodigingen versturen? zet service op invite met appointment_or_invite:'invite'!\ndaarna deze functie met de volgende opties:\nsend_mail_to_client:\"direct\",plan_appointment:false en / appointment_or_invite op invite"
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  appointment_type_id: 1077
                  client_id: 91341
                  company_id: 1488
                  time_from: '2021-03-01T15:13:35.000000Z'
                  time_to: '2021-03-01T15:13:35.000000Z'
                  time: 2021
                  plan_from: '2021-03-01T15:13:35.000000Z'
                  plan_to: '2021-03-01T15:13:35.000000Z'
                  updated_at: '2021-03-09T09:40:09.000000Z'
                  created_at: '2021-03-09T09:40:09.000000Z'
                  appointment_or_invite: appointment
                  id: 466253
                properties:
                  appointment_type_id:
                    type: integer
                    example: 1077
                  client_id:
                    type: integer
                    example: 91341
                  company_id:
                    type: integer
                    example: 1488
                  time_from:
                    type: string
                    example: '2021-03-01T15:13:35.000000Z'
                  time_to:
                    type: string
                    example: '2021-03-01T15:13:35.000000Z'
                  time:
                    type: integer
                    example: 2021
                  plan_from:
                    type: string
                    example: '2021-03-01T15:13:35.000000Z'
                  plan_to:
                    type: string
                    example: '2021-03-01T15:13:35.000000Z'
                  updated_at:
                    type: string
                    example: '2021-03-09T09:40:09.000000Z'
                  created_at:
                    type: string
                    example: '2021-03-09T09:40:09.000000Z'
                  appointment_or_invite:
                    type: string
                    example: appointment
                  id:
                    type: integer
                    example: 466253
      tags:
        - Appointments
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                appointment_type_id:
                  type: integer
                  description: 'The id of the appointment type.'
                  example: 1
                client_id:
                  type: integer
                  description: 'The id of the client.'
                  example: 2
                address_id:
                  type: integer
                  description: 'The id of the address.'
                  example: 3
                time:
                  type: string
                  description: 'The time of the appointment in minutes.'
                  example: '60'
                send_mail_to_client:
                  type: string
                  description: 'Mail option. Available options are: `never`, `direct` or `default`.'
                  example: default
                plan_appointment:
                  type: boolean
                  description: 'optional. Available options are: `true`, `false` default is `true`.'
                  example: true
                appointment_or_invite:
                  type: optional.
                  description: 'Available options are: `appointment`, `invite` default is `appointment`.'
                  example: appointment
                services:
                  type: array
                  description: 'optional A list of services (items).'
                  example:
                    - 1
                    - 5
                    - 1337
                  items:
                    type: integer
                users:
                  type: array
                  description: 'optional A list of users (employees).'
                  example:
                    - 2
                    - 3
                    - 1986
                  items:
                    type: integer
              required:
                - appointment_type_id
                - client_id
                - address_id
                - time
                - send_mail_to_client
  '/appointment/{id}':
    get:
      summary: show
      operationId: show
      description: 'Middels deze functie kunt u meer informatie over een afspraak ophalen.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n\"id\": ,\n\"company_id\": ,\n\"client_id\": 804355,\n\"appointment_type_id\": 2176,\n\"send_mail_to_client\": \"\",\n\"prepared_at\": \"2016-11-16\",\n\"planned_at\": \"2016-11-16\",\n\"send_confirmed_at\": null,\n\"send_at\": \"2016-11-16\",\n\"confirmed_at\": null,\n\"visited_at\": \"2020-08-11\",\n\"send_reminder_at\": null,\n\"send_reminder_2_at\": null,\n\"not_visited_at\": null,\n\"canceled_at\": \"2016-11-15\",\n\"drive_time\": null,\n\"time_from\": \"2016-11-16T09:00:00.000000Z\",\n\"time_to\": \"2016-11-16T10:00:00.000000Z\",\n\"time\": 60,\n\"plan_from\": \"2016-11-01T00:00:00.000000Z\",\n\"plan_to\": \"2016-11-30T23:59:59.000000Z\",\n\"plan_next_date\": null,\n\"address_geocode\": null,\n\"address_id\": \"\",\n\"description_intern\": \"\",\n\"description_client\": null,\n\"reminder_checked\": null,\n\"created_at\": null,\n\"updated_at\": \"2020-08-11T12:11:08.000000Z\",\n\"status_system\": \"canceled\",\n\"work_orders\": [],\n\"field_values\": [],\n\"work_order\": null,\n\"client\": {\n\"id\": 158816,\n\"profitemp_id\": 172,\n\"company_id\": 1632,\n\"client_number\": 8145,\n\"gender\": \"M\",\n\"first_name\": \"Fam.\",\n\"last_name\": \"Hendrix\",\n\"company_name\": \"\",\n\"email\": null,\n\"email_alternative\": \"\",\n\"email_invoice\": null,\n\"appointment_confirmation\": 0,\n\"phone\": \"\",\n\"phone_note\": null,\n\"phone_alternative\": \"\",\n\"phone_alternative_note\": null,\n\"note\": \"\",\n\"email_option\": \"\",\n\"work_address_same_as_invoice_address\": 0,\n\"add_contact_person\": 0,\n\"checked\": null,\n\"deleted_at\": null,\n\"created_at\": null,\n\"updated_at\": null\n},\n     \"appointment_type\": {},\n     \"address\": {},\n     \"checklists\": [],\n     \"services\": [{}}],\n     \"users\": [{}}],\n     \"company\": {}\n}"
      tags:
        - Appointments
    delete:
      summary: delete
      operationId: delete
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Appointments
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the appointment.'
        example: 31778
        required: true
        schema:
          type: integer
  /clients:
    get:
      summary: list
      operationId: list
      description: 'Middels deze functie kunt u een lijst met klanten ophalen.'
      parameters:
        -
          in: query
          name: page
          description: 'page number.'
          example: 1
          required: false
          schema:
            type: integer
            description: 'page number.'
            example: 1
        -
          in: query
          name: per_page
          description: 'number of results per page. Valid options are 20, 100, 200, 500, 1000.'
          example: 20
          required: false
          schema:
            type: integer
            description: 'number of results per page. Valid options are 20, 100, 200, 500, 1000.'
            example: 20
        -
          in: query
          name: search
          description: 'search for a client by name.'
          example: 'John Doe'
          required: false
          schema:
            type: string
            description: 'search for a client by name.'
            example: 'John Doe'
        -
          in: query
          name: client_number
          description: 'search for a client by client number.'
          example: '123456789'
          required: false
          schema:
            type: string
            description: 'search for a client by client number.'
            example: '123456789'
        -
          in: query
          name: sort
          description: 'sort results by a field. Valid options are id, client_number, first_name, last_name, email, created_at, updated_at.'
          example: client_number
          required: false
          schema:
            type: string
            description: 'sort results by a field. Valid options are id, client_number, first_name, last_name, email, created_at, updated_at.'
            example: client_number
        -
          in: query
          name: ordertype
          description: 'sort order. Valid options are asc, desc. Required if sort is set.'
          example: asc
          required: false
          schema:
            type: string
            description: 'sort order. Valid options are asc, desc. Required if sort is set.'
            example: asc
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Clients
    post:
      summary: add
      operationId: add
      description: 'Middels deze functie is het mogelijk om een client toe te voegen.'
      parameters: []
      responses: {  }
      tags:
        - Clients
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                client_number:
                  type: integer
                  description: 'A unique identifier of the client. Only numbers allowed'
                  example: 7
                gender:
                  type: string
                  description: 'm, f, m-f, fam, afd.'
                  example: m-f
                first_name:
                  type: string
                  description: 'The first name of the client.'
                  example: John
                last_name:
                  type: string
                  description: 'The last name of the client.'
                  example: Doe
                company_name:
                  type: string
                  description: 'The name of the company.'
                  example: 'John Doe'
                email:
                  type: string
                  description: 'The email of the client.'
                  example: example@service-planner.nl
                mobile_phone:
                  type: string
                  description: 'The mobile phone of the client.'
                  example: '0612345678'
                phone:
                  type: string
                  description: 'The phone of the client.'
                  example: '0612345678'
                address:
                  type: array
                  description: 'The work/invoice address of the client.'
                  example:
                    - praesentium
                  items:
                    type: string
                contactPerson:
                  type: array
                  description: ''
                  example:
                    - blanditiis
                  items:
                    type: string
  '/clients/{id}':
    get:
      summary: show
      operationId: show
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n \"id\": 4,\n \"name\": \"Jessica Jones\",\n ....,\n \"appointments\": [ ...],\n \"addresses\": [ ...],\n \"offers\": [ ...],\n \"invoices\": [ ...],\n \"addresses\": [ ...],\n}"
      tags:
        - Clients
    put:
      summary: update
      operationId: update
      description: 'Middels deze functie is het mogelijk om een client up te daten'
      parameters: []
      responses: {  }
      tags:
        - Clients
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                client_number:
                  type: string
                  description: 'A unique identifier of the client. required'
                  example: ab
                gender:
                  type: string
                  description: 'm, f, m-f, fam, afd'
                  example: quisquam
                first_name:
                  type: string
                  description: ''
                  example: quia
                last_name:
                  type: string
                  description: ''
                  example: nemo
                company_name:
                  type: string
                  description: ''
                  example: reprehenderit
                email:
                  type: string
                  description: ''
                  example: jerry.bruen@example.net
                mobile_phone:
                  type: string
                  description: ''
                  example: at
                phone:
                  type: string
                  description: ''
                  example: totam
    delete:
      summary: delete
      operationId: delete
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Clients
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the client.'
        example: voluptates
        required: true
        schema:
          type: string
  '/clients/{client}/services':
    get:
      summary: 'list items'
      operationId: listItems
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Clients
    post:
      summary: 'create item'
      operationId: createItem
      description: "Create a new item for the client.\nExample Attachments\nphp:\n'attachments[]'=> new CURLFILE('/C:/Users/XXXXX/Downloads/Checklist_5750-1.pdf')"
      parameters: []
      responses: {  }
      tags:
        - Clients
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                address_id:
                  type: integer
                  description: 'The id of the address.'
                  example: 17
                name:
                  type: string
                  description: 'The name of the item. value mag niet uit meer dan 255 tekens bestaan.'
                  example: iwgxhuylmllpmzjozvn
                appointment_type_id:
                  type: integer
                  description: 'The id of the appointment type.'
                  example: 2
                time:
                  type: integer
                  description: 'Duration in minutes.'
                  example: 15
                recurring:
                  type: boolean
                  description: 'Set to true to plan this item automatilcy.'
                  example: true
                plan_cycle:
                  type: integer
                  description: 'Plan cycle in months. This field is required when <code>recurring</code> is <code>1</code>.'
                  example: 17
                date_from:
                  type: string
                  description: 'Start date for recurring planning. value moet een datum bevatten.'
                  example: '2024-12-20T12:17:33'
                date_to:
                  type: string
                  description: 'End date of recurring planning, can be null. value moet een datum bevatten.'
                  example: '2024-12-20T12:17:33'
                appointment_or_invite:
                  type: string
                  description: ''
                  example: appointment
                  enum:
                    - appointment
                    - invite
                attachments:
                  type: object
                  description: ''
                  example: null
                  properties: {  }
              required:
                - address_id
                - name
                - appointment_type_id
                - time
    parameters:
      -
        in: path
        name: client
        description: 'The client.'
        example: sint
        required: true
        schema:
          type: string
  '/clients/{client}/services/{service}':
    get:
      summary: 'show item'
      operationId: showItem
      description: 'Middels deze functie kunt u meer informatie over het item vinden van de client.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 258530
                  profitemp_id: null
                  client_id: 335816
                  company_id: 1411
                  item_category_id: null
                  address_id: 578863
                  name: test
                  time: '60'
                  appointment_type_id: 4789
                  user_id: 0
                  recurring: null
                  plan_cycle: '12'
                  date_from: null
                  date_to: null
                  plan_next_date: null
                  reminders: null
                  contract: null
                  note: null
                  created_at: '2022-01-11T08:13:09.000000Z'
                  updated_at: '2022-01-11T08:13:47.000000Z'
                  deleted_at: null
                  comments:
                    -
                      id: 97382
                      service_id: 258530
                      user_id: 26502
                      description: test
                      created_at: '2022-01-11T08:13:39.000000Z'
                      updated_at: '2022-01-11T08:13:39.000000Z'
                    -
                      id: 97383
                      service_id: 258530
                      user_id: 26502
                      description: test
                      created_at: '2022-01-11T08:13:47.000000Z'
                      updated_at: '2022-01-11T08:13:47.000000Z'
                properties:
                  id:
                    type: integer
                    example: 258530
                  profitemp_id:
                    type: string
                    example: null
                  client_id:
                    type: integer
                    example: 335816
                  company_id:
                    type: integer
                    example: 1411
                  item_category_id:
                    type: string
                    example: null
                  address_id:
                    type: integer
                    example: 578863
                  name:
                    type: string
                    example: test
                  time:
                    type: string
                    example: '60'
                  appointment_type_id:
                    type: integer
                    example: 4789
                  user_id:
                    type: integer
                    example: 0
                  recurring:
                    type: string
                    example: null
                  plan_cycle:
                    type: string
                    example: '12'
                  date_from:
                    type: string
                    example: null
                  date_to:
                    type: string
                    example: null
                  plan_next_date:
                    type: string
                    example: null
                  reminders:
                    type: string
                    example: null
                  contract:
                    type: string
                    example: null
                  note:
                    type: string
                    example: null
                  created_at:
                    type: string
                    example: '2022-01-11T08:13:09.000000Z'
                  updated_at:
                    type: string
                    example: '2022-01-11T08:13:47.000000Z'
                  deleted_at:
                    type: string
                    example: null
                  comments:
                    type: array
                    example:
                      -
                        id: 97382
                        service_id: 258530
                        user_id: 26502
                        description: test
                        created_at: '2022-01-11T08:13:39.000000Z'
                        updated_at: '2022-01-11T08:13:39.000000Z'
                      -
                        id: 97383
                        service_id: 258530
                        user_id: 26502
                        description: test
                        created_at: '2022-01-11T08:13:47.000000Z'
                        updated_at: '2022-01-11T08:13:47.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 97382
                        service_id:
                          type: integer
                          example: 258530
                        user_id:
                          type: integer
                          example: 26502
                        description:
                          type: string
                          example: test
                        created_at:
                          type: string
                          example: '2022-01-11T08:13:39.000000Z'
                        updated_at:
                          type: string
                          example: '2022-01-11T08:13:39.000000Z'
      tags:
        - Clients
    put:
      summary: 'update item'
      operationId: updateItem
      description: "Create a new item for the client.\nExample Attachments\nphp:\n'attachments[]'=> new CURLFILE('/C:/Users/XXXXX/Downloads/Checklist_5750-1.pdf')"
      parameters: []
      responses: {  }
      tags:
        - Clients
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                address_id:
                  type: integer
                  description: ''
                  example: 9
                name:
                  type: string
                  description: 'value mag niet uit meer dan 255 tekens bestaan.'
                  example: ughjmblfr
                appointment_type_id:
                  type: integer
                  description: ''
                  example: 15
                time:
                  type: integer
                  description: ''
                  example: 8
                recurring:
                  type: boolean
                  description: ''
                  example: true
                plan_cycle:
                  type: integer
                  description: 'This field is required when <code>recurring</code> is <code>1</code>.'
                  example: 19
                date_from:
                  type: string
                  description: 'value moet een datum bevatten.'
                  example: '2024-12-20T12:17:33'
                date_to:
                  type: string
                  description: 'value moet een datum bevatten.'
                  example: '2024-12-20T12:17:33'
                appointment_or_invite:
                  type: string
                  description: ''
                  example: invite
                  enum:
                    - appointment
                    - invite
              required:
                - address_id
                - name
                - appointment_type_id
                - time
    parameters:
      -
        in: path
        name: client
        description: 'The client.'
        example: eos
        required: true
        schema:
          type: string
      -
        in: path
        name: service
        description: 'The service.'
        example: aut
        required: true
        schema:
          type: string
  '/clients/{client}/services/{service}/attachments':
    post:
      summary: 'add attachments'
      operationId: addAttachments
      description: "Example Attachments\nphp:\n'attachments[]'=> new CURLFILE('/C:/Users/XXXXX/Downloads/Checklist_5750-1.pdf')"
      parameters: []
      responses: {  }
      tags:
        - Clients
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                delete_attachments:
                  type: boolean
                  description: ''
                  example: false
                attachments:
                  type: array
                  description: 'Must be a file. value mag niet meer dan 20000 kilobytes zijn.'
                  items:
                    type: string
                    format: binary
              required:
                - attachments
    parameters:
      -
        in: path
        name: client
        description: 'The client.'
        example: et
        required: true
        schema:
          type: string
      -
        in: path
        name: service
        description: 'The service.'
        example: consequatur
        required: true
        schema:
          type: string
  '/company-redirect/{page}':
    get:
      summary: ''
      operationId: getCompanyRedirectPage
      description: ''
      parameters: []
      responses:
        302:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "<!DOCTYPE html>\n<html>\n    <head>\n        <meta charset=\"UTF-8\" />\n        <meta http-equiv=\"refresh\" content=\"0;url='https://app.service-planner.nl/company-redirect/=sTE'\" />\n\n        <title>Redirecting to https://app.service-planner.nl/company-redirect/=sTE</title>\n    </head>\n    <body>\n        Redirecting to <a href=\"https://app.service-planner.nl/company-redirect/=sTE\">https://app.service-planner.nl/company-redirect/=sTE</a>.\n    </body>\n</html>"
      tags:
        - Endpoints
    parameters:
      -
        in: path
        name: page
        description: 'Optional parameter.'
        required: true
        schema:
          type: string
        examples:
          omitted:
            summary: 'When the value is omitted'
            value: ''
          present:
            summary: 'When the value is present'
            value: '=sTE'
  /:
    get:
      summary: ''
      operationId: get
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
  /invoices:
    get:
      summary: list
      operationId: list
      description: ''
      parameters:
        -
          in: query
          name: per_page
          description: 'number of results per page. Valid options are 20, 100, 200, 500, 1000.'
          example: 20
          required: false
          schema:
            type: integer
            description: 'number of results per page. Valid options are 20, 100, 200, 500, 1000.'
            example: 20
        -
          in: query
          name: page
          description: 'page number.'
          example: 1
          required: false
          schema:
            type: integer
            description: 'page number.'
            example: 1
        -
          in: query
          name: created_at
          description: date.
          example: YYYY-MM-DD
          required: false
          schema:
            type: string
            description: date.
            example: YYYY-MM-DD
        -
          in: query
          name: updated_at
          description: date.
          example: YYYY-MM-DD
          required: false
          schema:
            type: string
            description: date.
            example: YYYY-MM-DD
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Invoices
  '/invoices/{id}':
    get:
      summary: show
      operationId: show
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Invoices
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the invoice.'
        example: sint
        required: true
        schema:
          type: string
  /service:
    get:
      summary: list
      operationId: list
      description: "Middels deze functie kunt u een lijst met items ophalen.\n\nIndien de `next_page_url` aanwezig is zijn er meer pagina's met items. Items worden per 100 items teruggegeven."
      parameters:
        -
          in: query
          name: page
          description: 'the page number.'
          example: 1
          required: false
          schema:
            type: integer
            description: 'the page number.'
            example: 1
        -
          in: query
          name: per_page
          description: 'number of results per page.  Valid options are 20, 100, 200, 500, 1000.'
          example: 20
          required: false
          schema:
            type: integer
            description: 'number of results per page.  Valid options are 20, 100, 200, 500, 1000.'
            example: 20
        -
          in: query
          name: client_id
          description: 'show only items of this client.'
          example: null
          required: false
          schema:
            type: integer
            description: 'show only items of this client.'
            example: null
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"current_page\": 1,\n  \"data\": [\n  {\n     \"id\": 1,\n     \"profitemp_id\": null,\n     \"company_id\": 1,\n     \"item_category_id\": 2,\n     \"address_id\": \"Dorpstraat\",\n     \"name\": \"Piano\",\n     \"time\": 30,\n     \"appointment_type_id\": 1,\n     \"user_id\": 0,\n     \"recurring\": true,\n     \"plan_cycle\": 12,\n     \"date_from\": \"2022-02-15\",\n     \"date_to\": \"2022-02-15\",\n     \"plan_next_date\": \"2022-02-23\",\n     \"reminders\": \"Stemmer meenemen\",\n     \"contract\": null,\n     \"appointment_or_invite\":\"invite\"\n     \"note\": null,\n  }\n  ],\n  \"first_page_url\": \"https:\\/\\/service-planner-app.test\\/api\\/client?page=1\",\n  \"from\": 1,\n  \"next_page_url\": \"https:\\/\\/service-planner-app.test\\/api\\/client?page=2\",\n  \"path\": \"https:\\/\\/service-planner-app.test\\/api\\/client\",\n  \"per_page\": 100,\n  \"prev_page_url\": null,\n  \"to\": 100\n}"
      tags:
        - Items
  '/service/{id}':
    delete:
      summary: delete
      operationId: delete
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Items
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the service.'
        example: aspernatur
        required: true
        schema:
          type: string
  /user:
    get:
      summary: list
      operationId: list
      description: ''
      parameters:
        -
          in: query
          name: page
          description: 'the page number.'
          example: 1
          required: false
          schema:
            type: integer
            description: 'the page number.'
            example: 1
        -
          in: query
          name: per_page
          description: 'number of results per page.  Valid options are 20, 100, 200, 500, 1000.'
          example: 20
          required: false
          schema:
            type: integer
            description: 'number of results per page.  Valid options are 20, 100, 200, 500, 1000.'
            example: 20
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Users
tags:
  -
    name: Addresses
    description: "\nAPIs for managing addresses"
  -
    name: Appointments
    description: "\nAPIs for managing appointments"
  -
    name: Clients
    description: "\nAPIs for managing clients"
  -
    name: Endpoints
    description: ''
  -
    name: Invoices
    description: "\nAPIs for managing invoices"
  -
    name: Items
    description: "\nAPIs for managing items"
  -
    name: Users
    description: "\nAPIs for managing users"
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: 'You can retrieve your token by visiting your account -> Modules and Koppelingen and <b>Generate API token</b>.'
security:
  -
    default: []
