openapi: 3.1.0
info:
  version: 1.0.0
servers:
  - url: https://accept-app.insert.nl/api/v1
tags:
  - name: Authentication
  - name: Products
  - name: Projects
  - name: Subscriptions
security:
  - oauth2: []
paths:
  /token:
    post:
      operationId: token.createAccessToken
      summary: Obtain access token
      tags:
        - Authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokenRequest'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_token:
                    type: string
                  token_type:
                    type: string
                    enum:
                      - bearer
                  expires_in:
                    type: integer
                    enum:
                      - 3600
                required:
                  - access_token
                  - token_type
                  - expires_in
        '403':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - API access is not allowed for this organization.
                required:
                  - error
        '422':
          $ref: '#/components/responses/ValidationException'
      security: []
  /products:
    get:
      operationId: products.listProducts
      summary: List products
      tags:
        - Products
      parameters:
        - name: public
          in: query
          description: Get public products only
          schema:
            type: integer
          example: 1
      responses:
        '200':
          description: Paginated set of `ProductResource`
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ProductResource'
                  links:
                    type: object
                    properties:
                      first:
                        type:
                          - string
                          - 'null'
                      last:
                        type:
                          - string
                          - 'null'
                      prev:
                        type:
                          - string
                          - 'null'
                      next:
                        type:
                          - string
                          - 'null'
                    required:
                      - first
                      - last
                      - prev
                      - next
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                      from:
                        type:
                          - integer
                          - 'null'
                      last_page:
                        type: integer
                      links:
                        type: array
                        description: Generated paginator links.
                        items:
                          type: object
                          properties:
                            url:
                              type:
                                - string
                                - 'null'
                            label:
                              type: string
                            active:
                              type: boolean
                          required:
                            - url
                            - label
                            - active
                      path:
                        type:
                          - string
                          - 'null'
                        description: Base path for paginator generated URLs.
                      per_page:
                        type: integer
                        description: Number of items shown per page.
                      to:
                        type:
                          - integer
                          - 'null'
                        description: Number of the last item in the slice.
                      total:
                        type: integer
                        description: Total number of items being paginated.
                    required:
                      - current_page
                      - from
                      - last_page
                      - links
                      - path
                      - per_page
                      - to
                      - total
                required:
                  - data
                  - links
                  - meta
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
    post:
      operationId: products.createProduct
      summary: Create product
      tags:
        - Products
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProductRequest'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                required:
                  - id
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - Unknown subProductCategory value
                required:
                  - error
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
  /products/{product}/update:
    put:
      operationId: products.updateProduct
      summary: Update product
      tags:
        - Products
      parameters:
        - name: product
          in: path
          required: true
          description: The product ID
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductRequest'
      responses:
        '200':
          description: '`ProductResource`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ProductResource'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
  /products/{product}/archive:
    post:
      operationId: products.archiveProduct
      summary: Archive product
      tags:
        - Products
      parameters:
        - name: product
          in: path
          required: true
          description: The product ID
          schema:
            type: integer
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
                minItems: 0
                maxItems: 0
                additionalItems: false
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
  /products/{product}/images:
    post:
      operationId: products.addProductImage
      summary: Add image to product
      tags:
        - Products
      parameters:
        - name: product
          in: path
          required: true
          description: The product ID
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileRequest'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items: {}
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
  /products/{product}/images/{imageId}:
    delete:
      operationId: products.deleteProductImage
      summary: Delete product image
      tags:
        - Products
      parameters:
        - name: product
          in: path
          required: true
          description: The product ID
          schema:
            type: integer
        - name: imageId
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items: {}
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
  /products/{product}/files:
    post:
      operationId: products.addProductFile
      summary: Add file to product
      tags:
        - Products
      parameters:
        - name: product
          in: path
          required: true
          description: The product ID
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileRequest'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items: {}
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
  /products/{product}/files/{fileId}:
    delete:
      operationId: products.deleteProductFile
      summary: Delete product file
      tags:
        - Products
      parameters:
        - name: product
          in: path
          required: true
          description: The product ID
          schema:
            type: integer
        - name: fileId
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items: {}
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
  /projects:
    get:
      operationId: projects.listProjects
      summary: List projects
      tags:
        - Projects
      responses:
        '200':
          description: Paginated set of `ProjectResource`
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ProjectResource'
                  links:
                    type: object
                    properties:
                      first:
                        type:
                          - string
                          - 'null'
                      last:
                        type:
                          - string
                          - 'null'
                      prev:
                        type:
                          - string
                          - 'null'
                      next:
                        type:
                          - string
                          - 'null'
                    required:
                      - first
                      - last
                      - prev
                      - next
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                      from:
                        type:
                          - integer
                          - 'null'
                      last_page:
                        type: integer
                      links:
                        type: array
                        description: Generated paginator links.
                        items:
                          type: object
                          properties:
                            url:
                              type:
                                - string
                                - 'null'
                            label:
                              type: string
                            active:
                              type: boolean
                          required:
                            - url
                            - label
                            - active
                      path:
                        type:
                          - string
                          - 'null'
                        description: Base path for paginator generated URLs.
                      per_page:
                        type: integer
                        description: Number of items shown per page.
                      to:
                        type:
                          - integer
                          - 'null'
                        description: Number of the last item in the slice.
                      total:
                        type: integer
                        description: Total number of items being paginated.
                    required:
                      - current_page
                      - from
                      - last_page
                      - links
                      - path
                      - per_page
                      - to
                      - total
                required:
                  - data
                  - links
                  - meta
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
    post:
      operationId: projects.createProject
      summary: Create project
      tags:
        - Projects
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectRequest'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                required:
                  - id
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
  /projects/{project}/images:
    post:
      operationId: projects.addProjectImage
      summary: Add project image
      tags:
        - Projects
      parameters:
        - name: project
          in: path
          required: true
          description: The project ID
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileRequest'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items: {}
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
  /projects/{project}/images/{imageId}:
    delete:
      operationId: projects.deleteProjectImage
      summary: Delete project image
      tags:
        - Projects
      parameters:
        - name: project
          in: path
          required: true
          description: The project ID
          schema:
            type: integer
        - name: imageId
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items: {}
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
  /resources/subscriptions:
    get:
      operationId: subscriptions.listSubscriptions
      summary: List subscriptions
      tags:
        - Subscriptions
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  subscriptions:
                    type: array
                    items:
                      $ref: '#/components/schemas/SubscriptionResource'
                required:
                  - count
                  - subscriptions
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
    post:
      operationId: subscriptions.createSubscription
      summary: Create subscription
      tags:
        - Subscriptions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionRequest'
      responses:
        '201':
          description: '`SubscriptionResource`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionResource'
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
  /resources/subscriptions/{subscription}:
    get:
      operationId: subscriptions.get
      summary: Get subscription
      tags:
        - Subscriptions
      parameters:
        - name: subscription
          in: path
          required: true
          description: The subscription UUID
          schema:
            type: string
      responses:
        '200':
          description: '`SubscriptionResource`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionResource'
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
    delete:
      operationId: subscriptions.deleteSubscription
      summary: Delete subscription
      tags:
        - Subscriptions
      parameters:
        - name: subscription
          in: path
          required: true
          description: The subscription UUID
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items: {}
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
  /resources/subscriptions/{subscription}/test:
    post:
      operationId: subscriptions.testSubscription
      summary: Test subscription
      tags:
        - Subscriptions
      parameters:
        - name: subscription
          in: path
          required: true
          description: The subscription UUID
          schema:
            type: string
      responses:
        '202':
          description: ''
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
components:
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://insert.test/api/v1/token
          scopes: {}
  schemas:
    CreateProductRequest:
      type: object
      properties:
        productCategory:
          type: string
        subProductCategory:
          type:
            - string
            - 'null'
        projectNumber:
          type:
            - integer
            - 'null'
        itemDetails:
          type: object
          properties:
            name:
              type: string
              maxLength: 255
            productDescription:
              type: object
              properties:
                description:
                  type:
                    - string
                    - 'null'
                languageCode:
                  type:
                    - string
                    - 'null'
            attachment:
              type: object
              properties:
                imageData:
                  type:
                    - string
                    - 'null'
                  description: >-
                    'itemDetails.productDescription.*.description'  =>
                    ['nullable'],

                    'itemDetails.productDescription.*.languageCode' =>
                    ['nullable'],
                attachedData:
                  type:
                    - string
                    - 'null'
          required:
            - name
        tradeItemIdentification:
          type: object
          properties:
            suppliersTradeItemId:
              type:
                - string
                - 'null'
              description: |-
                'itemDetails.attachment.imageData.*.name'  => ['required'],
                'itemDetails.attachment.imageData.*.data'  => ['required'],
                'itemDetails.attachment.attachedData.name' => ['required'],
                'itemDetails.attachment.attachedData.data' => ['required'],
                'websiteURI' => ['nullable', 'url'],
        physicalDimensions:
          type: object
          properties:
            height:
              type:
                - number
                - 'null'
            width:
              type:
                - number
                - 'null'
            depth:
              type:
                - number
                - 'null'
            uoMMeasurement:
              type:
                - string
                - 'null'
        quantity:
          type: object
          properties:
            quantityValue:
              type: number
            quantityUoM:
              type: string
          required:
            - quantityValue
            - quantityUoM
        priceInformation:
          type: object
          properties:
            price:
              type:
                - number
                - 'null'
            priceBase:
              type: object
              properties:
                VATInformation:
                  type:
                    - boolean
                    - 'null'
                numberOfUnitsInPriceBasis:
                  type:
                    - string
                    - 'null'
                priceOnRequestIndicator:
                  type:
                    - boolean
                    - 'null'
        itemCharacteristics:
          type: object
          properties:
            technicalQuality:
              type:
                - string
                - 'null'
            aestheticQuality:
              type:
                - string
                - 'null'
            rawMaterial:
              type:
                - string
                - 'null'
            color:
              type:
                - string
                - 'null'
        validityInformation:
          type: object
          properties:
            statusCode:
              type:
                - string
                - 'null'
              enum:
                - Beschikbaar
                - Te koop
                - Gereserveerd
                - Geleverd
                - Verkocht
            validityStartDate:
              type:
                - string
                - 'null'
              format: date-time
            validityEndDate:
              type:
                - string
                - 'null'
              format: date-time
        person:
          type: object
          properties:
            personName:
              type:
                - string
                - 'null'
            contactInformation:
              type: object
              properties:
                emailAddress:
                  type:
                    - string
                    - 'null'
                  format: email
        address:
          type: object
          properties:
            street:
              type:
                - string
                - 'null'
            postalCode:
              type:
                - string
                - 'null'
            city:
              type: string
          required:
            - city
        genericEnvironmentalInformation:
          type: object
          properties:
            co2Reduction:
              type:
                - number
                - 'null'
            eciResult:
              type:
                - number
                - 'null'
            mkiNMDid:
              type:
                - string
                - 'null'
            noxResult:
              type:
                - number
                - 'null'
      required:
        - productCategory
      title: CreateProductRequest
    FileRequest:
      type: object
      properties:
        name:
          type: string
        src:
          type: string
      required:
        - name
        - src
      title: FileRequest
    ProductRequest:
      type: object
      properties:
        productCategory:
          type: string
        subProductCategory:
          type:
            - string
            - 'null'
        itemDetails:
          type: object
          properties:
            name:
              type: string
              maxLength: 255
            productDescription:
              type: object
              properties:
                description:
                  type:
                    - string
                    - 'null'
                languageCode:
                  type:
                    - string
                    - 'null'
            attachment:
              type: object
              properties:
                imageData:
                  type:
                    - string
                    - 'null'
                  description: >-
                    'itemDetails.productDescription.*.description'  =>
                    ['nullable'],

                    'itemDetails.productDescription.*.languageCode' =>
                    ['nullable'],
                attachedData:
                  type:
                    - string
                    - 'null'
          required:
            - name
        tradeItemIdentification:
          type: object
          properties:
            suppliersTradeItemId:
              type:
                - string
                - 'null'
              description: |-
                'itemDetails.attachment.imageData.*.name'  => ['required'],
                'itemDetails.attachment.imageData.*.data'  => ['required'],
                'itemDetails.attachment.attachedData.name' => ['required'],
                'itemDetails.attachment.attachedData.data' => ['required'],
                'websiteURI' => ['nullable', 'url'],
        physicalDimensions:
          type: object
          properties:
            height:
              type:
                - number
                - 'null'
            width:
              type:
                - number
                - 'null'
            depth:
              type:
                - number
                - 'null'
            uoMMeasurement:
              type:
                - string
                - 'null'
        quantity:
          type: object
          properties:
            quantityValue:
              type: number
            quantityUoM:
              type: string
          required:
            - quantityValue
            - quantityUoM
        priceInformation:
          type: object
          properties:
            price:
              type:
                - number
                - 'null'
            priceBase:
              type: object
              properties:
                VATInformation:
                  type:
                    - boolean
                    - 'null'
                numberOfUnitsInPriceBasis:
                  type:
                    - string
                    - 'null'
                priceOnRequestIndicator:
                  type:
                    - boolean
                    - 'null'
        itemCharacteristics:
          type: object
          properties:
            technicalQuality:
              type:
                - string
                - 'null'
            aestheticQuality:
              type:
                - string
                - 'null'
            rawMaterial:
              type:
                - string
                - 'null'
            color:
              type:
                - string
                - 'null'
        validityInformation:
          type: object
          properties:
            statusCode:
              type:
                - string
                - 'null'
              enum:
                - Beschikbaar
                - Te koop
                - Gereserveerd
                - Geleverd
                - Verkocht
            validityStartDate:
              type:
                - string
                - 'null'
              format: date-time
            validityEndDate:
              type:
                - string
                - 'null'
              format: date-time
        person:
          type: object
          properties:
            personName:
              type:
                - string
                - 'null'
            contactInformation:
              type: object
              properties:
                emailAddress:
                  type:
                    - string
                    - 'null'
                  format: email
        address:
          type: object
          properties:
            street:
              type:
                - string
                - 'null'
            postalCode:
              type:
                - string
                - 'null'
            city:
              type: string
          required:
            - city
        genericEnvironmentalInformation:
          type: object
          properties:
            co2Reduction:
              type:
                - number
                - 'null'
            eciResult:
              type:
                - number
                - 'null'
            mkiNMDid:
              type:
                - string
                - 'null'
            noxResult:
              type:
                - number
                - 'null'
      required:
        - productCategory
      title: ProductRequest
    ProductResource:
      type: object
      properties:
        id:
          type: integer
        websiteURI:
          type: string
        productCategory:
          type: string
        subProductCategory:
          type: string
        projectNumber:
          type:
            - string
            - 'null'
        tradeItemIdentification:
          type: object
          properties:
            suppliersTradeItemId:
              type:
                - string
                - 'null'
          required:
            - suppliersTradeItemId
        itemDetails:
          type: object
          properties:
            name:
              type: string
            productDescription:
              type: array
              prefixItems:
                - type: object
                  properties:
                    description:
                      type: string
                    languageCode:
                      type: string
                      enum:
                        - NL
                  required:
                    - description
                    - languageCode
              minItems: 1
              maxItems: 1
              additionalItems: false
            attachment:
              type: object
              properties:
                imageData:
                  type: string
                attachedData:
                  type: string
              required:
                - imageData
                - attachedData
          required:
            - name
            - productDescription
            - attachment
        physicalDimensions:
          type: object
          properties:
            height:
              type:
                - string
                - 'null'
            width:
              type:
                - string
                - 'null'
            depth:
              type:
                - string
                - 'null'
            uoMMeasurement:
              anyOf:
                - {}
                - type: string
                - type: 'null'
          required:
            - height
            - width
            - depth
            - uoMMeasurement
        quantity:
          type: object
          properties:
            quantityValue:
              type:
                - string
                - 'null'
            quantityUoM:
              type:
                - string
                - 'null'
          required:
            - quantityValue
            - quantityUoM
        priceInformation:
          type: object
          properties:
            price:
              type:
                - string
                - 'null'
            priceBase:
              type: object
              properties:
                VATInformation:
                  type:
                    - boolean
                    - 'null'
                numberOfUnitsInPriceBasis:
                  type:
                    - string
                    - 'null'
                priceOnRequestIndicator:
                  type:
                    - boolean
                    - 'null'
              required:
                - VATInformation
                - numberOfUnitsInPriceBasis
                - priceOnRequestIndicator
          required:
            - price
            - priceBase
        itemCharacteristics:
          type: object
          properties:
            technicalQuality:
              type:
                - string
                - 'null'
            aestheticQuality:
              type:
                - string
                - 'null'
            rawMaterial:
              type:
                - string
                - 'null'
            color:
              type:
                - string
                - 'null'
          required:
            - technicalQuality
            - aestheticQuality
            - rawMaterial
            - color
        validityInformation:
          type: object
          properties:
            statusCode:
              type:
                - string
                - 'null'
            validityStartDate:
              type:
                - string
                - 'null'
              format: date-time
            validityEndDate:
              type:
                - string
                - 'null'
              format: date-time
          required:
            - statusCode
            - validityStartDate
            - validityEndDate
        person:
          type: object
          properties:
            personName:
              type:
                - string
                - 'null'
            contactInformation:
              type: object
              properties:
                emailAddress:
                  type:
                    - string
                    - 'null'
              required:
                - emailAddress
          required:
            - personName
            - contactInformation
        address:
          type: object
          properties:
            street:
              type:
                - string
                - 'null'
            postalCode:
              type:
                - string
                - 'null'
            city:
              type:
                - string
                - 'null'
          required:
            - street
            - postalCode
            - city
        genericEnvironmentalInformation:
          type: object
          properties:
            co2Reduction:
              type:
                - string
                - 'null'
            eciResult:
              type:
                - string
                - 'null'
            mkiNMDid:
              type:
                - string
                - 'null'
            noxResult:
              type:
                - string
                - 'null'
          required:
            - co2Reduction
            - eciResult
            - mkiNMDid
            - noxResult
      required:
        - id
        - websiteURI
        - productCategory
        - subProductCategory
        - projectNumber
        - tradeItemIdentification
        - itemDetails
        - physicalDimensions
        - quantity
        - priceInformation
        - itemCharacteristics
        - validityInformation
        - person
        - address
        - genericEnvironmentalInformation
      title: ProductResource
    ProjectRequest:
      type: object
      properties:
        title:
          type: string
          maxLength: 255
        contactpersoon_naam:
          type: string
        contactpersoon_email:
          type: string
          format: email
        adres:
          type: string
        postcode:
          type: string
        plaats:
          type: string
        materiaal_beschikbaar_vanaf:
          type: string
          format: date-time
        materiaal_beschikbaar_tot:
          type: string
          format: date-time
        materiaal_online_vanaf:
          type: string
          format: date-time
        materiaal_online_tot:
          type: string
          format: date-time
        levering:
          type: string
        status_materiaal:
          type: string
          enum:
            - Beschikbaar
            - Te koop
            - Gereserveerd
            - Geleverd
            - Verkocht
        grondsoort:
          type:
            - string
            - 'null'
          enum:
            - ''
            - Zand
            - Veen
            - Klei
            - Loss
            - Anders
          maxLength: 255
        prive:
          type: boolean
      required:
        - title
        - contactpersoon_naam
        - contactpersoon_email
        - adres
        - postcode
        - plaats
        - materiaal_beschikbaar_vanaf
        - materiaal_beschikbaar_tot
        - materiaal_online_vanaf
        - materiaal_online_tot
        - levering
        - status_materiaal
      title: ProjectRequest
    ProjectResource:
      type: object
      properties:
        id:
          type: integer
        title:
          type: string
        published:
          type: boolean
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
        beschrijving:
          type:
            - string
            - 'null'
        contactpersoon_naam:
          type:
            - string
            - 'null'
        contactpersoon_email:
          type:
            - string
            - 'null'
        adres:
          type:
            - string
            - 'null'
        postcode:
          type:
            - string
            - 'null'
        plaats:
          type:
            - string
            - 'null'
        latitude:
          type:
            - string
            - 'null'
        longitude:
          type:
            - string
            - 'null'
        functie_object:
          type:
            - string
            - 'null'
        bouwjaar:
          type:
            - integer
            - 'null'
        aantal_bouwlagen:
          type:
            - integer
            - 'null'
        bruto_vloeroppervlak_m2:
          type:
            - integer
            - 'null'
        architect:
          type:
            - string
            - 'null'
        voorbereidende_werkzaamheden_mogelijk_vanaf:
          type:
            - string
            - 'null'
          format: date-time
        grondwaterstand:
          type:
            - integer
            - 'null'
        grondsoort:
          type:
            - string
            - 'null'
        bereikbaarheid_locatie:
          type:
            - string
            - 'null'
        materiaal_beschikbaar_vanaf:
          type:
            - string
            - 'null'
          format: date-time
        materiaal_beschikbaar_tot:
          type:
            - string
            - 'null'
          format: date-time
        materiaal_online_vanaf:
          type:
            - string
            - 'null'
          format: date-time
        materiaal_online_tot:
          type:
            - string
            - 'null'
          format: date-time
        levering:
          type:
            - string
            - 'null'
        status_materiaal:
          type:
            - string
            - 'null'
        materiaaleigenaar:
          type:
            - string
            - 'null'
        prive:
          type:
            - boolean
            - 'null'
        archived:
          type:
            - boolean
            - 'null'
        url:
          type: string
      required:
        - id
        - title
        - published
        - created_at
        - updated_at
        - beschrijving
        - contactpersoon_naam
        - contactpersoon_email
        - adres
        - postcode
        - plaats
        - latitude
        - longitude
        - functie_object
        - bouwjaar
        - aantal_bouwlagen
        - bruto_vloeroppervlak_m2
        - architect
        - voorbereidende_werkzaamheden_mogelijk_vanaf
        - grondwaterstand
        - grondsoort
        - bereikbaarheid_locatie
        - materiaal_beschikbaar_vanaf
        - materiaal_beschikbaar_tot
        - materiaal_online_vanaf
        - materiaal_online_tot
        - levering
        - status_materiaal
        - materiaaleigenaar
        - prive
        - archived
        - url
      title: ProjectResource
    SubscriptionRequest:
      type: object
      properties:
        resource_type:
          type: string
          enum:
            - subscription
        start_date:
          type:
            - string
            - 'null'
        end_date:
          type:
            - string
            - 'null'
        webhook_url:
          type: string
          format: uri
        event_type:
          type: array
          items:
            type: string
            enum:
              - created
              - updated
              - deleted
      required:
        - resource_type
        - webhook_url
        - event_type
      title: SubscriptionRequest
    SubscriptionResource:
      type: object
      properties:
        id:
          type: string
        resource_type:
          type: string
          enum:
            - subscription
        url:
          type: string
        created_date:
          type: string
        start_date:
          type: string
        end_date:
          type: string
        consumer_id:
          type: string
          enum:
            - did:ishare:EU.NL.NTRNL-73085065
        provider_id:
          type: string
          enum:
            - did:ishare:EU.NL.NTRNL-73085065
        description:
          type:
            - string
            - 'null'
        event_type:
          type: string
        status:
          type: string
          enum:
            - active
            - inactive
        webhook_url:
          type: string
        signing_secret:
          type: string
      required:
        - id
        - resource_type
        - url
        - created_date
        - start_date
        - end_date
        - consumer_id
        - provider_id
        - description
        - event_type
        - status
        - webhook_url
        - signing_secret
      title: SubscriptionResource
    TokenRequest:
      type: object
      properties:
        grant_type:
          type: string
          enum:
            - client_credentials
        client_id:
          type: number
        client_secret:
          type: string
      required:
        - grant_type
        - client_id
        - client_secret
      title: TokenRequest
  responses:
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
