{
  "openapi": "3.0.3",
  "info": {
    "title": "LedgerSMB API",
    "version": "0.0.1",
    "contact": {
      "name": "LedgerSMB API Support",
      "url": "https://github.com/ledgersmb/LedgerSMB/issues",
      "email": "devel@lists.ledgersmb.org"
    },
    "description": "LedgerSMB comes with a web service API. The version number assigned follows\nthe [rules of semantic versioning](https://semver.org/). The current major\nversion is 0 (zero), meaning that it's not considered to have stabilized\nyet. The main reason is that not all functions have been ironed out yet:\nfiltering, sorting and pagination are to be specified and implemented.\n\nThe API is hosted on `erp/api/v0`, on the same root as `login.pl`. That is\nto say that if LedgerSMB's login screen is hosted at\n`https://example.org/login.pl` then the API can be found at\n`https://example.org/erp/api/v0`. All paths mentioned in this document will\nbe appended to that. E.g. the items in the menu for the authenticated user\ncan be accessed through `https://example.org/erp/api/v0/menu-nodes`.\n",
    "license": {
      "name": "GPL-2.0-or-later",
      "url": "https://spdx.org/licenses/GPL-2.0-or-later.html"
    }
  },
  "servers": [
    {
      "url": "http://lsmb/erp/api/v0"
    }
  ],
  "security": [
    {
      "cookieAuth": []
    }
  ],
  "paths": {
    "/menu-nodes": {
      "description": "Menu items for the active user",
      "get": {
        "tags": [
          "UserMenu"
        ],
        "summary": "Get the user's menu items",
        "operationId": "getUserMenuNodes",
        "responses": {
          "200": {
            "description": "Returns the full set of menu nodes accessible\nby the requesting user.\n",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "id",
                      "url",
                      "parent",
                      "label",
                      "menu"
                    ],
                    "properties": {
                      "id": {
                        "type": "number"
                      },
                      "url": {
                        "type": "string"
                      },
                      "parent": {
                        "type": "number"
                      },
                      "label": {
                        "type": "string"
                      },
                      "menu": {
                        "type": "boolean"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      }
    },
    "/countries": {
      "description": "Management of country configuration",
      "get": {
        "tags": [
          "Countries"
        ],
        "summary": "Get available countries",
        "operationId": "getCountries",
        "responses": {
          "200": {
            "description": "Returns a list of configured countries",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "_links": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Country"
                      }
                    }
                  }
                },
                "examples": {
                  "validCountries": {
                    "$ref": "#/components/examples/validCountries"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      },
      "post": {
        "tags": [
          "Countries"
        ],
        "summary": "Create a country",
        "operationId": "postCountry",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Country"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "...",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Location": {
                "schema": {
                  "type": "string",
                  "format": "uri-reference"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      }
    },
    "/countries/{id}": {
      "description": "Manage a single country",
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/country-code"
          },
          "style": "simple"
        }
      ],
      "get": {
        "tags": [
          "Countries"
        ],
        "summary": "Get a single country",
        "operationId": "getCountryById",
        "responses": {
          "200": {
            "description": "Returns the data associated with the country",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Country"
                },
                "examples": {
                  "validCountry": {
                    "$ref": "#/components/examples/validCountry"
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/304"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      },
      "put": {
        "tags": [
          "Countries"
        ],
        "summary": "Update a single country",
        "operationId": "putCountryById",
        "parameters": [
          {
            "$ref": "#/components/parameters/if-match"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Country"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Confirms replacement of country data, returning the new data",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Country"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "412": {
            "$ref": "#/components/responses/412"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "428": {
            "$ref": "#/components/responses/428"
          }
        }
      },
      "delete": {
        "tags": [
          "Countries"
        ],
        "summary": "Delete a single country",
        "operationId": "deleteCountryById",
        "parameters": [
          {
            "$ref": "#/components/parameters/if-match"
          }
        ],
        "responses": {
          "204": {
            "description": "Confirms deletion of the country resource"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "412": {
            "$ref": "#/components/responses/412"
          },
          "428": {
            "$ref": "#/components/responses/428"
          }
        }
      },
      "patch": {
        "tags": [
          "Countries"
        ],
        "summary": "Update a single country",
        "operationId": "updateCountryById",
        "parameters": [
          {
            "$ref": "#/components/parameters/if-match"
          }
        ],
        "responses": {
          "200": {
            "description": "Confirms updating the country resource, returning the new data"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "412": {
            "$ref": "#/components/responses/412"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "428": {
            "$ref": "#/components/responses/428"
          }
        }
      }
    },
    "/invoices": {
      "description": "Management of Invoices",
      "get": {
        "tags": [
          "Invoices",
          "Experimental"
        ],
        "summary": "Lists invoices",
        "operationId": "getInvoices",
        "responses": {
          "200": {
            "description": "...",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Invoice"
                  }
                },
                "examples": {
                  "validInvoices": {
                    "$ref": "#/components/examples/validInvoices"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "default": {
            "description": "...",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Invoices",
          "Experimental"
        ],
        "summary": "Add an invoice",
        "operationId": "postInvoices",
        "requestBody": {
          "description": "...",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/newInvoice"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag1"
              },
              "Location": {
                "schema": {
                  "type": "string",
                  "format": "uri-reference"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      }
    },
    "/invoices/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "minLength": 1
          }
        }
      ],
      "get": {
        "tags": [
          "Invoices",
          "Experimental"
        ],
        "summary": "Get a single invoice",
        "operationId": "getInvoicesById",
        "responses": {
          "200": {
            "description": "...",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag1"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                },
                "examples": {
                  "validInvoice": {
                    "$ref": "#/components/examples/validInvoice"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      },
      "put": {
        "tags": [
          "Invoices",
          "Experimental"
        ],
        "summary": "Update a single invoice",
        "operationId": "putInvoiceById",
        "parameters": [
          {
            "$ref": "#/components/parameters/if-match1"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/newInvoice"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "...",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag1"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                }
              }
            }
          },
          "304": {
            "description": "..."
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "412": {
            "$ref": "#/components/responses/412"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "428": {
            "$ref": "#/components/responses/428"
          }
        }
      }
    },
    "/contacts/sic": {
      "description": "Collection of Standard Industry Codes (SICs)",
      "get": {
        "tags": [
          "SICs"
        ],
        "summary": "Get a list of SICs",
        "operationId": "getSICs",
        "responses": {
          "200": {
            "description": "Returns the list of SIC codes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "_links": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SIC"
                      }
                    }
                  }
                },
                "examples": {
                  "validSICs": {
                    "$ref": "#/components/examples/validSICs"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      },
      "post": {
        "tags": [
          "SICs"
        ],
        "summary": "Add SIC entry",
        "operationId": "postSIC",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SIC"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Confirms creation of the new SIC, redirecting to the new resource URI",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag2"
              },
              "Location": {
                "schema": {
                  "type": "string",
                  "format": "uri-reference"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      }
    },
    "/contacts/sic/{id}": {
      "description": "Management of individual Standard Industry Code items",
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/sic-code"
          },
          "style": "simple"
        }
      ],
      "get": {
        "tags": [
          "SICs"
        ],
        "summary": "Get a single SIC",
        "operationId": "getSICById",
        "responses": {
          "200": {
            "description": "Returns the data associated with the SIC code",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag2"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SIC"
                },
                "examples": {
                  "validSIC": {
                    "$ref": "#/components/examples/validSIC"
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/304"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      },
      "put": {
        "tags": [
          "SICs"
        ],
        "summary": "Update a single SIC",
        "operationId": "putSICByCode",
        "parameters": [
          {
            "$ref": "#/components/parameters/if-match2"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SIC"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Confirms replacement of SIC resource, returning the new data",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag2"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SIC"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "412": {
            "$ref": "#/components/responses/412"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "428": {
            "$ref": "#/components/responses/428"
          }
        }
      },
      "delete": {
        "tags": [
          "SICs"
        ],
        "summary": "Delete a single SIC",
        "operationId": "deleteSICByCode",
        "parameters": [
          {
            "$ref": "#/components/parameters/if-match2"
          }
        ],
        "responses": {
          "204": {
            "description": "Confirms deletion of the SIC resource"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "412": {
            "$ref": "#/components/responses/412"
          },
          "428": {
            "$ref": "#/components/responses/428"
          }
        }
      },
      "patch": {
        "tags": [
          "SICs"
        ],
        "summary": "Update a single SIC",
        "operationId": "updateSICByCode",
        "parameters": [
          {
            "$ref": "#/components/parameters/if-match2"
          }
        ],
        "responses": {
          "200": {
            "description": "Confirms updating the data associated with the SIC code, returning the new SIC data",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag2"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SIC"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "412": {
            "$ref": "#/components/responses/412"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "428": {
            "$ref": "#/components/responses/428"
          }
        }
      }
    },
    "/contacts/business-types": {
      "description": "Manage business types",
      "get": {
        "tags": [
          "Business types"
        ],
        "summary": "Get business types",
        "operationId": "getBusinessTypes",
        "responses": {
          "200": {
            "description": "Returns the list of business types",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "_links": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BusinessType"
                      }
                    }
                  }
                },
                "examples": {
                  "validBusinessTypes": {
                    "$ref": "#/components/examples/validBusinessTypes"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      },
      "post": {
        "tags": [
          "Business types"
        ],
        "summary": "Create a business type",
        "operationId": "postBusinessType",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewBusinessType"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Confirms creation of the new business type, redirecting to the new resource URI",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag2"
              },
              "Location": {
                "schema": {
                  "type": "string",
                  "format": "uri-reference"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      }
    },
    "/contacts/business-types/{id}": {
      "description": "Manage business type",
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/business-type-id"
          },
          "style": "simple"
        }
      ],
      "get": {
        "tags": [
          "Business types"
        ],
        "summary": "Get a single business type",
        "operationId": "getBusinessTypesById",
        "responses": {
          "200": {
            "description": "Returns the requested business type data",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag2"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BusinessType"
                },
                "examples": {
                  "validBusinessType": {
                    "$ref": "#/components/examples/validBusinessType"
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/304"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      },
      "put": {
        "tags": [
          "Business types"
        ],
        "summary": "Update a single business type",
        "operationId": "putBusinessTypesById",
        "parameters": [
          {
            "$ref": "#/components/parameters/if-match2"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BusinessType"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Confirms replacement of the business type data",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag2"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BusinessType"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "412": {
            "$ref": "#/components/responses/412"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "428": {
            "$ref": "#/components/responses/428"
          }
        }
      },
      "delete": {
        "tags": [
          "Business types"
        ],
        "summary": "Delete a single business type",
        "operationId": "deleteBusinessTypesById",
        "parameters": [
          {
            "$ref": "#/components/parameters/if-match2"
          }
        ],
        "responses": {
          "204": {
            "description": "Confirms deletion of the business type resource"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "412": {
            "$ref": "#/components/responses/412"
          },
          "428": {
            "$ref": "#/components/responses/428"
          }
        }
      },
      "patch": {
        "tags": [
          "Business types"
        ],
        "summary": "Update a single business type",
        "operationId": "updateBusinessTypesById",
        "parameters": [
          {
            "$ref": "#/components/parameters/if-match2"
          }
        ],
        "responses": {
          "200": {
            "description": "Confirms updating the business type data, returning the new resource data",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag2"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BusinessType"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "412": {
            "$ref": "#/components/responses/412"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "428": {
            "$ref": "#/components/responses/428"
          }
        }
      }
    },
    "/languages": {
      "description": "Management of language configuration",
      "get": {
        "tags": [
          "Languages"
        ],
        "summary": "Get available languages",
        "operationId": "getLanguages",
        "responses": {
          "200": {
            "description": "Returns the full set of configured languages",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "_links": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Language"
                      }
                    }
                  }
                },
                "examples": {
                  "validLanguages": {
                    "$ref": "#/components/examples/validLanguages"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      },
      "post": {
        "tags": [
          "Languages"
        ],
        "summary": "Create a language",
        "operationId": "postLanguage",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Language"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Confirms successfull creation of the new resource (language),\nreturning the data from the resource and in the Location header\nthe canonical location to access the resource.\n",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Location": {
                "schema": {
                  "type": "string",
                  "format": "uri-reference"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      }
    },
    "/languages/{id}": {
      "description": "Manage a single language",
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/language-code"
          },
          "style": "simple"
        }
      ],
      "get": {
        "tags": [
          "Languages"
        ],
        "summary": "Get a single language",
        "operationId": "getLanguageById",
        "responses": {
          "200": {
            "description": "Returns the requested single resource's data",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Language"
                },
                "examples": {
                  "validLanguage": {
                    "$ref": "#/components/examples/validLanguage"
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/304"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      },
      "put": {
        "tags": [
          "Languages"
        ],
        "summary": "Update a single language",
        "operationId": "putLanguageById",
        "parameters": [
          {
            "$ref": "#/components/parameters/if-match"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Language"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Confirms successful replacement of the resource's data,\nreturning the new data of the resource.\n",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Language"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/304"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "412": {
            "$ref": "#/components/responses/412"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "428": {
            "$ref": "#/components/responses/428"
          }
        }
      },
      "delete": {
        "tags": [
          "Languages"
        ],
        "summary": "Delete a single language",
        "operationId": "deleteLanguageById",
        "parameters": [
          {
            "$ref": "#/components/parameters/if-match"
          }
        ],
        "responses": {
          "204": {
            "description": "Confirms successful deletion of the resource"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          }
        }
      },
      "patch": {
        "tags": [
          "Languages"
        ],
        "summary": "Update a single language",
        "operationId": "updateLanguageById",
        "parameters": [
          {
            "$ref": "#/components/parameters/if-match"
          }
        ],
        "responses": {
          "200": {
            "description": "Confirms successful update,\nreturning the new data for the resource\n"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      }
    },
    "/gl/gifi": {
      "description": "A list of GIFI",
      "get": {
        "tags": [
          "GIFI"
        ],
        "summary": "Get a list of GIFI",
        "operationId": "getGIFIs",
        "responses": {
          "200": {
            "description": "Returns the full set of GIFI codes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "_links": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/GIFI"
                      }
                    }
                  }
                },
                "examples": {
                  "validGIFIs": {
                    "$ref": "#/components/examples/validGIFIs"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      },
      "post": {
        "tags": [
          "GIFI"
        ],
        "summary": "Create a single GIFI",
        "operationId": "postGIFI",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GIFI"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Returns the full collection of defined GIFI codes",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Location": {
                "schema": {
                  "type": "string",
                  "format": "uri-reference"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      }
    },
    "/gl/gifi/{id}": {
      "description": "A single GIFI",
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/accno-code"
          },
          "style": "simple"
        }
      ],
      "get": {
        "tags": [
          "GIFI"
        ],
        "summary": "Get a single GIFI",
        "operationId": "getGIFIById",
        "responses": {
          "200": {
            "description": "...",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GIFI"
                },
                "examples": {
                  "validGIFI": {
                    "$ref": "#/components/examples/validGIFI"
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/304"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      },
      "put": {
        "tags": [
          "GIFI"
        ],
        "summary": "Put a single GIFI",
        "operationId": "putGIFIById",
        "parameters": [
          {
            "$ref": "#/components/parameters/if-match"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GIFI"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The resource was succesfully replaced,\nreturning the new data for the resource.\n",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GIFI"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/304"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "412": {
            "$ref": "#/components/responses/412"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "428": {
            "$ref": "#/components/responses/428"
          }
        }
      },
      "delete": {
        "tags": [
          "GIFI"
        ],
        "summary": "Delete a single GIFI",
        "operationId": "deleteGIFIById",
        "parameters": [
          {
            "$ref": "#/components/parameters/if-match"
          }
        ],
        "responses": {
          "204": {
            "description": "The resource was succesfully deleted"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      },
      "patch": {
        "tags": [
          "GIFI"
        ],
        "summary": "Update a single GIFI",
        "operationId": "updateGIFIById",
        "parameters": [
          {
            "$ref": "#/components/parameters/if-match"
          }
        ],
        "responses": {
          "200": {
            "description": "The resource was succesfully updated,\nreturning the new data for the resource.\n"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      }
    },
    "/orders": {
      "description": "Management of Orders",
      "get": {
        "tags": [
          "Orders",
          "Experimental"
        ],
        "summary": "Lists orders",
        "operationId": "getOrders",
        "responses": {
          "200": {
            "description": "...",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Order"
                  }
                },
                "examples": {
                  "validOrders": {
                    "$ref": "#/components/examples/validOrders"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "default": {
            "description": "...",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Orders",
          "Experimental"
        ],
        "summary": "Add an order",
        "operationId": "postOrders",
        "requestBody": {
          "description": "...",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/newOrder"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag3"
              },
              "Location": {
                "schema": {
                  "type": "string",
                  "format": "uri-reference"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      }
    },
    "/orders/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "minLength": 1
          }
        }
      ],
      "get": {
        "tags": [
          "Orders",
          "Experimental"
        ],
        "summary": "Get a single order",
        "operationId": "getOrdersById",
        "responses": {
          "200": {
            "description": "...",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag3"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                },
                "examples": {
                  "validOrder": {
                    "$ref": "#/components/examples/validOrder"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      },
      "put": {
        "tags": [
          "Orders",
          "Experimental"
        ],
        "summary": "Update a single order",
        "operationId": "putOrderById",
        "parameters": [
          {
            "$ref": "#/components/parameters/if-match3"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/newOrder"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "...",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag3"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "304": {
            "description": "..."
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "412": {
            "$ref": "#/components/responses/412"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "428": {
            "$ref": "#/components/responses/428"
          }
        }
      }
    },
    "/products/partsgroups": {
      "description": "Managing products and related configuration",
      "get": {
        "tags": [
          "Parts groups"
        ],
        "summary": "Get products parts groups",
        "operationId": "getProductsPartsgroups",
        "responses": {
          "200": {
            "description": "Returns the full list of defined parts groups",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "_links": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Partsgroup"
                      }
                    }
                  }
                },
                "examples": {
                  "validPartsgroups": {
                    "$ref": "#/components/examples/validPartsgroups"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      },
      "post": {
        "tags": [
          "Parts groups"
        ],
        "summary": "Create products parts group",
        "operationId": "postProductsPartsgroup",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewPartsgroup"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Confirms creation of the new resource, returning\nthe new data\n",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Location": {
                "schema": {
                  "type": "string",
                  "format": "uri-reference"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      }
    },
    "/products/partsgroups/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/common-id"
          },
          "style": "simple"
        }
      ],
      "get": {
        "tags": [
          "Parts groups"
        ],
        "summary": "Get a single products parts group",
        "operationId": "getProductsPartsgroupById",
        "responses": {
          "200": {
            "description": "Returns the data for a single resource\n",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Partsgroup"
                },
                "examples": {
                  "validPartsgroup": {
                    "$ref": "#/components/examples/validPartsgroup"
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/304"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      },
      "put": {
        "tags": [
          "Parts groups"
        ],
        "summary": "Create single products parts group",
        "operationId": "putProductsPartsgroupById",
        "parameters": [
          {
            "$ref": "#/components/parameters/if-match"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Partsgroup"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Confirms successful replacement of the\nresource's data, returning the new state\n",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Partsgroup"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/304"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "412": {
            "$ref": "#/components/responses/412"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "428": {
            "$ref": "#/components/responses/428"
          }
        }
      },
      "delete": {
        "tags": [
          "Parts groups"
        ],
        "summary": "Delete a single products price group",
        "operationId": "deleteProductsPartsgroupById",
        "parameters": [
          {
            "$ref": "#/components/parameters/if-match"
          }
        ],
        "responses": {
          "204": {
            "description": "Confirms successful deletion of the resource"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          }
        }
      },
      "patch": {
        "tags": [
          "Parts groups"
        ],
        "summary": "Updaet a single products parts group",
        "operationId": "updateProductsPartsgroupById",
        "parameters": [
          {
            "$ref": "#/components/parameters/if-match"
          }
        ],
        "responses": {
          "200": {
            "description": "Confirms successful update of the resource,\nreturning the new resource state\n"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          }
        }
      }
    },
    "/products/pricegroups": {
      "description": "Managing products and related configuration",
      "get": {
        "tags": [
          "Price groups"
        ],
        "summary": "Get products price groups",
        "operationId": "getProductsPricegroups",
        "responses": {
          "200": {
            "description": "Returns the full list of defined price groups",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "_links": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Pricegroup"
                      }
                    }
                  }
                },
                "examples": {
                  "validPricegroups": {
                    "$ref": "#/components/examples/validPricegroups"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      },
      "post": {
        "tags": [
          "Price groups"
        ],
        "summary": "Create products price group",
        "operationId": "postProductsPricegroup",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewPricegroup"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Confirms creation of the new resource, returning\nthe new data\n",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Location": {
                "schema": {
                  "type": "string",
                  "format": "uri-reference"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      }
    },
    "/products/pricegroups/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/common-id"
          },
          "style": "simple"
        }
      ],
      "get": {
        "tags": [
          "Price groups"
        ],
        "summary": "Get a single products price group",
        "operationId": "getProductsPricegroupById",
        "responses": {
          "200": {
            "description": "Returns the data for a single resource\n",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Pricegroup"
                },
                "examples": {
                  "validPricegroup": {
                    "$ref": "#/components/examples/validPricegroup"
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/304"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      },
      "put": {
        "tags": [
          "Price groups"
        ],
        "summary": "Create single products price group",
        "operationId": "putProductsPricegroupById",
        "parameters": [
          {
            "$ref": "#/components/parameters/if-match"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Pricegroup"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Confirms successful replacement of the\nresource's data, returning the new state\n",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Pricegroup"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/304"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "412": {
            "$ref": "#/components/responses/412"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "428": {
            "$ref": "#/components/responses/428"
          }
        }
      },
      "delete": {
        "tags": [
          "Price groups"
        ],
        "summary": "Delete a single products price group",
        "operationId": "deleteProductsPricegroupById",
        "parameters": [
          {
            "$ref": "#/components/parameters/if-match"
          }
        ],
        "responses": {
          "204": {
            "description": "Confirms successful deletion of the resource"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          }
        }
      },
      "patch": {
        "tags": [
          "Price groups"
        ],
        "summary": "Update a single products price group",
        "operationId": "updateProductsPricegroupById",
        "parameters": [
          {
            "$ref": "#/components/parameters/if-match"
          }
        ],
        "responses": {
          "200": {
            "description": "Confirms successful update of the resource, returning\nthe new resource state\n"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          }
        }
      }
    },
    "/products/warehouses": {
      "description": "Manage warehouses",
      "get": {
        "tags": [
          "Warehouses"
        ],
        "summary": "Get a list of warehouses",
        "operationId": "getWarehouses",
        "responses": {
          "200": {
            "description": "Returns the full set of configured warehouses",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "_links": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Warehouse"
                      }
                    }
                  }
                },
                "examples": {
                  "validWarehouses": {
                    "$ref": "#/components/examples/validWarehouses"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      },
      "post": {
        "tags": [
          "Warehouses"
        ],
        "summary": "Create a warehouse",
        "operationId": "postWarehouse",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewWarehouse"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Confirms successful creation of the new resource,\nreturning the new data\n",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Location": {
                "schema": {
                  "type": "string",
                  "format": "uri-reference"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      }
    },
    "/products/warehouses/{id}": {
      "description": "Manage a warehouse",
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/common-id"
          },
          "style": "simple"
        }
      ],
      "get": {
        "tags": [
          "Warehouses"
        ],
        "summary": "Get a single warehouse",
        "operationId": "getWarehousesById",
        "responses": {
          "200": {
            "description": "Returns the data of a single resource",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Warehouse"
                },
                "examples": {
                  "validWarehouse": {
                    "$ref": "#/components/examples/validWarehouse"
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/304"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      },
      "put": {
        "tags": [
          "Warehouses"
        ],
        "summary": "Update a single warehouse",
        "operationId": "putWarehousesById",
        "parameters": [
          {
            "$ref": "#/components/parameters/if-match"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Warehouse"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Confirms successful replacement of the resources data,\nreturning the new state\n",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Warehouse"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/304"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "412": {
            "$ref": "#/components/responses/412"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "428": {
            "$ref": "#/components/responses/428"
          }
        }
      },
      "delete": {
        "tags": [
          "Warehouses"
        ],
        "summary": "Delete a single warehouse",
        "operationId": "deleteWarehousesById",
        "parameters": [
          {
            "$ref": "#/components/parameters/if-match"
          }
        ],
        "responses": {
          "204": {
            "description": "Confirms deletion of the resource"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          }
        }
      },
      "patch": {
        "tags": [
          "Warehouses"
        ],
        "summary": "Update a single warehouse",
        "operationId": "updateWarehousesById",
        "parameters": [
          {
            "$ref": "#/components/parameters/if-match"
          }
        ],
        "responses": {
          "200": {
            "description": "Confirms successful update of the resource,\nreturning the new state\n"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          }
        }
      }
    }
  },
  "components": {
    "responses": {
      "304": {
        "description": "Not modified"
      },
      "400": {
        "description": "Bad request"
      },
      "401": {
        "description": "Unauthorized"
      },
      "403": {
        "description": "Forbidden"
      },
      "404": {
        "description": "Not Found"
      },
      "409": {
        "description": "Conflict"
      },
      "412": {
        "description": "Precondition failed (If-Match header)"
      },
      "413": {
        "description": "Payload too large"
      },
      "428": {
        "description": "Precondition required"
      }
    },
    "parameters": {
      "if-match": {
        "name": "If-Match",
        "in": "header",
        "description": "Clients need to provide the If-Match parameter on update operations\n(PUT and PATCH) with the ETag obtained in the request from which\ndata are being updated. Requests missing this header will be\nrejected with HTTP response code 428. Requests trying to update\noutdated content will be rejected with HTTP response code 412.\n",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "if-match1": {
        "name": "If-Match",
        "in": "header",
        "description": "...",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "if-match2": {
        "name": "If-Match",
        "in": "header",
        "description": "...",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "if-match3": {
        "name": "If-Match",
        "in": "header",
        "description": "...",
        "required": true,
        "schema": {
          "type": "string"
        }
      }
    },
    "headers": {
      "ETag": {
        "description": "The API uses the ETag parameter to prevent different clients modifying\nthe same resource around the same time from overwriting each other's\ndata: the later updates will be rejected based on verification of this\nparameter.\nClients need to retain the ETag returned on a request when they might\nwant to update the values later.\n",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "ETag1": {
        "description": "...",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "ETag2": {
        "description": "...",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "ETag3": {
        "description": "...",
        "required": true,
        "schema": {
          "type": "string"
        }
      }
    },
    "securitySchemes": {
      "cookieAuth": {
        "type": "apiKey",
        "in": "cookie",
        "name": "LedgerSMB",
        "description": "The authenticating cookie can be obtained by sending a `POST` request\nto `login.pl?__action=authenticate&company=<url-encoded-company` with a\nJSON object in the body of the request, containing these three fields\n\n* company\n* username\n* password\n\nas if they had been entered on the login page in the browser. Please\nnote that the request `Content-Type` must be set to `application/json`\nand that an `X-Requested-With` header is expected with the value\n`XMLHttpRequest`.\n\n**Note**: the cookie value is updated on each response; the next\nrequest *must* be executed with the new cookie value.\n\n**Note 2**: the validity of the cookie is as long the user's timeout\nwhen logged into the application (default: 90 minutes).\n\n**Note 3**: Sites may customize the name of the cookie in order to run\nmultiple versions in parallel. The advice is to append the version name\nto the cookie, resulting in cookie name `LedgerSMB-1.1` for LedgerSMB\nversion 1.1.\n"
      }
    },
    "schemas": {
      "country-code": {
        "type": "string",
        "pattern": "^[a-zA-Z]{2}$"
      },
      "Country": {
        "type": "object",
        "required": [
          "code",
          "name"
        ],
        "properties": {
          "_meta": {
            "type": "object"
          },
          "code": {
            "$ref": "#/components/schemas/country-code"
          },
          "default": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "localizedName": {
            "type": "string"
          }
        }
      },
      "error": {
        "type": "object"
      },
      "newInvoice": {
        "type": "object",
        "required": [
          "eca",
          "account",
          "currency",
          "dates",
          "lines"
        ],
        "properties": {
          "eca": {
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "id"
                ],
                "properties": {
                  "id": {
                    "type": "integer",
                    "format": "int64",
                    "minimum": 1
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "number",
                  "type"
                ],
                "properties": {
                  "number": {
                    "type": "string",
                    "minLength": 1
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "customer",
                      "vendor"
                    ]
                  }
                }
              }
            ]
          },
          "account": {
            "type": "object",
            "properties": {
              "accno": {
                "type": "string",
                "minLength": 1
              }
            }
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "internal-notes": {
            "type": "string",
            "nullable": true
          },
          "invoice-number": {
            "type": "string"
          },
          "order-number": {
            "type": "string"
          },
          "po-number": {
            "type": "string"
          },
          "ship-via": {
            "type": "string",
            "nullable": true
          },
          "shipping-point": {
            "type": "string",
            "nullable": true
          },
          "ship-to": {
            "type": "object"
          },
          "dates": {
            "type": "object",
            "required": [
              "book"
            ],
            "properties": {
              "due": {
                "type": "string",
                "format": "date"
              },
              "book": {
                "type": "string",
                "format": "date"
              },
              "created": {
                "type": "string",
                "format": "date"
              }
            }
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "part"
              ],
              "properties": {
                "description": {
                  "type": "string"
                },
                "price": {
                  "type": "number"
                },
                "price_fixated": {
                  "type": "boolean",
                  "default": false
                },
                "unit": {
                  "type": "string"
                },
                "qty": {
                  "type": "number",
                  "default": 1
                },
                "taxform": {
                  "type": "boolean",
                  "default": false
                },
                "serialnumber": {
                  "type": "string",
                  "nullable": true
                },
                "discount": {
                  "description": "A value of 10 means the customer gets a 10% discount,\nif discount_type has a value of '%'\n",
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "discount_type": {
                  "type": "string",
                  "enum": [
                    "%"
                  ]
                },
                "delivery_date": {
                  "type": "string",
                  "format": "date",
                  "nullable": true
                },
                "part": {
                  "type": "object",
                  "required": [
                    "number"
                  ],
                  "properties": {
                    "number": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                }
              }
            }
          },
          "taxes": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "tax": {
                  "type": "object",
                  "required": [
                    "category"
                  ],
                  "properties": {
                    "category": {
                      "type": "string"
                    }
                  }
                },
                "base-amount": {
                  "type": "number"
                },
                "amount": {
                  "type": "number"
                },
                "source": {
                  "type": "string"
                },
                "memo": {
                  "type": "string"
                }
              }
            }
          },
          "payments": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "account",
                "amount",
                "date"
              ],
              "properties": {
                "date": {
                  "type": "string",
                  "format": "date"
                },
                "source": {
                  "type": "string"
                },
                "memo": {
                  "type": "string"
                },
                "amount": {
                  "type": "number"
                },
                "account": {
                  "type": "object",
                  "required": [
                    "accno"
                  ],
                  "properties": {
                    "accno": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                }
              }
            }
          }
        }
      },
      "Invoice": {
        "description": "...",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "eca": {
                "type": "object",
                "properties": {
                  "credit_limit": {
                    "type": "object",
                    "properties": {
                      "available": {
                        "type": "number"
                      },
                      "total": {
                        "type": "number"
                      },
                      "used": {
                        "type": "number"
                      }
                    }
                  },
                  "description": {
                    "type": "string",
                    "nullable": true
                  },
                  "entity": {
                    "type": "object",
                    "properties": {
                      "control_code": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    }
                  },
                  "id": {
                    "type": "number"
                  },
                  "number": {
                    "type": "string",
                    "minLength": 1
                  },
                  "pay_to_name": {
                    "type": "string",
                    "nullable": true
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "customer",
                      "vendor"
                    ]
                  }
                }
              },
              "account": {
                "type": "object",
                "properties": {
                  "accno": {
                    "type": "string",
                    "minLength": 1
                  },
                  "description": {
                    "type": "string",
                    "minLength": 2
                  }
                }
              },
              "description": {
                "type": "string",
                "nullable": true
              },
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "delivery_date": {
                      "type": "string",
                      "format": "date",
                      "nullable": true
                    },
                    "description": {
                      "type": "string"
                    },
                    "discount": {
                      "description": "A value of 10 means the customer gets a 10% discount,\nif discount_type has a value of '%'\n",
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "discount_type": {
                      "type": "string",
                      "enum": [
                        "%"
                      ]
                    },
                    "id": {
                      "type": "number"
                    },
                    "item": {
                      "type": "number"
                    },
                    "notes": {
                      "type": "string",
                      "nullable": true
                    },
                    "price": {
                      "type": "number"
                    },
                    "price_fixated": {
                      "type": "boolean",
                      "default": false
                    },
                    "unit": {
                      "type": "string"
                    },
                    "qty": {
                      "type": "number",
                      "default": 1
                    },
                    "serialnumber": {
                      "type": "string",
                      "nullable": true
                    },
                    "part": {
                      "type": "object",
                      "required": [
                        "number"
                      ],
                      "properties": {
                        "_self": {
                          "type": "string"
                        },
                        "number": {
                          "type": "string",
                          "minLength": 1
                        },
                        "description": {
                          "type": "string"
                        },
                        "onhand": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "weight": {
                          "type": "string"
                        }
                      }
                    },
                    "total": {
                      "type": "number"
                    }
                  }
                }
              },
              "payments": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "account": {
                      "type": "object",
                      "properties": {
                        "description": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              },
              "taxes": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "tax": {
                      "type": "object",
                      "required": [
                        "category"
                      ],
                      "properties": {
                        "category": {
                          "type": "string"
                        },
                        "rate": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      }
                    },
                    "base-amount": {
                      "type": "number"
                    },
                    "amount": {
                      "type": "number"
                    },
                    "calculated-amount": {
                      "type": "number"
                    },
                    "source": {
                      "type": "string"
                    },
                    "memo": {
                      "type": "string"
                    }
                  }
                }
              },
              "workflow": {
                "type": "object",
                "properties": {
                  "actions": {
                    "type": "array"
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "INITIAL",
                      "SAVED",
                      "POSTED",
                      "ONHOLD",
                      "VOIDED",
                      "REVERSED",
                      "DELETED"
                    ]
                  }
                }
              }
            }
          }
        ]
      },
      "sic-code": {
        "type": "string",
        "minLength": 1
      },
      "SIC": {
        "type": "object",
        "required": [
          "code",
          "description"
        ],
        "properties": {
          "code": {
            "$ref": "#/components/schemas/sic-code"
          },
          "description": {
            "type": "string"
          }
        }
      },
      "business-type-id": {
        "type": "number",
        "format": "int64"
      },
      "BusinessType": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NewBusinessType"
          },
          {
            "type": "object",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "$ref": "#/components/schemas/business-type-id"
              }
            }
          }
        ]
      },
      "NewBusinessType": {
        "type": "object",
        "required": [
          "description"
        ],
        "properties": {
          "description": {
            "type": "string"
          },
          "discount": {
            "type": "number",
            "format": "float"
          }
        }
      },
      "language-code": {
        "type": "string",
        "pattern": "^[a-z]{2}(_[A-Z]{2})?$",
        "example": "fr_CA"
      },
      "Language": {
        "type": "object",
        "required": [
          "code",
          "description"
        ],
        "properties": {
          "_meta": {
            "type": "object"
          },
          "code": {
            "$ref": "#/components/schemas/language-code"
          },
          "default": {
            "type": "boolean"
          },
          "description": {
            "type": "string",
            "example": "French (Canada)"
          }
        }
      },
      "accno-code": {
        "type": "string",
        "minLength": 1
      },
      "GIFI": {
        "type": "object",
        "required": [
          "accno",
          "description"
        ],
        "properties": {
          "accno": {
            "$ref": "#/components/schemas/accno-code"
          },
          "description": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "newOrder": {
        "type": "object",
        "required": [
          "eca",
          "currency",
          "dates",
          "lines"
        ],
        "properties": {
          "eca": {
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "id"
                ],
                "properties": {
                  "id": {
                    "type": "integer",
                    "format": "int64",
                    "minimum": 1
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "number",
                  "type"
                ],
                "properties": {
                  "number": {
                    "type": "string",
                    "minLength": 1
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "customer",
                      "vendor"
                    ]
                  }
                }
              }
            ]
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "internal-notes": {
            "type": "string",
            "nullable": true
          },
          "order-number": {
            "type": "string"
          },
          "po-number": {
            "type": "string"
          },
          "ship-via": {
            "type": "string",
            "nullable": true
          },
          "shipping-point": {
            "type": "string",
            "nullable": true
          },
          "ship-to": {
            "type": "object"
          },
          "dates": {
            "type": "object",
            "required": [
              "order"
            ],
            "properties": {
              "order": {
                "type": "string",
                "format": "date"
              },
              "required-by": {
                "type": "string",
                "format": "date"
              }
            }
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "part"
              ],
              "properties": {
                "description": {
                  "type": "string"
                },
                "notes": {
                  "type": "string",
                  "nullable": true
                },
                "price": {
                  "type": "number"
                },
                "price_fixated": {
                  "type": "boolean",
                  "default": false
                },
                "unit": {
                  "type": "string"
                },
                "qty": {
                  "type": "number",
                  "default": 1
                },
                "taxform": {
                  "type": "boolean",
                  "default": false
                },
                "serialnumber": {
                  "type": "string",
                  "nullable": true
                },
                "discount": {
                  "description": "A value of 10 means the customer gets a 10% discount,\nif discount_type has a value of '%'\n",
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "discount_type": {
                  "type": "string",
                  "enum": [
                    "%"
                  ]
                },
                "required-by": {
                  "type": "string",
                  "format": "date",
                  "nullable": true
                },
                "part": {
                  "type": "object",
                  "required": [
                    "number"
                  ],
                  "properties": {
                    "number": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                }
              }
            }
          }
        }
      },
      "Order": {
        "description": "...",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "eca": {
                "type": "object",
                "properties": {
                  "credit_limit": {
                    "type": "object",
                    "properties": {
                      "available": {
                        "type": "number"
                      },
                      "total": {
                        "type": "number"
                      },
                      "used": {
                        "type": "number"
                      }
                    }
                  },
                  "description": {
                    "type": "string",
                    "nullable": true
                  },
                  "entity": {
                    "type": "object",
                    "properties": {
                      "control_code": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    }
                  },
                  "id": {
                    "type": "number"
                  },
                  "number": {
                    "type": "string",
                    "minLength": 1
                  },
                  "pay_to_name": {
                    "type": "string",
                    "nullable": true
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "customer",
                      "vendor"
                    ]
                  }
                }
              },
              "description": {
                "type": "string",
                "nullable": true
              },
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "required-by": {
                      "type": "string",
                      "format": "date",
                      "nullable": true
                    },
                    "description": {
                      "type": "string"
                    },
                    "discount": {
                      "description": "A value of 10 means the customer gets a 10% discount,\nif discount_type has a value of '%'\n",
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "discount_type": {
                      "type": "string",
                      "enum": [
                        "%"
                      ]
                    },
                    "id": {
                      "type": "number"
                    },
                    "item": {
                      "type": "number"
                    },
                    "notes": {
                      "type": "string",
                      "nullable": true
                    },
                    "price": {
                      "type": "number"
                    },
                    "price_fixated": {
                      "type": "boolean",
                      "default": false
                    },
                    "unit": {
                      "type": "string"
                    },
                    "qty": {
                      "type": "number",
                      "default": 1
                    },
                    "serialnumber": {
                      "type": "string",
                      "nullable": true
                    },
                    "part": {
                      "type": "object",
                      "required": [
                        "number"
                      ],
                      "properties": {
                        "_self": {
                          "type": "string"
                        },
                        "number": {
                          "type": "string",
                          "minLength": 1
                        },
                        "description": {
                          "type": "string"
                        },
                        "onhand": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "weight": {
                          "type": "string"
                        }
                      }
                    },
                    "total": {
                      "type": "number"
                    }
                  }
                }
              },
              "taxes": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "tax": {
                      "type": "object",
                      "required": [
                        "category"
                      ],
                      "properties": {
                        "category": {
                          "type": "string"
                        },
                        "rate": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      }
                    },
                    "basis": {
                      "type": "string"
                    },
                    "amount": {
                      "type": "string"
                    },
                    "source": {
                      "type": "string"
                    }
                  }
                }
              },
              "workflow": {
                "type": "object",
                "properties": {
                  "actions": {
                    "type": "array"
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "SAVED",
                      "DELETED"
                    ]
                  }
                }
              }
            }
          }
        ]
      },
      "common-id": {
        "type": "integer",
        "format": "int64",
        "minimum": 1
      },
      "partsgroup-id": {
        "$ref": "#/components/schemas/common-id"
      },
      "Partsgroup": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NewPartsgroup"
          },
          {
            "type": "object",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "$ref": "#/components/schemas/common-id"
              }
            }
          }
        ]
      },
      "NewPartsgroup": {
        "type": "object",
        "required": [
          "description"
        ],
        "properties": {
          "description": {
            "type": "string"
          },
          "parent": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "nullable": true
          }
        }
      },
      "pricegroup-id": {
        "$ref": "#/components/schemas/common-id"
      },
      "Pricegroup": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NewPricegroup"
          },
          {
            "type": "object",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "$ref": "#/components/schemas/common-id"
              }
            }
          }
        ]
      },
      "NewPricegroup": {
        "type": "object",
        "required": [
          "description"
        ],
        "properties": {
          "description": {
            "type": "string"
          }
        }
      },
      "warehouse-id": {
        "$ref": "#/components/schemas/common-id"
      },
      "Warehouse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NewWarehouse"
          },
          {
            "type": "object",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "$ref": "#/components/schemas/common-id"
              }
            }
          }
        ]
      },
      "NewWarehouse": {
        "type": "object",
        "required": [
          "description"
        ],
        "properties": {
          "description": {
            "type": "string"
          }
        }
      }
    },
    "examples": {
      "validCountries": {
        "summary": "Valid countries (collection response)",
        "description": "countries collection response example",
        "value": {
          "_links": [],
          "items": [
            {
              "code": "NL",
              "default": false,
              "name": "Netherlands"
            },
            {
              "code": "DE",
              "default": false,
              "name": "Germany"
            }
          ]
        }
      },
      "validCountry": {
        "summary": "Valid Country",
        "description": "Netherlands entry",
        "value": {
          "code": "NL",
          "default": false,
          "name": "Netherlands"
        }
      },
      "validInvoices": {
        "summary": "Valid invoices (collection response)",
        "description": "Invoices collection response",
        "value": [
          {
            "account": {
              "accno": "1200",
              "description": "AR"
            },
            "currency": "USD",
            "dates": {
              "created": "2022-09-01",
              "due": "2022-10-01",
              "book": "2022-10-05"
            },
            "description": null,
            "eca": {
              "number": "Customer 1",
              "type": "customer",
              "credit_limit": {
                "total": 0,
                "used": 0,
                "available": 0
              },
              "description": null,
              "entity": {
                "control_code": "C-0",
                "name": "Customer 1"
              },
              "id": 1,
              "pay_to_name": null
            },
            "id": "1",
            "internal-notes": "Internal notes",
            "invoice-number": "2389434",
            "lines": [
              {
                "delivery_date": "2022-10-27",
                "description": "A description",
                "discount": 12,
                "discount_type": "%",
                "id": 1,
                "item": 1,
                "notes": null,
                "part": {
                  "description": "Part 1",
                  "number": "p1",
                  "onhand": "0",
                  "unit": "ea",
                  "weight": "0"
                },
                "price": 56.78,
                "price_fixated": false,
                "qty": 1,
                "serialnumber": "1234567890",
                "total": 49.97,
                "unit": "lbs"
              }
            ],
            "lines_total": 49.97,
            "notes": "Notes",
            "order-number": "order 345",
            "po-number": "po 456",
            "quote-number": "",
            "ship-via": "ship via",
            "shipping-point": "shipping from here",
            "taxes": {
              "2150": {
                "amount": 6.78,
                "base-amount": 50,
                "calculated-amount": 2.5,
                "source": "Part 1",
                "memo": "tax memo",
                "tax": {
                  "category": "2150",
                  "name": "Sales Tax",
                  "rate": "0.05"
                }
              }
            },
            "taxes_total": 6.78,
            "total": 56.75,
            "type": "customer",
            "workflow": {
              "actions": [
                "approve",
                "copy_to_new",
                "del",
                "edit_and_save",
                "new_screen",
                "sales_order",
                "save_info",
                "schedule",
                "ship_to",
                "update"
              ],
              "state": "SAVED"
            }
          }
        ]
      },
      "validInvoice": {
        "summary": "Example Invoice",
        "description": "Invoice entry",
        "value": {
          "account": {
            "accno": "1200",
            "description": "AR"
          },
          "currency": "USD",
          "dates": {
            "created": "2022-09-01",
            "due": "2022-10-01",
            "book": "2022-10-05"
          },
          "description": null,
          "eca": {
            "number": "Customer 1",
            "type": "customer",
            "credit_limit": {
              "total": 0,
              "used": 0,
              "available": 0
            },
            "description": null,
            "entity": {
              "control_code": "C-0",
              "name": "Customer 1"
            },
            "id": 1,
            "pay_to_name": null
          },
          "id": "1",
          "internal-notes": "Internal notes",
          "invoice-number": "2389434",
          "lines": [
            {
              "delivery_date": "2022-10-27",
              "description": "A description",
              "discount": 12,
              "discount_type": "%",
              "id": 1,
              "item": 1,
              "notes": null,
              "part": {
                "description": "Part 1",
                "number": "p1",
                "onhand": "0",
                "unit": "ea",
                "weight": "0"
              },
              "price": 56.78,
              "price_fixated": false,
              "qty": 1,
              "serialnumber": "1234567890",
              "total": 49.97,
              "unit": "lbs"
            }
          ],
          "lines_total": 49.97,
          "notes": "Notes",
          "order-number": "order 345",
          "po-number": "po 456",
          "quote-number": "",
          "ship-via": "ship via",
          "shipping-point": "shipping from here",
          "taxes": {
            "2150": {
              "amount": 6.78,
              "base-amount": 50,
              "calculated-amount": 2.5,
              "source": "Part 1",
              "memo": "tax memo",
              "tax": {
                "category": "2150",
                "name": "Sales Tax",
                "rate": "0.05"
              }
            }
          },
          "taxes_total": 6.78,
          "total": 56.75,
          "type": "customer",
          "workflow": {
            "actions": [
              "approve",
              "copy_to_new",
              "del",
              "edit_and_save",
              "new_screen",
              "sales_order",
              "save_info",
              "schedule",
              "ship_to",
              "update"
            ],
            "state": "SAVED"
          }
        }
      },
      "validSICs": {
        "summary": "Valid SICs (collection response)",
        "description": "SIC collection response",
        "value": {
          "_links": [],
          "items": [
            {
              "code": "541510",
              "description": "Design of computer systems"
            }
          ]
        }
      },
      "validSIC": {
        "summary": "Valid SIC",
        "description": "Standard Industry Code",
        "value": {
          "code": "541510",
          "description": "Design of computer systems"
        }
      },
      "validBusinessTypes": {
        "summary": "Valid Business Types (collection response)",
        "description": "Business Types collection response",
        "value": {
          "_links": [],
          "items": [
            {
              "id": 1,
              "description": "Big customer",
              "discount": 0.05
            }
          ]
        }
      },
      "validBusinessType": {
        "summary": "Valid Business Type",
        "description": "Business Type Entry",
        "value": {
          "id": 1,
          "description": "Big customer",
          "discount": 0.05
        }
      },
      "validLanguages": {
        "summary": "Valid languages (collection response)",
        "description": "languages collection response",
        "value": {
          "_links": [],
          "items": [
            {
              "code": "fr_CA",
              "default": false,
              "description": "French (Canada)"
            },
            {
              "code": "nl_NL",
              "default": false,
              "description": "Dutch (Netherlands)"
            }
          ]
        }
      },
      "validLanguage": {
        "summary": "Valid Language",
        "description": "French Canadian entry",
        "value": {
          "code": "fr_CA",
          "default": false,
          "description": "French (Canada)"
        }
      },
      "validGIFIs": {
        "summary": "Valid GIFIs (collection response)",
        "description": "Collection response",
        "value": {
          "_links": [],
          "items": [
            {
              "accno": "99999",
              "description": "Test GIFI"
            }
          ]
        }
      },
      "validGIFI": {
        "summary": "Valid GIFI",
        "description": "French Canadian entry",
        "value": {
          "accno": "99999",
          "description": "Test GIFI"
        }
      },
      "validOrders": {
        "summary": "Valid orders (collection response)",
        "description": "Orders collection response",
        "value": [
          {
            "currency": "USD",
            "dates": {
              "order": "2022-09-01",
              "required-by": "2022-10-01"
            },
            "eca": {
              "number": "Customer 1",
              "type": "customer",
              "credit_limit": {
                "total": 0,
                "used": 0,
                "available": 0
              },
              "description": null,
              "entity": {
                "control_code": "C-0",
                "name": "Customer 1"
              },
              "id": 1,
              "pay_to_name": null
            },
            "id": "1",
            "internal-notes": "Internal notes",
            "lines": [
              {
                "required-by": "2022-10-27",
                "description": "A description",
                "discount": 12,
                "discount_type": "%",
                "id": 1,
                "item": 1,
                "notes": null,
                "part": {
                  "description": "Part 1",
                  "number": "p1",
                  "onhand": "0",
                  "unit": "ea",
                  "weight": "0"
                },
                "price": 56.78,
                "price_fixated": false,
                "qty": 1,
                "serialnumber": "1234567890",
                "total": 49.9664,
                "unit": "lbs"
              }
            ],
            "lines_total": 49.9664,
            "notes": "Notes",
            "order-number": "order 345",
            "po-number": "po 456",
            "quote-number": "",
            "ship-via": "ship via",
            "shipping-point": "shipping from here",
            "taxes": {
              "2150": {
                "amount": "2.50",
                "basis": "49.97",
                "tax": {
                  "category": "2150",
                  "name": "Sales Tax",
                  "rate": "0.05"
                }
              }
            },
            "taxes_total": 2.5,
            "total": 52.4664,
            "type": "customer",
            "workflow": {
              "actions": [
                "delete",
                "e_mail",
                "print",
                "print_and_save",
                "print_and_save_as_new",
                "purchase_order",
                "quotation",
                "sales_invoice",
                "save",
                "save_as_new",
                "ship_to",
                "update"
              ],
              "state": "SAVED"
            }
          }
        ]
      },
      "validOrder": {
        "summary": "Example Order",
        "description": "Order entry",
        "value": {
          "currency": "USD",
          "dates": {
            "order": "2022-09-01",
            "required-by": "2022-10-01"
          },
          "eca": {
            "number": "Customer 1",
            "type": "customer",
            "credit_limit": {
              "total": 0,
              "used": 0,
              "available": 0
            },
            "description": null,
            "entity": {
              "control_code": "C-0",
              "name": "Customer 1"
            },
            "id": 1,
            "pay_to_name": null
          },
          "id": "1",
          "internal-notes": "Internal notes",
          "lines": [
            {
              "required-by": "2022-10-27",
              "description": "A description",
              "discount": 12,
              "discount_type": "%",
              "id": 1,
              "item": 1,
              "notes": null,
              "part": {
                "description": "Part 1",
                "number": "p1",
                "onhand": "0",
                "unit": "ea",
                "weight": "0"
              },
              "price": 56.78,
              "price_fixated": false,
              "qty": 1,
              "serialnumber": "1234567890",
              "total": 49.9664,
              "unit": "lbs"
            }
          ],
          "lines_total": 49.9664,
          "notes": "Notes",
          "order-number": "order 345",
          "po-number": "po 456",
          "quote-number": "",
          "ship-via": "ship via",
          "shipping-point": "shipping from here",
          "taxes": {
            "2150": {
              "amount": "2.50",
              "basis": "49.97",
              "tax": {
                "category": "2150",
                "name": "Sales Tax",
                "rate": "0.05"
              }
            }
          },
          "taxes_total": 2.5,
          "total": 52.4664,
          "type": "customer",
          "workflow": {
            "actions": [
              "delete",
              "e_mail",
              "print",
              "print_and_save",
              "print_and_save_as_new",
              "purchase_order",
              "quotation",
              "sales_invoice",
              "save",
              "save_as_new",
              "ship_to",
              "update"
            ],
            "state": "SAVED"
          }
        }
      },
      "validPartsgroups": {
        "summary": "Valid Partsgroups (collection response)",
        "description": "Parts groups collection response",
        "value": {
          "_links": [],
          "items": [
            {
              "id": 1,
              "parent": null,
              "description": "Partsgroup1"
            }
          ]
        }
      },
      "validPartsgroup": {
        "summary": "Valid Partsgroup",
        "description": "Partsgroup entry",
        "value": {
          "id": 1,
          "parent": null,
          "description": "Partsgroup1"
        }
      },
      "validPricegroups": {
        "summary": "Valid pricegroups (collection response)",
        "description": "Pricegroups collection response",
        "value": {
          "_links": [],
          "items": [
            {
              "id": 1,
              "description": "Pricegroup1"
            }
          ]
        }
      },
      "validPricegroup": {
        "summary": "Valid Pricegroup",
        "description": "Pricegroup entry",
        "value": {
          "id": 1,
          "description": "Pricegroup1"
        }
      },
      "validWarehouses": {
        "summary": "Valid warehouses (collection response)",
        "description": "Warehouses collection response",
        "value": {
          "_links": [],
          "items": [
            {
              "id": 1,
              "description": "Warehouse1"
            }
          ]
        }
      },
      "validWarehouse": {
        "summary": "Valid Warehouse",
        "description": "Warehouse entry",
        "value": {
          "id": 1,
          "description": "Warehouse1"
        }
      }
    }
  }
}