Sinao API icon

Sinao API

Sinao API for account management, apps administration and network exploration

COMMUNITYBEARER0 INSTALLS
OpenAPI Specificationv3.0
{
  "openapi": "3.0.0",
  "servers": [
    {
      "description": "Production",
      "url": "https://api.sinao.app/v1"
    },
    {
      "description": "Staging",
      "url": "https://api.sinao.dev/v1"
    },
    {
      "description": "Development",
      "url": "https://api.sinao.test/v1"
    }
  ],
  "info": {
    "contact": {
      "email": "contact@sinao.fr"
    },
    "description": "Sinao API for account management, apps administration and network exploration",
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "title": "Sinao API",
    "version": "1.1.0",
    "x-apisguru-categories": [
      "financial"
    ],
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_sinao_app_icon.svg"
    },
    "x-origin": [
      {
        "format": "openapi",
        "url": "https://api.sinao.app/v1/swagger.yaml",
        "version": "3.0"
      }
    ],
    "x-providerName": "sinao.app"
  },
  "paths": {
    "/apps": {
      "get": {
        "description": "Get all apps",
        "operationId": "app.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/App"
                  },
                  "type": "array"
                }
              }
            },
            "description": "search results"
          },
          "400": {
            "description": "bad input parameter"
          }
        },
        "security": [
          {}
        ],
        "summary": "List apps",
        "tags": [
          "Applications"
        ]
      },
      "post": {
        "description": "Create a new `App` with their organization profile",
        "operationId": "app.create",
        "parameters": [
          {
            "description": "Organization name. Minimum 3 characters with 1 alpha",
            "in": "query",
            "name": "organization_name",
            "required": true,
            "schema": {
              "minimum": 3,
              "pattern": "/^.*[a-z]+.*$/i",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/App"
                }
              }
            },
            "description": "Success"
          },
          "422": {
            "description": "The organization name format is invalid : minimum 3 characters with 1 alpha"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Create an app",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/access/invite/{accessToken}": {
      "delete": {
        "description": "Remove an invitation from token",
        "operationId": "app.policies.registration.delete",
        "parameters": [
          {
            "in": "path",
            "name": "accessToken",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            },
            "description": "successful operation"
          },
          "401": {
            "description": "Token expired"
          },
          "404": {
            "description": "Token was not found"
          }
        },
        "summary": "Delete an invitation from token",
        "tags": [
          "hidden"
        ]
      },
      "get": {
        "description": "Get infos of an invitation request. Returns an `AccessInvitation` object",
        "operationId": "app.policies.registration.get",
        "parameters": [
          {
            "in": "path",
            "name": "accessToken",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessInvitation"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Invitation was not found"
          }
        },
        "summary": "Get invitation informations",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/access/invite/{accessToken}/register": {
      "post": {
        "description": "Registration for an invited user",
        "operationId": "app.policies.registration.register",
        "parameters": [
          {
            "in": "path",
            "name": "accessToken",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Password for account",
            "in": "query",
            "name": "password",
            "required": true,
            "schema": {
              "minimum": 8,
              "type": "string"
            }
          },
          {
            "description": "First name of user before account creation / account link",
            "in": "query",
            "name": "firstname",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Last name of user before account creation / account link",
            "in": "query",
            "name": "lastname",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "User has valided CGU ?",
            "in": "query",
            "name": "cgu",
            "required": true,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad parameters"
          },
          "401": {
            "description": "Token expired"
          },
          "404": {
            "description": "Token not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Create an User by invitation",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}": {
      "get": {
        "description": "Get app informations",
        "operationId": "app.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/App"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {
            "always_allowed": []
          }
        ],
        "summary": "Get an app",
        "tags": [
          "Applications"
        ]
      }
    },
    "/apps/{appId}/access": {
      "get": {
        "description": "Get all policies for an app. Manage access for users",
        "operationId": "app.policies.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/PolicyProfile"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "App was not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get policies for an app",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/access/invite": {
      "get": {
        "description": "Get all sent invitations",
        "operationId": "app.policies.invitations.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AccessInvitation"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "App was not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "List invitations",
        "tags": [
          "hidden"
        ]
      },
      "post": {
        "description": "Invites a user to access the organization panel",
        "operationId": "app.policies.invitations.create",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Email for invitation. Will be used to account creation or account matching with an existing user",
            "in": "query",
            "name": "email",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Profile for policies set",
            "in": "query",
            "name": "policy_profile_id",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "First name of user before account creation / account link",
            "in": "query",
            "name": "firstname",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Last name of user before account creation / account link",
            "in": "query",
            "name": "lastname",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Last name of user before account creation / account link",
            "in": "query",
            "name": "civility",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Password for new user",
            "in": "query",
            "name": "password",
            "schema": {
              "minimum": 8,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessInvitation"
                }
              }
            },
            "description": "Success"
          },
          "403": {
            "description": "This user already exists, you can not set a password"
          },
          "404": {
            "description": "App was not found"
          }
        },
        "security": [
          {},
          {},
          {
            "is_admin": []
          }
        ],
        "summary": "Invite an user",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/access/invite/{id}": {
      "delete": {
        "description": "Remove an invitation",
        "operationId": "app.policies.invitations.delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            },
            "description": "successful operation"
          },
          "404": {
            "description": "Invitation was not found"
          }
        },
        "security": [
          {},
          {},
          {
            "is_admin": []
          }
        ],
        "summary": "Delete an invitation",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/access/profiles": {
      "get": {
        "description": "Get all profiles",
        "operationId": "app.policies.profiles.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/PolicyProfile"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get profiles",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/access/{userId}": {
      "delete": {
        "description": "Cancel access for an user on an app",
        "operationId": "app.policies.delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "App was not found"
          }
        },
        "security": [
          {},
          {},
          {
            "is_admin": []
          }
        ],
        "summary": "Delete police for an user",
        "tags": [
          "hidden"
        ]
      },
      "get": {
        "description": "Find policy profile for an user on an app",
        "operationId": "app.policies.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicyProfile"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "App was not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get police for an user",
        "tags": [
          "hidden"
        ]
      },
      "post": {
        "description": "Update police for an user on an app",
        "operationId": "app.policies.update",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "policy_profile_id",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicyProfile"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "App was not found"
          }
        },
        "security": [
          {},
          {},
          {
            "is_admin": []
          }
        ],
        "summary": "Update police for an user",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/accountcategories/": {
      "get": {
        "description": "",
        "operationId": "app.accounting.categories.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AccountCategory"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "List categories",
        "tags": [
          "AccountCategories"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.accounting.categories.create",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "name",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "description",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "type",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountCategory"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Create a category",
        "tags": [
          "AccountCategories"
        ]
      }
    },
    "/apps/{appId}/accountcategories/{id}": {
      "delete": {
        "description": "",
        "operationId": "app.accounting.categories.delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Remove a category",
        "tags": [
          "AccountCategories"
        ]
      },
      "get": {
        "description": "",
        "operationId": "app.accounting.categories.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountCategory"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get a category",
        "tags": [
          "AccountCategories"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.accounting.categories.update",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "name",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "description",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "type",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountCategory"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Update a category",
        "tags": [
          "AccountCategories"
        ]
      }
    },
    "/apps/{appId}/accounting_entries/": {
      "get": {
        "description": "",
        "operationId": "app.accounting.entries.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Account"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "List accounting entries",
        "tags": [
          "Entries"
        ]
      }
    },
    "/apps/{appId}/accounts/": {
      "get": {
        "description": "",
        "operationId": "app.accounting.accounts.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Account"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "List Account",
        "tags": [
          "Accounts"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.accounting.accounts.create",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "journalcode",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "name",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "description",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "keywords",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "accounting_number",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "is_cashflow",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "is_sales",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "is_purchase",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Create a Account",
        "tags": [
          "Accounts"
        ]
      }
    },
    "/apps/{appId}/accounts/batch": {
      "post": {
        "description": "Create many accounts",
        "operationId": "app.accounting.accounts.batch",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "List of accounts. Without ID for insert",
            "in": "query",
            "name": "data",
            "required": true,
            "schema": {
              "items": {
                "$ref": "#/components/schemas/Account"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Create many accounts",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/accounts/{id}": {
      "delete": {
        "description": "",
        "operationId": "app.accounting.accounts.delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of Account",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Remove a Account",
        "tags": [
          "Accounts"
        ]
      },
      "get": {
        "description": "",
        "operationId": "app.accounting.accounts.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of Account",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get a Account",
        "tags": [
          "Accounts"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.accounting.accounts.update",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of Account",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "journalcode",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "name",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "description",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "keywords",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "accounting_number",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "is_cashflow",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "is_sales",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "is_purchase",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Update a Account",
        "tags": [
          "Accounts"
        ]
      }
    },
    "/apps/{appId}/apikeys": {
      "get": {
        "operationId": "app.apikeys.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "App not found"
          }
        },
        "security": [
          {},
          {
            "is_admin": []
          }
        ],
        "summary": "Get all api keys",
        "tags": [
          "Applications"
        ]
      },
      "post": {
        "operationId": "app.apikeys.create",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Key name",
            "in": "query",
            "name": "name",
            "required": true,
            "schema": {
              "minimum": 4,
              "type": "string"
            }
          },
          {
            "description": "Partner ID for official connexion",
            "in": "query",
            "name": "api_partner_id",
            "schema": {
              "nullable": true,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "App or key not found"
          }
        },
        "security": [
          {},
          {},
          {
            "is_admin": []
          }
        ],
        "summary": "Create new API key",
        "tags": [
          "Applications"
        ]
      }
    },
    "/apps/{appId}/apikeys/{id}": {
      "delete": {
        "operationId": "app.apikeys.delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Automatically added",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {},
          {
            "is_admin": []
          }
        ],
        "summary": "Remove an api key",
        "tags": [
          "Applications"
        ]
      }
    },
    "/apps/{appId}/apipartners": {
      "get": {
        "operationId": "app.apipartners.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "App not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get all api parners",
        "tags": [
          "Applications"
        ]
      }
    },
    "/apps/{appId}/attachments": {
      "get": {
        "description": "Get list of attachments",
        "operationId": "app.attachments.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Attachment"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "List attachments",
        "tags": [
          "Attachments"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.attachments.create",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Object to attach file",
            "in": "query",
            "name": "type",
            "required": true,
            "schema": {
              "enum": [
                "none",
                "purchase",
                "invoice",
                "quote",
                "transaction",
                "relationship"
              ],
              "type": "string"
            }
          },
          {
            "description": "Object id",
            "in": "query",
            "name": "attachable_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "File to attach",
            "in": "query",
            "name": "file",
            "schema": {
              "format": "binary",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Attach a file on an object",
        "tags": [
          "Attachments"
        ]
      },
      "put": {
        "description": "",
        "operationId": "app.sapAttestations.generateSapAttestations",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Error"
          }
        },
        "security": [
          {}
        ],
        "summary": "Recreate S.A.P attestations",
        "tags": [
          "Attachments"
        ]
      }
    },
    "/apps/{appId}/attachments/download": {
      "get": {
        "description": "",
        "operationId": "app.attachments.download",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Array of attachments id",
            "in": "query",
            "name": "ids",
            "required": true,
            "schema": {
              "items": {
                "type": "integer"
              },
              "type": "string"
            }
          },
          {
            "description": "Type of attachment",
            "in": "query",
            "name": "type",
            "required": true,
            "schema": {
              "enum": [
                "sap"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/zip": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Download a list of attachments in pdf into a .zip file",
        "tags": [
          "attachments"
        ]
      }
    },
    "/apps/{appId}/attachments/sap-download": {
      "get": {
        "description": "",
        "operationId": "app.sapAttestations.download",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Array of attachments id",
            "in": "query",
            "name": "ids",
            "required": true,
            "schema": {
              "items": {
                "type": "integer"
              },
              "type": "string"
            }
          },
          {
            "description": "Type of attachment",
            "in": "query",
            "name": "type",
            "required": true,
            "schema": {
              "enum": [
                "sap"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/zip": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Download a list of SAP attestations in pdf into a .zip file",
        "tags": [
          "attachments"
        ]
      }
    },
    "/apps/{appId}/attachments/{id}": {
      "delete": {
        "description": "",
        "operationId": "app.attachments.delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Attachment id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Detach a file from id",
        "tags": [
          "Attachments"
        ]
      },
      "get": {
        "description": "",
        "operationId": "app.attachments.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Attachment id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get attachment by id",
        "tags": [
          "Attachments"
        ]
      }
    },
    "/apps/{appId}/attachments/{id}/pdf": {
      "get": {
        "description": "",
        "operationId": "app.attachments.RedirectToPublicUrl",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Attachment id to download",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "random number to force fresh pdf",
            "in": "query",
            "name": "random",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/pdf": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Download the attachment as pdf",
        "tags": [
          "attachments"
        ]
      }
    },
    "/apps/{appId}/bankdetails": {
      "get": {
        "description": "",
        "operationId": "app.documents.sales.bankdetails.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/BankDetails"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "List BankDetails",
        "tags": [
          "BankDetails"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.documents.sales.bankdetails.create",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "name",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "iban",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "bic",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankDetails"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Create a BankDetails",
        "tags": [
          "BankDetails"
        ]
      }
    },
    "/apps/{appId}/bankdetails/{id}": {
      "delete": {
        "description": "",
        "operationId": "app.documents.sales.bankdetails.delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of BankDetails",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Remove a BankDetails",
        "tags": [
          "BankDetails"
        ]
      },
      "get": {
        "description": "",
        "operationId": "app.documents.sales.bankdetails.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of BankDetails",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankDetails"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get a BankDetails",
        "tags": [
          "BankDetails"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.documents.sales.bankdetails.update",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of BankDetails",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "name",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "iban",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "bic",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankDetails"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Update a BankDetails",
        "tags": [
          "BankDetails"
        ]
      }
    },
    "/apps/{appId}/banks/": {
      "delete": {
        "description": "The deletion of the account is irreversible, it will not be possible to resume synchronization as it is afterwards. - If transactions have been exported to accounting or used as payment, the CashflowSource will be left as it is. Resuming synchronization will remain impossible. If you re-import the account, a new CashflowSource will be created and transactions will therefore be duplicated. - Otherwise, if the CashflowSource was not used, it as well as its transactions will be deleted",
        "operationId": "app.cashflow.banks.delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "item_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Remove a Bankin synchronization",
        "tags": [
          "hidden"
        ]
      },
      "get": {
        "description": "",
        "operationId": "app.cashflow.banks.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "List banks connected to bankin",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/banks/connect": {
      "get": {
        "description": "",
        "operationId": "app.cashflow.banks.connect",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "url": {
                      "format": "uri",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Get the link to the funnel to connect a bank with Sinao",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/banks/synchronize": {
      "post": {
        "description": "",
        "operationId": "app.cashflow.banks.synchronize",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Optional item id to refresh. If set, triggers a refresh at Bankin before synchronizing transactions",
            "in": "query",
            "name": "id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "The value 'false' triggers a non-incremental syncronization of the maximum possible duration. The value 'true' updates the transactions updated by Bankin since a certain date",
            "in": "query",
            "name": "is_incremential",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CashflowSource"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Triggers synchronization at Bankin then synchronizes transactions with Sinao",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/banks/{id}/funnel/edit": {
      "get": {
        "description": "",
        "operationId": "app.cashflow.banks.url_edit",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "url": {
                      "format": "uri",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get the link to the funnel to edit password",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/banks/{id}/funnel/sync": {
      "get": {
        "description": "",
        "operationId": "app.cashflow.banks.url_sync",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "url": {
                      "format": "uri",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get the link to the funnel to start manually a synchronization (SCA)",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/banks/{id}/funnel/validate": {
      "get": {
        "description": "",
        "operationId": "app.cashflow.banks.url_validate",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "url": {
                      "format": "uri",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get the link to the funnel to validate a pro item (SCA)",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/banks/{id}/select_accounts": {
      "post": {
        "description": "",
        "operationId": "app.cashflow.banks.select_accounts",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "List of enables accounts",
            "in": "query",
            "name": "bank_account_ids",
            "schema": {
              "items": {
                "type": "integer"
              },
              "nullable": true,
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CashflowSource"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Select accounts to synchronize",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/cashflowsources/": {
      "get": {
        "description": "",
        "operationId": "app.cashflow.cashflowsources.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/CashflowSource"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "List CashflowSource",
        "tags": [
          "Sources"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.cashflow.cashflowsources.create",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "name",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "identifiant",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "type",
            "schema": {
              "enum": [
                "bank",
                "cashdesk",
                "waiting"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "balance_amount",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "account_type",
            "schema": {
              "enum": [
                "checking",
                "card",
                "savings",
                "special",
                "securities",
                "loan",
                "life_insurance",
                "unknown",
                "pending",
                "share_savings_plan"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "parent_cashflow_source_id",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CashflowSource"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Create a CashflowSource",
        "tags": [
          "Sources"
        ]
      }
    },
    "/apps/{appId}/cashflowsources/{id}": {
      "delete": {
        "description": "",
        "operationId": "app.cashflow.cashflowsources.delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of CashflowSource",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Remove a CashflowSource",
        "tags": [
          "Sources"
        ]
      },
      "get": {
        "description": "",
        "operationId": "app.cashflow.cashflowsources.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of CashflowSource",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CashflowSource"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get a CashflowSource",
        "tags": [
          "Sources"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.cashflow.cashflowsources.update",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of CashflowSource",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "name",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "identifiant",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "type",
            "schema": {
              "enum": [
                "bank",
                "cashdesk",
                "waiting"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "balance_amount",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "account_type",
            "schema": {
              "enum": [
                "checking",
                "card",
                "savings",
                "special",
                "securities",
                "loan",
                "life_insurance",
                "unknown",
                "pending",
                "share_savings_plan"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "parent_cashflow_source_id",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CashflowSource"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Update a CashflowSource",
        "tags": [
          "Sources"
        ]
      }
    },
    "/apps/{appId}/contacts/merge": {
      "post": {
        "description": "",
        "operationId": "app.contacts.transform.merge",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "contacts",
            "required": true,
            "schema": {
              "items": {
                "format": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "type": {
                    "enum": [
                      "organization",
                      "person"
                    ],
                    "type": "string"
                  }
                }
              },
              "nullable": true,
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Merge many contacts",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/email/batch": {
      "post": {
        "description": "",
        "operationId": "app.contacts.email.batch",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "from",
            "schema": {
              "format": "email",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "messages",
            "schema": {
              "items": {
                "properties": {
                  "content": {
                    "type": "string"
                  },
                  "documents": {
                    "items": {
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "type": {
                          "enum": [
                            "invoice",
                            "quote",
                            "attachment"
                          ],
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "recipients": {
                    "items": {
                      "format": "email",
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "recipients_bcc": {
                    "items": {
                      "format": "email",
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "recipients_cc": {
                    "items": {
                      "format": "email",
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "title": {
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "need_copy_bcc",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Send emails",
        "tags": [
          "Emails"
        ]
      }
    },
    "/apps/{appId}/email/document": {
      "post": {
        "description": "",
        "operationId": "app.contacts.email.send",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "from",
            "schema": {
              "format": "email",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "recipients",
            "required": true,
            "schema": {
              "items": {
                "format": "email",
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "recipients_cc",
            "schema": {
              "items": {
                "format": "email",
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "recipients_bcc",
            "schema": {
              "items": {
                "format": "email",
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "title",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "body",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "documents",
            "required": true,
            "schema": {
              "items": {
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "type": {
                    "enum": [
                      "invoice",
                      "quote",
                      "attachment"
                    ],
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "need_copy_bcc",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Send an email",
        "tags": [
          "Emails"
        ]
      }
    },
    "/apps/{appId}/establishments/{id}": {
      "delete": {
        "description": "Remove an establishment",
        "operationId": "app.contacts.establishments.delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of establishment",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Remove an establishment",
        "tags": [
          "Establishments"
        ]
      },
      "get": {
        "description": "Get an establishment by id",
        "operationId": "app.contacts.establishments.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of an establishment",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EstablishmentIdentity"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get an establishment",
        "tags": [
          "Establishments"
        ]
      },
      "post": {
        "description": "Update an establishment by id",
        "operationId": "app.contacts.establishments.update",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of an establishment",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "name",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "phones",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "emails",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Establishment number (french NIC)",
            "in": "query",
            "name": "nic",
            "schema": {
              "nullable": true,
              "pattern": "/^[0-9]{5}$/i",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "place",
            "schema": {
              "properties": {
                "administrative_area_level1": {
                  "type": "string"
                },
                "administrative_area_level2": {
                  "type": "string"
                },
                "administrative_area_level3": {
                  "type": "string"
                },
                "country": {
                  "type": "string"
                },
                "countryiso2": {
                  "type": "string"
                },
                "formatted_address": {
                  "description": "Address formatted for intelligent analysis by google maps",
                  "type": "string"
                },
                "latitude": {
                  "type": "integer"
                },
                "locality": {
                  "type": "string"
                },
                "longitude": {
                  "type": "integer"
                },
                "postal_code": {
                  "type": "string"
                },
                "route": {
                  "type": "string"
                },
                "route2": {
                  "type": "string"
                },
                "street_number": {
                  "type": "string"
                },
                "sublocality": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EstablishmentIdentity"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Update an establishment",
        "tags": [
          "Establishments"
        ]
      }
    },
    "/apps/{appId}/exports": {
      "get": {
        "description": "",
        "operationId": "app.accounting.export.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ExportEntity"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "List ExportEntity",
        "tags": [
          "Exports"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.accounting.export.create",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "until",
            "required": true,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportEntity"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Create a ExportEntity",
        "tags": [
          "Exports"
        ]
      }
    },
    "/apps/{appId}/exports/acd_compta": {
      "get": {
        "description": "If response UUID is empty, you must register your identifiants.",
        "operationId": "app.accounting.export.AcdComptaGetUuid",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "uuid": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get the ACD UUID for authentification",
        "tags": [
          "Exports",
          "ACD"
        ]
      },
      "post": {
        "description": "Sinao will try to connect ACD authentification with your ids. If succed, Sinao will store your ids.",
        "operationId": "app.accounting.export.AcdComptaSetUuid",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "the login provided by ACD Compta",
            "in": "query",
            "name": "login",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the password provided by ACD Compta",
            "in": "query",
            "name": "password",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your ACD account number (3XXXX)",
            "in": "query",
            "name": "base",
            "required": true,
            "schema": {
              "pattern": "/^3[A-Z]{3,}$/i",
              "type": "string"
            }
          },
          {
            "description": "your CNX by ACD Compta",
            "in": "query",
            "name": "cnx",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "uuid": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Register ACD identifiants",
        "tags": [
          "Exports",
          "ACD"
        ]
      }
    },
    "/apps/{appId}/exports/download": {
      "get": {
        "description": "",
        "operationId": "app.accounting.export.download",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "The export format can be a FEC (universal - similar to the French legal file 'Fichier des Ecritures Comptables') or specific for accounting software",
            "in": "query",
            "name": "format",
            "schema": {
              "enum": [
                "universal",
                "quadra",
                "fiducial",
                "acd"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "export_entities_ids",
            "schema": {
              "items": {
                "type": "integer"
              },
              "type": "array"
            }
          },
          {
            "description": "Automatically find export entities from a date range",
            "in": "query",
            "name": "start_at",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Automatically find export entities from a date range",
            "in": "query",
            "name": "end_at",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Automatically find export entities since a date",
            "in": "query",
            "name": "since",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Automatically find the export entities since the last export downloaded",
            "in": "query",
            "name": "since_last",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/zip": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Download the export entity as zip",
        "tags": [
          "Exports"
        ]
      }
    },
    "/apps/{appId}/exports/months": {
      "get": {
        "description": "",
        "operationId": "app.accounting.export.list_by_months",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ExportEntity"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "List ExportEntity",
        "tags": [
          "Exports"
        ]
      }
    },
    "/apps/{appId}/exports/{id}": {
      "delete": {
        "description": "",
        "operationId": "app.accounting.export.delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of ExportEntity",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Remove a ExportEntity",
        "tags": [
          "Exports"
        ]
      },
      "get": {
        "description": "",
        "operationId": "app.accounting.export.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of ExportEntity",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportEntity"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get a ExportEntity",
        "tags": [
          "Exports"
        ]
      }
    },
    "/apps/{appId}/invoices": {
      "get": {
        "description": "Get list of invoices",
        "operationId": "app.documents.sales.invoices.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Invoice"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "List invoices",
        "tags": [
          "Invoices"
        ]
      },
      "post": {
        "description": "Create a new invoice with an Organization or a Person. Relationship store notes, metadata and accounting settings parameters",
        "operationId": "app.documents.sales.invoices.create",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "contact_infos",
            "schema": {
              "nullable": true,
              "properties": {
                "address": {
                  "description": "Customer addresss (street number and address) obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "address2": {
                  "description": "Customer address subline obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "details": {
                  "nullable": true,
                  "type": "string"
                },
                "id": {
                  "type": "integer"
                },
                "location": {
                  "description": "Customer address location (city, postal code and country) obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "name": {
                  "description": "Customer name obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "type": {
                  "enum": [
                    "organization",
                    "person"
                  ],
                  "type": "string"
                }
              },
              "type": "object"
            }
          },
          {
            "in": "query",
            "name": "third_account",
            "schema": {
              "nullable": true,
              "properties": {
                "address": {
                  "description": "Third account addresss (street number and address) obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "id": {
                  "type": "integer"
                },
                "location": {
                  "description": "Third account address location (city, postal code and country) obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "name": {
                  "description": "Third account name obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "type": {
                  "enum": [
                    "organization",
                    "person"
                  ],
                  "type": "string"
                }
              },
              "type": "object"
            }
          },
          {
            "in": "query",
            "name": "title",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "content",
            "schema": {
              "items": {
                "$ref": "#/components/schemas/SalesLine"
              },
              "type": "array"
            }
          },
          {
            "description": "List columns to display",
            "in": "query",
            "name": "columns",
            "schema": {
              "properties": {
                "amount": {
                  "type": "string"
                },
                "designation": {
                  "type": "string"
                },
                "discount": {
                  "type": "string"
                },
                "due": {
                  "type": "string"
                },
                "info_total_quantity": {
                  "type": "string"
                },
                "quantity": {
                  "type": "string"
                },
                "quantity_name": {
                  "type": "string"
                },
                "subtotal": {
                  "type": "string"
                },
                "vat_percent": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          },
          {
            "description": "Free variable not display in document",
            "in": "query",
            "name": "reference",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "discount",
            "schema": {
              "properties": {
                "amount": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "percent": {
                  "type": "integer"
                }
              },
              "type": "object"
            }
          },
          {
            "in": "query",
            "name": "currency",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Legal mentions",
            "in": "query",
            "name": "legal_notice",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "bank_details_id",
            "schema": {
              "nullable": true,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "vat_exemption",
            "schema": {
              "properties": {
                "article": {
                  "nullable": true,
                  "type": "string"
                },
                "exempted": {
                  "description": "specify if exempted or not",
                  "type": "boolean"
                },
                "reason": {
                  "description": "example : micro for microentrepreneur",
                  "nullable": true,
                  "type": "string"
                }
              },
              "type": "object"
            }
          },
          {
            "in": "query",
            "name": "tags",
            "schema": {
              "items": {
                "format": "string"
              },
              "nullable": true,
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "metadata",
            "schema": {
              "items": {},
              "nullable": true,
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "downpayments",
            "schema": {
              "items": {
                "type": "integer"
              },
              "nullable": true,
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "downpayment_cash",
            "schema": {
              "nullable": true,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "avoid_of",
            "schema": {
              "nullable": true,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "delivered_at",
            "schema": {
              "format": "date-time",
              "nullable": true,
              "type": "string"
            }
          },
          {
            "description": "Days count before considere this invoice as late",
            "in": "query",
            "name": "payment_period",
            "schema": {
              "default": 30,
              "nullable": true,
              "type": "integer"
            }
          },
          {
            "description": "Accepted methods of payment for this invoice. Methods comma separated",
            "in": "query",
            "name": "payment_methods",
            "schema": {
              "default": "virement bancaire, chèque",
              "type": "string"
            }
          },
          {
            "description": "Invoices imported from another software are not counted in the numbering and are not locked",
            "in": "query",
            "name": "number_from_other_software",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Create an invoice",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/apps/{appId}/invoices/batch": {
      "delete": {
        "description": "Delete many invoices",
        "operationId": "app.documents.sales.invoices.batch_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "List of invoices ID",
            "in": "query",
            "name": "ids",
            "required": true,
            "schema": {
              "items": {
                "type": "integer"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Delete many invoices",
        "tags": [
          "Invoices"
        ]
      },
      "post": {
        "description": "Create or update many invoices",
        "operationId": "app.documents.sales.invoices.batch",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "List of invoices. With ID for update, without for insert",
            "in": "query",
            "name": "data",
            "required": true,
            "schema": {
              "items": {
                "$ref": "#/components/schemas/Invoice"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Create or update many invoices",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/apps/{appId}/invoices/download": {
      "get": {
        "description": "",
        "operationId": "app.documents.sales.invoices.download",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Array of invoices id",
            "in": "query",
            "name": "ids",
            "required": true,
            "schema": {
              "items": {
                "type": "integer"
              },
              "type": "array"
            }
          },
          {
            "description": "Template name to generate document",
            "in": "query",
            "name": "template",
            "schema": {
              "enum": [
                "delivery",
                "command"
              ],
              "nullable": true,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/zip": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Download a list of invoices in pdf into a .zip file",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/apps/{appId}/invoices/fresh": {
      "post": {
        "description": "",
        "operationId": "app.documents.sales.invoices.fresh",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Array of invoices id",
            "in": "query",
            "name": "ids",
            "required": true,
            "schema": {
              "items": {
                "type": "integer"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Regenerate pdf and recalcul amounts of invoice",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/apps/{appId}/invoices/nextnumber": {
      "get": {
        "description": "",
        "operationId": "app.documents.sales.invoices.nextnumber",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Write date",
            "in": "query",
            "name": "written_at",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get the next invoice number for preview",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/apps/{appId}/invoices/statistics": {
      "get": {
        "description": "",
        "operationId": "app.documents.sales.invoices.statistics",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Obtain statistics about invoices",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/apps/{appId}/invoices/{id}": {
      "delete": {
        "description": "Remove an invoice by id : only for draft",
        "operationId": "app.documents.sales.invoices.delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of invoice",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Remove an invoice",
        "tags": [
          "Invoices"
        ]
      },
      "get": {
        "description": "Get an Sales/Invoice object by Id",
        "operationId": "app.documents.sales.invoices.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of invoice",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get an invoice",
        "tags": [
          "Invoices"
        ]
      },
      "post": {
        "description": "Update an invoice by id",
        "operationId": "app.documents.sales.invoices.update",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of invoice",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "contact_infos",
            "schema": {
              "nullable": true,
              "properties": {
                "address": {
                  "description": "Customer addresss (street number and address) obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "address2": {
                  "description": "Customer address subline obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "details": {
                  "nullable": true,
                  "type": "string"
                },
                "id": {
                  "type": "integer"
                },
                "location": {
                  "description": "Customer address location (city, postal code and country) obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "name": {
                  "description": "Customer name obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "type": {
                  "enum": [
                    "organization",
                    "person"
                  ],
                  "type": "string"
                }
              },
              "type": "object"
            }
          },
          {
            "in": "query",
            "name": "third_account",
            "schema": {
              "nullable": true,
              "properties": {
                "address": {
                  "description": "Third account addresss (street number and address) obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "id": {
                  "type": "integer"
                },
                "location": {
                  "description": "Third account address location (city, postal code and country) obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "name": {
                  "description": "Third account name obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "type": {
                  "enum": [
                    "organization",
                    "person"
                  ],
                  "type": "string"
                }
              },
              "type": "object"
            }
          },
          {
            "in": "query",
            "name": "title",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "content",
            "schema": {
              "items": {
                "$ref": "#/components/schemas/SalesLine"
              },
              "type": "array"
            }
          },
          {
            "description": "List columns to display",
            "in": "query",
            "name": "columns",
            "schema": {
              "properties": {
                "amount": {
                  "type": "string"
                },
                "designation": {
                  "type": "string"
                },
                "discount": {
                  "type": "string"
                },
                "due": {
                  "type": "string"
                },
                "info_total_quantity": {
                  "type": "string"
                },
                "quantity": {
                  "type": "string"
                },
                "quantity_name": {
                  "type": "string"
                },
                "subtotal": {
                  "type": "string"
                },
                "vat_percent": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          },
          {
            "description": "Free variable not display in document",
            "in": "query",
            "name": "reference",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "discount",
            "schema": {
              "properties": {
                "amount": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "percent": {
                  "type": "integer"
                }
              },
              "type": "object"
            }
          },
          {
            "in": "query",
            "name": "currency",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Legal mentions",
            "in": "query",
            "name": "legal_notice",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "bank_details_id",
            "schema": {
              "nullable": true,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "vat_exemption",
            "schema": {
              "properties": {
                "article": {
                  "nullable": true,
                  "type": "string"
                },
                "exempted": {
                  "description": "specify if exempted or not",
                  "type": "boolean"
                },
                "reason": {
                  "description": "example : micro for microentrepreneur",
                  "nullable": true,
                  "type": "string"
                }
              },
              "type": "object"
            }
          },
          {
            "in": "query",
            "name": "tags",
            "schema": {
              "items": {
                "format": "string"
              },
              "nullable": true,
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "metadata",
            "schema": {
              "items": {},
              "nullable": true,
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "downpayments",
            "schema": {
              "items": {
                "type": "integer"
              },
              "nullable": true,
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "downpayment_cash",
            "schema": {
              "nullable": true,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "avoid_of",
            "schema": {
              "nullable": true,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "delivered_at",
            "schema": {
              "format": "date-time",
              "nullable": true,
              "type": "string"
            }
          },
          {
            "description": "Days count before considere this invoice as late",
            "in": "query",
            "name": "payment_period",
            "schema": {
              "default": 30,
              "nullable": true,
              "type": "integer"
            }
          },
          {
            "description": "Accepted methods of payment for this invoice. Methods comma separated",
            "in": "query",
            "name": "payment_methods",
            "schema": {
              "default": "virement bancaire, chèque",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Update an invoice",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/apps/{appId}/invoices/{id}/attach": {
      "delete": {
        "description": "",
        "operationId": "app.documents.sales.invoices.detach",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Invoice id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "File to detach",
            "in": "query",
            "name": "file_id",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Detach a file at an invoice",
        "tags": [
          "Invoices"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.documents.sales.invoices.attach",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "File to attach",
            "in": "query",
            "name": "file",
            "schema": {
              "format": "binary",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Attach a file at an invoice",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/apps/{appId}/invoices/{id}/avoid": {
      "post": {
        "description": "",
        "operationId": "app.documents.sales.invoices.avoid",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Invoice id to create a credit note",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Create a creditnote on an invoice",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/apps/{appId}/invoices/{id}/duplicate": {
      "post": {
        "description": "",
        "operationId": "app.documents.sales.invoices.duplicate",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Invoice id to duplicate",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Duplicate an invoice",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/apps/{appId}/invoices/{id}/finalize": {
      "post": {
        "description": "",
        "operationId": "app.documents.sales.invoices.finalize",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Invoice id to finalize",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Automatically updates the date if earlier than the last invoice",
            "in": "query",
            "name": "force_date",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Finalize an invoice",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/apps/{appId}/invoices/{id}/pdf": {
      "get": {
        "description": "",
        "operationId": "app.documents.sales.invoices.pdf",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Invoice id to download",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Template name to generate document",
            "in": "query",
            "name": "template",
            "schema": {
              "enum": [
                "delivery",
                "command"
              ],
              "nullable": true,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/pdf": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Download the invoice as pdf",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/apps/{appId}/invoices/{id}/preview.jpg": {
      "get": {
        "description": "",
        "operationId": "app.documents.sales.invoices.preview",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Invoice id to download",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Template name to generate document",
            "in": "query",
            "name": "template",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "description": "Force the regeneration of the preview",
            "in": "query",
            "name": "disable_cache",
            "schema": {
              "nullable": true,
              "type": "boolean"
            }
          },
          {
            "description": "Get the image in base64",
            "in": "query",
            "name": "base64",
            "schema": {
              "nullable": true,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/jpeg": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Download invoice as jpeg",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/apps/{appId}/invoices/{id}/tag": {
      "delete": {
        "description": "",
        "operationId": "app.documents.sales.invoices.untag",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Invoice id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Tag to delete",
            "in": "query",
            "name": "tag",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Delete a tag on an invoice",
        "tags": [
          "Invoices"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.documents.sales.invoices.tag",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Invoice id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Tag to add",
            "in": "query",
            "name": "tag",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Add a tag on an invoice",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/apps/{appId}/invoices/{id}/updatestatus": {
      "post": {
        "description": "",
        "operationId": "app.documents.sales.invoices.updatestatus",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Invoice id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Status to update",
            "in": "query",
            "name": "status",
            "schema": {
              "enum": [
                "draft",
                "final",
                "paid"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Update the status of an invoice",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/apps/{appId}/logs/autoreconcile/": {
      "delete": {
        "description": "",
        "operationId": "app.cashflow.logsautoreconciliations.clear",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Clear autoreconciliation logs",
        "tags": [
          "hidden"
        ]
      },
      "get": {
        "description": "",
        "operationId": "app.cashflow.logsautoreconciliations.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "List autoreconciliation logs",
        "tags": [
          "hidden"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.cashflow.logsautoreconciliations.start",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Start force autoreconciliation",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/organization": {
      "get": {
        "operationId": "app.organization.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SinaoOrganization"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {
            "always_allowed": []
          }
        ],
        "summary": "Get organization profile for current app",
        "tags": [
          "Organization profile"
        ]
      },
      "post": {
        "operationId": "app.organization.update",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Company name visible on the app",
            "in": "query",
            "name": "name",
            "schema": {
              "minimum": 3,
              "pattern": "/^.*[a-z]+.*$/i",
              "type": "string"
            }
          },
          {
            "description": "Company name for billing",
            "in": "query",
            "name": "billing_name",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "logo",
            "schema": {
              "oneOf": [
                {
                  "format": "byte",
                  "type": "string"
                },
                {
                  "format": "uri",
                  "type": "string"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "legal_form",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "country_iso2",
            "schema": {
              "format": "ISO 3166-1 alpha-2",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "founding_date",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "founding_location",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dissolution_date",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "closeaccounting_period",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Unique National Id, format by country. **In France : [0-9]{9} with last number as security key.**",
            "in": "query",
            "name": "national_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "France Directory Registration : Unique national ID SIRET [0-9]{9} + 'RM' + CMA identification number [0-9a-z]{2,}",
            "in": "query",
            "name": "trade_directory_registration",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "European VAT Id. **In France : FR [0-9]{2} [0-9]{9}**",
            "in": "query",
            "name": "vat_id",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "description": "French NAF Code",
            "in": "query",
            "name": "code_naf",
            "schema": {
              "nullable": true,
              "pattern": "/^[0-9]+[a-z]$/i",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "number_of_employees",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "industry",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "slogan",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "French. Registre du Commerce et des Sociétés",
            "in": "query",
            "name": "rcs",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "French. Tribunal de commerce",
            "in": "query",
            "name": "greffe",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "NOVA agreement/registration number",
            "in": "query",
            "name": "sap_number_registration",
            "schema": {
              "nullable": true,
              "pattern": "/^SAP[0-9]{9}$/i",
              "type": "string"
            }
          },
          {
            "description": "Organisation activities displayed in annual taxes customer attestation",
            "in": "query",
            "name": "sap_activities",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "description": "NOVA agreement/registration date",
            "in": "query",
            "name": "sap_date_registration",
            "schema": {
              "nullable": true,
              "pattern": "/^[0-9]{2}\\/[0-9]{2}\\/[0-9]{4}$/i",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "capital",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SinaoOrganization"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Update organization profile for current app",
        "tags": [
          "Organization profile"
        ]
      }
    },
    "/apps/{appId}/organizations": {
      "get": {
        "description": "List all organizations",
        "operationId": "app.contacts.organizations.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ContactOrganization"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "List organizations",
        "tags": [
          "Organizations"
        ]
      },
      "post": {
        "description": "Create a contact organization. This organization will be automatically completed and updated by public data. The public profile will be automatically find by NationalID",
        "operationId": "app.contacts.organizations.create",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Company name visible on the app",
            "in": "query",
            "name": "name",
            "required": true,
            "schema": {
              "minimum": 2,
              "pattern": "/^.*[a-z0-9]+.*$/i",
              "type": "string"
            }
          },
          {
            "description": "Company name for billing",
            "in": "query",
            "name": "billing_name",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "logo",
            "schema": {
              "oneOf": [
                {
                  "format": "byte",
                  "type": "string"
                },
                {
                  "format": "uri",
                  "type": "string"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "legal_form",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "country_iso2",
            "schema": {
              "format": "ISO 3166-1 alpha-2",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "founding_date",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "founding_location",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dissolution_date",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "vat_system",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "closeaccounting_period",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Unique National Id, format by country. **In France : [0-9]{9} with last number as security key.**",
            "in": "query",
            "name": "national_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "European VAT Id. **In France : FR [0-9]{2} [0-9]{9}**",
            "in": "query",
            "name": "vat_id",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "description": "French NAF Code",
            "in": "query",
            "name": "code_naf",
            "schema": {
              "nullable": true,
              "pattern": "/^[0-9]{4}[a-z]$/i",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "number_of_employees",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "slogan",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "French. Registre du Commerce et des Sociétés",
            "in": "query",
            "name": "rcs",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "French. Tribunal de commerce",
            "in": "query",
            "name": "greffe",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "capital",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "metadata",
            "schema": {
              "items": {},
              "nullable": true,
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactOrganization"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Create an organization",
        "tags": [
          "Organizations"
        ]
      }
    },
    "/apps/{appId}/organizations/batch": {
      "post": {
        "description": "Create a contact organization. This organization will be automatically completed and updated by public data. The public profile will be automatically find by NationalID",
        "operationId": "app.contacts.organizations.batch",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "List of invoices. With ID for update, without for insert",
            "in": "query",
            "name": "data",
            "required": true,
            "schema": {
              "items": {
                "$ref": "#/components/schemas/ContactOrganization"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactOrganization"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Create multiple organizations",
        "tags": [
          "Organizations"
        ]
      }
    },
    "/apps/{appId}/organizations/{id}": {
      "delete": {
        "description": "Remove an organization",
        "operationId": "app.contacts.organizations.delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of organization",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Remove an organization",
        "tags": [
          "Organizations"
        ]
      },
      "get": {
        "description": "Get an organization by id",
        "operationId": "app.contacts.organizations.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of organization",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactOrganization"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get an organization",
        "tags": [
          "Organizations"
        ]
      },
      "post": {
        "description": "Update an organization by id",
        "operationId": "app.contacts.organizations.update",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of organization",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Company name visible on the app",
            "in": "query",
            "name": "name",
            "schema": {
              "minimum": 2,
              "pattern": "/^.*[a-z]+.*$/i",
              "type": "string"
            }
          },
          {
            "description": "Company name for billing",
            "in": "query",
            "name": "billing_name",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "logo",
            "schema": {
              "oneOf": [
                {
                  "format": "byte",
                  "type": "string"
                },
                {
                  "format": "uri",
                  "type": "string"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "legal_form",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "country_iso2",
            "schema": {
              "format": "ISO 3166-1 alpha-2",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "founding_date",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "founding_location",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dissolution_date",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "vat_system",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "closeaccounting_period",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Unique National Id, format by country. **In France : [0-9]{9} with last number as security key.**",
            "in": "query",
            "name": "national_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "European VAT Id. **In France : FR [0-9]{2} [0-9]{9}**",
            "in": "query",
            "name": "vat_id",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "description": "French NAF Code",
            "in": "query",
            "name": "code_naf",
            "schema": {
              "nullable": true,
              "pattern": "/^[0-9]{4}[a-z]$/i",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "number_of_employees",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "slogan",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "French. Registre du Commerce et des Sociétés",
            "in": "query",
            "name": "rcs",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "French. Tribunal de commerce",
            "in": "query",
            "name": "greffe",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "capital",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "metadata",
            "schema": {
              "items": {},
              "nullable": true,
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactOrganization"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Update an organization",
        "tags": [
          "Organizations"
        ]
      }
    },
    "/apps/{appId}/organizations/{id}/restore": {
      "get": {
        "description": "Restore an organization by id",
        "operationId": "app.contacts.organizations.restore",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of organization",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactOrganization"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Restore an organization",
        "tags": [
          "Organizations"
        ]
      }
    },
    "/apps/{appId}/payments": {
      "get": {
        "description": "Get list of payments",
        "operationId": "app.payments.payments.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Payment"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "List payments",
        "tags": [
          "Payments"
        ]
      }
    },
    "/apps/{appId}/payments/recipe_book": {
      "get": {
        "description": "Get a Payment object by Id",
        "operationId": "app.payments.payments.recipe_book",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get the recipe book",
        "tags": [
          "Payments"
        ]
      }
    },
    "/apps/{appId}/payments/{id}": {
      "delete": {
        "description": "Remove a payment by id",
        "operationId": "app.payments.payments.delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of quote",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Remove a payment",
        "tags": [
          "Payments"
        ]
      },
      "get": {
        "description": "Get a Payment object by Id",
        "operationId": "app.payments.payments.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of payment",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get a payment",
        "tags": [
          "Payments"
        ]
      }
    },
    "/apps/{appId}/persons": {
      "get": {
        "description": "Get all persons",
        "operationId": "app.contacts.persons.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ContactPerson"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "List persons",
        "tags": [
          "Persons"
        ]
      },
      "post": {
        "description": "Create a new person. Represent a private contact",
        "operationId": "app.contacts.persons.create",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Civility is the lastname prefix",
            "in": "query",
            "name": "civility",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "lastname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "firstname",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "picture",
            "schema": {
              "oneOf": [
                {
                  "format": "byte",
                  "type": "string"
                },
                {
                  "format": "uri",
                  "type": "string"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "metadata",
            "schema": {
              "items": {},
              "nullable": true,
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactPerson"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Create a person",
        "tags": [
          "Persons"
        ]
      }
    },
    "/apps/{appId}/persons/batch": {
      "post": {
        "description": "Create a new person. Represent a private contact",
        "operationId": "app.contacts.persons.batch",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "List of persons. With ID for update, without for insert",
            "in": "query",
            "name": "data",
            "required": true,
            "schema": {
              "items": {
                "$ref": "#/components/schemas/ContactPerson"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactPerson"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Create multiple persons",
        "tags": [
          "Persons"
        ]
      }
    },
    "/apps/{appId}/persons/{id}": {
      "delete": {
        "description": "Remove an person",
        "operationId": "app.contacts.persons.delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of person",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Remove a person",
        "tags": [
          "Persons"
        ]
      },
      "get": {
        "description": "Get a person by id",
        "operationId": "app.contacts.persons.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of a person",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactPerson"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get a person",
        "tags": [
          "Persons"
        ]
      },
      "post": {
        "description": "Update a person by id",
        "operationId": "app.contacts.persons.update",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of a person",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Civility is the lastname prefix",
            "in": "query",
            "name": "civility",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "lastname",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "firstname",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "picture",
            "schema": {
              "oneOf": [
                {
                  "format": "byte",
                  "type": "string"
                },
                {
                  "format": "uri",
                  "type": "string"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "metadata",
            "schema": {
              "items": {},
              "nullable": true,
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactPerson"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Update a person",
        "tags": [
          "Persons"
        ]
      }
    },
    "/apps/{appId}/persons/{id}/restore": {
      "get": {
        "description": "Restore a person by id",
        "operationId": "app.contacts.persons.restore",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of a person",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactPerson"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Restore a person",
        "tags": [
          "Persons"
        ]
      }
    },
    "/apps/{appId}/ping": {
      "get": {
        "description": "Try if a specific app is online",
        "operationId": "app.ping",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          },
          "405": {
            "description": "Server error"
          }
        },
        "security": [
          {},
          {
            "always_allowed": []
          }
        ],
        "summary": "Ping app web hostname",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/productcategory": {
      "get": {
        "description": "Get list of product categories",
        "operationId": "app.catalog.categories.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ProductCategory"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "List product categories",
        "tags": [
          "hidden"
        ]
      },
      "post": {
        "description": "Create a new product category",
        "operationId": "app.catalog.categories.create",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "image",
            "schema": {
              "oneOf": [
                {
                  "format": "binary",
                  "type": "string"
                },
                {
                  "format": "uri",
                  "type": "string"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "parent_category_id",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductCategory"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Create a product category",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/productcategory/{id}": {
      "delete": {
        "description": "Remove a product category by id",
        "operationId": "app.catalog.categories.delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of product category",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Remove a product category",
        "tags": [
          "hidden"
        ]
      },
      "get": {
        "description": "Get a Product category object by Id",
        "operationId": "app.catalog.categories.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of product category",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductCategory"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get a product category",
        "tags": [
          "hidden"
        ]
      },
      "post": {
        "description": "Update a product category by id",
        "operationId": "app.catalog.categories.update",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of product category",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "image",
            "schema": {
              "oneOf": [
                {
                  "format": "binary",
                  "type": "string"
                },
                {
                  "format": "uri",
                  "type": "string"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "parent_category_id",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductCategory"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Update a product category",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/products": {
      "get": {
        "description": "Get list of products",
        "operationId": "app.catalog.products.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Product"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "List products",
        "tags": [
          "Products"
        ]
      },
      "post": {
        "description": "Create a new product",
        "operationId": "app.catalog.products.create",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Price without taxes in cents",
            "in": "query",
            "name": "amount",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Price without taxes in cents / 1000",
            "in": "query",
            "name": "amount_accurately",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Taxe rate in cents",
            "in": "query",
            "name": "vat_percent",
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "image",
            "schema": {
              "oneOf": [
                {
                  "format": "binary",
                  "type": "string"
                },
                {
                  "format": "uri",
                  "type": "string"
                }
              ]
            }
          },
          {
            "description": "Product life time in seconds",
            "in": "query",
            "name": "lifetime",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Product description",
            "in": "query",
            "name": "description",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Is a service or a product ?",
            "in": "query",
            "name": "type",
            "schema": {
              "enum": [
                "product",
                "service"
              ],
              "type": "string"
            }
          },
          {
            "description": "Name of the quantity: days, liters, m2, m3...",
            "in": "query",
            "name": "quantity_name",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "reference",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "account_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "tags",
            "schema": {
              "items": {
                "format": "string"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "category_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "metadata",
            "schema": {
              "items": {},
              "nullable": true,
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Create a product",
        "tags": [
          "Products"
        ]
      }
    },
    "/apps/{appId}/products/batch": {
      "post": {
        "description": "Create a new product",
        "operationId": "app.catalog.products.batch",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "List of products. With ID for update, without for insert",
            "in": "query",
            "name": "data",
            "required": true,
            "schema": {
              "items": {
                "$ref": "#/components/schemas/Product"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Create multiple products",
        "tags": [
          "Products"
        ]
      }
    },
    "/apps/{appId}/products/{id}": {
      "delete": {
        "description": "Remove a product by id",
        "operationId": "app.catalog.products.delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of quote",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Remove a product",
        "tags": [
          "Products"
        ]
      },
      "get": {
        "description": "Get a Product object by Id",
        "operationId": "app.catalog.products.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of product",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get a product",
        "tags": [
          "Products"
        ]
      },
      "post": {
        "description": "Update a product by id",
        "operationId": "app.catalog.products.update",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of product",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "name",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Price without taxes in cents",
            "in": "query",
            "name": "amount",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Price without taxes in cents / 1000",
            "in": "query",
            "name": "amount_accurately",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Taxe rate in cents",
            "in": "query",
            "name": "vat_percent",
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "image",
            "schema": {
              "oneOf": [
                {
                  "format": "binary",
                  "type": "string"
                },
                {
                  "format": "uri",
                  "type": "string"
                }
              ]
            }
          },
          {
            "description": "Product life time in seconds",
            "in": "query",
            "name": "lifetime",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Product description",
            "in": "query",
            "name": "description",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Is a service or a product ?",
            "in": "query",
            "name": "type",
            "schema": {
              "enum": [
                "product",
                "service"
              ],
              "type": "string"
            }
          },
          {
            "description": "Name of the quantity: days, liters, m2, m3...",
            "in": "query",
            "name": "quantity_name",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "reference",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "account_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "tags",
            "schema": {
              "items": {
                "format": "string"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "category_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "metadata",
            "schema": {
              "items": {},
              "nullable": true,
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Update a product",
        "tags": [
          "Products"
        ]
      }
    },
    "/apps/{appId}/products/{id}/attach": {
      "delete": {
        "description": "",
        "operationId": "app.catalog.products.detach",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "File to detach",
            "in": "query",
            "name": "file_id",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Detach a file",
        "tags": [
          "Products"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.catalog.products.attach",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "File to attach",
            "in": "query",
            "name": "file",
            "schema": {
              "format": "binary",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Attach a file",
        "tags": [
          "Products"
        ]
      }
    },
    "/apps/{appId}/productstocks": {
      "get": {
        "description": "Get list of stocks",
        "operationId": "app.catalog.stocks.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ProductStock"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "List stocks",
        "tags": [
          "Stocks"
        ]
      },
      "post": {
        "description": "Create a new stocks",
        "operationId": "app.catalog.stocks.create",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Parent object",
            "in": "query",
            "name": "product_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Purchase that generated the stock if exists",
            "in": "query",
            "name": "purchase_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "The initial quantity will no longer be modifiable. To change the quantity manually, use the `destruct` endpoint",
            "in": "query",
            "name": "quantity",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "bar_code",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "location",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "entered_at",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "expired_at",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cost_amount",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Use duration in seconds",
            "in": "query",
            "name": "use_duration",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductStock"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Create a stocks",
        "tags": [
          "Stocks"
        ]
      }
    },
    "/apps/{appId}/productstocks/{id}": {
      "delete": {
        "description": "Remove a stocks by id",
        "operationId": "app.catalog.stocks.delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of stocks",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Remove a stocks",
        "tags": [
          "Stocks"
        ]
      },
      "get": {
        "description": "Get a Product object by Id",
        "operationId": "app.catalog.stocks.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of stocks",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductStock"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get a stocks",
        "tags": [
          "Stocks"
        ]
      },
      "post": {
        "description": "Update a stocks by id",
        "operationId": "app.catalog.stocks.update",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of stocks",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Purchase that generated the stock if exists",
            "in": "query",
            "name": "purchase_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "bar_code",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "location",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "entered_at",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "expired_at",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cost_amount",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Use duration in seconds",
            "in": "query",
            "name": "use_duration",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductStock"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Update a stocks",
        "tags": [
          "Stocks"
        ]
      }
    },
    "/apps/{appId}/productstocks/{id}/destruct": {
      "post": {
        "description": "Update a stocks by id to reduce quantity of stocks",
        "operationId": "app.catalog.stocks.destruct",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of stocks",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Quantity to destruct",
            "in": "query",
            "name": "quantity",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "comment",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductStock"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Destruct a quantity of stock (forgotten, destructed, expirated stock...)",
        "tags": [
          "Stocks"
        ]
      }
    },
    "/apps/{appId}/productstocks/{id}/rental/back": {
      "post": {
        "description": "Update the amount of stocks available through the return of rented stocks",
        "operationId": "app.catalog.stocks.rental_back",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of stocks",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Quantity to return in stocks",
            "in": "query",
            "name": "quantity",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "current_return_date",
            "schema": {
              "default": "now",
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Usage duration in seconds",
            "in": "query",
            "name": "use_duration",
            "schema": {
              "default": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "comment",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductStock"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Consider part of the stock as back",
        "tags": [
          "Stocks"
        ]
      }
    },
    "/apps/{appId}/productstocks/{id}/rental/exit": {
      "post": {
        "description": "Updates the quantity of available stocks and provides for a stocks return date",
        "operationId": "app.catalog.stocks.rental_exit",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of stocks",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Quantity to rent",
            "in": "query",
            "name": "quantity",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "future_return_date",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "comment",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductStock"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Consider part of the stock as rented",
        "tags": [
          "Stocks"
        ]
      }
    },
    "/apps/{appId}/purchases": {
      "get": {
        "description": "Get list of purchases",
        "operationId": "app.documents.purchases.purchases.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "in": "query",
            "name": "expand",
            "schema": {
              "items": {
                "enum": [
                  "account",
                  "supplier",
                  "balance"
                ],
                "type": "string"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Purchase"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "List purchases",
        "tags": [
          "Purchases"
        ]
      },
      "post": {
        "description": "Create a new purchase with an Organization. Relationship store notes, metadata and accounting settings parameters",
        "operationId": "app.documents.purchases.purchases.create",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Invoice or receipt file (pdf or image)",
            "in": "query",
            "name": "invoice",
            "schema": {
              "format": "binary",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "account_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "supplier_organization_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "title",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "supplier_name",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "amount",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "amount_tax",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "currency",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "vat_detail",
            "schema": {
              "type": "object"
            }
          },
          {
            "in": "query",
            "name": "billed_at",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "comment",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "tags",
            "schema": {
              "items": {
                "format": "string"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "vat_repayment",
            "schema": {
              "enum": [
                "payment",
                "billing"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "payment_deadline_at",
            "schema": {
              "format": "date",
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "payment_account_number",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "payment_routing_number",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "payment_swift",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "payment_iban",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Purchase"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Create a purchase",
        "tags": [
          "Purchases"
        ]
      }
    },
    "/apps/{appId}/purchases/batch": {
      "delete": {
        "description": "Delete many purchases",
        "operationId": "app.documents.purchases.purchases.batch_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "List of purchases ID",
            "in": "query",
            "name": "ids",
            "required": true,
            "schema": {
              "items": {
                "type": "integer"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Delete many purchases",
        "tags": [
          "Purchases"
        ]
      },
      "post": {
        "description": "Create or update many purchases",
        "operationId": "app.documents.purchases.purchases.batch",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "List of purchases. With ID for update, without for insert",
            "in": "query",
            "name": "data",
            "required": true,
            "schema": {
              "items": {
                "$ref": "#/components/schemas/Purchase"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Purchase"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Create or update many purchases",
        "tags": [
          "Purchases"
        ]
      }
    },
    "/apps/{appId}/purchases/download": {
      "get": {
        "description": "",
        "operationId": "app.documents.purchases.purchases.download",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Array of purchases id",
            "in": "query",
            "name": "ids",
            "required": true,
            "schema": {
              "items": {
                "type": "integer"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/zip": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Download a list of purchases in pdf into a .zip file",
        "tags": [
          "Purchases"
        ]
      }
    },
    "/apps/{appId}/purchases/statistics": {
      "get": {
        "description": "",
        "operationId": "app.documents.purchases.purchases.statistics",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Obtain statistics about purchases",
        "tags": [
          "Purchases"
        ]
      }
    },
    "/apps/{appId}/purchases/{id}": {
      "delete": {
        "description": "Remove a purchase by id",
        "operationId": "app.documents.purchases.purchases.delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of purchase",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Remove a purchase",
        "tags": [
          "Purchases"
        ]
      },
      "get": {
        "description": "Get an Purchase/Purchase object by Id",
        "operationId": "app.documents.purchases.purchases.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of purchase",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Purchase"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get a purchase",
        "tags": [
          "Purchases"
        ]
      },
      "post": {
        "description": "Update a purchase by id",
        "operationId": "app.documents.purchases.purchases.update",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of purchase",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Auto-calculated by sales_lines total",
            "in": "query",
            "name": "account_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "supplier_organization_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "title",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "supplier_name",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Auto-calculated by sales_lines total",
            "in": "query",
            "name": "amount",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "amount_tax",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "currency",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "vat_detail",
            "schema": {
              "type": "object"
            }
          },
          {
            "in": "query",
            "name": "billed_at",
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "comment",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "tags",
            "schema": {
              "items": {
                "format": "string"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "vat_repayment",
            "schema": {
              "enum": [
                "payment",
                "billing"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "payment_deadline_at",
            "schema": {
              "format": "date",
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "payment_account_number",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "payment_routing_number",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "payment_swift",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "payment_iban",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "purchase_lines",
            "schema": {
              "items": {
                "format": "object",
                "properties": {
                  "account_id": {
                    "type": "integer"
                  },
                  "amount": {
                    "type": "integer"
                  }
                }
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Purchase"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Update a purchase",
        "tags": [
          "Purchases"
        ]
      }
    },
    "/apps/{appId}/purchases/{id}/attach": {
      "delete": {
        "description": "",
        "operationId": "app.documents.purchases.purchases.detach",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Purchase id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "File to detach",
            "in": "query",
            "name": "file_id",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Detach a file at a purchase",
        "tags": [
          "Purchases"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.documents.purchases.purchases.attach",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Purchase id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "File to attach",
            "in": "query",
            "name": "file",
            "schema": {
              "format": "binary",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Attach a file at a purchase",
        "tags": [
          "Purchases"
        ]
      }
    },
    "/apps/{appId}/purchases/{id}/original": {
      "get": {
        "description": "",
        "operationId": "app.documents.purchases.purchases.original",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Purchase id to download",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/pdf": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Download the purchase as pdf",
        "tags": [
          "Purchases"
        ]
      }
    },
    "/apps/{appId}/purchases/{id}/preview.jpg": {
      "get": {
        "description": "",
        "operationId": "app.documents.purchases.purchases.preview",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Purchase id to download",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/jpeg": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Download purchase as jpeg",
        "tags": [
          "Purchases"
        ]
      }
    },
    "/apps/{appId}/purchases/{id}/tag": {
      "delete": {
        "description": "",
        "operationId": "app.documents.purchases.purchases.untag",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Purchase id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Tag to delete",
            "in": "query",
            "name": "tag",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Delete a tag on a purchase",
        "tags": [
          "Purchases"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.documents.purchases.purchases.tag",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Purchase id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Tag to add",
            "in": "query",
            "name": "tag",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Add a tag on a purchase",
        "tags": [
          "Purchases"
        ]
      }
    },
    "/apps/{appId}/purchases/{id}/thumbnail.jpg": {
      "get": {
        "description": "",
        "operationId": "app.documents.purchases.purchases.thumbnail",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Purchase id to download",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/jpeg": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Show purchase thumbnail as jpeg",
        "tags": [
          "Purchases"
        ]
      }
    },
    "/apps/{appId}/purchases/{id}/updatestatus": {
      "post": {
        "description": "",
        "operationId": "app.documents.purchases.purchases.updatestatus",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of purchase",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Status to update",
            "in": "query",
            "name": "status",
            "schema": {
              "enum": [
                "completed",
                "paid"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Update the status of an invoice",
        "tags": [
          "Purchases"
        ]
      }
    },
    "/apps/{appId}/quotes": {
      "get": {
        "description": "Get list of quotes",
        "operationId": "app.documents.sales.quotes.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Quote"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "List quotes",
        "tags": [
          "Quotes"
        ]
      },
      "post": {
        "description": "Create a new quote with an Organization or a Person. Relationship store notes, metadata and accounting settings parameters",
        "operationId": "app.documents.sales.quotes.create",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "contact_infos",
            "schema": {
              "nullable": true,
              "properties": {
                "address": {
                  "description": "Customer addresss (street number and address) obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "address2": {
                  "description": "Customer address subline obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "details": {
                  "nullable": true,
                  "type": "string"
                },
                "id": {
                  "type": "integer"
                },
                "location": {
                  "description": "Customer address location (city, postal code and country) obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "name": {
                  "description": "Customer name obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "type": {
                  "enum": [
                    "organization",
                    "person"
                  ],
                  "type": "string"
                }
              },
              "type": "object"
            }
          },
          {
            "in": "query",
            "name": "third_account",
            "schema": {
              "nullable": true,
              "properties": {
                "address": {
                  "description": "Third account addresss (street number and address) obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "id": {
                  "type": "integer"
                },
                "location": {
                  "description": "Third account address location (city, postal code and country) obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "name": {
                  "description": "Third account name obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "type": {
                  "enum": [
                    "organization",
                    "person"
                  ],
                  "type": "string"
                }
              },
              "type": "object"
            }
          },
          {
            "in": "query",
            "name": "title",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "content",
            "schema": {
              "items": {
                "$ref": "#/components/schemas/SalesLine"
              },
              "type": "array"
            }
          },
          {
            "description": "List columns to display",
            "in": "query",
            "name": "columns",
            "schema": {
              "properties": {
                "amount": {
                  "type": "string"
                },
                "designation": {
                  "type": "string"
                },
                "discount": {
                  "type": "string"
                },
                "due": {
                  "type": "string"
                },
                "info_total_quantity": {
                  "type": "string"
                },
                "quantity": {
                  "type": "string"
                },
                "quantity_name": {
                  "type": "string"
                },
                "subtotal": {
                  "type": "string"
                },
                "vat_percent": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          },
          {
            "description": "Free variable not display in document",
            "in": "query",
            "name": "reference",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "discount",
            "schema": {
              "properties": {
                "amount": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "percent": {
                  "type": "integer"
                }
              },
              "type": "object"
            }
          },
          {
            "in": "query",
            "name": "currency",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Legal mentions",
            "in": "query",
            "name": "legal_notice",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "bank_details_id",
            "schema": {
              "nullable": true,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "vat_exemption",
            "schema": {
              "properties": {
                "article": {
                  "type": "string"
                },
                "exempted": {
                  "type": "boolean"
                },
                "reason": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          },
          {
            "in": "query",
            "name": "tags",
            "schema": {
              "items": {
                "format": "string"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "metadata",
            "schema": {
              "items": {},
              "nullable": true,
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "downpayment_request",
            "schema": {
              "properties": {
                "amount": {
                  "description": "Use downpayment request value for fix downpayment",
                  "type": "integer"
                },
                "percent": {
                  "description": "Use downpayment request in percent for variable downpayment",
                  "type": "integer"
                }
              },
              "type": "object"
            }
          },
          {
            "in": "query",
            "name": "commercialvalidity_deadline",
            "schema": {
              "format": "date-time",
              "nullable": true,
              "type": "string"
            }
          },
          {
            "description": "Invoices imported from another software are not counted in the numbering and are not locked",
            "in": "query",
            "name": "number_from_other_software",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Create a quote",
        "tags": [
          "Quotes"
        ]
      }
    },
    "/apps/{appId}/quotes/batch": {
      "delete": {
        "description": "Delete many quotes",
        "operationId": "app.documents.sales.quotes.batch_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "List of quotes ID",
            "in": "query",
            "name": "ids",
            "required": true,
            "schema": {
              "items": {
                "type": "integer"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Delete many quotes",
        "tags": [
          "Quotes"
        ]
      },
      "post": {
        "description": "Create or update many quotes",
        "operationId": "app.documents.sales.quotes.batch",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "List of quotes. With ID for update, without for insert",
            "in": "query",
            "name": "data",
            "required": true,
            "schema": {
              "items": {
                "$ref": "#/components/schemas/Quote"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Create or update many quotes",
        "tags": [
          "Quotes"
        ]
      }
    },
    "/apps/{appId}/quotes/download": {
      "get": {
        "description": "",
        "operationId": "app.documents.sales.quotes.download",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Array of quotes id",
            "in": "query",
            "name": "ids",
            "required": true,
            "schema": {
              "items": {
                "type": "integer"
              },
              "type": "array"
            }
          },
          {
            "description": "Template name to generate document",
            "in": "query",
            "name": "template",
            "schema": {
              "enum": [
                "delivery",
                "command"
              ],
              "nullable": true,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/zip": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Download a list of quotes in pdf into a .zip file",
        "tags": [
          "Quotes"
        ]
      }
    },
    "/apps/{appId}/quotes/fresh": {
      "post": {
        "description": "",
        "operationId": "app.documents.sales.quotes.fresh",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Array of quotes id",
            "in": "query",
            "name": "ids",
            "required": true,
            "schema": {
              "items": {
                "type": "integer"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Regenerate pdf and recalcul amounts of quote",
        "tags": [
          "Quotes"
        ]
      }
    },
    "/apps/{appId}/quotes/invoice": {
      "post": {
        "description": "Create or update many quotes",
        "operationId": "app.documents.sales.quotes.invoices",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Array of quotes id",
            "in": "query",
            "name": "ids",
            "required": true,
            "schema": {
              "items": {
                "type": "integer"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Create or update many quotes",
        "tags": [
          "Quotes"
        ]
      }
    },
    "/apps/{appId}/quotes/nextnumber": {
      "get": {
        "description": "",
        "operationId": "app.documents.sales.quotes.nextnumber",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Write date",
            "in": "query",
            "name": "written_at",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get the next quote number for preview",
        "tags": [
          "Quotes"
        ]
      }
    },
    "/apps/{appId}/quotes/statistics": {
      "get": {
        "description": "",
        "operationId": "app.documents.sales.quotes.statistics",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Obtain statistics about quotes",
        "tags": [
          "Quotes"
        ]
      }
    },
    "/apps/{appId}/quotes/{id}": {
      "delete": {
        "description": "Remove a quote by id : only for draft",
        "operationId": "app.documents.sales.quotes.delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of quote",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Remove a quote",
        "tags": [
          "Quotes"
        ]
      },
      "get": {
        "description": "Get a Sales/Quote object by Id",
        "operationId": "app.documents.sales.quotes.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of quote",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get a quote",
        "tags": [
          "Quotes"
        ]
      },
      "post": {
        "description": "Update a quote by id",
        "operationId": "app.documents.sales.quotes.update",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of quote",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "contact_infos",
            "schema": {
              "nullable": true,
              "properties": {
                "address": {
                  "description": "Customer addresss (street number and address) obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "address2": {
                  "description": "Customer address subline obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "details": {
                  "nullable": true,
                  "type": "string"
                },
                "id": {
                  "type": "integer"
                },
                "location": {
                  "description": "Customer address location (city, postal code and country) obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "name": {
                  "description": "Customer name obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "type": {
                  "enum": [
                    "organization",
                    "person"
                  ],
                  "type": "string"
                }
              },
              "type": "object"
            }
          },
          {
            "in": "query",
            "name": "third_account",
            "schema": {
              "nullable": true,
              "properties": {
                "address": {
                  "description": "Third account addresss (street number and address) obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "id": {
                  "type": "integer"
                },
                "location": {
                  "description": "Third account address location (city, postal code and country) obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "name": {
                  "description": "Third account name obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "type": {
                  "enum": [
                    "organization",
                    "person"
                  ],
                  "type": "string"
                }
              },
              "type": "object"
            }
          },
          {
            "in": "query",
            "name": "title",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "content",
            "schema": {
              "items": {
                "$ref": "#/components/schemas/SalesLine"
              },
              "type": "array"
            }
          },
          {
            "description": "List columns to display",
            "in": "query",
            "name": "columns",
            "schema": {
              "properties": {
                "amount": {
                  "type": "string"
                },
                "designation": {
                  "type": "string"
                },
                "discount": {
                  "type": "string"
                },
                "due": {
                  "type": "string"
                },
                "info_total_quantity": {
                  "type": "string"
                },
                "quantity": {
                  "type": "string"
                },
                "quantity_name": {
                  "type": "string"
                },
                "subtotal": {
                  "type": "string"
                },
                "vat_percent": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          },
          {
            "description": "Free variable not display in document",
            "in": "query",
            "name": "reference",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "discount",
            "schema": {
              "properties": {
                "amount": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "percent": {
                  "type": "integer"
                }
              },
              "type": "object"
            }
          },
          {
            "in": "query",
            "name": "currency",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Legal mentions",
            "in": "query",
            "name": "legal_notice",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "bank_details_id",
            "schema": {
              "nullable": true,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "vat_exemption",
            "schema": {
              "properties": {
                "article": {
                  "type": "string"
                },
                "exempted": {
                  "type": "boolean"
                },
                "reason": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          },
          {
            "in": "query",
            "name": "tags",
            "schema": {
              "items": {
                "format": "string"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "metadata",
            "schema": {
              "items": {},
              "nullable": true,
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "downpayment_request",
            "schema": {
              "properties": {
                "amount": {
                  "description": "Use downpayment request value for fix downpayment",
                  "type": "integer"
                },
                "percent": {
                  "description": "Use downpayment request in percent for variable downpayment",
                  "type": "integer"
                }
              },
              "type": "object"
            }
          },
          {
            "in": "query",
            "name": "commercialvalidity_deadline",
            "schema": {
              "format": "date-time",
              "nullable": true,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Update a quote",
        "tags": [
          "Quotes"
        ]
      }
    },
    "/apps/{appId}/quotes/{id}/attach": {
      "delete": {
        "description": "",
        "operationId": "app.documents.sales.quotes.detach",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Quote id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "File to detach",
            "in": "query",
            "name": "file_id",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Detach a file at a quote",
        "tags": [
          "Quotes"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.documents.sales.quotes.attach",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Quote id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "File to attach",
            "in": "query",
            "name": "file",
            "schema": {
              "format": "binary",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Attach a file at a quote",
        "tags": [
          "Quotes"
        ]
      }
    },
    "/apps/{appId}/quotes/{id}/downpayment": {
      "post": {
        "description": "",
        "operationId": "app.documents.sales.quotes.downpayment",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Percentage of downpayment in cents (100 = 1%)",
            "in": "query",
            "name": "percent",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Transform the quote in a downpayment invoice",
        "tags": [
          "Quotes"
        ]
      }
    },
    "/apps/{appId}/quotes/{id}/duplicate": {
      "post": {
        "description": "",
        "operationId": "app.documents.sales.quotes.duplicate",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Quote id to duplicate",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Duplicate a quote",
        "tags": [
          "Quotes"
        ]
      }
    },
    "/apps/{appId}/quotes/{id}/finalize": {
      "post": {
        "description": "",
        "operationId": "app.documents.sales.quotes.finalize",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Quote id to finalize",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Finalize a quote",
        "tags": [
          "Quotes"
        ]
      }
    },
    "/apps/{appId}/quotes/{id}/invoice": {
      "post": {
        "description": "",
        "operationId": "app.documents.sales.quotes.invoice",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Quote id to transform",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Transform the quote in invoice",
        "tags": [
          "Quotes"
        ]
      }
    },
    "/apps/{appId}/quotes/{id}/pdf": {
      "get": {
        "description": "",
        "operationId": "app.documents.sales.quotes.pdf",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Quote id to download",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Template name to generate document",
            "in": "query",
            "name": "template",
            "schema": {
              "enum": [
                "delivery",
                "command"
              ],
              "nullable": true,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/pdf": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Download the quote as pdf",
        "tags": [
          "Quotes"
        ]
      }
    },
    "/apps/{appId}/quotes/{id}/preview.jpg": {
      "get": {
        "description": "",
        "operationId": "app.documents.sales.quotes.preview",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Quote id to download",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Template name to generate document",
            "in": "query",
            "name": "template",
            "schema": {
              "enum": [
                "delivery",
                "command"
              ],
              "nullable": true,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/jpeg": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Download quote as jpeg",
        "tags": [
          "Quotes"
        ]
      }
    },
    "/apps/{appId}/quotes/{id}/situation_invoice": {
      "post": {
        "description": "",
        "operationId": "app.documents.sales.quotes.situation_invoice",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Quote id to transform",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Percentage of progress in cents (100 = 1%)",
            "in": "query",
            "name": "progress",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Transform the quote into a situation invoice",
        "tags": [
          "Quotes"
        ]
      }
    },
    "/apps/{appId}/quotes/{id}/tag": {
      "delete": {
        "description": "",
        "operationId": "app.documents.sales.quotes.untag",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Quote id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Tag to delete",
            "in": "query",
            "name": "tag",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Delete a tag on a quote",
        "tags": [
          "Quotes"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.documents.sales.quotes.tag",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Quote id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Tag to add",
            "in": "query",
            "name": "tag",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Add a tag on an quote",
        "tags": [
          "Quotes"
        ]
      }
    },
    "/apps/{appId}/quotes/{id}/updatestatus": {
      "post": {
        "description": "",
        "operationId": "app.documents.sales.quotes.updatestatus",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Invoice id to finalize",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Status to update",
            "in": "query",
            "name": "status",
            "schema": {
              "enum": [
                "waiting",
                "goodforagreement",
                "refused",
                "transformed",
                "deleted"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Update the status of a quote",
        "tags": [
          "Quotes"
        ]
      }
    },
    "/apps/{appId}/quotes/{id}/yousign/preview.jpg": {
      "get": {
        "description": "",
        "operationId": "app.documents.sales.quotes.yousign_preview",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Quote id to download",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Template name to generate document",
            "in": "query",
            "name": "template",
            "schema": {
              "enum": [
                "delivery",
                "command"
              ],
              "nullable": true,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/jpeg": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "summary": "Download quote as jpeg",
        "tags": [
          "Quotes"
        ]
      }
    },
    "/apps/{appId}/reconcile": {
      "delete": {
        "description": "Remove all payments of a parent object",
        "operationId": "app.payments.reconciliation.unreconcile",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Object to unpay with this payment",
            "in": "query",
            "name": "type",
            "required": true,
            "schema": {
              "enum": [
                "transaction",
                "sales",
                "purchase"
              ],
              "type": "string"
            }
          },
          {
            "description": "Transaction, sales invoice or purchase invoice id to unreconcile",
            "in": "query",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Remove payments by an object",
        "tags": [
          "Payments"
        ]
      },
      "post": {
        "description": "Create a new payments and categorizations by one-to-many",
        "operationId": "app.payments.reconciliation.reconcile",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Remove all previous reconciliations",
            "in": "query",
            "name": "replace_all",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "description": "Object to pay with these payments and categorizations",
            "in": "query",
            "name": "type",
            "required": true,
            "schema": {
              "enum": [
                "transaction",
                "sales",
                "purchase"
              ],
              "type": "string"
            }
          },
          {
            "description": "Transaction, sales invoice or purchase invoice id to reconcile",
            "in": "query",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "movements",
            "required": true,
            "schema": {
              "description": "List of objects to reconcile with the parent object. The parent object and the children must be different, a transaction cannot be reconciled with another transaction. In this type of case, for example where a transaction was immediately refunded without going through an invoice, the transactions must be categorized in the same account",
              "properties": {
                "amount": {
                  "description": "Payment amount in cents",
                  "type": "integer"
                },
                "id": {
                  "description": "Object id -- create object when null (usefull for cashdesk or waiting entries)",
                  "type": "integer"
                },
                "type": {
                  "enum": [
                    "account",
                    "purchase",
                    "sales",
                    "bank_entry",
                    "cashdesk_entry",
                    "waiting_entry"
                  ],
                  "type": "string"
                }
              },
              "type": "object"
            }
          },
          {
            "description": "Payment date for cashdesk or waiting entries",
            "in": "query",
            "name": "paid_at",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Create an auto-reconciliation rule",
            "in": "query",
            "name": "rule",
            "schema": {
              "properties": {
                "conditions": {
                  "description": "[ [property, comparator, value], ... ]",
                  "items": {
                    "description": "[property, comparator, value]",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "type": "array"
                },
                "on_event": {
                  "description": "Event like model.event, event in [saved, created, updated, deleted]",
                  "example": "transaction.created",
                  "type": "string"
                },
                "parameter": {
                  "example": "account",
                  "type": "string"
                },
                "value": {
                  "example": "64",
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Reconcile a transaction or a document",
        "tags": [
          "Payments"
        ]
      }
    },
    "/apps/{appId}/reconcile/batch": {
      "post": {
        "description": "Create new payments and categorizations by one-to-many",
        "operationId": "app.payments.reconciliation.batch",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "array of reconciliation params",
            "in": "query",
            "name": "data",
            "required": true,
            "schema": {
              "items": {
                "$ref": "#/components/schemas/Reconciliation"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Reconcile several transactions",
        "tags": [
          "Payments"
        ]
      }
    },
    "/apps/{appId}/recurringinvoices": {
      "get": {
        "description": "",
        "operationId": "app.documents.sales.recurringinvoices.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/RecurringInvoice"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "List RecurringInvoice",
        "tags": [
          "hidden"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.documents.sales.recurringinvoices.create",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "contact_infos",
            "schema": {
              "nullable": true,
              "properties": {
                "address": {
                  "description": "Customer addresss (street number and address) obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "address2": {
                  "description": "Customer address subline obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "details": {
                  "nullable": true,
                  "type": "string"
                },
                "id": {
                  "type": "integer"
                },
                "location": {
                  "description": "Customer address location (city, postal code and country) obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "name": {
                  "description": "Customer name obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "type": {
                  "enum": [
                    "organization",
                    "person"
                  ],
                  "type": "string"
                }
              },
              "type": "object"
            }
          },
          {
            "in": "query",
            "name": "title",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "content",
            "schema": {
              "items": {
                "$ref": "#/components/schemas/SalesLine"
              },
              "nullable": true,
              "type": "array"
            }
          },
          {
            "description": "List columns to display",
            "in": "query",
            "name": "columns",
            "schema": {
              "properties": {
                "amount": {
                  "type": "string"
                },
                "designation": {
                  "type": "string"
                },
                "discount": {
                  "type": "string"
                },
                "due": {
                  "type": "string"
                },
                "info_total_quantity": {
                  "type": "string"
                },
                "quantity": {
                  "type": "string"
                },
                "quantity_name": {
                  "type": "string"
                },
                "subtotal": {
                  "type": "string"
                },
                "vat_percent": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          },
          {
            "in": "query",
            "name": "currency",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Legal mentions",
            "in": "query",
            "name": "legal_notice",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "bank_details_id",
            "schema": {
              "nullable": true,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "vat_exemption",
            "schema": {
              "properties": {
                "article": {
                  "nullable": true,
                  "type": "string"
                },
                "exempted": {
                  "type": "boolean"
                },
                "reason": {
                  "nullable": true,
                  "type": "string"
                }
              },
              "type": "object"
            }
          },
          {
            "in": "query",
            "name": "tags",
            "schema": {
              "items": {
                "format": "string"
              },
              "nullable": true,
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "metadata",
            "schema": {
              "items": {},
              "nullable": true,
              "type": "array"
            }
          },
          {
            "description": "Days count before considere this invoice as late",
            "in": "query",
            "name": "payment_period",
            "schema": {
              "default": 30,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "next_invoice_at",
            "schema": {
              "format": "date-time",
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "end_at",
            "schema": {
              "format": "date-time",
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "frequency_count",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "frequency_duration",
            "required": true,
            "schema": {
              "enum": [
                "day",
                "week",
                "month",
                "trimester",
                "semester",
                "year"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "discount",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "discount_mode",
            "schema": {
              "enum": [
                "percent"
              ],
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "discount_start_at",
            "schema": {
              "format": "date-time",
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "discount_end_at",
            "schema": {
              "format": "date-time",
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "details",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "orders_plan",
            "schema": {
              "items": {
                "properties": {
                  "end_at": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "model": {
                    "type": "integer"
                  }
                },
                "type": "object"
              },
              "nullable": true,
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecurringInvoice"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Create a RecurringInvoice",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/recurringinvoices/batch": {
      "delete": {
        "description": "Delete many RecurringInvoice",
        "operationId": "app.documents.sales.recurringinvoices.batch_delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "List of RecurringInvoice ID",
            "in": "query",
            "name": "ids",
            "required": true,
            "schema": {
              "items": {
                "type": "integer"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Delete many RecurringInvoice",
        "tags": [
          "hidden"
        ]
      },
      "post": {
        "description": "Create or update many RecurringInvoice",
        "operationId": "app.documents.sales.recurringinvoices.batch",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "List of RecurringInvoice. With ID for update, without for insert",
            "in": "query",
            "name": "data",
            "required": true,
            "schema": {
              "items": {
                "$ref": "#/components/schemas/RecurringInvoice"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecurringInvoice"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Create or update many RecurringInvoice",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/recurringinvoices/periods": {
      "get": {
        "description": "Get json of periods_formats for a date. If request parameter date is null, returns periods_formats for today.",
        "operationId": "app.documents.sales.recurringinvoices.getPeriods",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Date of the invoice",
            "in": "query",
            "name": "date",
            "required": false,
            "schema": {
              "format": "date-time",
              "nullable": true,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {},
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get json of periods_formats for a date.",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/recurringinvoices/{id}": {
      "delete": {
        "description": "",
        "operationId": "app.documents.sales.recurringinvoices.delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of RecurringInvoice",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Remove a RecurringInvoice",
        "tags": [
          "hidden"
        ]
      },
      "get": {
        "description": "",
        "operationId": "app.documents.sales.recurringinvoices.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of RecurringInvoice",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "RecurringInvoice",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecurringInvoice"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get a RecurringInvoice",
        "tags": [
          "hidden"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.documents.sales.recurringinvoices.update",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of RecurringInvoice",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "contact_infos",
            "schema": {
              "nullable": true,
              "properties": {
                "address": {
                  "description": "Customer addresss (street number and address) obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "address2": {
                  "description": "Customer address subline obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "details": {
                  "nullable": true,
                  "type": "string"
                },
                "id": {
                  "type": "integer"
                },
                "location": {
                  "description": "Customer address location (city, postal code and country) obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "name": {
                  "description": "Customer name obtained from customer object or set manually",
                  "nullable": true,
                  "type": "string"
                },
                "type": {
                  "enum": [
                    "organization",
                    "person"
                  ],
                  "type": "string"
                }
              },
              "type": "object"
            }
          },
          {
            "in": "query",
            "name": "title",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "content",
            "schema": {
              "items": {
                "$ref": "#/components/schemas/SalesLine"
              },
              "nullable": true,
              "type": "array"
            }
          },
          {
            "description": "List columns to display",
            "in": "query",
            "name": "columns",
            "schema": {
              "properties": {
                "amount": {
                  "type": "string"
                },
                "designation": {
                  "type": "string"
                },
                "discount": {
                  "type": "string"
                },
                "due": {
                  "type": "string"
                },
                "info_total_quantity": {
                  "type": "string"
                },
                "quantity": {
                  "type": "string"
                },
                "quantity_name": {
                  "type": "string"
                },
                "subtotal": {
                  "type": "string"
                },
                "vat_percent": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          },
          {
            "in": "query",
            "name": "currency",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Legal mentions",
            "in": "query",
            "name": "legal_notice",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "bank_details_id",
            "schema": {
              "nullable": true,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "vat_exemption",
            "schema": {
              "properties": {
                "article": {
                  "nullable": true,
                  "type": "string"
                },
                "exempted": {
                  "type": "boolean"
                },
                "reason": {
                  "nullable": true,
                  "type": "string"
                }
              },
              "type": "object"
            }
          },
          {
            "in": "query",
            "name": "tags",
            "schema": {
              "items": {
                "format": "string"
              },
              "nullable": true,
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "metadata",
            "schema": {
              "items": {},
              "nullable": true,
              "type": "array"
            }
          },
          {
            "description": "Days count before considere this invoice as late",
            "in": "query",
            "name": "payment_period",
            "schema": {
              "default": 30,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "next_invoice_at",
            "schema": {
              "format": "date-time",
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "end_at",
            "schema": {
              "format": "date-time",
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "frequency_count",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "frequency_duration",
            "schema": {
              "enum": [
                "day",
                "week",
                "month",
                "trimester",
                "semester",
                "year"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "discount",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "discount_mode",
            "schema": {
              "enum": [
                "percent"
              ],
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "discount_start_at",
            "schema": {
              "format": "date-time",
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "discount_end_at",
            "schema": {
              "format": "date-time",
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "details",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "orders_plan",
            "schema": {
              "items": {
                "properties": {
                  "end_at": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "model": {
                    "type": "integer"
                  }
                },
                "type": "object"
              },
              "nullable": true,
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecurringInvoice"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Update a RecurringInvoice",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/recurringinvoices/{id}/plan": {
      "get": {
        "description": "",
        "operationId": "app.documents.sales.recurringinvoices.plan",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Recurring invoice id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Until date to generate plan",
            "in": "query",
            "name": "until",
            "required": true,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Invoice"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Preview next invoices generations",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/relationships": {
      "get": {
        "description": "List all relationships",
        "operationId": "app.contacts.relationships.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Relationship"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "List relationships",
        "tags": [
          "Relationships"
        ]
      }
    },
    "/apps/{appId}/relationships/{id}": {
      "get": {
        "description": "Get a relationship by id",
        "operationId": "app.contacts.relationships.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of Relationship",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Relationship"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get a relationship",
        "tags": [
          "Relationships"
        ]
      },
      "post": {
        "description": "Update a relationship by id",
        "operationId": "app.contacts.relationships.update",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of Relationship",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "is_customer",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "is_supplier",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "is_prospect",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "importance_level",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "rating",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "balance_initial_amount",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "is_notifying",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "note",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Accounting number if it's specific",
            "in": "query",
            "name": "reference",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "tags",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "discount",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "details",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "metadata",
            "schema": {
              "items": {},
              "nullable": true,
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Relationship"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Update a relationship",
        "tags": [
          "Relationships"
        ]
      }
    },
    "/apps/{appId}/relationships/{id}/attach": {
      "delete": {
        "description": "",
        "operationId": "app.contacts.relationships.detach",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "File to detach",
            "in": "query",
            "name": "file_id",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Detach a file",
        "tags": [
          "Relationships"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.contacts.relationships.attach",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "File to attach",
            "in": "query",
            "name": "file",
            "schema": {
              "format": "binary",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Attach a file",
        "tags": [
          "Relationships"
        ]
      }
    },
    "/apps/{appId}/reset": {
      "post": {
        "description": "Reset everything",
        "operationId": "app.reset",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          },
          "405": {
            "description": "Server error"
          }
        },
        "security": [
          {},
          {},
          {
            "always_allowed": []
          }
        ],
        "summary": "Reset all data",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/rules/": {
      "get": {
        "description": "",
        "operationId": "app.rules.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Rule"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "List rules",
        "tags": [
          "hidden"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.rules.create",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "conditions",
            "schema": {
              "description": "[ [property, comparator, value], ... ]",
              "items": {
                "description": "[property, comparator, value]",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "type": "array"
            }
          },
          {
            "description": "Event like model.event, event in [saved, created, updated, deleted]",
            "in": "query",
            "name": "on_event",
            "schema": {
              "example": "transaction.created",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "parameter",
            "schema": {
              "example": "account",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "value",
            "schema": {
              "example": "64",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "priority",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Rule"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Create a rule",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/rules/execute_on": {
      "post": {
        "description": "",
        "operationId": "app.rules.execute_on",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "model",
            "schema": {
              "example": "transaction",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Rule"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Execute all rules",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/rules/{id}": {
      "delete": {
        "description": "",
        "operationId": "app.rules.delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Remove a rule",
        "tags": [
          "hidden"
        ]
      },
      "get": {
        "description": "",
        "operationId": "app.rules.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Rule"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get a rule",
        "tags": [
          "hidden"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.rules.update",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "conditions",
            "schema": {
              "description": "[ [property, comparator, value], ... ]",
              "items": {
                "description": "[property, comparator, value]",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "on_event",
            "schema": {
              "example": "transaction.creating",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "parameter",
            "schema": {
              "example": "account",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "value",
            "schema": {
              "example": "64",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "priority",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Rule"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Update a rule",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/salesdocumentmodels": {
      "get": {
        "description": "",
        "operationId": "app.documents.sales.models.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SalesDocumentModel"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "List sales documents models",
        "tags": [
          "hidden"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.documents.sales.models.create",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "name",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "title",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "content",
            "schema": {
              "items": {
                "$ref": "#/components/schemas/SalesLine"
              },
              "type": "array"
            }
          },
          {
            "description": "List columns to display",
            "in": "query",
            "name": "columns",
            "schema": {
              "properties": {
                "amount": {
                  "type": "string"
                },
                "designation": {
                  "type": "string"
                },
                "discount": {
                  "type": "string"
                },
                "due": {
                  "type": "string"
                },
                "info_total_quantity": {
                  "type": "string"
                },
                "quantity": {
                  "type": "string"
                },
                "quantity_name": {
                  "type": "string"
                },
                "subtotal": {
                  "type": "string"
                },
                "vat_percent": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDocumentModel"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Create a sales document model",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/salesdocumentmodels/{id}": {
      "delete": {
        "description": "",
        "operationId": "app.documents.sales.models.delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of SalesDocumentModel",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Remove a sales document model",
        "tags": [
          "hidden"
        ]
      },
      "get": {
        "description": "",
        "operationId": "app.documents.sales.models.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of SalesDocumentModel",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDocumentModel"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get a sales document model",
        "tags": [
          "hidden"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.documents.sales.models.update",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of SalesDocumentModel",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "name",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "title",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "content",
            "schema": {
              "items": {
                "$ref": "#/components/schemas/SalesLine"
              },
              "type": "array"
            }
          },
          {
            "description": "List columns to display",
            "in": "query",
            "name": "columns",
            "schema": {
              "properties": {
                "amount": {
                  "type": "string"
                },
                "designation": {
                  "type": "string"
                },
                "discount": {
                  "type": "string"
                },
                "due": {
                  "type": "string"
                },
                "info_total_quantity": {
                  "type": "string"
                },
                "quantity": {
                  "type": "string"
                },
                "quantity_name": {
                  "type": "string"
                },
                "subtotal": {
                  "type": "string"
                },
                "vat_percent": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDocumentModel"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Update a sales document model",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/sepamandates/": {
      "get": {
        "description": "",
        "operationId": "app.payments.sepamandates.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SEPAMandate"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "List SEPAMandate",
        "tags": [
          "Payments"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.payments.sepamandates.create",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "customer_organization_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "customer_person_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "old_mandate_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "mandate_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "signed_at",
            "required": true,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "electronic_signature",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "customer_name",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "iban",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "bic",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "is_first",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SEPAMandate"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Create a SEPAMandate",
        "tags": [
          "Payments"
        ]
      }
    },
    "/apps/{appId}/sepamandates/credittransfer": {
      "get": {
        "description": "",
        "operationId": "app.payments.sepacredittransfer.preview",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "ids",
            "required": true,
            "schema": {
              "items": {
                "type": "integer"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Preview sepa credit transfer file",
        "tags": [
          "Payments"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.payments.sepacredittransfer.download",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "ids",
            "required": true,
            "schema": {
              "items": {
                "type": "integer"
              },
              "type": "array"
            }
          },
          {
            "description": "Optional array with amounts (keys must to correspond to ids)",
            "in": "query",
            "name": "amounts",
            "schema": {
              "items": {
                "type": "integer"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "debtor_name",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "debtor_iban",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "debtor_bic",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "btchBookg",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/xml": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Preview sepa credit transfer file",
        "tags": [
          "Payments"
        ]
      }
    },
    "/apps/{appId}/sepamandates/directdebit": {
      "get": {
        "description": "",
        "operationId": "app.payments.sepadirectdebit.preview",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "invoices_ids",
            "required": true,
            "schema": {
              "items": {
                "type": "integer"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Preview sepa direct debit file",
        "tags": [
          "Payments"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.payments.sepadirectdebit.download",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "invoices_ids",
            "required": true,
            "schema": {
              "items": {
                "type": "integer"
              },
              "type": "array"
            }
          },
          {
            "description": "Optional array with amounts (keys must to correspond to invoices_ids)",
            "in": "query",
            "name": "amounts",
            "schema": {
              "items": {
                "type": "integer"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "creditor_name",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "creditor_iban",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "creditor_bic",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "creditor_ics",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "date",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/xml": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Download sepa direct debit file",
        "tags": [
          "Payments"
        ]
      }
    },
    "/apps/{appId}/sepamandates/{id}": {
      "delete": {
        "description": "",
        "operationId": "app.payments.sepamandates.delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of SEPAMandate",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Remove a SEPAMandate",
        "tags": [
          "Payments"
        ]
      },
      "get": {
        "description": "",
        "operationId": "app.payments.sepamandates.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of SEPAMandate",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SEPAMandate"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get a SEPAMandate",
        "tags": [
          "Payments"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.payments.sepamandates.update",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of SEPAMandate",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "customer_organization_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "customer_person_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "old_mandate_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "mandate_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "signed_at",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "electronic_signature",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "customer_name",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "iban",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "bic",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "is_first",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SEPAMandate"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Update a SEPAMandate",
        "tags": [
          "Payments"
        ]
      }
    },
    "/apps/{appId}/services/stripe/webhook": {
      "get": {
        "operationId": "app.services.stripe.webhook.ping",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "summary": "Ping Stripe webhook endpoint",
        "tags": [
          "hidden"
        ]
      },
      "post": {
        "operationId": "app.services.stripe.webhook.handle",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "summary": "Webhook for Stripe",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/services/yousign/webhook": {
      "post": {
        "operationId": "app.services.yousign.webhook.handle",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "summary": "Webhook for Yousign",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/settings": {
      "get": {
        "description": "Get a configuration variable by key",
        "operationId": "app.settings.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "key",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "App or key not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get app config",
        "tags": [
          "Applications"
        ]
      },
      "post": {
        "description": "General settings of an app. Can be modified in app",
        "operationId": "app.settings.update",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "settings",
            "schema": {
              "additionalProperties": {
                "type": "string"
              },
              "example": {
                "accounting.export.journals.VE": "VE",
                "accounting.template.color-primary": "#003B51"
              },
              "type": "object"
            }
          },
          {
            "in": "query",
            "name": "key",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Value can be a primitive or a file",
            "in": "query",
            "name": "value",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "App or key not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Update app config",
        "tags": [
          "Applications"
        ]
      }
    },
    "/apps/{appId}/signature": {
      "post": {
        "description": "Create a new signature",
        "operationId": "app.documents.sales.signature.create",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "documentId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "email",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "firstname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "lastname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "phone",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Create a signature",
        "tags": [
          "Signature"
        ]
      }
    },
    "/apps/{appId}/statistics/charts/{type}": {
      "get": {
        "description": "",
        "operationId": "app.statistics.charts.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "path",
            "name": "type",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "count",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "period",
            "schema": {
              "enum": [
                "hourly",
                "daily",
                "weekly",
                "monthly",
                "quarterly",
                "yearly"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "start_at",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "object",
            "schema": {
              "enum": [
                "invoice",
                "quote",
                "purchase",
                "transaction",
                "payment",
                "relationship"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "object_property",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "calcul",
            "schema": {
              "enum": [
                "sum",
                "avg",
                "count"
              ],
              "type": "string"
            }
          },
          {
            "description": "Array of [object_property, calcul]",
            "in": "query",
            "name": "methods",
            "schema": {
              "items": {
                "description": "[object_property, calcul]",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "object_date_property",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "group_by",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "group_by_object_name",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "exclude_keys",
            "schema": {
              "items": {
                "type": "integer"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "filters",
            "schema": {
              "type": "object"
            }
          },
          {
            "description": "Recovers the details of the calculations",
            "in": "query",
            "name": "show_details",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Obtain statistics about sales",
        "tags": [
          "Statistics"
        ]
      }
    },
    "/apps/{appId}/statistics/timetable/purchases": {
      "get": {
        "description": "",
        "operationId": "app.statistics.timetable.purchases",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "detailed",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "groups",
            "required": false,
            "schema": {
              "default": "[ [-730, -30], [-30, -1], [-1, 7], [7, 15], [15, 30], [30, 730] ]",
              "description": "Array of intervals in days count",
              "items": {
                "description": "Interval like [x, y] where x, y are a number of days between today. Example, to have all invoices overdue by more than 30 days but less than 60 : [-60, -30]",
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "balance": {
                        "type": "integer"
                      },
                      "count": {
                        "type": "integer"
                      },
                      "data": {
                        "items": {
                          "$ref": "#/components/schemas/Purchase"
                        },
                        "type": "array"
                      },
                      "interval": {
                        "items": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Obtain statistics about timetable purchases",
        "tags": [
          "Statistics"
        ]
      }
    },
    "/apps/{appId}/statistics/timetable/sales": {
      "get": {
        "description": "",
        "operationId": "app.statistics.timetable.sales",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "detailed",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "groups",
            "required": false,
            "schema": {
              "default": "[ [-730, -30], [-30, -1], [-1, 7], [7, 15], [15, 30], [30, 730] ]",
              "description": "Array of intervals in days count",
              "items": {
                "description": "Interval like [x, y] where x, y are a number of days between today. Example, to have all invoices overdue by more than 30 days but less than 60 : [-60, -30]",
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "balance": {
                        "type": "integer"
                      },
                      "count": {
                        "type": "integer"
                      },
                      "data": {
                        "items": {
                          "$ref": "#/components/schemas/Invoice"
                        },
                        "type": "array"
                      },
                      "interval": {
                        "items": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Obtain statistics about sales",
        "tags": [
          "Statistics"
        ]
      }
    },
    "/apps/{appId}/statistics/vat": {
      "get": {
        "description": "",
        "operationId": "app.statistics.vat.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "detailed",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "start_at",
            "required": false,
            "schema": {
              "default": "now",
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "period",
            "schema": {
              "enum": [
                "monthly",
                "quarterly",
                "half-yearly",
                "yearly"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "end_at",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Obtain statistics about vat",
        "tags": [
          "Statistics"
        ]
      }
    },
    "/apps/{appId}/subscription/anchordate": {
      "post": {
        "operationId": "app.subscription.anchordate",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {
            "always_allowed": []
          }
        ],
        "summary": "Update anchor date",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/subscription/checkout_add_source": {
      "get": {
        "operationId": "app.subscription.checkout_add_source",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {
            "always_allowed": []
          }
        ],
        "summary": "Get payment link to Stripe Checkout",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/subscription/coupon": {
      "post": {
        "operationId": "app.subscription.coupon",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "code",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {
            "always_allowed": []
          }
        ],
        "summary": "Add coupon",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/subscription/extend_trial": {
      "post": {
        "operationId": "app.subscription.extend_trial",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {
            "always_allowed": []
          }
        ],
        "summary": "Extend trial period",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/subscription/extra/{stripe_plan}": {
      "post": {
        "operationId": "app.subscription.extra_enable",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Stripe plan id to update invoice",
            "in": "path",
            "name": "stripe_plan",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {},
          {
            "always_allowed": []
          }
        ],
        "summary": "Enable plan",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/subscription/pay_all": {
      "post": {
        "operationId": "app.subscription.pay_all",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {},
          {
            "always_allowed": []
          }
        ],
        "summary": "Pay all due invoices",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/subscription/plan": {
      "delete": {
        "operationId": "app.subscription.end",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {
            "always_allowed": []
          },
          {}
        ],
        "summary": "End current plan",
        "tags": [
          "hidden"
        ]
      },
      "get": {
        "operationId": "app.subscription.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "extras": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "plans": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {
            "always_allowed": []
          }
        ],
        "summary": "Get current plan",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/subscription/plans": {
      "get": {
        "operationId": "app.subscription.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "extras": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "plans": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {
            "always_allowed": []
          }
        ],
        "summary": "Get plans",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/subscription/plans/{stripe_plan}": {
      "get": {
        "operationId": "app.subscription.upcoming",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Stripe plan id to simulate invoice",
            "in": "path",
            "name": "stripe_plan",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Stripe coupon id to simulate invoice",
            "in": "query",
            "name": "stripe_coupon",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {
            "always_allowed": []
          }
        ],
        "summary": "Simulate a plan",
        "tags": [
          "hidden"
        ]
      },
      "post": {
        "operationId": "app.subscription.pay",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Stripe plan id to update invoice",
            "in": "path",
            "name": "stripe_plan",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Stripe source to pay",
            "in": "query",
            "name": "stripe_source",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          },
          {
            "description": "Stripe coupon id to apply",
            "in": "query",
            "name": "stripe_coupon",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {},
          {
            "always_allowed": []
          }
        ],
        "summary": "Change plan",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/subscription/plans/{stripe_plan}/checkout": {
      "get": {
        "operationId": "app.subscription.checkout",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Stripe plan id to simulate invoice",
            "in": "path",
            "name": "stripe_plan",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Stripe coupon id to simulate invoice",
            "in": "query",
            "name": "stripe_coupon",
            "schema": {
              "nullable": true,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {
            "always_allowed": []
          }
        ],
        "summary": "Get payment link to Stripe Checkout",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/subscription/source": {
      "delete": {
        "operationId": "app.subscription.remove_source",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Stripe source to pay",
            "in": "query",
            "name": "stripe_source",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {
            "always_allowed": []
          }
        ],
        "summary": "Remove creditcard or sepadebit",
        "tags": [
          "hidden"
        ]
      },
      "post": {
        "operationId": "app.subscription.add_source",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Stripe source to pay",
            "in": "query",
            "name": "stripe_source",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {},
          {
            "always_allowed": []
          }
        ],
        "summary": "Add creditcard or sepadebit",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/subscription/source/default": {
      "post": {
        "operationId": "app.subscription.set_default",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Stripe source to set as default source",
            "in": "query",
            "name": "stripe_source",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {},
          {
            "always_allowed": []
          }
        ],
        "summary": "Change default source",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/tags": {
      "get": {
        "description": "",
        "operationId": "app.statistics.tags.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "object",
            "schema": {
              "enum": [
                "invoice",
                "quote",
                "purchase",
                "product"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get all existants tags",
        "tags": [
          "Statistics"
        ]
      }
    },
    "/apps/{appId}/templates": {
      "get": {
        "description": "Get all templates",
        "operationId": "app.settings.templates.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get templates",
        "tags": [
          "hidden"
        ]
      },
      "post": {
        "description": "Create a template",
        "operationId": "app.settings.templates.create",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Create a template",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/templates/batch": {
      "post": {
        "description": "Create multiple templates",
        "operationId": "app.settings.templates.batch",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "List of templates. With ID for update, without for insert",
            "in": "query",
            "name": "data",
            "required": true,
            "schema": {
              "items": {},
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Create multiple templates",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/templates/default": {
      "get": {
        "description": "Get the default template",
        "operationId": "app.settings.templates.default_template",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get default template",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/templates/{id}": {
      "get": {
        "description": "Get a template",
        "operationId": "app.settings.templates.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Automatically added",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get a template",
        "tags": [
          "hidden"
        ]
      },
      "post": {
        "description": "Update a template",
        "operationId": "app.settings.templates.update",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "Automatically added",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Update a template",
        "tags": [
          "hidden"
        ]
      }
    },
    "/apps/{appId}/transactions/": {
      "get": {
        "description": "",
        "operationId": "app.cashflow.transactions.list",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/search"
          },
          {
            "$ref": "#/components/parameters/filters"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Transaction"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "List Transaction",
        "tags": [
          "Transactions"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.cashflow.transactions.create",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "contact_organization_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "contact_person_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "account_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cashflow_source_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "contact_name",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "amount",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "method",
            "schema": {
              "enum": [
                "check",
                "transfer",
                "cash",
                "creditcard",
                "automatic_debit",
                "creditnote"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "received_at",
            "required": true,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "label",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "details",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            },
            "description": "Success"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Create a Transaction",
        "tags": [
          "Transactions"
        ]
      }
    },
    "/apps/{appId}/transactions/batch": {
      "post": {
        "description": "",
        "operationId": "app.cashflow.transactions.batch",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "List of transactions. With ID for update, without for insert",
            "in": "query",
            "name": "data",
            "required": true,
            "schema": {
              "items": {
                "$ref": "#/components/schemas/Transaction"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Create multiple transactions",
        "tags": [
          "Transactions"
        ]
      }
    },
    "/apps/{appId}/transactions/{id}": {
      "delete": {
        "description": "",
        "operationId": "app.cashflow.transactions.delete",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of Transaction",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Remove a Transaction",
        "tags": [
          "Transactions"
        ]
      },
      "get": {
        "description": "",
        "operationId": "app.cashflow.transactions.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of Transaction",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get a Transaction",
        "tags": [
          "Transactions"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.cashflow.transactions.update",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "description": "ID of Transaction",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "contact_organization_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "contact_person_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "account_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cashflow_source_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "contact_name",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "amount",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "method",
            "schema": {
              "enum": [
                "check",
                "transfer",
                "cash",
                "creditcard",
                "automatic_debit",
                "creditnote"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "received_at",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "label",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "details",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Update a Transaction",
        "tags": [
          "Transactions"
        ]
      }
    },
    "/apps/{appId}/transactions/{id}/attach": {
      "delete": {
        "description": "",
        "operationId": "app.cashflow.transactions.detach",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "File to detach",
            "in": "query",
            "name": "file_id",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Detach a file",
        "tags": [
          "Transactions"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.cashflow.transactions.attach",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "File to attach",
            "in": "query",
            "name": "file",
            "schema": {
              "format": "binary",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Attach a file",
        "tags": [
          "Transactions"
        ]
      }
    },
    "/apps/{appId}/urssaf/auth": {
      "post": {
        "description": "",
        "operationId": "app.payments.urssaftiers.auth",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "client_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "client_secret",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully logged, credentials has been saved"
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Invalid credentials"
          },
          "404": {
            "description": "App was not found"
          },
          "422": {
            "description": "All fields are required"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Login URSSAF",
        "tags": [
          "Payments"
        ]
      }
    },
    "/apps/{appId}/urssaf/payment": {
      "get": {
        "description": "",
        "operationId": "app.payments.urssaftiers.get_status",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "invoices_ids",
            "required": true,
            "schema": {
              "items": {
                "type": "integer"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get status of a payment",
        "tags": [
          "Payments"
        ]
      },
      "post": {
        "description": "",
        "operationId": "app.payments.urssaftiers.send_payments",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/xml": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Send URSSAF request payment",
        "tags": [
          "Payments"
        ]
      }
    },
    "/apps/{appId}/urssaf/preview": {
      "get": {
        "description": "",
        "operationId": "app.payments.urssaftiers.preview",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          },
          {
            "in": "query",
            "name": "type",
            "required": true,
            "schema": {
              "enum": [
                "invoice",
                "quote",
                "contact"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "ids",
            "required": true,
            "schema": {
              "items": {
                "type": "integer"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {}
        ],
        "summary": "Preview URSSAF request payment",
        "tags": [
          "Payments"
        ]
      }
    },
    "/apps/{appId}/urssaf/register_customer": {
      "post": {
        "description": "",
        "operationId": "app.payments.urssaftiers.register_customer",
        "parameters": [
          {
            "$ref": "#/components/parameters/appId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Register a person to URSSAF and create him a mandate",
        "tags": [
          "Payments"
        ]
      }
    },
    "/changepassword": {
      "post": {
        "description": "Change password by email forgotten_password_token",
        "operationId": "auth.changepassword",
        "parameters": [
          {
            "in": "query",
            "name": "forgotten_password_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Password for account",
            "in": "query",
            "name": "password",
            "required": true,
            "schema": {
              "minimum": 8,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Operation"
          },
          "422": {
            "description": "Unprocessable Entity"
          }
        },
        "security": [
          {}
        ],
        "summary": "Change password",
        "tags": [
          "hidden"
        ]
      }
    },
    "/login": {
      "post": {
        "description": "User login by email and password. Used only on Sinao API. CloudAccounting API needs a different API key",
        "operationId": "auth.login",
        "parameters": [
          {
            "description": "Email for login",
            "in": "query",
            "name": "email",
            "required": true,
            "schema": {
              "format": "email",
              "type": "string"
            }
          },
          {
            "description": "Password for login in clear text",
            "in": "query",
            "name": "password",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Operation"
          },
          "401": {
            "description": "Invalid password"
          },
          "404": {
            "description": "Email address not found"
          },
          "422": {
            "description": "No password defined"
          }
        },
        "summary": "Login",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/logout": {
      "post": {
        "description": "Log the user out (Invalidate the token)",
        "operationId": "auth.logout",
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "security": [
          {}
        ],
        "summary": "Logout",
        "tags": [
          "hidden"
        ]
      }
    },
    "/me": {
      "get": {
        "description": "Get current logged user, as `User` object",
        "operationId": "account.get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {}
        ],
        "summary": "Get current user",
        "tags": [
          "Account"
        ]
      },
      "post": {
        "description": "Update current user informations",
        "operationId": "account.update",
        "parameters": [
          {
            "in": "query",
            "name": "civility",
            "schema": {
              "minimum": 1,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "firstname",
            "schema": {
              "minimum": 2,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "lastname",
            "schema": {
              "minimum": 2,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "password",
            "schema": {
              "minimum": 8,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "email",
            "schema": {
              "format": "email",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "image",
            "schema": {
              "format": "binary",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "metadata",
            "schema": {
              "items": {},
              "nullable": true,
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {},
          {}
        ],
        "summary": "Update current user",
        "tags": [
          "Account"
        ]
      }
    },
    "/ping": {
      "get": {
        "description": "",
        "operationId": "auth.ping",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success"
          },
          "405": {
            "description": "Server error"
          }
        },
        "summary": "Ping server",
        "tags": [
          "hidden"
        ]
      }
    },
    "/refresh": {
      "get": {
        "description": "Refresh token without relogin",
        "operationId": "auth.refresh",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonWebToken"
                }
              }
            },
            "description": "Success"
          }
        },
        "security": [
          {}
        ],
        "summary": "Refresh a token",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/register": {
      "post": {
        "description": "Create a new `User` from the registration form. The user will be created without an application or access, there is nothing he can do without another step such as creating an application or inviting access",
        "operationId": "account.create",
        "parameters": [
          {
            "description": "Email is the user's login, it must not have been registered",
            "in": "query",
            "name": "email",
            "required": true,
            "schema": {
              "format": "email",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "password",
            "required": true,
            "schema": {
              "minimum": 8,
              "type": "string"
            }
          },
          {
            "description": "The user must have validated the T&Cs",
            "in": "query",
            "name": "cgu",
            "required": true,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "firstname",
            "schema": {
              "minimum": 2,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "lastname",
            "schema": {
              "minimum": 2,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "metadata",
            "schema": {
              "items": {},
              "nullable": true,
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Operation"
          },
          "422": {
            "description": "Unprocessable Entity"
          }
        },
        "security": [
          {}
        ],
        "summary": "Create an User",
        "tags": [
          "hidden"
        ]
      }
    },
    "/sendpassword": {
      "post": {
        "description": "Send a forgotten_password_token by email to recover password",
        "operationId": "auth.sendpassword",
        "parameters": [
          {
            "description": "Email for login",
            "in": "query",
            "name": "email",
            "required": true,
            "schema": {
              "format": "email",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Operation"
          },
          "422": {
            "description": "Email does not exists"
          }
        },
        "security": [
          {}
        ],
        "summary": "Password recover by email",
        "tags": [
          "hidden"
        ]
      }
    },
    "/services/collector": {
      "post": {
        "operationId": "admin.purchaseCollector.push",
        "parameters": [
          {
            "in": "query",
            "name": "app_identifiant",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "collector_key",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Invoice or receipt file (pdf or image)",
            "in": "query",
            "name": "invoice",
            "required": true,
            "schema": {
              "format": "binary",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "summary": "Push to purchase collector",
        "tags": [
          "hidden"
        ]
      }
    },
    "/services/vies/{siren}": {
      "get": {
        "operationId": "services.vies.get",
        "parameters": [
          {
            "in": "path",
            "name": "siren",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "summary": "Get VIES database informations from SIREN",
        "tags": [
          "hidden"
        ]
      }
    }
  },
  "components": {
    "parameters": {
      "appId": {
        "description": "The identifier of the Sinao application you are using. Each application corresponds to a company and an accounting. A user can have several Sinao applications. To retrieve the identifiers of its applications, you must call the endpoint `/apps`.",
        "in": "path",
        "name": "appId",
        "required": true,
        "schema": {
          "type": "integer"
        }
      },
      "establishments": {
        "description": "Update of a contact card containing the billing address of the individual and his contact information",
        "in": "query",
        "name": "establishments",
        "schema": {
          "items": {
            "properties": {
              "email": {
                "description": "Add one email",
                "type": "string"
              },
              "emails": {
                "description": "Replace all emails",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "name": {
                "type": "string"
              },
              "nic": {
                "description": "Establishment number (french NIC)",
                "pattern": "/^[0-9]{5}$/i",
                "type": "string"
              },
              "phone": {
                "description": "Add one phone",
                "type": "string"
              },
              "phones": {
                "description": "Replace all phones",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "place": {
                "properties": {
                  "administrative_area_level1": {
                    "type": "string"
                  },
                  "administrative_area_level2": {
                    "type": "string"
                  },
                  "administrative_area_level3": {
                    "type": "string"
                  },
                  "country": {
                    "type": "string"
                  },
                  "countryiso2": {
                    "type": "string"
                  },
                  "formatted_address": {
                    "description": "Address formatted for intelligent analysis by google maps",
                    "type": "string"
                  },
                  "latitude": {
                    "type": "integer"
                  },
                  "locality": {
                    "type": "string"
                  },
                  "longitude": {
                    "type": "integer"
                  },
                  "postal_code": {
                    "type": "string"
                  },
                  "route": {
                    "type": "string"
                  },
                  "route2": {
                    "type": "string"
                  },
                  "street_number": {
                    "type": "string"
                  },
                  "sublocality": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "type": "array"
        }
      },
      "filters": {
        "description": "List of filters to apply to the query.",
        "in": "query",
        "name": "filters",
        "required": false,
        "schema": {
          "items": {
            "properties": {
              "comparator": {
                "enum": [
                  "=",
                  "<",
                  ">",
                  "<=",
                  ">=",
                  "!=",
                  "LIKE",
                  "IN",
                  "REGEX"
                ],
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "value": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": "array"
        }
      },
      "headquarters": {
        "description": "Updates main establishment information (first establishment)",
        "in": "query",
        "name": "establishments",
        "schema": {
          "properties": {
            "email": {
              "description": "Add one email",
              "type": "string"
            },
            "emails": {
              "description": "Replace all emails",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "name": {
              "type": "string"
            },
            "nic": {
              "description": "Establishment number (french NIC)",
              "pattern": "/^[0-9]{5}$/i",
              "type": "string"
            },
            "phone": {
              "description": "Add one phone",
              "type": "string"
            },
            "phones": {
              "description": "Replace all phones",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "place": {
              "properties": {
                "administrative_area_level1": {
                  "type": "string"
                },
                "administrative_area_level2": {
                  "type": "string"
                },
                "administrative_area_level3": {
                  "type": "string"
                },
                "country": {
                  "type": "string"
                },
                "countryiso2": {
                  "type": "string"
                },
                "formatted_address": {
                  "description": "Address formatted for intelligent analysis by google maps",
                  "type": "string"
                },
                "latitude": {
                  "type": "integer"
                },
                "locality": {
                  "type": "string"
                },
                "longitude": {
                  "type": "integer"
                },
                "postal_code": {
                  "type": "string"
                },
                "route": {
                  "type": "string"
                },
                "route2": {
                  "type": "string"
                },
                "street_number": {
                  "type": "string"
                },
                "sublocality": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          },
          "type": "object"
        }
      },
      "limit": {
        "description": "The numbers of items to return.",
        "in": "query",
        "name": "limit",
        "required": false,
        "schema": {
          "default": 10,
          "maximum": 10000,
          "minimum": 1,
          "type": "integer"
        }
      },
      "offset": {
        "description": "The number of items to skip before starting to collect the result set.",
        "in": "query",
        "name": "offset",
        "required": false,
        "schema": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "order": {
        "description": "List in order of priority of the variables by which to order the result.",
        "in": "query",
        "name": "order",
        "required": false,
        "schema": {
          "items": {
            "properties": {
              "direction": {
                "enum": [
                  "asc",
                  "desc"
                ],
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": "array"
        }
      },
      "relationship": {
        "description": "Updates the contact's relationship information",
        "in": "query",
        "name": "relationship",
        "schema": {
          "items": {
            "properties": {
              "balance_initial_amount": {
                "nullable": true,
                "type": "integer"
              },
              "customer_id": {
                "description": "Customer accounting number",
                "nullable": true,
                "type": "string"
              },
              "importance_level": {
                "nullable": true,
                "type": "integer"
              },
              "is_customer": {
                "type": "boolean"
              },
              "is_notifying": {
                "type": "boolean"
              },
              "is_prospect": {
                "type": "boolean"
              },
              "is_supplier": {
                "type": "boolean"
              },
              "metadata": {
                "items": {},
                "nullable": true,
                "type": "array"
              },
              "note": {
                "nullable": true,
                "type": "string"
              },
              "rating": {
                "nullable": true,
                "type": "integer"
              },
              "reference": {
                "nullable": true,
                "type": "string"
              },
              "supplier_id": {
                "description": "Supplier accounting number",
                "nullable": true,
                "type": "string"
              }
            },
            "type": "object"
          },
          "nullable": true,
          "type": "object"
        }
      },
      "search": {
        "description": "A string to search for in objects.",
        "in": "query",
        "name": "search",
        "required": false,
        "schema": {
          "type": "string"
        }
      }
    },
    "schemas": {
      "AccessInvitation": {
        "properties": {
          "app": {
            "$ref": "#/components/schemas/App"
          },
          "id": {
            "type": "integer"
          },
          "profile": {
            "$ref": "#/components/schemas/PolicyProfile"
          },
          "recipient_user": {
            "$ref": "#/components/schemas/User"
          },
          "sender_user": {
            "$ref": "#/components/schemas/User"
          },
          "used_at": {
            "format": "date-time",
            "type": "string"
          },
          "validity": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Account": {
        "properties": {
          "accounting_number": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "editable": {
            "type": "boolean"
          },
          "id": {
            "type": "integer"
          },
          "is_associate": {
            "type": "boolean"
          },
          "is_cashflow": {
            "type": "boolean"
          },
          "is_purchase": {
            "type": "boolean"
          },
          "is_sales": {
            "type": "boolean"
          },
          "is_various": {
            "type": "boolean"
          },
          "journalcode": {
            "type": "string"
          },
          "keywords": {
            "description": "keywords comma separated",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "need_charge": {
            "type": "boolean"
          },
          "need_employee": {
            "type": "boolean"
          },
          "need_invoice": {
            "type": "boolean"
          },
          "technical_name": {
            "type": "string"
          }
        }
      },
      "AccountCategory": {
        "properties": {
          "description": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      },
      "ApiResponse": {
        "properties": {
          "code": {
            "type": "integer"
          },
          "message": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "App": {
        "properties": {
          "admin": {
            "$ref": "#/components/schemas/User"
          },
          "config": {
            "items": {},
            "type": "array"
          },
          "hostname_alias": {
            "description": "Specific hostname for this app. To use default URI, null this param",
            "format": "hostname",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "readOnly": true,
            "type": "integer"
          },
          "last_access_at": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "last_user": {
            "$ref": "#/components/schemas/User"
          },
          "organization": {
            "$ref": "#/components/schemas/SinaoOrganization"
          },
          "policies": {
            "items": {
              "$ref": "#/components/schemas/UserPolicy"
            },
            "type": "array"
          },
          "subscription": {
            "$ref": "#/components/schemas/Subscription"
          },
          "url": {
            "description": "URI to this app. Can be overwrited by hostname_alias param",
            "format": "uri",
            "readOnly": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "Attachment": {
        "properties": {
          "attachable_id": {
            "type": "string"
          },
          "attachable_type": {
            "type": "string"
          },
          "file_url": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Balance": {
        "properties": {
          "completed": {
            "type": "boolean"
          },
          "due": {
            "description": "Initial balance total due",
            "type": "integer"
          },
          "meaning": {
            "enum": [
              "completed",
              "remaining",
              "overpaid"
            ],
            "type": "string"
          },
          "paid": {
            "type": "integer"
          },
          "remaining": {
            "type": "integer"
          }
        }
      },
      "BankDetails": {
        "properties": {
          "bic": {
            "type": "string"
          },
          "iban": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "CashflowSource": {
        "properties": {
          "account_type": {
            "type": "string"
          },
          "balance_amount": {
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "disabled": {
            "type": "integer"
          },
          "id": {
            "type": "integer"
          },
          "identifiant": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "parent_cashflow_source": {
            "$ref": "#/components/schemas/CashflowSource"
          },
          "status": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        }
      },
      "ContactOrganization": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OrganizationIdentity"
          }
        ]
      },
      "ContactPerson": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PersonIdentity"
          }
        ]
      },
      "EstablishmentIdentity": {
        "description": "A card for an establishment contact informations",
        "properties": {
          "emails": {
            "items": {
              "format": "email",
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "description": "The identifier of the establishment can be absent if the data comes from the INSEE database. In this case, it is not editable",
            "nullable": true,
            "type": "integer"
          },
          "name": {
            "description": "Establishment name",
            "type": "string"
          },
          "nic": {
            "description": "Establishment number (french NIC)",
            "nullable": true,
            "pattern": "/^[0-9]{5}$/i",
            "type": "string"
          },
          "phones": {
            "items": {
              "format": "phone",
              "type": "string"
            },
            "type": "array"
          },
          "place": {
            "properties": {
              "administrative_area_level1": {
                "type": "string"
              },
              "administrative_area_level2": {
                "type": "string"
              },
              "administrative_area_level3": {
                "type": "string"
              },
              "country": {
                "type": "string"
              },
              "countryiso2": {
                "type": "string"
              },
              "formatted_address": {
                "description": "When obtaining data, the formatted address is automatically composed from the other properties of the object. When updating data, the formatted address can be used to automatically hydrate the other properties from Google Maps",
                "type": "string"
              },
              "id": {
                "type": "integer"
              },
              "latitude": {
                "type": "integer"
              },
              "locality": {
                "type": "string"
              },
              "longitude": {
                "type": "integer"
              },
              "postal_code": {
                "type": "string"
              },
              "route": {
                "type": "string"
              },
              "route2": {
                "type": "string"
              },
              "street_number": {
                "type": "string"
              },
              "sublocality": {
                "type": "string"
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "ExportEntity": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "entries_count": {
            "type": "integer"
          },
          "id": {
            "type": "integer"
          },
          "period_end": {
            "format": "date-time",
            "type": "string"
          },
          "period_start": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "total_credit": {
            "type": "integer"
          },
          "total_debit": {
            "type": "integer"
          },
          "updated_at": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        }
      },
      "ExportFile": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "downloaded_at": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "entries_count": {
            "type": "integer"
          },
          "file_size": {
            "type": "integer"
          },
          "file_url": {
            "type": "string"
          },
          "format": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "period_end": {
            "format": "date-time",
            "type": "string"
          },
          "period_start": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        }
      },
      "Invoice": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SalesDocumentContract"
          },
          {
            "properties": {
              "avoid_of": {
                "$ref": "#/components/schemas/Invoice"
              },
              "delivered_at": {
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "downpayments": {
                "items": {
                  "$ref": "#/components/schemas/Invoice"
                },
                "type": "array"
              },
              "invoice_of": {
                "$ref": "#/components/schemas/Quote"
              },
              "paid_at": {
                "format": "date-time",
                "type": "string"
              },
              "payment_methods": {
                "description": "Accepted methods of payment for this invoice. Methods comma separated",
                "type": "string"
              },
              "payment_period": {
                "description": "Days count before considere this invoice as late",
                "type": "integer"
              },
              "related_recurring_invoice": {
                "$ref": "#/components/schemas/RecurringInvoice"
              },
              "sepa_direct_debit_exported_at": {
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "status": {
                "enum": [
                  "draft",
                  "final",
                  "paid"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "JsonWebToken": {
        "properties": {
          "access_token": {
            "type": "string"
          },
          "expires_in": {
            "type": "integer"
          },
          "token_type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "OrganizationIdentity": {
        "properties": {
          "billing_name": {
            "description": "Company name for billing",
            "type": "string"
          },
          "capital": {
            "description": "Capital in cents",
            "type": "integer"
          },
          "closeaccounting_period": {
            "type": "string"
          },
          "code_naf": {
            "description": "French NAF Code",
            "pattern": "/^[0-9]{4}[a-z]$/i",
            "type": "string"
          },
          "country_iso2": {
            "format": "ISO 3166-1 alpha-2",
            "type": "string"
          },
          "dissolution_date": {
            "format": "date",
            "type": "string"
          },
          "establishments": {
            "description": "List of contact establishments. Some establishments come from the public database (INSEE), they cannot be edited and have no ID",
            "items": {
              "$ref": "#/components/schemas/EstablishmentIdentity"
            },
            "type": "array"
          },
          "founding_date": {
            "format": "date",
            "type": "string"
          },
          "founding_location": {
            "type": "string"
          },
          "greffe": {
            "description": "French. Tribunal de commerce",
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "legal_form": {
            "type": "string"
          },
          "logo": {
            "format": "uri",
            "type": "string"
          },
          "name": {
            "description": "Company name visible on the app",
            "type": "string"
          },
          "national_id": {
            "description": "Unique National Id, format by country. **In France : [0-9]{9} with last number as security key.**",
            "type": "string"
          },
          "number_of_employees": {
            "type": "string"
          },
          "rcs": {
            "description": "French. Registre du Commerce et des Sociétés",
            "type": "string"
          },
          "slogan": {
            "description": "Free variable",
            "type": "string"
          },
          "tax_id": {
            "description": "International Tax Id",
            "type": "string"
          },
          "vat_id": {
            "description": "European VAT Id. **In France : FR [0-9]{2} [0-9]{9}**",
            "type": "string"
          },
          "vat_system": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Payment": {
        "properties": {
          "amount": {
            "type": "integer"
          },
          "date": {
            "format": "date-time",
            "type": "string"
          },
          "document": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Invoice"
              },
              {
                "$ref": "#/components/schemas/Purchase"
              }
            ]
          },
          "document_type": {
            "enum": [
              "sales",
              "purchase"
            ],
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "source": {
            "enum": [
              "bank",
              "cashdesk",
              "creditnote"
            ],
            "type": "string"
          },
          "transaction": {
            "$ref": "#/components/schemas/Transaction"
          }
        }
      },
      "PersonIdentity": {
        "properties": {
          "civility": {
            "description": "Civility is the lastname prefix",
            "nullable": true,
            "type": "string"
          },
          "establishments": {
            "items": {
              "$ref": "#/components/schemas/EstablishmentIdentity"
            },
            "type": "array"
          },
          "firstname": {
            "type": "string"
          },
          "id": {
            "readOnly": true,
            "type": "integer"
          },
          "image": {
            "format": "uri",
            "type": "string"
          },
          "lastname": {
            "type": "string"
          },
          "metadata": {
            "items": {},
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "PolicyProfile": {
        "properties": {
          "description": {
            "type": "string"
          },
          "homepage": {
            "format": "uri",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "restricted": {
            "type": "boolean"
          },
          "rights": {
            "description": "Routes list",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "visible": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Product": {
        "properties": {
          "accounting_number": {
            "type": "string"
          },
          "amount_accurately": {
            "description": "Price without taxes in milli-cents",
            "type": "integer"
          },
          "category": {
            "$ref": "#/components/schemas/ProductCategory"
          },
          "currency": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "readOnly": true,
            "type": "integer"
          },
          "image": {
            "oneOf": [
              {
                "format": "binary",
                "type": "string"
              },
              {
                "format": "uri",
                "type": "string"
              }
            ]
          },
          "intangible": {
            "description": "Is a service or a product ?",
            "type": "boolean"
          },
          "lifetime": {
            "description": "Product life time in seconds",
            "type": "integer"
          },
          "metadata": {
            "items": {},
            "nullable": true,
            "type": "array"
          },
          "name": {
            "type": "string"
          },
          "quantity_name": {
            "description": "Name of the quantity: days, liters, m2, m3...",
            "type": "string"
          },
          "reference": {
            "type": "string"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "unity": {
            "description": "Unity, hours, days, meters, liters..",
            "type": "string"
          },
          "vat_percent": {
            "description": "VAT rate in cents",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ProductCategory": {
        "properties": {
          "id": {
            "readOnly": true,
            "type": "integer"
          },
          "image": {
            "oneOf": [
              {
                "format": "binary",
                "type": "string"
              },
              {
                "format": "uri",
                "type": "string"
              }
            ]
          },
          "name": {
            "type": "string"
          },
          "parent": {
            "$ref": "#/components/schemas/ProductCategory"
          },
          "products": {
            "$ref": "#/components/schemas/Product"
          }
        },
        "type": "object"
      },
      "ProductStock": {
        "properties": {
          "bar_code": {
            "type": "integer"
          },
          "cost_amount": {
            "type": "integer"
          },
          "entered_at": {
            "type": "integer"
          },
          "expired_at": {
            "type": "integer"
          },
          "id": {
            "readOnly": true,
            "type": "integer"
          },
          "initial_quantity": {
            "readOnly": true,
            "type": "integer"
          },
          "location": {
            "type": "integer"
          },
          "product": {
            "$ref": "#/components/schemas/Product"
          },
          "product_stocks_movements": {
            "items": {
              "$ref": "#/components/schemas/ProductStocksMovement"
            },
            "type": "array"
          },
          "purchase": {
            "$ref": "#/components/schemas/Purchase"
          },
          "quantity_in": {
            "readOnly": true,
            "type": "integer"
          },
          "quantity_out": {
            "readOnly": true,
            "type": "integer"
          },
          "sales_lines": {
            "items": {
              "$ref": "#/components/schemas/SalesLine"
            },
            "type": "array"
          },
          "use_duration": {
            "type": "integer"
          }
        }
      },
      "ProductStocksMovement": {
        "properties": {
          "description": {
            "type": "string"
          },
          "future_return_date": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "readOnly": true,
            "type": "integer"
          },
          "invoice": {
            "$ref": "#/components/schemas/Invoice"
          },
          "moved_at": {
            "format": "date-time",
            "type": "string"
          },
          "product_stock": {
            "$ref": "#/components/schemas/ProductStock"
          },
          "quantity": {
            "readOnly": true,
            "type": "integer"
          },
          "type": {
            "enum": [
              "buy",
              "sell",
              "back",
              "temporaryexit",
              "destruct"
            ],
            "readOnly": true,
            "type": "string"
          },
          "use_duration": {
            "description": "Usage duration in seconds",
            "readOnly": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Purchase": {
        "properties": {
          "account": {
            "$ref": "#/components/schemas/Account",
            "type": "object"
          },
          "accounted_at": {
            "description": "Date on which the accounting entries were generated",
            "format": "date-time",
            "type": "string"
          },
          "amount": {
            "description": "Amount without taxes in cents",
            "type": "integer"
          },
          "amount_net_foreign_currency": {
            "description": "Amount without taxes in cents",
            "readOnly": true,
            "type": "integer"
          },
          "amount_tax": {
            "description": "Amount of taxes in cents",
            "type": "integer"
          },
          "balance": {
            "$ref": "#/components/schemas/Balance",
            "type": "object"
          },
          "billed_at": {
            "description": "Date of invoice",
            "format": "date-time",
            "type": "string"
          },
          "comment": {
            "description": "free field",
            "type": "string"
          },
          "completed_at": {
            "description": "Date on which the account, supplier, amount and billed_at fields were completed",
            "format": "date-time",
            "type": "string"
          },
          "foreign_currency": {
            "description": "Amount of taxes in cents",
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "is_late": {
            "description": "The payment deadline has passed and full payment has not been received",
            "type": "boolean"
          },
          "md5": {
            "description": "Md5 hash of the initial file sent",
            "type": "string"
          },
          "paid_at": {
            "description": "Date on which the invoice was fully paid",
            "format": "date-time",
            "type": "string"
          },
          "payment_account_number": {
            "description": "Payment Account number",
            "type": "string"
          },
          "payment_deadline_at": {
            "description": "Payment deadline",
            "format": "date-time",
            "type": "string"
          },
          "payment_iban": {
            "description": "Payment IBAN",
            "type": "string"
          },
          "payment_routing_number": {
            "description": "Payment Routing number",
            "type": "string"
          },
          "payment_swift": {
            "description": "Payment SWIFT",
            "type": "string"
          },
          "picture": {
            "description": "Purchase picture",
            "type": "string"
          },
          "status": {
            "enum": [
              "new",
              "completed",
              "paid"
            ],
            "type": "string"
          },
          "supplier": {
            "$ref": "#/components/schemas/ContactOrganization",
            "type": "object"
          },
          "supplier_name": {
            "type": "string"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "title": {
            "description": "Name visible on the accounting entries of the purchase",
            "type": "string"
          },
          "vat_detail": {
            "description": "VAT breakdown",
            "type": "object"
          },
          "vat_repayment": {
            "description": "In France, depending on the type of purchase (product or service), VAT is not payable at the same time. VAT on products is due on the date of the invoice, while VAT on services is due on the date of payment thereof",
            "enum": [
              "payment",
              "billing"
            ],
            "type": "string"
          },
          "will_be_late_at": {
            "description": "Date the payment will be late. Is `false` if payment has been made",
            "format": "date-time",
            "type": "string"
          }
        }
      },
      "PurchaseLine": {
        "properties": {
          "account": {
            "$ref": "#/components/schemas/Account",
            "type": "object"
          },
          "amount": {
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "product": {
            "$ref": "#/components/schemas/Product",
            "type": "object"
          },
          "title": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        }
      },
      "Quote": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SalesDocumentContract"
          },
          {
            "properties": {
              "commercialvalidity_deadline": {
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "status": {
                "enum": [
                  "draft",
                  "waiting",
                  "goodforagreement",
                  "refused",
                  "transformed",
                  "deleted"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "Reconciliation": {
        "allOf": [
          {
            "properties": {
              "id": {
                "description": "transaction id",
                "type": "integer"
              },
              "movements": {
                "items": {
                  "properties": {
                    "amount": {
                      "description": "amount of the transaction",
                      "type": "integer"
                    },
                    "id": {
                      "description": "account id",
                      "type": "integer"
                    },
                    "type": {
                      "enum": [
                        "account"
                      ],
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "type": "array"
              },
              "replace_all": {
                "type": "boolean"
              },
              "type": {
                "enum": [
                  "transaction"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "RecurringInvoice": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SalesDocumentContract"
          },
          {
            "properties": {
              "content": {
                "items": {
                  "$ref": "#/components/schemas/SalesLine"
                },
                "type": "array"
              },
              "discount": {
                "type": "integer"
              },
              "discount_end_at": {
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "discount_mode": {
                "type": "string"
              },
              "discount_start_at": {
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "end_at": {
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "frequency_count": {
                "type": "integer"
              },
              "frequency_duration": {
                "type": "string"
              },
              "id": {
                "type": "integer"
              },
              "next_invoice_at": {
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "orders_plan": {
                "items": {
                  "properties": {
                    "end_at": {
                      "format": "date-time",
                      "nullable": true,
                      "type": "string"
                    },
                    "model": {
                      "type": "integer"
                    }
                  },
                  "type": "object"
                },
                "type": "array"
              },
              "saving_status": {
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "Relationship": {
        "properties": {
          "accounting_infos": {
            "properties": {
              "balance_initial_amount": {
                "type": "integer"
              },
              "customer_id": {
                "readOnly": true,
                "type": "string"
              },
              "reference": {
                "nullable": true,
                "type": "string"
              },
              "supplier_id": {
                "readOnly": true,
                "type": "string"
              }
            },
            "type": "object"
          },
          "id": {
            "type": "integer"
          },
          "importance_level": {
            "nullable": true,
            "type": "integer"
          },
          "is_customer": {
            "type": "boolean"
          },
          "is_notifying": {
            "type": "boolean"
          },
          "is_prospect": {
            "type": "boolean"
          },
          "is_supplier": {
            "type": "boolean"
          },
          "metadata": {
            "items": {},
            "nullable": true,
            "type": "array"
          },
          "note": {
            "nullable": true,
            "type": "string"
          },
          "rating": {
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Rule": {
        "properties": {
          "conditions": {
            "description": "[ [property, comparator, value], ... ]",
            "items": {
              "description": "[property, comparator, value]",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "type": "array"
          },
          "id": {
            "type": "integer"
          },
          "on_event": {
            "type": "string"
          },
          "parameter": {
            "type": "string"
          },
          "priority": {
            "type": "integer"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "SEPAMandate": {
        "properties": {
          "author": {
            "$ref": "#/components/schemas/User"
          },
          "bic": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "customer": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ContactPerson"
              },
              {
                "$ref": "#/components/schemas/ContactOrganization"
              }
            ]
          },
          "customer_name": {
            "type": "string"
          },
          "electronic_signature": {
            "type": "string"
          },
          "iban": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "is_first": {
            "type": "integer"
          },
          "last_debit_amount": {
            "type": "integer"
          },
          "last_debit_at": {
            "format": "date-time",
            "type": "string"
          },
          "last_debit_id": {
            "type": "integer"
          },
          "logs_sepa_direct_debits": {
            "type": "string"
          },
          "mandate_id": {
            "type": "integer"
          },
          "old_mandate_id": {
            "type": "integer"
          },
          "signed_at": {
            "format": "date-time",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        }
      },
      "SalesDocumentContract": {
        "properties": {
          "attachments": {
            "items": {
              "format": "uri",
              "type": "string"
            },
            "type": "array"
          },
          "author": {
            "$ref": "#/components/schemas/User"
          },
          "balance": {
            "$ref": "#/components/schemas/Balance"
          },
          "bank_detail": {
            "$ref": "#/components/schemas/BankDetails"
          },
          "columns": {
            "description": "Columns titles. Remove or NULL a property to hide a column",
            "properties": {
              "amount": {
                "type": "string"
              },
              "designation": {
                "type": "string"
              },
              "discount": {
                "type": "string"
              },
              "due": {
                "type": "string"
              },
              "info_total_quantity": {
                "type": "string"
              },
              "quantity": {
                "type": "string"
              },
              "quantity_name": {
                "type": "string"
              },
              "subtotal": {
                "type": "string"
              },
              "vat_percent": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "contact_infos": {
            "properties": {
              "address": {
                "description": "Customer addresss (street number and address) obtained from customer object or set manually",
                "type": "string"
              },
              "address2": {
                "description": "Customer address subline obtained from customer object or set manually",
                "type": "string"
              },
              "details": {
                "type": "string"
              },
              "id": {
                "type": "integer"
              },
              "location": {
                "description": "Customer address location (city, postal code and country) obtained from customer object or set manually",
                "type": "string"
              },
              "name": {
                "description": "Customer name obtained from customer object or set manually",
                "type": "string"
              },
              "type": {
                "enum": [
                  "organization",
                  "person"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          "content": {
            "items": {
              "$ref": "#/components/schemas/SalesLine"
            },
            "type": "array"
          },
          "currency": {
            "type": "string"
          },
          "customer": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ContactPerson"
              },
              {
                "$ref": "#/components/schemas/ContactOrganization"
              }
            ]
          },
          "discount": {
            "properties": {
              "amount": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "percent": {
                "type": "integer"
              },
              "value": {
                "description": "Value calculated by amount and percent",
                "type": "integer"
              }
            },
            "type": "object"
          },
          "downpayment_request": {
            "description": "Amount of deposit required on the quote. On an invoice, this deposit represents a cash advance to be deducted from the payment but not from the amount of the invoice",
            "properties": {
              "amount": {
                "type": "integer"
              },
              "percent": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "email_sent_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "imported_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "legal_notice": {
            "description": "Legal mentions",
            "type": "string"
          },
          "metadata": {
            "items": {},
            "nullable": true,
            "type": "array"
          },
          "note": {
            "description": "Private note",
            "nullable": true,
            "type": "string"
          },
          "number": {
            "readOnly": true,
            "type": "string"
          },
          "reference": {
            "description": "Free variable not display in document",
            "type": "string"
          },
          "tags": {
            "items": {
              "format": "string"
            },
            "type": "array"
          },
          "third_account": {
            "properties": {
              "address": {
                "description": "Third account addresss (street number and address) obtained from customer object or set manually",
                "type": "string"
              },
              "id": {
                "type": "integer"
              },
              "location": {
                "description": "Third account address location (city, postal code and country) obtained from customer object or set manually",
                "type": "string"
              },
              "name": {
                "description": "Third account name obtained from customer object or set manually",
                "type": "string"
              },
              "type": {
                "enum": [
                  "organization",
                  "person"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          "title": {
            "type": "string"
          },
          "totals": {
            "properties": {
              "due": {
                "type": "integer"
              },
              "subtotal": {
                "properties": {
                  "by_account": {
                    "items": {
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "by_vat": {
                    "items": {
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "total": {
                    "type": "integer"
                  }
                },
                "type": "object"
              },
              "taxes": {
                "properties": {
                  "total": {
                    "type": "integer"
                  },
                  "vat": {
                    "properties": {
                      "by_account": {
                        "items": {
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "by_vat": {
                        "items": {
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "total": {
                        "type": "integer"
                      }
                    },
                    "type": "object"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "validated_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "vat_exemption": {
            "properties": {
              "article": {
                "type": "string"
              },
              "exempted": {
                "type": "boolean"
              },
              "reason": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "written_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "SalesDocumentModel": {
        "properties": {
          "id": {
            "type": "integer"
          },
          "json": {
            "items": {
              "$ref": "#/components/schemas/SalesLine"
            },
            "type": "array"
          },
          "name": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        }
      },
      "SalesLine": {
        "properties": {
          "account": {
            "type": "object"
          },
          "action": {
            "enum": [
              "sell",
              "rent"
            ],
            "type": "string"
          },
          "amount": {
            "description": "Price without taxes in cents",
            "type": "integer"
          },
          "amount_accurately": {
            "description": "Price without taxes in cents + 3 decimales, example : 9899000 = 98,99€ || 1 = 0,00001€",
            "type": "integer"
          },
          "amount_with_taxes": {
            "description": "Used when there is a difference of 1 cent when starting from the amount with taxes",
            "type": "boolean"
          },
          "detail": {
            "description": "Description of the product or service",
            "type": "string"
          },
          "discount": {
            "properties": {
              "amount": {
                "description": "Use discount value for fix discount",
                "type": "integer"
              },
              "percent": {
                "description": "Use discount percent for variable discount",
                "type": "integer"
              }
            },
            "type": "object"
          },
          "document": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Invoice"
              },
              {
                "$ref": "#/components/schemas/Quote"
              }
            ]
          },
          "id": {
            "type": "integer"
          },
          "metadata": {
            "items": {},
            "nullable": true,
            "type": "array"
          },
          "product": {
            "$ref": "#/components/schemas/Product"
          },
          "quantity": {
            "description": "Quantity of product or service",
            "format": "double",
            "type": "number"
          },
          "stock": {
            "$ref": "#/components/schemas/ProductStock"
          },
          "style": {
            "properties": {
              "position": {
                "type": "integer"
              },
              "section_id": {
                "description": "Section is an Order with a position like SectionId",
                "type": "integer"
              },
              "type": {
                "enum": [
                  "section",
                  "description",
                  "product"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          "total_quantity": {
            "description": "Information about total quantity to sell, only for display",
            "type": "string"
          },
          "totals": {
            "properties": {
              "due": {
                "type": "integer"
              },
              "subtotal": {
                "type": "integer"
              },
              "taxes": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "unity": {
            "description": "Unity, hours, days, meters, liters..",
            "type": "string"
          },
          "vat_percent": {
            "description": "VAT rate in cents",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "SinaoOrganization": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OrganizationIdentity"
          },
          {
            "properties": {
              "app": {
                "$ref": "#/components/schemas/App"
              }
            },
            "type": "object"
          }
        ]
      },
      "Subscription": {
        "properties": {
          "access_level": {
            "enum": [
              "full",
              "start",
              "pro",
              "restricted"
            ],
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "readOnly": true,
            "type": "integer"
          },
          "payment_card": {
            "readOnly": true,
            "type": "string"
          },
          "payment_failed_count": {
            "readOnly": true,
            "type": "integer"
          },
          "period_ending_date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "period_remaining_days": {
            "readOnly": true,
            "type": "integer"
          },
          "period_starting_date": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "plan_color": {
            "readOnly": true,
            "type": "string"
          },
          "plan_name": {
            "readOnly": true,
            "type": "string"
          },
          "status": {
            "readOnly": true,
            "type": "string"
          },
          "stripe_customer_id": {
            "readOnly": true,
            "type": "string"
          },
          "stripe_plan_id": {
            "readOnly": true,
            "type": "string"
          },
          "stripe_subscription_id": {
            "readOnly": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "Transaction": {
        "properties": {
          "amount": {
            "type": "integer"
          },
          "author": {
            "$ref": "#/components/schemas/User"
          },
          "cashflow_source": {
            "$ref": "#/components/schemas/CashflowSource"
          },
          "contact": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ContactPerson"
              },
              {
                "$ref": "#/components/schemas/ContactOrganization"
              }
            ]
          },
          "created_at": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "deleted_at": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "details": {
            "type": "integer"
          },
          "id": {
            "type": "integer"
          },
          "label": {
            "type": "integer"
          },
          "lettered_at": {
            "format": "date-time",
            "type": "string"
          },
          "metadata": {
            "items": {},
            "nullable": true,
            "type": "array"
          },
          "method": {
            "type": "integer"
          },
          "received_at": {
            "format": "date-time",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        }
      },
      "URSSAFMandate": {
        "properties": {
          "bic": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "iban": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "updated_at": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          }
        }
      },
      "User": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PersonIdentity"
          },
          {
            "properties": {
              "created_at": {
                "format": "date-time",
                "readOnly": true,
                "type": "string"
              },
              "email": {
                "description": "Email used as login",
                "format": "email",
                "readOnly": true,
                "type": "string"
              },
              "id": {
                "readOnly": true,
                "type": "integer"
              },
              "last_access_at": {
                "format": "date-time",
                "readOnly": true,
                "type": "string"
              },
              "metadata": {
                "items": {},
                "nullable": true,
                "type": "array"
              },
              "password": {
                "format": "password",
                "minLength": 8,
                "type": "string",
                "writeOnly": true
              },
              "password_is_undefined": {
                "readOnly": true,
                "type": "boolean"
              },
              "updated_at": {
                "format": "date-time",
                "readOnly": true,
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      },
      "UserPolicy": {
        "properties": {
          "app": {
            "$ref": "#/components/schemas/App"
          },
          "policy_profile": {
            "$ref": "#/components/schemas/PolicyProfile"
          },
          "user": {
            "$ref": "#/components/schemas/User"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "always_allowed": {
        "scheme": "basic",
        "type": "http"
      },
      "api_key": {
        "scheme": "bearer",
        "type": "http"
      },
      "is_admin": {
        "scheme": "basic",
        "type": "http"
      }
    }
  }
}
    Sinao API MCP Server - APIFold Marketplace | APIFold