{
  "openapi": "3.0.0",
  "info": {
    "title": "Bonx API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://{apiHost}",
      "variables": {
        "apiHost": {
          "default": "api.example.com",
          "description": "Replace the example host with your space API host from Settings → API tokens."
        }
      }
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "paths": {
    "/sales-orders": {
      "get": {
        "summary": "List sales orders",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "salesOrders": {
                      "items": {
                        "nullable": false,
                        "properties": {
                          "customer": {
                            "description": "A client or supplier organisation",
                            "nullable": true,
                            "properties": {
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "name": {
                                "nullable": false,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "customerReference": {
                            "nullable": true,
                            "type": "string"
                          },
                          "dueDate": {
                            "$ref": "#/components/schemas/date"
                          },
                          "id": {
                            "nullable": false,
                            "type": "integer"
                          },
                          "issuanceDate": {
                            "$ref": "#/components/schemas/date"
                          },
                          "lines": {
                            "items": {
                              "nullable": false,
                              "properties": {
                                "article": {
                                  "description": "Articles with physical reality (= manage-able in stock). This table includes all article types (raw materials, semi-finished, finished products, consumables, etc.)",
                                  "nullable": true,
                                  "properties": {
                                    "code": {
                                      "nullable": true,
                                      "type": "string"
                                    },
                                    "id": {
                                      "nullable": false,
                                      "type": "integer"
                                    },
                                    "name": {
                                      "nullable": false,
                                      "type": "string"
                                    },
                                    "unit": {
                                      "nullable": true,
                                      "type": "string"
                                    }
                                  },
                                  "type": "object"
                                },
                                "description": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "id": {
                                  "nullable": false,
                                  "type": "integer"
                                },
                                "quantity": {
                                  "$ref": "#/components/schemas/numeric"
                                },
                                "total": {
                                  "$ref": "#/components/schemas/numeric"
                                },
                                "unitPrice": {
                                  "$ref": "#/components/schemas/numeric"
                                }
                              },
                              "type": "object"
                            },
                            "nullable": false,
                            "type": "array"
                          },
                          "reference": {
                            "nullable": false,
                            "type": "string"
                          },
                          "site": {
                            "nullable": false,
                            "properties": {
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "name": {
                                "nullable": false,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "step": {
                            "nullable": true,
                            "properties": {
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "name": {
                                "nullable": false,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "stockAvailability": {
                            "nullable": true,
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "nullable": false,
                      "type": "array"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      },
      "post": {
        "summary": "Create a sales order",
        "parameters": [
          {
            "description": "_\"clientOrganizationId\" is required (enter it either in parameters or request body)_",
            "in": "query",
            "name": "clientOrganizationId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "customerReference",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "_\"siteId\" is required (enter it either in parameters or request body)_",
            "in": "query",
            "name": "siteId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "clientOrganizationId": {
                    "nullable": false,
                    "type": "integer"
                  },
                  "customerReference": {
                    "nullable": true,
                    "type": "string"
                  },
                  "dueDate": {
                    "$ref": "#/components/schemas/date"
                  },
                  "siteId": {
                    "nullable": false,
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "insertSalesOrdersOne": {
                      "nullable": true,
                      "properties": {
                        "customer": {
                          "description": "A client or supplier organisation",
                          "nullable": true,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "customerReference": {
                          "nullable": true,
                          "type": "string"
                        },
                        "dueDate": {
                          "$ref": "#/components/schemas/date"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "reference": {
                          "nullable": false,
                          "type": "string"
                        },
                        "site": {
                          "nullable": false,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "stockAvailability": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    },
    "/sales-orders/{id}": {
      "get": {
        "summary": "Retrieve a sales order",
        "parameters": [
          {
            "description": "_\"id\" is required as part of the path_",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "salesOrdersByPk": {
                      "nullable": true,
                      "properties": {
                        "customer": {
                          "description": "A client or supplier organisation",
                          "nullable": true,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "customerReference": {
                          "nullable": true,
                          "type": "string"
                        },
                        "dueDate": {
                          "$ref": "#/components/schemas/date"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "issuanceDate": {
                          "$ref": "#/components/schemas/date"
                        },
                        "lines": {
                          "items": {
                            "nullable": false,
                            "properties": {
                              "article": {
                                "description": "Articles with physical reality (= manage-able in stock). This table includes all article types (raw materials, semi-finished, finished products, consumables, etc.)",
                                "nullable": true,
                                "properties": {
                                  "code": {
                                    "nullable": true,
                                    "type": "string"
                                  },
                                  "id": {
                                    "nullable": false,
                                    "type": "integer"
                                  },
                                  "name": {
                                    "nullable": false,
                                    "type": "string"
                                  },
                                  "unit": {
                                    "nullable": true,
                                    "type": "string"
                                  }
                                },
                                "type": "object"
                              },
                              "description": {
                                "nullable": true,
                                "type": "string"
                              },
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "quantity": {
                                "$ref": "#/components/schemas/numeric"
                              },
                              "total": {
                                "$ref": "#/components/schemas/numeric"
                              },
                              "unitPrice": {
                                "$ref": "#/components/schemas/numeric"
                              }
                            },
                            "type": "object"
                          },
                          "nullable": false,
                          "type": "array"
                        },
                        "reference": {
                          "nullable": false,
                          "type": "string"
                        },
                        "site": {
                          "nullable": false,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "step": {
                          "nullable": true,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "stockAvailability": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      },
      "put": {
        "summary": "Update a sales order",
        "parameters": [
          {
            "in": "query",
            "name": "customerReference",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "_\"id\" is required as part of the path_",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "customerReference": {
                    "nullable": true,
                    "type": "string"
                  },
                  "dueDate": {
                    "$ref": "#/components/schemas/date"
                  },
                  "id": {
                    "nullable": false,
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "updateSalesOrdersByPk": {
                      "nullable": true,
                      "properties": {
                        "customerReference": {
                          "nullable": true,
                          "type": "string"
                        },
                        "dueDate": {
                          "$ref": "#/components/schemas/date"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "reference": {
                          "nullable": false,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    },
    "/shipments": {
      "get": {
        "summary": "List shipments",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "shipments": {
                      "items": {
                        "nullable": false,
                        "properties": {
                          "actualArrivalDate": {
                            "$ref": "#/components/schemas/timestamptz"
                          },
                          "actualDepartureDate": {
                            "$ref": "#/components/schemas/timestamptz"
                          },
                          "carrier": {
                            "description": "A client or supplier organisation",
                            "nullable": true,
                            "properties": {
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "name": {
                                "nullable": false,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "customer": {
                            "description": "A client or supplier organisation",
                            "nullable": true,
                            "properties": {
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "name": {
                                "nullable": false,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "dueDate": {
                            "$ref": "#/components/schemas/date"
                          },
                          "id": {
                            "nullable": false,
                            "type": "integer"
                          },
                          "lines": {
                            "items": {
                              "nullable": false,
                              "properties": {
                                "article": {
                                  "description": "Articles with physical reality (= manage-able in stock). This table includes all article types (raw materials, semi-finished, finished products, consumables, etc.)",
                                  "nullable": true,
                                  "properties": {
                                    "code": {
                                      "nullable": true,
                                      "type": "string"
                                    },
                                    "id": {
                                      "nullable": false,
                                      "type": "integer"
                                    },
                                    "name": {
                                      "nullable": false,
                                      "type": "string"
                                    },
                                    "unit": {
                                      "nullable": true,
                                      "type": "string"
                                    }
                                  },
                                  "type": "object"
                                },
                                "description": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "id": {
                                  "nullable": false,
                                  "type": "integer"
                                },
                                "quantity": {
                                  "$ref": "#/components/schemas/numeric"
                                },
                                "salesOrderLine": {
                                  "nullable": true,
                                  "properties": {
                                    "id": {
                                      "nullable": false,
                                      "type": "integer"
                                    },
                                    "salesOrder": {
                                      "nullable": false,
                                      "properties": {
                                        "id": {
                                          "nullable": false,
                                          "type": "integer"
                                        },
                                        "reference": {
                                          "nullable": false,
                                          "type": "string"
                                        }
                                      },
                                      "type": "object"
                                    }
                                  },
                                  "type": "object"
                                }
                              },
                              "type": "object"
                            },
                            "nullable": false,
                            "type": "array"
                          },
                          "plannedArrivalDate": {
                            "$ref": "#/components/schemas/timestamptz"
                          },
                          "plannedDepartureDate": {
                            "$ref": "#/components/schemas/timestamptz"
                          },
                          "reference": {
                            "nullable": false,
                            "type": "string"
                          },
                          "site": {
                            "nullable": false,
                            "properties": {
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "name": {
                                "nullable": false,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "step": {
                            "nullable": true,
                            "properties": {
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "name": {
                                "nullable": false,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "stockAvailability": {
                            "nullable": true,
                            "type": "string"
                          },
                          "trackingLink": {
                            "nullable": true,
                            "type": "string"
                          },
                          "transportMode": {
                            "nullable": true,
                            "properties": {
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "name": {
                                "nullable": false,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          }
                        },
                        "type": "object"
                      },
                      "nullable": false,
                      "type": "array"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      },
      "post": {
        "summary": "Create a shipment",
        "parameters": [
          {
            "in": "query",
            "name": "carrierOrganizationId",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "clientOrganizationId",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "_\"reference\" is required (enter it either in parameters or request body)_",
            "in": "query",
            "name": "reference",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "siteId",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "carrierOrganizationId": {
                    "nullable": true,
                    "type": "integer"
                  },
                  "clientOrganizationId": {
                    "nullable": true,
                    "type": "integer"
                  },
                  "dueDate": {
                    "$ref": "#/components/schemas/date"
                  },
                  "plannedDepartureDate": {
                    "$ref": "#/components/schemas/timestamptz"
                  },
                  "reference": {
                    "nullable": false,
                    "type": "string"
                  },
                  "siteId": {
                    "nullable": true,
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "insertShipmentsOne": {
                      "nullable": true,
                      "properties": {
                        "carrier": {
                          "description": "A client or supplier organisation",
                          "nullable": true,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "customer": {
                          "description": "A client or supplier organisation",
                          "nullable": true,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "dueDate": {
                          "$ref": "#/components/schemas/date"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "plannedDepartureDate": {
                          "$ref": "#/components/schemas/timestamptz"
                        },
                        "reference": {
                          "nullable": false,
                          "type": "string"
                        },
                        "site": {
                          "nullable": false,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    },
    "/shipments/{id}": {
      "get": {
        "summary": "Retrieve a shipment",
        "parameters": [
          {
            "description": "_\"id\" is required as part of the path_",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "shipmentsByPk": {
                      "nullable": true,
                      "properties": {
                        "actualArrivalDate": {
                          "$ref": "#/components/schemas/timestamptz"
                        },
                        "actualDepartureDate": {
                          "$ref": "#/components/schemas/timestamptz"
                        },
                        "carrier": {
                          "description": "A client or supplier organisation",
                          "nullable": true,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "customer": {
                          "description": "A client or supplier organisation",
                          "nullable": true,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "dueDate": {
                          "$ref": "#/components/schemas/date"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "lines": {
                          "items": {
                            "nullable": false,
                            "properties": {
                              "article": {
                                "description": "Articles with physical reality (= manage-able in stock). This table includes all article types (raw materials, semi-finished, finished products, consumables, etc.)",
                                "nullable": true,
                                "properties": {
                                  "code": {
                                    "nullable": true,
                                    "type": "string"
                                  },
                                  "id": {
                                    "nullable": false,
                                    "type": "integer"
                                  },
                                  "name": {
                                    "nullable": false,
                                    "type": "string"
                                  },
                                  "unit": {
                                    "nullable": true,
                                    "type": "string"
                                  }
                                },
                                "type": "object"
                              },
                              "description": {
                                "nullable": true,
                                "type": "string"
                              },
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "quantity": {
                                "$ref": "#/components/schemas/numeric"
                              },
                              "salesOrderLine": {
                                "nullable": true,
                                "properties": {
                                  "id": {
                                    "nullable": false,
                                    "type": "integer"
                                  },
                                  "salesOrder": {
                                    "nullable": false,
                                    "properties": {
                                      "id": {
                                        "nullable": false,
                                        "type": "integer"
                                      },
                                      "reference": {
                                        "nullable": false,
                                        "type": "string"
                                      }
                                    },
                                    "type": "object"
                                  }
                                },
                                "type": "object"
                              }
                            },
                            "type": "object"
                          },
                          "nullable": false,
                          "type": "array"
                        },
                        "plannedArrivalDate": {
                          "$ref": "#/components/schemas/timestamptz"
                        },
                        "plannedDepartureDate": {
                          "$ref": "#/components/schemas/timestamptz"
                        },
                        "reference": {
                          "nullable": false,
                          "type": "string"
                        },
                        "site": {
                          "nullable": false,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "step": {
                          "nullable": true,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "stockAvailability": {
                          "nullable": true,
                          "type": "string"
                        },
                        "trackingLink": {
                          "nullable": true,
                          "type": "string"
                        },
                        "transportMode": {
                          "nullable": true,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      },
      "put": {
        "summary": "Update a shipment",
        "parameters": [
          {
            "in": "query",
            "name": "carrierOrganizationId",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "_\"id\" is required as part of the path_",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "processStepId",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "trackingLinkUrl",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "actualArrivalDate": {
                    "$ref": "#/components/schemas/timestamptz"
                  },
                  "actualDepartureDate": {
                    "$ref": "#/components/schemas/timestamptz"
                  },
                  "carrierOrganizationId": {
                    "nullable": true,
                    "type": "integer"
                  },
                  "dueDate": {
                    "$ref": "#/components/schemas/date"
                  },
                  "id": {
                    "nullable": false,
                    "type": "integer"
                  },
                  "plannedArrivalDate": {
                    "$ref": "#/components/schemas/timestamptz"
                  },
                  "plannedDepartureDate": {
                    "$ref": "#/components/schemas/timestamptz"
                  },
                  "processStepId": {
                    "nullable": true,
                    "type": "integer"
                  },
                  "trackingLinkUrl": {
                    "nullable": true,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "updateShipmentsByPk": {
                      "nullable": true,
                      "properties": {
                        "actualArrivalDate": {
                          "$ref": "#/components/schemas/timestamptz"
                        },
                        "actualDepartureDate": {
                          "$ref": "#/components/schemas/timestamptz"
                        },
                        "carrier": {
                          "description": "A client or supplier organisation",
                          "nullable": true,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "dueDate": {
                          "$ref": "#/components/schemas/date"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "plannedArrivalDate": {
                          "$ref": "#/components/schemas/timestamptz"
                        },
                        "plannedDepartureDate": {
                          "$ref": "#/components/schemas/timestamptz"
                        },
                        "reference": {
                          "nullable": false,
                          "type": "string"
                        },
                        "step": {
                          "nullable": true,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "trackingLink": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    },
    "/purchase-orders": {
      "get": {
        "summary": "List purchase orders",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "purchaseOrders": {
                      "items": {
                        "nullable": false,
                        "properties": {
                          "currency": {
                            "nullable": true,
                            "properties": {
                              "code": {
                                "nullable": false,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "dueDate": {
                            "$ref": "#/components/schemas/date"
                          },
                          "id": {
                            "nullable": false,
                            "type": "integer"
                          },
                          "issuanceDate": {
                            "$ref": "#/components/schemas/date"
                          },
                          "lines": {
                            "items": {
                              "nullable": false,
                              "properties": {
                                "article": {
                                  "description": "Articles with physical reality (= manage-able in stock). This table includes all article types (raw materials, semi-finished, finished products, consumables, etc.)",
                                  "nullable": true,
                                  "properties": {
                                    "code": {
                                      "nullable": true,
                                      "type": "string"
                                    },
                                    "id": {
                                      "nullable": false,
                                      "type": "integer"
                                    },
                                    "name": {
                                      "nullable": false,
                                      "type": "string"
                                    },
                                    "unit": {
                                      "nullable": true,
                                      "type": "string"
                                    }
                                  },
                                  "type": "object"
                                },
                                "description": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "id": {
                                  "nullable": false,
                                  "type": "integer"
                                },
                                "quantity": {
                                  "$ref": "#/components/schemas/numeric"
                                },
                                "total": {
                                  "$ref": "#/components/schemas/numeric"
                                },
                                "unitPrice": {
                                  "$ref": "#/components/schemas/numeric"
                                }
                              },
                              "type": "object"
                            },
                            "nullable": false,
                            "type": "array"
                          },
                          "reference": {
                            "nullable": false,
                            "type": "string"
                          },
                          "site": {
                            "nullable": false,
                            "properties": {
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "name": {
                                "nullable": false,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "step": {
                            "nullable": true,
                            "properties": {
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "name": {
                                "nullable": false,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "supplier": {
                            "description": "A client or supplier organisation",
                            "nullable": true,
                            "properties": {
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "name": {
                                "nullable": false,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          }
                        },
                        "type": "object"
                      },
                      "nullable": false,
                      "type": "array"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      },
      "post": {
        "summary": "Create a purchase order",
        "parameters": [
          {
            "description": "_\"siteId\" is required (enter it either in parameters or request body)_",
            "in": "query",
            "name": "siteId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "_\"supplierId\" is required (enter it either in parameters or request body)_",
            "in": "query",
            "name": "supplierId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "dueDate": {
                    "$ref": "#/components/schemas/date"
                  },
                  "siteId": {
                    "nullable": false,
                    "type": "integer"
                  },
                  "supplierId": {
                    "nullable": false,
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "insertPurchaseOrdersOne": {
                      "nullable": true,
                      "properties": {
                        "dueDate": {
                          "$ref": "#/components/schemas/date"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "reference": {
                          "nullable": false,
                          "type": "string"
                        },
                        "site": {
                          "nullable": false,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "supplier": {
                          "description": "A client or supplier organisation",
                          "nullable": true,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    },
    "/purchase-orders/{id}": {
      "get": {
        "summary": "Retrieve a purchase order",
        "parameters": [
          {
            "description": "_\"id\" is required as part of the path_",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "purchaseOrdersByPk": {
                      "nullable": true,
                      "properties": {
                        "currency": {
                          "nullable": true,
                          "properties": {
                            "code": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "dueDate": {
                          "$ref": "#/components/schemas/date"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "issuanceDate": {
                          "$ref": "#/components/schemas/date"
                        },
                        "lines": {
                          "items": {
                            "nullable": false,
                            "properties": {
                              "article": {
                                "description": "Articles with physical reality (= manage-able in stock). This table includes all article types (raw materials, semi-finished, finished products, consumables, etc.)",
                                "nullable": true,
                                "properties": {
                                  "code": {
                                    "nullable": true,
                                    "type": "string"
                                  },
                                  "id": {
                                    "nullable": false,
                                    "type": "integer"
                                  },
                                  "name": {
                                    "nullable": false,
                                    "type": "string"
                                  },
                                  "unit": {
                                    "nullable": true,
                                    "type": "string"
                                  }
                                },
                                "type": "object"
                              },
                              "description": {
                                "nullable": true,
                                "type": "string"
                              },
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "quantity": {
                                "$ref": "#/components/schemas/numeric"
                              },
                              "total": {
                                "$ref": "#/components/schemas/numeric"
                              },
                              "unitPrice": {
                                "$ref": "#/components/schemas/numeric"
                              }
                            },
                            "type": "object"
                          },
                          "nullable": false,
                          "type": "array"
                        },
                        "reference": {
                          "nullable": false,
                          "type": "string"
                        },
                        "site": {
                          "nullable": false,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "step": {
                          "nullable": true,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "supplier": {
                          "description": "A client or supplier organisation",
                          "nullable": true,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      },
      "put": {
        "summary": "Update a purchase order",
        "parameters": [
          {
            "description": "_\"id\" is required as part of the path_",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "dueDate": {
                    "$ref": "#/components/schemas/date"
                  },
                  "id": {
                    "nullable": false,
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "updatePurchaseOrdersByPk": {
                      "nullable": true,
                      "properties": {
                        "dueDate": {
                          "$ref": "#/components/schemas/date"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "reference": {
                          "nullable": false,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    },
    "/manufacturing-orders": {
      "get": {
        "summary": "List manufacturing orders",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "manufacturingOrders": {
                      "items": {
                        "nullable": false,
                        "properties": {
                          "article": {
                            "description": "Articles with physical reality (= manage-able in stock). This table includes all article types (raw materials, semi-finished, finished products, consumables, etc.)",
                            "nullable": true,
                            "properties": {
                              "code": {
                                "nullable": true,
                                "type": "string"
                              },
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "name": {
                                "nullable": false,
                                "type": "string"
                              },
                              "unit": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "dueDate": {
                            "$ref": "#/components/schemas/date"
                          },
                          "id": {
                            "nullable": false,
                            "type": "integer"
                          },
                          "quantity": {
                            "$ref": "#/components/schemas/numeric"
                          },
                          "reference": {
                            "nullable": false,
                            "type": "string"
                          },
                          "site": {
                            "nullable": false,
                            "properties": {
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "name": {
                                "nullable": false,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "step": {
                            "nullable": true,
                            "properties": {
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "name": {
                                "nullable": false,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "stockAvailability": {
                            "nullable": true,
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "nullable": false,
                      "type": "array"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      },
      "post": {
        "summary": "Create a manufacturing order",
        "parameters": [
          {
            "description": "_\"articleId\" is required (enter it either in parameters or request body)_",
            "in": "query",
            "name": "articleId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "_\"siteId\" is required (enter it either in parameters or request body)_",
            "in": "query",
            "name": "siteId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "articleId": {
                    "nullable": false,
                    "type": "integer"
                  },
                  "dueDate": {
                    "$ref": "#/components/schemas/date"
                  },
                  "quantity": {
                    "$ref": "#/components/schemas/numeric"
                  },
                  "siteId": {
                    "nullable": false,
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "insertManufacturingOrdersOne": {
                      "nullable": true,
                      "properties": {
                        "article": {
                          "description": "Articles with physical reality (= manage-able in stock). This table includes all article types (raw materials, semi-finished, finished products, consumables, etc.)",
                          "nullable": true,
                          "properties": {
                            "code": {
                              "nullable": true,
                              "type": "string"
                            },
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "dueDate": {
                          "$ref": "#/components/schemas/date"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "quantity": {
                          "$ref": "#/components/schemas/numeric"
                        },
                        "reference": {
                          "nullable": false,
                          "type": "string"
                        },
                        "site": {
                          "nullable": false,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "stockAvailability": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    },
    "/manufacturing-orders/{id}": {
      "get": {
        "summary": "Retrieve a manufacturing order",
        "parameters": [
          {
            "description": "_\"id\" is required as part of the path_",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "manufacturingOrdersByPk": {
                      "nullable": true,
                      "properties": {
                        "article": {
                          "description": "Articles with physical reality (= manage-able in stock). This table includes all article types (raw materials, semi-finished, finished products, consumables, etc.)",
                          "nullable": true,
                          "properties": {
                            "code": {
                              "nullable": true,
                              "type": "string"
                            },
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            },
                            "unit": {
                              "nullable": true,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "dueDate": {
                          "$ref": "#/components/schemas/date"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "quantity": {
                          "$ref": "#/components/schemas/numeric"
                        },
                        "reference": {
                          "nullable": false,
                          "type": "string"
                        },
                        "site": {
                          "nullable": false,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "step": {
                          "nullable": true,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "stockAvailability": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      },
      "put": {
        "summary": "Update a manufacturing order",
        "parameters": [
          {
            "description": "_\"id\" is required as part of the path_",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "processStepId",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "dueDate": {
                    "$ref": "#/components/schemas/date"
                  },
                  "id": {
                    "nullable": false,
                    "type": "integer"
                  },
                  "processStepId": {
                    "nullable": true,
                    "type": "integer"
                  },
                  "quantity": {
                    "$ref": "#/components/schemas/numeric"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "updateManufacturingOrdersByPk": {
                      "nullable": true,
                      "properties": {
                        "dueDate": {
                          "$ref": "#/components/schemas/date"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "quantity": {
                          "$ref": "#/components/schemas/numeric"
                        },
                        "reference": {
                          "nullable": false,
                          "type": "string"
                        },
                        "step": {
                          "nullable": true,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    },
    "/articles": {
      "get": {
        "summary": "List articles",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "articles": {
                      "items": {
                        "description": "Articles with physical reality (= manage-able in stock). This table includes all article types (raw materials, semi-finished, finished products, consumables, etc.)",
                        "nullable": false,
                        "properties": {
                          "code": {
                            "nullable": true,
                            "type": "string"
                          },
                          "description": {
                            "nullable": true,
                            "type": "string"
                          },
                          "id": {
                            "nullable": false,
                            "type": "integer"
                          },
                          "name": {
                            "nullable": false,
                            "type": "string"
                          },
                          "purchasePrice": {
                            "$ref": "#/components/schemas/numeric"
                          },
                          "sellingPrice": {
                            "$ref": "#/components/schemas/numeric"
                          },
                          "status": {
                            "$ref": "#/components/schemas/article_status"
                          },
                          "type": {
                            "nullable": true,
                            "type": "string"
                          },
                          "unit": {
                            "nullable": true,
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "nullable": false,
                      "type": "array"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      },
      "post": {
        "summary": "Create an article",
        "parameters": [
          {
            "description": "_\"articleCode\" is required (enter it either in parameters or request body)_",
            "in": "query",
            "name": "articleCode",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "_\"name\" is required (enter it either in parameters or request body)_",
            "in": "query",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "unit",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "articleCode": {
                    "nullable": false,
                    "type": "string"
                  },
                  "name": {
                    "nullable": false,
                    "type": "string"
                  },
                  "unit": {
                    "nullable": true,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "insertArticlesOne": {
                      "description": "Articles with physical reality (= manage-able in stock). This table includes all article types (raw materials, semi-finished, finished products, consumables, etc.)",
                      "nullable": true,
                      "properties": {
                        "code": {
                          "nullable": true,
                          "type": "string"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "name": {
                          "nullable": false,
                          "type": "string"
                        },
                        "status": {
                          "$ref": "#/components/schemas/article_status"
                        },
                        "type": {
                          "nullable": true,
                          "type": "string"
                        },
                        "unit": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    },
    "/articles/{id}": {
      "get": {
        "summary": "Retrieve an article",
        "parameters": [
          {
            "description": "_\"id\" is required as part of the path_",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "articlesByPk": {
                      "description": "Articles with physical reality (= manage-able in stock). This table includes all article types (raw materials, semi-finished, finished products, consumables, etc.)",
                      "nullable": true,
                      "properties": {
                        "code": {
                          "nullable": true,
                          "type": "string"
                        },
                        "description": {
                          "nullable": true,
                          "type": "string"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "name": {
                          "nullable": false,
                          "type": "string"
                        },
                        "purchasePrice": {
                          "$ref": "#/components/schemas/numeric"
                        },
                        "sellingPrice": {
                          "$ref": "#/components/schemas/numeric"
                        },
                        "status": {
                          "$ref": "#/components/schemas/article_status"
                        },
                        "type": {
                          "nullable": true,
                          "type": "string"
                        },
                        "unit": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      },
      "put": {
        "summary": "Update an article",
        "parameters": [
          {
            "description": "_\"id\" is required as part of the path_",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "name",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "id": {
                    "nullable": false,
                    "type": "integer"
                  },
                  "name": {
                    "nullable": true,
                    "type": "string"
                  },
                  "sellingPrice": {
                    "$ref": "#/components/schemas/numeric"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "updateArticlesByPk": {
                      "description": "Articles with physical reality (= manage-able in stock). This table includes all article types (raw materials, semi-finished, finished products, consumables, etc.)",
                      "nullable": true,
                      "properties": {
                        "code": {
                          "nullable": true,
                          "type": "string"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "name": {
                          "nullable": false,
                          "type": "string"
                        },
                        "sellingPrice": {
                          "$ref": "#/components/schemas/numeric"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    },
    "/stock/lots": {
      "get": {
        "summary": "List stock lots",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "lots": {
                      "items": {
                        "nullable": false,
                        "properties": {
                          "article": {
                            "description": "Articles with physical reality (= manage-able in stock). This table includes all article types (raw materials, semi-finished, finished products, consumables, etc.)",
                            "nullable": false,
                            "properties": {
                              "code": {
                                "nullable": true,
                                "type": "string"
                              },
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "name": {
                                "nullable": false,
                                "type": "string"
                              },
                              "unit": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "available": {
                            "$ref": "#/components/schemas/numeric"
                          },
                          "expiryDate": {
                            "$ref": "#/components/schemas/date"
                          },
                          "id": {
                            "nullable": false,
                            "type": "integer"
                          },
                          "location": {
                            "nullable": false,
                            "properties": {
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "name": {
                                "nullable": false,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "lot": {
                            "nullable": false,
                            "type": "string"
                          },
                          "total": {
                            "$ref": "#/components/schemas/numeric"
                          }
                        },
                        "type": "object"
                      },
                      "nullable": false,
                      "type": "array"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      },
      "post": {
        "summary": "Create a lot",
        "parameters": [
          {
            "description": "_\"articleId\" is required (enter it either in parameters or request body)_",
            "in": "query",
            "name": "articleId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "_\"locationId\" is required (enter it either in parameters or request body)_",
            "in": "query",
            "name": "locationId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "name",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "articleId": {
                    "nullable": false,
                    "type": "integer"
                  },
                  "locationId": {
                    "nullable": false,
                    "type": "integer"
                  },
                  "name": {
                    "nullable": true,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "insertLotsOne": {
                      "nullable": true,
                      "properties": {
                        "article": {
                          "description": "Articles with physical reality (= manage-able in stock). This table includes all article types (raw materials, semi-finished, finished products, consumables, etc.)",
                          "nullable": false,
                          "properties": {
                            "code": {
                              "nullable": true,
                              "type": "string"
                            },
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "available": {
                          "$ref": "#/components/schemas/numeric"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "location": {
                          "nullable": false,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "lot": {
                          "nullable": false,
                          "type": "string"
                        },
                        "total": {
                          "$ref": "#/components/schemas/numeric"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    },
    "/stock/lots/{id}": {
      "get": {
        "summary": "Retrieve a lot",
        "parameters": [
          {
            "description": "_\"id\" is required as part of the path_",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "lotsByPk": {
                      "nullable": true,
                      "properties": {
                        "article": {
                          "description": "Articles with physical reality (= manage-able in stock). This table includes all article types (raw materials, semi-finished, finished products, consumables, etc.)",
                          "nullable": false,
                          "properties": {
                            "code": {
                              "nullable": true,
                              "type": "string"
                            },
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            },
                            "unit": {
                              "nullable": true,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "available": {
                          "$ref": "#/components/schemas/numeric"
                        },
                        "expiryDate": {
                          "$ref": "#/components/schemas/date"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "location": {
                          "nullable": false,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "lot": {
                          "nullable": false,
                          "type": "string"
                        },
                        "total": {
                          "$ref": "#/components/schemas/numeric"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      },
      "put": {
        "summary": "Update a lot",
        "parameters": [
          {
            "in": "query",
            "name": "comments",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "_\"id\" is required as part of the path_",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "comments": {
                    "nullable": true,
                    "type": "string"
                  },
                  "expiryDate": {
                    "$ref": "#/components/schemas/date"
                  },
                  "id": {
                    "nullable": false,
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "updateLotsByPk": {
                      "nullable": true,
                      "properties": {
                        "expiryDate": {
                          "$ref": "#/components/schemas/date"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "lot": {
                          "nullable": false,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    },
    "/quality/defects": {
      "get": {
        "summary": "List defects",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "defects": {
                      "items": {
                        "nullable": false,
                        "properties": {
                          "article": {
                            "description": "Articles with physical reality (= manage-able in stock). This table includes all article types (raw materials, semi-finished, finished products, consumables, etc.)",
                            "nullable": false,
                            "properties": {
                              "code": {
                                "nullable": true,
                                "type": "string"
                              },
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "name": {
                                "nullable": false,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "createdAt": {
                            "$ref": "#/components/schemas/timestamptz"
                          },
                          "defectType": {
                            "nullable": false,
                            "properties": {
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "name": {
                                "nullable": false,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "id": {
                            "nullable": false,
                            "type": "integer"
                          },
                          "lot": {
                            "nullable": true,
                            "properties": {
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "name": {
                                "nullable": false,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "name": {
                            "nullable": true,
                            "type": "string"
                          },
                          "quantity": {
                            "$ref": "#/components/schemas/numeric"
                          },
                          "status": {
                            "$ref": "#/components/schemas/defect_status"
                          },
                          "step": {
                            "nullable": false,
                            "properties": {
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "name": {
                                "nullable": false,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          }
                        },
                        "type": "object"
                      },
                      "nullable": false,
                      "type": "array"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      },
      "post": {
        "summary": "Declare a defect",
        "parameters": [
          {
            "description": "_\"articleId\" is required (enter it either in parameters or request body)_",
            "in": "query",
            "name": "articleId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "_\"defectTypeId\" is required (enter it either in parameters or request body)_",
            "in": "query",
            "name": "defectTypeId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "articleId": {
                    "nullable": false,
                    "type": "integer"
                  },
                  "defectTypeId": {
                    "nullable": false,
                    "type": "integer"
                  },
                  "quantity": {
                    "$ref": "#/components/schemas/numeric"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "insertDefectsOne": {
                      "nullable": true,
                      "properties": {
                        "article": {
                          "description": "Articles with physical reality (= manage-able in stock). This table includes all article types (raw materials, semi-finished, finished products, consumables, etc.)",
                          "nullable": false,
                          "properties": {
                            "code": {
                              "nullable": true,
                              "type": "string"
                            },
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "defectType": {
                          "nullable": false,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "name": {
                          "nullable": true,
                          "type": "string"
                        },
                        "quantity": {
                          "$ref": "#/components/schemas/numeric"
                        },
                        "status": {
                          "$ref": "#/components/schemas/defect_status"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    },
    "/quality/defects/{id}": {
      "get": {
        "summary": "Retrieve a defect",
        "parameters": [
          {
            "description": "_\"id\" is required as part of the path_",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "defectsByPk": {
                      "nullable": true,
                      "properties": {
                        "article": {
                          "description": "Articles with physical reality (= manage-able in stock). This table includes all article types (raw materials, semi-finished, finished products, consumables, etc.)",
                          "nullable": false,
                          "properties": {
                            "code": {
                              "nullable": true,
                              "type": "string"
                            },
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/timestamptz"
                        },
                        "defectType": {
                          "nullable": false,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "lot": {
                          "nullable": true,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "name": {
                          "nullable": true,
                          "type": "string"
                        },
                        "quantity": {
                          "$ref": "#/components/schemas/numeric"
                        },
                        "status": {
                          "$ref": "#/components/schemas/defect_status"
                        },
                        "step": {
                          "nullable": false,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      },
      "put": {
        "summary": "Update a defect",
        "parameters": [
          {
            "in": "query",
            "name": "comments",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "_\"id\" is required as part of the path_",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "comments": {
                    "nullable": true,
                    "type": "string"
                  },
                  "id": {
                    "nullable": false,
                    "type": "integer"
                  },
                  "status": {
                    "nullable": true,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "updateDefectsByPk": {
                      "nullable": true,
                      "properties": {
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "name": {
                          "nullable": true,
                          "type": "string"
                        },
                        "status": {
                          "$ref": "#/components/schemas/defect_status"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    },
    "/organizations": {
      "get": {
        "summary": "List organizations",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "organizations": {
                      "items": {
                        "description": "A client or supplier organisation",
                        "nullable": false,
                        "properties": {
                          "billingAddress": {
                            "nullable": true,
                            "properties": {
                              "city": {
                                "nullable": false,
                                "type": "string"
                              },
                              "countryCode": {
                                "nullable": true,
                                "type": "string"
                              },
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "name": {
                                "nullable": true,
                                "type": "string"
                              },
                              "postalCode": {
                                "nullable": false,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "gln": {
                            "nullable": true,
                            "type": "string"
                          },
                          "id": {
                            "nullable": false,
                            "type": "integer"
                          },
                          "mainContact": {
                            "description": "A contact (a physical person, from a client, supplier or 3rd party partner)",
                            "nullable": true,
                            "properties": {
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "name": {
                                "nullable": true,
                                "type": "string"
                              },
                              "primaryEmail": {
                                "nullable": true,
                                "type": "string"
                              },
                              "primaryPhoneNumber": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "name": {
                            "nullable": false,
                            "type": "string"
                          },
                          "shippingAddress": {
                            "nullable": true,
                            "properties": {
                              "city": {
                                "nullable": false,
                                "type": "string"
                              },
                              "countryCode": {
                                "nullable": true,
                                "type": "string"
                              },
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "name": {
                                "nullable": true,
                                "type": "string"
                              },
                              "postalCode": {
                                "nullable": false,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "type": {
                            "$ref": "#/components/schemas/organization_type"
                          }
                        },
                        "type": "object"
                      },
                      "nullable": false,
                      "type": "array"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      },
      "post": {
        "summary": "Create an organization",
        "parameters": [
          {
            "in": "query",
            "name": "gln",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "_\"name\" is required (enter it either in parameters or request body)_",
            "in": "query",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "_\"type\" is required (enter it either in parameters or request body)_",
            "in": "query",
            "name": "type",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "gln": {
                    "nullable": true,
                    "type": "string"
                  },
                  "name": {
                    "nullable": false,
                    "type": "string"
                  },
                  "type": {
                    "nullable": false,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "insertOrganizationsOne": {
                      "description": "A client or supplier organisation",
                      "nullable": true,
                      "properties": {
                        "gln": {
                          "nullable": true,
                          "type": "string"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "name": {
                          "nullable": false,
                          "type": "string"
                        },
                        "type": {
                          "$ref": "#/components/schemas/organization_type"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    },
    "/organizations/{id}": {
      "get": {
        "summary": "Retrieve an organization",
        "parameters": [
          {
            "description": "_\"id\" is required as part of the path_",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "organizationsByPk": {
                      "description": "A client or supplier organisation",
                      "nullable": true,
                      "properties": {
                        "billingAddress": {
                          "nullable": true,
                          "properties": {
                            "city": {
                              "nullable": false,
                              "type": "string"
                            },
                            "countryCode": {
                              "nullable": true,
                              "type": "string"
                            },
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": true,
                              "type": "string"
                            },
                            "postalCode": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "gln": {
                          "nullable": true,
                          "type": "string"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "mainContact": {
                          "description": "A contact (a physical person, from a client, supplier or 3rd party partner)",
                          "nullable": true,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": true,
                              "type": "string"
                            },
                            "primaryEmail": {
                              "nullable": true,
                              "type": "string"
                            },
                            "primaryPhoneNumber": {
                              "nullable": true,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "name": {
                          "nullable": false,
                          "type": "string"
                        },
                        "shippingAddress": {
                          "nullable": true,
                          "properties": {
                            "city": {
                              "nullable": false,
                              "type": "string"
                            },
                            "countryCode": {
                              "nullable": true,
                              "type": "string"
                            },
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": true,
                              "type": "string"
                            },
                            "postalCode": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "type": {
                          "$ref": "#/components/schemas/organization_type"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      },
      "put": {
        "summary": "Update an organization",
        "parameters": [
          {
            "in": "query",
            "name": "comments",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "gln",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "_\"id\" is required as part of the path_",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "name",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "comments": {
                    "nullable": true,
                    "type": "string"
                  },
                  "gln": {
                    "nullable": true,
                    "type": "string"
                  },
                  "id": {
                    "nullable": false,
                    "type": "integer"
                  },
                  "name": {
                    "nullable": true,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "updateOrganizationsByPk": {
                      "description": "A client or supplier organisation",
                      "nullable": true,
                      "properties": {
                        "gln": {
                          "nullable": true,
                          "type": "string"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "name": {
                          "nullable": false,
                          "type": "string"
                        },
                        "type": {
                          "$ref": "#/components/schemas/organization_type"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    },
    "/contacts": {
      "get": {
        "summary": "List contacts",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "contacts": {
                      "items": {
                        "description": "A contact (a physical person, from a client, supplier or 3rd party partner)",
                        "nullable": false,
                        "properties": {
                          "firstName": {
                            "nullable": false,
                            "type": "string"
                          },
                          "id": {
                            "nullable": false,
                            "type": "integer"
                          },
                          "lastName": {
                            "nullable": false,
                            "type": "string"
                          },
                          "organizationContacts": {
                            "items": {
                              "nullable": false,
                              "properties": {
                                "organization": {
                                  "description": "A client or supplier organisation",
                                  "nullable": false,
                                  "properties": {
                                    "id": {
                                      "nullable": false,
                                      "type": "integer"
                                    },
                                    "name": {
                                      "nullable": false,
                                      "type": "string"
                                    },
                                    "type": {
                                      "$ref": "#/components/schemas/organization_type"
                                    }
                                  },
                                  "type": "object"
                                }
                              },
                              "type": "object"
                            },
                            "nullable": false,
                            "type": "array"
                          },
                          "primaryEmail": {
                            "nullable": true,
                            "type": "string"
                          },
                          "primaryPhoneNumber": {
                            "nullable": true,
                            "type": "string"
                          },
                          "role": {
                            "nullable": true,
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "nullable": false,
                      "type": "array"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      },
      "post": {
        "summary": "Create a contact",
        "parameters": [
          {
            "description": "_\"firstName\" is required (enter it either in parameters or request body)_",
            "in": "query",
            "name": "firstName",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "_\"lastName\" is required (enter it either in parameters or request body)_",
            "in": "query",
            "name": "lastName",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "primaryEmail",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "primaryPhoneNumber",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "role",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "firstName": {
                    "nullable": false,
                    "type": "string"
                  },
                  "lastName": {
                    "nullable": false,
                    "type": "string"
                  },
                  "organizationContacts": {
                    "default": [],
                    "items": {
                      "$ref": "#/components/schemas/OrganizationContactsInsertInput"
                    },
                    "nullable": true,
                    "type": "array"
                  },
                  "primaryEmail": {
                    "nullable": true,
                    "type": "string"
                  },
                  "primaryPhoneNumber": {
                    "nullable": true,
                    "type": "string"
                  },
                  "role": {
                    "nullable": true,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "insertContactsOne": {
                      "description": "A contact (a physical person, from a client, supplier or 3rd party partner)",
                      "nullable": true,
                      "properties": {
                        "firstName": {
                          "nullable": false,
                          "type": "string"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "lastName": {
                          "nullable": false,
                          "type": "string"
                        },
                        "organizationContacts": {
                          "items": {
                            "nullable": false,
                            "properties": {
                              "organization": {
                                "description": "A client or supplier organisation",
                                "nullable": false,
                                "properties": {
                                  "id": {
                                    "nullable": false,
                                    "type": "integer"
                                  },
                                  "name": {
                                    "nullable": false,
                                    "type": "string"
                                  }
                                },
                                "type": "object"
                              }
                            },
                            "type": "object"
                          },
                          "nullable": false,
                          "type": "array"
                        },
                        "primaryEmail": {
                          "nullable": true,
                          "type": "string"
                        },
                        "role": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    },
    "/contacts/{id}": {
      "get": {
        "summary": "Retrieve a contact",
        "parameters": [
          {
            "description": "_\"id\" is required as part of the path_",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "contactsByPk": {
                      "description": "A contact (a physical person, from a client, supplier or 3rd party partner)",
                      "nullable": true,
                      "properties": {
                        "firstName": {
                          "nullable": false,
                          "type": "string"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "lastName": {
                          "nullable": false,
                          "type": "string"
                        },
                        "organizationContacts": {
                          "items": {
                            "nullable": false,
                            "properties": {
                              "organization": {
                                "description": "A client or supplier organisation",
                                "nullable": false,
                                "properties": {
                                  "id": {
                                    "nullable": false,
                                    "type": "integer"
                                  },
                                  "name": {
                                    "nullable": false,
                                    "type": "string"
                                  },
                                  "type": {
                                    "$ref": "#/components/schemas/organization_type"
                                  }
                                },
                                "type": "object"
                              }
                            },
                            "type": "object"
                          },
                          "nullable": false,
                          "type": "array"
                        },
                        "primaryEmail": {
                          "nullable": true,
                          "type": "string"
                        },
                        "primaryPhoneNumber": {
                          "nullable": true,
                          "type": "string"
                        },
                        "role": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      },
      "put": {
        "summary": "Update a contact",
        "parameters": [
          {
            "description": "_\"id\" is required as part of the path_",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "primaryEmail",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "primaryPhoneNumber",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "role",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "id": {
                    "nullable": false,
                    "type": "integer"
                  },
                  "primaryEmail": {
                    "nullable": true,
                    "type": "string"
                  },
                  "primaryPhoneNumber": {
                    "nullable": true,
                    "type": "string"
                  },
                  "role": {
                    "nullable": true,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "updateContactsByPk": {
                      "description": "A contact (a physical person, from a client, supplier or 3rd party partner)",
                      "nullable": true,
                      "properties": {
                        "firstName": {
                          "nullable": false,
                          "type": "string"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "lastName": {
                          "nullable": false,
                          "type": "string"
                        },
                        "primaryEmail": {
                          "nullable": true,
                          "type": "string"
                        },
                        "primaryPhoneNumber": {
                          "nullable": true,
                          "type": "string"
                        },
                        "role": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    },
    "/sites": {
      "get": {
        "summary": "List sites",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "sites": {
                      "items": {
                        "nullable": false,
                        "properties": {
                          "address": {
                            "nullable": true,
                            "properties": {
                              "city": {
                                "nullable": false,
                                "type": "string"
                              },
                              "countryCode": {
                                "nullable": true,
                                "type": "string"
                              },
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "name": {
                                "nullable": true,
                                "type": "string"
                              },
                              "postalCode": {
                                "nullable": false,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "gln": {
                            "nullable": true,
                            "type": "string"
                          },
                          "id": {
                            "nullable": false,
                            "type": "integer"
                          },
                          "legalEntity": {
                            "nullable": true,
                            "type": "string"
                          },
                          "name": {
                            "nullable": false,
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "nullable": false,
                      "type": "array"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      },
      "post": {
        "summary": "Create a site",
        "parameters": [
          {
            "in": "query",
            "name": "gln",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "legalEntity",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "_\"name\" is required (enter it either in parameters or request body)_",
            "in": "query",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "gln": {
                    "nullable": true,
                    "type": "string"
                  },
                  "legalEntity": {
                    "nullable": true,
                    "type": "string"
                  },
                  "name": {
                    "nullable": false,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "insertSitesOne": {
                      "nullable": true,
                      "properties": {
                        "gln": {
                          "nullable": true,
                          "type": "string"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "legalEntity": {
                          "nullable": true,
                          "type": "string"
                        },
                        "name": {
                          "nullable": false,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    },
    "/sites/{id}": {
      "get": {
        "summary": "Retrieve a site",
        "parameters": [
          {
            "description": "_\"id\" is required as part of the path_",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "sitesByPk": {
                      "nullable": true,
                      "properties": {
                        "address": {
                          "nullable": true,
                          "properties": {
                            "city": {
                              "nullable": false,
                              "type": "string"
                            },
                            "countryCode": {
                              "nullable": true,
                              "type": "string"
                            },
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": true,
                              "type": "string"
                            },
                            "postalCode": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "gln": {
                          "nullable": true,
                          "type": "string"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "legalEntity": {
                          "nullable": true,
                          "type": "string"
                        },
                        "name": {
                          "nullable": false,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      },
      "put": {
        "summary": "Update a site",
        "parameters": [
          {
            "in": "query",
            "name": "gln",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "_\"id\" is required as part of the path_",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "legalEntity",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "name",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "gln": {
                    "nullable": true,
                    "type": "string"
                  },
                  "id": {
                    "nullable": false,
                    "type": "integer"
                  },
                  "legalEntity": {
                    "nullable": true,
                    "type": "string"
                  },
                  "name": {
                    "nullable": true,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "updateSitesByPk": {
                      "nullable": true,
                      "properties": {
                        "gln": {
                          "nullable": true,
                          "type": "string"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "legalEntity": {
                          "nullable": true,
                          "type": "string"
                        },
                        "name": {
                          "nullable": false,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    },
    "/stock/locations": {
      "get": {
        "summary": "List stock locations",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "stockLocations": {
                      "items": {
                        "nullable": false,
                        "properties": {
                          "id": {
                            "nullable": false,
                            "type": "integer"
                          },
                          "name": {
                            "nullable": false,
                            "type": "string"
                          },
                          "site": {
                            "nullable": true,
                            "properties": {
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "name": {
                                "nullable": false,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "type": {
                            "$ref": "#/components/schemas/location_type"
                          }
                        },
                        "type": "object"
                      },
                      "nullable": false,
                      "type": "array"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      },
      "post": {
        "summary": "Create a stock location",
        "parameters": [
          {
            "description": "_\"name\" is required (enter it either in parameters or request body)_",
            "in": "query",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "siteId",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "name": {
                    "nullable": false,
                    "type": "string"
                  },
                  "siteId": {
                    "nullable": true,
                    "type": "integer"
                  },
                  "type": {
                    "nullable": true,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "insertStockLocationsOne": {
                      "nullable": true,
                      "properties": {
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "name": {
                          "nullable": false,
                          "type": "string"
                        },
                        "site": {
                          "nullable": true,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "type": {
                          "$ref": "#/components/schemas/location_type"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    },
    "/stock/locations/{id}": {
      "get": {
        "summary": "Retrieve a stock location",
        "parameters": [
          {
            "description": "_\"id\" is required as part of the path_",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "stockLocationsByPk": {
                      "nullable": true,
                      "properties": {
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "name": {
                          "nullable": false,
                          "type": "string"
                        },
                        "site": {
                          "nullable": true,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "type": {
                          "$ref": "#/components/schemas/location_type"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      },
      "put": {
        "summary": "Update a stock location",
        "parameters": [
          {
            "description": "_\"id\" is required as part of the path_",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "name",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "id": {
                    "nullable": false,
                    "type": "integer"
                  },
                  "name": {
                    "nullable": true,
                    "type": "string"
                  },
                  "type": {
                    "nullable": true,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "updateStockLocationsByPk": {
                      "nullable": true,
                      "properties": {
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "name": {
                          "nullable": false,
                          "type": "string"
                        },
                        "type": {
                          "$ref": "#/components/schemas/location_type"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    },
    "/article-families": {
      "get": {
        "summary": "List article families",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "articleFamilies": {
                      "items": {
                        "nullable": false,
                        "properties": {
                          "code": {
                            "nullable": false,
                            "type": "string"
                          },
                          "id": {
                            "nullable": false,
                            "type": "integer"
                          },
                          "name": {
                            "nullable": false,
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "nullable": false,
                      "type": "array"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      },
      "post": {
        "summary": "Create an article family",
        "parameters": [
          {
            "in": "query",
            "name": "code",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "_\"name\" is required (enter it either in parameters or request body)_",
            "in": "query",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "code": {
                    "nullable": true,
                    "type": "string"
                  },
                  "name": {
                    "nullable": false,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "insertArticleFamiliesOne": {
                      "nullable": true,
                      "properties": {
                        "code": {
                          "nullable": false,
                          "type": "string"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "name": {
                          "nullable": false,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    },
    "/article-families/{id}": {
      "get": {
        "summary": "Retrieve an article family",
        "parameters": [
          {
            "description": "_\"id\" is required as part of the path_",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "articleFamiliesByPk": {
                      "nullable": true,
                      "properties": {
                        "code": {
                          "nullable": false,
                          "type": "string"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "name": {
                          "nullable": false,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      },
      "put": {
        "summary": "Update an article family",
        "parameters": [
          {
            "in": "query",
            "name": "code",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "_\"id\" is required as part of the path_",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "name",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "code": {
                    "nullable": true,
                    "type": "string"
                  },
                  "id": {
                    "nullable": false,
                    "type": "integer"
                  },
                  "name": {
                    "nullable": true,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "updateArticleFamiliesByPk": {
                      "nullable": true,
                      "properties": {
                        "code": {
                          "nullable": false,
                          "type": "string"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "name": {
                          "nullable": false,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    },
    "/attributes": {
      "get": {
        "summary": "List attributes",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "attributes": {
                      "items": {
                        "nullable": false,
                        "properties": {
                          "id": {
                            "nullable": false,
                            "type": "integer"
                          },
                          "name": {
                            "nullable": false,
                            "type": "string"
                          },
                          "values": {
                            "items": {
                              "nullable": false,
                              "properties": {
                                "description": {
                                  "nullable": false,
                                  "type": "string"
                                },
                                "id": {
                                  "nullable": false,
                                  "type": "integer"
                                },
                                "index": {
                                  "nullable": false,
                                  "type": "integer"
                                }
                              },
                              "type": "object"
                            },
                            "nullable": false,
                            "type": "array"
                          }
                        },
                        "type": "object"
                      },
                      "nullable": false,
                      "type": "array"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      },
      "post": {
        "summary": "Create an attribute",
        "parameters": [
          {
            "description": "_\"name\" is required (enter it either in parameters or request body)_",
            "in": "query",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "name": {
                    "nullable": false,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "insertAttributesOne": {
                      "nullable": true,
                      "properties": {
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "name": {
                          "nullable": false,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    },
    "/attributes/{id}": {
      "get": {
        "summary": "Retrieve an attribute",
        "parameters": [
          {
            "description": "_\"id\" is required as part of the path_",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "attributesByPk": {
                      "nullable": true,
                      "properties": {
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "name": {
                          "nullable": false,
                          "type": "string"
                        },
                        "values": {
                          "items": {
                            "nullable": false,
                            "properties": {
                              "description": {
                                "nullable": false,
                                "type": "string"
                              },
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "index": {
                                "nullable": false,
                                "type": "integer"
                              }
                            },
                            "type": "object"
                          },
                          "nullable": false,
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    },
    "/attributes/values": {
      "post": {
        "summary": "Create an attribute value",
        "parameters": [
          {
            "description": "_\"attributeId\" is required (enter it either in parameters or request body)_",
            "in": "query",
            "name": "attributeId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "_\"description\" is required (enter it either in parameters or request body)_",
            "in": "query",
            "name": "description",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "_\"index\" is required (enter it either in parameters or request body)_",
            "in": "query",
            "name": "index",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "attributeId": {
                    "nullable": false,
                    "type": "integer"
                  },
                  "description": {
                    "nullable": false,
                    "type": "string"
                  },
                  "index": {
                    "nullable": false,
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "insertAttributeValuesOne": {
                      "nullable": true,
                      "properties": {
                        "attribute": {
                          "nullable": false,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "description": {
                          "nullable": false,
                          "type": "string"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "index": {
                          "nullable": false,
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    },
    "/invoices": {
      "get": {
        "summary": "List invoices",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "invoices": {
                      "items": {
                        "nullable": false,
                        "properties": {
                          "currencyCode": {
                            "nullable": false,
                            "type": "string"
                          },
                          "customer": {
                            "description": "A client or supplier organisation",
                            "nullable": true,
                            "properties": {
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "name": {
                                "nullable": false,
                                "type": "string"
                              },
                              "type": {
                                "$ref": "#/components/schemas/organization_type"
                              }
                            },
                            "type": "object"
                          },
                          "dueDate": {
                            "$ref": "#/components/schemas/date"
                          },
                          "id": {
                            "nullable": false,
                            "type": "integer"
                          },
                          "issuanceDate": {
                            "$ref": "#/components/schemas/date"
                          },
                          "legalNumber": {
                            "nullable": true,
                            "type": "string"
                          },
                          "lines": {
                            "items": {
                              "nullable": false,
                              "properties": {
                                "article": {
                                  "description": "Articles with physical reality (= manage-able in stock). This table includes all article types (raw materials, semi-finished, finished products, consumables, etc.)",
                                  "nullable": true,
                                  "properties": {
                                    "code": {
                                      "nullable": true,
                                      "type": "string"
                                    },
                                    "id": {
                                      "nullable": false,
                                      "type": "integer"
                                    },
                                    "name": {
                                      "nullable": false,
                                      "type": "string"
                                    },
                                    "unit": {
                                      "nullable": true,
                                      "type": "string"
                                    }
                                  },
                                  "type": "object"
                                },
                                "description": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "id": {
                                  "nullable": false,
                                  "type": "integer"
                                },
                                "quantity": {
                                  "$ref": "#/components/schemas/numeric"
                                },
                                "unitPrice": {
                                  "$ref": "#/components/schemas/numeric"
                                },
                                "vatRate": {
                                  "$ref": "#/components/schemas/numeric"
                                }
                              },
                              "type": "object"
                            },
                            "nullable": false,
                            "type": "array"
                          },
                          "netToPay": {
                            "$ref": "#/components/schemas/numeric"
                          },
                          "reference": {
                            "nullable": false,
                            "type": "string"
                          },
                          "site": {
                            "nullable": true,
                            "properties": {
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "name": {
                                "nullable": false,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "state": {
                            "$ref": "#/components/schemas/invoice_state"
                          },
                          "totalBeforeTax": {
                            "$ref": "#/components/schemas/numeric"
                          },
                          "type": {
                            "$ref": "#/components/schemas/invoice_type"
                          }
                        },
                        "type": "object"
                      },
                      "nullable": false,
                      "type": "array"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      },
      "post": {
        "summary": "Create an invoice",
        "parameters": [
          {
            "description": "_\"organizationId\" is required (enter it either in parameters or request body)_",
            "in": "query",
            "name": "organizationId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "siteId",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "dueDate": {
                    "$ref": "#/components/schemas/date"
                  },
                  "issuanceDate": {
                    "$ref": "#/components/schemas/date"
                  },
                  "organizationId": {
                    "nullable": false,
                    "type": "integer"
                  },
                  "siteId": {
                    "nullable": true,
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "insertInvoicesOne": {
                      "nullable": true,
                      "properties": {
                        "customer": {
                          "description": "A client or supplier organisation",
                          "nullable": true,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "dueDate": {
                          "$ref": "#/components/schemas/date"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "issuanceDate": {
                          "$ref": "#/components/schemas/date"
                        },
                        "reference": {
                          "nullable": false,
                          "type": "string"
                        },
                        "state": {
                          "$ref": "#/components/schemas/invoice_state"
                        },
                        "type": {
                          "$ref": "#/components/schemas/invoice_type"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    },
    "/invoices/{id}": {
      "get": {
        "summary": "Retrieve an invoice",
        "parameters": [
          {
            "description": "_\"id\" is required as part of the path_",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "invoicesByPk": {
                      "nullable": true,
                      "properties": {
                        "currencyCode": {
                          "nullable": false,
                          "type": "string"
                        },
                        "customer": {
                          "description": "A client or supplier organisation",
                          "nullable": true,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            },
                            "type": {
                              "$ref": "#/components/schemas/organization_type"
                            }
                          },
                          "type": "object"
                        },
                        "dueDate": {
                          "$ref": "#/components/schemas/date"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "issuanceDate": {
                          "$ref": "#/components/schemas/date"
                        },
                        "legalNumber": {
                          "nullable": true,
                          "type": "string"
                        },
                        "lines": {
                          "items": {
                            "nullable": false,
                            "properties": {
                              "article": {
                                "description": "Articles with physical reality (= manage-able in stock). This table includes all article types (raw materials, semi-finished, finished products, consumables, etc.)",
                                "nullable": true,
                                "properties": {
                                  "code": {
                                    "nullable": true,
                                    "type": "string"
                                  },
                                  "id": {
                                    "nullable": false,
                                    "type": "integer"
                                  },
                                  "name": {
                                    "nullable": false,
                                    "type": "string"
                                  },
                                  "unit": {
                                    "nullable": true,
                                    "type": "string"
                                  }
                                },
                                "type": "object"
                              },
                              "description": {
                                "nullable": true,
                                "type": "string"
                              },
                              "id": {
                                "nullable": false,
                                "type": "integer"
                              },
                              "quantity": {
                                "$ref": "#/components/schemas/numeric"
                              },
                              "unitPrice": {
                                "$ref": "#/components/schemas/numeric"
                              },
                              "vatRate": {
                                "$ref": "#/components/schemas/numeric"
                              }
                            },
                            "type": "object"
                          },
                          "nullable": false,
                          "type": "array"
                        },
                        "netToPay": {
                          "$ref": "#/components/schemas/numeric"
                        },
                        "reference": {
                          "nullable": false,
                          "type": "string"
                        },
                        "site": {
                          "nullable": true,
                          "properties": {
                            "id": {
                              "nullable": false,
                              "type": "integer"
                            },
                            "name": {
                              "nullable": false,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "state": {
                          "$ref": "#/components/schemas/invoice_state"
                        },
                        "totalBeforeTax": {
                          "$ref": "#/components/schemas/numeric"
                        },
                        "type": {
                          "$ref": "#/components/schemas/invoice_type"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      },
      "put": {
        "summary": "Update an invoice",
        "parameters": [
          {
            "in": "query",
            "name": "comments",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "_\"id\" is required as part of the path_",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "comments": {
                    "nullable": true,
                    "type": "string"
                  },
                  "dueDate": {
                    "$ref": "#/components/schemas/date"
                  },
                  "id": {
                    "nullable": false,
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Query parameters can also be provided in the request body as a JSON object",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "updateInvoicesByPk": {
                      "nullable": true,
                      "properties": {
                        "dueDate": {
                          "$ref": "#/components/schemas/date"
                        },
                        "id": {
                          "nullable": false,
                          "type": "integer"
                        },
                        "reference": {
                          "nullable": false,
                          "type": "string"
                        },
                        "state": {
                          "$ref": "#/components/schemas/invoice_state"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            },
            "description": "Response"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "API token from your Bonx space."
      }
    },
    "schemas": {
      "date": {
        "nullable": false
      },
      "numeric": {
        "nullable": false
      },
      "timestamptz": {
        "nullable": true
      },
      "article_status": {
        "nullable": false
      },
      "defect_status": {
        "nullable": true
      },
      "organization_type": {
        "nullable": false
      },
      "OrganizationContactsInsertInput": {
        "description": "input type for inserting data into table \"organization_contacts\"",
        "nullable": false,
        "properties": {
          "archivedAt": {
            "$ref": "#/components/schemas/timestamptz"
          },
          "contactId": {
            "nullable": true,
            "type": "integer"
          },
          "organizationId": {
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "location_type": {
        "nullable": false
      },
      "invoice_state": {
        "nullable": false
      },
      "invoice_type": {
        "nullable": false
      }
    }
  }
}
