From 8291bb6360f42a0eb864805a3a8f26fd1a6221a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Garc=C3=ADa?= Date: Fri, 19 Sep 2025 13:18:14 +0200 Subject: [PATCH 01/18] feat: dolibarr swagger json --- forms-bridge/addons/dolibarr/swagger.json | 18297 ++++++++++++++++ .../holded/data/swagger/accounting.json | 355 +- .../addons/holded/data/swagger/crm.json | 5987 +++-- .../addons/holded/data/swagger/invoicing.json | 12699 +++++++---- .../addons/holded/data/swagger/projects.json | 4136 +++- .../addons/holded/data/swagger/team.json | 999 +- 6 files changed, 35916 insertions(+), 6557 deletions(-) create mode 100644 forms-bridge/addons/dolibarr/swagger.json diff --git a/forms-bridge/addons/dolibarr/swagger.json b/forms-bridge/addons/dolibarr/swagger.json new file mode 100644 index 00000000..e2bfc83f --- /dev/null +++ b/forms-bridge/addons/dolibarr/swagger.json @@ -0,0 +1,18297 @@ +{ + "swagger": "2.0", + "host": "erp-test-femfeina.somnuvol.coop", + "basePath": "/api/index.php", + "produces": ["application/json", "application/xml"], + "consumes": ["application/json", "application/xml", "multipart/form-data"], + "paths": { + "/accountancy/exportdata": { + "get": { + "operationId": "accountancyExportData", + "tags": ["accountancy"], + "parameters": [ + { + "name": "period", + "type": "string", + "description": "Period : 'lastmonth', 'currentmonth', 'last3months', 'last6months', 'currentyear', 'lastyear', 'fiscalyear', 'lastfiscalyear', 'actualandlastfiscalyear' or 'custom' (see above)", + "in": "query", + "required": true + }, + { + "name": "date_min", + "type": "string", + "description": "[=''] Start date of period if 'custom' is set in period parameter Date format is 'YYYY-MM-DD'", + "in": "query", + "required": false + }, + { + "name": "date_max", + "type": "string", + "description": "[=''] End date of period if 'custom' is set in period parameter Date format is 'YYYY-MM-DD'", + "in": "query", + "required": false + }, + { + "name": "format", + "type": "string", + "description": "[=''] by default uses '1' for 'Configurable (CSV)' for format number or '1000' for FEC or '1010' for FEC2 (see AccountancyExport class)", + "in": "query", + "required": false + }, + { + "name": "lettering", + "type": "integer", + "format": "int64", + "description": "[=0] by default don't export or 1 to export lettering data (columns 'letterring_code' and 'date_lettering' returns empty or not)", + "in": "query", + "required": false + }, + { + "name": "alreadyexport", + "type": "integer", + "format": "int64", + "description": "[=0] by default export data only if it's not yet exported or 1 already exported (always export data even if 'date_export\" is set)", + "in": "query", + "required": false + }, + { + "name": "notnotifiedasexport", + "type": "integer", + "format": "int64", + "description": "[=0] by default notified as exported or 1 not notified as exported (when the export is done, notified or not the column 'date_export')", + "in": "query", + "required": false + } + ], + "summary": "Accountancy export data 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Insufficient rights" + }, + "404": { + "description": "Accountancy export format not found" + }, + "500": { + "description": "Error on accountancy export" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/agendaevents/{id}": { + "get": { + "operationId": "retrieveAgendaevents", + "tags": ["agendaevents"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of Agenda Events", + "in": "path", + "required": true + } + ], + "summary": "Get properties of a Agenda Events object 🔐", + "description": "Return an array with Agenda Events information", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "put": { + "operationId": "updateAgendaevents", + "tags": ["agendaevents"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of Agenda Event to update", + "in": "path", + "required": true + }, + { + "name": "updateAgendaeventsModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/updateAgendaeventsModel" + } + } + ], + "summary": "Update Agenda Event general fields 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "removeAgendaevents", + "tags": ["agendaevents"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Agenda Event ID", + "in": "path", + "required": true + } + ], + "summary": "Delete Agenda Event 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/agendaevents": { + "get": { + "operationId": "listAgendaevents", + "tags": ["agendaevents"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "t.id", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + }, + { + "name": "user_ids", + "type": "string", + "description": "User ids filter field (owners of event). Example: '1' or '1,2,3'", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.label:like:'%dol%') and (t.datec:<:'20160101')\"", + "in": "query", + "required": false + }, + { + "name": "properties", + "type": "string", + "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", + "in": "query", + "required": false + } + ], + "summary": "List Agenda Events 🔐", + "description": "Get a list of Agenda Events", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "createAgendaevents", + "tags": ["agendaevents"], + "parameters": [ + { + "name": "createAgendaeventsModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/createAgendaeventsModel" + } + } + ], + "summary": "Create Agenda Event object 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/bankaccounts": { + "get": { + "operationId": "listBankaccounts", + "tags": ["bankaccounts"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "t.rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + }, + { + "name": "category", + "type": "integer", + "format": "int64", + "description": "Use this param to filter list by category", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.import_key:<:'20160101')\"", + "in": "query", + "required": false + }, + { + "name": "properties", + "type": "string", + "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", + "in": "query", + "required": false + } + ], + "summary": "Get the list of accounts. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "createBankaccounts", + "tags": ["bankaccounts"], + "parameters": [ + { + "name": "createBankaccountsModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/createBankaccountsModel" + } + } + ], + "summary": "Create account object 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/bankaccounts/{id}": { + "get": { + "operationId": "retrieveBankaccounts", + "tags": ["bankaccounts"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of account", + "in": "path", + "required": true + } + ], + "summary": "Get account by ID. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "put": { + "operationId": "updateBankaccounts", + "tags": ["bankaccounts"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of account", + "in": "path", + "required": true + }, + { + "name": "updateBankaccountsModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/updateBankaccountsModel" + } + } + ], + "summary": "Update account 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "removeBankaccounts", + "tags": ["bankaccounts"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of account", + "in": "path", + "required": true + } + ], + "summary": "Delete account 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/bankaccounts/transfer": { + "post": { + "operationId": "bankaccountsTransfer", + "tags": ["bankaccounts"], + "parameters": [ + { + "name": "bankaccountsTransferModel", + "description": "bankaccount_from_id \nbankaccount_to_id \ndate \ndescription \namount \namount_to \ncheque_number \n", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/bankaccountsTransferModel" + } + } + ], + "summary": "Create an internal wire transfer between two bank accounts 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "401": { + "description": "Unauthorized: User does not have permission to configure bank accounts" + }, + "404": { + "description": "Not Found: Either the source or the destination bankaccount for the provided id does not exist" + }, + "500": { + "description": "Internal Server Error: Error(s) returned by the RDBMS" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/bankaccounts/{id}/lines": { + "get": { + "operationId": "bankaccountsRetrieveLines", + "tags": ["bankaccounts"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of account", + "in": "path", + "required": true + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.import_key:<:'20160101')\"", + "in": "query", + "required": false + } + ], + "summary": "Get the list of lines of the account. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "bankaccountsAddLine", + "tags": ["bankaccounts"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of account", + "in": "path", + "required": true + }, + { + "name": "bankaccountsAddLineModel", + "description": "**date** (required) \n**type** (required) \n**label** (required) \n**amount** (required) \ncategory \ncheque_number \ncheque_writer \ncheque_bank \naccountancycode \ndatev \nnum_releve \n", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/bankaccountsAddLineModel" + } + } + ], + "summary": "Add a line to an account 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/bankaccounts/{id}/lines/{line_id}/links": { + "post": { + "operationId": "bankaccountsAddLink", + "tags": ["bankaccounts"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of account", + "in": "path", + "required": true + }, + { + "name": "line_id", + "type": "integer", + "format": "int64", + "description": "ID of account line", + "in": "path", + "required": true + }, + { + "name": "bankaccountsAddLinkModel", + "description": "**url_id** (required) \n**url** (required) \n**label** (required) \n**type** (required) \n", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/bankaccountsAddLinkModel" + } + } + ], + "summary": "Add a link to an account line 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "get": { + "operationId": "bankaccountsRetrieveLinks", + "tags": ["bankaccounts"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of account", + "in": "path", + "required": true + }, + { + "name": "line_id", + "type": "integer", + "format": "int64", + "description": "ID of account line", + "in": "path", + "required": true + } + ], + "summary": "Get the list of links for a line of the account. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/bankaccounts/{id}/lines/{line_id}": { + "put": { + "operationId": "bankaccountsUpdateLine", + "tags": ["bankaccounts"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of account", + "in": "path", + "required": true + }, + { + "name": "line_id", + "type": "integer", + "format": "int64", + "description": "ID of account line", + "in": "path", + "required": true + }, + { + "name": "bankaccountsUpdateLineModel", + "description": "**label** (required) \n", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/bankaccountsUpdateLineModel" + } + } + ], + "summary": "Update an account line 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "bankaccountsRemoveLine", + "tags": ["bankaccounts"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of account", + "in": "path", + "required": true + }, + { + "name": "line_id", + "type": "integer", + "format": "int64", + "description": "ID of account line", + "in": "path", + "required": true + } + ], + "summary": "Delete an account line 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/boms/{id}": { + "get": { + "operationId": "retrieveBoms", + "tags": ["boms"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of bom", + "in": "path", + "required": true + } + ], + "summary": "Get properties of a bom object 🔐", + "description": "Return an array with bom information", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "403": { + "description": "Access denied" + }, + "404": { + "description": "BOM not found" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "put": { + "operationId": "updateBoms", + "tags": ["boms"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of bom to update", + "in": "path", + "required": true + }, + { + "name": "updateBomsModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/updateBomsModel" + } + } + ], + "summary": "Update bom 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "403": { + "description": "Access denied" + }, + "404": { + "description": "BOM not found" + }, + "500": { + "description": "Error updating bom" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "removeBoms", + "tags": ["boms"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "BOM ID", + "in": "path", + "required": true + } + ], + "summary": "Delete bom 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "403": { + "description": "Access denied" + }, + "404": { + "description": "BOM not found" + }, + "500": { + "description": "Error deleting bom" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/boms": { + "get": { + "operationId": "listBoms", + "tags": ["boms"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "t.rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')\"", + "in": "query", + "required": false + }, + { + "name": "properties", + "type": "string", + "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", + "in": "query", + "required": false + } + ], + "summary": "List boms 🔐", + "description": "Get a list of boms", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad sqlfilters" + }, + "403": { + "description": "Access denied" + }, + "503": { + "description": "Error retrieving list of boms" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "createBoms", + "tags": ["boms"], + "parameters": [ + { + "name": "createBomsModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/createBomsModel" + } + } + ], + "summary": "Create bom object 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "403": { + "description": "Access denied" + }, + "500": { + "description": "Error retrieving list of boms" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/boms/{id}/lines": { + "get": { + "operationId": "bomsRetrieveLines", + "tags": ["boms"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of BOM", + "in": "path", + "required": true + } + ], + "summary": "Get lines of an BOM 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "403": { + "description": "Access denied" + }, + "404": { + "description": "BOM not found" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "bomsCreateLine", + "tags": ["boms"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of BOM to update", + "in": "path", + "required": true + }, + { + "name": "bomsCreateLineModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/bomsCreateLineModel" + } + } + ], + "summary": "Add a line to given BOM 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "403": { + "description": "Access denied" + }, + "404": { + "description": "BOM not found" + }, + "500": { + "description": "Error adding bom line" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/boms/{id}/lines/{lineid}": { + "put": { + "operationId": "bomsUpdateLine", + "tags": ["boms"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of BOM to update", + "in": "path", + "required": true + }, + { + "name": "lineid", + "type": "integer", + "format": "int64", + "description": "Id of line to update", + "in": "path", + "required": true + }, + { + "name": "bomsUpdateLineModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/bomsUpdateLineModel" + } + } + ], + "summary": "Update a line to given BOM 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "403": { + "description": "Access denied" + }, + "404": { + "description": "BOM not found" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "bomsRemoveLine", + "tags": ["boms"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of BOM to update", + "in": "path", + "required": true + }, + { + "name": "lineid", + "type": "integer", + "format": "int64", + "description": "Id of line to delete", + "in": "path", + "required": true + } + ], + "summary": "Delete a line to given BOM 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "403": { + "description": "Access denied" + }, + "404": { + "description": "BOM not found" + }, + "500": { + "description": "Error deleting bom line" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/categories/{id}": { + "get": { + "operationId": "retrieveCategories", + "tags": ["categories"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of category", + "in": "path", + "required": true + }, + { + "name": "include_childs", + "type": "boolean", + "description": "Include child categories list (true or false)", + "in": "query", + "required": false + } + ], + "summary": "Get properties of a category object 🔐", + "description": "Return an array with category information", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "put": { + "operationId": "updateCategories", + "tags": ["categories"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of category to update", + "in": "path", + "required": true + }, + { + "name": "updateCategoriesModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/updateCategoriesModel" + } + } + ], + "summary": "Update category 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "removeCategories", + "tags": ["categories"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Category ID", + "in": "path", + "required": true + } + ], + "summary": "Delete category 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/categories": { + "get": { + "operationId": "listCategories", + "tags": ["categories"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "t.rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + }, + { + "name": "type", + "type": "string", + "description": "Type of category ('member', 'customer', 'supplier', 'product', 'contact', 'actioncomm')", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')\"", + "in": "query", + "required": false + }, + { + "name": "properties", + "type": "string", + "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", + "in": "query", + "required": false + } + ], + "summary": "List categories 🔐", + "description": "Get a list of categories", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "createCategories", + "tags": ["categories"], + "parameters": [ + { + "name": "createCategoriesModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/createCategoriesModel" + } + } + ], + "summary": "Create category object 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/categories/object/{type}/{id}": { + "get": { + "operationId": "categoriesRetrieveListForObject", + "tags": ["categories"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Object ID", + "in": "path", + "required": true + }, + { + "name": "type", + "type": "string", + "description": "Type of category ('member', 'customer', 'supplier', 'product', 'contact', 'project', 'actioncomm')", + "in": "path", + "required": true + }, + { + "name": "sortfield", + "type": "string", + "defaultValue": "s.rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + } + ], + "summary": "List categories of an object 🔐", + "description": "Get the list of categories linked to an object", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/categories/{id}/objects/{type}/{object_id}": { + "post": { + "operationId": "categoriesLinkObjectById", + "tags": ["categories"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of category", + "in": "path", + "required": true + }, + { + "name": "type", + "type": "string", + "description": "Type of category ('member', 'customer', 'supplier', 'product', 'contact', 'actioncomm')", + "in": "path", + "required": true + }, + { + "name": "object_id", + "type": "integer", + "format": "int64", + "description": "ID of object", + "in": "path", + "required": true + } + ], + "summary": "Link an object to a category by id 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "categoriesUnlinkObjectById", + "tags": ["categories"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of category", + "in": "path", + "required": true + }, + { + "name": "type", + "type": "string", + "description": "Type of category ('member', 'customer', 'supplier', 'product', 'contact', 'actioncomm')", + "in": "path", + "required": true + }, + { + "name": "object_id", + "type": "integer", + "format": "int64", + "description": "ID of the object", + "in": "path", + "required": true + } + ], + "summary": "Unlink an object from a category by id 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/categories/{id}/objects/{type}/ref/{object_ref}": { + "post": { + "operationId": "categoriesLinkObjectByRef", + "tags": ["categories"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of category", + "in": "path", + "required": true + }, + { + "name": "type", + "type": "string", + "description": "Type of category ('member', 'customer', 'supplier', 'product', 'contact')", + "in": "path", + "required": true + }, + { + "name": "object_ref", + "type": "string", + "description": "Reference of object", + "in": "path", + "required": true + } + ], + "summary": "Link an object to a category by ref 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "categoriesUnlinkObjectByRef", + "tags": ["categories"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of category", + "in": "path", + "required": true + }, + { + "name": "type", + "type": "string", + "description": "Type of category ('member', 'customer', 'supplier', 'product', 'contact', 'actioncomm')", + "in": "path", + "required": true + }, + { + "name": "object_ref", + "type": "string", + "description": "Reference of the object", + "in": "path", + "required": true + } + ], + "summary": "Unlink an object from a category by ref 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/categories/{id}/objects": { + "get": { + "operationId": "categoriesRetrieveObjects", + "tags": ["categories"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of category", + "in": "path", + "required": true + }, + { + "name": "type", + "type": "string", + "description": "Type of category ('member', 'customer', 'supplier', 'product', 'contact', 'project')", + "in": "query", + "required": true + }, + { + "name": "onlyids", + "type": "integer", + "format": "int64", + "description": "Return only ids of objects (consume less memory)", + "in": "query", + "required": false + } + ], + "summary": "Get the list of objects in a category. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/contacts/{id}": { + "get": { + "operationId": "retrieveContacts", + "tags": ["contacts"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of contact", + "in": "path", + "required": true + }, + { + "name": "includecount", + "type": "integer", + "format": "int64", + "description": "Count and return also number of elements the contact is used as a link for", + "in": "query", + "required": false + }, + { + "name": "includeroles", + "type": "integer", + "format": "int64", + "description": "Includes roles of the contact", + "in": "query", + "required": false + } + ], + "summary": "Get properties of a contact object 🔐", + "description": "Return an array with contact information", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "put": { + "operationId": "updateContacts", + "tags": ["contacts"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of contact to update", + "in": "path", + "required": true + }, + { + "name": "updateContactsModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/updateContactsModel" + } + } + ], + "summary": "Update contact 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "Internal Server Error" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "removeContacts", + "tags": ["contacts"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Contact ID", + "in": "path", + "required": true + } + ], + "summary": "Delete contact 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/contacts/email/{email}": { + "get": { + "operationId": "contactsRetrieveByEmail", + "tags": ["contacts"], + "parameters": [ + { + "name": "email", + "type": "string", + "description": "Email of contact", + "in": "path", + "required": true + }, + { + "name": "includecount", + "type": "integer", + "format": "int64", + "description": "Count and return also number of elements the contact is used as a link for", + "in": "query", + "required": false + }, + { + "name": "includeroles", + "type": "integer", + "format": "int64", + "description": "Includes roles of the contact", + "in": "query", + "required": false + } + ], + "summary": "Get properties of a contact object by Email 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Insufficient rights" + }, + "404": { + "description": "User or group not found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/contacts": { + "get": { + "operationId": "listContacts", + "tags": ["contacts"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "t.rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + }, + { + "name": "thirdparty_ids", + "type": "string", + "description": "Thirdparty ids to filter contacts of (example '1' or '1,2,3')", + "in": "query", + "required": false + }, + { + "name": "category", + "type": "integer", + "format": "int64", + "description": "Use this param to filter list by category", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')\"", + "in": "query", + "required": false + }, + { + "name": "includecount", + "type": "integer", + "format": "int64", + "description": "Count and return also number of elements the contact is used as a link for", + "in": "query", + "required": false + }, + { + "name": "includeroles", + "type": "integer", + "format": "int64", + "description": "Includes roles of the contact", + "in": "query", + "required": false + }, + { + "name": "properties", + "type": "string", + "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", + "in": "query", + "required": false + } + ], + "summary": "List contacts 🔐", + "description": "Get a list of contacts", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "createContacts", + "tags": ["contacts"], + "parameters": [ + { + "name": "createContactsModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/createContactsModel" + } + } + ], + "summary": "Create contact object 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/contacts/{id}/createUser": { + "post": { + "operationId": "contactsCreateUser", + "tags": ["contacts"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of contact", + "in": "path", + "required": true + }, + { + "name": "contactsCreateUserModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/contactsCreateUserModel" + } + } + ], + "summary": "Create an user account object from contact (external user) 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/contacts/{id}/categories": { + "get": { + "operationId": "contactsRetrieveCategories", + "tags": ["contacts"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of contact", + "in": "path", + "required": true + }, + { + "name": "sortfield", + "type": "string", + "defaultValue": "s.rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + } + ], + "summary": "Get categories for a contact 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/contacts/{id}/categories/{category_id}": { + "put": { + "operationId": "contactsAddCategory", + "tags": ["contacts"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of contact", + "in": "path", + "required": true + }, + { + "name": "category_id", + "type": "integer", + "format": "int64", + "description": "Id of category", + "in": "path", + "required": true + } + ], + "summary": "Add a category to a contact 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Insufficient rights" + }, + "404": { + "description": "Category or contact not found" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "contactsRemoveCategory", + "tags": ["contacts"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of contact", + "in": "path", + "required": true + }, + { + "name": "category_id", + "type": "integer", + "format": "int64", + "description": "Id of category", + "in": "path", + "required": true + } + ], + "summary": "Remove the link between a category and a contact 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "500": { + "description": "404 Category or contact not found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/documents/download": { + "get": { + "operationId": "listDocuments", + "tags": ["documents"], + "parameters": [ + { + "name": "modulepart", + "type": "string", + "description": "Name of module or area concerned by file download ('facture', ...)", + "in": "query", + "required": true + }, + { + "name": "original_file", + "type": "string", + "description": "Relative path with filename, relative to modulepart (for example: IN201701-999/IN201701-999.pdf)", + "in": "query", + "required": false + } + ], + "summary": "Download a document. 🔐", + "description": " Note that, this API is similar to using the wrapper link \"documents.php\" to download a file (used for internal HTML links of documents into application), but with no need to have a session cookie (the token is used instead).", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad value for parameter modulepart or original_file" + }, + "403": { + "description": "Access denied" + }, + "404": { + "description": "File not found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/documents/builddoc": { + "put": { + "operationId": "documentsBuilddoc", + "tags": ["documents"], + "parameters": [ + { + "name": "documentsBuilddocModel", + "description": "**modulepart** (required) \noriginal_file \ndoctemplate \nlangcode \n", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/documentsBuilddocModel" + } + } + ], + "summary": "Build a document. 🔐", + "description": " Test sample 1: { \"modulepart\": \"invoice\", \"original_file\": \"FA1701-001/FA1701-001.pdf\", \"doctemplate\": \"crabe\", \"langcode\": \"fr_FR\" }. Supported modules: invoice, order, proposal, contract, shipment", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad value for parameter modulepart or original_file" + }, + "403": { + "description": "Access denied" + }, + "404": { + "description": "Invoice, Order, Proposal, Contract or Shipment not found" + }, + "500": { + "description": "Error generating document" + }, + "501": { + "description": "File not found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/documents": { + "get": { + "operationId": "documentsRetrieveDocumentsListByElement", + "tags": ["documents"], + "parameters": [ + { + "name": "modulepart", + "type": "string", + "description": "Name of module or area concerned ('thirdparty', 'member', 'proposal', 'order', 'invoice', 'supplier_invoice', 'shipment', 'project', ...)", + "in": "query", + "required": true + }, + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of element", + "in": "query", + "required": false + }, + { + "name": "ref", + "type": "string", + "description": "Ref of element", + "in": "query", + "required": false + }, + { + "name": "sortfield", + "type": "string", + "description": "Sort criteria ('','fullname','relativename','name','date','size')", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "description": "Sort order ('asc' or 'desc')", + "in": "query", + "required": false + } + ], + "summary": "Return the list of documents of a dedicated element (from its ID or Ref) 🔐", + "description": "Supported modules: thirdparty, user, member, proposal, order, supplier_order, shipment, invoice, supplier_invoice, product, event, expensereport, knowledgemanagement, category, contract", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad value for parameter modulepart, id or ref" + }, + "403": { + "description": "Access denied" + }, + "404": { + "description": "Thirdparty, User, Member, Order, Invoice or Proposal not found" + }, + "500": { + "description": "Error while fetching object" + }, + "503": { + "description": "Error when retrieve ecm list" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "removeDocuments", + "tags": ["documents"], + "parameters": [ + { + "name": "modulepart", + "type": "string", + "description": "Name of module or area concerned by file download ('product', ...)", + "in": "query", + "required": true + }, + { + "name": "original_file", + "type": "string", + "description": "Relative path with filename, relative to modulepart (for example: PRODUCT-REF-999/IMAGE-999.jpg)", + "in": "query", + "required": true + } + ], + "summary": "Delete a document. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad value for parameter original_file" + }, + "403": { + "description": "Access denied" + }, + "404": { + "description": "File not found" + }, + "500": { + "description": "Error on file operation" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/documents/upload": { + "post": { + "operationId": "createDocuments", + "tags": ["documents"], + "parameters": [ + { + "name": "createDocumentsModel", + "description": "**filename** (required) \n**modulepart** (required) \nref \nsubdir \nfilecontent \nfileencoding \noverwriteifexists \ncreatedirifnotexists \n", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/createDocumentsModel" + } + } + ], + "summary": "Upload a document. 🔐", + "description": " Test sample for invoice: { \"filename\": \"mynewfile.txt\", \"modulepart\": \"invoice\", \"ref\": \"FA1701-001\", \"subdir\": \"\", \"filecontent\": \"content text\", \"fileencoding\": \"\", \"overwriteifexists\": \"0\" }. Test sample for supplier invoice: { \"filename\": \"mynewfile.txt\", \"modulepart\": \"supplier_invoice\", \"ref\": \"FA1701-001\", \"subdir\": \"\", \"filecontent\": \"content text\", \"fileencoding\": \"\", \"overwriteifexists\": \"0\" }. Test sample for medias file: { \"filename\": \"mynewfile.txt\", \"modulepart\": \"medias\", \"ref\": \"\", \"subdir\": \"image/mywebsite\", \"filecontent\": \"Y29udGVudCB0ZXh0Cg==\", \"fileencoding\": \"base64\", \"overwriteifexists\": \"0\" }. Supported modules: invoice, order, supplier_order, task/project_task, product/service, expensereport, fichinter, member, propale, agenda, contact", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "Bad Request" + }, + "403": { + "description": "Access denied" + }, + "404": { + "description": "Object not found" + }, + "500": { + "description": "Error on file operationw" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/donations/{id}": { + "get": { + "operationId": "retrieveDonations", + "tags": ["donations"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of order", + "in": "path", + "required": true + } + ], + "summary": "Get properties of an donation object 🔐", + "description": "Return an array with donation information", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "put": { + "operationId": "updateDonations", + "tags": ["donations"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of order to update", + "in": "path", + "required": true + }, + { + "name": "updateDonationsModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/updateDonationsModel" + } + } + ], + "summary": "Update order general fields (won't touch lines of order) 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "removeDonations", + "tags": ["donations"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Order ID", + "in": "path", + "required": true + } + ], + "summary": "Delete donation 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/donations": { + "get": { + "operationId": "listDonations", + "tags": ["donations"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "t.rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + }, + { + "name": "thirdparty_ids", + "type": "string", + "description": "Thirdparty ids to filter orders of (example '1' or '1,2,3')", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')\"", + "in": "query", + "required": false + }, + { + "name": "properties", + "type": "string", + "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", + "in": "query", + "required": false + } + ], + "summary": "List donations 🔐", + "description": "Get a list of donations", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "createDonations", + "tags": ["donations"], + "parameters": [ + { + "name": "createDonationsModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/createDonationsModel" + } + } + ], + "summary": "Create donation object 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/donations/{id}/validate": { + "post": { + "operationId": "donationsValidate", + "tags": ["donations"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Order ID", + "in": "path", + "required": true + }, + { + "name": "donationsValidateModel", + "description": "idwarehouse \nnotrigger \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/donationsValidateModel" + } + } + ], + "summary": "Validate an donation 🔐", + "description": "If you get a bad value for param notrigger check, provide this in body { \"idwarehouse\": 0, \"notrigger\": 0 }", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "304": { + "description": "Not Modified" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "System error" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/expensereports/{id}": { + "get": { + "operationId": "retrieveExpensereports", + "tags": ["expensereports"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of Expense Report", + "in": "path", + "required": true + } + ], + "summary": "Get properties of an Expense Report 🔐", + "description": "Return an array with Expense Report information", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "put": { + "operationId": "updateExpensereports", + "tags": ["expensereports"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of Expense Report to update", + "in": "path", + "required": true + }, + { + "name": "updateExpensereportsModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/updateExpensereportsModel" + } + } + ], + "summary": "Update Expense Report general fields (won't touch lines of expensereport) 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "401": { + "description": "Not allowed" + }, + "500": { + "description": "System error" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "removeExpensereports", + "tags": ["expensereports"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Expense Report ID", + "in": "path", + "required": true + } + ], + "summary": "Delete Expense Report 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/expensereports": { + "get": { + "operationId": "listExpensereports", + "tags": ["expensereports"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "t.rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + }, + { + "name": "user_ids", + "type": "string", + "description": "User ids filter field. Example: '1' or '1,2,3'", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')\"", + "in": "query", + "required": false + }, + { + "name": "properties", + "type": "string", + "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", + "in": "query", + "required": false + } + ], + "summary": "List Expense Reports 🔐", + "description": "Get a list of Expense Reports", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "createExpensereports", + "tags": ["expensereports"], + "parameters": [ + { + "name": "createExpensereportsModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/createExpensereportsModel" + } + } + ], + "summary": "Create Expense Report object 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/expensereports/payments": { + "get": { + "operationId": "expensereportsRetrieveAllPayments", + "tags": ["expensereports"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "t.rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + } + ], + "summary": "Get the list of payments of expensereport. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/expensereports/payments/{pid}": { + "get": { + "operationId": "expensereportsRetrievePayments", + "tags": ["expensereports"], + "parameters": [ + { + "name": "pid", + "type": "integer", + "format": "int64", + "description": "Payment ID", + "in": "path", + "required": true + } + ], + "summary": "Get a given payment. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/expensereports/{id}/payments": { + "post": { + "operationId": "expensereportsAddPayment", + "tags": ["expensereports"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of expense report", + "in": "path", + "required": true + }, + { + "name": "expensereportsAddPaymentModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/expensereportsAddPaymentModel" + } + } + ], + "summary": "Create payment of ExpenseReport 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "put": { + "operationId": "expensereportsUpdatePayment", + "tags": ["expensereports"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of paymentExpenseReport", + "in": "path", + "required": true + }, + { + "name": "expensereportsUpdatePaymentModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/expensereportsUpdatePaymentModel" + } + } + ], + "summary": "Update a payment of ExpenseReport 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/interventions/{id}": { + "get": { + "operationId": "retrieveInterventions", + "tags": ["interventions"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of Expense Report", + "in": "path", + "required": true + } + ], + "summary": "Get properties of a Expense Report object Return an array with Expense Report information 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "removeInterventions", + "tags": ["interventions"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Order ID", + "in": "path", + "required": true + } + ], + "summary": "Delete order 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/interventions": { + "get": { + "operationId": "listInterventions", + "tags": ["interventions"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "t.rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + }, + { + "name": "thirdparty_ids", + "type": "string", + "description": "Thirdparty ids to filter orders of (example '1' or '1,2,3')", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')\"", + "in": "query", + "required": false + }, + { + "name": "properties", + "type": "string", + "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", + "in": "query", + "required": false + } + ], + "summary": "List of interventions Return a list of interventions 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "createInterventions", + "tags": ["interventions"], + "parameters": [ + { + "name": "createInterventionsModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/createInterventionsModel" + } + } + ], + "summary": "Create intervention object 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/interventions/{id}/lines": { + "post": { + "operationId": "interventionsCreateLine", + "tags": ["interventions"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of intervention to update", + "in": "path", + "required": true + }, + { + "name": "interventionsCreateLineModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/interventionsCreateLineModel" + } + } + ], + "summary": "Add a line to a given intervention 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/interventions/{id}/validate": { + "post": { + "operationId": "interventionsValidate", + "tags": ["interventions"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Intervention ID", + "in": "path", + "required": true + }, + { + "name": "interventionsValidateModel", + "description": "notrigger \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/interventionsValidateModel" + } + } + ], + "summary": "Validate an intervention 🔐", + "description": "If you get a bad value for param notrigger check, provide this in body { \"notrigger\": 0 }", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/interventions/{id}/close": { + "post": { + "operationId": "interventionsCloseFichinter", + "tags": ["interventions"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Intervention ID", + "in": "path", + "required": true + } + ], + "summary": "Close an intervention 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/invoices/{id}": { + "get": { + "operationId": "retrieveInvoices", + "tags": ["invoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of invoice", + "in": "path", + "required": true + }, + { + "name": "contact_list", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "description": "0:Return array contains all properties, 1:Return array contains just id, -1: Do not return contacts/adddesses", + "in": "query", + "required": false + } + ], + "summary": "Get properties of a invoice object 🔐", + "description": "Return an array with invoice information", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "put": { + "operationId": "updateInvoices", + "tags": ["invoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of invoice to update", + "in": "path", + "required": true + }, + { + "name": "updateInvoicesModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/updateInvoicesModel" + } + } + ], + "summary": "Update invoice 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "removeInvoices", + "tags": ["invoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Invoice ID", + "in": "path", + "required": true + } + ], + "summary": "Delete invoice 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/invoices/ref/{ref}": { + "get": { + "operationId": "invoicesRetrieveByRef", + "tags": ["invoices"], + "parameters": [ + { + "name": "ref", + "type": "string", + "description": "Ref of object", + "in": "path", + "required": true + }, + { + "name": "contact_list", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "description": "0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id, -1: Do not return contacts/adddesses", + "in": "query", + "required": false + } + ], + "summary": "Get properties of an invoice object by ref 🔐", + "description": "Return an array with invoice information", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/invoices/ref_ext/{ref_ext}": { + "get": { + "operationId": "invoicesRetrieveByRefExt", + "tags": ["invoices"], + "parameters": [ + { + "name": "ref_ext", + "type": "string", + "description": "External reference of object", + "in": "path", + "required": true + }, + { + "name": "contact_list", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "description": "0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id, -1: Do not return contacts/adddesses", + "in": "query", + "required": false + } + ], + "summary": "Get properties of an invoice object by ref_ext 🔐", + "description": "Return an array with invoice information", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/invoices": { + "get": { + "operationId": "listInvoices", + "tags": ["invoices"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "t.rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + }, + { + "name": "thirdparty_ids", + "type": "string", + "description": "Thirdparty ids to filter orders of (example '1' or '1,2,3')", + "in": "query", + "required": false + }, + { + "name": "status", + "type": "string", + "description": "Filter by invoice status : draft | unpaid | paid | cancelled", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')\"", + "in": "query", + "required": false + }, + { + "name": "properties", + "type": "string", + "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", + "in": "query", + "required": false + } + ], + "summary": "List invoices 🔐", + "description": "Get a list of invoices", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "404": { + "description": "Not found" + }, + "503": { + "description": "Error" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "createInvoices", + "tags": ["invoices"], + "parameters": [ + { + "name": "createInvoicesModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/createInvoicesModel" + } + } + ], + "summary": "Create invoice object 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/invoices/createfromorder/{orderid}": { + "post": { + "operationId": "invoicesCreateInvoiceFromOrder", + "tags": ["invoices"], + "parameters": [ + { + "name": "orderid", + "type": "integer", + "format": "int64", + "description": "Id of the order", + "in": "path", + "required": true + } + ], + "summary": "Create an invoice using an existing order. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "405": { + "description": "Method Not Allowed" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/invoices/createfromcontract/{contractid}": { + "post": { + "operationId": "invoicesCreateInvoiceFromContract", + "tags": ["invoices"], + "parameters": [ + { + "name": "contractid", + "type": "integer", + "format": "int64", + "description": "Id of the contract", + "in": "path", + "required": true + } + ], + "summary": "Create an invoice using a contract. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "405": { + "description": "Method Not Allowed" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/invoices/{id}/lines": { + "get": { + "operationId": "invoicesRetrieveLines", + "tags": ["invoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of invoice", + "in": "path", + "required": true + } + ], + "summary": "Get lines of an invoice 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "invoicesCreateLine", + "tags": ["invoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of invoice", + "in": "path", + "required": true + }, + { + "name": "invoicesCreateLineModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/invoicesCreateLineModel" + } + } + ], + "summary": "Add a line to a given invoice 🔐", + "description": "Example of POST query : { \"desc\": \"Desc\", \"subprice\": \"1.00000000\", \"qty\": \"1\", \"tva_tx\": \"20.000\", \"localtax1_tx\": \"0.000\", \"localtax2_tx\": \"0.000\", \"fk_product\": \"1\", \"remise_percent\": \"0\", \"date_start\": \"\", \"date_end\": \"\", \"fk_code_ventilation\": 0, \"info_bits\": \"0\", \"fk_remise_except\": null, \"product_type\": \"1\", \"rang\": \"-1\", \"special_code\": \"0\", \"fk_parent_line\": null, \"fk_fournprice\": null, \"pa_ht\": \"0.00000000\", \"label\": \"\", \"array_options\": [], \"situation_percent\": \"100\", \"fk_prev_id\": null, \"fk_unit\": null }", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "304": { + "description": "Not Modified" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "400": { + "description": "Bad Request" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/invoices/{id}/lines/{lineid}": { + "put": { + "operationId": "invoicesUpdateLine", + "tags": ["invoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of invoice to update", + "in": "path", + "required": true + }, + { + "name": "lineid", + "type": "integer", + "format": "int64", + "description": "Id of line to update", + "in": "path", + "required": true + }, + { + "name": "invoicesUpdateLineModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/invoicesUpdateLineModel" + } + } + ], + "summary": "Update a line to a given invoice 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "304": { + "description": "Not Modified" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Invoice not found" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "invoicesRemoveLine", + "tags": ["invoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of invoice", + "in": "path", + "required": true + }, + { + "name": "lineid", + "type": "integer", + "format": "int64", + "description": "Id of the line to delete", + "in": "path", + "required": true + } + ], + "summary": "Deletes a line of a given invoice 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "405": { + "description": "Method Not Allowed" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/invoices/{id}/contact/{contactid}/{type}": { + "post": { + "operationId": "invoicesCreateContact", + "tags": ["invoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of invoice to update", + "in": "path", + "required": true + }, + { + "name": "contactid", + "type": "integer", + "format": "int64", + "description": "Id of contact to add", + "in": "path", + "required": true + }, + { + "name": "type", + "type": "string", + "description": "Type of the contact (BILLING, SHIPPING, CUSTOMER)", + "in": "path", + "required": true + } + ], + "summary": "Add a contact type of given invoice 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "invoicesRemoveContact", + "tags": ["invoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of invoice to update", + "in": "path", + "required": true + }, + { + "name": "contactid", + "type": "integer", + "format": "int64", + "description": "Row key of the contact in the array contact_ids.", + "in": "path", + "required": true + }, + { + "name": "type", + "type": "string", + "description": "Type of the contact (BILLING, SHIPPING, CUSTOMER).", + "in": "path", + "required": true + } + ], + "summary": "Delete a contact type of given invoice 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "System error" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/invoices/{id}/contacts": { + "post": { + "operationId": "invoicesAddContact", + "tags": ["invoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Order ID", + "in": "path", + "required": true + }, + { + "name": "invoicesAddContactModel", + "description": "**fk_socpeople** (required) \n**type_contact** (required) \n**source** (required) \nnotrigger \n", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/invoicesAddContactModel" + } + } + ], + "summary": "Adds a contact to an invoice 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "304": { + "description": "Not Modified" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "System error" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/invoices/{id}/settodraft": { + "post": { + "operationId": "invoicesSettodraft", + "tags": ["invoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Order ID", + "in": "path", + "required": true + }, + { + "name": "invoicesSettodraftModel", + "description": "idwarehouse \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/invoicesSettodraftModel" + } + } + ], + "summary": "Sets an invoice as draft 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "304": { + "description": "Not Modified" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "System error" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/invoices/{id}/validate": { + "post": { + "operationId": "invoicesValidate", + "tags": ["invoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Invoice ID", + "in": "path", + "required": true + }, + { + "name": "invoicesValidateModel", + "description": "force_number \nidwarehouse \nnotrigger \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/invoicesValidateModel" + } + } + ], + "summary": "Validate an invoice 🔐", + "description": "If you get a bad value for param notrigger check that ou provide this in body { \"idwarehouse\": 0, \"notrigger\": 0 }", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/invoices/{id}/settopaid": { + "post": { + "operationId": "invoicesSettopaid", + "tags": ["invoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Order ID", + "in": "path", + "required": true + }, + { + "name": "invoicesSettopaidModel", + "description": "close_code \nclose_note \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/invoicesSettopaidModel" + } + } + ], + "summary": "Sets an invoice as paid 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "304": { + "description": "Not Modified" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "System error" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/invoices/{id}/settounpaid": { + "post": { + "operationId": "invoicesSettounpaid", + "tags": ["invoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Order ID", + "in": "path", + "required": true + } + ], + "summary": "Sets an invoice as unpaid 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "304": { + "description": "Not Modified" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "System error" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/invoices/{id}/discount": { + "get": { + "operationId": "invoicesRetrieveDiscount", + "tags": ["invoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of invoice", + "in": "path", + "required": true + } + ], + "summary": "Get discount from invoice 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/invoices/{id}/markAsCreditAvailable": { + "post": { + "operationId": "invoicesMarkAsCreditAvailable", + "tags": ["invoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Invoice ID", + "in": "path", + "required": true + } + ], + "summary": "Create a discount (credit available) for a credit note or a deposit. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "304": { + "description": "Not Modified" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "System error" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/invoices/{id}/usediscount/{discountid}": { + "post": { + "operationId": "invoicesUseDiscount", + "tags": ["invoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of invoice", + "in": "path", + "required": true + }, + { + "name": "discountid", + "type": "integer", + "format": "int64", + "description": "Id of discount", + "in": "path", + "required": true + } + ], + "summary": "Add a discount line into an invoice (as an invoice line) using an existing absolute discount 🔐", + "description": "Note that this consume the discount.", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "405": { + "description": "Method Not Allowed" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/invoices/{id}/usecreditnote/{discountid}": { + "post": { + "operationId": "invoicesUseCreditNote", + "tags": ["invoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of invoice", + "in": "path", + "required": true + }, + { + "name": "discountid", + "type": "integer", + "format": "int64", + "description": "Id of a discount coming from a credit note", + "in": "path", + "required": true + } + ], + "summary": "Add an available credit note discount to payments of an existing invoice. 🔐", + "description": " Note that this consume the credit note.", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "405": { + "description": "Method Not Allowed" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/invoices/{id}/payments": { + "get": { + "operationId": "invoicesRetrievePayments", + "tags": ["invoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of invoice", + "in": "path", + "required": true + } + ], + "summary": "Get list of payments of a given invoice 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "405": { + "description": "Method Not Allowed" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "invoicesAddPayment", + "tags": ["invoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of invoice", + "in": "path", + "required": true + }, + { + "name": "invoicesAddPaymentModel", + "description": "**datepaye** (required) \n**paymentid** (required) \n**closepaidinvoices** (required) \n**accountid** (required) \nnum_payment \ncomment \nchqemetteur \nchqbank \n", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/invoicesAddPaymentModel" + } + } + ], + "summary": "Add payment line to a specific invoice with the remain to pay as amount. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/invoices/paymentsdistributed": { + "post": { + "operationId": "invoicesAddPaymentDistributed", + "tags": ["invoices"], + "parameters": [ + { + "name": "invoicesAddPaymentDistributedModel", + "description": "**arrayofamounts** (required) \n**datepaye** (required) \n**paymentid** (required) \n**closepaidinvoices** (required) \n**accountid** (required) \nnum_payment \ncomment \nchqemetteur \nchqbank \nref_ext \naccepthigherpayment \n", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/invoicesAddPaymentDistributedModel" + } + } + ], + "summary": "Add a payment to pay partially or completely one or several invoices. 🔐", + "description": "Warning: Take care that all invoices are owned by the same customer. Example of value for parameter arrayofamounts: {\"1\": {\"amount\": \"99.99\", \"multicurrency_amount\": \"\"}, \"2\": {\"amount\": \"\", \"multicurrency_amount\": \"10\"}}", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/invoices/payments/{id}": { + "put": { + "operationId": "invoicesUpdatePayment", + "tags": ["invoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of payment", + "in": "path", + "required": true + }, + { + "name": "invoicesUpdatePaymentModel", + "description": "num_payment \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/invoicesUpdatePaymentModel" + } + } + ], + "summary": "Update a payment 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad parameters" + }, + "401": { + "description": "Not allowed" + }, + "404": { + "description": "Not found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/invoices/templates/{id}": { + "get": { + "operationId": "invoicesRetrieveTemplateInvoice", + "tags": ["invoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of template invoice", + "in": "path", + "required": true + }, + { + "name": "contact_list", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "description": "0:Return array contains all properties, 1:Return array contains just id, -1: Do not return contacts/adddesses", + "in": "query", + "required": false + } + ], + "summary": "Get properties of a template invoice object 🔐", + "description": "Return an array with invoice information", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/login": { + "get": { + "operationId": "loginLoginUnsecured", + "tags": ["login"], + "parameters": [ + { + "name": "login", + "type": "string", + "description": "User login", + "in": "query", + "required": true + }, + { + "name": "password", + "type": "string", + "description": "User password", + "in": "query", + "required": true + }, + { + "name": "entity", + "type": "string", + "description": "Entity (when multicompany module is used). '' means 1=first company.", + "in": "query", + "required": false + }, + { + "name": "reset", + "type": "integer", + "format": "int64", + "description": "Reset token (0=get current token, 1=ask a new token and canceled old token. This means access using current existing API token of user will fails: new token will be required for new access)", + "in": "query", + "required": false + } + ], + "summary": "Login 🔓", + "description": "Request the API token for a couple username / password. WARNING: You should NEVER use this API, like you should never use the similar API that uses the POST method. This will expose your password. To use the APIs, you should instead set an API token to the user you want to allow to use API (This API token called DOLAPIKEY can be found/set on the user page) and use this token as credential for any API call. From the API explorer, you can enter directly the \"DOLAPIKEY\" into the field at the top right of the page to get access to any allowed APIs.", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "403": { + "description": "Access denied" + }, + "500": { + "description": "System error" + } + } + }, + "post": { + "operationId": "listLogin", + "tags": ["login"], + "parameters": [ + { + "name": "listLoginModel", + "description": "**login** (required) \n**password** (required) \nentity \nreset \n", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/listLoginModel" + } + } + ], + "summary": "Login 🔓", + "description": "Request the API token for a couple username / password. WARNING: You should NEVER use this API, like you should never use the similar API that uses the POST method. This will expose your password. To use the APIs, you should instead set an API token to the user you want to allow to use API (This API token called DOLAPIKEY can be found/set on the user page) and use this token as credential for any API call. From the API explorer, you can enter directly the \"DOLAPIKEY\" into the field at the top right of the page to get access to any allowed APIs.", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "403": { + "description": "Access denied" + }, + "500": { + "description": "System error" + } + } + } + }, + "/mos/{id}": { + "get": { + "operationId": "retrieveMos", + "tags": ["mos"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of MO", + "in": "path", + "required": true + } + ], + "summary": "Get properties of a MO object 🔐", + "description": "Return an array with MO information", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "put": { + "operationId": "updateMos", + "tags": ["mos"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of MO to update", + "in": "path", + "required": true + }, + { + "name": "updateMosModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/updateMosModel" + } + } + ], + "summary": "Update MO 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "removeMos", + "tags": ["mos"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "MO ID", + "in": "path", + "required": true + } + ], + "summary": "Delete MO 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/mos": { + "get": { + "operationId": "listMos", + "tags": ["mos"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "t.rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')\"", + "in": "query", + "required": false + }, + { + "name": "properties", + "type": "string", + "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", + "in": "query", + "required": false + } + ], + "summary": "List Mos 🔐", + "description": "Get a list of MOs", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "createMos", + "tags": ["mos"], + "parameters": [ + { + "name": "createMosModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/createMosModel" + } + } + ], + "summary": "Create MO object 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/mos/{id}/produceandconsumeall": { + "post": { + "operationId": "mosProduceAndConsumeAll", + "tags": ["mos"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of state", + "in": "path", + "required": true + }, + { + "name": "mosProduceAndConsumeAllModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/mosProduceAndConsumeAllModel" + } + } + ], + "summary": "Produce and consume all 🔐", + "description": "- If arraytoconsume and arraytoproduce are both filled, this fill an empty MO with the lines to consume and produce and record the consumption and production. - If arraytoconsume and arraytoproduce are not provided, it consumes and produces all existing lines. Example: { \"inventorylabel\": \"Produce and consume using API\", \"inventorycode\": \"PRODUCEAPI-YY-MM-DD\", \"autoclose\": 1, \"arraytoconsume\": [ \"objectid\": 123, -- ID_of_product \"qty\": \"2\", \"fk_warehouse\": \"789\" ], \"arraytoproduce\": [ \"objectid\": 456, -- ID_of_product \"qty\": \"1\", \"fk_warehouse\": \"789\" ] }", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/mos/{id}/produceandconsume": { + "post": { + "operationId": "mosProduceAndConsume", + "tags": ["mos"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of state", + "in": "path", + "required": true + }, + { + "name": "mosProduceAndConsumeModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/mosProduceAndConsumeModel" + } + } + ], + "summary": "Produce and consume 🔐", + "description": "Example: { \"inventorylabel\": \"Produce and consume using API\", \"inventorycode\": \"PRODUCEAPI-YY-MM-DD\", \"autoclose\": 1, \"arraytoconsume\": [ { \"objectid\": \"123\", -- rowid of MoLine \"qty\": \"2\", \"fk_warehouse\": \"789\" -- \"0\" or empty, if stock change is disabled. } ], \"arraytoproduce\": [ { \"objectid\": \"456\", -- rowid of MoLine \"qty\": \"1\", \"fk_warehouse\": \"789\", \"pricetoproduce\": \"12.3\" -- optional } ] }", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/orders/{id}": { + "get": { + "operationId": "retrieveOrders", + "tags": ["orders"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of order", + "in": "path", + "required": true + }, + { + "name": "contact_list", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "description": "0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id", + "in": "query", + "required": false + } + ], + "summary": "Get properties of an order object by id 🔐", + "description": "Return an array with order information", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "put": { + "operationId": "updateOrders", + "tags": ["orders"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of order to update", + "in": "path", + "required": true + }, + { + "name": "updateOrdersModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/updateOrdersModel" + } + } + ], + "summary": "Update order general fields (won't touch lines of order) 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "removeOrders", + "tags": ["orders"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Order ID", + "in": "path", + "required": true + } + ], + "summary": "Delete order 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/orders/ref/{ref}": { + "get": { + "operationId": "ordersRetrieveByRef", + "tags": ["orders"], + "parameters": [ + { + "name": "ref", + "type": "string", + "description": "Ref of object", + "in": "path", + "required": true + }, + { + "name": "contact_list", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "description": "0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id", + "in": "query", + "required": false + } + ], + "summary": "Get properties of an order object by ref 🔐", + "description": "Return an array with order information", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/orders/ref_ext/{ref_ext}": { + "get": { + "operationId": "ordersRetrieveByRefExt", + "tags": ["orders"], + "parameters": [ + { + "name": "ref_ext", + "type": "string", + "description": "External reference of object", + "in": "path", + "required": true + }, + { + "name": "contact_list", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "description": "0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id", + "in": "query", + "required": false + } + ], + "summary": "Get properties of an order object by ref_ext 🔐", + "description": "Return an array with order information", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/orders": { + "get": { + "operationId": "listOrders", + "tags": ["orders"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "t.rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + }, + { + "name": "thirdparty_ids", + "type": "string", + "description": "Thirdparty ids to filter orders of (example '1' or '1,2,3')", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')\"", + "in": "query", + "required": false + }, + { + "name": "sqlfilterlines", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(tl.fk_product:=:'17') and (tl.price:<:'250')\"", + "in": "query", + "required": false + }, + { + "name": "properties", + "type": "string", + "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", + "in": "query", + "required": false + } + ], + "summary": "List orders 🔐", + "description": "Get a list of orders", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "404": { + "description": "Not found" + }, + "503": { + "description": "Error" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "createOrders", + "tags": ["orders"], + "parameters": [ + { + "name": "createOrdersModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/createOrdersModel" + } + } + ], + "summary": "Create a sale order 🔐", + "description": "Example: { \"socid\": 2, \"date\": 1595196000, \"type\": 0, \"lines\": [{ \"fk_product\": 2, \"qty\": 1 }] }", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/orders/{id}/lines": { + "get": { + "operationId": "ordersRetrieveLines", + "tags": ["orders"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of order", + "in": "path", + "required": true + } + ], + "summary": "Get lines of an order 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "ordersCreateLine", + "tags": ["orders"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of order to update", + "in": "path", + "required": true + }, + { + "name": "ordersCreateLineModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/ordersCreateLineModel" + } + } + ], + "summary": "Add a line to given order 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/orders/{id}/lines/{lineid}": { + "put": { + "operationId": "ordersUpdateLine", + "tags": ["orders"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of order to update", + "in": "path", + "required": true + }, + { + "name": "lineid", + "type": "integer", + "format": "int64", + "description": "Id of line to update", + "in": "path", + "required": true + }, + { + "name": "ordersUpdateLineModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/ordersUpdateLineModel" + } + } + ], + "summary": "Update a line to given order 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "ordersRemoveLine", + "tags": ["orders"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of order to update", + "in": "path", + "required": true + }, + { + "name": "lineid", + "type": "integer", + "format": "int64", + "description": "Id of line to delete", + "in": "path", + "required": true + } + ], + "summary": "Delete a line of a given order 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/orders/{id}/contacts": { + "get": { + "operationId": "ordersRetrieveContacts", + "tags": ["orders"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of order", + "in": "path", + "required": true + }, + { + "name": "type", + "type": "string", + "description": "Type of the contact (BILLING, SHIPPING, CUSTOMER)", + "in": "query", + "required": false + } + ], + "summary": "Get contacts of given order 🔐", + "description": "Return an array with contact information", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/orders/{id}/contact/{contactid}/{type}": { + "post": { + "operationId": "ordersCreateContact", + "tags": ["orders"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of order to update", + "in": "path", + "required": true + }, + { + "name": "contactid", + "type": "integer", + "format": "int64", + "description": "Id of contact to add", + "in": "path", + "required": true + }, + { + "name": "type", + "type": "string", + "description": "Type of the contact (BILLING, SHIPPING, CUSTOMER)", + "in": "path", + "required": true + } + ], + "summary": "Add a contact type of given order 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "ordersRemoveContact", + "tags": ["orders"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of order to update", + "in": "path", + "required": true + }, + { + "name": "contactid", + "type": "integer", + "format": "int64", + "description": "Id of contact", + "in": "path", + "required": true + }, + { + "name": "type", + "type": "string", + "description": "Type of the contact (BILLING, SHIPPING, CUSTOMER).", + "in": "path", + "required": true + } + ], + "summary": "Unlink a contact type of given order 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "System error" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/orders/{id}/validate": { + "post": { + "operationId": "ordersValidate", + "tags": ["orders"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Order ID", + "in": "path", + "required": true + }, + { + "name": "ordersValidateModel", + "description": "idwarehouse \nnotrigger \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/ordersValidateModel" + } + } + ], + "summary": "Validate an order 🔐", + "description": "If you get a bad value for param notrigger check, provide this in body { \"idwarehouse\": 0, \"notrigger\": 0 }", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "304": { + "description": "Not Modified" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "System error" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/orders/{id}/reopen": { + "post": { + "operationId": "ordersReopen", + "tags": ["orders"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of the order", + "in": "path", + "required": true + } + ], + "summary": "Tag the order as validated (opened) 🔐", + "description": "Function used when order is reopend after being closed.", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "304": { + "description": "Not Modified" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "405": { + "description": "Method Not Allowed" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/orders/{id}/setinvoiced": { + "post": { + "operationId": "ordersSetinvoiced", + "tags": ["orders"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of the order", + "in": "path", + "required": true + } + ], + "summary": "Classify the order as invoiced. Could be also called setbilled 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "405": { + "description": "Method Not Allowed" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/orders/{id}/close": { + "post": { + "operationId": "ordersClose", + "tags": ["orders"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Order ID", + "in": "path", + "required": true + }, + { + "name": "ordersCloseModel", + "description": "notrigger \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/ordersCloseModel" + } + } + ], + "summary": "Close an order (Classify it as \"Delivered\") 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/orders/{id}/settodraft": { + "post": { + "operationId": "ordersSettodraft", + "tags": ["orders"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Order ID", + "in": "path", + "required": true + }, + { + "name": "ordersSettodraftModel", + "description": "idwarehouse \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/ordersSettodraftModel" + } + } + ], + "summary": "Set an order to draft 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/orders/createfromproposal/{proposalid}": { + "post": { + "operationId": "ordersCreateOrderFromProposal", + "tags": ["orders"], + "parameters": [ + { + "name": "proposalid", + "type": "integer", + "format": "int64", + "description": "Id of the proposal", + "in": "path", + "required": true + } + ], + "summary": "Create an order using an existing proposal. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "405": { + "description": "Method Not Allowed" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/orders/{id}/shipment": { + "get": { + "operationId": "ordersRetrieveOrderShipments", + "tags": ["orders"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of the order", + "in": "path", + "required": true + } + ], + "summary": "Get the shipments of an order 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "System error" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/orders/{id}/shipment/{warehouse_id}": { + "post": { + "operationId": "ordersCreateOrderShipment", + "tags": ["orders"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of the order", + "in": "path", + "required": true + }, + { + "name": "warehouse_id", + "type": "integer", + "format": "int64", + "description": "Id of a warehouse", + "in": "path", + "required": true + } + ], + "summary": "Create the shipment of an order 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "System error" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/products/{id}": { + "get": { + "operationId": "retrieveProducts", + "tags": ["products"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of product", + "in": "path", + "required": true + }, + { + "name": "includestockdata", + "type": "integer", + "format": "int64", + "description": "Load also information about stock (slower)", + "in": "query", + "required": false + }, + { + "name": "includesubproducts", + "type": "boolean", + "description": "Load information about subproducts", + "in": "query", + "required": false + }, + { + "name": "includeparentid", + "type": "boolean", + "description": "Load also ID of parent product (if product is a variant of a parent product)", + "in": "query", + "required": false + }, + { + "name": "includetrans", + "type": "boolean", + "description": "Load also the translations of product label and description", + "in": "query", + "required": false + } + ], + "summary": "Get properties of a product object by id 🔐", + "description": "Return an array with product information.", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "put": { + "operationId": "updateProducts", + "tags": ["products"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of product to update", + "in": "path", + "required": true + }, + { + "name": "updateProductsModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/updateProductsModel" + } + } + ], + "summary": "Update product. 🔐", + "description": "Price will be updated by this API only if option is set on \"One price per product\" or if PRODUIT_MULTIPRICES is set (1 price per segment) See other APIs for other price modes.", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "removeProducts", + "tags": ["products"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Product ID", + "in": "path", + "required": true + } + ], + "summary": "Delete product 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/products/ref/{ref}": { + "get": { + "operationId": "productsRetrieveByRef", + "tags": ["products"], + "parameters": [ + { + "name": "ref", + "type": "string", + "description": "Ref of element", + "in": "path", + "required": true + }, + { + "name": "includestockdata", + "type": "integer", + "format": "int64", + "description": "Load also information about stock (slower)", + "in": "query", + "required": false + }, + { + "name": "includesubproducts", + "type": "boolean", + "description": "Load information about subproducts", + "in": "query", + "required": false + }, + { + "name": "includeparentid", + "type": "boolean", + "description": "Load also ID of parent product (if product is a variant of a parent product)", + "in": "query", + "required": false + }, + { + "name": "includetrans", + "type": "boolean", + "description": "Load also the translations of product label and description", + "in": "query", + "required": false + } + ], + "summary": "Get properties of a product object by ref 🔐", + "description": "Return an array with product information.", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/products/ref_ext/{ref_ext}": { + "get": { + "operationId": "productsRetrieveByRefExt", + "tags": ["products"], + "parameters": [ + { + "name": "ref_ext", + "type": "string", + "description": "Ref_ext of element", + "in": "path", + "required": true + }, + { + "name": "includestockdata", + "type": "integer", + "format": "int64", + "description": "Load also information about stock (slower)", + "in": "query", + "required": false + }, + { + "name": "includesubproducts", + "type": "boolean", + "description": "Load information about subproducts", + "in": "query", + "required": false + }, + { + "name": "includeparentid", + "type": "boolean", + "description": "Load also ID of parent product (if product is a variant of a parent product)", + "in": "query", + "required": false + }, + { + "name": "includetrans", + "type": "boolean", + "description": "Load also the translations of product label and description", + "in": "query", + "required": false + } + ], + "summary": "Get properties of a product object by ref_ext 🔐", + "description": "Return an array with product information.", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/products/barcode/{barcode}": { + "get": { + "operationId": "productsRetrieveByBarcode", + "tags": ["products"], + "parameters": [ + { + "name": "barcode", + "type": "string", + "description": "Barcode of element", + "in": "path", + "required": true + }, + { + "name": "includestockdata", + "type": "integer", + "format": "int64", + "description": "Load also information about stock (slower)", + "in": "query", + "required": false + }, + { + "name": "includesubproducts", + "type": "boolean", + "description": "Load information about subproducts", + "in": "query", + "required": false + }, + { + "name": "includeparentid", + "type": "boolean", + "description": "Load also ID of parent product (if product is a variant of a parent product)", + "in": "query", + "required": false + }, + { + "name": "includetrans", + "type": "boolean", + "description": "Load also the translations of product label and description", + "in": "query", + "required": false + } + ], + "summary": "Get properties of a product object by barcode 🔐", + "description": "Return an array with product information.", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/products": { + "get": { + "operationId": "listProducts", + "tags": ["products"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "t.ref", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + }, + { + "name": "mode", + "type": "integer", + "format": "int64", + "description": "Use this param to filter list (0 for all, 1 for only product, 2 for only service)", + "in": "query", + "required": false + }, + { + "name": "category", + "type": "integer", + "format": "int64", + "description": "Use this param to filter list by category", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.tobuy:=:0) and (t.tosell:=:1)\"", + "in": "query", + "required": false + }, + { + "name": "ids_only", + "type": "boolean", + "description": "Return only IDs of product instead of all properties (faster, above all if list is long)", + "in": "query", + "required": false + }, + { + "name": "variant_filter", + "type": "integer", + "format": "int64", + "description": "Use this param to filter list (0 = all, 1=products without variants, 2=parent of variants, 3=variants only)", + "in": "query", + "required": false + }, + { + "name": "pagination_data", + "type": "boolean", + "description": "If this parameter is set to true the response will include pagination data. Default value is false. Page starts from 0", + "in": "query", + "required": false + }, + { + "name": "includestockdata", + "type": "integer", + "format": "int64", + "description": "Load also information about stock (slower)", + "in": "query", + "required": false + }, + { + "name": "properties", + "type": "string", + "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", + "in": "query", + "required": false + } + ], + "summary": "List products 🔐", + "description": "Get a list of products", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "createProducts", + "tags": ["products"], + "parameters": [ + { + "name": "createProductsModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/createProductsModel" + } + } + ], + "summary": "Create product object 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/products/{id}/subproducts": { + "get": { + "operationId": "productsRetrieveSubproducts", + "tags": ["products"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of parent product/service", + "in": "path", + "required": true + } + ], + "summary": "Get the list of subproducts of the product. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "500": { + "description": "RestException" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/products/{id}/subproducts/add": { + "post": { + "operationId": "productsAddSubproducts", + "tags": ["products"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of parent product/service", + "in": "path", + "required": true + }, + { + "name": "productsAddSubproductsModel", + "description": "**subproduct_id** (required) \n**qty** (required) \nincdec \n", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/productsAddSubproductsModel" + } + } + ], + "summary": "Add subproduct. 🔐", + "description": " Link a product/service to a parent product/service", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "500": { + "description": "RestException" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/products/{id}/subproducts/remove/{subproduct_id}": { + "delete": { + "operationId": "productsDelSubproducts", + "tags": ["products"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of parent product/service", + "in": "path", + "required": true + }, + { + "name": "subproduct_id", + "type": "integer", + "format": "int64", + "description": "Id of child product/service", + "in": "path", + "required": true + } + ], + "summary": "Remove subproduct. 🔐", + "description": "Unlink a product/service from a parent product/service", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/products/{id}/categories": { + "get": { + "operationId": "productsRetrieveCategories", + "tags": ["products"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of product", + "in": "path", + "required": true + }, + { + "name": "sortfield", + "type": "string", + "defaultValue": "s.rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + } + ], + "summary": "Get categories for a product 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/products/{id}/selling_multiprices/per_segment": { + "get": { + "operationId": "productsRetrieveCustomerPricesPerSegment", + "tags": ["products"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of product", + "in": "path", + "required": true + } + ], + "summary": "Get prices per segment for a product 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/products/{id}/selling_multiprices/per_customer": { + "get": { + "operationId": "productsRetrieveCustomerPricesPerCustomer", + "tags": ["products"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of product", + "in": "path", + "required": true + }, + { + "name": "thirdparty_id", + "type": "string", + "description": "Thirdparty id to filter orders of (example '1')", + "in": "query", + "required": false + } + ], + "summary": "Get prices per customer for a product 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/products/{id}/selling_multiprices/per_quantity": { + "get": { + "operationId": "productsRetrieveCustomerPricesPerQuantity", + "tags": ["products"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of product", + "in": "path", + "required": true + } + ], + "summary": "Get prices per quantity for a product 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/products/{id}/purchase_prices": { + "post": { + "operationId": "productsAddPurchasePrice", + "tags": ["products"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of Product", + "in": "path", + "required": true + }, + { + "name": "productsAddPurchasePriceModel", + "description": "**qty** (required) \n**buyprice** (required) \n**price_base_type** (required) \n**fourn_id** (required) \n**availability** (required) \n**ref_fourn** (required) \n**tva_tx** (required) \ncharges \nremise_percent \nremise \nnewnpr \ndelivery_time_days \nsupplier_reputation \nlocaltaxes_array \nnewdefaultvatcode \nmulticurrency_buyprice \nmulticurrency_price_base_type \nmulticurrency_tx \nmulticurrency_code \ndesc_fourn \nbarcode \nfk_barcode_type \n", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/productsAddPurchasePriceModel" + } + } + ], + "summary": "Add/Update purchase prices for a product. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "500": { + "description": "System error" + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "get": { + "operationId": "productsRetrievePurchasePrices", + "tags": ["products"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of product", + "in": "path", + "required": true + }, + { + "name": "ref", + "type": "string", + "description": "Ref of element", + "in": "query", + "required": false + }, + { + "name": "ref_ext", + "type": "string", + "description": "Ref ext of element", + "in": "query", + "required": false + }, + { + "name": "barcode", + "type": "string", + "description": "Barcode of element", + "in": "query", + "required": false + } + ], + "summary": "Get purchase prices for a product 🔐", + "description": "Return an array with product information. TODO implement getting a product by ref or by $ref_ext", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/products/{id}/purchase_prices/{priceid}": { + "delete": { + "operationId": "productsRemovePurchasePrice", + "tags": ["products"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Product ID", + "in": "path", + "required": true + }, + { + "name": "priceid", + "type": "integer", + "format": "int64", + "description": "purchase price ID", + "in": "path", + "required": true + } + ], + "summary": "Delete purchase price for a product 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/products/purchase_prices": { + "get": { + "operationId": "productsRetrieveSupplierProducts", + "tags": ["products"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "t.ref", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + }, + { + "name": "mode", + "type": "integer", + "format": "int64", + "description": "Use this param to filter list (0 for all, 1 for only product, 2 for only service)", + "in": "query", + "required": false + }, + { + "name": "category", + "type": "integer", + "format": "int64", + "description": "Use this param to filter list by category of product", + "in": "query", + "required": false + }, + { + "name": "supplier", + "type": "integer", + "format": "int64", + "description": "Use this param to filter list by supplier", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.tobuy:=:0) and (t.tosell:=:1)\"", + "in": "query", + "required": false + } + ], + "summary": "Get a list of all purchase prices of products 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/products/attributes": { + "get": { + "operationId": "productsRetrieveAttributes", + "tags": ["products"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "t.ref", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:color)\"", + "in": "query", + "required": false + }, + { + "name": "properties", + "type": "string", + "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", + "in": "query", + "required": false + } + ], + "summary": "Get attributes. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "503": { + "description": "Service Unavailable" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "productsAddAttributes", + "tags": ["products"], + "parameters": [ + { + "name": "productsAddAttributesModel", + "description": "**ref** (required) \n**label** (required) \nref_ext \n", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/productsAddAttributesModel" + } + } + ], + "summary": "Add attributes. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "500": { + "description": "System error" + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/products/attributes/{id}": { + "get": { + "operationId": "productsRetrieveAttributeById", + "tags": ["products"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of Attribute", + "in": "path", + "required": true + } + ], + "summary": "Get attribute by ID. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "put": { + "operationId": "productsUpdateAttributes", + "tags": ["products"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of Attribute", + "in": "path", + "required": true + }, + { + "name": "productsUpdateAttributesModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/productsUpdateAttributesModel" + } + } + ], + "summary": "Update attributes by id. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "500": { + "description": "RestException" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "productsRemoveAttributes", + "tags": ["products"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of Attribute", + "in": "path", + "required": true + } + ], + "summary": "Delete attributes by id. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "500": { + "description": "System error" + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/products/attributes/ref/{ref}": { + "get": { + "operationId": "productsRetrieveAttributesByRef", + "tags": ["products"], + "parameters": [ + { + "name": "ref", + "type": "string", + "description": "Reference of Attribute", + "in": "path", + "required": true + } + ], + "summary": "Get attributes by ref. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/products/attributes/ref_ext/{ref_ext}": { + "get": { + "operationId": "productsRetrieveAttributesByRefExt", + "tags": ["products"], + "parameters": [ + { + "name": "ref_ext", + "type": "string", + "description": "External reference of Attribute", + "in": "path", + "required": true + } + ], + "summary": "Get attributes by ref_ext. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "500": { + "description": "System error" + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/products/attributes/values/{id}": { + "get": { + "operationId": "productsRetrieveAttributeValueById", + "tags": ["products"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of Attribute value", + "in": "path", + "required": true + } + ], + "summary": "Get attribute value by id. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "500": { + "description": "System error" + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "put": { + "operationId": "productsUpdateAttributeValue", + "tags": ["products"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of Attribute", + "in": "path", + "required": true + }, + { + "name": "productsUpdateAttributeValueModel", + "description": "**request_data** (required) \n", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/productsUpdateAttributeValueModel" + } + } + ], + "summary": "Update attribute value. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "System error" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "productsRemoveAttributeValueById", + "tags": ["products"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of Attribute value", + "in": "path", + "required": true + } + ], + "summary": "Delete attribute value by id. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "500": { + "description": "System error" + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/products/attributes/{id}/values/ref/{ref}": { + "get": { + "operationId": "productsRetrieveAttributeValueByRef", + "tags": ["products"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of Attribute value", + "in": "path", + "required": true + }, + { + "name": "ref", + "type": "string", + "description": "Ref of Attribute value", + "in": "path", + "required": true + } + ], + "summary": "Get attribute value by ref. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "500": { + "description": "System error" + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "productsRemoveAttributeValueByRef", + "tags": ["products"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of Attribute", + "in": "path", + "required": true + }, + { + "name": "ref", + "type": "string", + "description": "Ref of Attribute value", + "in": "path", + "required": true + } + ], + "summary": "Delete attribute value by ref. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/products/attributes/{id}/values": { + "get": { + "operationId": "productsRetrieveAttributeValues", + "tags": ["products"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of an Attribute", + "in": "path", + "required": true + } + ], + "summary": "Get all values for an attribute id. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "System error" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "productsAddAttributeValue", + "tags": ["products"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of Attribute", + "in": "path", + "required": true + }, + { + "name": "productsAddAttributeValueModel", + "description": "**ref** (required) \n**value** (required) \n", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/productsAddAttributeValueModel" + } + } + ], + "summary": "Add attribute value. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "500": { + "description": "System error" + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/products/attributes/ref/{ref}/values": { + "get": { + "operationId": "productsRetrieveAttributeValuesByRef", + "tags": ["products"], + "parameters": [ + { + "name": "ref", + "type": "string", + "description": "Ref of an Attribute", + "in": "path", + "required": true + } + ], + "summary": "Get all values for an attribute ref. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/products/{id}/variants": { + "get": { + "operationId": "productsRetrieveVariants", + "tags": ["products"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of Product", + "in": "path", + "required": true + }, + { + "name": "includestock", + "type": "integer", + "format": "int64", + "description": "Default value 0. If parameter is set to 1 the response will contain stock data of each variant", + "in": "query", + "required": false + } + ], + "summary": "Get product variants. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "500": { + "description": "System error" + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "productsAddVariant", + "tags": ["products"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of Product", + "in": "path", + "required": true + }, + { + "name": "productsAddVariantModel", + "description": "**weight_impact** (required) \n**price_impact** (required) \n**price_impact_is_percent** (required) \n**features** (required) \nreference \nref_ext \n", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/productsAddVariantModel" + } + } + ], + "summary": "Add variant. 🔐", + "description": " \"features\" is a list of attributes pairs id_attribute=>id_value. Example: array(id_color=>id_Blue, id_size=>id_small, id_option=>id_val_a, ...)", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "500": { + "description": "System error" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/products/ref/{ref}/variants": { + "get": { + "operationId": "productsRetrieveVariantsByProdRef", + "tags": ["products"], + "parameters": [ + { + "name": "ref", + "type": "string", + "description": "Ref of Product", + "in": "path", + "required": true + } + ], + "summary": "Get product variants by Product ref. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "500": { + "description": "System error" + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "productsAddVariantByProductRef", + "tags": ["products"], + "parameters": [ + { + "name": "ref", + "type": "string", + "description": "Ref of Product", + "in": "path", + "required": true + }, + { + "name": "productsAddVariantByProductRefModel", + "description": "**weight_impact** (required) \n**price_impact** (required) \n**price_impact_is_percent** (required) \n**features** (required) \n", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/productsAddVariantByProductRefModel" + } + } + ], + "summary": "Add variant by product ref. 🔐", + "description": " \"features\" is a list of attributes pairs id_attribute=>id_value. Example: array(id_color=>id_Blue, id_size=>id_small, id_option=>id_val_a, ...)", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "500": { + "description": "System error" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/products/variants/{id}": { + "put": { + "operationId": "productsUpdateVariant", + "tags": ["products"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of Variant", + "in": "path", + "required": true + }, + { + "name": "productsUpdateVariantModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/productsUpdateVariantModel" + } + } + ], + "summary": "Put product variants. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "500": { + "description": "System error" + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "productsRemoveVariant", + "tags": ["products"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of Variant", + "in": "path", + "required": true + } + ], + "summary": "Delete product variants. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "500": { + "description": "System error" + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/products/{id}/stock": { + "get": { + "operationId": "productsRetrieveStock", + "tags": ["products"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of Product", + "in": "path", + "required": true + }, + { + "name": "selected_warehouse_id", + "type": "integer", + "format": "int64", + "description": "ID of warehouse", + "in": "query", + "required": false + } + ], + "summary": "Get stock data for the product id given. 🔐", + "description": "Optionally with $selected_warehouse_id parameter user can get stock of specific warehouse", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "500": { + "description": "System error" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/projects/{id}": { + "get": { + "operationId": "retrieveProjects", + "tags": ["projects"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of project", + "in": "path", + "required": true + } + ], + "summary": "Get properties of a project object 🔐", + "description": "Return an array with project information", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "put": { + "operationId": "updateProjects", + "tags": ["projects"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of project to update", + "in": "path", + "required": true + }, + { + "name": "updateProjectsModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/updateProjectsModel" + } + } + ], + "summary": "Update project general fields (won't touch lines of project) 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "removeProjects", + "tags": ["projects"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Project ID", + "in": "path", + "required": true + } + ], + "summary": "Delete project 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/projects/ref/{ref}": { + "get": { + "operationId": "projectsRetrieveByRef", + "tags": ["projects"], + "parameters": [ + { + "name": "ref", + "type": "string", + "description": "Ref of project", + "in": "path", + "required": true + } + ], + "summary": "Get properties of a project object 🔐", + "description": "Return an array with project information", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/projects/ref_ext/{ref_ext}": { + "get": { + "operationId": "projectsRetrieveByRefExt", + "tags": ["projects"], + "parameters": [ + { + "name": "ref_ext", + "type": "string", + "description": "Ref_Ext of project", + "in": "path", + "required": true + } + ], + "summary": "Get properties of a project object 🔐", + "description": "Return an array with project information", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/projects/email_msgid/{email_msgid}": { + "get": { + "operationId": "projectsRetrieveByMsgId", + "tags": ["projects"], + "parameters": [ + { + "name": "email_msgid", + "type": "string", + "description": "Email msgid of project", + "in": "path", + "required": true + } + ], + "summary": "Get properties of a project object 🔐", + "description": "Return an array with project information", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/projects": { + "get": { + "operationId": "listProjects", + "tags": ["projects"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "t.rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + }, + { + "name": "thirdparty_ids", + "type": "string", + "description": "Thirdparty ids to filter projects of (example '1' or '1,2,3')", + "in": "query", + "required": false + }, + { + "name": "category", + "type": "integer", + "format": "int64", + "description": "Use this param to filter list by category", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')\"", + "in": "query", + "required": false + }, + { + "name": "properties", + "type": "string", + "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", + "in": "query", + "required": false + } + ], + "summary": "List projects 🔐", + "description": "Get a list of projects", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "createProjects", + "tags": ["projects"], + "parameters": [ + { + "name": "createProjectsModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/createProjectsModel" + } + } + ], + "summary": "Create project object 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/projects/{id}/tasks": { + "get": { + "operationId": "projectsRetrieveLines", + "tags": ["projects"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of project", + "in": "path", + "required": true + }, + { + "name": "includetimespent", + "type": "integer", + "format": "int64", + "description": "0=Return only list of tasks. 1=Include a summary of time spent, 2=Include details of time spent lines", + "in": "query", + "required": false + } + ], + "summary": "Get tasks of a project. 🔐", + "description": "See also API /tasks", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/projects/{id}/roles": { + "get": { + "operationId": "projectsRetrieveRoles", + "tags": ["projects"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of project", + "in": "path", + "required": true + }, + { + "name": "userid", + "type": "integer", + "format": "int64", + "description": "Id of user (0 = connected user)", + "in": "query", + "required": false + } + ], + "summary": "Get roles a user is assigned to a project with 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/projects/{id}/validate": { + "post": { + "operationId": "projectsValidate", + "tags": ["projects"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Project ID", + "in": "path", + "required": true + }, + { + "name": "projectsValidateModel", + "description": "notrigger \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/projectsValidateModel" + } + } + ], + "summary": "Validate a project. 🔐", + "description": "You can test this API with the following input message { \"notrigger\": 0 }", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/proposals/{id}": { + "get": { + "operationId": "retrieveProposals", + "tags": ["proposals"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of commercial proposal", + "in": "path", + "required": true + }, + { + "name": "contact_list", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "description": "0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id", + "in": "query", + "required": false + } + ], + "summary": "Get properties of a commercial proposal object 🔐", + "description": "Return an array with commercial proposal information", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "put": { + "operationId": "updateProposals", + "tags": ["proposals"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of commercial proposal to update", + "in": "path", + "required": true + }, + { + "name": "updateProposalsModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/updateProposalsModel" + } + } + ], + "summary": "Update commercial proposal general fields (won't touch lines of commercial proposal) 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "removeProposals", + "tags": ["proposals"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Commercial proposal ID", + "in": "path", + "required": true + } + ], + "summary": "Delete commercial proposal 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/proposals/ref/{ref}": { + "get": { + "operationId": "proposalsRetrieveByRef", + "tags": ["proposals"], + "parameters": [ + { + "name": "ref", + "type": "string", + "description": "Ref of object", + "in": "path", + "required": true + }, + { + "name": "contact_list", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "description": "0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id", + "in": "query", + "required": false + } + ], + "summary": "Get properties of an proposal object by ref 🔐", + "description": "Return an array with proposal information", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/proposals/ref_ext/{ref_ext}": { + "get": { + "operationId": "proposalsRetrieveByRefExt", + "tags": ["proposals"], + "parameters": [ + { + "name": "ref_ext", + "type": "string", + "description": "External reference of object", + "in": "path", + "required": true + }, + { + "name": "contact_list", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "description": "0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id", + "in": "query", + "required": false + } + ], + "summary": "Get properties of an proposal object by ref_ext 🔐", + "description": "Return an array with proposal information", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/proposals": { + "get": { + "operationId": "listProposals", + "tags": ["proposals"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "t.rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + }, + { + "name": "thirdparty_ids", + "type": "string", + "description": "Thirdparty ids to filter commercial proposals (example '1' or '1,2,3')", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.datec:<:'2016-01-01')\"", + "in": "query", + "required": false + }, + { + "name": "properties", + "type": "string", + "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", + "in": "query", + "required": false + } + ], + "summary": "List commercial proposals 🔐", + "description": "Get a list of commercial proposals", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "createProposals", + "tags": ["proposals"], + "parameters": [ + { + "name": "createProposalsModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/createProposalsModel" + } + } + ], + "summary": "Create commercial proposal object 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/proposals/{id}/lines": { + "get": { + "operationId": "proposalsRetrieveLines", + "tags": ["proposals"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of commercial proposal", + "in": "path", + "required": true + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. d is the alias for proposal lines table, p is the alias for product table. \"Syntax example \"(p.ref:like:'SO-%') AND (d.date_start:<:'20220101')\"", + "in": "query", + "required": false + } + ], + "summary": "Get lines of a commercial proposal 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "proposalsCreateLines", + "tags": ["proposals"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of commercial proposal to update", + "in": "path", + "required": true + }, + { + "name": "proposalsCreateLinesModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/proposalsCreateLinesModel" + } + } + ], + "summary": "Add lines to given commercial proposal 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/proposals/{id}/line": { + "post": { + "operationId": "proposalsCreateLine", + "tags": ["proposals"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of commercial proposal to update", + "in": "path", + "required": true + }, + { + "name": "proposalsCreateLineModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/proposalsCreateLineModel" + } + } + ], + "summary": "Add a line to given commercial proposal 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/proposals/{id}/lines/{lineid}": { + "put": { + "operationId": "proposalsUpdateLine", + "tags": ["proposals"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of commercial proposal to update", + "in": "path", + "required": true + }, + { + "name": "lineid", + "type": "integer", + "format": "int64", + "description": "Id of line to update", + "in": "path", + "required": true + }, + { + "name": "proposalsUpdateLineModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/proposalsUpdateLineModel" + } + } + ], + "summary": "Update a line of given commercial proposal 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "proposalsRemoveLine", + "tags": ["proposals"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of commercial proposal to update", + "in": "path", + "required": true + }, + { + "name": "lineid", + "type": "integer", + "format": "int64", + "description": "Id of line to delete", + "in": "path", + "required": true + } + ], + "summary": "Delete a line of given commercial proposal 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/proposals/{id}/contact/{contactid}/{type}/{source}": { + "post": { + "operationId": "proposalsCreateContact", + "tags": ["proposals"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of commercial proposal to update", + "in": "path", + "required": true + }, + { + "name": "contactid", + "type": "integer", + "format": "int64", + "description": "Id of external or internal contact to add", + "in": "path", + "required": true + }, + { + "name": "type", + "type": "string", + "description": "Type of the external contact (BILLING, SHIPPING, CUSTOMER), internal contact (SALESREPFOLL)", + "in": "path", + "required": true + }, + { + "name": "source", + "type": "string", + "defaultValue": "external", + "description": "Source of the contact (internal, external)", + "in": "path", + "required": false + } + ], + "summary": "Add a contact type of given commercial proposal 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/proposals/{id}/contact/{contactid}/{type}": { + "delete": { + "operationId": "proposalsRemoveContact", + "tags": ["proposals"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of commercial proposal to update", + "in": "path", + "required": true + }, + { + "name": "contactid", + "type": "integer", + "format": "int64", + "description": "Row key of the contact in the array contact_ids.", + "in": "path", + "required": true + }, + { + "name": "type", + "type": "string", + "description": "Type of the contact (BILLING, SHIPPING, CUSTOMER).", + "in": "path", + "required": true + } + ], + "summary": "Delete a contact type of given commercial proposal 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "System error" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/proposals/{id}/settodraft": { + "post": { + "operationId": "proposalsSettodraft", + "tags": ["proposals"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Order ID", + "in": "path", + "required": true + } + ], + "summary": "Set a proposal to draft 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/proposals/{id}/validate": { + "post": { + "operationId": "proposalsValidate", + "tags": ["proposals"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Commercial proposal ID", + "in": "path", + "required": true + }, + { + "name": "proposalsValidateModel", + "description": "notrigger \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/proposalsValidateModel" + } + } + ], + "summary": "Validate a commercial proposal 🔐", + "description": "If you get a bad value for param notrigger check that ou provide this in body { \"notrigger\": 0 }", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "304": { + "description": "Not Modified" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "System error" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/proposals/{id}/close": { + "post": { + "operationId": "proposalsClose", + "tags": ["proposals"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Commercial proposal ID", + "in": "path", + "required": true + }, + { + "name": "proposalsCloseModel", + "description": "**status** (required) \nnote_private \nnotrigger \n", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/proposalsCloseModel" + } + } + ], + "summary": "Close (Accept or refuse) a quote / commercial proposal 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/proposals/{id}/setinvoiced": { + "post": { + "operationId": "proposalsSetinvoiced", + "tags": ["proposals"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Commercial proposal ID", + "in": "path", + "required": true + } + ], + "summary": "Set a commercial proposal billed. Could be also called setbilled 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/salaries": { + "get": { + "operationId": "listSalaries", + "tags": ["salaries"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "t.rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + } + ], + "summary": "Get the list of salaries. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "createSalaries", + "tags": ["salaries"], + "parameters": [ + { + "name": "createSalariesModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/createSalariesModel" + } + } + ], + "summary": "Create salary object 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/salaries/{id}": { + "get": { + "operationId": "retrieveSalaries", + "tags": ["salaries"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of salary", + "in": "path", + "required": true + } + ], + "summary": "Get salary by ID. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "put": { + "operationId": "updateSalaries", + "tags": ["salaries"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of salary", + "in": "path", + "required": true + }, + { + "name": "updateSalariesModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/updateSalariesModel" + } + } + ], + "summary": "Update salary 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/salaries/payments": { + "get": { + "operationId": "salariesRetrieveAllPayments", + "tags": ["salaries"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "t.rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + } + ], + "summary": "Get the list of payment of salaries. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/salaries/payments/{pid}": { + "get": { + "operationId": "salariesRetrievePayments", + "tags": ["salaries"], + "parameters": [ + { + "name": "pid", + "type": "integer", + "format": "int64", + "description": "ID of payment salary", + "in": "path", + "required": true + } + ], + "summary": "Get a given payment. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/salaries/{id}/payments": { + "post": { + "operationId": "salariesUpdatePayment", + "tags": ["salaries"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of paymentsalary", + "in": "path", + "required": true + }, + { + "name": "salariesUpdatePaymentModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/salariesUpdatePaymentModel" + } + } + ], + "summary": "Update paymentsalary 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/ordering_methods": { + "get": { + "operationId": "setupRetrieveOrderingMethods", + "tags": ["setup"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "code", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Number of items per page", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + }, + { + "name": "active", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "maximum": 1, + "description": "Payment type is active or not", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "SQL criteria to filter with. Syntax example \"(t.code:=:'OrderByWWW')\"", + "in": "query", + "required": false + } + ], + "summary": "Get the list of ordering methods. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad value for sqlfilters" + }, + "403": { + "description": "Access denied" + }, + "503": { + "description": "Error retrieving list of ordering methods" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/ordering_origins": { + "get": { + "operationId": "setupRetrieveOrderingOrigins", + "tags": ["setup"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "code", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Number of items per page", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + }, + { + "name": "active", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "maximum": 1, + "description": "Payment type is active or not", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "SQL criteria to filter with. Syntax example \"(t.code:=:'OrderByWWW')\"", + "in": "query", + "required": false + } + ], + "summary": "Get the list of ordering origins. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad value for sqlfilters" + }, + "403": { + "description": "Access denied" + }, + "503": { + "description": "Error retrieving list of ordering origins" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/payment_types": { + "get": { + "operationId": "setupRetrievePaymentTypes", + "tags": ["setup"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "code", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Number of items per page", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + }, + { + "name": "active", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "maximum": 1, + "description": "Payment type is active or not", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "SQL criteria to filter with. Syntax example \"(t.code:=:'CHQ')\"", + "in": "query", + "required": false + } + ], + "summary": "Get the list of payments types. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad value for sqlfilters" + }, + "403": { + "description": "Access denied" + }, + "503": { + "description": "Error retrieving list of payment types" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/regions": { + "get": { + "operationId": "setupRetrieveListOfRegions", + "tags": ["setup"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "code_region", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Number of items per page", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number (starting from zero)", + "in": "query", + "required": false + }, + { + "name": "country", + "type": "integer", + "format": "int64", + "description": "To filter on country", + "in": "query", + "required": false + }, + { + "name": "filter", + "type": "string", + "description": "To filter the regions by name", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", + "in": "query", + "required": false + } + ], + "summary": "Get the list of regions. 🔐", + "description": " The returned list is sorted by region ID.", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad value for sqlfilters" + }, + "503": { + "description": "Error retrieving list of regions" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/regions/{id}": { + "get": { + "operationId": "setupRetrieveRegionByID", + "tags": ["setup"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of region", + "in": "path", + "required": true + } + ], + "summary": "Get region by ID. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "404": { + "description": "Region not found" + }, + "503": { + "description": "Error retrieving region" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/regions/byCode/{code}": { + "get": { + "operationId": "setupRetrieveRegionByCode", + "tags": ["setup"], + "parameters": [ + { + "name": "code", + "type": "string", + "description": "Code of region", + "in": "path", + "required": true + } + ], + "summary": "Get region by Code. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "404": { + "description": "Region not found" + }, + "503": { + "description": "Error when retrieving region" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/states": { + "get": { + "operationId": "setupRetrieveListOfStates", + "tags": ["setup"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "code_departement", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Number of items per page", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number (starting from zero)", + "in": "query", + "required": false + }, + { + "name": "country", + "type": "integer", + "format": "int64", + "description": "To filter on country", + "in": "query", + "required": false + }, + { + "name": "filter", + "type": "string", + "description": "To filter the states by name", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", + "in": "query", + "required": false + } + ], + "summary": "Get the list of states/provinces. 🔐", + "description": " The names of the states will be translated to the given language if the $lang parameter is provided. The value of $lang must be a language code supported by Dolibarr, for example 'en_US' or 'fr_FR'. The returned list is sorted by state ID.", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad value for sqlfilters" + }, + "503": { + "description": "Error retrieving list of states" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/states/{id}": { + "get": { + "operationId": "setupRetrieveStateByID", + "tags": ["setup"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of state", + "in": "path", + "required": true + } + ], + "summary": "Get state by ID. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "404": { + "description": "State not found" + }, + "503": { + "description": "Error retrieving state" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/states/byCode/{code}": { + "get": { + "operationId": "setupRetrieveStateByCode", + "tags": ["setup"], + "parameters": [ + { + "name": "code", + "type": "string", + "description": "Code of state", + "in": "path", + "required": true + } + ], + "summary": "Get state by Code. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "404": { + "description": "State not found" + }, + "503": { + "description": "Error retrieving state" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/countries": { + "get": { + "operationId": "setupRetrieveListOfCountries", + "tags": ["setup"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "code", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Number of items per page", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number (starting from zero)", + "in": "query", + "required": false + }, + { + "name": "filter", + "type": "string", + "description": "To filter the countries by name", + "in": "query", + "required": false + }, + { + "name": "lang", + "type": "string", + "description": "Code of the language the label of the countries must be translated to", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", + "in": "query", + "required": false + } + ], + "summary": "Get the list of countries. 🔐", + "description": " The names of the countries will be translated to the given language if the $lang parameter is provided. The value of $lang must be a language code supported by Dolibarr, for example 'en_US' or 'fr_FR'. The returned list is sorted by country ID.", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad value for sqlfilters" + }, + "503": { + "description": "Error retrieving list of countries" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/countries/{id}": { + "get": { + "operationId": "setupRetrieveCountryByID", + "tags": ["setup"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of country", + "in": "path", + "required": true + }, + { + "name": "lang", + "type": "string", + "description": "Code of the language the name of the country must be translated to", + "in": "query", + "required": false + } + ], + "summary": "Get country by ID. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "404": { + "description": "Country not found" + }, + "503": { + "description": "Error retrieving country" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/countries/byCode/{code}": { + "get": { + "operationId": "setupRetrieveCountryByCode", + "tags": ["setup"], + "parameters": [ + { + "name": "code", + "type": "string", + "description": "Code of country (2 characters)", + "in": "path", + "required": true + }, + { + "name": "lang", + "type": "string", + "description": "Code of the language the name of the country must be translated to", + "in": "query", + "required": false + } + ], + "summary": "Get country by Code. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "404": { + "description": "Country not found" + }, + "503": { + "description": "Error retrieving country" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/countries/byISO/{iso}": { + "get": { + "operationId": "setupRetrieveCountryByISO", + "tags": ["setup"], + "parameters": [ + { + "name": "iso", + "type": "string", + "description": "ISO of country (3 characters)", + "in": "path", + "required": true + }, + { + "name": "lang", + "type": "string", + "description": "Code of the language the name of the country must be translated to", + "in": "query", + "required": false + } + ], + "summary": "Get country by Iso. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "404": { + "description": "Country not found" + }, + "503": { + "description": "Error retrieving country" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/availability": { + "get": { + "operationId": "setupRetrieveAvailability", + "tags": ["setup"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "code", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Number of items per page", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + }, + { + "name": "active", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "maximum": 1, + "description": "Delivery times is active or not", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "SQL criteria to filter with.", + "in": "query", + "required": false + } + ], + "summary": "Get the list of delivery times. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad value for sqlfilters" + }, + "403": { + "description": "Access denied" + }, + "503": { + "description": "Error when retrieving list of availabilities" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/event_types": { + "get": { + "operationId": "setupRetrieveListOfEventTypes", + "tags": ["setup"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "code", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Number of items per page", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number (starting from zero)", + "in": "query", + "required": false + }, + { + "name": "type", + "type": "string", + "description": "To filter on type of event", + "in": "query", + "required": false + }, + { + "name": "module", + "type": "string", + "description": "To filter on module events", + "in": "query", + "required": false + }, + { + "name": "active", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "maximum": 1, + "description": "Event's type is active or not", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", + "in": "query", + "required": false + } + ], + "summary": "Get the list of events types. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad value for sqlfilters" + }, + "503": { + "description": "Error when retrieving list of events types" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/expensereport_types": { + "get": { + "operationId": "setupRetrieveListOfExpenseReportsTypes", + "tags": ["setup"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "code", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Number of items per page", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number (starting from zero)", + "in": "query", + "required": false + }, + { + "name": "module", + "type": "string", + "description": "To filter on module", + "in": "query", + "required": false + }, + { + "name": "active", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "maximum": 1, + "description": "Event's type is active or not", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", + "in": "query", + "required": false + } + ], + "summary": "Get the list of Expense Report types. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad value for sqlfilters" + }, + "503": { + "description": "Error when retrieving list of expense report types" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/contact_types": { + "get": { + "operationId": "setupRetrieveListOfContactTypes", + "tags": ["setup"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "code", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Number of items per page", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number (starting from zero)", + "in": "query", + "required": false + }, + { + "name": "type", + "type": "string", + "description": "To filter on type of contact", + "in": "query", + "required": false + }, + { + "name": "module", + "type": "string", + "description": "To filter on module contacts", + "in": "query", + "required": false + }, + { + "name": "active", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "maximum": 1, + "description": "Contact's type is active or not", + "in": "query", + "required": false + }, + { + "name": "lang", + "type": "string", + "description": "Code of the language the label of the civility must be translated to", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", + "in": "query", + "required": false + } + ], + "summary": "Get the list of contacts types. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad value for sqlfilters" + }, + "503": { + "description": "Error when retrieving list of contacts types" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/civilities": { + "get": { + "operationId": "setupRetrieveListOfCivilities", + "tags": ["setup"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "code", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Number of items per page", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number (starting from zero)", + "in": "query", + "required": false + }, + { + "name": "module", + "type": "string", + "description": "To filter on module events", + "in": "query", + "required": false + }, + { + "name": "active", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "maximum": 1, + "description": "Civility is active or not", + "in": "query", + "required": false + }, + { + "name": "lang", + "type": "string", + "description": "Code of the language the label of the civility must be translated to", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", + "in": "query", + "required": false + } + ], + "summary": "Get the list of civilities. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad value for sqlfilters" + }, + "503": { + "description": "Error when retrieving list of civilities" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/currencies": { + "get": { + "operationId": "setupRetrieveListOfCurrencies", + "tags": ["setup"], + "parameters": [ + { + "name": "multicurrency", + "type": "integer", + "format": "int64", + "maximum": 2, + "description": "Multicurrency rates (0: no multicurrency, 1: last rate, 2: all rates)", + "in": "query", + "required": false + }, + { + "name": "sortfield", + "type": "string", + "defaultValue": "code_iso", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Number of items per page", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number (starting from zero)", + "in": "query", + "required": false + }, + { + "name": "active", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "maximum": 1, + "description": "Payment term is active or not", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", + "in": "query", + "required": false + } + ], + "summary": "Get the list of currencies. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad value for sqlfilters" + }, + "503": { + "description": "Error when retrieving list of currencies" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/extrafields": { + "get": { + "operationId": "setupRetrieveListOfExtrafields", + "tags": ["setup"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "t.pos", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "elementtype", + "type": "string", + "description": "Type of element ('adherent', 'commande', 'thirdparty', 'facture', 'propal', 'product', ...)", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.label:like:'SO-%')\"", + "in": "query", + "required": false + } + ], + "summary": "Get the list of extra fields. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad value for sqlfilters" + }, + "503": { + "description": "Error when retrieving list of extra fields" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/extrafields/{elementtype}/{attrname}": { + "delete": { + "operationId": "setupRemoveExtrafieldsFromNames", + "tags": ["setup"], + "parameters": [ + { + "name": "attrname", + "type": "string", + "description": "extrafield attrname", + "in": "path", + "required": true + }, + { + "name": "elementtype", + "type": "string", + "description": "extrafield elementtype", + "in": "path", + "required": true + } + ], + "summary": "Delete extrafield 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "get": { + "operationId": "setupRetrieveExtrafields", + "tags": ["setup"], + "parameters": [ + { + "name": "attrname", + "type": "string", + "description": "extrafield attrname", + "in": "path", + "required": true + }, + { + "name": "elementtype", + "type": "string", + "description": "extrafield elementtype", + "in": "path", + "required": true + } + ], + "summary": " 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "setupCreateExtrafields", + "tags": ["setup"], + "parameters": [ + { + "name": "attrname", + "type": "string", + "description": "extrafield attrname", + "in": "path", + "required": true + }, + { + "name": "elementtype", + "type": "string", + "description": "extrafield elementtype", + "in": "path", + "required": true + }, + { + "name": "setupCreateExtrafieldsModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/setupCreateExtrafieldsModel" + } + } + ], + "summary": "Create Extrafield object 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "put": { + "operationId": "setupUpdateExtrafields", + "tags": ["setup"], + "parameters": [ + { + "name": "attrname", + "type": "string", + "description": "extrafield attrname", + "in": "path", + "required": true + }, + { + "name": "elementtype", + "type": "string", + "description": "extrafield elementtype", + "in": "path", + "required": true + }, + { + "name": "setupUpdateExtrafieldsModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/setupUpdateExtrafieldsModel" + } + } + ], + "summary": "Update Extrafield object 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/towns": { + "get": { + "operationId": "setupRetrieveListOfTowns", + "tags": ["setup"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "zip,town", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Number of items per page", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number (starting from zero)", + "in": "query", + "required": false + }, + { + "name": "zipcode", + "type": "string", + "description": "To filter on zipcode", + "in": "query", + "required": false + }, + { + "name": "town", + "type": "string", + "description": "To filter on city name", + "in": "query", + "required": false + }, + { + "name": "active", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "maximum": 1, + "description": "Town is active or not", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", + "in": "query", + "required": false + } + ], + "summary": "Get the list of towns. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad value for sqlfilters" + }, + "503": { + "description": "Error when retrieving list of towns" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/payment_terms": { + "get": { + "operationId": "setupRetrievePaymentTerms", + "tags": ["setup"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "sortorder", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Number of items per page", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + }, + { + "name": "active", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "maximum": 1, + "description": "Payment term is active or not", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "SQL criteria to filter. Syntax example \"(t.code:=:'CHQ')\"", + "in": "query", + "required": false + } + ], + "summary": "Get the list of payments terms. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad value for sqlfilters" + }, + "403": { + "description": "Access denied" + }, + "503": { + "description": "Error when retrieving list of payments terms" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/shipping_methods": { + "get": { + "operationId": "setupRetrieveShippingModes", + "tags": ["setup"], + "parameters": [ + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Number of items per page", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + }, + { + "name": "active", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "maximum": 1, + "description": "Shipping methodsm is active or not", + "in": "query", + "required": false + }, + { + "name": "lang", + "type": "string", + "description": "Code of the language the label of the method must be translated to", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "SQL criteria to filter. Syntax example \"(t.code:=:'CHQ')\"", + "in": "query", + "required": false + } + ], + "summary": "Get the list of shipping methods. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad value for sqlfilters" + }, + "503": { + "description": "Error when retrieving list of shipping modes" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/units": { + "get": { + "operationId": "setupRetrieveListOfMeasuringUnits", + "tags": ["setup"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Number of items per page", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number (starting from zero)", + "in": "query", + "required": false + }, + { + "name": "active", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "maximum": 1, + "description": "Measuring unit is active or not", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", + "in": "query", + "required": false + } + ], + "summary": "Get the list of measuring units. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad value for sqlfilters" + }, + "503": { + "description": "Error when retrieving list of measuring units" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/legal_form": { + "get": { + "operationId": "setupRetrieveListOfLegalForm", + "tags": ["setup"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Number of items per page", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number (starting from zero)", + "in": "query", + "required": false + }, + { + "name": "country", + "type": "integer", + "format": "int64", + "description": "To filter on country", + "in": "query", + "required": false + }, + { + "name": "active", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "maximum": 1, + "description": "Lega form is active or not", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", + "in": "query", + "required": false + } + ], + "summary": "Get the list of legal form of business. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad value for sqlfilters" + }, + "503": { + "description": "Error when retrieving list of legal form" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/staff": { + "get": { + "operationId": "setupRetrieveListOfStaff", + "tags": ["setup"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "id", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Number of items per page", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number (starting from zero)", + "in": "query", + "required": false + }, + { + "name": "active", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "maximum": 1, + "description": "Staff is active or not", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", + "in": "query", + "required": false + } + ], + "summary": "Get the list of staff. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad value for sqlfilters" + }, + "503": { + "description": "Error when retrieving list of staff" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/socialnetworks": { + "get": { + "operationId": "setupRetrieveListOfsocialNetworks", + "tags": ["setup"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Number of items per page", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number (starting from zero)", + "in": "query", + "required": false + }, + { + "name": "active", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "maximum": 1, + "description": "Social network is active or not", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", + "in": "query", + "required": false + } + ], + "summary": "Get the list of social networks. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad value for sqlfilters" + }, + "503": { + "description": "Error when retrieving list of social networks" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/ticket_categories": { + "get": { + "operationId": "setupRetrieveTicketsCategories", + "tags": ["setup"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "code", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Number of items per page", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number (starting from zero)", + "in": "query", + "required": false + }, + { + "name": "active", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "maximum": 1, + "description": "Payment term is active or not", + "in": "query", + "required": false + }, + { + "name": "lang", + "type": "string", + "description": "Code of the language the label of the category must be translated to", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", + "in": "query", + "required": false + } + ], + "summary": "Get the list of tickets categories. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad value for sqlfilters" + }, + "503": { + "description": "Error when retrieving list of tickets categories" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/ticket_severities": { + "get": { + "operationId": "setupRetrieveTicketsSeverities", + "tags": ["setup"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "code", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Number of items per page", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number (starting from zero)", + "in": "query", + "required": false + }, + { + "name": "active", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "maximum": 1, + "description": "Payment term is active or not", + "in": "query", + "required": false + }, + { + "name": "lang", + "type": "string", + "description": "Code of the language the label of the severity must be translated to", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", + "in": "query", + "required": false + } + ], + "summary": "Get the list of tickets severity. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad value for sqlfilters" + }, + "503": { + "description": "Error when retrieving list of tickets severities" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/ticket_types": { + "get": { + "operationId": "setupRetrieveTicketsTypes", + "tags": ["setup"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "code", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Number of items per page", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number (starting from zero)", + "in": "query", + "required": false + }, + { + "name": "active", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "maximum": 1, + "description": "Payment term is active or not", + "in": "query", + "required": false + }, + { + "name": "lang", + "type": "string", + "description": "Code of the language the label of the type must be translated to", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", + "in": "query", + "required": false + } + ], + "summary": "Get the list of tickets types. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad value for sqlfilters" + }, + "503": { + "description": "Error when retrieving list of tickets types" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/dictionary/incoterms": { + "get": { + "operationId": "setupRetrieveListOfIncoterms", + "tags": ["setup"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "code", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Number of items per page", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number (starting from zero)", + "in": "query", + "required": false + }, + { + "name": "active", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "maximum": 1, + "description": "Payment term is active or not", + "in": "query", + "required": false + }, + { + "name": "lang", + "type": "string", + "description": "Code of the language the label of the type must be translated to", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", + "in": "query", + "required": false + } + ], + "summary": "Get the list of incoterms. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "503": { + "description": "Error when retrieving list of incoterms types" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/company": { + "get": { + "operationId": "setupRetrieveCompany", + "tags": ["setup"], + "parameters": [], + "summary": "Get properties of company 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/establishments": { + "get": { + "operationId": "setupRetrieveEstablishments", + "tags": ["setup"], + "parameters": [], + "summary": "Get the list of establishments. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "503": { + "description": "Error when retrieving list of establishments" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/establishments/{id}": { + "get": { + "operationId": "setupRetrieveEtablishmentByID", + "tags": ["setup"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of establishment", + "in": "path", + "required": true + } + ], + "summary": "Get establishment by ID. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "404": { + "description": "Establishment not found" + }, + "503": { + "description": "Error when retrieving establishment" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/conf/{constantname}": { + "get": { + "operationId": "setupRetrieveConf", + "tags": ["setup"], + "parameters": [ + { + "name": "constantname", + "type": "string", + "description": "Name of conf variable to get", + "in": "path", + "required": true + } + ], + "summary": "Get value of a setup variables 🔐", + "description": "Note that conf variables that stores security key or password hashes can't be loaded with API.", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "Error Bad or unknown value for constantname" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/checkintegrity": { + "get": { + "operationId": "setupRetrieveCheckIntegrity", + "tags": ["setup"], + "parameters": [ + { + "name": "target", + "type": "string", + "description": "Can be 'local' or 'default' or Url of the signatures file to use for the test. Must be reachable by the tested Dolibarr.", + "in": "query", + "required": true + } + ], + "summary": "Do a test of integrity for files and setup. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Signature file not found" + }, + "500": { + "description": "Technical error" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/setup/modules": { + "get": { + "operationId": "setupRetrieveModules", + "tags": ["setup"], + "parameters": [], + "summary": "Get list of enabled modules 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/status": { + "get": { + "operationId": "listStatus", + "tags": ["status"], + "parameters": [], + "summary": "Get status (Dolibarr version) 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/supplierinvoices/{id}": { + "get": { + "operationId": "retrieveSupplierinvoices", + "tags": ["supplierinvoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of supplier invoice", + "in": "path", + "required": true + } + ], + "summary": "Get properties of a supplier invoice object 🔐", + "description": "Return an array with supplier invoice information", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "500": { + "description": "404" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "put": { + "operationId": "updateSupplierinvoices", + "tags": ["supplierinvoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of supplier invoice to update", + "in": "path", + "required": true + }, + { + "name": "updateSupplierinvoicesModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/updateSupplierinvoicesModel" + } + } + ], + "summary": "Update supplier invoice 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "removeSupplierinvoices", + "tags": ["supplierinvoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Supplier invoice ID", + "in": "path", + "required": true + } + ], + "summary": "Delete supplier invoice 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "System error" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/supplierinvoices": { + "get": { + "operationId": "listSupplierinvoices", + "tags": ["supplierinvoices"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "t.rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + }, + { + "name": "thirdparty_ids", + "type": "string", + "description": "Thirdparty ids to filter invoices of (example '1' or '1,2,3')", + "in": "query", + "required": false + }, + { + "name": "status", + "type": "string", + "description": "Filter by invoice status : draft | unpaid | paid | cancelled", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.datec:<:'20160101')\"", + "in": "query", + "required": false + }, + { + "name": "properties", + "type": "string", + "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", + "in": "query", + "required": false + } + ], + "summary": "List invoices 🔐", + "description": "Get a list of supplier invoices", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "createSupplierinvoices", + "tags": ["supplierinvoices"], + "parameters": [ + { + "name": "createSupplierinvoicesModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/createSupplierinvoicesModel" + } + } + ], + "summary": "Create supplier invoice object 🔐", + "description": "Note: soc_id = dolibarr_order_id Example: {'ref': 'auto', 'ref_supplier': '7985630', 'socid': 1, 'note': 'Inserted with Python', 'order_supplier': 1, 'date': '2021-07-28'}", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "403": { + "description": "Forbidden" + }, + "500": { + "description": "System error" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/supplierinvoices/{id}/validate": { + "post": { + "operationId": "supplierinvoicesValidate", + "tags": ["supplierinvoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Invoice ID", + "in": "path", + "required": true + }, + { + "name": "supplierinvoicesValidateModel", + "description": "idwarehouse \nnotrigger \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/supplierinvoicesValidateModel" + } + } + ], + "summary": "Validate an invoice 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "304": { + "description": "Not Modified" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + }, + "405": { + "description": "Method Not Allowed" + }, + "500": { + "description": "System error" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/supplierinvoices/{id}/payments": { + "get": { + "operationId": "supplierinvoicesRetrievePayments", + "tags": ["supplierinvoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of SupplierInvoice", + "in": "path", + "required": true + } + ], + "summary": "Get list of payments of a given supplier invoice 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad Request" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + }, + "405": { + "description": "Method Not Allowed" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "supplierinvoicesAddPayment", + "tags": ["supplierinvoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of invoice", + "in": "path", + "required": true + }, + { + "name": "supplierinvoicesAddPaymentModel", + "description": "**datepaye** (required) \n**payment_mode_id** (required) \n**closepaidinvoices** (required) \n**accountid** (required) \nnum_payment \ncomment \nchqemetteur \nchqbank \namount \n", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/supplierinvoicesAddPaymentModel" + } + } + ], + "summary": "Add payment line to a specific supplier invoice with the remain to pay as amount. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "400": { + "description": "Bad Request" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/supplierinvoices/{id}/lines": { + "get": { + "operationId": "supplierinvoicesRetrieveLines", + "tags": ["supplierinvoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of supplier invoice", + "in": "path", + "required": true + } + ], + "summary": "Get lines of a supplier invoice 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "supplierinvoicesCreateLine", + "tags": ["supplierinvoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of supplier invoice to update", + "in": "path", + "required": true + }, + { + "name": "supplierinvoicesCreateLineModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/supplierinvoicesCreateLineModel" + } + } + ], + "summary": "Add a line to given supplier invoice 🔐", + "description": "Note: socid = dolibarr_order_id, pu_ht = net price, remise = discount Example: {'socid': 1, 'qty': 1, 'pu_ht': 21.0, 'tva_tx': 25.0, 'fk_product': '1189', 'product_type': 0, 'remise_percent': 1.0, 'vat_src_code': None}", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/supplierinvoices/{id}/lines/{lineid}": { + "put": { + "operationId": "supplierinvoicesUpdateLine", + "tags": ["supplierinvoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of supplier invoice to update", + "in": "path", + "required": true + }, + { + "name": "lineid", + "type": "integer", + "format": "int64", + "description": "Id of line to update", + "in": "path", + "required": true + }, + { + "name": "supplierinvoicesUpdateLineModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/supplierinvoicesUpdateLineModel" + } + } + ], + "summary": "Update a line to a given supplier invoice 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "403": { + "description": "Not allowed" + }, + "404": { + "description": "Not found" + }, + "304": { + "description": "Error" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "supplierinvoicesRemoveLine", + "tags": ["supplierinvoices"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of supplier invoice", + "in": "path", + "required": true + }, + { + "name": "lineid", + "type": "integer", + "format": "int64", + "description": "Id of the line to delete", + "in": "path", + "required": true + } + ], + "summary": "Deletes a line of a given supplier invoice 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad parameters" + }, + "403": { + "description": "Not allowed" + }, + "404": { + "description": "Not found" + }, + "405": { + "description": "Error" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/supplierorders/{id}": { + "get": { + "operationId": "retrieveSupplierorders", + "tags": ["supplierorders"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of supplier order", + "in": "path", + "required": true + } + ], + "summary": "Get properties of a supplier order object 🔐", + "description": "Return an array with supplier order information", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "put": { + "operationId": "updateSupplierorders", + "tags": ["supplierorders"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of supplier order to update", + "in": "path", + "required": true + }, + { + "name": "updateSupplierordersModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/updateSupplierordersModel" + } + } + ], + "summary": "Update supplier order 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "removeSupplierorders", + "tags": ["supplierorders"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Supplier order ID", + "in": "path", + "required": true + } + ], + "summary": "Delete supplier order 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/supplierorders": { + "get": { + "operationId": "listSupplierorders", + "tags": ["supplierorders"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "t.rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + }, + { + "name": "thirdparty_ids", + "type": "string", + "description": "Thirdparty ids to filter orders of (example '1' or '1,2,3')", + "in": "query", + "required": false + }, + { + "name": "product_ids", + "type": "string", + "description": "Product ids to filter orders of (example '1' or '1,2,3')", + "in": "query", + "required": false + }, + { + "name": "status", + "type": "string", + "description": "Filter by order status : draft | validated | approved | running | received_start | received_end | cancelled | refused", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.datec:<:'20160101')\"", + "in": "query", + "required": false + }, + { + "name": "sqlfilterlines", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(tl.fk_product:=:'17') and (tl.price:<:'250')\"", + "in": "query", + "required": false + }, + { + "name": "properties", + "type": "string", + "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", + "in": "query", + "required": false + } + ], + "summary": "List orders 🔐", + "description": "Get a list of supplier orders", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "createSupplierorders", + "tags": ["supplierorders"], + "parameters": [ + { + "name": "createSupplierordersModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/createSupplierordersModel" + } + } + ], + "summary": "Create supplier order object 🔐", + "description": "Example: {\"ref\": \"auto\", \"ref_supplier\": \"1234\", \"socid\": \"1\", \"multicurrency_code\": \"SEK\", \"multicurrency_tx\": 1, \"tva_tx\": 25, \"note\": \"Imported via the REST API\"}", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/supplierorders/{id}/contacts": { + "get": { + "operationId": "supplierordersRetrieveContacts", + "tags": ["supplierorders"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of supplier order", + "in": "path", + "required": true + }, + { + "name": "source", + "type": "string", + "description": "Source of the contact (internal, external, all).", + "in": "query", + "required": true + }, + { + "name": "type", + "type": "string", + "description": "Type of the contact (BILLING, SHIPPING, CUSTOMER, SALESREPFOLL, ...)", + "in": "query", + "required": false + } + ], + "summary": "Get contacts of given supplier order 🔐", + "description": "Return an array with contact information", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/supplierorders/{id}/contact/{contactid}/{type}/{source}": { + "post": { + "operationId": "supplierordersCreateContact", + "tags": ["supplierorders"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of supplier order to update", + "in": "path", + "required": true + }, + { + "name": "contactid", + "type": "integer", + "format": "int64", + "description": "Id of contact/user to add", + "in": "path", + "required": true + }, + { + "name": "type", + "type": "string", + "description": "Type of the contact (BILLING, SHIPPING, CUSTOMER, SALESREPFOLL, ...)", + "in": "path", + "required": true + }, + { + "name": "source", + "type": "string", + "description": "Source of the contact (external, internal)", + "in": "path", + "required": true + } + ], + "summary": "Add a contact type of given supplier order 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "supplierordersRemoveContact", + "tags": ["supplierorders"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of supplier order to update", + "in": "path", + "required": true + }, + { + "name": "contactid", + "type": "integer", + "format": "int64", + "description": "Id of contact/user to add", + "in": "path", + "required": true + }, + { + "name": "type", + "type": "string", + "description": "Type of the contact (BILLING, SHIPPING, CUSTOMER, SALESREPFOLL, ...).", + "in": "path", + "required": true + }, + { + "name": "source", + "type": "string", + "description": "Source of the contact (internal, external).", + "in": "path", + "required": true + } + ], + "summary": "Unlink a contact type of given supplier order 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "System error" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/supplierorders/{id}/validate": { + "post": { + "operationId": "supplierordersValidate", + "tags": ["supplierorders"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Order ID", + "in": "path", + "required": true + }, + { + "name": "supplierordersValidateModel", + "description": "idwarehouse \nnotrigger \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/supplierordersValidateModel" + } + } + ], + "summary": "Validate an order 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/supplierorders/{id}/approve": { + "post": { + "operationId": "supplierordersApprove", + "tags": ["supplierorders"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Order ID", + "in": "path", + "required": true + }, + { + "name": "supplierordersApproveModel", + "description": "idwarehouse \nsecondlevel \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/supplierordersApproveModel" + } + } + ], + "summary": "Approve an order 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/supplierorders/{id}/makeorder": { + "post": { + "operationId": "supplierordersMakeOrder", + "tags": ["supplierorders"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Order ID", + "in": "path", + "required": true + }, + { + "name": "supplierordersMakeOrderModel", + "description": "**date** (required) \n**method** (required) \ncomment \n", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/supplierordersMakeOrderModel" + } + } + ], + "summary": "Sends an order to the vendor 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/supplierorders/{id}/receive": { + "post": { + "operationId": "supplierordersReceiveOrder", + "tags": ["supplierorders"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Order ID", + "in": "path", + "required": true + }, + { + "name": "supplierordersReceiveOrderModel", + "description": "**closeopenorder** (required) \n**comment** (required) \n**lines** (required) \n", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/supplierordersReceiveOrderModel" + } + } + ], + "summary": "Receives the order, dispatches products. 🔐", + "description": " Example: { \"closeopenorder\": 1, \"comment\": \"\", \"lines\": [{ \"id\": 14, \"fk_product\": 112, \"qty\": 18, \"warehouse\": 1, \"price\": 114, \"comment\": \"\", \"eatby\": 0, \"sellby\": 0, \"batch\": 0, \"notrigger\": 0 }] }", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/tasks/{id}": { + "get": { + "operationId": "retrieveTasks", + "tags": ["tasks"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of task", + "in": "path", + "required": true + }, + { + "name": "includetimespent", + "type": "integer", + "format": "int64", + "description": "0=Return only task. 1=Include a summary of time spent, 2=Include details of time spent lines", + "in": "query", + "required": false + } + ], + "summary": "Get properties of a task object 🔐", + "description": "Return an array with task information", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "put": { + "operationId": "updateTasks", + "tags": ["tasks"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of task to update", + "in": "path", + "required": true + }, + { + "name": "updateTasksModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/updateTasksModel" + } + } + ], + "summary": "Update task general fields (won't touch time spent of task) 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "removeTasks", + "tags": ["tasks"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Task ID", + "in": "path", + "required": true + } + ], + "summary": "Delete task 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/tasks": { + "get": { + "operationId": "listTasks", + "tags": ["tasks"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "t.rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')\"", + "in": "query", + "required": false + }, + { + "name": "properties", + "type": "string", + "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", + "in": "query", + "required": false + } + ], + "summary": "List tasks 🔐", + "description": "Get a list of tasks", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "createTasks", + "tags": ["tasks"], + "parameters": [ + { + "name": "createTasksModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/createTasksModel" + } + } + ], + "summary": "Create task object 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/tasks/{id}/roles": { + "get": { + "operationId": "tasksRetrieveRoles", + "tags": ["tasks"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of task", + "in": "path", + "required": true + }, + { + "name": "userid", + "type": "integer", + "format": "int64", + "description": "Id of user (0 = connected user)", + "in": "query", + "required": false + } + ], + "summary": "Get roles a user is assigned to a task with 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/tasks/{id}/addtimespent": { + "post": { + "operationId": "tasksAddTimeSpent", + "tags": ["tasks"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Task ID", + "in": "path", + "required": true + }, + { + "name": "tasksAddTimeSpentModel", + "description": "**date** (required) \n**duration** (required) \nuser_id \nnote \n", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/tasksAddTimeSpentModel" + } + } + ], + "summary": "Add time spent to a task of a project. 🔐", + "description": "You can test this API with the following input message { \"date\": \"2016-12-31 23:15:00\", \"duration\": 1800, \"user_id\": 1, \"note\": \"My time test\" }", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/tasks/{id}/timespent/{timespent_id}": { + "put": { + "operationId": "tasksUpdateTimeSpent", + "tags": ["tasks"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Task ID", + "in": "path", + "required": true + }, + { + "name": "timespent_id", + "type": "integer", + "format": "int64", + "description": "Time spent ID (llx_element_time.rowid)", + "in": "path", + "required": true + }, + { + "name": "tasksUpdateTimeSpentModel", + "description": "**date** (required) \n**duration** (required) \nuser_id \nnote \n", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/tasksUpdateTimeSpentModel" + } + } + ], + "summary": "Update time spent for a task of a project. 🔐", + "description": "You can test this API with the following input message { \"date\": \"2016-12-31 23:15:00\", \"duration\": 1800, \"user_id\": 1, \"note\": \"My time test\" }", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "tasksRemoveTimeSpent", + "tags": ["tasks"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Task ID", + "in": "path", + "required": true + }, + { + "name": "timespent_id", + "type": "integer", + "format": "int64", + "description": "Time spent ID (llx_element_time.rowid)", + "in": "path", + "required": true + } + ], + "summary": "Delete time spent for a task of a project. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/tasks/timespentrecordchecks/{id}": { + "get": { + "operationId": "tasksTimespentRecordChecks", + "tags": ["tasks"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Task ID", + "in": "path", + "required": true + }, + { + "name": "timespent_id", + "type": "integer", + "format": "int64", + "description": "Time spent ID (llx_element_time.rowid)", + "in": "query", + "required": true + } + ], + "summary": "Validate task & timespent IDs for timespent API methods. 🔐", + "description": "Loads the selected task & timespent records.", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/thirdparties/{id}": { + "get": { + "operationId": "retrieveThirdparties", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of third party to load", + "in": "path", + "required": true + } + ], + "summary": "Get properties of a thirdparty object 🔐", + "description": "Return an array with thirdparty information", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "put": { + "operationId": "updateThirdparties", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of thirdparty to update", + "in": "path", + "required": true + }, + { + "name": "updateThirdpartiesModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/updateThirdpartiesModel" + } + } + ], + "summary": "Update thirdparty 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "Internal Server Error" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "removeThirdparties", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Thirdparty ID", + "in": "path", + "required": true + } + ], + "summary": "Delete thirdparty 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/thirdparties/email/{email}": { + "get": { + "operationId": "thirdpartiesRetrieveByEmail", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "email", + "type": "string", + "description": "Email of third party to load", + "in": "path", + "required": true + } + ], + "summary": "Get properties of a thirdparty object by email. 🔐", + "description": " Return an array with thirdparty information", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/thirdparties/barcode/{barcode}": { + "get": { + "operationId": "thirdpartiesRetrieveByBarcode", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "barcode", + "type": "string", + "description": "Barcode of third party to load", + "in": "path", + "required": true + } + ], + "summary": "Get properties of a thirdparty object by barcode. 🔐", + "description": " Return an array with thirdparty information", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "500": { + "description": "RestException" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/thirdparties": { + "get": { + "operationId": "listThirdparties", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "t.rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + }, + { + "name": "mode", + "type": "integer", + "format": "int64", + "description": "Set to 1 to show only customers Set to 2 to show only prospects Set to 3 to show only those are not customer neither prospect Set to 4 to show only suppliers", + "in": "query", + "required": false + }, + { + "name": "category", + "type": "integer", + "format": "int64", + "description": "Use this param to filter list by category", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"((t.nom:like:'TheCompany%') or (t.name_alias:like:'TheCompany%')) and (t.datec:<:'20160101')\"", + "in": "query", + "required": false + }, + { + "name": "properties", + "type": "string", + "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", + "in": "query", + "required": false + } + ], + "summary": "List thirdparties 🔐", + "description": "Get a list of thirdparties", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "createThirdparties", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "createThirdpartiesModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/createThirdpartiesModel" + } + } + ], + "summary": "Create thirdparty object 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/thirdparties/{id}/merge/{idtodelete}": { + "put": { + "operationId": "thirdpartiesMerge", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of thirdparty to keep (the target third party)", + "in": "path", + "required": true + }, + { + "name": "idtodelete", + "type": "integer", + "format": "int64", + "description": "ID of thirdparty to remove (the thirdparty to delete), once data has been merged into the target third party.", + "in": "path", + "required": true + } + ], + "summary": "Merge a third party into another one. 🔐", + "description": " Merge content (properties, notes) and objects (like invoices, events, orders, proposals, ...) of a thirdparty into a target third party, then delete the merged third party. If a property has a defined value both in third party to delete and third party to keep, the value into the third party to delete will be ignored, the value of target thirdparty will remain, except for notes (content is concatenated).", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/thirdparties/{id}/setpricelevel/{priceLevel}": { + "put": { + "operationId": "thirdpartiesSetThirdpartyPriceLevel", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of thirdparty", + "in": "path", + "required": true + }, + { + "name": "priceLevel", + "type": "integer", + "format": "int64", + "description": "Price level to apply to thirdparty", + "in": "path", + "required": true + } + ], + "summary": "Set new price level for the given thirdparty 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "400": { + "description": "Price level out of bounds" + }, + "401": { + "description": "Access not allowed for your login" + }, + "404": { + "description": "Thirdparty not found" + }, + "500": { + "description": "Error fetching/setting price level" + }, + "501": { + "description": "Request needs modules \"Thirdparties\" and \"Products\" and setting Multiprices activated" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/thirdparties/{id}/representative/{representative_id}": { + "post": { + "operationId": "thirdpartiesAddRepresentative", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of thirdparty", + "in": "path", + "required": true + }, + { + "name": "representative_id", + "type": "integer", + "format": "int64", + "description": "Id of representative", + "in": "path", + "required": true + } + ], + "summary": "Add a customer representative to a thirdparty 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "401": { + "description": "Access not allowed for your login" + }, + "404": { + "description": "User or Thirdparty not found" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "thirdpartiesRemoveRepresentative", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of thirdparty", + "in": "path", + "required": true + }, + { + "name": "representative_id", + "type": "integer", + "format": "int64", + "description": "Id of representative", + "in": "path", + "required": true + } + ], + "summary": "Delete a customer representative to a thirdparty 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "401": { + "description": "Access not allowed for your login" + }, + "404": { + "description": "User or Thirdparty not found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/thirdparties/{id}/categories": { + "get": { + "operationId": "thirdpartiesRetrieveCategories", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of thirdparty", + "in": "path", + "required": true + }, + { + "name": "sortfield", + "type": "string", + "defaultValue": "s.rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + } + ], + "summary": "Get customer categories for a thirdparty 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/thirdparties/{id}/categories/{category_id}": { + "put": { + "operationId": "thirdpartiesAddCategory", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of thirdparty", + "in": "path", + "required": true + }, + { + "name": "category_id", + "type": "integer", + "format": "int64", + "description": "Id of category", + "in": "path", + "required": true + } + ], + "summary": "Add a customer category to a thirdparty 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "thirdpartiesRemoveCategory", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of thirdparty", + "in": "path", + "required": true + }, + { + "name": "category_id", + "type": "integer", + "format": "int64", + "description": "Id of category", + "in": "path", + "required": true + } + ], + "summary": "Remove the link between a customer category and the thirdparty 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/thirdparties/{id}/supplier_categories": { + "get": { + "operationId": "thirdpartiesRetrieveSupplierCategories", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of thirdparty", + "in": "path", + "required": true + }, + { + "name": "sortfield", + "type": "string", + "defaultValue": "s.rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + } + ], + "summary": "Get supplier categories for a thirdparty 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/thirdparties/{id}/supplier_categories/{category_id}": { + "put": { + "operationId": "thirdpartiesAddSupplierCategory", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of thirdparty", + "in": "path", + "required": true + }, + { + "name": "category_id", + "type": "integer", + "format": "int64", + "description": "Id of category", + "in": "path", + "required": true + } + ], + "summary": "Add a supplier category to a thirdparty 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "thirdpartiesRemoveSupplierCategory", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of thirdparty", + "in": "path", + "required": true + }, + { + "name": "category_id", + "type": "integer", + "format": "int64", + "description": "Id of category", + "in": "path", + "required": true + } + ], + "summary": "Remove the link between a category and the thirdparty 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/thirdparties/{id}/outstandingproposals": { + "get": { + "operationId": "thirdpartiesRetrieveOutStandingProposals", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of the thirdparty", + "in": "path", + "required": true + }, + { + "name": "mode", + "type": "string", + "defaultValue": "customer", + "description": "'customer' or 'supplier'", + "in": "query", + "required": false + } + ], + "summary": "Get outstanding proposals of thirdparty 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/thirdparties/{id}/outstandingorders": { + "get": { + "operationId": "thirdpartiesRetrieveOutStandingOrder", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of the thirdparty", + "in": "path", + "required": true + }, + { + "name": "mode", + "type": "string", + "defaultValue": "customer", + "description": "'customer' or 'supplier'", + "in": "query", + "required": false + } + ], + "summary": "Get outstanding orders of thirdparty 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/thirdparties/{id}/outstandinginvoices": { + "get": { + "operationId": "thirdpartiesRetrieveOutStandingInvoices", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of the thirdparty", + "in": "path", + "required": true + }, + { + "name": "mode", + "type": "string", + "defaultValue": "customer", + "description": "'customer' or 'supplier'", + "in": "query", + "required": false + } + ], + "summary": "Get outstanding invoices of thirdparty 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/thirdparties/{id}/representatives": { + "get": { + "operationId": "thirdpartiesRetrieveSalesRepresentatives", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of the thirdparty", + "in": "path", + "required": true + }, + { + "name": "mode", + "type": "integer", + "format": "int64", + "description": "0=Array with properties, 1=Array of id.", + "in": "query", + "required": false + } + ], + "summary": "Get representatives of thirdparty 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/thirdparties/{id}/fixedamountdiscounts": { + "get": { + "operationId": "thirdpartiesRetrieveFixedAmountDiscounts", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of the thirdparty", + "in": "path", + "required": true + }, + { + "name": "filter", + "type": "string", + "defaultValue": "none", + "enum": ["none", "available", "used"], + "description": "Filter exceptional discount. \"none\" will return every discount, \"available\" returns unapplied discounts, \"used\" returns applied discounts", + "in": "query", + "required": false + }, + { + "name": "sortfield", + "type": "string", + "defaultValue": "f.type", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + } + ], + "summary": "Get fixed amount discount of a thirdparty (all sources: deposit, credit note, commercial offers...) 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "503": { + "description": "Service Unavailable" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/thirdparties/{id}/getinvoicesqualifiedforreplacement": { + "get": { + "operationId": "thirdpartiesRetrieveInvoicesQualifiedForReplacement", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of thirdparty", + "in": "path", + "required": true + } + ], + "summary": "Return list of invoices qualified to be replaced by another invoice. 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "405": { + "description": "Method Not Allowed" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/thirdparties/{id}/getinvoicesqualifiedforcreditnote": { + "get": { + "operationId": "thirdpartiesRetrieveInvoicesQualifiedForCreditNote", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of thirdparty", + "in": "path", + "required": true + } + ], + "summary": "Return list of invoices qualified to be corrected by a credit note. 🔐", + "description": "Invoices matching the following rules are returned (validated + payment on process) or classified (paid completely or paid partially) + not already replaced + not already a credit note", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "405": { + "description": "Method Not Allowed" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/thirdparties/{id}/notifications": { + "get": { + "operationId": "thirdpartiesRetrieveCompanyNotification", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of thirdparty", + "in": "path", + "required": true + } + ], + "summary": "Get CompanyNotification objects for thirdparty 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "thirdpartiesCreateCompanyNotification", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of thirdparty", + "in": "path", + "required": true + }, + { + "name": "thirdpartiesCreateCompanyNotificationModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/thirdpartiesCreateCompanyNotificationModel" + } + } + ], + "summary": "Create CompanyNotification object for thirdparty 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/thirdparties/{id}/notifications/{notification_id}": { + "delete": { + "operationId": "thirdpartiesRemoveCompanyNotification", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of thirdparty", + "in": "path", + "required": true + }, + { + "name": "notification_id", + "type": "integer", + "format": "int64", + "description": "ID of CompanyNotification", + "in": "path", + "required": true + } + ], + "summary": "Delete a CompanyNotification attached to a thirdparty 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "put": { + "operationId": "thirdpartiesUpdateCompanyNotification", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of thirdparty", + "in": "path", + "required": true + }, + { + "name": "notification_id", + "type": "integer", + "format": "int64", + "description": "ID of CompanyNotification", + "in": "path", + "required": true + }, + { + "name": "thirdpartiesUpdateCompanyNotificationModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/thirdpartiesUpdateCompanyNotificationModel" + } + } + ], + "summary": "Update CompanyNotification object for thirdparty 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/thirdparties/{id}/bankaccounts": { + "get": { + "operationId": "thirdpartiesRetrieveCompanyBankAccount", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of thirdparty", + "in": "path", + "required": true + } + ], + "summary": "Get CompanyBankAccount objects for thirdparty 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "thirdpartiesCreateCompanyBankAccount", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of thirdparty", + "in": "path", + "required": true + }, + { + "name": "thirdpartiesCreateCompanyBankAccountModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/thirdpartiesCreateCompanyBankAccountModel" + } + } + ], + "summary": "Create CompanyBankAccount object for thirdparty 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/thirdparties/{id}/bankaccounts/{bankaccount_id}": { + "put": { + "operationId": "thirdpartiesUpdateCompanyBankAccount", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of thirdparty", + "in": "path", + "required": true + }, + { + "name": "bankaccount_id", + "type": "integer", + "format": "int64", + "description": "ID of CompanyBankAccount", + "in": "path", + "required": true + }, + { + "name": "thirdpartiesUpdateCompanyBankAccountModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/thirdpartiesUpdateCompanyBankAccountModel" + } + } + ], + "summary": "Update CompanyBankAccount object for thirdparty 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "thirdpartiesRemoveCompanyBankAccount", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of thirdparty", + "in": "path", + "required": true + }, + { + "name": "bankaccount_id", + "type": "integer", + "format": "int64", + "description": "ID of CompanyBankAccount", + "in": "path", + "required": true + } + ], + "summary": "Delete a bank account attached to a thirdparty 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/thirdparties/{id}/generateBankAccountDocument/{companybankid}/{model}": { + "get": { + "operationId": "thirdpartiesGenerateBankAccountDocument", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Thirdparty id", + "in": "path", + "required": true + }, + { + "name": "companybankid", + "type": "integer", + "format": "int64", + "description": "Companybank id", + "in": "path", + "required": false + }, + { + "name": "model", + "type": "string", + "defaultValue": "sepamandate", + "description": "Model of document to generate", + "in": "path", + "required": false + } + ], + "summary": "Generate a Document from a bank account record (like SEPA mandate) 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/thirdparties/{id}/accounts": { + "get": { + "operationId": "thirdpartiesRetrieveSocieteAccounts", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of thirdparty", + "in": "path", + "required": true + }, + { + "name": "site", + "type": "string", + "description": "Site key", + "in": "query", + "required": false + } + ], + "summary": "Get a specific account attached to a thirdparty (by specifying the site key) 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized: User does not have permission to read thirdparties" + }, + "404": { + "description": "Not Found: Specified thirdparty ID does not belongs to an existing thirdparty" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "thirdpartiesCreateSocieteAccount", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of thirdparty", + "in": "path", + "required": true + }, + { + "name": "thirdpartiesCreateSocieteAccountModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/thirdpartiesCreateSocieteAccountModel" + } + } + ], + "summary": "Create and attach a new account to an existing thirdparty 🔐", + "description": "Possible fields for request_data (request body) are specified in llx_societe_account table.
See Table llx_societe_account wiki page for more information

Example body payload :
{\"key_account\": \"cus_DAVkLSs1LYyYI\", \"site\": \"stripe\"}
", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized: User does not have permission to read thirdparties" + }, + "409": { + "description": "Conflict: An Account already exists for this company and site." + }, + "500": { + "description": "Internal Server Error: Error creating SocieteAccount account" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "thirdpartiesRemoveSocieteAccounts", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of thirdparty", + "in": "path", + "required": true + } + ], + "summary": "Delete all accounts attached to a thirdparty 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized: User does not have permission to delete thirdparties accounts" + }, + "404": { + "description": "Not Found: Specified thirdparty ID does not belongs to an existing thirdparty" + }, + "500": { + "description": "Internal Server Error: Error deleting SocieteAccount entity" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/thirdparties/{id}/accounts/{site}": { + "put": { + "operationId": "thirdpartiesUpdateSocieteAccount", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of thirdparty", + "in": "path", + "required": true + }, + { + "name": "site", + "type": "string", + "description": "Site key", + "in": "path", + "required": true + }, + { + "name": "thirdpartiesUpdateSocieteAccountModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/thirdpartiesUpdateSocieteAccountModel" + } + } + ], + "summary": "Create and attach a new (or replace an existing) specific site account to a thirdparty 🔐", + "description": "You MUST pass all values to keep (otherwise, they will be deleted) !
If you just need to update specific fields prefer PATCH /thirdparties/{id}/accounts/{site} endpoint.

When a SocieteAccount entity does not exist for the id and site supplied, a new one will be created. In that case fk_soc and site members form request body payload will be ignored and id and site query strings parameters will be used instead.", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized: User does not have permission to read thirdparties" + }, + "500": { + "description": "Internal Server Error: Error updating SocieteAccount entity" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "patch": { + "operationId": "thirdpartiesModifySocieteAccount", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of thirdparty", + "in": "path", + "required": true + }, + { + "name": "site", + "type": "string", + "description": "Site key", + "in": "path", + "required": true + }, + { + "name": "thirdpartiesModifySocieteAccountModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/thirdpartiesModifySocieteAccountModel" + } + } + ], + "summary": "Update specified values of a specific account attached to a thirdparty 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized: User does not have permission to read thirdparties" + }, + "404": { + "description": "Not Found: Specified thirdparty ID does not belongs to an existing thirdparty" + }, + "409": { + "description": "Conflict: Another SocieteAccount entity already exists for this thirdparty with this site key." + }, + "500": { + "description": "Internal Server Error: Error updating SocieteAccount entity" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "thirdpartiesRemoveSocieteAccount", + "tags": ["thirdparties"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of thirdparty", + "in": "path", + "required": true + }, + { + "name": "site", + "type": "integer", + "format": "int64", + "description": "Site key", + "in": "path", + "required": true + } + ], + "summary": "Delete a specific site account attached to a thirdparty (by account id) 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized: User does not have permission to delete thirdparties accounts" + }, + "404": { + "description": "Not Found: Specified thirdparty ID does not belongs to an existing thirdparty" + }, + "500": { + "description": "Internal Server Error: Error deleting SocieteAccount entity" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/users": { + "get": { + "operationId": "listUsers", + "tags": ["users"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "t.rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + }, + { + "name": "user_ids", + "type": "string", + "description": "User ids filter field. Example: '1' or '1,2,3'", + "in": "query", + "required": false + }, + { + "name": "category", + "type": "integer", + "format": "int64", + "description": "Use this param to filter list by category", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')\"", + "in": "query", + "required": false + }, + { + "name": "properties", + "type": "string", + "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", + "in": "query", + "required": false + } + ], + "summary": "List Users 🔐", + "description": "Get a list of Users", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "operationId": "createUsers", + "tags": ["users"], + "parameters": [ + { + "name": "createUsersModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/createUsersModel" + } + } + ], + "summary": "Create user account 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "401": { + "description": "Not allowed" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/users/{id}": { + "get": { + "operationId": "retrieveUsers", + "tags": ["users"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "ID of user", + "in": "path", + "required": true + }, + { + "name": "includepermissions", + "type": "integer", + "format": "int64", + "description": "Set this to 1 to have the array of permissions loaded (not done by default for performance purpose)", + "in": "query", + "required": false + } + ], + "summary": "Get properties of an user object 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Insufficient rights" + }, + "404": { + "description": "User or group not found" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "put": { + "operationId": "updateUsers", + "tags": ["users"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of account to update", + "in": "path", + "required": true + }, + { + "name": "updateUsersModel", + "description": "request_data \n", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/updateUsersModel" + } + } + ], + "summary": "Update user account 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Obj" + } + }, + "403": { + "description": "Not allowed" + }, + "404": { + "description": "Not found" + }, + "500": { + "description": "System error" + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "delete": { + "operationId": "removeUsers", + "tags": ["users"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Account ID", + "in": "path", + "required": true + } + ], + "summary": "Delete account/user 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "403": { + "description": "Not allowed" + }, + "404": { + "description": "User not found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/users/login/{login}": { + "get": { + "operationId": "usersRetrieveByLogin", + "tags": ["users"], + "parameters": [ + { + "name": "login", + "type": "string", + "description": "Login of user", + "in": "path", + "required": true + }, + { + "name": "includepermissions", + "type": "integer", + "format": "int64", + "description": "Set this to 1 to have the array of permissions loaded (not done by default for performance purpose)", + "in": "query", + "required": false + } + ], + "summary": "Get properties of an user object by login 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Insufficient rights" + }, + "404": { + "description": "User or group not found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/users/email/{email}": { + "get": { + "operationId": "usersRetrieveByEmail", + "tags": ["users"], + "parameters": [ + { + "name": "email", + "type": "string", + "description": "Email of user", + "in": "path", + "required": true + }, + { + "name": "includepermissions", + "type": "integer", + "format": "int64", + "description": "Set this to 1 to have the array of permissions loaded (not done by default for performance purpose)", + "in": "query", + "required": false + } + ], + "summary": "Get properties of an user object by Email 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Insufficient rights" + }, + "404": { + "description": "User or group not found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/users/info": { + "get": { + "operationId": "usersRetrieveInfo", + "tags": ["users"], + "parameters": [ + { + "name": "includepermissions", + "type": "integer", + "format": "int64", + "description": "Set this to 1 to have the array of permissions loaded (not done by default for performance purpose)", + "in": "query", + "required": false + } + ], + "summary": "Get more properties of a user 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Insufficient rights" + }, + "404": { + "description": "User or group not found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/users/{id}/groups": { + "get": { + "operationId": "usersRetrieveGroups", + "tags": ["users"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "Id of user", + "in": "path", + "required": true + } + ], + "summary": "List the groups of a user 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "403": { + "description": "Not allowed" + }, + "404": { + "description": "Not found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/users/{id}/setGroup/{group}": { + "get": { + "operationId": "usersSetGroup", + "tags": ["users"], + "parameters": [ + { + "name": "id", + "type": "integer", + "format": "int64", + "description": "User ID", + "in": "path", + "required": true + }, + { + "name": "group", + "type": "integer", + "format": "int64", + "description": "Group ID", + "in": "path", + "required": true + }, + { + "name": "entity", + "type": "integer", + "format": "int64", + "defaultValue": 1, + "description": "Entity ID (valid only for superadmin in multicompany transverse mode)", + "in": "query", + "required": false + } + ], + "summary": "Add a user into a group 🔐", + "description": "", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "integer", + "format": "int64" + } + }, + "403": { + "description": "Not allowed" + }, + "404": { + "description": "User not found" + }, + "500": { + "description": "System error" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/users/groups": { + "get": { + "operationId": "usersListGroups", + "tags": ["users"], + "parameters": [ + { + "name": "sortfield", + "type": "string", + "defaultValue": "t.rowid", + "description": "Sort field", + "in": "query", + "required": false + }, + { + "name": "sortorder", + "type": "string", + "defaultValue": "ASC", + "description": "Sort order", + "in": "query", + "required": false + }, + { + "name": "limit", + "type": "integer", + "format": "int64", + "defaultValue": 100, + "description": "Limit for list", + "in": "query", + "required": false + }, + { + "name": "page", + "type": "integer", + "format": "int64", + "description": "Page number", + "in": "query", + "required": false + }, + { + "name": "group_ids", + "type": "string", + "description": "Groups ids filter field. Example: '1' or '1,2,3'", + "in": "query", + "required": false + }, + { + "name": "sqlfilters", + "type": "string", + "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')\"", + "in": "query", + "required": false + }, + { + "name": "properties", + "type": "string", + "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", + "in": "query", + "required": false + } + ], + "summary": "List Groups 🔐", + "description": "Return an array with a list of Groups", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "403": { + "description": "Not allowed" + }, + "404": { + "description": "User not found" + }, + "503": { + "description": "Error" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/users/groups/{group}": { + "get": { + "operationId": "usersInfoGroups", + "tags": ["users"], + "parameters": [ + { + "name": "group", + "type": "integer", + "format": "int64", + "description": "ID of group", + "in": "path", + "required": true + }, + { + "name": "load_members", + "type": "integer", + "format": "int64", + "maximum": 1, + "description": "Load members list or not", + "in": "query", + "required": false + } + ], + "summary": "Get properties of an group object 🔐", + "description": "Return an array with group information", + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "string" + } + }, + "403": { + "description": "Not allowed" + }, + "404": { + "description": "User not found" + } + }, + "security": [ + { + "api_key": [] + } + ] + } + } + }, + "definitions": { + "Obj": { + "properties": { + "stringEncoderFunction": { + "type": "string", + "description": "" + }, + "numberEncoderFunction": { + "type": "string", + "description": "" + }, + "fix": { + "type": "array", + "items": { + "type": "string" + }, + "description": "key value pairs for fixing value types using functions. For example 'id'=>'intval' will make sure all values of the id properties will be converted to integers intval function 'password'=> null will remove all the password entries" + }, + "separatorChar": { + "type": "string", + "description": "character that is used to identify sub objects For example when Object::$separatorChar = '.'; array('my.object'=>true) will result in array( 'my'=>array('object'=>true) );" + }, + "removeEmpty": { + "type": "boolean", + "description": "set it to true when empty arrays, blank strings, null values to be automatically removed from response" + }, + "removeNull": { + "type": "boolean", + "description": "set it to true to remove all null values from the result" + } + }, + "required": [ + "stringEncoderFunction", + "numberEncoderFunction", + "fix", + "separatorChar", + "removeEmpty", + "removeNull" + ] + }, + "updateAgendaeventsModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Datas" + } + } + }, + "createAgendaeventsModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request data" + } + } + }, + "createBankaccountsModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request data" + } + } + }, + "updateBankaccountsModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "data" + } + } + }, + "bankaccountsTransferModel": { + "properties": { + "bankaccount_from_id": { + "type": "integer", + "format": "int64", + "description": "BankAccount ID to use as the source of the internal wire transfer" + }, + "bankaccount_to_id": { + "type": "integer", + "format": "int64", + "description": "BankAccount ID to use as the destination of the internal wire transfer" + }, + "date": { + "type": "string", + "description": "Date of the internal wire transfer (UNIX timestamp)" + }, + "description": { + "type": "string", + "description": "Description of the internal wire transfer" + }, + "amount": { + "type": "number", + "format": "double", + "description": "Amount to transfer from the source to the destination BankAccount" + }, + "amount_to": { + "type": "number", + "format": "double", + "description": "Amount to transfer to the destination BankAccount (only when accounts does not share the same currency)" + }, + "cheque_number": { + "type": "string", + "description": "Cheque numero" + } + }, + "required": [ + "bankaccount_from_id", + "bankaccount_to_id", + "date", + "description", + "amount" + ] + }, + "bankaccountsAddLineModel": { + "properties": { + "date": { + "type": "string", + "description": "Payment date (timestamp)" + }, + "type": { + "type": "string", + "description": "Payment mode (TYP,VIR,PRE,LIQ,VAD,CB,CHQ...)" + }, + "label": { + "type": "string", + "description": "Label" + }, + "amount": { + "type": "number", + "format": "double", + "description": "Amount (may be 0)" + }, + "category": { + "type": "integer", + "format": "int64", + "description": "Category" + }, + "cheque_number": { + "type": "string", + "description": "Cheque numero" + }, + "cheque_writer": { + "type": "string", + "description": "Name of cheque writer" + }, + "cheque_bank": { + "type": "string", + "description": "Bank of cheque writer" + }, + "accountancycode": { + "type": "string", + "description": "Accountancy code" + }, + "datev": { + "type": "string", + "description": "Payment date value (timestamp)" + }, + "num_releve": { + "type": "string", + "description": "Bank statement numero" + } + }, + "required": ["date", "type", "label", "amount"] + }, + "bankaccountsAddLinkModel": { + "properties": { + "url_id": { + "type": "integer", + "format": "int64", + "description": "ID to set in the URL" + }, + "url": { + "type": "string", + "description": "URL of the link" + }, + "label": { + "type": "string", + "description": "Label" + }, + "type": { + "type": "string", + "description": "Type of link ('payment', 'company', 'member', ...)" + } + }, + "required": ["url_id", "url", "label", "type"] + }, + "bankaccountsUpdateLineModel": { + "properties": { + "label": { + "type": "string", + "description": "Label" + } + }, + "required": ["label"] + }, + "updateBomsModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Datas" + } + } + }, + "createBomsModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request datas" + } + } + }, + "bomsCreateLineModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "BOMLine data" + } + } + }, + "bomsUpdateLineModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "BOMLine data" + } + } + }, + "updateCategoriesModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Datas" + } + } + }, + "createCategoriesModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request data" + } + } + }, + "updateContactsModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Datas" + } + } + }, + "createContactsModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request datas" + } + } + }, + "contactsCreateUserModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request datas" + } + } + }, + "documentsBuilddocModel": { + "properties": { + "modulepart": { + "type": "string", + "description": "Name of module or area concerned by file download ('thirdparty', 'member', 'proposal', 'supplier_proposal', 'order', 'supplier_order', 'invoice', 'supplier_invoice', 'shipment', 'project', ...)" + }, + "original_file": { + "type": "string", + "description": "Relative path with filename, relative to modulepart (for example: IN201701-999/IN201701-999.pdf)." + }, + "doctemplate": { + "type": "string", + "description": "Set here the doc template to use for document generation (If not set, use the default template)." + }, + "langcode": { + "type": "string", + "description": "Language code like 'en_US', 'fr_FR', 'es_ES', ... (If not set, use the default language)." + } + }, + "required": ["modulepart"] + }, + "createDocumentsModel": { + "properties": { + "filename": { + "type": "string", + "description": "Name of file to create ('FA1705-0123.txt')" + }, + "modulepart": { + "type": "string", + "description": "Name of module or area concerned by file upload ('product', 'service', 'invoice', 'proposal', 'project', 'project_task', 'supplier_invoice', 'expensereport', 'member', ...)" + }, + "ref": { + "type": "string", + "description": "Reference of object (This will define subdir automatically and store submitted file into it)" + }, + "subdir": { + "type": "string", + "description": "Subdirectory (Only if ref not provided)" + }, + "filecontent": { + "type": "string", + "description": "File content (string with file content. An empty file will be created if this parameter is not provided)" + }, + "fileencoding": { + "type": "string", + "description": "File encoding (''=no encoding, 'base64'=Base 64)" + }, + "overwriteifexists": { + "type": "integer", + "format": "int64", + "description": "Overwrite file if exists (1 by default)" + }, + "createdirifnotexists": { + "type": "integer", + "format": "int64", + "description": "Create subdirectories if the doesn't exists (1 by default)", + "defaultValue": 1 + } + }, + "required": ["filename", "modulepart"] + }, + "updateDonationsModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Datas" + } + } + }, + "createDonationsModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request data" + } + } + }, + "donationsValidateModel": { + "properties": { + "idwarehouse": { + "type": "integer", + "format": "int64", + "description": "Warehouse ID" + }, + "notrigger": { + "type": "integer", + "format": "int64", + "description": "1=Does not execute triggers, 0= execute triggers" + } + } + }, + "updateExpensereportsModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Datas" + } + } + }, + "createExpensereportsModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request data" + } + } + }, + "expensereportsAddPaymentModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request data" + } + } + }, + "expensereportsUpdatePaymentModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "data" + } + } + }, + "createInterventionsModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request data" + } + } + }, + "interventionsCreateLineModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request data" + } + } + }, + "interventionsValidateModel": { + "properties": { + "notrigger": { + "type": "integer", + "format": "int64", + "description": "1=Does not execute triggers, 0= execute triggers" + } + } + }, + "updateInvoicesModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Datas" + } + } + }, + "createInvoicesModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request datas" + } + } + }, + "invoicesCreateLineModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "InvoiceLine data" + } + } + }, + "invoicesUpdateLineModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "InvoiceLine data" + } + } + }, + "invoicesAddContactModel": { + "properties": { + "fk_socpeople": { + "type": "integer", + "format": "int64", + "description": "Id of thirdparty contact (if source = 'external') or id of user (if source = 'internal') to link" + }, + "type_contact": { + "type": "string", + "description": "Type of contact (code). Must a code found into table llx_c_type_contact. For example: BILLING" + }, + "source": { + "type": "string", + "description": "external=Contact extern (llx_socpeople), internal=Contact intern (llx_user)" + }, + "notrigger": { + "type": "integer", + "format": "int64", + "description": "Disable all triggers" + } + }, + "required": ["fk_socpeople", "type_contact", "source"] + }, + "invoicesSettodraftModel": { + "properties": { + "idwarehouse": { + "type": "integer", + "format": "int64", + "description": "Warehouse ID", + "defaultValue": -1 + } + } + }, + "invoicesValidateModel": { + "properties": { + "force_number": { + "type": "string", + "description": "force ref invoice" + }, + "idwarehouse": { + "type": "integer", + "format": "int64", + "description": "Warehouse ID" + }, + "notrigger": { + "type": "integer", + "format": "int64", + "description": "1=Does not execute triggers, 0= execute triggers" + } + } + }, + "invoicesSettopaidModel": { + "properties": { + "close_code": { + "type": "string", + "description": "Code filled if we classify to 'Paid completely' when payment is not complete (for escompte for example)" + }, + "close_note": { + "type": "string", + "description": "Comment defined if we classify to 'Paid' when payment is not complete (for escompte for example)" + } + } + }, + "invoicesAddPaymentModel": { + "properties": { + "datepaye": { + "type": "string", + "description": "Payment date" + }, + "paymentid": { + "type": "integer", + "format": "int64", + "description": "Payment mode Id", + "minimum": 1 + }, + "closepaidinvoices": { + "type": "string", + "description": "Close paid invoices", + "enum": ["yes", "no"] + }, + "accountid": { + "type": "integer", + "format": "int64", + "description": "Account Id", + "minimum": 1 + }, + "num_payment": { + "type": "string", + "description": "Payment number (optional)" + }, + "comment": { + "type": "string", + "description": "Note private (optional)" + }, + "chqemetteur": { + "type": "string", + "description": "Payment issuer (mandatory if paymentcode = 'CHQ')" + }, + "chqbank": { + "type": "string", + "description": "Issuer bank name (optional)" + } + }, + "required": ["datepaye", "paymentid", "closepaidinvoices", "accountid"] + }, + "invoicesAddPaymentDistributedModel": { + "properties": { + "arrayofamounts": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array with id of invoices with amount to pay for each invoice" + }, + "datepaye": { + "type": "string", + "description": "Payment date" + }, + "paymentid": { + "type": "integer", + "format": "int64", + "description": "Payment mode Id", + "minimum": 1 + }, + "closepaidinvoices": { + "type": "string", + "description": "Close paid invoices", + "enum": ["yes", "no"] + }, + "accountid": { + "type": "integer", + "format": "int64", + "description": "Account Id", + "minimum": 1 + }, + "num_payment": { + "type": "string", + "description": "Payment number (optional)" + }, + "comment": { + "type": "string", + "description": "Note private (optional)" + }, + "chqemetteur": { + "type": "string", + "description": "Payment issuer (mandatory if paiementcode = 'CHQ')" + }, + "chqbank": { + "type": "string", + "description": "Issuer bank name (optional)" + }, + "ref_ext": { + "type": "string", + "description": "External reference (optional)" + }, + "accepthigherpayment": { + "type": "boolean", + "description": "Accept higher payments that it remains to be paid (optional)" + } + }, + "required": [ + "arrayofamounts", + "datepaye", + "paymentid", + "closepaidinvoices", + "accountid" + ] + }, + "invoicesUpdatePaymentModel": { + "properties": { + "num_payment": { + "type": "string", + "description": "Payment number" + } + } + }, + "listLoginModel": { + "properties": { + "login": { + "type": "string", + "description": "User login" + }, + "password": { + "type": "string", + "description": "User password" + }, + "entity": { + "type": "string", + "description": "Entity (when multicompany module is used). '' means 1=first company." + }, + "reset": { + "type": "integer", + "format": "int64", + "description": "Reset token (0=get current token, 1=ask a new token and canceled old token. This means access using current existing API token of user will fails: new token will be required for new access)" + } + }, + "required": ["login", "password"] + }, + "updateMosModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Datas" + } + } + }, + "createMosModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request datas" + } + } + }, + "mosProduceAndConsumeAllModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request datas" + } + } + }, + "mosProduceAndConsumeModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request datas" + } + } + }, + "updateOrdersModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Datas" + } + } + }, + "createOrdersModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request data" + } + } + }, + "ordersCreateLineModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "OrderLine data" + } + } + }, + "ordersUpdateLineModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "OrderLine data" + } + } + }, + "ordersValidateModel": { + "properties": { + "idwarehouse": { + "type": "integer", + "format": "int64", + "description": "Warehouse ID" + }, + "notrigger": { + "type": "integer", + "format": "int64", + "description": "1=Does not execute triggers, 0= execute triggers" + } + } + }, + "ordersCloseModel": { + "properties": { + "notrigger": { + "type": "integer", + "format": "int64", + "description": "Disabled triggers" + } + } + }, + "ordersSettodraftModel": { + "properties": { + "idwarehouse": { + "type": "integer", + "format": "int64", + "description": "Warehouse ID to use for stock change (Used only if option STOCK_CALCULATE_ON_VALIDATE_ORDER is on)", + "defaultValue": -1 + } + } + }, + "updateProductsModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Datas" + } + } + }, + "createProductsModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request data" + } + } + }, + "productsAddSubproductsModel": { + "properties": { + "subproduct_id": { + "type": "integer", + "format": "int64", + "description": "Id of child product/service" + }, + "qty": { + "type": "number", + "format": "double", + "description": "Quantity" + }, + "incdec": { + "type": "integer", + "format": "int64", + "description": "1=Increase/decrease stock of child when parent stock increase/decrease", + "defaultValue": 1 + } + }, + "required": ["subproduct_id", "qty"] + }, + "productsAddPurchasePriceModel": { + "properties": { + "qty": { + "type": "number", + "format": "double", + "description": "Min quantity for which price is valid" + }, + "buyprice": { + "type": "number", + "format": "double", + "description": "Purchase price for the quantity min" + }, + "price_base_type": { + "type": "string", + "description": "HT or TTC" + }, + "fourn_id": { + "type": "integer", + "format": "int64", + "description": "Supplier ID" + }, + "availability": { + "type": "integer", + "format": "int64", + "description": "Product availability" + }, + "ref_fourn": { + "type": "string", + "description": "Supplier ref" + }, + "tva_tx": { + "type": "number", + "format": "double", + "description": "New VAT Rate (For example 8.5. Should not be a string)" + }, + "charges": { + "type": "number", + "format": "double", + "description": "costs affering to product" + }, + "remise_percent": { + "type": "number", + "format": "double", + "description": "Discount regarding qty (percent)" + }, + "remise": { + "type": "number", + "format": "double", + "description": "Discount regarding qty (amount)" + }, + "newnpr": { + "type": "integer", + "format": "int64", + "description": "Set NPR or not" + }, + "delivery_time_days": { + "type": "integer", + "format": "int64", + "description": "Delay in days for delivery (max). May be '' if not defined." + }, + "supplier_reputation": { + "type": "string", + "description": "Reputation with this product to the defined supplier (empty, FAVORITE, DONOTORDER)" + }, + "localtaxes_array": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array with localtaxes info array('0'=>type1,'1'=>rate1,'2'=>type2,'3'=>rate2) (loaded by getLocalTaxesFromRate(vatrate, 0, ...) function)." + }, + "newdefaultvatcode": { + "type": "string", + "description": "Default vat code" + }, + "multicurrency_buyprice": { + "type": "number", + "format": "double", + "description": "Purchase price for the quantity min in currency" + }, + "multicurrency_price_base_type": { + "type": "string", + "description": "HT or TTC in currency", + "defaultValue": "HT" + }, + "multicurrency_tx": { + "type": "number", + "format": "double", + "description": "Rate currency", + "defaultValue": 1 + }, + "multicurrency_code": { + "type": "string", + "description": "Currency code" + }, + "desc_fourn": { + "type": "string", + "description": "Custom description for product_fourn_price" + }, + "barcode": { + "type": "string", + "description": "Barcode" + }, + "fk_barcode_type": { + "type": "integer", + "format": "int64", + "description": "Barcode type" + } + }, + "required": [ + "qty", + "buyprice", + "price_base_type", + "fourn_id", + "availability", + "ref_fourn", + "tva_tx" + ] + }, + "productsAddAttributesModel": { + "properties": { + "ref": { + "type": "string", + "description": "Reference of Attribute" + }, + "label": { + "type": "string", + "description": "Label of Attribute" + }, + "ref_ext": { + "type": "string", + "description": "Reference of Attribute" + } + }, + "required": ["ref", "label"] + }, + "productsUpdateAttributesModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Datas" + } + } + }, + "productsUpdateAttributeValueModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Datas" + } + }, + "required": ["request_data"] + }, + "productsAddAttributeValueModel": { + "properties": { + "ref": { + "type": "string", + "description": "Reference of Attribute value" + }, + "value": { + "type": "string", + "description": "Value of Attribute value" + } + }, + "required": ["ref", "value"] + }, + "productsAddVariantModel": { + "properties": { + "weight_impact": { + "type": "number", + "format": "double", + "description": "Weight impact of variant" + }, + "price_impact": { + "type": "number", + "format": "double", + "description": "Price impact of variant" + }, + "price_impact_is_percent": { + "type": "boolean", + "description": "Price impact in percent (true or false)" + }, + "features": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of attributes pairs id_attribute->id_value. Example: array(id_color=>id_Blue, id_size=>id_small, id_option=>id_val_a, ...)" + }, + "reference": { + "type": "string", + "description": "Customized reference of variant" + }, + "ref_ext": { + "type": "string", + "description": "External reference of variant" + } + }, + "required": [ + "weight_impact", + "price_impact", + "price_impact_is_percent", + "features" + ] + }, + "productsAddVariantByProductRefModel": { + "properties": { + "weight_impact": { + "type": "number", + "format": "double", + "description": "Weight impact of variant" + }, + "price_impact": { + "type": "number", + "format": "double", + "description": "Price impact of variant" + }, + "price_impact_is_percent": { + "type": "boolean", + "description": "Price impact in percent (true or false)" + }, + "features": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of attributes pairs id_attribute->id_value. Example: array(id_color=>id_Blue, id_size=>id_small, id_option=>id_val_a, ...)" + } + }, + "required": [ + "weight_impact", + "price_impact", + "price_impact_is_percent", + "features" + ] + }, + "productsUpdateVariantModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Datas" + } + } + }, + "updateProjectsModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Datas" + } + } + }, + "createProjectsModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request data" + } + } + }, + "projectsValidateModel": { + "properties": { + "notrigger": { + "type": "integer", + "format": "int64", + "description": "1=Does not execute triggers, 0= execute triggers" + } + } + }, + "updateProposalsModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Datas" + } + } + }, + "createProposalsModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request data" + } + } + }, + "proposalsCreateLinesModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Commercial proposal line data" + } + } + }, + "proposalsCreateLineModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Commercial proposal line data" + } + } + }, + "proposalsUpdateLineModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Commercial proposal line data" + } + } + }, + "proposalsValidateModel": { + "properties": { + "notrigger": { + "type": "integer", + "format": "int64", + "description": "1=Does not execute triggers, 0= execute triggers" + } + } + }, + "proposalsCloseModel": { + "properties": { + "status": { + "type": "integer", + "format": "int64", + "description": "Must be 2 (accepted) or 3 (refused)", + "minimum": 2, + "maximum": 3 + }, + "note_private": { + "type": "string", + "description": "Add this mention at end of private note" + }, + "notrigger": { + "type": "integer", + "format": "int64", + "description": "Disabled triggers" + } + }, + "required": ["status"] + }, + "createSalariesModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request data" + } + } + }, + "updateSalariesModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Data" + } + } + }, + "salariesUpdatePaymentModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "data" + } + } + }, + "setupCreateExtrafieldsModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request datas" + } + } + }, + "setupUpdateExtrafieldsModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request datas" + } + } + }, + "updateSupplierinvoicesModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Datas" + } + } + }, + "createSupplierinvoicesModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request datas" + } + } + }, + "supplierinvoicesValidateModel": { + "properties": { + "idwarehouse": { + "type": "integer", + "format": "int64", + "description": "Warehouse ID" + }, + "notrigger": { + "type": "integer", + "format": "int64", + "description": "1=Does not execute triggers, 0= execute triggers" + } + } + }, + "supplierinvoicesAddPaymentModel": { + "properties": { + "datepaye": { + "type": "string", + "description": "Payment date" + }, + "payment_mode_id": { + "type": "integer", + "format": "int64", + "description": "Payment mode ID (look it up via REST GET to /setup/dictionary/payment_types)", + "minimum": 1 + }, + "closepaidinvoices": { + "type": "string", + "description": "Close paid invoices", + "enum": ["yes", "no"] + }, + "accountid": { + "type": "integer", + "format": "int64", + "description": "Bank account ID (look it up via REST GET to /bankaccounts)", + "minimum": 1 + }, + "num_payment": { + "type": "string", + "description": "Payment number (optional)" + }, + "comment": { + "type": "string", + "description": "Note (optional)" + }, + "chqemetteur": { + "type": "string", + "description": "Payment issuer (mandatory if payment_mode_id corresponds to 'CHQ'-payment type)" + }, + "chqbank": { + "type": "string", + "description": "Issuer bank name (optional)" + }, + "amount": { + "type": "number", + "format": "double", + "description": "Amount of payment if we don't want to use the remain to pay" + } + }, + "required": [ + "datepaye", + "payment_mode_id", + "closepaidinvoices", + "accountid" + ] + }, + "supplierinvoicesCreateLineModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "supplier invoice line data" + } + } + }, + "supplierinvoicesUpdateLineModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "InvoiceLine data" + } + } + }, + "updateSupplierordersModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Datas" + } + } + }, + "createSupplierordersModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request datas" + } + } + }, + "supplierordersValidateModel": { + "properties": { + "idwarehouse": { + "type": "integer", + "format": "int64", + "description": "Warehouse ID" + }, + "notrigger": { + "type": "integer", + "format": "int64", + "description": "1=Does not execute triggers, 0= execute triggers" + } + } + }, + "supplierordersApproveModel": { + "properties": { + "idwarehouse": { + "type": "integer", + "format": "int64", + "description": "Warehouse ID" + }, + "secondlevel": { + "type": "integer", + "format": "int64", + "description": "1=Does not execute triggers, 0= execute triggers" + } + } + }, + "supplierordersMakeOrderModel": { + "properties": { + "date": { + "type": "integer", + "format": "int64", + "description": "Date (unix timestamp in sec)" + }, + "method": { + "type": "integer", + "format": "int64", + "description": "Method" + }, + "comment": { + "type": "string", + "description": "Comment" + } + }, + "required": ["date", "method"] + }, + "supplierordersReceiveOrderModel": { + "properties": { + "closeopenorder": { + "type": "integer", + "format": "int64", + "description": "Close order if everything is received" + }, + "comment": { + "type": "string", + "description": "Comment" + }, + "lines": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of product dispatches" + } + }, + "required": ["lines"] + }, + "updateTasksModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Datas" + } + } + }, + "createTasksModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request data" + } + } + }, + "tasksAddTimeSpentModel": { + "properties": { + "date": { + "type": "string", + "format": "date-time", + "description": "Date (YYYY-MM-DD HH:MI:SS in GMT)" + }, + "duration": { + "type": "integer", + "format": "int64", + "description": "Duration in seconds (3600 = 1h)" + }, + "user_id": { + "type": "integer", + "format": "int64", + "description": "User (Use 0 for connected user)" + }, + "note": { + "type": "string", + "description": "Note" + } + }, + "required": ["date", "duration"] + }, + "tasksUpdateTimeSpentModel": { + "properties": { + "date": { + "type": "string", + "format": "date-time", + "description": "Date (YYYY-MM-DD HH:MI:SS in GMT)" + }, + "duration": { + "type": "integer", + "format": "int64", + "description": "Duration in seconds (3600 = 1h)" + }, + "user_id": { + "type": "integer", + "format": "int64", + "description": "User (Use 0 for connected user)" + }, + "note": { + "type": "string", + "description": "Note" + } + }, + "required": ["date", "duration"] + }, + "updateThirdpartiesModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Datas" + } + } + }, + "createThirdpartiesModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request datas" + } + } + }, + "thirdpartiesCreateCompanyNotificationModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request data" + } + } + }, + "thirdpartiesUpdateCompanyNotificationModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request data" + } + } + }, + "thirdpartiesCreateCompanyBankAccountModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request data" + } + } + }, + "thirdpartiesUpdateCompanyBankAccountModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request data" + } + } + }, + "thirdpartiesCreateSocieteAccountModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request data" + } + } + }, + "thirdpartiesUpdateSocieteAccountModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request data" + } + } + }, + "thirdpartiesModifySocieteAccountModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Request data" + } + } + }, + "createUsersModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "New user data" + } + } + }, + "updateUsersModel": { + "properties": { + "request_data": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Datas" + } + } + } + }, + "securityDefinitions": { + "api_key": { + "type": "apiKey", + "name": "api_key", + "in": "query" + } + }, + "info": { + "version": "1", + "title": "Restler API Explorer", + "description": "Live API Documentation", + "contact": { + "name": "Restler Support", + "url": "luracast.com/products/restler", + "email": "arul@luracast.com" + }, + "license": { + "name": "LGPL-2.1", + "url": "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html" + } + } +} diff --git a/forms-bridge/addons/holded/data/swagger/accounting.json b/forms-bridge/addons/holded/data/swagger/accounting.json index 64584962..459c1613 100644 --- a/forms-bridge/addons/holded/data/swagger/accounting.json +++ b/forms-bridge/addons/holded/data/swagger/accounting.json @@ -1,165 +1,256 @@ { - "/dailyledger": { - "get": { - "tags": ["Daily Ledger"], - "summary": "List all your entries", - "operationId": "listDailyLedger", - "description": "List all the entries you have in your daily ledger.\n", - "parameters": [ - { - "in": "query", - "name": "page", - "description": "the response is paginated and limited to 500 entries,", - "required": false, - "schema": { "type": "number" } - }, - { - "name": "starttmp", - "in": "query", - "description": "Starting timestamp", - "schema": { "type": "string" } - }, - { - "name": "endtmp", - "in": "query", - "description": "Ending timestamp", - "schema": { "type": "string" } - } - ], - "responses": { - "200": { "description": "search results matching criteria" }, - "400": { "description": "bad input parameter" } - } + "openapi": "3.0.0", + "info": { + "description": "The Holded's Accounting API is organized around REST, using HTTP responses code to keep you informed about what's going on. Our endpoints will returns you metada in JSON format directly from Holded.", + "version": "1.0.0", + "title": "Accounting API", + "contact": { + "email": "developers@holded.com" } }, - "/entry": { - "post": { - "tags": ["Daily Ledger"], - "summary": "Create entry", - "operationId": "createEntry", - "description": "Create a new accounting entry\n", - "requestBody": { - "content": { - "application/json": { + "x-samples-languages": ["curl", "node", "ruby", "python"], + "security": [ + { + "Auth": [] + } + ], + "tags": [ + { + "name": "Daily Ledger", + "description": "CRUD Daily Ledger" + }, + { + "name": "Chart of Accounts", + "description": "CRUD Chart of Accounts" + } + ], + "paths": { + "/dailyledger": { + "get": { + "tags": ["Daily Ledger"], + "summary": "List all your entries", + "operationId": "listDailyLedger", + "description": "List all the entries you have in your daily ledger.\n", + "parameters": [ + { + "in": "query", + "name": "page", + "description": "the response is paginated and limited to 500 entries,", + "required": false, "schema": { - "type": "object", - "properties": { - "date": { - "type": "integer", - "description": "Timestamp for entry date" - }, - "lines": { - "type": "array", - "items": { - "type": "object", - "properties": { - "account": { - "type": "integer", - "description": "Account number for this entry line" - }, - "credit": { "type": "number" }, - "debit": { "type": "number" }, - "description": { "type": "string" }, - "tags": { "type": "array", "items": { "type": "string" } } - }, - "required": ["account"] - } - }, - "notes": { "type": "string", "description": "Entry Note" } - }, - "required": ["date", "lines"] + "type": "number" } + }, + { + "name": "starttmp", + "in": "query", + "description": "Starting timestamp", + "schema": { + "type": "string" + } + }, + { + "name": "endtmp", + "in": "query", + "description": "Ending timestamp", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "search results matching criteria" + }, + "400": { + "description": "bad input parameter" } } - }, - "responses": { - "200": { - "description": "The output when an entry has successfully been created", + } + }, + "/entry": { + "post": { + "tags": ["Daily Ledger"], + "summary": "Create entry", + "operationId": "createEntry", + "description": "Create a new accounting entry\n", + "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "properties": { "entryGroupId": { "type": "string" } } + "properties": { + "date": { + "type": "integer", + "description": "Timestamp for entry date" + }, + "lines": { + "type": "array", + "items": { + "type": "object", + "properties": { + "account": { + "type": "integer", + "description": "Account number for this entry line" + }, + "credit": { + "type": "number" + }, + "debit": { + "type": "number" + }, + "description": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["account"] + } + }, + "notes": { + "type": "string", + "description": "Entry Note" + } + }, + "required": ["date", "lines"] } } } - } - } - } - }, - "/chartofaccounts": { - "get": { - "tags": ["Chart of Accounts"], - "summary": "List all your accounting accounts", - "operationId": "listaccounts", - "description": "List all your accounting accounts.\n", - "parameters": [ - { - "name": "starttmp", - "in": "query", - "description": "Starting timestamp", - "schema": { "type": "string" } - }, - { - "name": "endtmp", - "in": "query", - "description": "Ending timestamp", - "schema": { "type": "string" } }, - { - "name": "includeEmpty", - "in": "query", - "description": "Include Empty accounts (0: no include empty, 1: include empty)", - "required": false, - "schema": { "type": "number", "enum": [0, 1] } + "responses": { + "200": { + "description": "The output when an entry has successfully been created", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "entryGroupId": { + "type": "string" + } + } + } + } + } + } } - ], - "responses": { - "200": { "description": "search results matching criteria" }, - "400": { "description": "bad input parameter" } } - } - }, - "/account": { - "post": { - "tags": ["Chart of Accounts"], - "summary": "Create a new accounting account", - "operationId": "createAccount", - "description": "Create a new accounting account\n", - "requestBody": { - "content": { - "application/json": { + }, + "/chartofaccounts": { + "get": { + "tags": ["Chart of Accounts"], + "summary": "List all your accounting accounts", + "operationId": "listaccounts", + "description": "List all your accounting accounts.\n", + "parameters": [ + { + "name": "starttmp", + "in": "query", + "description": "Starting timestamp", "schema": { - "type": "object", - "properties": { - "prefix": { - "type": "integer", - "description": "4 digit prefix of the account to be created" - }, - "name": { - "type": "string", - "description": "Name of the account to be created (falls back to parent account name if empty)" - }, - "color": { "type": "string", "description": "Hex code" } - }, - "required": ["prefix"] + "type": "string" } + }, + { + "name": "endtmp", + "in": "query", + "description": "Ending timestamp", + "schema": { + "type": "string" + } + }, + { + "name": "includeEmpty", + "in": "query", + "description": "Include Empty accounts (0: no include empty, 1: include empty)", + "required": false, + "schema": { + "type": "number", + "enum": [0, 1] + } + } + ], + "responses": { + "200": { + "description": "search results matching criteria" + }, + "400": { + "description": "bad input parameter" } } - }, - "responses": { - "200": { - "description": "The output if an account has successfully been created", + } + }, + "/account": { + "post": { + "tags": ["Chart of Accounts"], + "summary": "Create a new accounting account", + "operationId": "createAccount", + "description": "Create a new accounting account\n", + "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "properties": { "accountId": { "type": "string" } } + "properties": { + "prefix": { + "type": "integer", + "description": "4 digit prefix of the account to be created" + }, + "name": { + "type": "string", + "description": "Name of the account to be created (falls back to parent account name if empty)" + }, + "color": { + "type": "string", + "description": "Hex code" + } + }, + "required": ["prefix"] + } + } + } + }, + "responses": { + "200": { + "description": "The output if an account has successfully been created", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "accountId": { + "type": "string" + } + } + } } } } } } } + }, + "servers": [ + { + "url": "https://api.holded.com/api/accounting/v1" + } + ], + "components": { + "securitySchemes": { + "Auth": { + "type": "apiKey", + "name": "key", + "in": "header" + } + } + }, + "x-readme": { + "explorer-enabled": true, + "proxy-enabled": true } } diff --git a/forms-bridge/addons/holded/data/swagger/crm.json b/forms-bridge/addons/holded/data/swagger/crm.json index dc9e13a2..87f32799 100644 --- a/forms-bridge/addons/holded/data/swagger/crm.json +++ b/forms-bridge/addons/holded/data/swagger/crm.json @@ -1,20 +1,426 @@ { - "/funnels": { - "get": { - "operationId": "List Funnels", - "responses": { - "200": { - "description": "", + "openapi": "3.0.0", + "info": { + "title": "CRM API", + "version": "1.0", + "description": "The Holded’s CRM API is organized around REST, using HTTP responses code to keep you informed about what’s going on. Our endpoints will returns you metada in JSON format directly from Holded." + }, + "x-samples-languages": ["curl", "node", "ruby", "python"], + "paths": { + "/funnels": { + "get": { + "operationId": "List Funnels", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "title": "Funnel Basic Output", + "description": "The properties that are included when fetching a list of Funnels.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Funnel Common", + "description": "The properties that are shared amongst all versions of the Funnel model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "stages": { + "type": "array", + "items": { + "type": "object", + "properties": { + "stageId": { + "type": "string" + }, + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + } + } + } + }, + "won": { + "type": "object", + "properties": { + "num": { + "type": "integer" + }, + "value": { + "type": "integer" + } + } + }, + "leads": { + "type": "object", + "properties": { + "num": { + "type": "integer" + }, + "value": { + "type": "integer" + } + } + }, + "lost": { + "type": "object", + "properties": { + "num": { + "type": "integer" + }, + "value": { + "type": "integer" + } + } + }, + "recentWon": { + "type": "array", + "items": { + "type": "string" + } + }, + "recentLeads": { + "type": "array", + "items": { + "type": "string" + } + }, + "recentLost": { + "type": "array", + "items": { + "type": "string" + } + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "labelId": { + "type": "string" + }, + "labelName": { + "type": "string" + }, + "labelColor": { + "type": "string" + } + } + } + }, + "preferences": { + "type": "object", + "properties": { + "emails": { + "type": "array", + "items": { + "type": "object" + } + } + } + }, + "customFields": { + "type": "array", + "items": { + "type": "object" + } + } + }, + "x-readme-ref-name": "funnel-common" + } + ], + "x-readme-ref-name": "funnel-output" + } + }, + "examples": { + "response": { + "value": [ + { + "id": "5acb866012d56e00100540e7", + "name": "Marketing funnel", + "stages": [ + { + "stageId": "5acb866012d56e00100540e2", + "key": "leadin", + "name": "Lead In", + "desc": "" + }, + { + "stageId": "5acb866012d56e00100540e3", + "key": "contacted", + "name": "Contacted", + "desc": "" + }, + { + "stageId": "5acb866012d56e00100540e4", + "key": "fitting", + "name": "Fitting", + "desc": "" + }, + { + "stageId": "5acb866012d56e00100540e5", + "key": "proposal", + "name": "Proposal", + "desc": "" + }, + { + "stageId": "5acb866012d56e00100540e6", + "key": "closing", + "name": "Closing", + "desc": "" + } + ], + "won": { + "num": 2, + "value": 3490093 + }, + "leads": { + "num": 1, + "value": 2343546 + }, + "lost": { + "num": 1, + "value": 2334454 + }, + "recentWon": [ + "5acb866f12d56e000a3b0c23", + "5acb86b112d56e00110130b2" + ], + "recentLeads": ["5acb873c12d56e001d137e62"], + "recentLost": ["5acb86e512d56e0016586e32"], + "labels": [ + { + "labelId": "5acb87b312d56e001b10afa3", + "labelName": "Marketing", + "labelColor": "#33ffff" + } + ], + "preferences": { + "emails": [] + }, + "customFields": [] + } + ] + } + } + } + } + } + }, + "tags": ["FUNNELS"], + "description": "Get all your funnels." + }, + "post": { + "operationId": "Create Funnel", + "requestBody": { "content": { "application/json": { "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/funnel-output" } - }, - "examples": { - "response": { - "value": [ - { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": ["name"] + } + } + }, + "x-examples": { + "application/json": { + "name": "New funnel" + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Created", + "id": "5ac4f2cec839ea004e18a463" + } + } + } + } + } + } + }, + "tags": ["FUNNELS"], + "description": "Create a new funnel." + } + }, + "/funnels/{funnelId}": { + "parameters": [ + { + "name": "funnelId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "get": { + "operationId": "Get Funnel", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "stages": { + "type": "array", + "items": { + "type": "object", + "properties": { + "stageId": { + "type": "string" + }, + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + } + } + } + }, + "won": { + "type": "object", + "properties": { + "num": { + "type": "integer" + }, + "value": { + "type": "integer" + } + } + }, + "leads": { + "type": "object", + "properties": { + "num": { + "type": "integer" + }, + "value": { + "type": "integer" + } + } + }, + "lost": { + "type": "object", + "properties": { + "num": { + "type": "integer" + }, + "value": { + "type": "integer" + } + } + }, + "recentWon": { + "type": "array", + "items": { + "type": "string" + } + }, + "recentLeads": { + "type": "array", + "items": { + "type": "string" + } + }, + "recentLost": { + "type": "array", + "items": { + "type": "string" + } + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "labelId": { + "type": "string" + }, + "labelName": { + "type": "string" + }, + "labelColor": { + "type": "string" + } + } + } + }, + "preferences": { + "type": "object", + "properties": { + "emails": { + "type": "array", + "items": { + "type": "object" + } + } + } + }, + "customFields": { + "type": "array", + "items": { + "type": "object" + } + } + } + }, + "examples": { + "response": { + "value": { "id": "5acb866012d56e00100540e7", "name": "Marketing funnel", "stages": [ @@ -49,9 +455,18 @@ "desc": "" } ], - "won": { "num": 2, "value": 3490093 }, - "leads": { "num": 1, "value": 2343546 }, - "lost": { "num": 1, "value": 2334454 }, + "won": { + "num": 2, + "value": 3490093 + }, + "leads": { + "num": 1, + "value": 2343546 + }, + "lost": { + "num": 1, + "value": 2334454 + }, "recentWon": [ "5acb866f12d56e000a3b0c23", "5acb86b112d56e00110130b2" @@ -65,137 +480,65 @@ "labelColor": "#33ffff" } ], - "preferences": { "emails": [] }, + "preferences": { + "emails": [] + }, "customFields": [] } - ] - } - } - } - } - } - }, - "tags": ["FUNNELS"], - "description": "Get all your funnels." - }, - "post": { - "operationId": "Create Funnel", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { "name": { "type": "string" } }, - "required": ["name"] - } - } - }, - "x-examples": { "application/json": { "name": "New funnel" } } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Created", - "id": "5ac4f2cec839ea004e18a463" } } } } } - } + }, + "tags": ["FUNNELS"], + "description": "Get a specific funnel." }, - "tags": ["FUNNELS"], - "description": "Create a new funnel." - } - }, - "/funnels/{funnelId}": { - "parameters": [ - { - "name": "funnelId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], - "get": { - "operationId": "Get Funnel", - "responses": { - "200": { - "description": "", + "put": { + "operationId": "Update Funnel", + "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "id": { "type": "string" }, - "name": { "type": "string" }, + "name": { + "type": "string" + }, "stages": { "type": "array", "items": { "type": "object", "properties": { - "stageId": { "type": "string" }, - "key": { "type": "string" }, - "name": { "type": "string" }, - "desc": { "type": "string" } + "stageId": { + "type": "string" + }, + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + } } } }, - "won": { - "type": "object", - "properties": { - "num": { "type": "integer" }, - "value": { "type": "integer" } - } - }, - "leads": { - "type": "object", - "properties": { - "num": { "type": "integer" }, - "value": { "type": "integer" } - } - }, - "lost": { - "type": "object", - "properties": { - "num": { "type": "integer" }, - "value": { "type": "integer" } - } - }, - "recentWon": { - "type": "array", - "items": { "type": "string" } - }, - "recentLeads": { - "type": "array", - "items": { "type": "string" } - }, - "recentLost": { - "type": "array", - "items": { "type": "string" } - }, "labels": { "type": "array", "items": { "type": "object", "properties": { - "labelId": { "type": "string" }, - "labelName": { "type": "string" }, - "labelColor": { "type": "string" } + "labelId": { + "type": "string" + }, + "labelName": { + "type": "string" + }, + "labelColor": { + "type": "string" + } } } }, @@ -204,239 +547,564 @@ "properties": { "emails": { "type": "array", - "items": { "type": "object" } + "items": { + "type": "object" + } } } }, "customFields": { "type": "array", - "items": { "type": "object" } + "items": { + "type": "object" + } } } + } + } + }, + "x-examples": { + "application/json": { + "name": "Marketing funnel", + "stages": [ + { + "stageId": "5acb866012d56e00100540e2", + "key": "leadin", + "name": "Lead In", + "desc": "" + }, + { + "stageId": "5acb866012d56e00100540e3", + "key": "contacted", + "name": "Contacted", + "desc": "" + }, + { + "stageId": "5acb866012d56e00100540e4", + "key": "fitting", + "name": "Fitting", + "desc": "" + } + ], + "labels": [ + { + "labelId": "5acb87b312d56e001b10afa3", + "labelName": "Marketing", + "labelColor": "#33ffff" + } + ], + "preferences": { + "emails": [] }, - "examples": { - "response": { - "value": { - "id": "5acb866012d56e00100540e7", - "name": "Marketing funnel", - "stages": [ - { - "stageId": "5acb866012d56e00100540e2", - "key": "leadin", - "name": "Lead In", - "desc": "" - }, - { - "stageId": "5acb866012d56e00100540e3", - "key": "contacted", - "name": "Contacted", - "desc": "" - }, - { - "stageId": "5acb866012d56e00100540e4", - "key": "fitting", - "name": "Fitting", - "desc": "" - }, - { - "stageId": "5acb866012d56e00100540e5", - "key": "proposal", - "name": "Proposal", - "desc": "" - }, - { - "stageId": "5acb866012d56e00100540e6", - "key": "closing", - "name": "Closing", - "desc": "" - } - ], - "won": { "num": 2, "value": 3490093 }, - "leads": { "num": 1, "value": 2343546 }, - "lost": { "num": 1, "value": 2334454 }, - "recentWon": [ - "5acb866f12d56e000a3b0c23", - "5acb86b112d56e00110130b2" - ], - "recentLeads": ["5acb873c12d56e001d137e62"], - "recentLost": ["5acb86e512d56e0016586e32"], - "labels": [ - { - "labelId": "5acb87b312d56e001b10afa3", - "labelName": "Marketing", - "labelColor": "#33ffff" - } - ], - "preferences": { "emails": [] }, - "customFields": [] + "customFields": [] + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Updated", + "id": "5ac4f2cec839ea004e18a463" + } } } } } } - } + }, + "tags": ["FUNNELS"], + "description": "Update a specific funnel.\n\nOnly the params included in the operation will update the funnel." }, - "tags": ["FUNNELS"], - "description": "Get a specific funnel." - }, - "put": { - "operationId": "Update Funnel", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "stages": { - "type": "array", - "items": { - "type": "object", - "properties": { - "stageId": { "type": "string" }, - "key": { "type": "string" }, - "name": { "type": "string" }, - "desc": { "type": "string" } + "delete": { + "operationId": "Delete Funnel", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" } } }, - "labels": { + "examples": { + "response": { + "value": { + "status": 1, + "info": "Successfully deleted", + "id": "5aba68b1c5d438006425ad45" + } + } + } + } + } + } + }, + "tags": ["FUNNELS"], + "description": "Delete a specific funnel." + } + }, + "/leads": { + "get": { + "operationId": "List Leads", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { - "type": "object", - "properties": { - "labelId": { "type": "string" }, - "labelName": { "type": "string" }, - "labelColor": { "type": "string" } - } + "title": "Lead Basic Output", + "description": "The properties that are included when fetching a list of Leads.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Lead Common", + "description": "The properties that are shared amongst all versions of the Lead model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "funnelId": { + "type": "string" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "name": { + "type": "string" + }, + "person": { + "type": "integer" + }, + "personName": { + "type": "string" + }, + "value": { + "type": "integer" + }, + "potential": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + }, + "stageId": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "updatedAt": { + "type": "integer" + }, + "customFields": { + "type": "array", + "items": { + "type": "object" + } + }, + "status": { + "type": "integer" + }, + "events": { + "type": "array", + "items": { + "type": "object", + "properties": { + "eventId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "title": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "userId": { + "type": "string" + } + } + } + }, + "tasks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "taskId": { + "type": "string" + }, + "taskName": { + "type": "string" + }, + "taskStatus": { + "type": "integer" + } + } + } + }, + "files": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "x-readme-ref-name": "lead-common" + } + ], + "x-readme-ref-name": "lead-output" } }, - "preferences": { - "type": "object", - "properties": { - "emails": { "type": "array", "items": { "type": "object" } } + "examples": { + "response": { + "value": [ + { + "id": "5ab27cc411aff3003e655fb3", + "userId": "5ab13e373697ac00e305444d", + "funnelId": "5ab13e373697ac00e305333b", + "contactId": "5aaa65e05b706400300ad246", + "contactName": "Gumersindo supply", + "name": "Gumersindo", + "person": 0, + "personName": "", + "value": 48000, + "potential": 100, + "dueDate": 1521646788, + "stageId": "5ab13e373697ac00e3053336", + "createdAt": 1521646788, + "updatedAt": 1521659747, + "customfields": [ + { + "field": "New", + "value": "custom field" + }, + { + "field": "other", + "value": "custom field" + } + ], + "status": 0, + "events": [ + { + "eventId": "5ab2863c11aff300532c40b3", + "type": "note", + "title": "Lunch!", + "desc": "My note", + "createdAt": 1521649212, + "userId": "5a05cc5a60cea100094baf22" + }, + { + "eventId": "5ab294d811aff300587d96c4", + "type": "note", + "title": "Dinner", + "desc": "other event", + "createdAt": 1521652952, + "userId": "" + }, + { + "eventId": "5ab29ba711aff300587d96c5", + "type": "note", + "title": "Skype", + "desc": "with Sindo", + "createdAt": 1521654695, + "userId": "" + } + ], + "tasks": [ + { + "taskId": "5acb8f0112d56e00201fed93", + "taskName": "call", + "taskStatus": 1 + }, + { + "taskId": "5acb8f1212d56e00227196e3", + "taskName": "invite to him a coffee", + "taskStatus": 0 + } + ], + "files": ["config.ini"] + } + ] } - }, - "customFields": { - "type": "array", - "items": { "type": "object" } } } } } }, - "x-examples": { - "application/json": { - "name": "Marketing funnel", - "stages": [ - { - "stageId": "5acb866012d56e00100540e2", - "key": "leadin", - "name": "Lead In", - "desc": "" - }, - { - "stageId": "5acb866012d56e00100540e3", - "key": "contacted", - "name": "Contacted", - "desc": "" - }, - { - "stageId": "5acb866012d56e00100540e4", - "key": "fitting", - "name": "Fitting", - "desc": "" - } - ], - "labels": [ - { - "labelId": "5acb87b312d56e001b10afa3", - "labelName": "Marketing", - "labelColor": "#33ffff" - } - ], - "preferences": { "emails": [] }, - "customFields": [] - } - } + "tags": ["LEADS"], + "description": "Get all your leads." }, - "responses": { - "200": { - "description": "", + "post": { + "operationId": "Create Lead", + "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5ac4f2cec839ea004e18a463" - } + "funnelId": { + "type": "string" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "name": { + "type": "string" + }, + "value": { + "type": "integer" + }, + "potential": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + }, + "stageId": { + "type": "string", + "description": "Either Stage ID or exact name are accepted. In the latter case, if there are multiple matches the oldest stage created will be selected." + } } } } - } - } - }, - "tags": ["FUNNELS"], - "description": "Update a specific funnel.\n\nOnly the params included in the operation will update the funnel." - }, - "delete": { - "operationId": "Delete Funnel", - "responses": { - "200": { - "description": "", - "content": { + }, + "x-examples": { "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" + "funnelId": "5ab13e373697ac00e305333b", + "contactId": "5aaa65e05b706400300ad246", + "contactName": "Gumersindo supply", + "name": "Gumersindo", + "value": 48000, + "potential": 100, + "dueDate": 1521646788, + "stageId": "5ab13e373697ac00e3053336" + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Created", + "id": "5ac4f2cec839ea004e18a463" + } } } } } } + }, + "tags": ["LEADS"], + "description": "Create a new lead." + } + }, + "/leads/{leadId}": { + "parameters": [ + { + "name": "leadId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } } - }, - "tags": ["FUNNELS"], - "description": "Delete a specific funnel." - } - }, - "/leads": { - "get": { - "operationId": "List Leads", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/lead-output" } - }, - "examples": { - "response": { - "value": [ - { + ], + "get": { + "operationId": "Get Lead", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "funnelId": { + "type": "string" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "name": { + "type": "string" + }, + "person": { + "type": "integer" + }, + "personName": { + "type": "string" + }, + "value": { + "type": "integer" + }, + "potential": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + }, + "stageId": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "updatedAt": { + "type": "integer" + }, + "customFields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "value": { + "type": "string" + }, + "": { + "type": "string" + } + } + } + }, + "status": { + "type": "integer" + }, + "events": { + "type": "array", + "items": { + "type": "object", + "properties": { + "eventId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "title": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "userId": { + "type": "string" + } + } + } + }, + "tasks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "taskId": { + "type": "string" + }, + "taskName": { + "type": "string" + }, + "taskStatus": { + "type": "integer" + } + } + } + }, + "files": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "examples": { + "response": { + "value": { "id": "5ab27cc411aff3003e655fb3", "userId": "5ab13e373697ac00e305444d", "funnelId": "5ab13e373697ac00e305333b", @@ -451,9 +1119,15 @@ "stageId": "5ab13e373697ac00e3053336", "createdAt": 1521646788, "updatedAt": 1521659747, - "customfields": [ - { "field": "New", "value": "custom field" }, - { "field": "other", "value": "custom field" } + "customFields": [ + { + "field": "New", + "value": "custom field" + }, + { + "field": "other", + "value": "custom field" + } ], "status": 0, "events": [ @@ -496,1370 +1170,3783 @@ ], "files": ["config.ini"] } - ] - } - } - } - } - } - }, - "tags": ["LEADS"], - "description": "Get all your leads." - }, - "post": { - "operationId": "Create Lead", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "funnelId": { "type": "string" }, - "contactId": { "type": "string" }, - "contactName": { "type": "string" }, - "name": { "type": "string" }, - "value": { "type": "integer" }, - "potential": { "type": "integer" }, - "dueDate": { "type": "integer" }, - "stageId": { - "type": "string", - "description": "Either Stage ID or exact name are accepted. In the latter case, if there are multiple matches the oldest stage created will be selected." + } } } } } }, - "x-examples": { - "application/json": { - "funnelId": "5ab13e373697ac00e305333b", - "contactId": "5aaa65e05b706400300ad246", - "contactName": "Gumersindo supply", - "name": "Gumersindo", - "value": 48000, - "potential": 100, - "dueDate": 1521646788, - "stageId": "5ab13e373697ac00e3053336" - } - } + "tags": ["LEADS"], + "description": "Get a specific lead." }, - "responses": { - "201": { - "description": "", + "put": { + "operationId": "Update Lead", + "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { + "name": { + "type": "string" + }, "value": { - "status": 1, - "info": "Created", - "id": "5ac4f2cec839ea004e18a463" - } - } - } - } - } - } - }, - "tags": ["LEADS"], - "description": "Create a new lead." - } - }, - "/leads/{leadId}": { - "parameters": [ - { - "name": "leadId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], - "get": { - "operationId": "Get Lead", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "userId": { "type": "string" }, - "funnelId": { "type": "string" }, - "contactId": { "type": "string" }, - "contactName": { "type": "string" }, - "name": { "type": "string" }, - "person": { "type": "integer" }, - "personName": { "type": "string" }, - "value": { "type": "integer" }, - "potential": { "type": "integer" }, - "dueDate": { "type": "integer" }, - "stageId": { "type": "string" }, - "createdAt": { "type": "integer" }, - "updatedAt": { "type": "integer" }, - "customFields": { - "type": "array", - "items": { - "type": "object", - "properties": { - "field": { "type": "string" }, - "value": { "type": "string" }, - "": { "type": "string" } - } - } + "type": "integer" }, - "status": { "type": "integer" }, - "events": { - "type": "array", - "items": { - "type": "object", - "properties": { - "eventId": { "type": "string" }, - "type": { "type": "string" }, - "title": { "type": "string" }, - "desc": { "type": "string" }, - "createdAt": { "type": "integer" }, - "userId": { "type": "string" } - } - } + "dueDate": { + "type": "integer" }, - "tasks": { + "customFields": { "type": "array", "items": { "type": "object", "properties": { - "taskId": { "type": "string" }, - "taskName": { "type": "string" }, - "taskStatus": { "type": "integer" } + "field": { + "type": "string" + }, + "value": { + "type": "string" + } } } }, - "files": { "type": "array", "items": { "type": "string" } } - } - }, - "examples": { - "response": { - "value": { - "id": "5ab27cc411aff3003e655fb3", - "userId": "5ab13e373697ac00e305444d", - "funnelId": "5ab13e373697ac00e305333b", - "contactId": "5aaa65e05b706400300ad246", - "contactName": "Gumersindo supply", - "name": "Gumersindo", - "person": 0, - "personName": "", - "value": 48000, - "potential": 100, - "dueDate": 1521646788, - "stageId": "5ab13e373697ac00e3053336", - "createdAt": 1521646788, - "updatedAt": 1521659747, - "customFields": [ - { "field": "New", "value": "custom field" }, - { "field": "other", "value": "custom field" } - ], - "status": 0, - "events": [ - { - "eventId": "5ab2863c11aff300532c40b3", - "type": "note", - "title": "Lunch!", - "desc": "My note", - "createdAt": 1521649212, - "userId": "5a05cc5a60cea100094baf22" - }, - { - "eventId": "5ab294d811aff300587d96c4", - "type": "note", - "title": "Dinner", - "desc": "other event", - "createdAt": 1521652952, - "userId": "" - }, - { - "eventId": "5ab29ba711aff300587d96c5", - "type": "note", - "title": "Skype", - "desc": "with Sindo", - "createdAt": 1521654695, - "userId": "" - } - ], - "tasks": [ - { - "taskId": "5acb8f0112d56e00201fed93", - "taskName": "call", - "taskStatus": 1 - }, - { - "taskId": "5acb8f1212d56e00227196e3", - "taskName": "invite to him a coffee", - "taskStatus": 0 - } - ], - "files": ["config.ini"] + "status": { + "type": "integer" } } } } + }, + "x-examples": { + "application/json": { + "name": "Gumersindo", + "value": 48000, + "dueDate": 1521646788, + "customFields": [ + { + "field": "New", + "value": "custom field" + }, + { + "field": "other", + "value": "custom field" + } + ], + "status": 0 + } } - } - }, - "tags": ["LEADS"], - "description": "Get a specific lead." - }, - "put": { - "operationId": "Update Lead", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "value": { "type": "integer" }, - "dueDate": { "type": "integer" }, - "customFields": { - "type": "array", - "items": { - "type": "object", - "properties": { - "field": { "type": "string" }, - "value": { "type": "string" } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" } } }, - "status": { "type": "integer" } + "examples": { + "response": { + "value": { + "status": 1, + "info": "Updated", + "id": "5ac4f2cec839ea004e18a463" + } + } + } } } } }, - "x-examples": { - "application/json": { - "name": "Gumersindo", - "value": 48000, - "dueDate": 1521646788, - "customFields": [ - { "field": "New", "value": "custom field" }, - { "field": "other", "value": "custom field" } - ], - "status": 0 - } - } + "tags": ["LEADS"], + "description": "Update a specific lead.\n\nOnly the params included in the operation will update the lead." }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5ac4f2cec839ea004e18a463" + "delete": { + "operationId": "Delete Lead", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Successfully deleted", + "id": "5aba68b1c5d438006425ad45" + } } } } } } - } - }, - "tags": ["LEADS"], - "description": "Update a specific lead.\n\nOnly the params included in the operation will update the lead." + }, + "tags": ["LEADS"], + "description": "Delete a specific lead." + } }, - "delete": { - "operationId": "Delete Lead", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" + "/leads/{leadId}/notes": { + "post": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Created", + "id": "5ac4f2cec839ea004e18a463" + } } } } } } - } - }, - "tags": ["LEADS"], - "description": "Delete a specific lead." - } - }, - "/leads/{leadId}/notes": { - "post": { - "responses": { - "200": { - "description": "", + }, + "operationId": "Create Lead Note", + "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Created", - "id": "5ac4f2cec839ea004e18a463" + "title": { + "type": "string" + }, + "desc": { + "type": "string" } - } + }, + "required": ["title"] } } - } - } - }, - "operationId": "Create Lead Note", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "title": { "type": "string" }, - "desc": { "type": "string" } - }, - "required": ["title"] + }, + "x-examples": { + "application/json": { + "title": "New note", + "desc": "this note is a reminder" } } }, - "x-examples": { - "application/json": { - "title": "New note", - "desc": "this note is a reminder" + "tags": ["LEADS"], + "description": "Create a new lead note." + }, + "parameters": [ + { + "name": "leadId", + "in": "path", + "required": true, + "schema": { + "type": "string" } } - }, - "tags": ["LEADS"], - "description": "Create a new lead note." - }, - "parameters": [ - { - "name": "leadId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], - "put": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5ac4f2cec839ea004e18a463" + ], + "put": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Updated", + "id": "5ac4f2cec839ea004e18a463" + } } } } } } - } - }, - "operationId": "Update Lead Note", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "noteId": { "type": "string" }, - "title": { "type": "string" }, - "desc": { "type": "string" } - }, - "required": ["noteId"] - } - } }, - "x-examples": { - "application/json": { - "noteId": "3on4o2h0u2080282bn", - "title": "Meeting", - "desc": "remionder for the meeting" - } - } - }, - "tags": ["LEADS"], - "description": "Update a specific lead note.\n\nOnly the params included in the operation will update the note." - } - }, - "/leads/{leadId}/tasks": { - "post": { - "responses": { - "200": { - "description": "", + "operationId": "Update Lead Note", + "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Created", - "id": "5ac4f2cec839ea004e18a463" + "noteId": { + "type": "string" + }, + "title": { + "type": "string" + }, + "desc": { + "type": "string" } - } + }, + "required": ["noteId"] } } - } - } - }, - "operationId": "Create Lead Task", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { "name": { "type": "string" } } + }, + "x-examples": { + "application/json": { + "noteId": "3on4o2h0u2080282bn", + "title": "Meeting", + "desc": "remionder for the meeting" } } }, - "x-examples": { "application/json": { "name": "Main task" } } - }, - "tags": ["LEADS"], - "description": "Create a new lead task." - }, - "parameters": [ - { - "name": "leadId", - "in": "path", - "required": true, - "schema": { "type": "string" } + "tags": ["LEADS"], + "description": "Update a specific lead note.\n\nOnly the params included in the operation will update the note." } - ], - "put": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { "type": "object", "properties": {} } - } - } - } - }, - "operationId": "Update Lead Task", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "taskId": { "type": "string" }, - "name": { "type": "string" } - }, - "required": ["taskId"] + }, + "/leads/{leadId}/tasks": { + "post": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Created", + "id": "5ac4f2cec839ea004e18a463" + } + } + } + } } } }, - "x-examples": { - "application/json": { - "taskId": "4hi5o3357840730857h", - "name": "new task name" - } - } - }, - "tags": ["LEADS"], - "description": "Update a specific lead task.\n\nOnly the params included in the operation will update the task." - }, - "delete": { - "responses": { - "200": { - "description": "", + "operationId": "Create Lead Task", + "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" + "name": { + "type": "string" } } } } + }, + "x-examples": { + "application/json": { + "name": "Main task" + } } - } + }, + "tags": ["LEADS"], + "description": "Create a new lead task." }, - "operationId": "Delete Lead Task", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { "taskId": { "type": "string" } }, - "required": ["taskId"] + "parameters": [ + { + "name": "leadId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "put": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } } } }, - "x-examples": { - "application/json": { "taskId": "5aba68b1c5d438006425ad45" } - } - }, - "tags": ["LEADS"], - "description": "Delete a specific lead task." - } - }, - "/leads/{leadId}/dates": { - "put": { - "responses": { - "200": { - "description": "", + "operationId": "Update Lead Task", + "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5ac4f2cec839ea004e18a463" + "taskId": { + "type": "string" + }, + "name": { + "type": "string" } - } + }, + "required": ["taskId"] } } + }, + "x-examples": { + "application/json": { + "taskId": "4hi5o3357840730857h", + "name": "new task name" + } } - } + }, + "tags": ["LEADS"], + "description": "Update a specific lead task.\n\nOnly the params included in the operation will update the task." }, - "operationId": "Update Lead Creation Date", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { "date": { "type": "integer" } } + "delete": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Successfully deleted", + "id": "5aba68b1c5d438006425ad45" + } + } + } + } } } }, - "x-examples": { "application/json": { "date": 11523287868 } } - }, - "tags": ["LEADS"], - "description": "Update a specific lead creation's date." - }, - "parameters": [ - { - "name": "leadId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ] - }, - "/leads/{leadId}/stages": { - "put": { - "responses": { - "200": { - "description": "", + "operationId": "Delete Lead Task", + "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5ac4f2cec839ea004e18a463" + "taskId": { + "type": "string" } - } + }, + "required": ["taskId"] } } - } - } - }, - "operationId": "Update Lead Stage", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "stageId": { - "type": "string", - "description": "Either Stage ID or exact name are accepted. In the latter case, if there are multiple matches the oldest stage created will be selected." - } - } + }, + "x-examples": { + "application/json": { + "taskId": "5aba68b1c5d438006425ad45" } } }, - "x-examples": { - "application/json": { "stageId": "5ac4f2cec839ea004e18a463" } - } - }, - "tags": ["LEADS"], - "description": "Update a specific lead stage." - }, - "parameters": [ - { - "name": "leadId", - "in": "path", - "required": true, - "schema": { "type": "string" } + "tags": ["LEADS"], + "description": "Delete a specific lead task." } - ] - }, - "/events": { - "get": { - "operationId": "List Events", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/event-output" } - }, - "examples": { - "response": { - "value": [ - { - "id": "5ab11f1a3697ac00cd0a6423", - "name": "Coffe with P", - "contactId": "5ab11f1a3697ac00cd0a6423", - "contactName": "Patrick", - "kind": "coffee", - "desc": "meeting tot alk about the incoming events", - "startDate": 1522228026, - "endDate": 15222229430, - "status": 0, - "tags": ["tig", "tag"], - "locationDesc": "c/ Llacuna, 12", - "leadId": "5acb873c12d56e001d137e62", - "funnelId": "5acb866012d56e00100540e7" + }, + "/leads/{leadId}/dates": { + "put": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" }, - { - "id": "5ab13ab03697ac00e3053333", - "name": "Dinner with P", - "contactId": "", - "contactName": null, - "kind": "dinner", - "desc": null, - "startDate": 1521564336, - "endDate": 3043132272, - "status": 0, - "tags": [], - "locationDesc": null + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Updated", + "id": "5ac4f2cec839ea004e18a463" } - ] + } } } } } - } - }, - "tags": ["EVENTS"], - "description": "Get all your events." - }, - "post": { - "operationId": "Create Event", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "contactId": { "type": "string" }, - "contactName": { "type": "string" }, - "kind": { "type": "string" }, - "desc": { "type": "string" }, - "startDate": { "type": "integer" }, - "duration": { "type": "integer" }, - "status": { "type": "integer" }, - "tags": { "type": "array", "items": { "type": "string" } }, - "locationDesc": { "type": "string" }, - "leadId": { "type": "string" }, - "funnelId": { "type": "string" }, - "userId": { "type": "string" } - } - } - } }, - "x-examples": { - "application/json": { - "name": "Coffe with P", - "contactId": "5ab11f1a3697ac00cd0a6423", - "contactName": "Patrick", - "kind": "coffee", - "desc": "meeting to talk about the incoming events", - "startDate": 1522228026, - "duration": 3600, - "status": 0, - "tags": ["tig", "tag"], - "locationDesc": "c/ Llacuna, 12", - "leadId": "5acb873c12d56e001d137e62", - "funnelId": "5acb866012d56e00100540e7" - } - } - }, - "responses": { - "201": { - "description": "", + "operationId": "Update Lead Creation Date", + "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Created", - "id": "5ac4f2cec839ea004e18a463" + "date": { + "type": "integer" } } } } - } - } - }, - "tags": ["EVENTS"], - "description": "Create a new event." - } - }, - "/events/{eventId}": { - "parameters": [ - { - "name": "eventId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], - "get": { - "operationId": "Get Event", - "responses": { - "200": { - "description": "", - "content": { + }, + "x-examples": { "application/json": { - "schema": { - "$ref": "#/components/schemas/event-output-detailed" - }, - "examples": { - "response": { - "value": { - "id": "5ab11f1a3697ac00cd0a6423", - "name": "Coffe with P", - "contactId": "5ab11f1a3697ac00cd0a6423", - "contactName": "Patrick", - "kind": "coffee", - "desc": "meeting tot alk about the incoming events", - "startDate": 1522228026, - "endDate": 15222229430, - "status": 0, - "tags": ["tig", "tag"], - "locationDesc": "c/ Llacuna, 12", - "leadId": "5acb873c12d56e001d137e62", - "funnelId": "5acb866012d56e00100540e7" - } - } - } + "date": 11523287868 } } - } + }, + "tags": ["LEADS"], + "description": "Update a specific lead creation's date." }, - "tags": ["EVENTS"], - "description": "Get a specific event." + "parameters": [ + { + "name": "leadId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] }, - "put": { - "operationId": "Update Event", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "contactId": { "type": "string" }, - "contactName": { "type": "string" }, - "kind": { "type": "string" }, - "desc": { "type": "string" }, - "startDate": { "type": "integer" }, - "duration": { "type": "integer" }, - "status": { "type": "integer" }, - "tags": { "type": "array", "items": { "type": "string" } }, - "locationDesc": { "type": "string" }, - "leadId": { "type": "string" }, - "funnelId": { "type": "string" }, - "userId": { "type": "string" } + "/leads/{leadId}/stages": { + "put": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Updated", + "id": "5ac4f2cec839ea004e18a463" + } + } + } } } } }, - "x-examples": { - "application/json": { - "name": "Coffe with Patrick", - "contactId": "5ab11f1a3697ac00cd0a6423", - "contactName": "Patrick", - "kind": "coffee", - "desc": "meeting to talk about the incoming events", - "startDate": 1522228026, - "duration": 3600, - "status": 0, - "tags": ["tig", "tag"], - "locationDesc": "c/ Llacuna, 12", - "leadId": "5acb873c12d56e001d137e62", - "funnelId": "5acb866012d56e00100540e7" - } - } - }, - "responses": { - "200": { - "description": "", + "operationId": "Update Lead Stage", + "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5ac4f2cec839ea004e18a463" + "stageId": { + "type": "string", + "description": "Either Stage ID or exact name are accepted. In the latter case, if there are multiple matches the oldest stage created will be selected." } } } } + }, + "x-examples": { + "application/json": { + "stageId": "5ac4f2cec839ea004e18a463" + } } - } + }, + "tags": ["LEADS"], + "description": "Update a specific lead stage." }, - "tags": ["EVENTS"], - "description": "Update a specific event.\n\nOnly the params included in the operation will update the event." + "parameters": [ + { + "name": "leadId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] }, - "delete": { - "operationId": "Delete Event", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" + "/events": { + "get": { + "operationId": "List Events", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "title": "Event Basic Output", + "description": "The properties that are included when fetching a list of Events.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Event Common", + "description": "The properties that are shared amongst all versions of the Event model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "startDate": { + "type": "integer" + }, + "endDate": { + "type": "integer" + }, + "status": { + "type": "integer" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "locationDesc": { + "type": "string" + }, + "leadId": { + "type": "string" + }, + "funnelId": { + "type": "string" + } + }, + "x-readme-ref-name": "event-common" + } + ], + "x-readme-ref-name": "event-output" + } + }, + "examples": { + "response": { + "value": [ + { + "id": "5ab11f1a3697ac00cd0a6423", + "name": "Coffe with P", + "contactId": "5ab11f1a3697ac00cd0a6423", + "contactName": "Patrick", + "kind": "coffee", + "desc": "meeting tot alk about the incoming events", + "startDate": 1522228026, + "endDate": 15222229430, + "status": 0, + "tags": ["tig", "tag"], + "locationDesc": "c/ Llacuna, 12", + "leadId": "5acb873c12d56e001d137e62", + "funnelId": "5acb866012d56e00100540e7" + }, + { + "id": "5ab13ab03697ac00e3053333", + "name": "Dinner with P", + "contactId": "", + "contactName": null, + "kind": "dinner", + "desc": null, + "startDate": 1521564336, + "endDate": 3043132272, + "status": 0, + "tags": [], + "locationDesc": null + } + ] } } } } } - } + }, + "tags": ["EVENTS"], + "description": "Get all your events." }, - "tags": ["EVENTS"], - "description": "Delete a specific event." - } - }, - "/bookings/locations": { - "get": { - "operationId": "List Locations", - "responses": { - "200": { - "description": "List of account locations", + "post": { + "operationId": "Create Event", + "requestBody": { "content": { "application/json": { "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/location-output" } - }, - "examples": { - "response": { - "value": [ - { - "id": "5ab11f1a3697ac00cd0a6423", - "name": "Tienda en Girona", - "description": "Lorem ipsum dolor sit amet.", - "active": true, - "availableServices": [ - "67167a61f7ce326e820ab569", - "67167a61f7ce326e820ab568" - ] - }, - { - "id": "5ab11f1a3697ac00cd0a6424", - "name": "Tienda en Barcelona", - "description": "Lorem ipsum dolor sit amet.", - "active": false, - "availableServices": [] - } - ] - } + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "startDate": { + "type": "integer" + }, + "duration": { + "type": "integer" + }, + "status": { + "type": "integer" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "locationDesc": { + "type": "string" + }, + "leadId": { + "type": "string" + }, + "funnelId": { + "type": "string" + }, + "userId": { + "type": "string" + } + } } } - } - } - }, - "tags": ["BOOKINGS"], - "description": "Get all your locations." - } - }, - "/bookings/locations/{locationId}/slots": { - "parameters": [ - { - "name": "locationId", - "in": "path", - "required": true, - "description": "Specific location ID", - "schema": { "type": "string" } - }, - { - "name": "serviceId", - "in": "query", - "required": true, - "description": "Specific service ID", - "schema": { "type": "string" } - }, - { - "name": "day", - "in": "query", - "required": true, - "description": "Specific day (yyyy-mm-dd)", - "schema": { "type": "string" } - } - ], - "get": { - "operationId": "Get available slots for location", - "responses": { - "200": { - "description": "", - "content": { + }, + "x-examples": { "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/booking-slot" } - }, - "examples": { - "response": { - "value": [ - { - "dateTime": 1732615200, - "from": "2024-11-26T10:00:00+00:00", - "to": "2024-11-26T10:30:00+00:00", - "duration": 1800 + "name": "Coffe with P", + "contactId": "5ab11f1a3697ac00cd0a6423", + "contactName": "Patrick", + "kind": "coffee", + "desc": "meeting to talk about the incoming events", + "startDate": 1522228026, + "duration": 3600, + "status": 0, + "tags": ["tig", "tag"], + "locationDesc": "c/ Llacuna, 12", + "leadId": "5acb873c12d56e001d137e62", + "funnelId": "5acb866012d56e00100540e7" + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" }, - { - "dateTime": 1732616100, - "from": "2024-11-26T10:15:00+00:00", - "to": "2024-11-26T10:45:00+00:00", - "duration": 1800 + "info": { + "type": "string" }, - { - "dateTime": 1732617000, - "from": "2024-11-26T10:30:00+00:00", - "to": "2024-11-26T11:00:00+00:00", - "duration": 1800 + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Created", + "id": "5ac4f2cec839ea004e18a463" } - ] + } } } } } + }, + "tags": ["EVENTS"], + "description": "Create a new event." + } + }, + "/events/{eventId}": { + "parameters": [ + { + "name": "eventId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } } - }, - "tags": ["BOOKINGS"], - "description": "Get a list of available time slots for a location, specifying a service and a date." - } - }, - "/bookings": { - "get": { - "operationId": "List Bookings", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/booking-output" } - }, - "examples": { - "response": { - "value": [ + ], + "get": { + "operationId": "Get Event", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "title": "Event Detailed Output", + "description": "The properties that are included when fetching a single Event.", + "allOf": [ { - "id": "5ab11f1a3697ac00cd0a6423", - "startTime": 1726124400, - "endTime": 1726125900, - "duration": 1500, - "createdAt": 1725619450, - "updatedAt": 1725619450, - "status": "confirmed", - "service": [ - { - "id": "66704f4a0ace9fc5e30078b5", - "name": "Planchado", - "description": "Planchado de pelo", - "duration": 1500, - "subtotal": [{ "amount": 2.48, "currency": "EUR" }], - "total": [{ "amount": 3, "currency": "EUR" }] - } - ], - "space": [ - { "id": "66ac8cab99b9e2b2310bdd66", "name": "Sala 1A" } - ], - "outcome": [ - { - "documentId": "6717b925f2753f36670594a6", - "type": "salesreceipt", - "exportedAt": 1729607974 - } - ], - "customFields": [ + "title": "Event Basic Output", + "description": "The properties that are included when fetching a list of Events.", + "allOf": [ { - "key": "name", - "label": "Nombre", - "type": "text", - "value": "Jon Snow" + "type": "object", + "properties": {} }, { - "key": "email", - "label": "E-mail", - "type": "email", - "value": "jon.snow@somemail.com" + "title": "Event Common", + "description": "The properties that are shared amongst all versions of the Event model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "startDate": { + "type": "integer" + }, + "endDate": { + "type": "integer" + }, + "status": { + "type": "integer" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "locationDesc": { + "type": "string" + }, + "leadId": { + "type": "string" + }, + "funnelId": { + "type": "string" + } + }, + "x-readme-ref-name": "event-common" } - ] + ], + "x-readme-ref-name": "event-output" }, { - "id": "5ab11f1a3697ac00cd0a6422", - "startTime": 1726124400, - "endTime": 1726125900, - "duration": 1500, - "createdAt": 1725619450, - "updatedAt": 1725619450, - "status": "confirmed", - "service": [ - { - "id": "66704f4a0ace9fc5e30078b6", - "name": "Corte", - "description": "Corte de pelo", - "duration": 1500, - "subtotal": [{ "amount": 2.48, "currency": "EUR" }], - "total": [{ "amount": 3, "currency": "EUR" }] - } - ], - "space": [ - { "id": "66ac8cab99b9e2b2310bdd67", "name": "Sala 1B" } - ], - "outcome": [ - { - "documentId": "6717b925f2753f36670594a7", - "type": "salesreceipt", - "exportedAt": 1729607974 - } - ], - "customFields": [ - { - "key": "name", - "label": "Nombre", - "type": "text", - "value": "Arya Stark" - }, - { - "key": "email", - "label": "E-mail", - "type": "email", - "value": "arya.stark@somemail.com" - } - ] + "type": "object", + "properties": {} } - ] - } - } - } - } - } - }, - "tags": ["BOOKINGS"], - "description": "Get all your bookings." - }, - "post": { - "operationId": "Create Booking", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "locationId": { "type": "string" }, - "serviceId": { "type": "string" }, - "dateTime": { "type": "integer" }, - "timezone": { "type": "string" }, - "language": { "type": "string" }, - "customFields": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { "type": "string" }, - "value": { "type": "string" } + ], + "x-readme-ref-name": "event-output-detailed" + }, + "examples": { + "response": { + "value": { + "id": "5ab11f1a3697ac00cd0a6423", + "name": "Coffe with P", + "contactId": "5ab11f1a3697ac00cd0a6423", + "contactName": "Patrick", + "kind": "coffee", + "desc": "meeting tot alk about the incoming events", + "startDate": 1522228026, + "endDate": 15222229430, + "status": 0, + "tags": ["tig", "tag"], + "locationDesc": "c/ Llacuna, 12", + "leadId": "5acb873c12d56e001d137e62", + "funnelId": "5acb866012d56e00100540e7" } } } - }, - "required": [ - "locationId", - "serviceId", - "dateTime", - "timezone", - "language", - "customFields" - ] + } } } }, - "x-examples": { - "application/json": { - "locationId": "6710e0b21ab397666906c6f4", - "serviceId": "66704f4a0ace9fc5e30078b5", - "dateTime": 1730109600, - "timezone": "Europe/Luxembourg", - "language": "es", - "customFields": [ - { "key": "name", "value": "Jon Snow" }, - { "key": "email", "value": "jon.snow@somemail.com" } - ] - } - } + "tags": ["EVENTS"], + "description": "Get a specific event." }, - "responses": { - "201": { - "description": "Booking created successfully", + "put": { + "operationId": "Update Event", + "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "status": { "type": "integer" }, - "id": { "type": "string" } + "name": { + "type": "string" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "startDate": { + "type": "integer" + }, + "duration": { + "type": "integer" + }, + "status": { + "type": "integer" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "locationDesc": { + "type": "string" + }, + "leadId": { + "type": "string" + }, + "funnelId": { + "type": "string" + }, + "userId": { + "type": "string" + } } } } + }, + "x-examples": { + "application/json": { + "name": "Coffe with Patrick", + "contactId": "5ab11f1a3697ac00cd0a6423", + "contactName": "Patrick", + "kind": "coffee", + "desc": "meeting to talk about the incoming events", + "startDate": 1522228026, + "duration": 3600, + "status": 0, + "tags": ["tig", "tag"], + "locationDesc": "c/ Llacuna, 12", + "leadId": "5acb873c12d56e001d137e62", + "funnelId": "5acb866012d56e00100540e7" + } } }, - "410": { - "description": "Unavailable time slot", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" } + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Updated", + "id": "5ac4f2cec839ea004e18a463" + } + } } } } } - } + }, + "tags": ["EVENTS"], + "description": "Update a specific event.\n\nOnly the params included in the operation will update the event." }, - "tags": ["BOOKINGS"], - "description": "Create new booking." - } - }, - "/bookings/{bookingId}": { - "parameters": [ - { - "name": "bookingId", - "in": "path", - "required": true, - "schema": { "type": "string" } + "delete": { + "operationId": "Delete Event", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Successfully deleted", + "id": "5aba68b1c5d438006425ad45" + } + } + } + } + } + } + }, + "tags": ["EVENTS"], + "description": "Delete a specific event." } - ], - "get": { - "operationId": "Get Booking", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/booking-output-detailed" - }, - "examples": { "response": { "value": null } } - }, - "id": { - "examples": { - "response": { "value": "5ab11f1a3697ac00cd0a6423" } + }, + "/bookings/locations": { + "get": { + "operationId": "List Locations", + "responses": { + "200": { + "description": "List of account locations", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "title": "Location Basic Output", + "description": "The properties that are included when fetching a list of Locations.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Location Common", + "description": "The properties that are shared amongst all versions of the Location model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "availableServices": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "x-readme-ref-name": "location-common" + } + ], + "x-readme-ref-name": "location-output" + } + }, + "examples": { + "response": { + "value": [ + { + "id": "5ab11f1a3697ac00cd0a6423", + "name": "Tienda en Girona", + "description": "Lorem ipsum dolor sit amet.", + "active": true, + "availableServices": [ + "67167a61f7ce326e820ab569", + "67167a61f7ce326e820ab568" + ] + }, + { + "id": "5ab11f1a3697ac00cd0a6424", + "name": "Tienda en Barcelona", + "description": "Lorem ipsum dolor sit amet.", + "active": false, + "availableServices": [] + } + ] + } + } } } } - } - }, - "tags": ["BOOKINGS"], - "description": "Get a specific booking." + }, + "tags": ["BOOKINGS"], + "description": "Get all your locations." + } }, - "put": { - "operationId": "Update Booking", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "dateTime": { "type": "integer" }, - "customFields": { + "/bookings/locations/{locationId}/slots": { + "parameters": [ + { + "name": "locationId", + "in": "path", + "required": true, + "description": "Specific location ID", + "schema": { + "type": "string" + } + }, + { + "name": "serviceId", + "in": "query", + "required": true, + "description": "Specific service ID", + "schema": { + "type": "string" + } + }, + { + "name": "day", + "in": "query", + "required": true, + "description": "Specific day (yyyy-mm-dd)", + "schema": { + "type": "string" + } + } + ], + "get": { + "operationId": "Get available slots for location", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { + "title": "Booking Slot Common", + "description": "Definition of a Slot object.", "type": "object", "properties": { - "key": { "type": "string" }, - "value": { "type": "string" } - } + "dateTime": { + "type": "integer" + }, + "from": { + "type": "string" + }, + "to": { + "type": "string" + }, + "duration": { + "type": "integer" + } + }, + "x-readme-ref-name": "booking-slot" + } + }, + "examples": { + "response": { + "value": [ + { + "dateTime": 1732615200, + "from": "2024-11-26T10:00:00+00:00", + "to": "2024-11-26T10:30:00+00:00", + "duration": 1800 + }, + { + "dateTime": 1732616100, + "from": "2024-11-26T10:15:00+00:00", + "to": "2024-11-26T10:45:00+00:00", + "duration": 1800 + }, + { + "dateTime": 1732617000, + "from": "2024-11-26T10:30:00+00:00", + "to": "2024-11-26T11:00:00+00:00", + "duration": 1800 + } + ] } } } } } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { "status": 1, "id": "5ac4f2cec839ea004e18a463" } + }, + "tags": ["BOOKINGS"], + "description": "Get a list of available time slots for a location, specifying a service and a date." + } + }, + "/bookings": { + "get": { + "operationId": "List Bookings", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "title": "Booking Basic Output", + "description": "The properties that are included when fetching a list of Booking.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Booking Common", + "description": "The properties that are shared amongst all versions of the Booking model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "startTime": { + "type": "integer" + }, + "endTime": { + "type": "integer" + }, + "duration": { + "type": "integer" + }, + "createdAt": { + "type": "integer" + }, + "updatedAt": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "service": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "duration": { + "type": "integer" + }, + "subtotal": { + "type": "object", + "properties": { + "amount": { + "type": "number" + }, + "currency": { + "type": "string" + } + } + }, + "total": { + "type": "object", + "properties": { + "amount": { + "type": "number" + }, + "currency": { + "type": "string" + } + } + } + } + }, + "space": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "outcome": { + "type": "object", + "properties": { + "documentId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "exportedAt": { + "type": "integer" + } + } + }, + "customFieldsValues": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "label": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + } + } + } + }, + "x-readme-ref-name": "booking-common" + } + ], + "x-readme-ref-name": "booking-output" + } + }, + "examples": { + "response": { + "value": [ + { + "id": "5ab11f1a3697ac00cd0a6423", + "startTime": 1726124400, + "endTime": 1726125900, + "duration": 1500, + "createdAt": 1725619450, + "updatedAt": 1725619450, + "status": "confirmed", + "service": [ + { + "id": "66704f4a0ace9fc5e30078b5", + "name": "Planchado", + "description": "Planchado de pelo", + "duration": 1500, + "subtotal": [ + { + "amount": 2.48, + "currency": "EUR" + } + ], + "total": [ + { + "amount": 3, + "currency": "EUR" + } + ] + } + ], + "space": [ + { + "id": "66ac8cab99b9e2b2310bdd66", + "name": "Sala 1A" + } + ], + "outcome": [ + { + "documentId": "6717b925f2753f36670594a6", + "type": "salesreceipt", + "exportedAt": 1729607974 + } + ], + "customFields": [ + { + "key": "name", + "label": "Nombre", + "type": "text", + "value": "Jon Snow" + }, + { + "key": "email", + "label": "E-mail", + "type": "email", + "value": "jon.snow@somemail.com" + } + ] + }, + { + "id": "5ab11f1a3697ac00cd0a6422", + "startTime": 1726124400, + "endTime": 1726125900, + "duration": 1500, + "createdAt": 1725619450, + "updatedAt": 1725619450, + "status": "confirmed", + "service": [ + { + "id": "66704f4a0ace9fc5e30078b6", + "name": "Corte", + "description": "Corte de pelo", + "duration": 1500, + "subtotal": [ + { + "amount": 2.48, + "currency": "EUR" + } + ], + "total": [ + { + "amount": 3, + "currency": "EUR" + } + ] + } + ], + "space": [ + { + "id": "66ac8cab99b9e2b2310bdd67", + "name": "Sala 1B" + } + ], + "outcome": [ + { + "documentId": "6717b925f2753f36670594a7", + "type": "salesreceipt", + "exportedAt": 1729607974 + } + ], + "customFields": [ + { + "key": "name", + "label": "Nombre", + "type": "text", + "value": "Arya Stark" + }, + { + "key": "email", + "label": "E-mail", + "type": "email", + "value": "arya.stark@somemail.com" + } + ] + } + ] + } } } } } - } + }, + "tags": ["BOOKINGS"], + "description": "Get all your bookings." }, - "tags": ["BOOKINGS"], - "description": "Update a specific booking.\n\nOnly the params included in the operation will update the booking." - }, - "delete": { - "operationId": "Cancel Booking", - "responses": { - "200": { - "description": "", + "post": { + "operationId": "Create Booking", + "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Booking canceled", - "id": "5aba68b1c5d438006425ad45" - } - } - } - } - } - } - }, - "tags": ["BOOKINGS"], - "description": "Cancel a specific booking." - } + "locationId": { + "type": "string" + }, + "serviceId": { + "type": "string" + }, + "dateTime": { + "type": "integer" + }, + "timezone": { + "type": "string" + }, + "language": { + "type": "string" + }, + "customFields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + } + } + }, + "required": [ + "locationId", + "serviceId", + "dateTime", + "timezone", + "language", + "customFields" + ] + } + } + }, + "x-examples": { + "application/json": { + "locationId": "6710e0b21ab397666906c6f4", + "serviceId": "66704f4a0ace9fc5e30078b5", + "dateTime": 1730109600, + "timezone": "Europe/Luxembourg", + "language": "es", + "customFields": [ + { + "key": "name", + "value": "Jon Snow" + }, + { + "key": "email", + "value": "jon.snow@somemail.com" + } + ] + } + } + }, + "responses": { + "201": { + "description": "Booking created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "id": { + "type": "string" + } + } + } + } + } + }, + "410": { + "description": "Unavailable time slot", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + } + } + } + } + } + } + }, + "tags": ["BOOKINGS"], + "description": "Create new booking." + } + }, + "/bookings/{bookingId}": { + "parameters": [ + { + "name": "bookingId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "get": { + "operationId": "Get Booking", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "title": "Booking Detailed Output", + "description": "The properties that are included when fetching a single Booking.", + "allOf": [ + { + "title": "Booking Basic Output", + "description": "The properties that are included when fetching a list of Booking.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Booking Common", + "description": "The properties that are shared amongst all versions of the Booking model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "startTime": { + "type": "integer" + }, + "endTime": { + "type": "integer" + }, + "duration": { + "type": "integer" + }, + "createdAt": { + "type": "integer" + }, + "updatedAt": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "service": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "duration": { + "type": "integer" + }, + "subtotal": { + "type": "object", + "properties": { + "amount": { + "type": "number" + }, + "currency": { + "type": "string" + } + } + }, + "total": { + "type": "object", + "properties": { + "amount": { + "type": "number" + }, + "currency": { + "type": "string" + } + } + } + } + }, + "space": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "outcome": { + "type": "object", + "properties": { + "documentId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "exportedAt": { + "type": "integer" + } + } + }, + "customFieldsValues": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "label": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + } + } + } + }, + "x-readme-ref-name": "booking-common" + } + ], + "x-readme-ref-name": "booking-output" + }, + { + "type": "object", + "properties": {} + } + ], + "x-readme-ref-name": "booking-output-detailed" + }, + "examples": { + "response": { + "value": null + } + } + }, + "id": { + "examples": { + "response": { + "value": "5ab11f1a3697ac00cd0a6423" + } + } + } + } + } + }, + "tags": ["BOOKINGS"], + "description": "Get a specific booking." + }, + "put": { + "operationId": "Update Booking", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "dateTime": { + "type": "integer" + }, + "customFields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "id": "5ac4f2cec839ea004e18a463" + } + } + } + } + } + } + }, + "tags": ["BOOKINGS"], + "description": "Update a specific booking.\n\nOnly the params included in the operation will update the booking." + }, + "delete": { + "operationId": "Cancel Booking", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Booking canceled", + "id": "5aba68b1c5d438006425ad45" + } + } + } + } + } + } + }, + "tags": ["BOOKINGS"], + "description": "Cancel a specific booking." + } + } + }, + "tags": [ + { + "name": "FUNNELS" + }, + { + "name": "LEADS" + }, + { + "name": "EVENTS" + }, + { + "name": "LOCATIONS" + }, + { + "name": "BOOKINGS" + } + ], + "security": [ + { + "Auth": [] + } + ], + "servers": [ + { + "url": "https://api.holded.com/api/crm/v1" + } + ], + "components": { + "responses": { + "Standard_Error": { + "description": "Something went wrong", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 0, + "info": "Not found" + } + } + } + } + } + } + }, + "securitySchemes": { + "Auth": { + "type": "apiKey", + "name": "key", + "in": "header" + } + }, + "schemas": { + "funnel-common": { + "title": "Funnel Common", + "description": "The properties that are shared amongst all versions of the Funnel model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "stages": { + "type": "array", + "items": { + "type": "object", + "properties": { + "stageId": { + "type": "string" + }, + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + } + } + } + }, + "won": { + "type": "object", + "properties": { + "num": { + "type": "integer" + }, + "value": { + "type": "integer" + } + } + }, + "leads": { + "type": "object", + "properties": { + "num": { + "type": "integer" + }, + "value": { + "type": "integer" + } + } + }, + "lost": { + "type": "object", + "properties": { + "num": { + "type": "integer" + }, + "value": { + "type": "integer" + } + } + }, + "recentWon": { + "type": "array", + "items": { + "type": "string" + } + }, + "recentLeads": { + "type": "array", + "items": { + "type": "string" + } + }, + "recentLost": { + "type": "array", + "items": { + "type": "string" + } + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "labelId": { + "type": "string" + }, + "labelName": { + "type": "string" + }, + "labelColor": { + "type": "string" + } + } + } + }, + "preferences": { + "type": "object", + "properties": { + "emails": { + "type": "array", + "items": { + "type": "object" + } + } + } + }, + "customFields": { + "type": "array", + "items": { + "type": "object" + } + } + }, + "x-readme-ref-name": "funnel-common" + }, + "funnel-input": { + "title": "Funnel Input", + "description": "The properties that are allowed when creating or updating a Funnel.", + "allOf": [ + { + "title": "Funnel Common", + "description": "The properties that are shared amongst all versions of the Funnel model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "stages": { + "type": "array", + "items": { + "type": "object", + "properties": { + "stageId": { + "type": "string" + }, + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + } + } + } + }, + "won": { + "type": "object", + "properties": { + "num": { + "type": "integer" + }, + "value": { + "type": "integer" + } + } + }, + "leads": { + "type": "object", + "properties": { + "num": { + "type": "integer" + }, + "value": { + "type": "integer" + } + } + }, + "lost": { + "type": "object", + "properties": { + "num": { + "type": "integer" + }, + "value": { + "type": "integer" + } + } + }, + "recentWon": { + "type": "array", + "items": { + "type": "string" + } + }, + "recentLeads": { + "type": "array", + "items": { + "type": "string" + } + }, + "recentLost": { + "type": "array", + "items": { + "type": "string" + } + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "labelId": { + "type": "string" + }, + "labelName": { + "type": "string" + }, + "labelColor": { + "type": "string" + } + } + } + }, + "preferences": { + "type": "object", + "properties": { + "emails": { + "type": "array", + "items": { + "type": "object" + } + } + } + }, + "customFields": { + "type": "array", + "items": { + "type": "object" + } + } + }, + "x-readme-ref-name": "funnel-common" + }, + { + "type": "object", + "properties": {} + } + ], + "x-readme-ref-name": "funnel-input" + }, + "funnel-output": { + "title": "Funnel Basic Output", + "description": "The properties that are included when fetching a list of Funnels.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Funnel Common", + "description": "The properties that are shared amongst all versions of the Funnel model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "stages": { + "type": "array", + "items": { + "type": "object", + "properties": { + "stageId": { + "type": "string" + }, + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + } + } + } + }, + "won": { + "type": "object", + "properties": { + "num": { + "type": "integer" + }, + "value": { + "type": "integer" + } + } + }, + "leads": { + "type": "object", + "properties": { + "num": { + "type": "integer" + }, + "value": { + "type": "integer" + } + } + }, + "lost": { + "type": "object", + "properties": { + "num": { + "type": "integer" + }, + "value": { + "type": "integer" + } + } + }, + "recentWon": { + "type": "array", + "items": { + "type": "string" + } + }, + "recentLeads": { + "type": "array", + "items": { + "type": "string" + } + }, + "recentLost": { + "type": "array", + "items": { + "type": "string" + } + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "labelId": { + "type": "string" + }, + "labelName": { + "type": "string" + }, + "labelColor": { + "type": "string" + } + } + } + }, + "preferences": { + "type": "object", + "properties": { + "emails": { + "type": "array", + "items": { + "type": "object" + } + } + } + }, + "customFields": { + "type": "array", + "items": { + "type": "object" + } + } + }, + "x-readme-ref-name": "funnel-common" + } + ], + "x-readme-ref-name": "funnel-output" + }, + "funnel-output-detailed": { + "title": "Funnel Detailed Output", + "description": "The properties that are included when fetching a single Funnel.", + "allOf": [ + { + "title": "Funnel Basic Output", + "description": "The properties that are included when fetching a list of Funnels.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Funnel Common", + "description": "The properties that are shared amongst all versions of the Funnel model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "stages": { + "type": "array", + "items": { + "type": "object", + "properties": { + "stageId": { + "type": "string" + }, + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + } + } + } + }, + "won": { + "type": "object", + "properties": { + "num": { + "type": "integer" + }, + "value": { + "type": "integer" + } + } + }, + "leads": { + "type": "object", + "properties": { + "num": { + "type": "integer" + }, + "value": { + "type": "integer" + } + } + }, + "lost": { + "type": "object", + "properties": { + "num": { + "type": "integer" + }, + "value": { + "type": "integer" + } + } + }, + "recentWon": { + "type": "array", + "items": { + "type": "string" + } + }, + "recentLeads": { + "type": "array", + "items": { + "type": "string" + } + }, + "recentLost": { + "type": "array", + "items": { + "type": "string" + } + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "labelId": { + "type": "string" + }, + "labelName": { + "type": "string" + }, + "labelColor": { + "type": "string" + } + } + } + }, + "preferences": { + "type": "object", + "properties": { + "emails": { + "type": "array", + "items": { + "type": "object" + } + } + } + }, + "customFields": { + "type": "array", + "items": { + "type": "object" + } + } + }, + "x-readme-ref-name": "funnel-common" + } + ], + "x-readme-ref-name": "funnel-output" + }, + { + "type": "object", + "properties": {} + } + ], + "x-readme-ref-name": "funnel-output-detailed" + }, + "lead-common": { + "title": "Lead Common", + "description": "The properties that are shared amongst all versions of the Lead model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "funnelId": { + "type": "string" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "name": { + "type": "string" + }, + "person": { + "type": "integer" + }, + "personName": { + "type": "string" + }, + "value": { + "type": "integer" + }, + "potential": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + }, + "stageId": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "updatedAt": { + "type": "integer" + }, + "customFields": { + "type": "array", + "items": { + "type": "object" + } + }, + "status": { + "type": "integer" + }, + "events": { + "type": "array", + "items": { + "type": "object", + "properties": { + "eventId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "title": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "userId": { + "type": "string" + } + } + } + }, + "tasks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "taskId": { + "type": "string" + }, + "taskName": { + "type": "string" + }, + "taskStatus": { + "type": "integer" + } + } + } + }, + "files": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "x-readme-ref-name": "lead-common" + }, + "lead-input": { + "title": "Lead Input", + "description": "The properties that are allowed when creating or updating a Lead.", + "allOf": [ + { + "title": "Lead Common", + "description": "The properties that are shared amongst all versions of the Lead model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "funnelId": { + "type": "string" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "name": { + "type": "string" + }, + "person": { + "type": "integer" + }, + "personName": { + "type": "string" + }, + "value": { + "type": "integer" + }, + "potential": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + }, + "stageId": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "updatedAt": { + "type": "integer" + }, + "customFields": { + "type": "array", + "items": { + "type": "object" + } + }, + "status": { + "type": "integer" + }, + "events": { + "type": "array", + "items": { + "type": "object", + "properties": { + "eventId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "title": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "userId": { + "type": "string" + } + } + } + }, + "tasks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "taskId": { + "type": "string" + }, + "taskName": { + "type": "string" + }, + "taskStatus": { + "type": "integer" + } + } + } + }, + "files": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "x-readme-ref-name": "lead-common" + }, + { + "type": "object", + "properties": {} + } + ], + "x-readme-ref-name": "lead-input" + }, + "lead-output": { + "title": "Lead Basic Output", + "description": "The properties that are included when fetching a list of Leads.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Lead Common", + "description": "The properties that are shared amongst all versions of the Lead model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "funnelId": { + "type": "string" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "name": { + "type": "string" + }, + "person": { + "type": "integer" + }, + "personName": { + "type": "string" + }, + "value": { + "type": "integer" + }, + "potential": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + }, + "stageId": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "updatedAt": { + "type": "integer" + }, + "customFields": { + "type": "array", + "items": { + "type": "object" + } + }, + "status": { + "type": "integer" + }, + "events": { + "type": "array", + "items": { + "type": "object", + "properties": { + "eventId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "title": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "userId": { + "type": "string" + } + } + } + }, + "tasks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "taskId": { + "type": "string" + }, + "taskName": { + "type": "string" + }, + "taskStatus": { + "type": "integer" + } + } + } + }, + "files": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "x-readme-ref-name": "lead-common" + } + ], + "x-readme-ref-name": "lead-output" + }, + "lead-output-detailed": { + "title": "Lead Detailed Output", + "description": "The properties that are included when fetching a single Lead.", + "allOf": [ + { + "title": "Lead Basic Output", + "description": "The properties that are included when fetching a list of Leads.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Lead Common", + "description": "The properties that are shared amongst all versions of the Lead model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "funnelId": { + "type": "string" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "name": { + "type": "string" + }, + "person": { + "type": "integer" + }, + "personName": { + "type": "string" + }, + "value": { + "type": "integer" + }, + "potential": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + }, + "stageId": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "updatedAt": { + "type": "integer" + }, + "customFields": { + "type": "array", + "items": { + "type": "object" + } + }, + "status": { + "type": "integer" + }, + "events": { + "type": "array", + "items": { + "type": "object", + "properties": { + "eventId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "title": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "userId": { + "type": "string" + } + } + } + }, + "tasks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "taskId": { + "type": "string" + }, + "taskName": { + "type": "string" + }, + "taskStatus": { + "type": "integer" + } + } + } + }, + "files": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "x-readme-ref-name": "lead-common" + } + ], + "x-readme-ref-name": "lead-output" + }, + { + "type": "object", + "properties": {} + } + ], + "x-readme-ref-name": "lead-output-detailed" + }, + "event-common": { + "title": "Event Common", + "description": "The properties that are shared amongst all versions of the Event model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "startDate": { + "type": "integer" + }, + "endDate": { + "type": "integer" + }, + "status": { + "type": "integer" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "locationDesc": { + "type": "string" + }, + "leadId": { + "type": "string" + }, + "funnelId": { + "type": "string" + } + }, + "x-readme-ref-name": "event-common" + }, + "event-input": { + "title": "Event Input", + "description": "The properties that are allowed when creating or updating a Event.", + "allOf": [ + { + "title": "Event Common", + "description": "The properties that are shared amongst all versions of the Event model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "startDate": { + "type": "integer" + }, + "endDate": { + "type": "integer" + }, + "status": { + "type": "integer" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "locationDesc": { + "type": "string" + }, + "leadId": { + "type": "string" + }, + "funnelId": { + "type": "string" + } + }, + "x-readme-ref-name": "event-common" + }, + { + "type": "object", + "properties": { + "userId": { + "type": "string" + } + } + } + ], + "x-readme-ref-name": "event-input" + }, + "event-output": { + "title": "Event Basic Output", + "description": "The properties that are included when fetching a list of Events.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Event Common", + "description": "The properties that are shared amongst all versions of the Event model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "startDate": { + "type": "integer" + }, + "endDate": { + "type": "integer" + }, + "status": { + "type": "integer" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "locationDesc": { + "type": "string" + }, + "leadId": { + "type": "string" + }, + "funnelId": { + "type": "string" + } + }, + "x-readme-ref-name": "event-common" + } + ], + "x-readme-ref-name": "event-output" + }, + "event-output-detailed": { + "title": "Event Detailed Output", + "description": "The properties that are included when fetching a single Event.", + "allOf": [ + { + "title": "Event Basic Output", + "description": "The properties that are included when fetching a list of Events.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Event Common", + "description": "The properties that are shared amongst all versions of the Event model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "startDate": { + "type": "integer" + }, + "endDate": { + "type": "integer" + }, + "status": { + "type": "integer" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "locationDesc": { + "type": "string" + }, + "leadId": { + "type": "string" + }, + "funnelId": { + "type": "string" + } + }, + "x-readme-ref-name": "event-common" + } + ], + "x-readme-ref-name": "event-output" + }, + { + "type": "object", + "properties": {} + } + ], + "x-readme-ref-name": "event-output-detailed" + }, + "location-common": { + "title": "Location Common", + "description": "The properties that are shared amongst all versions of the Location model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "availableServices": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "x-readme-ref-name": "location-common" + }, + "location-output": { + "title": "Location Basic Output", + "description": "The properties that are included when fetching a list of Locations.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Location Common", + "description": "The properties that are shared amongst all versions of the Location model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "availableServices": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "x-readme-ref-name": "location-common" + } + ], + "x-readme-ref-name": "location-output" + }, + "booking-common": { + "title": "Booking Common", + "description": "The properties that are shared amongst all versions of the Booking model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "startTime": { + "type": "integer" + }, + "endTime": { + "type": "integer" + }, + "duration": { + "type": "integer" + }, + "createdAt": { + "type": "integer" + }, + "updatedAt": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "service": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "duration": { + "type": "integer" + }, + "subtotal": { + "type": "object", + "properties": { + "amount": { + "type": "number" + }, + "currency": { + "type": "string" + } + } + }, + "total": { + "type": "object", + "properties": { + "amount": { + "type": "number" + }, + "currency": { + "type": "string" + } + } + } + } + }, + "space": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "outcome": { + "type": "object", + "properties": { + "documentId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "exportedAt": { + "type": "integer" + } + } + }, + "customFieldsValues": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "label": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + } + } + } + }, + "x-readme-ref-name": "booking-common" + }, + "booking-slot": { + "title": "Booking Slot Common", + "description": "Definition of a Slot object.", + "type": "object", + "properties": { + "dateTime": { + "type": "integer" + }, + "from": { + "type": "string" + }, + "to": { + "type": "string" + }, + "duration": { + "type": "integer" + } + }, + "x-readme-ref-name": "booking-slot" + }, + "booking-output": { + "title": "Booking Basic Output", + "description": "The properties that are included when fetching a list of Booking.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Booking Common", + "description": "The properties that are shared amongst all versions of the Booking model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "startTime": { + "type": "integer" + }, + "endTime": { + "type": "integer" + }, + "duration": { + "type": "integer" + }, + "createdAt": { + "type": "integer" + }, + "updatedAt": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "service": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "duration": { + "type": "integer" + }, + "subtotal": { + "type": "object", + "properties": { + "amount": { + "type": "number" + }, + "currency": { + "type": "string" + } + } + }, + "total": { + "type": "object", + "properties": { + "amount": { + "type": "number" + }, + "currency": { + "type": "string" + } + } + } + } + }, + "space": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "outcome": { + "type": "object", + "properties": { + "documentId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "exportedAt": { + "type": "integer" + } + } + }, + "customFieldsValues": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "label": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + } + } + } + }, + "x-readme-ref-name": "booking-common" + } + ], + "x-readme-ref-name": "booking-output" + }, + "booking-output-detailed": { + "title": "Booking Detailed Output", + "description": "The properties that are included when fetching a single Booking.", + "allOf": [ + { + "title": "Booking Basic Output", + "description": "The properties that are included when fetching a list of Booking.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Booking Common", + "description": "The properties that are shared amongst all versions of the Booking model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "startTime": { + "type": "integer" + }, + "endTime": { + "type": "integer" + }, + "duration": { + "type": "integer" + }, + "createdAt": { + "type": "integer" + }, + "updatedAt": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "service": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "duration": { + "type": "integer" + }, + "subtotal": { + "type": "object", + "properties": { + "amount": { + "type": "number" + }, + "currency": { + "type": "string" + } + } + }, + "total": { + "type": "object", + "properties": { + "amount": { + "type": "number" + }, + "currency": { + "type": "string" + } + } + } + } + }, + "space": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "outcome": { + "type": "object", + "properties": { + "documentId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "exportedAt": { + "type": "integer" + } + } + }, + "customFieldsValues": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "label": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + } + } + } + }, + "x-readme-ref-name": "booking-common" + } + ], + "x-readme-ref-name": "booking-output" + }, + { + "type": "object", + "properties": {} + } + ], + "x-readme-ref-name": "booking-output-detailed" + }, + "booking-available-slots": { + "title": "Booking Detailed Output", + "description": "The properties that are included when fetching a single Booking.", + "allOf": [ + { + "title": "Booking Basic Output", + "description": "The properties that are included when fetching a list of Booking.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Booking Common", + "description": "The properties that are shared amongst all versions of the Booking model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "startTime": { + "type": "integer" + }, + "endTime": { + "type": "integer" + }, + "duration": { + "type": "integer" + }, + "createdAt": { + "type": "integer" + }, + "updatedAt": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "service": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "duration": { + "type": "integer" + }, + "subtotal": { + "type": "object", + "properties": { + "amount": { + "type": "number" + }, + "currency": { + "type": "string" + } + } + }, + "total": { + "type": "object", + "properties": { + "amount": { + "type": "number" + }, + "currency": { + "type": "string" + } + } + } + } + }, + "space": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "outcome": { + "type": "object", + "properties": { + "documentId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "exportedAt": { + "type": "integer" + } + } + }, + "customFieldsValues": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "label": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + } + } + } + }, + "x-readme-ref-name": "booking-common" + } + ], + "x-readme-ref-name": "booking-output" + }, + { + "type": "object", + "properties": {} + } + ], + "x-readme-ref-name": "booking-available-slots" + } + } + }, + "x-readme": { + "explorer-enabled": true, + "proxy-enabled": true } } diff --git a/forms-bridge/addons/holded/data/swagger/invoicing.json b/forms-bridge/addons/holded/data/swagger/invoicing.json index cf611503..780a0cf1 100644 --- a/forms-bridge/addons/holded/data/swagger/invoicing.json +++ b/forms-bridge/addons/holded/data/swagger/invoicing.json @@ -1,860 +1,5614 @@ { - "/contacts": { - "get": { - "operationId": "List Contacts", + "openapi": "3.0.0", + "info": { + "title": "Invoice API", + "version": "1.4", + "description": "The Holded's Invoicing API is organized around REST, using HTTP responses code to keep you informed about what's going on. Our endpoints will returns you metada in JSON format directly from Holded." + }, + "x-samples-languages": ["curl", "node", "ruby", "python"], + "paths": { + "/contacts": { + "get": { + "operationId": "List Contacts", + "parameters": [ + { + "name": "phone", + "in": "query", + "required": false, + "description": "Must be an exact match, including special characters like \"+\", \"#\", and \"-\".", + "schema": { + "type": "string" + } + }, + { + "name": "mobile", + "in": "query", + "required": false, + "description": "Must be an exact match, including special characters like \"+\", \"#\", and \"-\".", + "schema": { + "type": "string" + } + }, + { + "name": "customId", + "in": "query", + "required": false, + "description": "Return only the contacts that matches with the provided customId", + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "customId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "tradeName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "mobile": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "type": { + "type": "string" + }, + "iban": { + "type": "string" + }, + "swift": { + "type": "string" + }, + "clientRecord": { + "type": "integer" + }, + "supplierRecord": { + "type": "integer" + }, + "billAddress": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "integer" + }, + "province": { + "type": "string" + }, + "country": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "info": { + "type": "string" + } + } + }, + "defaults": { + "type": "object", + "properties": { + "salesChannel": { + "type": "integer" + }, + "expensesAccount": { + "type": "integer" + }, + "dueDays": { + "type": "integer" + }, + "paymentMethod": { + "type": "integer" + }, + "discount": { + "type": "integer" + }, + "language": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "tax": { + "type": "string" + }, + "retention": { + "type": "string" + } + } + }, + "socialNetworks": { + "type": "object", + "properties": { + "website": { + "type": "string" + } + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "notes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "noteId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "updatedAt": { + "type": "integer" + }, + "userId": { + "type": "string" + } + } + } + }, + "contactPersons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "personId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "job": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sendDocumentsByDefault": { + "type": "boolean" + }, + "linkedin": { + "type": "string" + } + } + } + }, + "shippingAddresses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "shippingId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "integer" + }, + "province": { + "type": "string" + }, + "country": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "notes": { + "type": "string" + }, + "privateNotes": { + "type": "string" + } + } + } + }, + "customFields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "value": { + "type": "string" + } + } + } + } + } + } + }, + "examples": { + "response": { + "value": [ + { + "id": "5aaa43d35b7064002613c048", + "customId": "myReferenceId", + "name": "Custom Tech Inc.", + "code": "B3737387", + "tradeName": "Mapple", + "email": "email@mapple.com", + "mobile": "63738383", + "phone": "3949494", + "type": "client", + "iban": "ES436677378638786", + "swift": "", + "clientRecord": 0, + "supplierRecord": 0, + "billAddress": { + "address": "Carrer del Mar", + "city": "Barcelona", + "postalCode": 8767, + "province": "Barcelona", + "country": "Spain", + "countryCode": "ES", + "info": "Random info" + }, + "defaults": { + "salesChannel": 0, + "expensesAccount": 0, + "dueDays": 3, + "paymentMethod": 0, + "discount": 45, + "language": "fr", + "currency": "eur", + "tax": "default", + "retention": "default" + }, + "socialNetworks": { + "website": "www.mapple.com" + }, + "tags": ["tag", "otherTag"], + "notes": [ + { + "noteId": "5aba2365c5d43800316b2a53", + "name": "My first note", + "description": "An important note", + "color": "primary", + "updatedAt": 1522148197, + "userId": "5a05cc5a60cea100094baf22" + }, + { + "noteId": "5aba26efc5d43800316b2a54", + "name": "Note", + "description": "Another note", + "color": "#ee575d", + "updatedAt": 1522149103, + "userId": "" + } + ], + "contactPersons": [ + { + "personId": "5aba40fdc5d43800316b2a55", + "name": "Pep", + "job": "Ito", + "phone": "966", + "email": "noway@frog.com", + "sendDocumentsByDefault": true, + "linkedin": "no link" + } + ], + "shippingAddresses": [ + { + "shippingId": "5aba4147c5d43800342fc4a3", + "name": "Mapple shipping address", + "address": "c/Lafranch", + "city": "Vilafranca del Monport ", + "postalCode": 899, + "province": "Barcelona", + "country": "Spain", + "countryCode": "ES", + "notes": "A public note", + "privateNotes": "This is a private note, don't read it" + } + ], + "customFields": [ + { + "field": "FieldOne", + "value": "valueOne" + } + ] + } + ] + } + } + } + } + } + }, + "tags": ["CONTACTS"], + "summary": "List Contacts", + "description": "Get all your contact." + }, + "post": { + "operationId": "Create Contact", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "CustomId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "email": { + "type": "string" + }, + "mobile": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "type": { + "type": "string", + "description": "Options: supplier, debtor, creditor, client, lead" + }, + "isperson": { + "type": "boolean", + "description": "When true the contact is created as a Contact Person instead of as a Company" + }, + "iban": { + "type": "string" + }, + "swift": { + "type": "string" + }, + "sepaRef": { + "type": "string" + }, + "groupId": { + "type": "string" + }, + "taxOperation": { + "type": "string", + "description": "options for Spain (general, intra, impexp, nosujeto, receq, exento)" + }, + "sepaDate": { + "type": "number" + }, + "clientRecord": { + "type": "integer" + }, + "supplierRecord": { + "type": "integer" + }, + "billAddress": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "province": { + "type": "string" + }, + "country": { + "type": "string" + } + } + }, + "numberingSeries": { + "type": "object", + "description": "The value of each document should be a valid ID.", + "properties": { + "invoice": { + "type": "string" + }, + "receipt": { + "type": "string" + }, + "salesOrder": { + "type": "string" + }, + "purchasesOrder": { + "type": "string" + }, + "proform": { + "type": "string" + }, + "waybill": { + "type": "string" + } + } + }, + "shippingAddresses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "province": { + "type": "string" + }, + "country": { + "type": "string" + }, + "note": { + "type": "string" + }, + "privateNote": { + "type": "string" + } + } + } + }, + "defaults": { + "type": "object", + "properties": { + "expensesAccountRecord": { + "type": "integer" + }, + "expensesAccountName": { + "type": "string" + }, + "salesAccountRecord": { + "type": "integer" + }, + "salesAccountName": { + "type": "string" + }, + "dueDays": { + "type": "integer" + }, + "salesTax": { + "type": "integer" + }, + "salesTaxes": { + "type": "array", + "items": { + "type": "string" + } + }, + "purchasesTax": { + "type": "integer" + }, + "purchasesTaxes": { + "type": "array", + "items": { + "type": "string" + } + }, + "accumulateInForm347": { + "type": "string", + "description": "Yes or No" + }, + "paymentMethod": { + "type": "string", + "description": "Should be a valid ID" + }, + "discount": { + "type": "integer" + }, + "currency": { + "type": "string", + "description": "Currency ISO code in lowercase (e.g., eur = Euro, usd = U.S. Dollar, etc )" + }, + "language": { + "type": "string", + "description": "options (es = spanish, en = english, fr = french, de = german, it = italian, ca = catalan, eu = euskera)" + }, + "showTradeNameOnDocs": { + "type": "boolean" + }, + "showCountryOnDocs": { + "type": "boolean" + } + } + }, + "socialNetworks": { + "type": "object", + "properties": { + "website": { + "type": "string" + } + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "note": { + "type": "string" + }, + "contactPersons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "email": { + "type": "string" + } + } + }, + "required": ["name"] + } + } + } + } + }, + "x-examples": { + "application/json": { + "CustomId": "My reference", + "name": "Custom Tech Inc.", + "code": "B3737387", + "email": "email@mapple.com", + "mobile": "63738383", + "phone": "3949494", + "type": "supplier", + "iban": "ES436677378638786", + "swift": "", + "clientRecord": 0, + "supplierRecord": 0, + "billAddress": { + "address": "Carrer del Mar", + "city": "Barcelona", + "postalCode": 8767, + "province": "Barcelona", + "country": "Spain" + }, + "defaults": { + "salesChannel": 0, + "expensesAccount": 0, + "dueDays": 3, + "paymentMethod": 0, + "discount": 45, + "language": "fr", + "currency": "eur", + "tax": "default", + "retention": "default" + }, + "socialNetworks": { + "website": "www.mapple.com" + }, + "tags": ["tag", "otherTag"], + "notes": "My note", + "contactPersons": { + "name": "Pep", + "phone": "966", + "email": "noway@frog.com" + } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Created", + "id": "5ac4f2cec839ea004e18a463" + } + } + } + } + } + } + }, + "tags": ["CONTACTS"], + "summary": "Create Contact", + "description": "Create a new contact." + } + }, + "/contacts/{contactId}": { + "parameters": [ + { + "name": "contactId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "get": { + "operationId": "Get Contact", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "customId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "tradeName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "mobile": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "type": { + "type": "string" + }, + "iban": { + "type": "string" + }, + "swift": { + "type": "string" + }, + "clientRecord": { + "type": "integer" + }, + "supplierRecord": { + "type": "integer" + }, + "billAddress": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "integer" + }, + "province": { + "type": "string" + }, + "country": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "info": { + "type": "string" + } + } + }, + "defaults": { + "type": "object", + "properties": { + "salesChannel": { + "type": "integer" + }, + "expensesAccount": { + "type": "integer" + }, + "dueDays": { + "type": "integer" + }, + "paymentMethod": { + "type": "integer" + }, + "discount": { + "type": "integer" + }, + "language": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "tax": { + "type": "string" + }, + "retention": { + "type": "string" + } + } + }, + "socialNetworks": { + "type": "object", + "properties": { + "website": { + "type": "string" + } + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "notes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "noteId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "updatedAt": { + "type": "integer" + }, + "userId": { + "type": "string" + } + } + } + }, + "contactPersons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "personId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "job": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sendDocumentsByDefault": { + "type": "boolean" + }, + "linkedin": { + "type": "string" + } + } + } + }, + "shippingAddresses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "shippingId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "integer" + }, + "province": { + "type": "string" + }, + "country": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "notes": { + "type": "string" + }, + "privateNotes": { + "type": "string" + } + } + } + }, + "customFields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "value": { + "type": "string" + } + } + } + } + } + }, + "examples": { + "response": { + "value": { + "id": "5aaa43d35b7064002613c048", + "customId": "myReferenceId", + "name": "Custom Tech Inc.", + "code": "B3737387", + "tradeName": "Mapple", + "email": "email@mapple.com", + "mobile": "63738383", + "phone": "3949494", + "type": "client", + "iban": "ES436677378638786", + "swift": "", + "clientRecord": 0, + "supplierRecord": 0, + "billAddress": { + "address": "Carrer del Mar", + "city": "Barcelona", + "postalCode": 8767, + "province": "Barcelona", + "country": "Spain", + "countryCode": "ES", + "info": "Random info" + }, + "defaults": { + "salesChannel": 0, + "expensesAccount": 0, + "dueDays": 3, + "paymentMethod": 0, + "discount": 45, + "language": "fr", + "currency": "eur", + "tax": "default", + "retention": "default" + }, + "socialNetworks": { + "website": "www.mapple.com" + }, + "tags": ["tag", "otherTag"], + "notes": [ + { + "noteId": "5aba2365c5d43800316b2a53", + "name": "My first note", + "description": "An important note", + "color": "primary", + "updatedAt": 1522148197, + "userId": "5a05cc5a60cea100094baf22" + }, + { + "noteId": "5aba26efc5d43800316b2a54", + "name": "Note", + "description": "Another note", + "color": "#ee575d", + "updatedAt": 1522149103, + "userId": "" + } + ], + "contactPersons": [ + { + "personId": "5aba40fdc5d43800316b2a55", + "name": "Pep", + "job": "Ito", + "phone": "966", + "email": "noway@frog.com", + "sendDocumentsByDefault": true, + "linkedin": "no link" + } + ], + "shippingAddresses": [ + { + "shippingId": "5aba4147c5d43800342fc4a3", + "name": "Mapple shipping address", + "address": "c/LLafranch", + "city": "Vilafranca del Monport ", + "postalCode": 899, + "province": "Lleida", + "country": "Spain", + "countryCode": "ES", + "notes": "A public note", + "privateNotes": "This is a private note, don't read it" + } + ], + "customFields": [ + { + "field": "FieldOne", + "value": "noValue" + } + ] + } + } + } + } + } + } + }, + "tags": ["CONTACTS"], + "summary": "Get Contact", + "description": "Get a specific contact." + }, + "put": { + "operationId": "Update Contact", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "tradeName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "mobile": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "type": { + "type": "string", + "description": "Options: supplier, debtor, creditor, client, lead" + }, + "isperson": { + "type": "boolean", + "description": "When true the contact is created as a Contact Person instead of as a Company" + }, + "iban": { + "type": "string" + }, + "swift": { + "type": "string" + }, + "sepaRef": { + "type": "string" + }, + "sepaDate": { + "type": "number" + }, + "clientRecord": { + "type": "integer" + }, + "supplierRecord": { + "type": "integer" + }, + "groupId": { + "type": "string" + }, + "taxOperation": { + "type": "string", + "description": "options for Spain (general, intra, impexp, nosujeto, receq, exento)" + }, + "billAddress": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "province": { + "type": "string" + }, + "country": { + "type": "string" + }, + "countryCode": { + "type": "string" + } + } + }, + "shippingAddresses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "province": { + "type": "string" + }, + "country": { + "type": "string" + }, + "notes": { + "type": "string" + }, + "privateNote": { + "type": "string" + } + } + } + }, + "defaults": { + "type": "object", + "properties": { + "expensesAccountRecord": { + "type": "integer" + }, + "expensesAccountName": { + "type": "string" + }, + "salesAccountRecord": { + "type": "integer" + }, + "salesAccountName": { + "type": "string" + }, + "dueDays": { + "type": "integer" + }, + "salesTax": { + "type": "integer" + }, + "purchasesTax": { + "type": "integer" + }, + "accumulateInForm347": { + "type": "string", + "description": "Yes or No" + }, + "paymentMethod": { + "type": "string", + "description": "Should be a valid ID." + }, + "discount": { + "type": "integer" + }, + "currency": { + "type": "string", + "description": "Currency ISO code in lowercase (e.g., eur = Euro, usd = U.S. Dollar, etc )" + }, + "language": { + "type": "string", + "description": "options (es = spanish, en = english, fr = french, de = german, it = italian, ca = catalan, eu = euskera)" + }, + "showTradeNameOnDocs": { + "type": "boolean" + }, + "showCountryOnDocs": { + "type": "boolean" + } + } + }, + "socialNetworks": { + "type": "object", + "properties": { + "website": { + "type": "string" + } + } + }, + "numberingSeries": { + "type": "object", + "description": "The value of each document should be a valid ID.", + "properties": { + "invoice": { + "type": "string" + }, + "receipt": { + "type": "string" + }, + "salesOrder": { + "type": "string" + }, + "purchasesOrder": { + "type": "string" + }, + "proform": { + "type": "string" + }, + "waybill": { + "type": "string" + } + } + } + } + } + } + }, + "x-examples": { + "application/json": { + "name": "Custom Tech Inc.", + "code": "B3737387", + "tradeName": "Mapple", + "email": "email@mapple.com", + "mobile": "63738383", + "phone": "3949494", + "type": "client", + "iban": "ES436677378638786", + "swift": "UJ45623456", + "clientRecord": 0, + "supplierRecord": 0, + "billAddress": { + "address": "Carrer del Mar", + "city": "Barcelona", + "postalCode": 8767, + "province": "Barcelona", + "country": "Spain", + "countryCode": "ES" + }, + "defaults": { + "salesChannel": 0, + "expensesAccount": 0, + "dueDays": 3, + "paymentMethod": 0, + "discount": 45, + "language": "fr" + }, + "socialNetworks": { + "website": "www.mapple.com" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Updated", + "id": "5ac4f2cec839ea004e18a463" + } + } + } + } + } + } + }, + "tags": ["CONTACTS"], + "summary": "Update Contact", + "description": "Update a specific contact.\n\nOnly the params included in the operation will update the contact." + }, + "delete": { + "operationId": "Delete Contact", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Successfully deleted", + "id": "5aba68b1c5d438006425ad45" + } + } + } + } + } + } + }, + "tags": ["CONTACTS"], + "summary": "Delete Contact", + "description": "Delete specific contact" + } + }, + "/contacts/{contactId}/attachments/list": { + "parameters": [ + { + "name": "contactId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "get": { + "operationId": "Get attachments list", + "responses": { + "200": { + "description": "Get attachments list for a given contact", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "tags": ["CONTACTS"], + "summary": "Get contact attachments list", + "description": "Get attachments list for a given contact." + } + }, + "/contacts/{contactId}/attachments/get": { + "parameters": [ + { + "name": "contactId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "filename", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], + "get": { + "operationId": "Get attachment", + "responses": { + "200": { + "description": "Get attachment", + "content": { + "application/json": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "tags": ["CONTACTS"], + "summary": "Get attachment", + "description": "Get attachment" + } + }, + "/contacts/groups": { + "get": { + "operationId": "List Contact Groups", + "summary": "List Contact Groups", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "color": { + "type": "string" + } + } + } + } + } + } + } + }, + "tags": ["CONTACT GROUPS"] + }, + "post": { + "operationId": "Create Contact Group", + "summary": "Create Contact Group", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "color": { + "type": "string" + } + }, + "required": ["name"] + } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + } + } + } + } + }, + "tags": ["CONTACT GROUPS"] + } + }, + "/contacts/groups/{groupId}": { + "parameters": [ + { + "name": "groupId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "get": { + "operationId": "Get Contact Group", + "summary": "Get Contact Group", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "color": { + "type": "string" + } + } + } + } + } + } + }, + "tags": ["CONTACT GROUPS"] + }, + "put": { + "operationId": "Update Contact Group", + "summary": "Update Contact Group", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "color": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + } + } + } + } + }, + "tags": ["CONTACT GROUPS"] + }, + "delete": { + "operationId": "Delete Contact Group", + "summary": "Delete Contact Group", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Successfully deleted", + "id": "5aba68b1c5d438006425ad45" + } + } + } + } + } + } + }, + "tags": ["CONTACT GROUPS"] + } + }, + "/products": { + "get": { + "operationId": "List Products", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "title": "Product Basic Output", + "description": "The properties that are included when fetching a list of Products.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Product Common", + "description": "The properties that are shared amongst all versions of the Product model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "typeId": { + "type": "string" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "price": { + "type": "integer" + }, + "tax": { + "type": "integer" + }, + "total": { + "type": "number" + }, + "rates": { + "type": "array", + "items": { + "type": "object" + } + }, + "hasStock": { + "type": "integer" + }, + "stock": { + "type": "integer" + }, + "barcode": { + "type": "string" + }, + "sku": { + "type": "string" + }, + "cost": { + "type": "integer" + }, + "purchasePrice": { + "type": "number" + }, + "weight": { + "type": "number" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "categoryId": { + "type": "string" + }, + "factoryCode": { + "type": "string" + }, + "attributes": { + "type": "array", + "items": { + "type": "object" + } + }, + "forSale": { + "type": "integer" + }, + "forPurchase": { + "type": "integer" + }, + "salesChannelId": { + "type": "string" + }, + "expAccountId": { + "type": "string" + }, + "warehouseId": { + "type": "string" + }, + "variants": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "barcode": { + "type": "string" + }, + "sku": { + "type": "string" + }, + "price": { + "type": "integer" + }, + "cost": { + "type": "integer" + }, + "purchasePrice": { + "type": "number" + }, + "stock": { + "type": "integer" + } + } + } + } + }, + "x-readme-ref-name": "product-common" + } + ], + "x-readme-ref-name": "product-output" + } + }, + "examples": { + "response": { + "value": [ + { + "id": "5abbc9980823dd002b5c36f5", + "kind": "simple", + "name": "Brand new shirt", + "desc": "Black shirt", + "typeId": "5abbc8e40823dd00274ca482", + "contactId": "5aaa51ab5b70640028340186", + "contactName": "Iron Supply", + "price": 95, + "tax": 21, + "total": 119.45, + "rates": [], + "hasStock": 1, + "stock": 2, + "barcode": "45the54", + "sku": "23454657", + "cost": 20, + "purchasePrice": 11.5, + "weight": 0.5, + "tags": ["tig", "tag", "tug"], + "categoryId": "5abbc9110823dd0025411fb4", + "factoryCode": "32435g", + "attributes": [], + "forSale": 1, + "forPurchase": 1, + "salesChannelId": "5abbc324g3vdd002b5c36f3", + "expAccountId": "5abbc9980823d3245b5c36f3", + "warehouseId": "5abbc89e5823dd002b5c36f3", + "variants": [ + { + "id": "5abbc9980823dd002b5c36f3", + "barcode": "35647", + "sku": "34354", + "price": 45, + "cost": 20, + "purchasePrice": 11.5, + "stock": 2 + }, + { + "id": "5abbc9980823dd002b5c36f4", + "barcode": "", + "sku": "", + "price": 45, + "cost": 20, + "purchasePrice": 11.5, + "stock": 0 + } + ] + }, + { + "id": "5abbd1cf0823dd004562b685", + "kind": "simple", + "name": "Tata shoes", + "desc": "brand new shoes", + "typeId": "480yhfn2b3498o243upj2", + "contactId": "2p4hjrnfob3hli2khpn", + "contactName": "Tata industry", + "price": 100, + "tax": 21, + "total": 121, + "rates": [], + "hasStock": 1, + "stock": 234, + "barcode": "232435465", + "sku": "234rwt54", + "cost": 39, + "purchasePrice": 11, + "weight": 0, + "tags": [""], + "categoryId": "5abbd15e0823dd003b085005", + "factoryCode": "324t5f4", + "attributes": [], + "forSale": 1, + "forPurchase": 1, + "salesChannelId": "0", + "expAccountId": "0", + "warehouseId": "0", + "variants": [ + { + "id": "5abbd1cf0823dd004562b683", + "barcode": "123", + "sku": "123", + "price": 2, + "cost": 1, + "purchasePrice": 1, + "stock": 234 + }, + { + "id": "5abbd1cf0823dd004562b684", + "barcode": "", + "sku": "", + "price": 0, + "cost": 0, + "purchasePrice": 2, + "stock": 0 + } + ] + }, + { + "id": "5abbca020823dd00343d0a44", + "kind": "simple", + "name": "new simple product", + "desc": "the best simple product you can buy", + "typeId": "3l4kbn5j3oknl645t574354", + "contactId": "", + "contactName": "", + "price": 0, + "tax": 21, + "total": 0, + "rates": [], + "hasStock": 1, + "stock": 0, + "barcode": "", + "sku": "", + "cost": 0, + "purchasePrice": 0, + "weight": 0, + "tags": [""], + "categoryId": "0", + "factoryCode": "", + "attributes": [], + "forSale": 1, + "forPurchase": 1, + "salesChannelId": "0", + "expAccountId": "0", + "warehouseId": "0", + "variants": [ + { + "id": "5abbca020823dd00343d0a43", + "barcode": "", + "sku": "", + "price": 0, + "cost": 0, + "purchasePrice": 0, + "stock": 0 + } + ] + } + ] + } + } + } + } + } + }, + "tags": ["PRODUCTS"], + "summary": "List Products" + }, + "post": { + "operationId": "Create Product", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "kind": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "price": { + "type": "number" + }, + "tax": { + "type": "number" + }, + "cost": { + "type": "number" + }, + "calculatecost": { + "type": "number" + }, + "purchasePrice": { + "type": "number" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "barcode": { + "type": "string" + }, + "sku": { + "type": "string" + }, + "weight": { + "type": "number" + }, + "stock": { + "type": "integer" + } + } + } + } + }, + "x-examples": { + "application/json": {}, + "new": { + "kind": "simple", + "name": "Brand new shirt" + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Created", + "id": "5aa97e595b706400153f9f94" + } + } + } + } + } + } + }, + "tags": ["PRODUCTS"], + "summary": "Create Product" + } + }, + "/products/{productId}": { + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "put": { + "operationId": "Update Product", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "kind": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "tax": { + "type": "integer" + }, + "subtotal": { + "type": "number" + }, + "barcode": { + "type": "string" + }, + "sku": { + "type": "string" + }, + "cost": { + "type": "number" + }, + "purchasePrice": { + "type": "number" + }, + "weight": { + "type": "number" + } + } + } + } + }, + "x-examples": { + "application/json": { + "kind": "simple", + "name": "Brand new shirt", + "desc": "Black shirt", + "tax": 21, + "subtotal": 119.45, + "barcode": "45the54", + "sku": "23454657", + "cost": 20, + "purchasePrice": 10, + "weight": 0.5 + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Updated", + "id": "5aa97e595b706400153f9f94" + } + } + } + } + } + } + }, + "tags": ["PRODUCTS"], + "summary": "Update Product" + }, + "delete": { + "operationId": "Delete Product", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Successfully deleted", + "id": "5aba68b1c5d438006425ad45" + } + } + } + } + } + } + }, + "tags": ["PRODUCTS"], + "summary": "Delete Product" + }, + "get": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } + } + }, + "operationId": "Get product", + "summary": "Get Product", + "description": "Get a speccific product", + "tags": ["PRODUCTS"] + } + }, + "/warehouses": { + "get": { + "operationId": "List Warehouses", + "summary": "List Warehouses", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "mobile": { + "type": "string" + }, + "address": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "province": { + "type": "string" + }, + "country": { + "type": "string" + }, + "countryCode": { + "type": "string" + } + } + }, + "default": { + "type": "boolean" + }, + "warehouseRecord": { + "type": "integer" + } + } + } + }, + "examples": { + "response": { + "value": [ + { + "id": "5a05cc6e60cea100094baf2f", + "userId": "2344000h2o4b5s4n3o45", + "name": "Main Warehouse", + "email": "main@warehouse.com", + "phone": "765837638", + "mobile": "23456673", + "address": { + "address": "Av. Meridiana, 13", + "city": "Barcelona", + "postalCode": 3849, + "province": "Barcelona", + "country": "Spain", + "countryCode": "ES" + }, + "default": true, + "warehouseRecord": 30000001 + }, + { + "id": "5aab9ae87bdcef002641e0c3", + "userId": "5a05cc5a60cea100094baf22", + "name": "Second warehouse", + "email": "second@warehouse.com", + "phone": "", + "mobile": "", + "address": { + "address": "Main Street, 3", + "city": "London", + "postalCode": "04747", + "province": "London", + "country": "United Kingdom", + "countryCode": "UK" + }, + "default": false, + "warehouseRecord": null + }, + { + "id": "5aaba5237bdcef002c4979d5", + "userId": "", + "name": "Third warehouse", + "email": "third@warehouse.com", + "phone": "123", + "mobile": "123", + "address": { + "address": "Av. Blasco Ibañez, 34", + "city": "Valencia", + "postalCode": 8054, + "province": "Valencia", + "country": "Spain", + "countryCode": "ES" + }, + "default": false, + "warehouseRecord": null + } + ] + } + } + } + } + } + }, + "tags": ["WAREHOUSES"] + }, + "post": { + "operationId": "Create Warehouse", + "summary": "Create Warehouse", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "mobile": { + "type": "string" + }, + "address": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "province": { + "type": "string" + }, + "country": { + "type": "string" + }, + "countryCode": { + "type": "string" + } + } + }, + "default": { + "type": "boolean" + } + } + } + } + }, + "x-examples": { + "application/json": { + "name": "Main Warehouse", + "email": "main@warehouse.com", + "phone": "765837638", + "mobile": "23456673", + "address": { + "address": "Av. Meridiana, 13", + "city": "Barcelona", + "postalCode": 3849, + "province": "Barcelona", + "country": "Spain", + "countryCode": "ES" + }, + "default": true + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Created", + "id": "5aa97e595b706400153f9f94" + } + } + } + } + } + } + }, + "tags": ["WAREHOUSES"] + } + }, + "/warehouses/{warehouseId}/stock": { + "parameters": [ + { + "name": "warehouseId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "get": { + "operationId": "List products stock", + "summary": "List products stock", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "warehouse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "color": { + "type": "string" + }, + "products": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_id": { + "type": "string" + }, + "stock": { + "type": "integer" + }, + "variants": { + "type": "object", + "properties": { + "ObjectId": { + "type": "integer" + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "tags": ["WAREHOUSES"] + } + }, + "/warehouses/{warehouseId}": { + "parameters": [ + { + "name": "warehouseId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "get": { + "operationId": "Get Warehouse", + "summary": "Get Warehouse", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "mobile": { + "type": "string" + }, + "address": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "province": { + "type": "string" + }, + "country": { + "type": "string" + }, + "countryCode": { + "type": "string" + } + } + }, + "default": { + "type": "boolean" + }, + "warehouseRecord": { + "type": "integer" + } + } + }, + "examples": { + "response": { + "value": { + "id": "5a05cc6e60cea100094baf2f", + "userId": "2344000h2o4b5s4n3o45", + "name": "Main Warehouse", + "email": "main@warehouse.com", + "phone": "765837638", + "mobile": "23456673", + "address": { + "address": "Av. Meridiana, 13", + "city": "Barcelona", + "postalCode": 3849, + "province": "Barcelona", + "country": "Spain", + "countryCode": "ES" + }, + "default": true, + "warehouseRecord": 30000001 + } + } + } + } + } + } + }, + "tags": ["WAREHOUSES"] + }, + "put": { + "operationId": "Update Warehouse", + "summary": "Update Warehouse", + "requestBody": { + "content": { + "application/json": { + "schema": { + "title": "Warehouse Input", + "description": "The properties that are allowed when creating or updating a Warehouse.", + "allOf": [ + { + "title": "Warehouse Common", + "description": "The properties that are shared amongst all versions of the Warehouse model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "mobile": { + "type": "string" + }, + "address": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "province": { + "type": "string" + }, + "country": { + "type": "string" + }, + "countryCode": { + "type": "string" + } + } + }, + "default": { + "type": "boolean" + }, + "warehouseRecord": { + "type": "integer" + } + }, + "x-readme-ref-name": "warehouse-common" + }, + { + "type": "object", + "properties": {} + } + ], + "x-readme-ref-name": "warehouse-input" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "mobile": { + "type": "string" + }, + "address": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "province": { + "type": "string" + }, + "country": { + "type": "string" + }, + "countryCode": { + "type": "string" + } + } + } + } + }, + "examples": { + "response": { + "value": { + "name": "Main Warehouse", + "email": "main@warehouse.com", + "phone": "765837638", + "mobile": "23456673", + "address": { + "address": "Av. Meridiana, 13", + "city": "Barcelona", + "postalCode": 3849, + "province": "Barcelona", + "country": "Spain", + "countryCode": "ES" + } + } + } + } + } + } + } + }, + "tags": ["WAREHOUSES"] + }, + "delete": { + "operationId": "Delete Warehouse", + "summary": "Delete Warehouse", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Successfully deleted", + "id": "5aba68b1c5d438006425ad45" + } + } + } + } + } + } + }, + "tags": ["WAREHOUSES"] + } + }, + "/taxes": { + "get": { + "operationId": "getTaxes", + "summary": "Get Taxes", + "description": "Get all the taxes information for a specific account", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "amount": { + "type": "string" + }, + "scope": { + "type": "string" + }, + "key": { + "type": "string" + }, + "group": { + "type": "string" + }, + "type": { + "type": "string" + } + } + } + }, + "examples": { + "response": { + "value": [ + { + "name": "IVA 21%", + "amount": "21", + "scope": "sales", + "key": "s_iva_21", + "group": "iva", + "type": "percentage" + }, + { + "name": "IVA 10%", + "amount": "10", + "scope": "sales", + "key": "s_iva_10", + "group": "iva", + "type": "percentage" + } + ] + } + } + } + } + } + }, + "tags": ["TAXES"] + } + }, + "/treasury": { + "get": { + "operationId": "List Treasuries", + "summary": "List Treasuries Accounts", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "balance": { + "type": "integer" + }, + "accountNumber": { + "type": "integer" + }, + "iban": { + "type": "string" + }, + "swift": { + "type": "string" + }, + "bank": { + "type": "string" + }, + "bankname": { + "type": "string" + } + } + } + }, + "examples": { + "response": { + "value": [ + { + "id": "5aba68b1c5d438006425ad45", + "name": "Abanca bank", + "type": "bank", + "balance": 0, + "accountNumber": 57200003, + "iban": "ES123456789", + "swift": "CAGLESMM", + "bank": "abanca", + "bankname": "Abanca" + }, + { + "id": "5aba68b1c5d2453654ad90", + "name": "ING bank", + "type": "bank", + "balance": 32435, + "accountNumber": 65305004, + "iban": "ES112345678", + "swift": "DSFGT", + "bank": "ing", + "bankname": "ING" + } + ] + } + } + } + } + } + }, + "tags": ["TREASURIES"] + }, + "post": { + "operationId": "Create Treasury", + "summary": "Create Treasury Account", + "requestBody": { + "content": { + "application/json": { + "schema": { + "title": "Bank Input", + "description": "The properties that are allowed when creating or updating a Bank.", + "allOf": [ + { + "title": "Bank Common", + "description": "The properties that are shared amongst all versions of the Bank model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "balance": { + "type": "integer" + }, + "accountNumber": { + "type": "integer" + }, + "iban": { + "type": "string" + }, + "swift": { + "type": "string" + }, + "bank": { + "type": "string" + }, + "bankname": { + "type": "string" + } + }, + "x-readme-ref-name": "bank-common" + }, + { + "type": "object", + "properties": {} + } + ], + "x-readme-ref-name": "bank-input" + } + } + } + }, + "responses": { + "201": { + "description": "dddd", + "content": { + "application/json": { + "schema": { + "title": "Bank Detailed Output", + "description": "The properties that are included when fetching a single Bank.", + "allOf": [ + { + "title": "Bank Basic Output", + "description": "The properties that are included when fetching a list of Banks.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Bank Common", + "description": "The properties that are shared amongst all versions of the Bank model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "balance": { + "type": "integer" + }, + "accountNumber": { + "type": "integer" + }, + "iban": { + "type": "string" + }, + "swift": { + "type": "string" + }, + "bank": { + "type": "string" + }, + "bankname": { + "type": "string" + } + }, + "x-readme-ref-name": "bank-common" + } + ], + "x-readme-ref-name": "bank-output" + }, + { + "type": "object", + "properties": {} + } + ], + "x-readme-ref-name": "bank-output-detailed" + }, + "examples": { + "response": { + "value": { + "under": "development" + } + } + } + } + } + } + }, + "tags": ["TREASURIES"] + } + }, + "/treasury/{treasuryId}": { + "parameters": [ + { + "name": "treasuryId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "get": { + "operationId": "Get Treasury", + "summary": "Get Treasury Account", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "balance": { + "type": "integer" + }, + "accountNumber": { + "type": "integer" + }, + "iban": { + "type": "string" + }, + "swift": { + "type": "string" + }, + "bank": { + "type": "string" + }, + "bankname": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "id": "5aba68b1c5d438006425ad45", + "name": "Abanca bank", + "type": "bank", + "balance": 0, + "accountNumber": 57200003, + "iban": "ES123456789", + "swift": "CAGLESMM", + "bank": "abanca", + "bankname": "Abanca" + } + } + } + } + } + } + }, + "tags": ["TREASURIES"] + } + }, + "/numberingseries/{type}": { + "get": { + "operationId": "Get Numbering Series", + "summary": "Get Numbering Series by Type", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "format": { + "type": "string" + }, + "last": { + "type": "integer" + }, + "type": { + "type": "string" + } + } + } + }, + "examples": { + "response": { + "value": [ + { + "id": "5a05cc6e60cea100094baf24", + "name": "Default", + "format": "F17%%%%", + "last": 6, + "type": "invoice" + }, + { + "id": "5ab12cd63697ac00d1489fe3", + "name": "nl SO", + "format": "SO[YY]%%%", + "last": 0, + "type": "salesOrder" + } + ] + } + } + } + } + } + }, + "tags": ["NUMBERING SERIES"] + }, + "post": { + "operationId": "Create Numbering Serie", + "summary": "Create Numbering Serie", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "format": { + "type": "string" + }, + "last": { + "type": "integer" + }, + "type": { + "type": "string" + } + } + } + } + }, + "x-examples": { + "application/json": { + "name": "Default", + "format": "F17%%%%", + "last": 6, + "type": "invoice" + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "msg": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "msg": "Created", + "id": "4365gqrtg51446tg14f5" + } + } + } + } + } + } + }, + "tags": ["NUMBERING SERIES"] + }, + "parameters": [ + { + "name": "type", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/numberingseries/{type}/{numberingSeriesId}": { + "parameters": [ + { + "name": "type", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "numberingSeriesId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "put": { + "operationId": "Update Numbering Serie", + "summary": "Update Numbering Serie", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "format": { + "type": "string" + }, + "last": { + "type": "string" + } + } + } + } + }, + "x-examples": { + "application/json": { + "name": "Default", + "format": "receipt", + "last": "ff01" + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Updated", + "id": "5ac4f2cec839ea004e18a463" + } + } + } + } + } + } + }, + "tags": ["NUMBERING SERIES"] + }, + "delete": { + "operationId": "Delete Numbering Serie", + "summary": "Delete Numbering Serie", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "msg": { + "type": "string" + }, + "id": { + "type": "integer" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "msg": "Successfully deleted", + "id": 484 + } + } + } + } + } + } + }, + "tags": ["NUMBERING SERIES"] + } + }, + "/expensesaccounts": { + "get": { + "operationId": "List Expenses Accounts", + "summary": "List Expenses Accounts", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "color": { + "type": "string" + }, + "accNum": { + "type": "integer" + } + } + }, + "examples": { + "response": { + "value": { + "id": "5aaf8c5f3697ac001f676082", + "name": "Exp Account main", + "desc": "My main expeses account dude", + "color": "#2C0934", + "accNum": 60000001 + } + } + } + } + } + } + }, + "tags": ["EXPENSES ACCOUNTS"], + "description": "List all your expenses accounts." + }, + "post": { + "operationId": "Create Expenses Account", + "summary": "Create Expenses Account", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "accountNum": { + "type": "integer" + } + }, + "required": ["name", "desc", "accountNum"] + } + } + }, + "x-examples": { + "application/json": { + "name": "Alt exp account", + "desc": "My second expenses account" + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Created", + "id": "5ac4f2cec839ea004e18a463" + } + } + } + } + } + } + }, + "tags": ["EXPENSES ACCOUNTS"], + "description": "Create an expenses account." + } + }, + "/expensesaccounts/{expensesAccountId}": { "parameters": [ { - "name": "phone", - "in": "query", - "required": false, - "description": "Must be an exact match, including special characters like \"+\", \"#\", and \"-\".", - "schema": { "type": "string" } + "name": "expensesAccountId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "get": { + "operationId": "Get Expenses Account", + "summary": "Get Expenses Account", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "color": { + "type": "string" + }, + "accNum": { + "type": "integer" + } + } + }, + "examples": { + "response": { + "value": { + "id": "5aaf8c5f3697ac001f676082", + "name": "Exp Account", + "desc": "My main expenses accoun", + "color": "#2C0934", + "accNum": 60000001 + } + } + } + } + } + } + }, + "tags": ["EXPENSES ACCOUNTS"], + "description": "Get a specific expenses account." + }, + "put": { + "operationId": "Update Expenses Account", + "summary": "Update Expenses Account", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "color": { + "type": "string" + } + } + } + } + }, + "x-examples": { + "application/json": { + "name": "New Exp Account", + "desc": "My fnew exp account", + "color": "#2C0934" + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Updated", + "id": "5ac4f2cec839ea004e18a463" + } + } + } + } + } + } + }, + "tags": ["EXPENSES ACCOUNTS"], + "description": "Update a specific expenses account." + }, + "delete": { + "operationId": "Delete Expenses account", + "summary": "Delete Expenses Account", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Successfully deleted", + "id": "5aba68b1c5d438006425ad45" + } + } + } + } + } + } + }, + "tags": ["EXPENSES ACCOUNTS"], + "description": "Delete a specific expenses account." + } + }, + "/saleschannels": { + "get": { + "operationId": "List Sales Channels", + "summary": "List Sales Channels", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "color": { + "type": "string" + }, + "accNum": { + "type": "integer" + } + } + } + }, + "examples": { + "response": { + "value": [ + { + "id": "5aba667fc5d438006425ad44", + "name": "My brand new sales channel", + "desc": "Main income", + "color": "#507C6C", + "accNum": 700002 + }, + { + "id": "5aba667fc5d438006425ad44", + "name": "My second brand new channel", + "desc": "Second income stream", + "color": "#507C6C", + "accNum": null + } + ] + } + } + } + } + } + }, + "tags": ["SALES CHANNELS"] + }, + "post": { + "operationId": "Create Sales Channel", + "summary": "Create Sales Channel", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "accountNum": { + "type": "integer" + } + }, + "required": ["name", "desc", "accountNum"] + } + } + }, + "x-examples": { + "application/json": { + "name": "My brand new sales channel", + "desc": "Main income" + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Created", + "id": "5ac4f2cec839ea004e18a463" + } + } + } + } + } + } + }, + "tags": ["SALES CHANNELS"] + } + }, + "/saleschannels/{salesChannelId}": { + "parameters": [ + { + "name": "salesChannelId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "get": { + "operationId": "Get Sales Channel", + "summary": "Get Sales Channel", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "color": { + "type": "string" + }, + "accNum": { + "type": "integer" + } + } + }, + "examples": { + "response": { + "value": { + "id": "5aba667fc5d438006425ad44", + "name": "My second brand new channel", + "desc": "Second income stream", + "color": "#507C6C", + "accNum": null + } + } + } + } + } + } + }, + "tags": ["SALES CHANNELS"] + }, + "put": { + "operationId": "Update Sales Channel", + "summary": "Update Sales Channel", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "color": { + "type": "string" + } + } + } + } + }, + "x-examples": { + "application/json": { + "name": "My second brand new channel", + "desc": "Second income stream modified", + "color": "#507C6C" + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Updated", + "id": "5ac4f2cec839ea004e18a463" + } + } + } + } + } + } + }, + "tags": ["SALES CHANNELS"] + }, + "delete": { + "operationId": "Delete Sales Channel", + "summary": "Delete Sales Channel", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Successfully deleted", + "id": "5aba68b1c5d438006425ad45" + } + } + } + } + } + } + }, + "tags": ["SALES CHANNELS"] + } + }, + "/payments": { + "get": { + "parameters": [ + { + "name": "starttmp", + "in": "query", + "description": "Starting timestamp", + "schema": { + "type": "string" + } + }, + { + "name": "endtmp", + "in": "query", + "description": "Ending timestamp", + "schema": { + "type": "string" + } + } + ], + "operationId": "List Payments", + "summary": "List Payments", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "bankId": { + "type": "string" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "amount": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "date": { + "type": "integer" + } + } + } + }, + "examples": { + "response": { + "value": [ + { + "id": "5aaa81685b7064004342fd82", + "bankId": "", + "contactId": "", + "contactName": "", + "amount": 100, + "desc": "Gift", + "date": 1521068400 + }, + { + "id": "5aaa82455b7064004e0bbd02", + "bankId": "5aaa82095b70640046270413", + "contactId": "5aaa65e05b706400300ad246", + "contactName": "Benedicto", + "amount": 355, + "desc": "Invoice F17003421", + "date": 1520982000 + }, + { + "id": "5ab4f6f61d6d820023411433", + "bankId": "5aaf71763697ac000a0b34d3", + "contactId": "5aa939a95b70640009653d72", + "contactName": "Bose QC", + "amount": 290, + "desc": "Invoice F170001 ", + "date": 1521759600 + } + ] + } + } + } + } + } + }, + "tags": ["PAYMENTS"] + }, + "post": { + "operationId": "Create Payment", + "summary": "Create Payment", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "bankId": { + "type": "string" + }, + "contactId": { + "type": "string" + }, + "amount": { + "type": "number" + }, + "desc": { + "type": "string" + }, + "date": { + "type": "integer" + } + } + } + } + }, + "x-examples": { + "application/json": { + "bankId": "5aaa82095b70640046270413", + "contactId": "5aaa65e05b706400300ad246", + "amount": 355, + "desc": "Invoice F17003421", + "date": 1520982000 + } + } }, - { - "name": "mobile", - "in": "query", - "required": false, - "description": "Must be an exact match, including special characters like \"+\", \"#\", and \"-\".", - "schema": { "type": "string" } + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Created", + "id": "5ac4f2cec839ea004e18a463" + } + } + } + } + } + } }, + "tags": ["PAYMENTS"] + } + }, + "/payments/{paymentId}": { + "parameters": [ { - "name": "customId", - "in": "query", - "required": false, - "description": "Return only the contacts that matches with the provided customId", - "style": "form", - "explode": false, - "schema": { "type": "array", "items": { "type": "string" } } + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } } ], - "responses": { - "200": { - "description": "", + "get": { + "operationId": "Get Payment", + "summary": "Get Payment", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "bankId": { + "type": "string" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "amount": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "date": { + "type": "integer" + } + } + }, + "examples": { + "response": { + "value": { + "id": "5ab4f6f61d6d820023411433", + "bankId": "5aaf71763697ac000a0b34d3", + "contactId": "5aa939a95b70640009653d72", + "contactName": "Bose QC", + "amount": 290, + "desc": "Invoice F170001 ", + "date": 1521759600 + } + } + } + } + } + } + }, + "tags": ["PAYMENTS"] + }, + "put": { + "operationId": "Update Payment", + "summary": "Update Payment", + "requestBody": { "content": { "application/json": { "schema": { - "type": "array", - "items": { + "type": "object", + "properties": { + "bankId": { + "type": "string" + }, + "contactId": { + "type": "string" + }, + "amount": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "date": { + "type": "integer" + } + } + } + } + }, + "x-examples": { + "application/json": { + "bankId": "5aaf71763697ac000a0b34d3", + "contactId": "5aa939a95b70640009653d72", + "amount": 290, + "desc": "Invoice F170001 ", + "date": 1521759600 + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "object", "properties": { - "id": { "type": "string" }, - "customId": { "type": "string" }, - "name": { "type": "string" }, - "code": { "type": "string" }, - "tradeName": { "type": "string" }, - "email": { "type": "string" }, - "mobile": { "type": "string" }, - "phone": { "type": "string" }, - "type": { "type": "string" }, - "iban": { "type": "string" }, - "swift": { "type": "string" }, - "clientRecord": { "type": "integer" }, - "supplierRecord": { "type": "integer" }, - "billAddress": { - "type": "object", - "properties": { - "address": { "type": "string" }, - "city": { "type": "string" }, - "postalCode": { "type": "integer" }, - "province": { "type": "string" }, - "country": { "type": "string" }, - "countryCode": { "type": "string" }, - "info": { "type": "string" } - } + "status": { + "type": "integer" }, - "defaults": { - "type": "object", - "properties": { - "salesChannel": { "type": "integer" }, - "expensesAccount": { "type": "integer" }, - "dueDays": { "type": "integer" }, - "paymentMethod": { "type": "integer" }, - "discount": { "type": "integer" }, - "language": { "type": "string" }, - "currency": { "type": "string" }, - "tax": { "type": "string" }, - "retention": { "type": "string" } - } + "info": { + "type": "string" }, - "socialNetworks": { - "type": "object", - "properties": { "website": { "type": "string" } } + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Updated", + "id": "5aba68b1c5d438006425ad45" + } + } + } + } + } + } + }, + "tags": ["PAYMENTS"] + }, + "delete": { + "operationId": "Delete Payment", + "summary": "Delete Payment", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" }, - "tags": { "type": "array", "items": { "type": "string" } }, - "notes": { - "type": "array", - "items": { + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Successfully deleted", + "id": "5aba68b1c5d438006425ad45" + } + } + } + } + } + } + }, + "tags": ["PAYMENTS"] + } + }, + "/documents/{docType}": { + "parameters": [ + { + "name": "docType", + "in": "path", + "required": true, + "description": "docType should be one of: {invoice, salesreceipt, creditnote, salesorder, proform, waybill,estimate, purchase, purchaseorder or purchaserefund}", + "schema": { + "type": "string" + } + } + ], + "get": { + "parameters": [ + { + "name": "docType", + "in": "path", + "required": true, + "description": "docType should be one of: {invoice, salesreceipt, creditnote, salesorder, proform, waybill,estimate, purchase, purchaseorder or purchaserefund}", + "schema": { + "type": "string" + } + }, + { + "name": "starttmp", + "in": "query", + "description": "Starting timestamp", + "schema": { + "type": "string" + } + }, + { + "name": "endtmp", + "in": "query", + "description": "Ending timestamp", + "schema": { + "type": "string" + } + }, + { + "name": "contactid", + "in": "query", + "description": "Filtering by contact Id", + "schema": { + "type": "string" + } + }, + { + "name": "paid", + "in": "query", + "description": "Filtering by paid status. 0 = not paid, 1 = paid, 2 = partially paid", + "schema": { + "type": "string" + } + }, + { + "name": "billed", + "in": "query", + "description": "Filtering by billed status. 0 = not billed, 1 = billed", + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "in": "query", + "description": "Sort documents. Options: `created-asc` to sort by creation date of documents in ascending order or `created-desc` to sort by creation date of documents in descending order", + "schema": { + "type": "string" + } + } + ], + "operationId": "List Documents", + "summary": "List Documents", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "title": "Document Basic Output", + "description": "The properties that are included when fetching a list of Documents.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Document Common", + "description": "The properties that are shared amongst all versions of the Document model.", "type": "object", "properties": { - "noteId": { "type": "string" }, - "name": { "type": "string" }, - "description": { "type": "string" }, - "color": { "type": "string" }, - "updatedAt": { "type": "integer" }, - "userId": { "type": "string" } + "id": { + "type": "string" + }, + "contact": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + }, + "notes": { + "type": "string" + }, + "products": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "price": { + "type": "integer" + }, + "units": { + "type": "integer" + }, + "tax": { + "type": "integer" + }, + "discount": { + "type": "integer" + }, + "retention": { + "type": "integer" + }, + "weight": { + "type": "integer" + }, + "costPrice": { + "type": "integer" + }, + "sku": { + "type": "string" + }, + "productId": { + "type": "string" + } + } + } + }, + "tax": { + "type": "number" + }, + "subtotal": { + "type": "number" + }, + "discount": { + "type": "integer" + }, + "total": { + "type": "number" + }, + "language": { + "type": "string" + }, + "status": { + "type": "integer" + }, + "customFields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "value": { + "type": "string" + } + } + } + }, + "docNumber": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "currencyChange": { + "type": "integer" + }, + "paymentsTotal": { + "type": "integer" + }, + "paymentsPending": { + "type": "number" + }, + "paymentsRefunds": { + "type": "integer" + }, + "salesChannelId": { + "type": "string" + } + }, + "x-readme-ref-name": "document-common" + } + ], + "x-readme-ref-name": "document-output" + } + }, + "examples": { + "response": { + "value": {} + } + } + }, + "new": { + "examples": { + "response": { + "value": [ + { + "id": "5ab391071d6d820034294783", + "contact": "5aa939a95b70640009653d72", + "contactName": "Mapple Inc", + "desc": "description goes here", + "date": 1521673200, + "dueDate": 1521673200, + "notes": "notes go here", + "products": [ + { + "name": "Headphone", + "desc": "Best headphones you can buy", + "price": 299, + "units": 1, + "tax": 21, + "discount": 0, + "retention": 0, + "weight": 200, + "costPrice": 110, + "sku": "21324t1gv", + "productId": "5acccbe412d56e004903a385#5acccbe412d56e004903a384" + } + ], + "tax": 234.61, + "subtotal": 1117.18, + "discount": 0, + "total": 1351.79, + "language": "en", + "status": 2, + "customFields": [ + { + "field": "FieldOne", + "value": "noValue" + } + ], + "docNumber": "F170001", + "currency": "eur", + "currencyChange": 1, + "paymentsTotal": 290, + "paymentsPending": 1061.79, + "paymentsRefunds": 0, + "salesChannelId": "5aba667fc5d438006425ad44" + } + ] + } + } + } + } + } + }, + "tags": ["DOCUMENTS"], + "description": "Get all your documents by type." + }, + "post": { + "operationId": "Create Document", + "summary": "Create Document", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "applyContactDefaults": { + "type": "boolean", + "description": "Contact defaults are applied by default. If you don't want to apply it, set this field to false" + }, + "contactCode": { + "type": "string", + "description": "(NIF / CIF / VAT) Field required if you want to choose an existing contact and contactId field is empty" + }, + "contactId": { + "type": "string", + "description": "(Contact ID) Field required if you want to choose an existing contact and contactCode field is empty" + }, + "contactName": { + "type": "string", + "description": "Field required if contactCode and contactId fields are empty and you want to create a new contact" + }, + "contactEmail": { + "type": "string" + }, + "contactAddress": { + "type": "string" + }, + "contactCity": { + "type": "string" + }, + "contactCp": { + "type": "string" + }, + "contactProvince": { + "type": "string" + }, + "contactCountryCode": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "notes": { + "type": "string" + }, + "salesChannelId": { + "type": "string", + "description": "Set an existing account id" + }, + "paymentMethodId": { + "type": "string" + }, + "designId": { + "type": "string" + }, + "language": { + "type": "string" + }, + "warehouseId": { + "type": "string", + "description": "Choose the warehouse for your salesorder, purchaseorder or waybill." + }, + "approveDoc": { + "type": "boolean", + "description": "Choose if the document needs to be approved or not. The default option is False." + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "units": { + "type": "number" + }, + "sku": { + "type": "string" + }, + "serviceId": { + "type": "string" + }, + "accountingAccountId": { + "type": "string" + }, + "subtotal": { + "type": "number" + }, + "discount": { + "type": "number" + }, + "tax": { + "type": "integer", + "description": "IVA percentage. In case you need to inform more than one tax, use the field taxes instead" + }, + "taxes": { + "type": "array", + "description": "Comma separated Tax keys. e.g. (s_iva_21,s_ret_19)", + "items": { + "type": "string" + } + }, + "supplied": { + "type": "string", + "description": "Optional (Yes/No)" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } } } - }, - "contactPersons": { - "type": "array", - "items": { - "type": "object", - "properties": { - "personId": { "type": "string" }, - "name": { "type": "string" }, - "job": { "type": "string" }, - "phone": { "type": "string" }, - "email": { "type": "string" }, - "sendDocumentsByDefault": { "type": "boolean" }, - "linkedin": { "type": "string" } + } + }, + "customFields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "value": { + "type": "string" } } - }, - "shippingAddresses": { - "type": "array", - "items": { - "type": "object", - "properties": { - "shippingId": { "type": "string" }, - "name": { "type": "string" }, - "address": { "type": "string" }, - "city": { "type": "string" }, - "postalCode": { "type": "integer" }, - "province": { "type": "string" }, - "country": { "type": "string" }, - "countryCode": { "type": "string" }, - "notes": { "type": "string" }, - "privateNotes": { "type": "string" } + } + }, + "invoiceNum": { + "type": "string" + }, + "numSerieId": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "currencyChange": { + "type": "number" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "dueDate": { + "type": "integer" + }, + "shippingAddress": { + "type": "string" + }, + "shippingPostalCode": { + "type": "string" + }, + "shippingCity": { + "type": "string" + }, + "shippingProvince": { + "type": "string" + }, + "shippingCountry": { + "type": "string" + }, + "salesChannel": { + "type": "number" + } + }, + "required": ["date"] + } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "title": "Document Detailed Output", + "description": "The properties that are included when fetching a single Document.", + "allOf": [ + { + "title": "Document Basic Output", + "description": "The properties that are included when fetching a list of Documents.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Document Common", + "description": "The properties that are shared amongst all versions of the Document model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "contact": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + }, + "notes": { + "type": "string" + }, + "products": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "price": { + "type": "integer" + }, + "units": { + "type": "integer" + }, + "tax": { + "type": "integer" + }, + "discount": { + "type": "integer" + }, + "retention": { + "type": "integer" + }, + "weight": { + "type": "integer" + }, + "costPrice": { + "type": "integer" + }, + "sku": { + "type": "string" + }, + "productId": { + "type": "string" + } + } + } + }, + "tax": { + "type": "number" + }, + "subtotal": { + "type": "number" + }, + "discount": { + "type": "integer" + }, + "total": { + "type": "number" + }, + "language": { + "type": "string" + }, + "status": { + "type": "integer" + }, + "customFields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "value": { + "type": "string" + } + } + } + }, + "docNumber": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "currencyChange": { + "type": "integer" + }, + "paymentsTotal": { + "type": "integer" + }, + "paymentsPending": { + "type": "number" + }, + "paymentsRefunds": { + "type": "integer" + }, + "salesChannelId": { + "type": "string" + } + }, + "x-readme-ref-name": "document-common" } - } + ], + "x-readme-ref-name": "document-output" }, - "customFields": { - "type": "array", - "items": { - "type": "object", - "properties": { - "field": { "type": "string" }, - "value": { "type": "string" } - } - } + { + "type": "object", + "properties": {} + } + ], + "x-readme-ref-name": "document-output-detailed" + }, + "examples": { + "response": { + "value": { + "status": 1, + "id": "5acce41e12d56e005e0e62d3", + "invoiceNum": "F170009", + "contactId": "5ac3a7b68fbd9d000f07e237" } } } - }, - "examples": { - "response": { - "value": [ + } + } + } + }, + "tags": ["DOCUMENTS"], + "description": "Create a new document type." + } + }, + "/documents/{docType}/{documentId}": { + "parameters": [ + { + "name": "docType", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "documentId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "get": { + "operationId": "getDocument", + "summary": "Get Document", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "title": "Document Detailed Output", + "description": "The properties that are included when fetching a single Document.", + "allOf": [ { - "id": "5aaa43d35b7064002613c048", - "customId": "myReferenceId", - "name": "Custom Tech Inc.", - "code": "B3737387", - "tradeName": "Mapple", - "email": "email@mapple.com", - "mobile": "63738383", - "phone": "3949494", - "type": "client", - "iban": "ES436677378638786", - "swift": "", - "clientRecord": 0, - "supplierRecord": 0, - "billAddress": { - "address": "Carrer del Mar", - "city": "Barcelona", - "postalCode": 8767, - "province": "Barcelona", - "country": "Spain", - "countryCode": "ES", - "info": "Random info" - }, - "defaults": { - "salesChannel": 0, - "expensesAccount": 0, - "dueDays": 3, - "paymentMethod": 0, - "discount": 45, - "language": "fr", - "currency": "eur", - "tax": "default", - "retention": "default" - }, - "socialNetworks": { "website": "www.mapple.com" }, - "tags": ["tag", "otherTag"], - "notes": [ + "title": "Document Basic Output", + "description": "The properties that are included when fetching a list of Documents.", + "allOf": [ { - "noteId": "5aba2365c5d43800316b2a53", - "name": "My first note", - "description": "An important note", - "color": "primary", - "updatedAt": 1522148197, - "userId": "5a05cc5a60cea100094baf22" + "type": "object", + "properties": {} }, { - "noteId": "5aba26efc5d43800316b2a54", - "name": "Note", - "description": "Another note", - "color": "#ee575d", - "updatedAt": 1522149103, - "userId": "" + "title": "Document Common", + "description": "The properties that are shared amongst all versions of the Document model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "contact": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + }, + "notes": { + "type": "string" + }, + "products": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "price": { + "type": "integer" + }, + "units": { + "type": "integer" + }, + "tax": { + "type": "integer" + }, + "discount": { + "type": "integer" + }, + "retention": { + "type": "integer" + }, + "weight": { + "type": "integer" + }, + "costPrice": { + "type": "integer" + }, + "sku": { + "type": "string" + }, + "productId": { + "type": "string" + } + } + } + }, + "tax": { + "type": "number" + }, + "subtotal": { + "type": "number" + }, + "discount": { + "type": "integer" + }, + "total": { + "type": "number" + }, + "language": { + "type": "string" + }, + "status": { + "type": "integer" + }, + "customFields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "value": { + "type": "string" + } + } + } + }, + "docNumber": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "currencyChange": { + "type": "integer" + }, + "paymentsTotal": { + "type": "integer" + }, + "paymentsPending": { + "type": "number" + }, + "paymentsRefunds": { + "type": "integer" + }, + "salesChannelId": { + "type": "string" + } + }, + "x-readme-ref-name": "document-common" } ], - "contactPersons": [ - { - "personId": "5aba40fdc5d43800316b2a55", - "name": "Pep", - "job": "Ito", - "phone": "966", - "email": "noway@frog.com", - "sendDocumentsByDefault": true, - "linkedin": "no link" + "x-readme-ref-name": "document-output" + }, + { + "type": "object", + "properties": {} + } + ], + "x-readme-ref-name": "document-output-detailed" + } + } + } + } + }, + "tags": ["DOCUMENTS"], + "description": "Get a specific document." + }, + "put": { + "operationId": "Update Document", + "summary": "Update Document", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "desc": { + "type": "string" + }, + "notes": { + "type": "string" + }, + "language": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "paymentMethod": { + "type": "string" + }, + "warehouseId": { + "type": "string", + "description": "Choose the warehouse for your salesorder, purchaseorder or waybill." + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "subtotal": { + "type": "integer" + }, + "tax": { + "type": "integer" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "units": { + "type": "integer" + }, + "discount": { + "type": "integer" + }, + "accountingAccountId": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "sku": { + "type": "string" + }, + "lotSku": { + "type": "string" + }, + "supplied": { + "type": "string", + "description": "Optional (Yes/No)" } - ], - "shippingAddresses": [ - { - "shippingId": "5aba4147c5d43800342fc4a3", - "name": "Mapple shipping address", - "address": "c/Lafranch", - "city": "Vilafranca del Monport ", - "postalCode": 899, - "province": "Barcelona", - "country": "Spain", - "countryCode": "ES", - "notes": "A public note", - "privateNotes": "This is a private note, don't read it" + } + } + }, + "salesChannelId": { + "type": "string" + }, + "expAccountId": { + "type": "string" + }, + "customFields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "value": { + "type": "string" } - ], - "customFields": [ - { "field": "FieldOne", "value": "valueOne" } - ] + } } - ] + } } } } + }, + "x-examples": { + "application/json": { + "desc": "description goes here", + "notes": "notes goes here", + "language": "es", + "date": 15243534, + "paymentMethod": "3243546", + "products": [ + { + "name": "item name", + "desc": "item desc", + "subtotal": 344, + "tax": 21, + "units": 3, + "discount": 0 + } + ], + "salesChannelId": "345463o5hj432kjb4o23n1l5j5", + "expAccountId": "345463o5hj43n1l5jowr3onb5" + } } - } - }, - "tags": ["CONTACTS"], - "summary": "List Contacts", - "description": "Get all your contact." - }, - "post": { - "operationId": "Create Contact", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "CustomId": { "type": "string" }, - "name": { "type": "string" }, - "code": { "type": "string" }, - "email": { "type": "string" }, - "mobile": { "type": "string" }, - "phone": { "type": "string" }, - "type": { - "type": "string", - "description": "Options: supplier, debtor, creditor, client, lead" - }, - "isperson": { - "type": "boolean", - "description": "When true the contact is created as a Contact Person instead of as a Company" - }, - "iban": { "type": "string" }, - "swift": { "type": "string" }, - "sepaRef": { "type": "string" }, - "groupId": { "type": "string" }, - "taxOperation": { - "type": "string", - "description": "options for Spain (general, intra, impexp, nosujeto, receq, exento)" - }, - "sepaDate": { "type": "number" }, - "clientRecord": { "type": "integer" }, - "supplierRecord": { "type": "integer" }, - "billAddress": { + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "object", "properties": { - "address": { "type": "string" }, - "city": { "type": "string" }, - "postalCode": { "type": "string" }, - "province": { "type": "string" }, - "country": { "type": "string" } + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } } }, - "numberingSeries": { - "type": "object", - "description": "The value of each document should be a valid ID.", - "properties": { - "invoice": { "type": "string" }, - "receipt": { "type": "string" }, - "salesOrder": { "type": "string" }, - "purchasesOrder": { "type": "string" }, - "proform": { "type": "string" }, - "waybill": { "type": "string" } + "examples": { + "response": { + "value": { + "status": 1, + "info": "Updated", + "id": "5ac4f2cec839ea004e18a463" + } } - }, - "shippingAddresses": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "address": { "type": "string" }, - "city": { "type": "string" }, - "postalCode": { "type": "string" }, - "province": { "type": "string" }, - "country": { "type": "string" }, - "note": { "type": "string" }, - "privateNote": { "type": "string" } + } + } + } + } + }, + "tags": ["DOCUMENTS"], + "description": "Update a specific document. {lotSku} field is only needed when {kind} is lots." + }, + "delete": { + "operationId": "Delete Document", + "summary": "Delete Document", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "examples": { + "response": { + "value": { + "status": 1, + "info": "Successfully deleted", + "id": "5aba68b1c5d438006425ad45" } } - }, - "defaults": { + } + } + } + } + }, + "tags": ["DOCUMENTS"], + "description": "Delete specific document type." + } + }, + "/documents/{docType}/{documentId}/pay": { + "parameters": [ + { + "name": "docType", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "documentId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "post": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "object", "properties": { - "expensesAccountRecord": { "type": "integer" }, - "expensesAccountName": { "type": "string" }, - "salesAccountRecord": { "type": "integer" }, - "salesAccountName": { "type": "string" }, - "dueDays": { "type": "integer" }, - "salesTax": { "type": "integer" }, - "salesTaxes": { - "type": "array", - "items": { "type": "string" } - }, - "purchasesTax": { "type": "integer" }, - "purchasesTaxes": { - "type": "array", - "items": { "type": "string" } - }, - "accumulateInForm347": { - "type": "string", - "description": "Yes or No" - }, - "paymentMethod": { - "type": "string", - "description": "Should be a valid ID" + "status": { + "type": "integer" }, - "discount": { "type": "integer" }, - "currency": { - "type": "string", - "description": "Currency ISO code in lowercase (e.g., eur = Euro, usd = U.S. Dollar, etc )" + "invoiceId": { + "type": "string" }, - "language": { - "type": "string", - "description": "options (es = spanish, en = english, fr = french, de = german, it = italian, ca = catalan, eu = euskera)" + "invoiceNum": { + "type": "string" }, - "showTradeNameOnDocs": { "type": "boolean" }, - "showCountryOnDocs": { "type": "boolean" } + "paymentId": { + "type": "string" + } } }, - "socialNetworks": { - "type": "object", - "properties": { "website": { "type": "string" } } - }, - "tags": { "type": "array", "items": { "type": "string" } }, - "note": { "type": "string" }, - "contactPersons": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "phone": { "type": "string" }, - "email": { "type": "string" } + "examples": { + "response": { + "value": { + "status": 1, + "invoiceId": "13f14gl5i46ñ5b64vp1535", + "invoiceNum": "F170007", + "paymentId": "3245bkjblhj3v2k6vl4bhbv145b" } - }, - "required": ["name"] + } } } } } }, - "x-examples": { - "application/json": { - "CustomId": "My reference", - "name": "Custom Tech Inc.", - "code": "B3737387", - "email": "email@mapple.com", - "mobile": "63738383", - "phone": "3949494", - "type": "supplier", - "iban": "ES436677378638786", - "swift": "", - "clientRecord": 0, - "supplierRecord": 0, - "billAddress": { - "address": "Carrer del Mar", - "city": "Barcelona", - "postalCode": 8767, - "province": "Barcelona", - "country": "Spain" - }, - "defaults": { - "salesChannel": 0, - "expensesAccount": 0, - "dueDays": 3, - "paymentMethod": 0, - "discount": 45, - "language": "fr", - "currency": "eur", - "tax": "default", - "retention": "default" - }, - "socialNetworks": { "website": "www.mapple.com" }, - "tags": ["tag", "otherTag"], - "notes": "My note", - "contactPersons": { - "name": "Pep", - "phone": "966", - "email": "noway@frog.com" + "operationId": "Pay Document", + "summary": "Pay Document", + "tags": ["DOCUMENTS"], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "date": { + "type": "integer" + }, + "treasury": { + "type": "string", + "description": "Your treasury holded's id" + }, + "desc": { + "type": "string" + }, + "amount": { + "type": "number" + } + }, + "required": ["date", "amount"] + } + } + }, + "x-examples": { + "application/json": { + "date": 1513245364, + "treasury": "4156257683", + "desc": "description", + "amount": 345 } } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Created", - "id": "5ac4f2cec839ea004e18a463" + }, + "description": "Pay one specific document" + } + }, + "/documents/{docType}/{documentId}/send": { + "post": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Document sent" + } } } } } } - } - }, - "tags": ["CONTACTS"], - "summary": "Create Contact", - "description": "Create a new contact." - } - }, - "/contacts/{contactId}": { - "parameters": [ - { - "name": "contactId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], - "get": { - "operationId": "Get Contact", - "responses": { - "200": { - "description": "", + }, + "operationId": "Send Document", + "summary": "Send Document", + "tags": ["DOCUMENTS"], + "requestBody": { "content": { "application/json": { "schema": { "type": "object", + "required": ["emails"], "properties": { - "id": { "type": "string" }, - "customId": { "type": "string" }, - "name": { "type": "string" }, - "code": { "type": "string" }, - "tradeName": { "type": "string" }, - "email": { "type": "string" }, - "mobile": { "type": "string" }, - "phone": { "type": "string" }, - "type": { "type": "string" }, - "iban": { "type": "string" }, - "swift": { "type": "string" }, - "clientRecord": { "type": "integer" }, - "supplierRecord": { "type": "integer" }, - "billAddress": { - "type": "object", - "properties": { - "address": { "type": "string" }, - "city": { "type": "string" }, - "postalCode": { "type": "integer" }, - "province": { "type": "string" }, - "country": { "type": "string" }, - "countryCode": { "type": "string" }, - "info": { "type": "string" } - } - }, - "defaults": { - "type": "object", - "properties": { - "salesChannel": { "type": "integer" }, - "expensesAccount": { "type": "integer" }, - "dueDays": { "type": "integer" }, - "paymentMethod": { "type": "integer" }, - "discount": { "type": "integer" }, - "language": { "type": "string" }, - "currency": { "type": "string" }, - "tax": { "type": "string" }, - "retention": { "type": "string" } - } - }, - "socialNetworks": { - "type": "object", - "properties": { "website": { "type": "string" } } + "mailTemplateId": { + "type": "string" }, - "tags": { "type": "array", "items": { "type": "string" } }, - "notes": { - "type": "array", - "items": { - "type": "object", - "properties": { - "noteId": { "type": "string" }, - "name": { "type": "string" }, - "description": { "type": "string" }, - "color": { "type": "string" }, - "updatedAt": { "type": "integer" }, - "userId": { "type": "string" } - } - } + "emails": { + "type": "string" }, - "contactPersons": { - "type": "array", - "items": { - "type": "object", - "properties": { - "personId": { "type": "string" }, - "name": { "type": "string" }, - "job": { "type": "string" }, - "phone": { "type": "string" }, - "email": { "type": "string" }, - "sendDocumentsByDefault": { "type": "boolean" }, - "linkedin": { "type": "string" } - } - } + "subject": { + "type": "string", + "minLength": 10, + "description": "Minimum 10 characters" }, - "shippingAddresses": { - "type": "array", - "items": { - "type": "object", - "properties": { - "shippingId": { "type": "string" }, - "name": { "type": "string" }, - "address": { "type": "string" }, - "city": { "type": "string" }, - "postalCode": { "type": "integer" }, - "province": { "type": "string" }, - "country": { "type": "string" }, - "countryCode": { "type": "string" }, - "notes": { "type": "string" }, - "privateNotes": { "type": "string" } - } - } + "message": { + "type": "string", + "minLength": 20, + "description": "Minimum 20 characters" }, - "customFields": { - "type": "array", - "items": { - "type": "object", - "properties": { - "field": { "type": "string" }, - "value": { "type": "string" } - } - } - } - } - }, - "examples": { - "response": { - "value": { - "id": "5aaa43d35b7064002613c048", - "customId": "myReferenceId", - "name": "Custom Tech Inc.", - "code": "B3737387", - "tradeName": "Mapple", - "email": "email@mapple.com", - "mobile": "63738383", - "phone": "3949494", - "type": "client", - "iban": "ES436677378638786", - "swift": "", - "clientRecord": 0, - "supplierRecord": 0, - "billAddress": { - "address": "Carrer del Mar", - "city": "Barcelona", - "postalCode": 8767, - "province": "Barcelona", - "country": "Spain", - "countryCode": "ES", - "info": "Random info" - }, - "defaults": { - "salesChannel": 0, - "expensesAccount": 0, - "dueDays": 3, - "paymentMethod": 0, - "discount": 45, - "language": "fr", - "currency": "eur", - "tax": "default", - "retention": "default" - }, - "socialNetworks": { "website": "www.mapple.com" }, - "tags": ["tag", "otherTag"], - "notes": [ - { - "noteId": "5aba2365c5d43800316b2a53", - "name": "My first note", - "description": "An important note", - "color": "primary", - "updatedAt": 1522148197, - "userId": "5a05cc5a60cea100094baf22" - }, - { - "noteId": "5aba26efc5d43800316b2a54", - "name": "Note", - "description": "Another note", - "color": "#ee575d", - "updatedAt": 1522149103, - "userId": "" - } - ], - "contactPersons": [ - { - "personId": "5aba40fdc5d43800316b2a55", - "name": "Pep", - "job": "Ito", - "phone": "966", - "email": "noway@frog.com", - "sendDocumentsByDefault": true, - "linkedin": "no link" - } - ], - "shippingAddresses": [ - { - "shippingId": "5aba4147c5d43800342fc4a3", - "name": "Mapple shipping address", - "address": "c/LLafranch", - "city": "Vilafranca del Monport ", - "postalCode": 899, - "province": "Lleida", - "country": "Spain", - "countryCode": "ES", - "notes": "A public note", - "privateNotes": "This is a private note, don't read it" - } - ], - "customFields": [ - { "field": "FieldOne", "value": "noValue" } - ] + "docIds": { + "type": "string" } } } } + }, + "x-examples": { + "application/json": { + "mailTemplateId": "456lkn5er467522115", + "emails": "email@example.com, email2@example.com", + "subject": "subject email", + "message": "email messages goes here", + "docIds": "" + } } - } + }, + "description": "Send a specific document by email." }, - "tags": ["CONTACTS"], - "summary": "Get Contact", - "description": "Get a specific contact." + "parameters": [ + { + "name": "docType", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "documentId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] }, - "put": { - "operationId": "Update Contact", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "code": { "type": "string" }, - "tradeName": { "type": "string" }, - "email": { "type": "string" }, - "mobile": { "type": "string" }, - "phone": { "type": "string" }, - "type": { - "type": "string", - "description": "Options: supplier, debtor, creditor, client, lead" - }, - "isperson": { - "type": "boolean", - "description": "When true the contact is created as a Contact Person instead of as a Company" - }, - "iban": { "type": "string" }, - "swift": { "type": "string" }, - "sepaRef": { "type": "string" }, - "sepaDate": { "type": "number" }, - "clientRecord": { "type": "integer" }, - "supplierRecord": { "type": "integer" }, - "groupId": { "type": "string" }, - "taxOperation": { - "type": "string", - "description": "options for Spain (general, intra, impexp, nosujeto, receq, exento)" - }, - "billAddress": { + "/documents/{docType}/{documentId}/pdf": { + "get": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "object", "properties": { - "address": { "type": "string" }, - "city": { "type": "string" }, - "postalCode": { "type": "string" }, - "province": { "type": "string" }, - "country": { "type": "string" }, - "countryCode": { "type": "string" } + "status": { + "type": "integer" + }, + "info": { + "type": "string" + } } }, - "shippingAddresses": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "address": { "type": "string" }, - "city": { "type": "string" }, - "postalCode": { "type": "string" }, - "province": { "type": "string" }, - "country": { "type": "string" }, - "notes": { "type": "string" }, - "privateNote": { "type": "string" } + "examples": { + "response": { + "value": { + "status": 1, + "data": "<>" } } - }, - "defaults": { + } + } + } + } + }, + "operationId": "GetDocumentPDF", + "summary": "Get Document PDF", + "tags": ["DOCUMENTS"], + "description": "Get a specific document pdf." + }, + "parameters": [ + { + "name": "docType", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "documentId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/documents/salesorder/{documentId}/shipall": { + "post": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "object", "properties": { - "expensesAccountRecord": { "type": "integer" }, - "expensesAccountName": { "type": "string" }, - "salesAccountRecord": { "type": "integer" }, - "salesAccountName": { "type": "string" }, - "dueDays": { "type": "integer" }, - "salesTax": { "type": "integer" }, - "purchasesTax": { "type": "integer" }, - "accumulateInForm347": { - "type": "string", - "description": "Yes or No" - }, - "paymentMethod": { - "type": "string", - "description": "Should be a valid ID." - }, - "discount": { "type": "integer" }, - "currency": { - "type": "string", - "description": "Currency ISO code in lowercase (e.g., eur = Euro, usd = U.S. Dollar, etc )" - }, - "language": { - "type": "string", - "description": "options (es = spanish, en = english, fr = french, de = german, it = italian, ca = catalan, eu = euskera)" - }, - "showTradeNameOnDocs": { "type": "boolean" }, - "showCountryOnDocs": { "type": "boolean" } + "status": { + "type": "integer" + }, + "info": { + "type": "string" + } } }, - "socialNetworks": { - "type": "object", - "properties": { "website": { "type": "string" } } - }, - "numberingSeries": { - "type": "object", - "description": "The value of each document should be a valid ID.", - "properties": { - "invoice": { "type": "string" }, - "receipt": { "type": "string" }, - "salesOrder": { "type": "string" }, - "purchasesOrder": { "type": "string" }, - "proform": { "type": "string" }, - "waybill": { "type": "string" } + "examples": { + "response": { + "value": { + "status": 1, + "info": "Items Shipped" + } } } } } } }, - "x-examples": { - "application/json": { - "name": "Custom Tech Inc.", - "code": "B3737387", - "tradeName": "Mapple", - "email": "email@mapple.com", - "mobile": "63738383", - "phone": "3949494", - "type": "client", - "iban": "ES436677378638786", - "swift": "UJ45623456", - "clientRecord": 0, - "supplierRecord": 0, - "billAddress": { - "address": "Carrer del Mar", - "city": "Barcelona", - "postalCode": 8767, - "province": "Barcelona", - "country": "Spain", - "countryCode": "ES" - }, - "defaults": { - "salesChannel": 0, - "expensesAccount": 0, - "dueDays": 3, - "paymentMethod": 0, - "discount": 45, - "language": "fr" - }, - "socialNetworks": { "website": "www.mapple.com" } + "operationId": "Ship all items", + "summary": "Ship All Items", + "tags": ["DOCUMENTS"], + "description": "Ship all the items of a specific sales order." + }, + "parameters": [ + { + "name": "documentId", + "in": "path", + "required": true, + "schema": { + "type": "string" } } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5ac4f2cec839ea004e18a463" + ] + }, + "/documents/salesorder/{documentId}/shipbylines": { + "post": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Items Shipped" + } } } } } } - } - }, - "tags": ["CONTACTS"], - "summary": "Update Contact", - "description": "Update a specific contact.\n\nOnly the params included in the operation will update the contact." - }, - "delete": { - "operationId": "Delete Contact", - "responses": { - "200": { - "description": "", + }, + "operationId": "Ship items by line", + "summary": "Ship items by line", + "tags": ["DOCUMENTS"], + "description": "Ship a specific item of a specific sales order (itemLinePosition starts at 0).", + "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" + "lines": { + "type": "array", + "items": { + "type": "object", + "properties": { + "itemLinePosition": { + "type": "integer" + }, + "units": { + "type": "integer" + } + } + } } } } @@ -862,224 +5616,287 @@ } } }, - "tags": ["CONTACTS"], - "summary": "Delete Contact", - "description": "Delete specific contact" - } - }, - "/contacts/{contactId}/attachments/list": { - "parameters": [ - { - "name": "contactId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], - "get": { - "operationId": "Get attachments list", - "responses": { - "200": { - "description": "Get attachments list for a given contact", - "content": { - "application/json": { - "schema": { "type": "array", "items": { "type": "string" } } - } + "parameters": [ + { + "name": "documentId", + "in": "path", + "required": true, + "schema": { + "type": "string" } } - }, - "tags": ["CONTACTS"], - "summary": "Get contact attachments list", - "description": "Get attachments list for a given contact." - } - }, - "/contacts/{contactId}/attachments/get": { - "parameters": [ - { - "name": "contactId", - "in": "path", - "required": true, - "schema": { "type": "string" } - }, - { - "name": "filename", - "in": "query", - "required": true, - "schema": { "type": "string" } - } - ], - "get": { - "operationId": "Get attachment", - "responses": { - "200": { - "description": "Get attachment", - "content": { - "application/json": { - "schema": { "type": "string", "format": "binary" } - } + ] + }, + "/documents/{docType}/{documentId}/shippeditems": { + "parameters": [ + { + "name": "docType", + "in": "path", + "required": true, + "description": "docType should be one of: {salesorder, order}", + "schema": { + "type": "string" + } + }, + { + "name": "documentId", + "in": "path", + "required": true, + "schema": { + "type": "string" } } - }, - "tags": ["CONTACTS"], - "summary": "Get attachment", - "description": "Get attachment" - } - }, - "/contacts/groups": { - "get": { - "operationId": "List Contact Groups", - "summary": "List Contact Groups", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { + ], + "get": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "sku": { + "type": "string" + }, + "total": { + "type": "number" + }, + "sent": { + "type": "number" + }, + "pending": { + "type": "number" + } + } + } + } + } + } + } + }, + "operationId": "Shipped units by item", + "summary": "Shipped units by item", + "tags": ["DOCUMENTS"], + "description": "For each item included in a sales or purchase order, get the number of units shipped or recieved." + } + }, + "/documents/{docType}/{documentId}/attach": { + "post": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "object", "properties": { - "id": { "type": "string" }, - "name": { "type": "string" }, - "desc": { "type": "string" }, - "color": { "type": "string" } + "status": { + "type": "integer" + }, + "info": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "data": "<>" + } } } } } } - } - }, - "tags": ["CONTACT GROUPS"] - }, - "post": { - "operationId": "Create Contact Group", - "summary": "Create Contact Group", - "requestBody": { - "content": { - "application/json": { + }, + "operationId": "Attach File", + "summary": "Attach File to a specific document", + "parameters": [ + { + "name": "docType", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "documentId", + "in": "path", + "required": true, "schema": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "desc": { "type": "string" }, - "color": { "type": "string" } - }, - "required": ["name"] + "type": "string" } } - } - }, - "responses": { - "201": { - "description": "", + ], + "requestBody": { "content": { - "application/json": { + "multipart/form-data": { "schema": { "type": "object", "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } + "file": { + "description": "The file to upload.", + "type": "string", + "format": "binary" + }, + "setMain": { + "type": "boolean" + } } } } } - } - }, - "tags": ["CONTACT GROUPS"] - } - }, - "/contacts/groups/{groupId}": { - "parameters": [ - { - "name": "groupId", - "in": "path", - "required": true, - "schema": { "type": "string" } + }, + "tags": ["DOCUMENTS"], + "description": "Attach File to a specific document." } - ], - "get": { - "operationId": "Get Contact Group", - "summary": "Get Contact Group", - "responses": { - "200": { - "description": "", + }, + "/documents/{docType}/{documentId}/updatetracking": { + "post": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "data": "Updated" + } + } + } + } + } + } + }, + "operationId": "Update tracking info", + "summary": "Update tracking info from specific document.", + "tags": ["DOCUMENTS"], + "description": "Update tracking info from specific document.", + "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "id": { "type": "string" }, - "name": { "type": "string" }, - "desc": { "type": "string" }, - "color": { "type": "string" } + "key": { + "type": "string", + "example": "correos", + "description": "key should be one of: {mrw, ups, fedex,tnt, seur, nacex, correos, asm, uspostalservice, dbschenker, royalmail, bluedart, palletways, correosexpress, tourline, other (for custom)}" + }, + "name": { + "type": "string", + "example": "correos", + "description": "name should be one of: {mrw, ups, fedex,tnt, seur, nacex, correos, asm, United States Postal Service, dbschenker, royalmail, bluedart, palletways, correosexpress, tourline, custom name (for custom)}" + }, + "num": { + "type": "string", + "example": "1,2-3", + "description": "Tracking numbers. Can be added more numbers separated by , or -" + }, + "pickUpDate": { + "type": "string", + "example": "01/01/2020", + "description": "pickUpDate should be formated like DD/MM/YYYY" + }, + "deliveryDate": { + "type": "string", + "example": "01/01/2020", + "description": "deliveryDate should be formated like DD/MM/YYYY" + }, + "notes": { + "type": "string", + "example": "note", + "description": "notes for the tracking" + } } } } } } }, - "tags": ["CONTACT GROUPS"] - }, - "put": { - "operationId": "Update Contact Group", - "summary": "Update Contact Group", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "desc": { "type": "string" }, - "color": { "type": "string" } - } - } + "parameters": [ + { + "name": "documentId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "docType", + "in": "path", + "required": true, + "description": "docType should be one of: {salesorder, waybill}", + "schema": { + "type": "string" } } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } + ] + }, + "/documents/{docType}/{documentId}/pipeline/set": { + "post": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Done" + } + } } } } } - } - }, - "tags": ["CONTACT GROUPS"] - }, - "delete": { - "operationId": "Delete Contact Group", - "summary": "Delete Contact Group", - "responses": { - "200": { - "description": "", + }, + "operationId": "Update document pipeline", + "summary": "Update pipeline from specific document.", + "tags": ["DOCUMENTS"], + "description": "Update pipeline from specific document.", + "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" + "pipeline": { + "type": "string" } } } @@ -1087,573 +5904,244 @@ } } }, - "tags": ["CONTACT GROUPS"] - } - }, - "/products": { - "get": { - "operationId": "List Products", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/product-output" } - }, - "examples": { - "response": { - "value": [ - { - "id": "5abbc9980823dd002b5c36f5", - "kind": "simple", - "name": "Brand new shirt", - "desc": "Black shirt", - "typeId": "5abbc8e40823dd00274ca482", - "contactId": "5aaa51ab5b70640028340186", - "contactName": "Iron Supply", - "price": 95, - "tax": 21, - "total": 119.45, - "rates": [], - "hasStock": 1, - "stock": 2, - "barcode": "45the54", - "sku": "23454657", - "cost": 20, - "purchasePrice": 11.5, - "weight": 0.5, - "tags": ["tig", "tag", "tug"], - "categoryId": "5abbc9110823dd0025411fb4", - "factoryCode": "32435g", - "attributes": [], - "forSale": 1, - "forPurchase": 1, - "salesChannelId": "5abbc324g3vdd002b5c36f3", - "expAccountId": "5abbc9980823d3245b5c36f3", - "warehouseId": "5abbc89e5823dd002b5c36f3", - "variants": [ - { - "id": "5abbc9980823dd002b5c36f3", - "barcode": "35647", - "sku": "34354", - "price": 45, - "cost": 20, - "purchasePrice": 11.5, - "stock": 2 - }, - { - "id": "5abbc9980823dd002b5c36f4", - "barcode": "", - "sku": "", - "price": 45, - "cost": 20, - "purchasePrice": 11.5, - "stock": 0 - } - ] + "parameters": [ + { + "name": "documentId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "docType", + "in": "path", + "description": "docType should be one of: {salesorder, waybill}", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/paymentmethods": { + "get": { + "responses": { + "200": { + "description": "List Payment methods", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" }, - { - "id": "5abbd1cf0823dd004562b685", - "kind": "simple", - "name": "Tata shoes", - "desc": "brand new shoes", - "typeId": "480yhfn2b3498o243upj2", - "contactId": "2p4hjrnfob3hli2khpn", - "contactName": "Tata industry", - "price": 100, - "tax": 21, - "total": 121, - "rates": [], - "hasStock": 1, - "stock": 234, - "barcode": "232435465", - "sku": "234rwt54", - "cost": 39, - "purchasePrice": 11, - "weight": 0, - "tags": [""], - "categoryId": "5abbd15e0823dd003b085005", - "factoryCode": "324t5f4", - "attributes": [], - "forSale": 1, - "forPurchase": 1, - "salesChannelId": "0", - "expAccountId": "0", - "warehouseId": "0", - "variants": [ - { - "id": "5abbd1cf0823dd004562b683", - "barcode": "123", - "sku": "123", - "price": 2, - "cost": 1, - "purchasePrice": 1, - "stock": 234 - }, - { - "id": "5abbd1cf0823dd004562b684", - "barcode": "", - "sku": "", - "price": 0, - "cost": 0, - "purchasePrice": 2, - "stock": 0 - } - ] + "name": { + "type": "string" }, - { - "id": "5abbca020823dd00343d0a44", - "kind": "simple", - "name": "new simple product", - "desc": "the best simple product you can buy", - "typeId": "3l4kbn5j3oknl645t574354", - "contactId": "", - "contactName": "", - "price": 0, - "tax": 21, - "total": 0, - "rates": [], - "hasStock": 1, - "stock": 0, - "barcode": "", - "sku": "", - "cost": 0, - "purchasePrice": 0, - "weight": 0, - "tags": [""], - "categoryId": "0", - "factoryCode": "", - "attributes": [], - "forSale": 1, - "forPurchase": 1, - "salesChannelId": "0", - "expAccountId": "0", - "warehouseId": "0", - "variants": [ - { - "id": "5abbca020823dd00343d0a43", - "barcode": "", - "sku": "", - "price": 0, - "cost": 0, - "purchasePrice": 0, - "stock": 0 - } - ] + "dueDays": { + "type": "string" + }, + "bankId": { + "type": "string" } - ] + } } } } } - } - }, - "tags": ["PRODUCTS"], - "summary": "List Products" + }, + "operationId": "List Payment methods", + "summary": "List Payment methods", + "tags": ["DOCUMENTS"], + "description": "List Payment methods" + } }, - "post": { - "operationId": "Create Product", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "kind": { "type": "string" }, - "name": { "type": "string" }, - "desc": { "type": "string" }, - "price": { "type": "number" }, - "tax": { "type": "number" }, - "cost": { "type": "number" }, - "calculatecost": { "type": "number" }, - "purchasePrice": { "type": "number" }, - "tags": { "type": "array", "items": { "type": "string" } }, - "barcode": { "type": "string" }, - "sku": { "type": "string" }, - "weight": { "type": "number" }, - "stock": { "type": "integer" } + "/remittances": { + "get": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } } } } }, - "x-examples": { - "application/json": {}, - "new": { "kind": "simple", "name": "Brand new shirt" } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Created", - "id": "5aa97e595b706400153f9f94" - } - } - } - } + "summary": "List Remittances", + "operationId": "List Remittances", + "tags": ["REMITTANCES"], + "security": [ + { + "Auth": [] } - } - }, - "tags": ["PRODUCTS"], - "summary": "Create Product" - } - }, - "/products/{productId}": { - "parameters": [ - { - "name": "productId", - "in": "path", - "required": true, - "schema": { "type": "string" } + ] } - ], - "put": { - "operationId": "Update Product", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "kind": { "type": "string" }, - "name": { "type": "string" }, - "desc": { "type": "string" }, - "tax": { "type": "integer" }, - "subtotal": { "type": "number" }, - "barcode": { "type": "string" }, - "sku": { "type": "string" }, - "cost": { "type": "number" }, - "purchasePrice": { "type": "number" }, - "weight": { "type": "number" } + }, + "/remittances/{remittanceId}": { + "get": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } } } } }, - "x-examples": { - "application/json": { - "kind": "simple", - "name": "Brand new shirt", - "desc": "Black shirt", - "tax": 21, - "subtotal": 119.45, - "barcode": "45the54", - "sku": "23454657", - "cost": 20, - "purchasePrice": 10, - "weight": 0.5 - } - } + "operationId": "Get Remittance", + "summary": "Get Remittance", + "tags": ["REMITTANCES"] }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5aa97e595b706400153f9f94" - } - } - } - } + "parameters": [ + { + "name": "remittanceId", + "in": "path", + "required": true, + "schema": { + "type": "string" } } - }, - "tags": ["PRODUCTS"], - "summary": "Update Product" + ] }, - "delete": { - "operationId": "Delete Product", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" - } + "/products/{productId}/image": { + "get": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} } } } } - } + }, + "summary": "Get Product Main Image", + "description": "Get the main image of a specific product", + "operationId": "Get Product Image", + "tags": ["PRODUCTS"] }, - "tags": ["PRODUCTS"], - "summary": "Delete Product" - }, - "get": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { "type": "object", "properties": {} } - } + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" } } - }, - "operationId": "Get product", - "summary": "Get Product", - "description": "Get a speccific product", - "tags": ["PRODUCTS"] - } - }, - "/warehouses": { - "get": { - "operationId": "List Warehouses", - "summary": "List Warehouses", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { + ] + }, + "/products/{productId}/imagesList": { + "get": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "object", - "properties": { - "id": { "type": "string" }, - "userId": { "type": "string" }, - "name": { "type": "string" }, - "email": { "type": "string" }, - "phone": { "type": "string" }, - "mobile": { "type": "string" }, - "address": { - "type": "object", - "properties": { - "address": { "type": "string" }, - "city": { "type": "string" }, - "postalCode": { "type": "string" }, - "province": { "type": "string" }, - "country": { "type": "string" }, - "countryCode": { "type": "string" } - } - }, - "default": { "type": "boolean" }, - "warehouseRecord": { "type": "integer" } - } - } - }, - "examples": { - "response": { - "value": [ - { - "id": "5a05cc6e60cea100094baf2f", - "userId": "2344000h2o4b5s4n3o45", - "name": "Main Warehouse", - "email": "main@warehouse.com", - "phone": "765837638", - "mobile": "23456673", - "address": { - "address": "Av. Meridiana, 13", - "city": "Barcelona", - "postalCode": 3849, - "province": "Barcelona", - "country": "Spain", - "countryCode": "ES" - }, - "default": true, - "warehouseRecord": 30000001 - }, - { - "id": "5aab9ae87bdcef002641e0c3", - "userId": "5a05cc5a60cea100094baf22", - "name": "Second warehouse", - "email": "second@warehouse.com", - "phone": "", - "mobile": "", - "address": { - "address": "Main Street, 3", - "city": "London", - "postalCode": "04747", - "province": "London", - "country": "United Kingdom", - "countryCode": "UK" - }, - "default": false, - "warehouseRecord": null - }, - { - "id": "5aaba5237bdcef002c4979d5", - "userId": "", - "name": "Third warehouse", - "email": "third@warehouse.com", - "phone": "123", - "mobile": "123", - "address": { - "address": "Av. Blasco Ibañez, 34", - "city": "Valencia", - "postalCode": 8054, - "province": "Valencia", - "country": "Spain", - "countryCode": "ES" - }, - "default": false, - "warehouseRecord": null - } - ] + "properties": {} } } } } - } + }, + "summary": "List Product Images", + "operationId": "List Product Images", + "tags": ["PRODUCTS"], + "description": "List all secondary product images" }, - "tags": ["WAREHOUSES"] + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] }, - "post": { - "operationId": "Create Warehouse", - "summary": "Create Warehouse", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "email": { "type": "string" }, - "phone": { "type": "string" }, - "mobile": { "type": "string" }, - "address": { + "/products/{productId}/image/{imageFileName}": { + "get": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "object", - "properties": { - "address": { "type": "string" }, - "city": { "type": "string" }, - "postalCode": { "type": "string" }, - "province": { "type": "string" }, - "country": { "type": "string" }, - "countryCode": { "type": "string" } - } - }, - "default": { "type": "boolean" } + "properties": {} + } } } } }, - "x-examples": { - "application/json": { - "name": "Main Warehouse", - "email": "main@warehouse.com", - "phone": "765837638", - "mobile": "23456673", - "address": { - "address": "Av. Meridiana, 13", - "city": "Barcelona", - "postalCode": 3849, - "province": "Barcelona", - "country": "Spain", - "countryCode": "ES" - }, - "default": true + "summary": "Get Product Secondary Image", + "tags": ["PRODUCTS"], + "description": "Get a specific secondary Image" + }, + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "imageFileName", + "in": "path", + "required": true, + "schema": { + "type": "string" } } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Created", - "id": "5aa97e595b706400153f9f94" - } - } - } - } + ] + }, + "/products/{productId}/stock": { + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string" } } - }, - "tags": ["WAREHOUSES"] - } - }, - "/warehouses/{warehouseId}/stock": { - "parameters": [ - { - "name": "warehouseId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], - "get": { - "operationId": "List products stock", - "summary": "List products stock", - "responses": { - "200": { - "description": "", + ], + "put": { + "operationId": "Update Product stock", + "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "warehouse": { + "stock": { "type": "object", - "properties": { - "id": { "type": "string" }, - "name": { "type": "string" }, - "color": { "type": "string" }, - "products": { - "type": "array", - "items": { - "type": "object", - "properties": { - "_id": { "type": "string" }, - "stock": { "type": "integer" }, - "variants": { - "type": "object", - "properties": { - "ObjectId": { "type": "integer" } - } - } - } + "additionalProperties": { + "type": "object", + "description": "WarehouseId's", + "additionalProperties": { + "type": "number", + "description": "ProductId or VariantId followed by stock to update", + "default": { + "ProductId": 1 } } } @@ -1662,2553 +6150,3382 @@ } } } - } - }, - "tags": ["WAREHOUSES"] - } - }, - "/warehouses/{warehouseId}": { - "parameters": [ - { - "name": "warehouseId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], - "get": { - "operationId": "Get Warehouse", - "summary": "Get Warehouse", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "userId": { "type": "string" }, - "name": { "type": "string" }, - "email": { "type": "string" }, - "phone": { "type": "string" }, - "mobile": { "type": "string" }, - "address": { - "type": "object", - "properties": { - "address": { "type": "string" }, - "city": { "type": "string" }, - "postalCode": { "type": "string" }, - "province": { "type": "string" }, - "country": { "type": "string" }, - "countryCode": { "type": "string" } - } - }, - "default": { "type": "boolean" }, - "warehouseRecord": { "type": "integer" } - } - }, - "examples": { - "response": { - "value": { - "id": "5a05cc6e60cea100094baf2f", - "userId": "2344000h2o4b5s4n3o45", - "name": "Main Warehouse", - "email": "main@warehouse.com", - "phone": "765837638", - "mobile": "23456673", - "address": { - "address": "Av. Meridiana, 13", - "city": "Barcelona", - "postalCode": 3849, - "province": "Barcelona", - "country": "Spain", - "countryCode": "ES" + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" }, - "default": true, - "warehouseRecord": 30000001 + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Updated", + "id": "5aa97e595b706400153f9f94" + } } } } } } - } - }, - "tags": ["WAREHOUSES"] + }, + "tags": ["PRODUCTS"], + "summary": "Update Product stock" + } }, - "put": { - "operationId": "Update Warehouse", - "summary": "Update Warehouse", - "requestBody": { - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/warehouse-input" } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "email": { "type": "string" }, - "phone": { "type": "string" }, - "mobile": { "type": "string" }, - "address": { + "/services": { + "get": { + "operationId": "List Services", + "summary": "List Services", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { "type": "object", "properties": { - "address": { "type": "string" }, - "city": { "type": "string" }, - "postalCode": { "type": "string" }, - "province": { "type": "string" }, - "country": { "type": "string" }, - "countryCode": { "type": "string" } - } - } - } - }, - "examples": { - "response": { - "value": { - "name": "Main Warehouse", - "email": "main@warehouse.com", - "phone": "765837638", - "mobile": "23456673", - "address": { - "address": "Av. Meridiana, 13", - "city": "Barcelona", - "postalCode": 3849, - "province": "Barcelona", - "country": "Spain", - "countryCode": "ES" + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "balance": { + "type": "integer" + }, + "accountNumber": { + "type": "integer" + }, + "iban": { + "type": "string" + }, + "swift": { + "type": "string" + }, + "bank": { + "type": "string" + }, + "bankname": { + "type": "string" + } } } } } } } - } + }, + "tags": ["SERVICES"] }, - "tags": ["WAREHOUSES"] - }, - "delete": { - "operationId": "Delete Warehouse", - "summary": "Delete Warehouse", - "responses": { - "200": { - "description": "", + "post": { + "operationId": "Create Service", + "summary": "Create Service", + "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" - } - } - } - } - } - } - }, - "tags": ["WAREHOUSES"] - } - }, - "/taxes": { - "get": { - "operationId": "getTaxes", - "summary": "Get Taxes", - "description": "Get all the taxes information for a specific account", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "amount": { "type": "string" }, - "scope": { "type": "string" }, - "key": { "type": "string" }, - "group": { "type": "string" }, - "type": { "type": "string" } - } - } - }, - "examples": { - "response": { - "value": [ - { - "name": "IVA 21%", - "amount": "21", - "scope": "sales", - "key": "s_iva_21", - "group": "iva", - "type": "percentage" - }, - { - "name": "IVA 10%", - "amount": "10", - "scope": "sales", - "key": "s_iva_10", - "group": "iva", - "type": "percentage" + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" } - ] - } - } - } - } - } - }, - "tags": ["TAXES"] - } - }, - "/treasury": { - "get": { - "operationId": "List Treasuries", - "summary": "List Treasuries Accounts", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "name": { "type": "string" }, - "type": { "type": "string" }, - "balance": { "type": "integer" }, - "accountNumber": { "type": "integer" }, - "iban": { "type": "string" }, - "swift": { "type": "string" }, - "bank": { "type": "string" }, - "bankname": { "type": "string" } + }, + "tax": { + "type": "number" + }, + "subtotal": { + "type": "integer" + }, + "salesChannelId": { + "type": "string" + }, + "cost": { + "type": "number" } } - }, - "examples": { - "response": { - "value": [ - { - "id": "5aba68b1c5d438006425ad45", - "name": "Abanca bank", - "type": "bank", - "balance": 0, - "accountNumber": 57200003, - "iban": "ES123456789", - "swift": "CAGLESMM", - "bank": "abanca", - "bankname": "Abanca" - }, - { - "id": "5aba68b1c5d2453654ad90", - "name": "ING bank", - "type": "bank", - "balance": 32435, - "accountNumber": 65305004, - "iban": "ES112345678", - "swift": "DSFGT", - "bank": "ing", - "bankname": "ING" - } - ] - } } } } - } - }, - "tags": ["TREASURIES"] + }, + "responses": { + "201": { + "description": "" + } + }, + "tags": ["SERVICES"] + } }, - "post": { - "operationId": "Create Treasury", - "summary": "Create Treasury Account", - "requestBody": { - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/bank-input" } + "/services/{serviceId}": { + "parameters": [ + { + "name": "serviceId", + "in": "path", + "required": true, + "schema": { + "type": "string" } } - }, - "responses": { - "201": { - "description": "dddd", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/bank-output-detailed" }, - "examples": { - "response": { "value": { "under": "development" } } - } - } + ], + "get": { + "operationId": "Get Service", + "summary": "Get Service", + "responses": { + "200": { + "description": "" } - } + }, + "tags": ["SERVICES"] }, - "tags": ["TREASURIES"] - } - }, - "/treasury/{treasuryId}": { - "parameters": [ - { - "name": "treasuryId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], - "get": { - "operationId": "Get Treasury", - "summary": "Get Treasury Account", - "responses": { - "200": { - "description": "", + "put": { + "operationId": "Update Service", + "summary": "Update Service", + "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "id": { "type": "string" }, - "name": { "type": "string" }, - "type": { "type": "string" }, - "balance": { "type": "integer" }, - "accountNumber": { "type": "integer" }, - "iban": { "type": "string" }, - "swift": { "type": "string" }, - "bank": { "type": "string" }, - "bankname": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "id": "5aba68b1c5d438006425ad45", - "name": "Abanca bank", - "type": "bank", - "balance": 0, - "accountNumber": 57200003, - "iban": "ES123456789", - "swift": "CAGLESMM", - "bank": "abanca", - "bankname": "Abanca" + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "tax": { + "type": "number" + }, + "subtotal": { + "type": "integer" + }, + "salesChannelId": { + "type": "string" + }, + "cost": { + "type": "number" } } } } } - } - }, - "tags": ["TREASURIES"] - } - }, - "/numberingseries/{type}": { - "get": { - "operationId": "Get Numbering Series", - "summary": "Get Numbering Series by Type", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "name": { "type": "string" }, - "format": { "type": "string" }, - "last": { "type": "integer" }, - "type": { "type": "string" } - } - } - }, - "examples": { - "response": { - "value": [ + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "title": "Bank Detailed Output", + "description": "The properties that are included when fetching a single Bank.", + "allOf": [ { - "id": "5a05cc6e60cea100094baf24", - "name": "Default", - "format": "F17%%%%", - "last": 6, - "type": "invoice" + "title": "Bank Basic Output", + "description": "The properties that are included when fetching a list of Banks.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Bank Common", + "description": "The properties that are shared amongst all versions of the Bank model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "balance": { + "type": "integer" + }, + "accountNumber": { + "type": "integer" + }, + "iban": { + "type": "string" + }, + "swift": { + "type": "string" + }, + "bank": { + "type": "string" + }, + "bankname": { + "type": "string" + } + }, + "x-readme-ref-name": "bank-common" + } + ], + "x-readme-ref-name": "bank-output" }, { - "id": "5ab12cd63697ac00d1489fe3", - "name": "nl SO", - "format": "SO[YY]%%%", - "last": 0, - "type": "salesOrder" + "type": "object", + "properties": {} } - ] + ], + "x-readme-ref-name": "bank-output-detailed" } } } } - } + }, + "tags": ["SERVICES"] }, - "tags": ["NUMBERING SERIES"] + "delete": { + "operationId": "Delete Service", + "summary": "Delete Service", + "responses": { + "200": { + "description": "" + } + }, + "tags": ["SERVICES"] + } + } + }, + "tags": [ + { + "name": "TREASURIES" + }, + { + "name": "CONTACTS" + }, + { + "name": "EXPENSES ACCOUNTS" + }, + { + "name": "NUMBERING SERIES" }, - "post": { - "operationId": "Create Numbering Serie", - "summary": "Create Numbering Serie", - "requestBody": { + { + "name": "PRODUCTS" + }, + { + "name": "SALES CHANNELS" + }, + { + "name": "WAREHOUSES" + }, + { + "name": "PAYMENTS" + }, + { + "name": "TAXES" + }, + { + "name": "DOCUMENTS" + } + ], + "security": [ + { + "Auth": [] + } + ], + "servers": [ + { + "url": "https://api.holded.com/api/invoicing/v1" + } + ], + "components": { + "responses": { + "Standard_Error": { + "description": "Something went wrong", "content": { "application/json": { "schema": { "type": "object", "properties": { - "name": { "type": "string" }, - "format": { "type": "string" }, - "last": { "type": "integer" }, - "type": { "type": "string" } - } - } - } - }, - "x-examples": { - "application/json": { - "name": "Default", - "format": "F17%%%%", - "last": 6, - "type": "invoice" - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "msg": { "type": "string" }, - "id": { "type": "string" } + "status": { + "type": "integer" + }, + "info": { + "type": "string" } - }, - "examples": { - "response": { - "value": { - "status": 1, - "msg": "Created", - "id": "4365gqrtg51446tg14f5" - } + } + }, + "examples": { + "response": { + "value": { + "status": 0, + "info": "Not found" } } } } } - }, - "tags": ["NUMBERING SERIES"] - }, - "parameters": [ - { - "name": "type", - "in": "path", - "required": true, - "schema": { "type": "string" } } - ] - }, - "/numberingseries/{type}/{numberingSeriesId}": { - "parameters": [ - { - "name": "type", - "in": "path", - "required": true, - "schema": { "type": "string" } - }, - { - "name": "numberingSeriesId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], - "put": { - "operationId": "Update Numbering Serie", - "summary": "Update Numbering Serie", - "requestBody": { + }, + "requestBodies": { + "Create_ServiceBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "name": { "type": "string" }, - "format": { "type": "string" }, - "last": { "type": "string" } - } - } - } - }, - "x-examples": { - "application/json": { - "name": "Default", - "format": "receipt", - "last": "ff01" - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5ac4f2cec839ea004e18a463" + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" } + }, + "tax": { + "type": "number" + }, + "subtotal": { + "type": "integer" + }, + "salesChannelId": { + "type": "string" + }, + "cost": { + "type": "number" } } } } } - }, - "tags": ["NUMBERING SERIES"] + } }, - "delete": { - "operationId": "Delete Numbering Serie", - "summary": "Delete Numbering Serie", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "msg": { "type": "string" }, - "id": { "type": "integer" } - } + "securitySchemes": { + "Auth": { + "type": "apiKey", + "name": "key", + "in": "header" + } + }, + "schemas": { + "contact-common": { + "title": "Contact Common", + "description": "The properties that are shared amongst all versions of the Contact model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "customId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "tradeName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "mobile": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "type": { + "type": "string" + }, + "iban": { + "type": "string" + }, + "swift": { + "type": "string" + }, + "clientRecord": { + "type": "integer" + }, + "supplierRecord": { + "type": "integer" + }, + "billAddress": { + "type": "object", + "properties": { + "address": { + "type": "string" }, - "examples": { - "response": { - "value": { - "status": 1, - "msg": "Successfully deleted", - "id": 484 - } - } + "city": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "province": { + "type": "string" + }, + "country": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "info": { + "type": "string" } } - } - } - }, - "tags": ["NUMBERING SERIES"] - } - }, - "/expensesaccounts": { - "get": { - "operationId": "List Expenses Accounts", - "summary": "List Expenses Accounts", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "name": { "type": "string" }, - "desc": { "type": "string" }, - "color": { "type": "string" }, - "accNum": { "type": "integer" } - } + }, + "defaults": { + "type": "object", + "properties": { + "salesChannel": { + "type": "integer" }, - "examples": { - "response": { - "value": { - "id": "5aaf8c5f3697ac001f676082", - "name": "Exp Account main", - "desc": "My main expeses account dude", - "color": "#2C0934", - "accNum": 60000001 - } - } + "expensesAccount": { + "type": "integer" + }, + "dueDays": { + "type": "integer" + }, + "paymentMethod": { + "type": "integer" + }, + "discount": { + "type": "integer" + }, + "language": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "tax": { + "type": "string" + }, + "retention": { + "type": "string" } } - } - } - }, - "tags": ["EXPENSES ACCOUNTS"], - "description": "List all your expenses accounts." - }, - "post": { - "operationId": "Create Expenses Account", - "summary": "Create Expenses Account", - "requestBody": { - "content": { - "application/json": { - "schema": { + }, + "socialNetworks": { + "type": "object", + "properties": { + "website": { + "type": "string" + } + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "notes": { + "type": "array", + "items": { "type": "object", "properties": { - "name": { "type": "string" }, - "desc": { "type": "string" }, - "accountNum": { "type": "integer" } - }, - "required": ["name", "desc", "accountNum"] - } - } - }, - "x-examples": { - "application/json": { - "name": "Alt exp account", - "desc": "My second expenses account" - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Created", - "id": "5ac4f2cec839ea004e18a463" - } + "noteId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "updatedAt": { + "type": "integer" + }, + "userId": { + "type": "string" } } } - } - } - }, - "tags": ["EXPENSES ACCOUNTS"], - "description": "Create an expenses account." - } - }, - "/expensesaccounts/{expensesAccountId}": { - "parameters": [ - { - "name": "expensesAccountId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], - "get": { - "operationId": "Get Expenses Account", - "summary": "Get Expenses Account", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "name": { "type": "string" }, - "desc": { "type": "string" }, - "color": { "type": "string" }, - "accNum": { "type": "integer" } - } - }, - "examples": { - "response": { - "value": { - "id": "5aaf8c5f3697ac001f676082", - "name": "Exp Account", - "desc": "My main expenses accoun", - "color": "#2C0934", - "accNum": 60000001 - } + }, + "contactPersons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "personId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "job": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sendDocumentsByDefault": { + "type": "boolean" + }, + "linkedin": { + "type": "string" } } } - } - } - }, - "tags": ["EXPENSES ACCOUNTS"], - "description": "Get a specific expenses account." - }, - "put": { - "operationId": "Update Expenses Account", - "summary": "Update Expenses Account", - "requestBody": { - "content": { - "application/json": { - "schema": { + }, + "shippingAddresses": { + "type": "array", + "items": { "type": "object", "properties": { - "name": { "type": "string" }, - "desc": { "type": "string" }, - "color": { "type": "string" } + "shippingId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "province": { + "type": "string" + }, + "country": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "notes": { + "type": "string" + }, + "privateNotes": { + "type": "string" + } } } } }, - "x-examples": { - "application/json": { - "name": "New Exp Account", - "desc": "My fnew exp account", - "color": "#2C0934" - } - } + "x-readme-ref-name": "contact-common" }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { + "contact-input": { + "title": "Contact Input", + "description": "The properties that are allowed when creating or updating a Contact.", + "allOf": [ + { + "title": "Contact Common", + "description": "The properties that are shared amongst all versions of the Contact model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "customId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "tradeName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "mobile": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "type": { + "type": "string" + }, + "iban": { + "type": "string" + }, + "swift": { + "type": "string" + }, + "clientRecord": { + "type": "integer" + }, + "supplierRecord": { + "type": "integer" + }, + "billAddress": { "type": "object", "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } + "address": { + "type": "string" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "province": { + "type": "string" + }, + "country": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "info": { + "type": "string" + } } }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5ac4f2cec839ea004e18a463" + "defaults": { + "type": "object", + "properties": { + "salesChannel": { + "type": "integer" + }, + "expensesAccount": { + "type": "integer" + }, + "dueDays": { + "type": "integer" + }, + "paymentMethod": { + "type": "integer" + }, + "discount": { + "type": "integer" + }, + "language": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "tax": { + "type": "string" + }, + "retention": { + "type": "string" } } - } - } - } - } - }, - "tags": ["EXPENSES ACCOUNTS"], - "description": "Update a specific expenses account." - }, - "delete": { - "operationId": "Delete Expenses account", - "summary": "Delete Expenses Account", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { + }, + "socialNetworks": { "type": "object", "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } + "website": { + "type": "string" + } } }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" - } + "tags": { + "type": "array", + "items": { + "type": "string" } - } - } - } - } - }, - "tags": ["EXPENSES ACCOUNTS"], - "description": "Delete a specific expenses account." - } - }, - "/saleschannels": { - "get": { - "operationId": "List Sales Channels", - "summary": "List Sales Channels", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { + }, + "notes": { "type": "array", "items": { "type": "object", "properties": { - "id": { "type": "string" }, - "name": { "type": "string" }, - "desc": { "type": "string" }, - "color": { "type": "string" }, - "accNum": { "type": "integer" } - } - } - }, - "examples": { - "response": { - "value": [ - { - "id": "5aba667fc5d438006425ad44", - "name": "My brand new sales channel", - "desc": "Main income", - "color": "#507C6C", - "accNum": 700002 + "noteId": { + "type": "string" }, - { - "id": "5aba667fc5d438006425ad44", - "name": "My second brand new channel", - "desc": "Second income stream", - "color": "#507C6C", - "accNum": null + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "updatedAt": { + "type": "integer" + }, + "userId": { + "type": "string" } - ] + } } - } - } - } - } - }, - "tags": ["SALES CHANNELS"] - }, - "post": { - "operationId": "Create Sales Channel", - "summary": "Create Sales Channel", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "desc": { "type": "string" }, - "accountNum": { "type": "integer" } }, - "required": ["name", "desc", "accountNum"] - } - } - }, - "x-examples": { - "application/json": { - "name": "My brand new sales channel", - "desc": "Main income" - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } + "contactPersons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "personId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "job": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sendDocumentsByDefault": { + "type": "boolean" + }, + "linkedin": { + "type": "string" + } + } } }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Created", - "id": "5ac4f2cec839ea004e18a463" + "shippingAddresses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "shippingId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "province": { + "type": "string" + }, + "country": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "notes": { + "type": "string" + }, + "privateNotes": { + "type": "string" + } } } } - } + }, + "x-readme-ref-name": "contact-common" + }, + { + "type": "object", + "properties": {} } - } + ], + "x-readme-ref-name": "contact-input" }, - "tags": ["SALES CHANNELS"] - } - }, - "/saleschannels/{salesChannelId}": { - "parameters": [ - { - "name": "salesChannelId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], - "get": { - "operationId": "Get Sales Channel", - "summary": "Get Sales Channel", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { + "contact-output": { + "title": "Contact Basic Output", + "description": "The properties that are included when fetching a list of Contacts.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Contact Common", + "description": "The properties that are shared amongst all versions of the Contact model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "customId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "tradeName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "mobile": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "type": { + "type": "string" + }, + "iban": { + "type": "string" + }, + "swift": { + "type": "string" + }, + "clientRecord": { + "type": "integer" + }, + "supplierRecord": { + "type": "integer" + }, + "billAddress": { "type": "object", "properties": { - "id": { "type": "string" }, - "name": { "type": "string" }, - "desc": { "type": "string" }, - "color": { "type": "string" }, - "accNum": { "type": "integer" } - } - }, - "examples": { - "response": { - "value": { - "id": "5aba667fc5d438006425ad44", - "name": "My second brand new channel", - "desc": "Second income stream", - "color": "#507C6C", - "accNum": null + "address": { + "type": "string" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "province": { + "type": "string" + }, + "country": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "info": { + "type": "string" } } - } - } - } - } - }, - "tags": ["SALES CHANNELS"] - }, - "put": { - "operationId": "Update Sales Channel", - "summary": "Update Sales Channel", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "desc": { "type": "string" }, - "color": { "type": "string" } - } - } - } - }, - "x-examples": { - "application/json": { - "name": "My second brand new channel", - "desc": "Second income stream modified", - "color": "#507C6C" - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { + }, + "defaults": { "type": "object", "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5ac4f2cec839ea004e18a463" + "salesChannel": { + "type": "integer" + }, + "expensesAccount": { + "type": "integer" + }, + "dueDays": { + "type": "integer" + }, + "paymentMethod": { + "type": "integer" + }, + "discount": { + "type": "integer" + }, + "language": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "tax": { + "type": "string" + }, + "retention": { + "type": "string" } } - } - } - } - } - }, - "tags": ["SALES CHANNELS"] - }, - "delete": { - "operationId": "Delete Sales Channel", - "summary": "Delete Sales Channel", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { + }, + "socialNetworks": { "type": "object", "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } + "website": { + "type": "string" + } + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" } }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" + "notes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "noteId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "updatedAt": { + "type": "integer" + }, + "userId": { + "type": "string" + } } } - } - } - } - } - }, - "tags": ["SALES CHANNELS"] - } - }, - "/payments": { - "get": { - "parameters": [ - { - "name": "starttmp", - "in": "query", - "description": "Starting timestamp", - "schema": { "type": "string" } - }, - { - "name": "endtmp", - "in": "query", - "description": "Ending timestamp", - "schema": { "type": "string" } - } - ], - "operationId": "List Payments", - "summary": "List Payments", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { + }, + "contactPersons": { "type": "array", "items": { "type": "object", "properties": { - "id": { "type": "string" }, - "bankId": { "type": "string" }, - "contactId": { "type": "string" }, - "contactName": { "type": "string" }, - "amount": { "type": "integer" }, - "desc": { "type": "string" }, - "date": { "type": "integer" } + "personId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "job": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sendDocumentsByDefault": { + "type": "boolean" + }, + "linkedin": { + "type": "string" + } } } }, - "examples": { - "response": { - "value": [ - { - "id": "5aaa81685b7064004342fd82", - "bankId": "", - "contactId": "", - "contactName": "", - "amount": 100, - "desc": "Gift", - "date": 1521068400 + "shippingAddresses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "shippingId": { + "type": "string" }, - { - "id": "5aaa82455b7064004e0bbd02", - "bankId": "5aaa82095b70640046270413", - "contactId": "5aaa65e05b706400300ad246", - "contactName": "Benedicto", - "amount": 355, - "desc": "Invoice F17003421", - "date": 1520982000 + "name": { + "type": "string" }, - { - "id": "5ab4f6f61d6d820023411433", - "bankId": "5aaf71763697ac000a0b34d3", - "contactId": "5aa939a95b70640009653d72", - "contactName": "Bose QC", - "amount": 290, - "desc": "Invoice F170001 ", - "date": 1521759600 + "address": { + "type": "string" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "province": { + "type": "string" + }, + "country": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "notes": { + "type": "string" + }, + "privateNotes": { + "type": "string" + } + } + } + } + }, + "x-readme-ref-name": "contact-common" + } + ], + "x-readme-ref-name": "contact-output" + }, + "contact-output-detailed": { + "title": "Contact Detailed Output", + "description": "The properties that are included when fetching a single Contact.", + "allOf": [ + { + "title": "Contact Basic Output", + "description": "The properties that are included when fetching a list of Contacts.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Contact Common", + "description": "The properties that are shared amongst all versions of the Contact model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "customId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "tradeName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "mobile": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "type": { + "type": "string" + }, + "iban": { + "type": "string" + }, + "swift": { + "type": "string" + }, + "clientRecord": { + "type": "integer" + }, + "supplierRecord": { + "type": "integer" + }, + "billAddress": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "province": { + "type": "string" + }, + "country": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "info": { + "type": "string" + } + } + }, + "defaults": { + "type": "object", + "properties": { + "salesChannel": { + "type": "integer" + }, + "expensesAccount": { + "type": "integer" + }, + "dueDays": { + "type": "integer" + }, + "paymentMethod": { + "type": "integer" + }, + "discount": { + "type": "integer" + }, + "language": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "tax": { + "type": "string" + }, + "retention": { + "type": "string" + } + } + }, + "socialNetworks": { + "type": "object", + "properties": { + "website": { + "type": "string" + } + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "notes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "noteId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + }, + "updatedAt": { + "type": "integer" + }, + "userId": { + "type": "string" + } + } + } + }, + "contactPersons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "personId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "job": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sendDocumentsByDefault": { + "type": "boolean" + }, + "linkedin": { + "type": "string" + } + } + } + }, + "shippingAddresses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "shippingId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "province": { + "type": "string" + }, + "country": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "notes": { + "type": "string" + }, + "privateNotes": { + "type": "string" + } + } } - ] - } + } + }, + "x-readme-ref-name": "contact-common" } - } + ], + "x-readme-ref-name": "contact-output" + }, + { + "type": "object", + "properties": {} } - } + ], + "x-readme-ref-name": "contact-output-detailed" }, - "tags": ["PAYMENTS"] - }, - "post": { - "operationId": "Create Payment", - "summary": "Create Payment", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "bankId": { "type": "string" }, - "contactId": { "type": "string" }, - "amount": { "type": "number" }, - "desc": { "type": "string" }, - "date": { "type": "integer" } - } + "product-common": { + "title": "Product Common", + "description": "The properties that are shared amongst all versions of the Product model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "typeId": { + "type": "string" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "price": { + "type": "integer" + }, + "tax": { + "type": "integer" + }, + "total": { + "type": "number" + }, + "rates": { + "type": "array", + "items": { + "type": "object" } - } - }, - "x-examples": { - "application/json": { - "bankId": "5aaa82095b70640046270413", - "contactId": "5aaa65e05b706400300ad246", - "amount": 355, - "desc": "Invoice F17003421", - "date": 1520982000 - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Created", - "id": "5ac4f2cec839ea004e18a463" - } - } - } + }, + "hasStock": { + "type": "integer" + }, + "stock": { + "type": "integer" + }, + "barcode": { + "type": "string" + }, + "sku": { + "type": "string" + }, + "cost": { + "type": "integer" + }, + "purchasePrice": { + "type": "number" + }, + "weight": { + "type": "number" + }, + "tags": { + "type": "array", + "items": { + "type": "string" } - } - } - }, - "tags": ["PAYMENTS"] - } - }, - "/payments/{paymentId}": { - "parameters": [ - { - "name": "paymentId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], - "get": { - "operationId": "Get Payment", - "summary": "Get Payment", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "bankId": { "type": "string" }, - "contactId": { "type": "string" }, - "contactName": { "type": "string" }, - "amount": { "type": "integer" }, - "desc": { "type": "string" }, - "date": { "type": "integer" } - } - }, - "examples": { - "response": { - "value": { - "id": "5ab4f6f61d6d820023411433", - "bankId": "5aaf71763697ac000a0b34d3", - "contactId": "5aa939a95b70640009653d72", - "contactName": "Bose QC", - "amount": 290, - "desc": "Invoice F170001 ", - "date": 1521759600 - } - } - } + }, + "categoryId": { + "type": "string" + }, + "factoryCode": { + "type": "string" + }, + "attributes": { + "type": "array", + "items": { + "type": "object" } - } - } - }, - "tags": ["PAYMENTS"] - }, - "put": { - "operationId": "Update Payment", - "summary": "Update Payment", - "requestBody": { - "content": { - "application/json": { - "schema": { + }, + "forSale": { + "type": "integer" + }, + "forPurchase": { + "type": "integer" + }, + "salesChannelId": { + "type": "string" + }, + "expAccountId": { + "type": "string" + }, + "warehouseId": { + "type": "string" + }, + "variants": { + "type": "array", + "items": { "type": "object", "properties": { - "bankId": { "type": "string" }, - "contactId": { "type": "string" }, - "amount": { "type": "integer" }, - "desc": { "type": "string" }, - "date": { "type": "integer" } + "id": { + "type": "string" + }, + "barcode": { + "type": "string" + }, + "sku": { + "type": "string" + }, + "price": { + "type": "integer" + }, + "cost": { + "type": "integer" + }, + "purchasePrice": { + "type": "number" + }, + "stock": { + "type": "integer" + } } } } }, - "x-examples": { - "application/json": { - "bankId": "5aaf71763697ac000a0b34d3", - "contactId": "5aa939a95b70640009653d72", - "amount": 290, - "desc": "Invoice F170001 ", - "date": 1521759600 - } - } + "x-readme-ref-name": "product-common" }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } + "product-input": { + "title": "Product Input", + "description": "The properties that are allowed when creating or updating a Product.", + "allOf": [ + { + "title": "Product Common", + "description": "The properties that are shared amongst all versions of the Product model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "typeId": { + "type": "string" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "price": { + "type": "integer" + }, + "tax": { + "type": "integer" + }, + "total": { + "type": "number" + }, + "rates": { + "type": "array", + "items": { + "type": "object" } }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5aba68b1c5d438006425ad45" - } + "hasStock": { + "type": "integer" + }, + "stock": { + "type": "integer" + }, + "barcode": { + "type": "string" + }, + "sku": { + "type": "string" + }, + "cost": { + "type": "integer" + }, + "purchasePrice": { + "type": "number" + }, + "weight": { + "type": "number" + }, + "tags": { + "type": "array", + "items": { + "type": "string" } - } - } - } - } - }, - "tags": ["PAYMENTS"] - }, - "delete": { - "operationId": "Delete Payment", - "summary": "Delete Payment", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } + }, + "categoryId": { + "type": "string" + }, + "factoryCode": { + "type": "string" + }, + "attributes": { + "type": "array", + "items": { + "type": "object" } }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" + "forSale": { + "type": "integer" + }, + "forPurchase": { + "type": "integer" + }, + "salesChannelId": { + "type": "string" + }, + "expAccountId": { + "type": "string" + }, + "warehouseId": { + "type": "string" + }, + "variants": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "barcode": { + "type": "string" + }, + "sku": { + "type": "string" + }, + "price": { + "type": "integer" + }, + "cost": { + "type": "integer" + }, + "purchasePrice": { + "type": "number" + }, + "stock": { + "type": "integer" + } } } } - } + }, + "x-readme-ref-name": "product-common" + }, + { + "type": "object", + "properties": {} } - } + ], + "x-readme-ref-name": "product-input" }, - "tags": ["PAYMENTS"] - } - }, - "/documents/{docType}": { - "parameters": [ - { - "name": "docType", - "in": "path", - "required": true, - "description": "docType should be one of: {invoice, salesreceipt, creditnote, salesorder, proform, waybill,estimate, purchase, purchaseorder or purchaserefund}", - "schema": { "type": "string" } - } - ], - "get": { - "parameters": [ - { - "name": "docType", - "in": "path", - "required": true, - "description": "docType should be one of: {invoice, salesreceipt, creditnote, salesorder, proform, waybill,estimate, purchase, purchaseorder or purchaserefund}", - "schema": { "type": "string" } - }, - { - "name": "starttmp", - "in": "query", - "description": "Starting timestamp", - "schema": { "type": "string" } - }, - { - "name": "endtmp", - "in": "query", - "description": "Ending timestamp", - "schema": { "type": "string" } - }, - { - "name": "contactid", - "in": "query", - "description": "Filtering by contact Id", - "schema": { "type": "string" } - }, - { - "name": "paid", - "in": "query", - "description": "Filtering by paid status. 0 = not paid, 1 = paid, 2 = partially paid", - "schema": { "type": "string" } - }, - { - "name": "billed", - "in": "query", - "description": "Filtering by billed status. 0 = not billed, 1 = billed", - "schema": { "type": "string" } - }, - { - "name": "sort", - "in": "query", - "description": "Sort documents. Options: `created-asc` to sort by creation date of documents in ascending order or `created-desc` to sort by creation date of documents in descending order", - "schema": { "type": "string" } - } - ], - "operationId": "List Documents", - "summary": "List Documents", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { + "product-output": { + "title": "Product Basic Output", + "description": "The properties that are included when fetching a list of Products.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Product Common", + "description": "The properties that are shared amongst all versions of the Product model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "typeId": { + "type": "string" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "price": { + "type": "integer" + }, + "tax": { + "type": "integer" + }, + "total": { + "type": "number" + }, + "rates": { "type": "array", - "items": { "$ref": "#/components/schemas/document-output" } + "items": { + "type": "object" + } }, - "examples": { "response": { "value": {} } } - }, - "new": { - "examples": { - "response": { - "value": [ - { - "id": "5ab391071d6d820034294783", - "contact": "5aa939a95b70640009653d72", - "contactName": "Mapple Inc", - "desc": "description goes here", - "date": 1521673200, - "dueDate": 1521673200, - "notes": "notes go here", - "products": [ - { - "name": "Headphone", - "desc": "Best headphones you can buy", - "price": 299, - "units": 1, - "tax": 21, - "discount": 0, - "retention": 0, - "weight": 200, - "costPrice": 110, - "sku": "21324t1gv", - "productId": "5acccbe412d56e004903a385#5acccbe412d56e004903a384" - } - ], - "tax": 234.61, - "subtotal": 1117.18, - "discount": 0, - "total": 1351.79, - "language": "en", - "status": 2, - "customFields": [ - { "field": "FieldOne", "value": "noValue" } - ], - "docNumber": "F170001", - "currency": "eur", - "currencyChange": 1, - "paymentsTotal": 290, - "paymentsPending": 1061.79, - "paymentsRefunds": 0, - "salesChannelId": "5aba667fc5d438006425ad44" - } - ] + "hasStock": { + "type": "integer" + }, + "stock": { + "type": "integer" + }, + "barcode": { + "type": "string" + }, + "sku": { + "type": "string" + }, + "cost": { + "type": "integer" + }, + "purchasePrice": { + "type": "number" + }, + "weight": { + "type": "number" + }, + "tags": { + "type": "array", + "items": { + "type": "string" } - } - } - } - } - }, - "tags": ["DOCUMENTS"], - "description": "Get all your documents by type." - }, - "post": { - "operationId": "Create Document", - "summary": "Create Document", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "applyContactDefaults": { - "type": "boolean", - "description": "Contact defaults are applied by default. If you don't want to apply it, set this field to false" - }, - "contactCode": { - "type": "string", - "description": "(NIF / CIF / VAT) Field required if you want to choose an existing contact and contactId field is empty" - }, - "contactId": { - "type": "string", - "description": "(Contact ID) Field required if you want to choose an existing contact and contactCode field is empty" - }, - "contactName": { - "type": "string", - "description": "Field required if contactCode and contactId fields are empty and you want to create a new contact" - }, - "contactEmail": { "type": "string" }, - "contactAddress": { "type": "string" }, - "contactCity": { "type": "string" }, - "contactCp": { "type": "string" }, - "contactProvince": { "type": "string" }, - "contactCountryCode": { "type": "string" }, - "desc": { "type": "string" }, - "date": { "type": "integer" }, - "notes": { "type": "string" }, - "salesChannelId": { - "type": "string", - "description": "Set an existing account id" - }, - "paymentMethodId": { "type": "string" }, - "designId": { "type": "string" }, - "language": { "type": "string" }, - "warehouseId": { - "type": "string", - "description": "Choose the warehouse for your salesorder, purchaseorder or waybill." - }, - "approveDoc": { - "type": "boolean", - "description": "Choose if the document needs to be approved or not. The default option is False." - }, + }, + "categoryId": { + "type": "string" + }, + "factoryCode": { + "type": "string" + }, + "attributes": { + "type": "array", "items": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "desc": { "type": "string" }, - "units": { "type": "number" }, - "sku": { "type": "string" }, - "serviceId": { "type": "string" }, - "accountingAccountId": { "type": "string" }, - "subtotal": { "type": "number" }, - "discount": { "type": "number" }, - "tax": { - "type": "integer", - "description": "IVA percentage. In case you need to inform more than one tax, use the field taxes instead" - }, - "taxes": { - "type": "array", - "description": "Comma separated Tax keys. e.g. (s_iva_21,s_ret_19)", - "items": { "type": "string" } - }, - "supplied": { - "type": "string", - "description": "Optional (Yes/No)" - }, - "tags": { "type": "array", "items": { "type": "string" } } - } - } - }, - "customFields": { - "type": "array", - "items": { - "type": "object", - "properties": { - "field": { "type": "string" }, - "value": { "type": "string" } - } - } - }, - "invoiceNum": { "type": "string" }, - "numSerieId": { "type": "string" }, - "currency": { "type": "string" }, - "currencyChange": { "type": "number" }, - "tags": { "type": "array", "items": { "type": "string" } }, - "dueDate": { "type": "integer" }, - "shippingAddress": { "type": "string" }, - "shippingPostalCode": { "type": "string" }, - "shippingCity": { "type": "string" }, - "shippingProvince": { "type": "string" }, - "shippingCountry": { "type": "string" }, - "salesChannel": { "type": "number" } - }, - "required": ["date"] - } - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/document-output-detailed" + "type": "object" + } + }, + "forSale": { + "type": "integer" + }, + "forPurchase": { + "type": "integer" + }, + "salesChannelId": { + "type": "string" }, - "examples": { - "response": { - "value": { - "status": 1, - "id": "5acce41e12d56e005e0e62d3", - "invoiceNum": "F170009", - "contactId": "5ac3a7b68fbd9d000f07e237" + "expAccountId": { + "type": "string" + }, + "warehouseId": { + "type": "string" + }, + "variants": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "barcode": { + "type": "string" + }, + "sku": { + "type": "string" + }, + "price": { + "type": "integer" + }, + "cost": { + "type": "integer" + }, + "purchasePrice": { + "type": "number" + }, + "stock": { + "type": "integer" + } } } } - } - } - } - }, - "tags": ["DOCUMENTS"], - "description": "Create a new document type." - } - }, - "/documents/{docType}/{documentId}": { - "parameters": [ - { - "name": "docType", - "in": "path", - "required": true, - "schema": { "type": "string" } - }, - { - "name": "documentId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], - "get": { - "operationId": "getDocument", - "summary": "Get Document", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/document-output-detailed" - } - } + }, + "x-readme-ref-name": "product-common" } - } + ], + "x-readme-ref-name": "product-output" }, - "tags": ["DOCUMENTS"], - "description": "Get a specific document." - }, - "put": { - "operationId": "Update Document", - "summary": "Update Document", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "desc": { "type": "string" }, - "notes": { "type": "string" }, - "language": { "type": "string" }, - "date": { "type": "integer" }, - "paymentMethod": { "type": "string" }, - "warehouseId": { - "type": "string", - "description": "Choose the warehouse for your salesorder, purchaseorder or waybill." - }, - "items": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "desc": { "type": "string" }, - "subtotal": { "type": "integer" }, - "tax": { "type": "integer" }, - "tags": { - "type": "array", - "items": { "type": "string" } - }, - "units": { "type": "integer" }, - "discount": { "type": "integer" }, - "accountingAccountId": { "type": "string" }, - "kind": { "type": "string" }, - "sku": { "type": "string" }, - "lotSku": { "type": "string" }, - "supplied": { - "type": "string", - "description": "Optional (Yes/No)" + "product-output-detailed": { + "title": "Product Detailed Output", + "description": "The properties that are included when fetching a single Product.", + "allOf": [ + { + "title": "Product Basic Output", + "description": "The properties that are included when fetching a list of Products.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Product Common", + "description": "The properties that are shared amongst all versions of the Product model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "typeId": { + "type": "string" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "price": { + "type": "integer" + }, + "tax": { + "type": "integer" + }, + "total": { + "type": "number" + }, + "rates": { + "type": "array", + "items": { + "type": "object" + } + }, + "hasStock": { + "type": "integer" + }, + "stock": { + "type": "integer" + }, + "barcode": { + "type": "string" + }, + "sku": { + "type": "string" + }, + "cost": { + "type": "integer" + }, + "purchasePrice": { + "type": "number" + }, + "weight": { + "type": "number" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "categoryId": { + "type": "string" + }, + "factoryCode": { + "type": "string" + }, + "attributes": { + "type": "array", + "items": { + "type": "object" + } + }, + "forSale": { + "type": "integer" + }, + "forPurchase": { + "type": "integer" + }, + "salesChannelId": { + "type": "string" + }, + "expAccountId": { + "type": "string" + }, + "warehouseId": { + "type": "string" + }, + "variants": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "barcode": { + "type": "string" + }, + "sku": { + "type": "string" + }, + "price": { + "type": "integer" + }, + "cost": { + "type": "integer" + }, + "purchasePrice": { + "type": "number" + }, + "stock": { + "type": "integer" + } } } } }, - "salesChannelId": { "type": "string" }, - "expAccountId": { "type": "string" }, - "customFields": { - "type": "array", - "items": { - "type": "object", - "properties": { - "field": { "type": "string" }, - "value": { "type": "string" } - } - } - } - } - } - } - }, - "x-examples": { - "application/json": { - "desc": "description goes here", - "notes": "notes goes here", - "language": "es", - "date": 15243534, - "paymentMethod": "3243546", - "products": [ - { - "name": "item name", - "desc": "item desc", - "subtotal": 344, - "tax": 21, - "units": 3, - "discount": 0 + "x-readme-ref-name": "product-common" } ], - "salesChannelId": "345463o5hj432kjb4o23n1l5j5", - "expAccountId": "345463o5hj43n1l5jowr3onb5" + "x-readme-ref-name": "product-output" + }, + { + "type": "object", + "properties": {} } - } + ], + "x-readme-ref-name": "product-output-detailed" }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } + "warehouse-common": { + "title": "Warehouse Common", + "description": "The properties that are shared amongst all versions of the Warehouse model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "mobile": { + "type": "string" + }, + "address": { + "type": "object", + "properties": { + "address": { + "type": "string" }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5ac4f2cec839ea004e18a463" - } - } + "city": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "province": { + "type": "string" + }, + "country": { + "type": "string" + }, + "countryCode": { + "type": "string" } } + }, + "default": { + "type": "boolean" + }, + "warehouseRecord": { + "type": "integer" } - } + }, + "x-readme-ref-name": "warehouse-common" }, - "tags": ["DOCUMENTS"], - "description": "Update a specific document. {lotSku} field is only needed when {kind} is lots." - }, - "delete": { - "operationId": "Delete Document", - "summary": "Delete Document", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" + "warehouse-input": { + "title": "Warehouse Input", + "description": "The properties that are allowed when creating or updating a Warehouse.", + "allOf": [ + { + "title": "Warehouse Common", + "description": "The properties that are shared amongst all versions of the Warehouse model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "mobile": { + "type": "string" + }, + "address": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "province": { + "type": "string" + }, + "country": { + "type": "string" + }, + "countryCode": { + "type": "string" } } + }, + "default": { + "type": "boolean" + }, + "warehouseRecord": { + "type": "integer" } - } + }, + "x-readme-ref-name": "warehouse-common" + }, + { + "type": "object", + "properties": {} } - } - }, - "tags": ["DOCUMENTS"], - "description": "Delete specific document type." - } - }, - "/documents/{docType}/{documentId}/pay": { - "parameters": [ - { - "name": "docType", - "in": "path", - "required": true, - "schema": { "type": "string" } + ], + "x-readme-ref-name": "warehouse-input" }, - { - "name": "documentId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], - "post": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { + "warehouse-output": { + "title": "Warehouse Basic Output", + "description": "The properties that are included when fetching a list of Warehouses.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Warehouse Common", + "description": "The properties that are shared amongst all versions of the Warehouse model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "mobile": { + "type": "string" + }, + "address": { "type": "object", "properties": { - "status": { "type": "integer" }, - "invoiceId": { "type": "string" }, - "invoiceNum": { "type": "string" }, - "paymentId": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "invoiceId": "13f14gl5i46ñ5b64vp1535", - "invoiceNum": "F170007", - "paymentId": "3245bkjblhj3v2k6vl4bhbv145b" + "address": { + "type": "string" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "province": { + "type": "string" + }, + "country": { + "type": "string" + }, + "countryCode": { + "type": "string" } } + }, + "default": { + "type": "boolean" + }, + "warehouseRecord": { + "type": "integer" } - } + }, + "x-readme-ref-name": "warehouse-common" } - } + ], + "x-readme-ref-name": "warehouse-output" }, - "operationId": "Pay Document", - "summary": "Pay Document", - "tags": ["DOCUMENTS"], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "date": { "type": "integer" }, - "treasury": { - "type": "string", - "description": "Your treasury holded's id" - }, - "desc": { "type": "string" }, - "amount": { "type": "number" } + "warehouse-output-detailed": { + "title": "Warehouse Detailed Output", + "description": "The properties that are included when fetching a single Warehouse.", + "allOf": [ + { + "title": "Warehouse Basic Output", + "description": "The properties that are included when fetching a list of Warehouses.", + "allOf": [ + { + "type": "object", + "properties": {} }, - "required": ["date", "amount"] - } - } - }, - "x-examples": { - "application/json": { - "date": 1513245364, - "treasury": "4156257683", - "desc": "description", - "amount": 345 - } - } - }, - "description": "Pay one specific document" - } - }, - "/documents/{docType}/{documentId}/send": { - "post": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { + { + "title": "Warehouse Common", + "description": "The properties that are shared amongst all versions of the Warehouse model.", "type": "object", "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { "status": 1, "info": "Document sent" } - } + "id": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "mobile": { + "type": "string" + }, + "address": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "province": { + "type": "string" + }, + "country": { + "type": "string" + }, + "countryCode": { + "type": "string" + } + } + }, + "default": { + "type": "boolean" + }, + "warehouseRecord": { + "type": "integer" + } + }, + "x-readme-ref-name": "warehouse-common" } - } + ], + "x-readme-ref-name": "warehouse-output" + }, + { + "type": "object", + "properties": {} } - } + ], + "x-readme-ref-name": "warehouse-output-detailed" }, - "operationId": "Send Document", - "summary": "Send Document", - "tags": ["DOCUMENTS"], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": ["emails"], - "properties": { - "mailTemplateId": { "type": "string" }, - "emails": { "type": "string" }, - "subject": { - "type": "string", - "minLength": 10, - "description": "Minimum 10 characters" - }, - "message": { - "type": "string", - "minLength": 20, - "description": "Minimum 20 characters" - }, - "docIds": { "type": "string" } - } - } + "bank-common": { + "title": "Bank Common", + "description": "The properties that are shared amongst all versions of the Bank model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "balance": { + "type": "integer" + }, + "accountNumber": { + "type": "integer" + }, + "iban": { + "type": "string" + }, + "swift": { + "type": "string" + }, + "bank": { + "type": "string" + }, + "bankname": { + "type": "string" } }, - "x-examples": { - "application/json": { - "mailTemplateId": "456lkn5er467522115", - "emails": "email@example.com, email2@example.com", - "subject": "subject email", - "message": "email messages goes here", - "docIds": "" - } - } + "x-readme-ref-name": "bank-common" }, - "description": "Send a specific document by email." - }, - "parameters": [ - { - "name": "docType", - "in": "path", - "required": true, - "schema": { "type": "string" } - }, - { - "name": "documentId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ] - }, - "/documents/{docType}/{documentId}/pdf": { - "get": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" } - } + "bank-input": { + "title": "Bank Input", + "description": "The properties that are allowed when creating or updating a Bank.", + "allOf": [ + { + "title": "Bank Common", + "description": "The properties that are shared amongst all versions of the Bank model.", + "type": "object", + "properties": { + "id": { + "type": "string" }, - "examples": { - "response": { - "value": { - "status": 1, - "data": "<>" - } - } + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "balance": { + "type": "integer" + }, + "accountNumber": { + "type": "integer" + }, + "iban": { + "type": "string" + }, + "swift": { + "type": "string" + }, + "bank": { + "type": "string" + }, + "bankname": { + "type": "string" } - } + }, + "x-readme-ref-name": "bank-common" + }, + { + "type": "object", + "properties": {} } - } - }, - "operationId": "GetDocumentPDF", - "summary": "Get Document PDF", - "tags": ["DOCUMENTS"], - "description": "Get a specific document pdf." - }, - "parameters": [ - { - "name": "docType", - "in": "path", - "required": true, - "schema": { "type": "string" } + ], + "x-readme-ref-name": "bank-input" }, - { - "name": "documentId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ] - }, - "/documents/salesorder/{documentId}/shipall": { - "post": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" } - } + "bank-output": { + "title": "Bank Basic Output", + "description": "The properties that are included when fetching a list of Banks.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Bank Common", + "description": "The properties that are shared amongst all versions of the Bank model.", + "type": "object", + "properties": { + "id": { + "type": "string" }, - "examples": { - "response": { - "value": { "status": 1, "info": "Items Shipped" } - } + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "balance": { + "type": "integer" + }, + "accountNumber": { + "type": "integer" + }, + "iban": { + "type": "string" + }, + "swift": { + "type": "string" + }, + "bank": { + "type": "string" + }, + "bankname": { + "type": "string" } - } + }, + "x-readme-ref-name": "bank-common" } - } + ], + "x-readme-ref-name": "bank-output" }, - "operationId": "Ship all items", - "summary": "Ship All Items", - "tags": ["DOCUMENTS"], - "description": "Ship all the items of a specific sales order." - }, - "parameters": [ - { - "name": "documentId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ] - }, - "/documents/salesorder/{documentId}/shipbylines": { - "post": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { + "bank-output-detailed": { + "title": "Bank Detailed Output", + "description": "The properties that are included when fetching a single Bank.", + "allOf": [ + { + "title": "Bank Basic Output", + "description": "The properties that are included when fetching a list of Banks.", + "allOf": [ + { "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" } - } + "properties": {} }, - "examples": { - "response": { - "value": { "status": 1, "info": "Items Shipped" } - } + { + "title": "Bank Common", + "description": "The properties that are shared amongst all versions of the Bank model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "balance": { + "type": "integer" + }, + "accountNumber": { + "type": "integer" + }, + "iban": { + "type": "string" + }, + "swift": { + "type": "string" + }, + "bank": { + "type": "string" + }, + "bankname": { + "type": "string" + } + }, + "x-readme-ref-name": "bank-common" } - } + ], + "x-readme-ref-name": "bank-output" + }, + { + "type": "object", + "properties": {} } - } + ], + "x-readme-ref-name": "bank-output-detailed" }, - "operationId": "Ship items by line", - "summary": "Ship items by line", - "tags": ["DOCUMENTS"], - "description": "Ship a specific item of a specific sales order (itemLinePosition starts at 0).", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "lines": { - "type": "array", - "items": { - "type": "object", - "properties": { - "itemLinePosition": { "type": "integer" }, - "units": { "type": "integer" } - } - } - } + "numberingSeries-common": { + "title": "Numberingseries Common", + "description": "The properties that are shared amongst all versions of the Numberingseries model.", + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "format": { + "type": "string" + }, + "last": { + "type": "string" + } + }, + "x-readme-ref-name": "numberingSeries-common" + }, + "numberingSeries-input": { + "title": "Numberingseries Input", + "description": "The properties that are allowed when creating or updating a Numberingseries.", + "allOf": [ + { + "title": "Numberingseries Common", + "description": "The properties that are shared amongst all versions of the Numberingseries model.", + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "format": { + "type": "string" + }, + "last": { + "type": "string" } - } + }, + "x-readme-ref-name": "numberingSeries-common" + }, + { + "type": "object", + "properties": {} } - } - } - }, - "parameters": [ - { - "name": "documentId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ] - }, - "/documents/{docType}/{documentId}/shippeditems": { - "parameters": [ - { - "name": "docType", - "in": "path", - "required": true, - "description": "docType should be one of: {salesorder, order}", - "schema": { "type": "string" } + ], + "x-readme-ref-name": "numberingSeries-input" }, - { - "name": "documentId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], - "get": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "sku": { "type": "string" }, - "total": { "type": "number" }, - "sent": { "type": "number" }, - "pending": { "type": "number" } - } - } + "numberingSeries-output": { + "title": "Numberingseries Basic Output", + "description": "The properties that are included when fetching a list of Numberingseries.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Numberingseries Common", + "description": "The properties that are shared amongst all versions of the Numberingseries model.", + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "format": { + "type": "string" + }, + "last": { + "type": "string" } - } + }, + "x-readme-ref-name": "numberingSeries-common" } - } + ], + "x-readme-ref-name": "numberingSeries-output" }, - "operationId": "Shipped units by item", - "summary": "Shipped units by item", - "tags": ["DOCUMENTS"], - "description": "For each item included in a sales or purchase order, get the number of units shipped or recieved." - } - }, - "/documents/{docType}/{documentId}/attach": { - "post": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { + "numberingSeries-output-detailed": { + "title": "Numberingseries Detailed Output", + "description": "The properties that are included when fetching a single Numberingseries.", + "allOf": [ + { + "title": "Numberingseries Basic Output", + "description": "The properties that are included when fetching a list of Numberingseries.", + "allOf": [ + { "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" } - } + "properties": {} }, - "examples": { - "response": { - "value": { - "status": 1, - "data": "<>" + { + "title": "Numberingseries Common", + "description": "The properties that are shared amongst all versions of the Numberingseries model.", + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "format": { + "type": "string" + }, + "last": { + "type": "string" } - } + }, + "x-readme-ref-name": "numberingSeries-common" } - } + ], + "x-readme-ref-name": "numberingSeries-output" + }, + { + "type": "object", + "properties": {} } - } + ], + "x-readme-ref-name": "numberingSeries-output-detailed" }, - "operationId": "Attach File", - "summary": "Attach File to a specific document", - "parameters": [ - { - "name": "docType", - "in": "path", - "required": true, - "schema": { "type": "string" } - }, - { - "name": "documentId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "description": "The file to upload.", - "type": "string", - "format": "binary" - }, - "setMain": { "type": "boolean" } - } - } + "expensesAccount-common": { + "title": "Expenses account Common", + "description": "The properties that are shared amongst all versions of the Expenses account model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "color": { + "type": "string" + }, + "accNum": { + "type": "integer" } - } + }, + "x-readme-ref-name": "expensesAccount-common" }, - "tags": ["DOCUMENTS"], - "description": "Attach File to a specific document." - } - }, - "/documents/{docType}/{documentId}/updatetracking": { - "post": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" } - } + "expensesAccount-input": { + "title": "Expenses account Input", + "description": "The properties that are allowed when creating or updating a Expenses account.", + "allOf": [ + { + "title": "Expenses account Common", + "description": "The properties that are shared amongst all versions of the Expenses account model.", + "type": "object", + "properties": { + "id": { + "type": "string" }, - "examples": { - "response": { "value": { "status": 1, "data": "Updated" } } + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "color": { + "type": "string" + }, + "accNum": { + "type": "integer" } - } + }, + "x-readme-ref-name": "expensesAccount-common" + }, + { + "type": "object", + "properties": {} } - } + ], + "x-readme-ref-name": "expensesAccount-input" }, - "operationId": "Update tracking info", - "summary": "Update tracking info from specific document.", - "tags": ["DOCUMENTS"], - "description": "Update tracking info from specific document.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "example": "correos", - "description": "key should be one of: {mrw, ups, fedex,tnt, seur, nacex, correos, asm, uspostalservice, dbschenker, royalmail, bluedart, palletways, correosexpress, tourline, other (for custom)}" - }, - "name": { - "type": "string", - "example": "correos", - "description": "name should be one of: {mrw, ups, fedex,tnt, seur, nacex, correos, asm, United States Postal Service, dbschenker, royalmail, bluedart, palletways, correosexpress, tourline, custom name (for custom)}" - }, - "num": { - "type": "string", - "example": "1,2-3", - "description": "Tracking numbers. Can be added more numbers separated by , or -" - }, - "pickUpDate": { - "type": "string", - "example": "01/01/2020", - "description": "pickUpDate should be formated like DD/MM/YYYY" - }, - "deliveryDate": { - "type": "string", - "example": "01/01/2020", - "description": "deliveryDate should be formated like DD/MM/YYYY" - }, - "notes": { - "type": "string", - "example": "note", - "description": "notes for the tracking" - } + "expensesAccount-output": { + "title": "Expenses account Basic Output", + "description": "The properties that are included when fetching a list of Expenses accounts.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Expenses account Common", + "description": "The properties that are shared amongst all versions of the Expenses account model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "color": { + "type": "string" + }, + "accNum": { + "type": "integer" } - } + }, + "x-readme-ref-name": "expensesAccount-common" } - } - } - }, - "parameters": [ - { - "name": "documentId", - "in": "path", - "required": true, - "schema": { "type": "string" } + ], + "x-readme-ref-name": "expensesAccount-output" }, - { - "name": "docType", - "in": "path", - "required": true, - "description": "docType should be one of: {salesorder, waybill}", - "schema": { "type": "string" } - } - ] - }, - "/documents/{docType}/{documentId}/pipeline/set": { - "post": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { + "expensesAccount-output-detailed": { + "title": "Expenses account Detailed Output", + "description": "The properties that are included when fetching a single Expenses account.", + "allOf": [ + { + "title": "Expenses account Basic Output", + "description": "The properties that are included when fetching a list of Expenses accounts.", + "allOf": [ + { "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" } - } + "properties": {} }, - "examples": { - "response": { "value": { "status": 1, "info": "Done" } } + { + "title": "Expenses account Common", + "description": "The properties that are shared amongst all versions of the Expenses account model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "color": { + "type": "string" + }, + "accNum": { + "type": "integer" + } + }, + "x-readme-ref-name": "expensesAccount-common" } - } + ], + "x-readme-ref-name": "expensesAccount-output" + }, + { + "type": "object", + "properties": {} } - } + ], + "x-readme-ref-name": "expensesAccount-output-detailed" }, - "operationId": "Update document pipeline", - "summary": "Update pipeline from specific document.", - "tags": ["DOCUMENTS"], - "description": "Update pipeline from specific document.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { "pipeline": { "type": "string" } } - } + "salesChannel-common": { + "title": "Saleschannel Common", + "description": "The properties that are shared amongst all versions of the Saleschannel model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "color": { + "type": "string" + }, + "accNum": { + "type": "integer" } - } - } - }, - "parameters": [ - { - "name": "documentId", - "in": "path", - "required": true, - "schema": { "type": "string" } + }, + "x-readme-ref-name": "salesChannel-common" }, - { - "name": "docType", - "in": "path", - "description": "docType should be one of: {salesorder, waybill}", - "required": true, - "schema": { "type": "string" } - } - ] - }, - "/paymentmethods": { - "get": { - "responses": { - "200": { - "description": "List Payment methods", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "name": { "type": "string" }, - "dueDays": { "type": "string" }, - "bankId": { "type": "string" } - } + "salesChannel-input": { + "title": "Saleschannel Input", + "description": "The properties that are allowed when creating or updating a Saleschannel.", + "allOf": [ + { + "title": "Saleschannel Common", + "description": "The properties that are shared amongst all versions of the Saleschannel model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "color": { + "type": "string" + }, + "accNum": { + "type": "integer" } - } - } - } - }, - "operationId": "List Payment methods", - "summary": "List Payment methods", - "tags": ["DOCUMENTS"], - "description": "List Payment methods" - } - }, - "/remittances": { - "get": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { "type": "object", "properties": {} } - } + }, + "x-readme-ref-name": "salesChannel-common" + }, + { + "type": "object", + "properties": {} } - } + ], + "x-readme-ref-name": "salesChannel-input" }, - "summary": "List Remittances", - "operationId": "List Remittances", - "tags": ["REMITTANCES"], - "security": [{ "Auth": [] }] - } - }, - "/remittances/{remittanceId}": { - "get": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { "type": "object", "properties": {} } - } + "salesChannel-output": { + "title": "Saleschannel Basic Output", + "description": "The properties that are included when fetching a list of Saleschannels.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Saleschannel Common", + "description": "The properties that are shared amongst all versions of the Saleschannel model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "color": { + "type": "string" + }, + "accNum": { + "type": "integer" + } + }, + "x-readme-ref-name": "salesChannel-common" } - } + ], + "x-readme-ref-name": "salesChannel-output" }, - "operationId": "Get Remittance", - "summary": "Get Remittance", - "tags": ["REMITTANCES"] - }, - "parameters": [ - { - "name": "remittanceId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ] - }, - "/products/{productId}/image": { - "get": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { "type": "object", "properties": {} } - } + "salesChannel-output-detailed": { + "title": "Saleschannel Detailed Output", + "description": "The properties that are included when fetching a single Saleschannel.", + "allOf": [ + { + "title": "Saleschannel Basic Output", + "description": "The properties that are included when fetching a list of Saleschannels.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Saleschannel Common", + "description": "The properties that are shared amongst all versions of the Saleschannel model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "color": { + "type": "string" + }, + "accNum": { + "type": "integer" + } + }, + "x-readme-ref-name": "salesChannel-common" + } + ], + "x-readme-ref-name": "salesChannel-output" + }, + { + "type": "object", + "properties": {} } - } + ], + "x-readme-ref-name": "salesChannel-output-detailed" }, - "summary": "Get Product Main Image", - "description": "Get the main image of a specific product", - "operationId": "Get Product Image", - "tags": ["PRODUCTS"] - }, - "parameters": [ - { - "name": "productId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ] - }, - "/products/{productId}/imagesList": { - "get": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { "type": "object", "properties": {} } - } + "payment-common": { + "title": "Payment Common", + "description": "The properties that are shared amongst all versions of the Payment model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "bankId": { + "type": "string" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "amount": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "date": { + "type": "integer" } - } + }, + "x-readme-ref-name": "payment-common" }, - "summary": "List Product Images", - "operationId": "List Product Images", - "tags": ["PRODUCTS"], - "description": "List all secondary product images" - }, - "parameters": [ - { - "name": "productId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ] - }, - "/products/{productId}/image/{imageFileName}": { - "get": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { "type": "object", "properties": {} } - } + "payment-input": { + "title": "Payment Input", + "description": "The properties that are allowed when creating or updating a Payment.", + "allOf": [ + { + "title": "Payment Common", + "description": "The properties that are shared amongst all versions of the Payment model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "bankId": { + "type": "string" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "amount": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "date": { + "type": "integer" + } + }, + "x-readme-ref-name": "payment-common" + }, + { + "type": "object", + "properties": {} } - } + ], + "x-readme-ref-name": "payment-input" }, - "summary": "Get Product Secondary Image", - "tags": ["PRODUCTS"], - "description": "Get a specific secondary Image" - }, - "parameters": [ - { - "name": "productId", - "in": "path", - "required": true, - "schema": { "type": "string" } + "payment-output": { + "title": "Payment Basic Output", + "description": "The properties that are included when fetching a list of Payments.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Payment Common", + "description": "The properties that are shared amongst all versions of the Payment model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "bankId": { + "type": "string" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "amount": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "date": { + "type": "integer" + } + }, + "x-readme-ref-name": "payment-common" + } + ], + "x-readme-ref-name": "payment-output" }, - { - "name": "imageFileName", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ] - }, - "/products/{productId}/stock": { - "parameters": [ - { - "name": "productId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], - "put": { - "operationId": "Update Product stock", - "requestBody": { - "content": { - "application/json": { - "schema": { + "payment-output-detailed": { + "title": "Payment Detailed Output", + "description": "The properties that are included when fetching a single Payment.", + "allOf": [ + { + "title": "Payment Basic Output", + "description": "The properties that are included when fetching a list of Payments.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Payment Common", + "description": "The properties that are shared amongst all versions of the Payment model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "bankId": { + "type": "string" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "amount": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "date": { + "type": "integer" + } + }, + "x-readme-ref-name": "payment-common" + } + ], + "x-readme-ref-name": "payment-output" + }, + { + "type": "object", + "properties": {} + } + ], + "x-readme-ref-name": "payment-output-detailed" + }, + "document-common": { + "title": "Document Common", + "description": "The properties that are shared amongst all versions of the Document model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "contact": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + }, + "notes": { + "type": "string" + }, + "products": { + "type": "array", + "items": { "type": "object", "properties": { - "stock": { - "type": "object", - "additionalProperties": { - "type": "object", - "description": "WarehouseId's", - "additionalProperties": { - "type": "number", - "description": "ProductId or VariantId followed by stock to update", - "default": { "ProductId": 1 } - } - } + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "price": { + "type": "integer" + }, + "units": { + "type": "integer" + }, + "tax": { + "type": "integer" + }, + "discount": { + "type": "integer" + }, + "retention": { + "type": "integer" + }, + "weight": { + "type": "integer" + }, + "costPrice": { + "type": "integer" + }, + "sku": { + "type": "string" + }, + "productId": { + "type": "string" + } + } + } + }, + "tax": { + "type": "number" + }, + "subtotal": { + "type": "number" + }, + "discount": { + "type": "integer" + }, + "total": { + "type": "number" + }, + "language": { + "type": "string" + }, + "status": { + "type": "integer" + }, + "customFields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "value": { + "type": "string" } } } + }, + "docNumber": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "currencyChange": { + "type": "integer" + }, + "paymentsTotal": { + "type": "integer" + }, + "paymentsPending": { + "type": "number" + }, + "paymentsRefunds": { + "type": "integer" + }, + "salesChannelId": { + "type": "string" } - } + }, + "x-readme-ref-name": "document-common" }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } + "document-input": { + "title": "Document Input", + "description": "The properties that are allowed when creating or updating a Document.", + "allOf": [ + { + "title": "Document Common", + "description": "The properties that are shared amongst all versions of the Document model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "contact": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + }, + "notes": { + "type": "string" + }, + "products": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "price": { + "type": "integer" + }, + "units": { + "type": "integer" + }, + "tax": { + "type": "integer" + }, + "discount": { + "type": "integer" + }, + "retention": { + "type": "integer" + }, + "weight": { + "type": "integer" + }, + "costPrice": { + "type": "integer" + }, + "sku": { + "type": "string" + }, + "productId": { + "type": "string" + } + } } }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5aa97e595b706400153f9f94" + "tax": { + "type": "number" + }, + "subtotal": { + "type": "number" + }, + "discount": { + "type": "integer" + }, + "total": { + "type": "number" + }, + "language": { + "type": "string" + }, + "status": { + "type": "integer" + }, + "customFields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "value": { + "type": "string" + } } } + }, + "docNumber": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "currencyChange": { + "type": "integer" + }, + "paymentsTotal": { + "type": "integer" + }, + "paymentsPending": { + "type": "number" + }, + "paymentsRefunds": { + "type": "integer" + }, + "salesChannelId": { + "type": "string" } - } + }, + "x-readme-ref-name": "document-common" + }, + { + "type": "object", + "properties": {} } - } + ], + "x-readme-ref-name": "document-input" }, - "tags": ["PRODUCTS"], - "summary": "Update Product stock" - } - }, - "/services": { - "get": { - "operationId": "List Services", - "summary": "List Services", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { + "document-output": { + "title": "Document Basic Output", + "description": "The properties that are included when fetching a list of Documents.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Document Common", + "description": "The properties that are shared amongst all versions of the Document model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "contact": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + }, + "notes": { + "type": "string" + }, + "products": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "price": { + "type": "integer" + }, + "units": { + "type": "integer" + }, + "tax": { + "type": "integer" + }, + "discount": { + "type": "integer" + }, + "retention": { + "type": "integer" + }, + "weight": { + "type": "integer" + }, + "costPrice": { + "type": "integer" + }, + "sku": { + "type": "string" + }, + "productId": { + "type": "string" + } + } + } + }, + "tax": { + "type": "number" + }, + "subtotal": { + "type": "number" + }, + "discount": { + "type": "integer" + }, + "total": { + "type": "number" + }, + "language": { + "type": "string" + }, + "status": { + "type": "integer" + }, + "customFields": { "type": "array", "items": { "type": "object", "properties": { - "id": { "type": "string" }, - "name": { "type": "string" }, - "type": { "type": "string" }, - "balance": { "type": "integer" }, - "accountNumber": { "type": "integer" }, - "iban": { "type": "string" }, - "swift": { "type": "string" }, - "bank": { "type": "string" }, - "bankname": { "type": "string" } + "field": { + "type": "string" + }, + "value": { + "type": "string" + } } } + }, + "docNumber": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "currencyChange": { + "type": "integer" + }, + "paymentsTotal": { + "type": "integer" + }, + "paymentsPending": { + "type": "number" + }, + "paymentsRefunds": { + "type": "integer" + }, + "salesChannelId": { + "type": "string" } - } + }, + "x-readme-ref-name": "document-common" } - } - }, - "tags": ["SERVICES"] - }, - "post": { - "operationId": "Create Service", - "summary": "Create Service", - "requestBody": { - "$ref": "#/components/requestBodies/Create_ServiceBody" - }, - "responses": { "201": { "description": "" } }, - "tags": ["SERVICES"] - } - }, - "/services/{serviceId}": { - "parameters": [ - { - "name": "serviceId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], - "get": { - "operationId": "Get Service", - "summary": "Get Service", - "responses": { "200": { "description": "" } }, - "tags": ["SERVICES"] - }, - "put": { - "operationId": "Update Service", - "summary": "Update Service", - "requestBody": { - "$ref": "#/components/requestBodies/Create_ServiceBody" + ], + "x-readme-ref-name": "document-output" }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/bank-output-detailed" } - } + "document-output-detailed": { + "title": "Document Detailed Output", + "description": "The properties that are included when fetching a single Document.", + "allOf": [ + { + "title": "Document Basic Output", + "description": "The properties that are included when fetching a list of Documents.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Document Common", + "description": "The properties that are shared amongst all versions of the Document model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "contact": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + }, + "notes": { + "type": "string" + }, + "products": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "price": { + "type": "integer" + }, + "units": { + "type": "integer" + }, + "tax": { + "type": "integer" + }, + "discount": { + "type": "integer" + }, + "retention": { + "type": "integer" + }, + "weight": { + "type": "integer" + }, + "costPrice": { + "type": "integer" + }, + "sku": { + "type": "string" + }, + "productId": { + "type": "string" + } + } + } + }, + "tax": { + "type": "number" + }, + "subtotal": { + "type": "number" + }, + "discount": { + "type": "integer" + }, + "total": { + "type": "number" + }, + "language": { + "type": "string" + }, + "status": { + "type": "integer" + }, + "customFields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "value": { + "type": "string" + } + } + } + }, + "docNumber": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "currencyChange": { + "type": "integer" + }, + "paymentsTotal": { + "type": "integer" + }, + "paymentsPending": { + "type": "number" + }, + "paymentsRefunds": { + "type": "integer" + }, + "salesChannelId": { + "type": "string" + } + }, + "x-readme-ref-name": "document-common" + } + ], + "x-readme-ref-name": "document-output" + }, + { + "type": "object", + "properties": {} } - } - }, - "tags": ["SERVICES"] - }, - "delete": { - "operationId": "Delete Service", - "summary": "Delete Service", - "responses": { "200": { "description": "" } }, - "tags": ["SERVICES"] + ], + "x-readme-ref-name": "document-output-detailed" + } } + }, + "x-readme": { + "explorer-enabled": true, + "proxy-enabled": true } } diff --git a/forms-bridge/addons/holded/data/swagger/projects.json b/forms-bridge/addons/holded/data/swagger/projects.json index 5c6e8476..f0bb1ea6 100644 --- a/forms-bridge/addons/holded/data/swagger/projects.json +++ b/forms-bridge/addons/holded/data/swagger/projects.json @@ -1,20 +1,689 @@ { - "/projects": { - "get": { - "operationId": "List Projects", - "responses": { - "200": { - "description": "", + "openapi": "3.0.0", + "info": { + "title": "Projects API", + "version": "1.2", + "description": "The Holded’s Projects API is organized around REST, using HTTP responses code to keep you informed about what’s going on. Our endpoints will returns you metada in JSON format directly from Holded." + }, + "x-samples-languages": ["curl", "node", "ruby", "python"], + "paths": { + "/projects": { + "get": { + "operationId": "List Projects", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "title": "Project Basic Output", + "description": "The properties that are included when fetching a list of Projects.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Project Common", + "description": "The properties that are shared amongst all versions of the Project model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "category": { + "type": "integer" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + }, + "status": { + "type": "integer" + }, + "lists": { + "type": "array", + "items": { + "type": "object", + "properties": { + "listId": { + "type": "string" + }, + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + } + } + } + }, + "billable": { + "type": "integer" + }, + "expenses": { + "type": "object", + "properties": { + "docId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "subtotal": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "invoiceNum": { + "type": "string" + }, + "total": { + "type": "integer" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + } + } + }, + "estimates": { + "type": "array", + "items": { + "type": "object", + "properties": { + "docId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "subtotal": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "invoiceNum": { + "type": "string" + }, + "total": { + "type": "number" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + } + } + } + }, + "sales": { + "type": "array", + "items": { + "type": "object", + "properties": { + "docId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "subtotal": { + "type": "number" + }, + "desc": { + "type": "string" + }, + "invoiceNum": { + "type": "string" + }, + "total": { + "type": "integer" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + } + } + } + }, + "timeTracking": { + "type": "object", + "properties": { + "timeId": { + "type": "string" + }, + "time": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "costHour": { + "type": "integer" + }, + "userId": { + "type": "string" + }, + "taskId": { + "type": "string" + }, + "total": { + "type": "number" + } + } + }, + "price": { + "type": "integer" + }, + "numberOfTasks": { + "type": "integer" + }, + "completedTasks": { + "type": "integer" + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "labelId": { + "type": "string" + }, + "labelName": { + "type": "string" + }, + "labelColor": { + "type": "string" + } + } + } + } + }, + "x-readme-ref-name": "project-common" + } + ], + "x-readme-ref-name": "project-output" + } + }, + "examples": { + "response": { + "value": [ + { + "id": "5ab390311d6d82002432ec5a", + "name": "Building 301", + "desc": "Bulding 301 in Barcelona", + "tags": ["tag", "tog", "tug"], + "category": 0, + "contactId": "5aaa51ab5b70640028340186", + "contactName": "DIvero", + "date": 0, + "dueDate": 0, + "status": 2, + "lists": [ + { + "id": "5ab390311d6d82002432ec52", + "key": "pending", + "name": "Pending", + "desc": "nan" + }, + { + "id": "5ab390311d6d82002432ec53", + "key": "review", + "name": "Review", + "desc": "nan" + }, + { + "id": "5ab390311d6d82002432ec54", + "key": "done", + "name": "Done", + "desc": "nan" + } + ], + "billable": 1, + "expenses": { + "docId": "5ab3d4121d6d820062013ed3", + "type": "purchase", + "subtotal": 200, + "desc": "noooooo", + "invoiceNum": "123", + "total": 242, + "contactId": "5aaa51ab5b70640028340186", + "contactName": "DIvero (Divero)", + "date": 1521673200, + "dueDate": 1521759600 + }, + "estimates": [ + { + "docId": "5ab3d4cc1d6d82007711bba3", + "type": "estimate", + "subtotal": 34433, + "desc": "no desc", + "invoiceNum": "E170001", + "total": 41663.93, + "contactId": "5aaa51ab5b70640028340186", + "contactName": "DIvero (Divero)", + "date": 1517871600, + "dueDate": 1520118000 + } + ], + "sales": [ + { + "docId": "5ab391071d6d820034294783", + "type": "invoice", + "subtotal": 818.18, + "desc": "", + "invoiceNum": "F170001", + "total": 990, + "contactId": "5aa939a95b70640009653d72", + "contactName": "Bose QC", + "date": 1521673200, + "dueDate": 0 + } + ], + "timeTracking": { + "timeId": "5ac4f2cec839ea004e18a463", + "time": 45300, + "desc": "POOOOOSTuuuuuuu eeeee timetracking after refactor", + "costHour": 234, + "userId": "5a05cc5a60cea100094baf22", + "taskId": "5ab3cb7d1d6d8200440d4683", + "total": 2944.5 + }, + "price": 2345, + "numberOfTasks": 6, + "completedTasks": 3, + "labels": [ + { + "id": "5ab390311d6d82002432ec55", + "name": "New", + "color": "#10cf91" + }, + { + "id": "5ab390311d6d82002432ec56", + "name": "Confirmed", + "color": "#10cf91" + }, + { + "id": "5ab390311d6d82002432ec57", + "name": "Pending", + "color": "#f8d053" + }, + { + "id": "5ab390311d6d82002432ec58", + "name": "Fixed", + "color": "#4181f2" + }, + { + "id": "5ab390311d6d82002432ec59", + "name": "Urgent", + "color": "#ee585d" + } + ] + } + ] + } + } + } + } + } + }, + "tags": ["PROJECTS"], + "description": "Get all your projects." + }, + "post": { + "operationId": "Create Project", + "requestBody": { "content": { "application/json": { "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/project-output" } - }, - "examples": { - "response": { - "value": [ - { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": ["name"] + } + } + }, + "x-examples": { + "application/json": { + "name": "Project of the month" + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Created", + "id": "5ac4f2cec839ea004e18a463" + } + } + } + } + } + } + }, + "tags": ["PROJECTS"], + "description": "Create a new project." + } + }, + "/projects/{projectId}": { + "parameters": [ + { + "name": "projectId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "get": { + "operationId": "Get Project", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "category": { + "type": "integer" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + }, + "status": { + "type": "integer" + }, + "lists": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + } + } + } + }, + "billable": { + "type": "integer" + }, + "expenses": { + "type": "object", + "properties": { + "docId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "subtotal": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "invoiceNum": { + "type": "string" + }, + "total": { + "type": "integer" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + } + } + }, + "estimates": { + "type": "array", + "items": { + "type": "object", + "properties": { + "docId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "subtotal": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "invoiceNum": { + "type": "string" + }, + "total": { + "type": "number" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + } + } + } + }, + "sales": { + "type": "array", + "items": { + "type": "object", + "properties": { + "docId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "subtotal": { + "type": "number" + }, + "desc": { + "type": "string" + }, + "invoiceNum": { + "type": "string" + }, + "total": { + "type": "integer" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + } + } + } + }, + "timeTracking": { + "type": "object", + "properties": { + "timeId": { + "type": "string" + }, + "time": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "costHour": { + "type": "integer" + }, + "userId": { + "type": "string" + }, + "taskId": { + "type": "string" + }, + "total": { + "type": "number" + } + } + }, + "price": { + "type": "integer" + }, + "numberOfTasks": { + "type": "integer" + }, + "completedTasks": { + "type": "integer" + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "color": { + "type": "string" + } + } + } + } + } + }, + "examples": { + "response": { + "value": { "id": "5ab390311d6d82002432ec5a", "name": "Building 301", "desc": "Bulding 301 in Barcelona", @@ -126,519 +795,512 @@ } ] } - ] - } - } - } - } - } - }, - "tags": ["PROJECTS"], - "description": "Get all your projects." - }, - "post": { - "operationId": "Create Project", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { "name": { "type": "string" } }, - "required": ["name"] - } - } - }, - "x-examples": { "application/json": { "name": "Project of the month" } } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Created", - "id": "5ac4f2cec839ea004e18a463" } } } } } - } + }, + "tags": ["PROJECTS"], + "description": "Get a specific payment." }, - "tags": ["PROJECTS"], - "description": "Create a new project." - } - }, - "/projects/{projectId}": { - "parameters": [ - { - "name": "projectId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], - "get": { - "operationId": "Get Project", - "responses": { - "200": { - "description": "", + "put": { + "operationId": "Update Project", + "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "id": { "type": "string" }, - "name": { "type": "string" }, - "desc": { "type": "string" }, - "tags": { "type": "array", "items": { "type": "string" } }, - "category": { "type": "integer" }, - "contactId": { "type": "string" }, - "contactName": { "type": "string" }, - "date": { "type": "integer" }, - "dueDate": { "type": "integer" }, - "status": { "type": "integer" }, - "lists": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "key": { "type": "string" }, - "name": { "type": "string" }, - "desc": { "type": "string" } - } - } + "name": { + "type": "string" }, - "billable": { "type": "integer" }, - "expenses": { - "type": "object", - "properties": { - "docId": { "type": "string" }, - "type": { "type": "string" }, - "subtotal": { "type": "integer" }, - "desc": { "type": "string" }, - "invoiceNum": { "type": "string" }, - "total": { "type": "integer" }, - "contactId": { "type": "string" }, - "contactName": { "type": "string" }, - "date": { "type": "integer" }, - "dueDate": { "type": "integer" } - } + "desc": { + "type": "string" }, - "estimates": { + "tags": { "type": "array", "items": { - "type": "object", - "properties": { - "docId": { "type": "string" }, - "type": { "type": "string" }, - "subtotal": { "type": "integer" }, - "desc": { "type": "string" }, - "invoiceNum": { "type": "string" }, - "total": { "type": "number" }, - "contactId": { "type": "string" }, - "contactName": { "type": "string" }, - "date": { "type": "integer" }, - "dueDate": { "type": "integer" } - } + "type": "string" } }, - "sales": { + "contactName": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + }, + "status": { + "type": "integer" + }, + "lists": { "type": "array", "items": { "type": "object", "properties": { - "docId": { "type": "string" }, - "type": { "type": "string" }, - "subtotal": { "type": "number" }, - "desc": { "type": "string" }, - "invoiceNum": { "type": "string" }, - "total": { "type": "integer" }, - "contactId": { "type": "string" }, - "contactName": { "type": "string" }, - "date": { "type": "integer" }, - "dueDate": { "type": "integer" } + "id": { + "type": "string" + }, + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + } } } }, - "timeTracking": { - "type": "object", - "properties": { - "timeId": { "type": "string" }, - "time": { "type": "integer" }, - "desc": { "type": "string" }, - "costHour": { "type": "integer" }, - "userId": { "type": "string" }, - "taskId": { "type": "string" }, - "total": { "type": "number" } - } + "billable": { + "type": "integer" + }, + "price": { + "type": "integer" }, - "price": { "type": "integer" }, - "numberOfTasks": { "type": "integer" }, - "completedTasks": { "type": "integer" }, "labels": { "type": "array", "items": { "type": "object", "properties": { - "id": { "type": "string" }, - "name": { "type": "string" }, - "color": { "type": "string" } + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "color": { + "type": "string" + } } } } } - }, - "examples": { - "response": { - "value": { - "id": "5ab390311d6d82002432ec5a", - "name": "Building 301", - "desc": "Bulding 301 in Barcelona", - "tags": ["tag", "tog", "tug"], - "category": 0, - "contactId": "5aaa51ab5b70640028340186", - "contactName": "DIvero", - "date": 0, - "dueDate": 0, - "status": 2, - "lists": [ - { - "id": "5ab390311d6d82002432ec52", - "key": "pending", - "name": "Pending", - "desc": "nan" - }, - { - "id": "5ab390311d6d82002432ec53", - "key": "review", - "name": "Review", - "desc": "nan" - }, - { - "id": "5ab390311d6d82002432ec54", - "key": "done", - "name": "Done", - "desc": "nan" - } - ], - "billable": 1, - "expenses": { - "docId": "5ab3d4121d6d820062013ed3", - "type": "purchase", - "subtotal": 200, - "desc": "noooooo", - "invoiceNum": "123", - "total": 242, - "contactId": "5aaa51ab5b70640028340186", - "contactName": "DIvero (Divero)", - "date": 1521673200, - "dueDate": 1521759600 - }, - "estimates": [ - { - "docId": "5ab3d4cc1d6d82007711bba3", - "type": "estimate", - "subtotal": 34433, - "desc": "no desc", - "invoiceNum": "E170001", - "total": 41663.93, - "contactId": "5aaa51ab5b70640028340186", - "contactName": "DIvero (Divero)", - "date": 1517871600, - "dueDate": 1520118000 - } - ], - "sales": [ - { - "docId": "5ab391071d6d820034294783", - "type": "invoice", - "subtotal": 818.18, - "desc": "", - "invoiceNum": "F170001", - "total": 990, - "contactId": "5aa939a95b70640009653d72", - "contactName": "Bose QC", - "date": 1521673200, - "dueDate": 0 - } - ], - "timeTracking": { - "timeId": "5ac4f2cec839ea004e18a463", - "time": 45300, - "desc": "POOOOOSTuuuuuuu eeeee timetracking after refactor", - "costHour": 234, - "userId": "5a05cc5a60cea100094baf22", - "taskId": "5ab3cb7d1d6d8200440d4683", - "total": 2944.5 - }, - "price": 2345, - "numberOfTasks": 6, - "completedTasks": 3, - "labels": [ - { - "id": "5ab390311d6d82002432ec55", - "name": "New", - "color": "#10cf91" - }, - { - "id": "5ab390311d6d82002432ec56", - "name": "Confirmed", - "color": "#10cf91" - }, - { - "id": "5ab390311d6d82002432ec57", - "name": "Pending", - "color": "#f8d053" - }, - { - "id": "5ab390311d6d82002432ec58", - "name": "Fixed", - "color": "#4181f2" - }, - { - "id": "5ab390311d6d82002432ec59", - "name": "Urgent", - "color": "#ee585d" - } - ] - } - } } } + }, + "x-examples": { + "application/json": { + "name": "Building 301", + "desc": "Bulding 301 in Barcelona", + "tags": ["tag", "tog", "tug"], + "contactName": "DIvero", + "date": 1521673200, + "dueDate": 1521759600, + "status": 2, + "lists": [ + { + "id": "5ab390311d6d82002432ec52", + "key": "pending", + "name": "Pending", + "desc": "nan" + }, + { + "id": "5ab390311d6d82002432ec53", + "key": "review", + "name": "Review", + "desc": "nan" + }, + { + "id": "5ab390311d6d82002432ec54", + "key": "done", + "name": "Done", + "desc": "nan" + } + ], + "billable": 1, + "price": 2345, + "labels": [ + { + "id": "5ab390311d6d82002432ec55", + "name": "New", + "color": "#10cf91" + }, + { + "id": "5ab390311d6d82002432ec56", + "name": "Confirmed", + "color": "#10cf91" + }, + { + "id": "5ab390311d6d82002432ec57", + "name": "Pending", + "color": "#f8d053" + }, + { + "id": "5ab390311d6d82002432ec58", + "name": "Fixed", + "color": "#4181f2" + }, + { + "id": "5ab390311d6d82002432ec59", + "name": "Urgent", + "color": "#ee585d" + } + ] + } } - } - }, - "tags": ["PROJECTS"], - "description": "Get a specific payment." - }, - "put": { - "operationId": "Update Project", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "desc": { "type": "string" }, - "tags": { "type": "array", "items": { "type": "string" } }, - "contactName": { "type": "string" }, - "date": { "type": "integer" }, - "dueDate": { "type": "integer" }, - "status": { "type": "integer" }, - "lists": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "key": { "type": "string" }, - "name": { "type": "string" }, - "desc": { "type": "string" } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Updated", + "id": "5ab390311d6d82002432ec5a" + } + } + } + } + } + } + }, + "tags": ["PROJECTS"], + "description": "Update a specific project.\n\nOnly the params included in the operation will update the project." + }, + "delete": { + "operationId": "Delete Project", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" } } }, - "billable": { "type": "integer" }, - "price": { "type": "integer" }, - "labels": { + "examples": { + "response": { + "value": { + "status": 1, + "info": "Successfully deleted", + "id": "5aba68b1c5d438006425ad45" + } + } + } + } + } + } + }, + "tags": ["PROJECTS"], + "description": "Delete a specific project." + } + }, + "/tasks": { + "get": { + "operationId": "List Tasks", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "type": "object", "properties": { - "id": { "type": "string" }, - "name": { "type": "string" }, - "color": { "type": "string" } + "id": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "listId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "string" + } + }, + "comments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "commentId": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "userId": { + "type": "string" + }, + "message": { + "type": "string" + } + } + } + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + }, + "userId": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "updatedAt": { + "type": "integer" + }, + "status": { + "type": "integer" + }, + "billable": { + "type": "integer" + }, + "featured": { + "type": "integer" + } } } + }, + "examples": { + "response": { + "value": [ + { + "id": "5ab3df6e1d6d82008c5777a4", + "projectId": "5ab390311d6d82002432ec5a", + "listId": "5ab390311d6d82002432ec53", + "name": "Business plan", + "desc": "business plan for the new project", + "labels": [ + "5ab390311d6d82002432ec58", + "5ab390311d6d82002432ec59" + ], + "comments": [ + { + "commentId": "5ab3df8c1d6d820088525aa3", + "createdAt": 1521737612, + "userId": "5a05cc5a60cea100094baf22", + "message": "no comments" + }, + { + "commentId": "5ab3df971d6d82008c5777a5", + "createdAt": 1521737623, + "userId": "5a05cc5a60cea100094baf22", + "message": "a piece of comment\n" + } + ], + "date": 1521737582, + "dueDate": 1521673200, + "userId": "5a05cc5a60cea100094baf22", + "createdAt": 1521737582, + "updatedAt": 1521737582, + "status": 0, + "billable": 0, + "featured": 1 + } + ] + } } } } } }, - "x-examples": { - "application/json": { - "name": "Building 301", - "desc": "Bulding 301 in Barcelona", - "tags": ["tag", "tog", "tug"], - "contactName": "DIvero", - "date": 1521673200, - "dueDate": 1521759600, - "status": 2, - "lists": [ - { - "id": "5ab390311d6d82002432ec52", - "key": "pending", - "name": "Pending", - "desc": "nan" - }, - { - "id": "5ab390311d6d82002432ec53", - "key": "review", - "name": "Review", - "desc": "nan" - }, - { - "id": "5ab390311d6d82002432ec54", - "key": "done", - "name": "Done", - "desc": "nan" - } - ], - "billable": 1, - "price": 2345, - "labels": [ - { - "id": "5ab390311d6d82002432ec55", - "name": "New", - "color": "#10cf91" - }, - { - "id": "5ab390311d6d82002432ec56", - "name": "Confirmed", - "color": "#10cf91" - }, - { - "id": "5ab390311d6d82002432ec57", - "name": "Pending", - "color": "#f8d053" - }, - { - "id": "5ab390311d6d82002432ec58", - "name": "Fixed", - "color": "#4181f2" - }, - { - "id": "5ab390311d6d82002432ec59", - "name": "Urgent", - "color": "#ee585d" - } - ] - } - } + "tags": ["TASKS"], + "description": "Get all your tasks." }, - "responses": { - "200": { - "description": "", + "post": { + "operationId": "Create Task", + "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5ab390311d6d82002432ec5a" + "projectId": { + "type": "string" + }, + "listId": { + "type": "string" + }, + "name": { + "type": "string" } - } + }, + "required": ["projectId", "listId", "name"] } } - } - } - }, - "tags": ["PROJECTS"], - "description": "Update a specific project.\n\nOnly the params included in the operation will update the project." - }, - "delete": { - "operationId": "Delete Project", - "responses": { - "200": { - "description": "", - "content": { + }, + "x-examples": { "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" + "projectId": "5ab390311d6d82002432ec5a", + "listId": "5ab390311d6d82002432ec52", + "name": "new task" + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Created", + "id": "5ac4f2cec839ea004e18a463" + } } } } } } + }, + "tags": ["TASKS"], + "description": "Create a new task." + } + }, + "/tasks/{taskId}": { + "parameters": [ + { + "name": "taskId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } } - }, - "tags": ["PROJECTS"], - "description": "Delete a specific project." - } - }, - "/tasks": { - "get": { - "operationId": "List Tasks", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { + ], + "get": { + "operationId": "Get Task", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "object", "properties": { - "id": { "type": "string" }, - "projectId": { "type": "string" }, - "listId": { "type": "string" }, - "name": { "type": "string" }, - "desc": { "type": "string" }, + "id": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "listId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, "labels": { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } }, "comments": { "type": "array", "items": { "type": "object", "properties": { - "commentId": { "type": "string" }, - "createdAt": { "type": "integer" }, - "userId": { "type": "string" }, - "message": { "type": "string" } + "commentId": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "userId": { + "type": "string" + }, + "message": { + "type": "string" + } } } }, - "date": { "type": "integer" }, - "dueDate": { "type": "integer" }, - "userId": { "type": "string" }, - "createdAt": { "type": "integer" }, - "updatedAt": { "type": "integer" }, - "status": { "type": "integer" }, - "billable": { "type": "integer" }, - "featured": { "type": "integer" } + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + }, + "userId": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "updatedAt": { + "type": "integer" + }, + "status": { + "type": "integer" + }, + "billable": { + "type": "integer" + }, + "featured": { + "type": "integer" + } } - } - }, - "examples": { - "response": { - "value": [ - { + }, + "examples": { + "response": { + "value": { "id": "5ab3df6e1d6d82008c5777a4", "projectId": "5ab390311d6d82002432ec5a", "listId": "5ab390311d6d82002432ec53", @@ -671,616 +1333,2172 @@ "billable": 0, "featured": 1 } - ] + } } } } } - } - }, - "tags": ["TASKS"], - "description": "Get all your tasks." - }, - "post": { - "operationId": "Create Task", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "projectId": { "type": "string" }, - "listId": { "type": "string" }, - "name": { "type": "string" } - }, - "required": ["projectId", "listId", "name"] - } - } }, - "x-examples": { - "application/json": { - "projectId": "5ab390311d6d82002432ec5a", - "listId": "5ab390311d6d82002432ec52", - "name": "new task" - } - } + "tags": ["TASKS"], + "description": "Get a specific task." }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Created", - "id": "5ac4f2cec839ea004e18a463" + "delete": { + "operationId": "Delete Task", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Successfully deleted", + "id": "5aba68b1c5d438006425ad45" + } } } } } } - } - }, - "tags": ["TASKS"], - "description": "Create a new task." - } - }, - "/tasks/{taskId}": { - "parameters": [ - { - "name": "taskId", - "in": "path", - "required": true, - "schema": { "type": "string" } + }, + "tags": ["TASKS"], + "description": "Delete a specific task." } - ], - "get": { - "operationId": "Get Task", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "projectId": { "type": "string" }, - "listId": { "type": "string" }, - "name": { "type": "string" }, - "desc": { "type": "string" }, - "labels": { "type": "array", "items": { "type": "string" } }, - "comments": { - "type": "array", - "items": { - "type": "object", - "properties": { - "commentId": { "type": "string" }, - "createdAt": { "type": "integer" }, - "userId": { "type": "string" }, - "message": { "type": "string" } - } - } - }, - "date": { "type": "integer" }, - "dueDate": { "type": "integer" }, - "userId": { "type": "string" }, - "createdAt": { "type": "integer" }, - "updatedAt": { "type": "integer" }, - "status": { "type": "integer" }, - "billable": { "type": "integer" }, - "featured": { "type": "integer" } - } - }, - "examples": { - "response": { - "value": { - "id": "5ab3df6e1d6d82008c5777a4", - "projectId": "5ab390311d6d82002432ec5a", - "listId": "5ab390311d6d82002432ec53", - "name": "Business plan", - "desc": "business plan for the new project", - "labels": [ - "5ab390311d6d82002432ec58", - "5ab390311d6d82002432ec59" - ], - "comments": [ + }, + "/projects/{projectId}/times": { + "parameters": [ + { + "name": "projectId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "get": { + "operationId": "Get Project Times", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "title": "Timetracking Basic Output", + "description": "The properties that are included when fetching a list of Timetrackings.", + "allOf": [ { - "commentId": "5ab3df8c1d6d820088525aa3", - "createdAt": 1521737612, - "userId": "5a05cc5a60cea100094baf22", - "message": "no comments" + "type": "object", + "properties": {} }, { - "commentId": "5ab3df971d6d82008c5777a5", - "createdAt": 1521737623, - "userId": "5a05cc5a60cea100094baf22", - "message": "a piece of comment\n" + "title": "Timetracking Common", + "description": "The properties that are shared amongst all versions of the Timetracking model.", + "type": "object", + "properties": { + "timeId": { + "type": "string" + }, + "duration": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "costHour": { + "type": "integer" + }, + "userId": { + "type": "string" + }, + "taskId": { + "type": "string" + }, + "total": { + "type": "number" + } + }, + "x-readme-ref-name": "timeTracking-common" } ], - "date": 1521737582, - "dueDate": 1521673200, - "userId": "5a05cc5a60cea100094baf22", - "createdAt": 1521737582, - "updatedAt": 1521737582, - "status": 0, - "billable": 0, - "featured": 1 + "x-readme-ref-name": "timeTracking-output" + } + }, + "examples": { + "response": { + "value": [ + { + "timeId": "5ab3d2611d6d82005c4d2082", + "duration": 45300, + "desc": "timetracking project", + "costHour": 35, + "userId": "5a05cc5a60cea100094baf22", + "taskId": "5ab3cb7d1d6d8200440d4683", + "total": 440.41666666667 + } + ] } } } } } - } + }, + "tags": ["TIME TRACKING"], + "description": "Get all your times tracking by project." }, - "tags": ["TASKS"], - "description": "Get a specific task." - }, - "delete": { - "operationId": "Delete Task", - "responses": { - "200": { - "description": "", + "post": { + "operationId": "Create Project Time", + "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" + "duration": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "costHour": { + "type": "integer" + }, + "userId": { + "type": "string" + }, + "taskId": { + "type": "string" } - } + }, + "required": ["duration", "costHour"] } } - } - } - }, - "tags": ["TASKS"], - "description": "Delete a specific task." - } - }, - "/projects/{projectId}/times": { - "parameters": [ - { - "name": "projectId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], - "get": { - "operationId": "Get Project Times", - "responses": { - "200": { - "description": "", - "content": { + }, + "x-examples": { "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/timeTracking-output" } - }, - "examples": { - "response": { - "value": [ - { - "timeId": "5ab3d2611d6d82005c4d2082", - "duration": 45300, - "desc": "timetracking project", - "costHour": 35, - "userId": "5a05cc5a60cea100094baf22", - "taskId": "5ab3cb7d1d6d8200440d4683", - "total": 440.41666666667 + "duration": 45300, + "desc": "new timetracking", + "costHour": 35, + "userId": "5a05cc5a60cea100094baf22", + "taskId": "5ab3cb7d1d6d8200440d4683" + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Created", + "id": "5ac4f2cec839ea004e18a463" } - ] + } } } } } - } - }, - "tags": ["TIME TRACKING"], - "description": "Get all your times tracking by project." + }, + "tags": ["TIME TRACKING"], + "description": "Create a new time tracking." + } }, - "post": { - "operationId": "Create Project Time", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "duration": { "type": "integer" }, - "desc": { "type": "string" }, - "costHour": { "type": "integer" }, - "userId": { "type": "string" }, - "taskId": { "type": "string" } - }, - "required": ["duration", "costHour"] - } + "/projects/{projectId}/times/{timeTrackingId}": { + "parameters": [ + { + "name": "projectId", + "in": "path", + "required": true, + "schema": { + "type": "string" } }, - "x-examples": { - "application/json": { - "duration": 45300, - "desc": "new timetracking", - "costHour": 35, - "userId": "5a05cc5a60cea100094baf22", - "taskId": "5ab3cb7d1d6d8200440d4683" + { + "name": "timeTrackingId", + "in": "path", + "required": true, + "schema": { + "type": "string" } } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Created", - "id": "5ac4f2cec839ea004e18a463" + ], + "get": { + "operationId": "GetProjectTimes", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "title": "Timetracking Detailed Output", + "description": "The properties that are included when fetching a single Timetracking.", + "allOf": [ + { + "title": "Timetracking Basic Output", + "description": "The properties that are included when fetching a list of Timetrackings.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Timetracking Common", + "description": "The properties that are shared amongst all versions of the Timetracking model.", + "type": "object", + "properties": { + "timeId": { + "type": "string" + }, + "duration": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "costHour": { + "type": "integer" + }, + "userId": { + "type": "string" + }, + "taskId": { + "type": "string" + }, + "total": { + "type": "number" + } + }, + "x-readme-ref-name": "timeTracking-common" + } + ], + "x-readme-ref-name": "timeTracking-output" + }, + { + "type": "object", + "properties": {} + } + ], + "x-readme-ref-name": "timeTracking-output-detailed" + }, + "examples": { + "response": { + "value": { + "timeId": "5ab3d2611d6d82005c4d2082", + "duration": 45300, + "desc": "timetracking new project", + "costHour": 35, + "userId": "5a05cc5a60cea100094baf22", + "taskId": "5ab3cb7d1d6d8200440d4683", + "total": 440.41666666667 + } } } } } } - } - }, - "tags": ["TIME TRACKING"], - "description": "Create a new time tracking." - } - }, - "/projects/{projectId}/times/{timeTrackingId}": { - "parameters": [ - { - "name": "projectId", - "in": "path", - "required": true, - "schema": { "type": "string" } + }, + "tags": ["TIME TRACKING"], + "description": "Get a specific time tracking." }, - { - "name": "timeTrackingId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], - "get": { - "operationId": "GetProjectTimes", - "responses": { - "200": { - "description": "", + "put": { + "operationId": "Update Project Time", + "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/timeTracking-output-detailed" - }, - "examples": { - "response": { - "value": { - "timeId": "5ab3d2611d6d82005c4d2082", - "duration": 45300, - "desc": "timetracking new project", - "costHour": 35, - "userId": "5a05cc5a60cea100094baf22", - "taskId": "5ab3cb7d1d6d8200440d4683", - "total": 440.41666666667 + "type": "object", + "properties": { + "duration": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "costHour": { + "type": "integer" + }, + "userId": { + "type": "string" + }, + "taskId": { + "type": "string" } - } + }, + "required": ["duration", "costHour"] } } - } - } - }, - "tags": ["TIME TRACKING"], - "description": "Get a specific time tracking." - }, - "put": { - "operationId": "Update Project Time", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "duration": { "type": "integer" }, - "desc": { "type": "string" }, - "costHour": { "type": "integer" }, - "userId": { "type": "string" }, - "taskId": { "type": "string" } - }, - "required": ["duration", "costHour"] + }, + "x-examples": { + "application/json": { + "duration": 45300, + "desc": "timetracking new project", + "costHour": 35, + "userId": "5a05cc5a60cea100094baf22", + "taskId": "5ab3cb7d1d6d8200440d4683" } } }, - "x-examples": { - "application/json": { - "duration": 45300, - "desc": "timetracking new project", - "costHour": 35, - "userId": "5a05cc5a60cea100094baf22", - "taskId": "5ab3cb7d1d6d8200440d4683" + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Updated", + "id": "5ac4f2cec839ea004e18a463" + } + } + } + } + } } - } + }, + "tags": ["TIME TRACKING"], + "description": "Update a specific time tracking.\n\nOnly the params included in the operation will update the time tracking." }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5ac4f2cec839ea004e18a463" + "delete": { + "operationId": "Delete Project Time", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "examples": { + "response": { + "value": { + "status": 1, + "info": "Successfully deleted", + "id": "5aba68b1c5d438006425ad45" + } } } } } } - } - }, - "tags": ["TIME TRACKING"], - "description": "Update a specific time tracking.\n\nOnly the params included in the operation will update the time tracking." + }, + "tags": ["TIME TRACKING"], + "description": "Delete a specific time tracking." + } }, - "delete": { - "operationId": "Delete Project Time", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" + "/projects/times": { + "get": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "timeTracking": { + "type": "array", + "items": { + "type": "object", + "properties": { + "timeId": { + "type": "string" + }, + "duration": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "costHour": { + "type": "integer" + }, + "userId": { + "type": "string" + }, + "taskId": { + "type": "string" + }, + "total": { + "type": "number" + } + } + } + } + } + } + }, + "examples": { + "response": { + "value": [ + { + "id": "5ab390311d6d82002432ec5a", + "name": "Building", + "timeTracking": [ + { + "timeId": "5ab3d2611d6d82005c4d2082", + "duration": 45300, + "desc": "timetracking test", + "costHour": 35, + "userId": "5a05cc5a60cea100094baf22", + "taskId": "5ab3cb7d1d6d8200440d4683", + "total": 440.41666666667 + }, + { + "timeId": "5ab4bb421d6d820008184163", + "duration": 38760, + "desc": "first timetracking", + "costHour": 0, + "userId": "5a05cc5a60cea100094baf22", + "taskId": "5ab3cb7d1d6d8200440d4683", + "total": 0 + } + ] + } + ] } } } } } - } - }, - "tags": ["TIME TRACKING"], - "description": "Delete a specific time tracking." - } - }, - "/projects/times": { - "get": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { + }, + "operationId": "List Times", + "parameters": [ + { + "name": "start", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "end", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "archived", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "tags": ["TIME TRACKING"], + "description": "List time trackings in projects not archived from 18 months on" + } + }, + "/projects/{projectId}/summary": { + "get": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "type": "object", "properties": { - "id": { "type": "string" }, - "name": { "type": "string" }, - "timeTracking": { - "type": "array", - "items": { - "type": "object", - "properties": { - "timeId": { "type": "string" }, - "duration": { "type": "integer" }, - "desc": { "type": "string" }, - "costHour": { "type": "integer" }, - "userId": { "type": "string" }, - "taskId": { "type": "string" }, - "total": { "type": "number" } + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "projectEvolution": { + "type": "object", + "properties": { + "tasks": { + "type": "object", + "properties": { + "total": { + "type": "integer" + }, + "completed": { + "type": "integer" + } + } + }, + "dueDate": { + "type": "integer" + } + } + }, + "profitability": { + "type": "object", + "properties": { + "sales": { + "type": "number" + }, + "expenses": { + "type": "object", + "properties": { + "documents": { + "type": "integer" + }, + "personnel": { + "type": "number" + }, + "total": { + "type": "number" + } + } + }, + "profit": { + "type": "number" + } + } + }, + "economicStatus": { + "type": "object", + "properties": { + "sales": { + "type": "number" + }, + "quoted": { + "type": "integer" + }, + "difference": { + "type": "number" + }, + "estimatePrice": { + "type": "integer" + }, + "billed": { + "type": "number" + }, + "collected": { + "type": "integer" + }, + "remaining": { + "type": "number" } } } } - } - }, - "examples": { - "response": { - "value": [ - { - "id": "5ab390311d6d82002432ec5a", + }, + "examples": { + "response": { + "value": { "name": "Building", - "timeTracking": [ - { - "timeId": "5ab3d2611d6d82005c4d2082", - "duration": 45300, - "desc": "timetracking test", - "costHour": 35, - "userId": "5a05cc5a60cea100094baf22", - "taskId": "5ab3cb7d1d6d8200440d4683", - "total": 440.41666666667 + "desc": "Bulding in Barcelona", + "projectEvolution": { + "tasks": { + "total": 6, + "completed": 3 }, - { - "timeId": "5ab4bb421d6d820008184163", - "duration": 38760, - "desc": "first timetracking", - "costHour": 0, - "userId": "5a05cc5a60cea100094baf22", - "taskId": "5ab3cb7d1d6d8200440d4683", - "total": 0 - } - ] + "dueDate": 0 + }, + "profitability": { + "sales": 1117.18, + "expenses": { + "documents": 200, + "personnel": 15603.333333333, + "total": 15803.333333333 + }, + "profit": -14686.153333333 + }, + "economicStatus": { + "sales": 1117.18, + "quoted": 34433, + "difference": -33315.82, + "estimatePrice": 3453456, + "billed": 1351.79, + "collected": 290, + "remaining": 1061.79 + } } - ] + } } } } } - } + }, + "tags": ["PROJECTS"], + "description": "Get a specific project summary." }, - "operationId": "List Times", "parameters": [ { - "name": "start", - "in": "query", - "required": false, - "schema": { "type": "integer" } - }, - { - "name": "end", - "in": "query", - "required": false, - "schema": { "type": "integer" } - }, - { - "name": "archived", - "in": "query", - "required": false, - "schema": { "type": "boolean" } + "name": "projectId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } } - ], - "tags": ["TIME TRACKING"], - "description": "List time trackings in projects not archived from 18 months on" + ] } }, - "/projects/{projectId}/summary": { - "get": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "desc": { "type": "string" }, - "projectEvolution": { - "type": "object", - "properties": { - "tasks": { - "type": "object", - "properties": { - "total": { "type": "integer" }, - "completed": { "type": "integer" } - } - }, - "dueDate": { "type": "integer" } - } - }, - "profitability": { - "type": "object", - "properties": { - "sales": { "type": "number" }, - "expenses": { - "type": "object", - "properties": { - "documents": { "type": "integer" }, - "personnel": { "type": "number" }, - "total": { "type": "number" } - } - }, - "profit": { "type": "number" } - } - }, - "economicStatus": { - "type": "object", - "properties": { - "sales": { "type": "number" }, - "quoted": { "type": "integer" }, - "difference": { "type": "number" }, - "estimatePrice": { "type": "integer" }, - "billed": { "type": "number" }, - "collected": { "type": "integer" }, - "remaining": { "type": "number" } - } - } + "x-samples-enabled": true, + "tags": [ + { + "name": "PROJECTS" + }, + { + "name": "TASKS" + }, + { + "name": "TIME TRACKING" + } + ], + "security": [ + { + "Auth": [] + } + ], + "servers": [ + { + "url": "https://api.holded.com/api/projects/v1" + } + ], + "components": { + "responses": { + "Standard_Error": { + "description": "Something went wrong", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" } - }, - "examples": { - "response": { - "value": { - "name": "Building", - "desc": "Bulding in Barcelona", - "projectEvolution": { - "tasks": { "total": 6, "completed": 3 }, - "dueDate": 0 - }, - "profitability": { - "sales": 1117.18, - "expenses": { - "documents": 200, - "personnel": 15603.333333333, - "total": 15803.333333333 - }, - "profit": -14686.153333333 - }, - "economicStatus": { - "sales": 1117.18, - "quoted": 34433, - "difference": -33315.82, - "estimatePrice": 3453456, - "billed": 1351.79, - "collected": 290, - "remaining": 1061.79 - } - } + } + }, + "examples": { + "response": { + "value": { + "status": 0, + "info": "Not found" } } } } } - }, - "tags": ["PROJECTS"], - "description": "Get a specific project summary." + } }, - "parameters": [ - { - "name": "projectId", - "in": "path", - "required": true, - "schema": { "type": "string" } + "securitySchemes": { + "Auth": { + "type": "apiKey", + "name": "key", + "in": "header" } - ] + }, + "schemas": { + "project-common": { + "title": "Project Common", + "description": "The properties that are shared amongst all versions of the Project model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "category": { + "type": "integer" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + }, + "status": { + "type": "integer" + }, + "lists": { + "type": "array", + "items": { + "type": "object", + "properties": { + "listId": { + "type": "string" + }, + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + } + } + } + }, + "billable": { + "type": "integer" + }, + "expenses": { + "type": "object", + "properties": { + "docId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "subtotal": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "invoiceNum": { + "type": "string" + }, + "total": { + "type": "integer" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + } + } + }, + "estimates": { + "type": "array", + "items": { + "type": "object", + "properties": { + "docId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "subtotal": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "invoiceNum": { + "type": "string" + }, + "total": { + "type": "number" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + } + } + } + }, + "sales": { + "type": "array", + "items": { + "type": "object", + "properties": { + "docId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "subtotal": { + "type": "number" + }, + "desc": { + "type": "string" + }, + "invoiceNum": { + "type": "string" + }, + "total": { + "type": "integer" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + } + } + } + }, + "timeTracking": { + "type": "object", + "properties": { + "timeId": { + "type": "string" + }, + "time": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "costHour": { + "type": "integer" + }, + "userId": { + "type": "string" + }, + "taskId": { + "type": "string" + }, + "total": { + "type": "number" + } + } + }, + "price": { + "type": "integer" + }, + "numberOfTasks": { + "type": "integer" + }, + "completedTasks": { + "type": "integer" + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "labelId": { + "type": "string" + }, + "labelName": { + "type": "string" + }, + "labelColor": { + "type": "string" + } + } + } + } + }, + "x-readme-ref-name": "project-common" + }, + "project-input": { + "title": "Project Input", + "description": "The properties that are allowed when creating or updating a Project.", + "allOf": [ + { + "title": "Project Common", + "description": "The properties that are shared amongst all versions of the Project model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "category": { + "type": "integer" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + }, + "status": { + "type": "integer" + }, + "lists": { + "type": "array", + "items": { + "type": "object", + "properties": { + "listId": { + "type": "string" + }, + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + } + } + } + }, + "billable": { + "type": "integer" + }, + "expenses": { + "type": "object", + "properties": { + "docId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "subtotal": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "invoiceNum": { + "type": "string" + }, + "total": { + "type": "integer" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + } + } + }, + "estimates": { + "type": "array", + "items": { + "type": "object", + "properties": { + "docId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "subtotal": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "invoiceNum": { + "type": "string" + }, + "total": { + "type": "number" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + } + } + } + }, + "sales": { + "type": "array", + "items": { + "type": "object", + "properties": { + "docId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "subtotal": { + "type": "number" + }, + "desc": { + "type": "string" + }, + "invoiceNum": { + "type": "string" + }, + "total": { + "type": "integer" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + } + } + } + }, + "timeTracking": { + "type": "object", + "properties": { + "timeId": { + "type": "string" + }, + "time": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "costHour": { + "type": "integer" + }, + "userId": { + "type": "string" + }, + "taskId": { + "type": "string" + }, + "total": { + "type": "number" + } + } + }, + "price": { + "type": "integer" + }, + "numberOfTasks": { + "type": "integer" + }, + "completedTasks": { + "type": "integer" + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "labelId": { + "type": "string" + }, + "labelName": { + "type": "string" + }, + "labelColor": { + "type": "string" + } + } + } + } + }, + "x-readme-ref-name": "project-common" + }, + { + "type": "object", + "properties": {} + } + ], + "x-readme-ref-name": "project-input" + }, + "project-output": { + "title": "Project Basic Output", + "description": "The properties that are included when fetching a list of Projects.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Project Common", + "description": "The properties that are shared amongst all versions of the Project model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "category": { + "type": "integer" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + }, + "status": { + "type": "integer" + }, + "lists": { + "type": "array", + "items": { + "type": "object", + "properties": { + "listId": { + "type": "string" + }, + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + } + } + } + }, + "billable": { + "type": "integer" + }, + "expenses": { + "type": "object", + "properties": { + "docId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "subtotal": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "invoiceNum": { + "type": "string" + }, + "total": { + "type": "integer" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + } + } + }, + "estimates": { + "type": "array", + "items": { + "type": "object", + "properties": { + "docId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "subtotal": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "invoiceNum": { + "type": "string" + }, + "total": { + "type": "number" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + } + } + } + }, + "sales": { + "type": "array", + "items": { + "type": "object", + "properties": { + "docId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "subtotal": { + "type": "number" + }, + "desc": { + "type": "string" + }, + "invoiceNum": { + "type": "string" + }, + "total": { + "type": "integer" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + } + } + } + }, + "timeTracking": { + "type": "object", + "properties": { + "timeId": { + "type": "string" + }, + "time": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "costHour": { + "type": "integer" + }, + "userId": { + "type": "string" + }, + "taskId": { + "type": "string" + }, + "total": { + "type": "number" + } + } + }, + "price": { + "type": "integer" + }, + "numberOfTasks": { + "type": "integer" + }, + "completedTasks": { + "type": "integer" + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "labelId": { + "type": "string" + }, + "labelName": { + "type": "string" + }, + "labelColor": { + "type": "string" + } + } + } + } + }, + "x-readme-ref-name": "project-common" + } + ], + "x-readme-ref-name": "project-output" + }, + "project-output-detailed": { + "title": "Project Detailed Output", + "description": "The properties that are included when fetching a single Project.", + "allOf": [ + { + "title": "Project Basic Output", + "description": "The properties that are included when fetching a list of Projects.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Project Common", + "description": "The properties that are shared amongst all versions of the Project model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "category": { + "type": "integer" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + }, + "status": { + "type": "integer" + }, + "lists": { + "type": "array", + "items": { + "type": "object", + "properties": { + "listId": { + "type": "string" + }, + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + } + } + } + }, + "billable": { + "type": "integer" + }, + "expenses": { + "type": "object", + "properties": { + "docId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "subtotal": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "invoiceNum": { + "type": "string" + }, + "total": { + "type": "integer" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + } + } + }, + "estimates": { + "type": "array", + "items": { + "type": "object", + "properties": { + "docId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "subtotal": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "invoiceNum": { + "type": "string" + }, + "total": { + "type": "number" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + } + } + } + }, + "sales": { + "type": "array", + "items": { + "type": "object", + "properties": { + "docId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "subtotal": { + "type": "number" + }, + "desc": { + "type": "string" + }, + "invoiceNum": { + "type": "string" + }, + "total": { + "type": "integer" + }, + "contactId": { + "type": "string" + }, + "contactName": { + "type": "string" + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + } + } + } + }, + "timeTracking": { + "type": "object", + "properties": { + "timeId": { + "type": "string" + }, + "time": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "costHour": { + "type": "integer" + }, + "userId": { + "type": "string" + }, + "taskId": { + "type": "string" + }, + "total": { + "type": "number" + } + } + }, + "price": { + "type": "integer" + }, + "numberOfTasks": { + "type": "integer" + }, + "completedTasks": { + "type": "integer" + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "labelId": { + "type": "string" + }, + "labelName": { + "type": "string" + }, + "labelColor": { + "type": "string" + } + } + } + } + }, + "x-readme-ref-name": "project-common" + } + ], + "x-readme-ref-name": "project-output" + }, + { + "type": "object", + "properties": {} + } + ], + "x-readme-ref-name": "project-output-detailed" + }, + "task-common": { + "title": "Task Common", + "description": "The properties that are shared amongst all versions of the Task model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "string" + } + }, + "comments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "commentId": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "userId": { + "type": "string" + }, + "message": { + "type": "string" + } + } + } + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + }, + "userId": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "updatedAt": { + "type": "integer" + }, + "status": { + "type": "integer" + }, + "billable": { + "type": "integer" + }, + "featured": { + "type": "integer" + } + }, + "x-readme-ref-name": "task-common" + }, + "task-input": { + "title": "Task Input", + "description": "The properties that are allowed when creating or updating a Task.", + "allOf": [ + { + "title": "Task Common", + "description": "The properties that are shared amongst all versions of the Task model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "string" + } + }, + "comments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "commentId": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "userId": { + "type": "string" + }, + "message": { + "type": "string" + } + } + } + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + }, + "userId": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "updatedAt": { + "type": "integer" + }, + "status": { + "type": "integer" + }, + "billable": { + "type": "integer" + }, + "featured": { + "type": "integer" + } + }, + "x-readme-ref-name": "task-common" + }, + { + "type": "object", + "properties": {} + } + ], + "x-readme-ref-name": "task-input" + }, + "task-output": { + "title": "Task Basic Output", + "description": "The properties that are included when fetching a list of Tasks.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Task Common", + "description": "The properties that are shared amongst all versions of the Task model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "string" + } + }, + "comments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "commentId": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "userId": { + "type": "string" + }, + "message": { + "type": "string" + } + } + } + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + }, + "userId": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "updatedAt": { + "type": "integer" + }, + "status": { + "type": "integer" + }, + "billable": { + "type": "integer" + }, + "featured": { + "type": "integer" + } + }, + "x-readme-ref-name": "task-common" + } + ], + "x-readme-ref-name": "task-output" + }, + "task-output-detailed": { + "title": "Task Detailed Output", + "description": "The properties that are included when fetching a single Task.", + "allOf": [ + { + "title": "Task Basic Output", + "description": "The properties that are included when fetching a list of Tasks.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Task Common", + "description": "The properties that are shared amongst all versions of the Task model.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "string" + } + }, + "comments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "commentId": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "userId": { + "type": "string" + }, + "message": { + "type": "string" + } + } + } + }, + "date": { + "type": "integer" + }, + "dueDate": { + "type": "integer" + }, + "userId": { + "type": "string" + }, + "createdAt": { + "type": "integer" + }, + "updatedAt": { + "type": "integer" + }, + "status": { + "type": "integer" + }, + "billable": { + "type": "integer" + }, + "featured": { + "type": "integer" + } + }, + "x-readme-ref-name": "task-common" + } + ], + "x-readme-ref-name": "task-output" + }, + { + "type": "object", + "properties": {} + } + ], + "x-readme-ref-name": "task-output-detailed" + }, + "timeTracking-common": { + "title": "Timetracking Common", + "description": "The properties that are shared amongst all versions of the Timetracking model.", + "type": "object", + "properties": { + "timeId": { + "type": "string" + }, + "duration": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "costHour": { + "type": "integer" + }, + "userId": { + "type": "string" + }, + "taskId": { + "type": "string" + }, + "total": { + "type": "number" + } + }, + "x-readme-ref-name": "timeTracking-common" + }, + "timeTracking-input": { + "title": "Timetracking Input", + "description": "The properties that are allowed when creating or updating a Timetracking.", + "allOf": [ + { + "title": "Timetracking Common", + "description": "The properties that are shared amongst all versions of the Timetracking model.", + "type": "object", + "properties": { + "timeId": { + "type": "string" + }, + "duration": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "costHour": { + "type": "integer" + }, + "userId": { + "type": "string" + }, + "taskId": { + "type": "string" + }, + "total": { + "type": "number" + } + }, + "x-readme-ref-name": "timeTracking-common" + }, + { + "type": "object", + "properties": {} + } + ], + "x-readme-ref-name": "timeTracking-input" + }, + "timeTracking-output": { + "title": "Timetracking Basic Output", + "description": "The properties that are included when fetching a list of Timetrackings.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Timetracking Common", + "description": "The properties that are shared amongst all versions of the Timetracking model.", + "type": "object", + "properties": { + "timeId": { + "type": "string" + }, + "duration": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "costHour": { + "type": "integer" + }, + "userId": { + "type": "string" + }, + "taskId": { + "type": "string" + }, + "total": { + "type": "number" + } + }, + "x-readme-ref-name": "timeTracking-common" + } + ], + "x-readme-ref-name": "timeTracking-output" + }, + "timeTracking-output-detailed": { + "title": "Timetracking Detailed Output", + "description": "The properties that are included when fetching a single Timetracking.", + "allOf": [ + { + "title": "Timetracking Basic Output", + "description": "The properties that are included when fetching a list of Timetrackings.", + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "title": "Timetracking Common", + "description": "The properties that are shared amongst all versions of the Timetracking model.", + "type": "object", + "properties": { + "timeId": { + "type": "string" + }, + "duration": { + "type": "integer" + }, + "desc": { + "type": "string" + }, + "costHour": { + "type": "integer" + }, + "userId": { + "type": "string" + }, + "taskId": { + "type": "string" + }, + "total": { + "type": "number" + } + }, + "x-readme-ref-name": "timeTracking-common" + } + ], + "x-readme-ref-name": "timeTracking-output" + }, + { + "type": "object", + "properties": {} + } + ], + "x-readme-ref-name": "timeTracking-output-detailed" + } + } + }, + "x-readme": { + "explorer-enabled": true, + "proxy-enabled": true } } diff --git a/forms-bridge/addons/holded/data/swagger/team.json b/forms-bridge/addons/holded/data/swagger/team.json index f68f7e4a..215d75c4 100644 --- a/forms-bridge/addons/holded/data/swagger/team.json +++ b/forms-bridge/addons/holded/data/swagger/team.json @@ -1,176 +1,492 @@ { - "/employees": { - "get": { - "tags": ["Employees"], - "summary": "List all your employees", - "operationId": "listEmployees", - "description": "List all the employees you have in your app.\n", - "parameters": [ - { - "in": "query", - "name": "page", - "description": "the response is paginated and limited to 500 employees,", - "required": false, - "schema": { "type": "number" } - } - ], - "responses": { - "200": { "description": "search results matching criteria" }, - "400": { "description": "bad input parameter" } - } + "openapi": "3.0.0", + "info": { + "description": "The Holded's Team API is organized around REST, using HTTP responses code to keep you informed about what's going on. Our endpoints will returns you metada in JSON format directly from Holded.", + "version": "1.0.1", + "title": "Team API", + "contact": { + "email": "developers@holded.com" + } + }, + "x-samples-languages": ["curl", "node", "ruby", "python"], + "security": [ + { + "Auth": [] + } + ], + "tags": [ + { + "name": "Employees", + "description": "CRUD Employees" }, - "post": { - "tags": ["Employees"], - "summary": "Create a new employee", - "operationId": "createEmployee", - "description": "Create a new employee in you app.", - "requestBody": { - "content": { - "application/json": { + { + "name": "Employees' time-tracking", + "description": "CRUD employees' time-tracking" + } + ], + "paths": { + "/employees": { + "get": { + "tags": ["Employees"], + "summary": "List all your employees", + "operationId": "listEmployees", + "description": "List all the employees you have in your app.\n", + "parameters": [ + { + "in": "query", + "name": "page", + "description": "the response is paginated and limited to 500 employees,", + "required": false, "schema": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "lastName": { "type": "string" }, - "email": { "type": "string" }, - "sendInvite": { "type": "boolean" } - }, - "required": ["name", "lastName", "email"] + "type": "number" } } - }, - "description": "Employee to add" + ], + "responses": { + "200": { + "description": "search results matching criteria" + }, + "400": { + "description": "bad input parameter" + } + } }, - "responses": { - "201": { - "description": "employee created", + "post": { + "tags": ["Employees"], + "summary": "Create a new employee", + "operationId": "createEmployee", + "description": "Create a new employee in you app.", + "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } + "name": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "sendInvite": { + "type": "boolean" + } + }, + "required": ["name", "lastName", "email"] + } + } + }, + "description": "Employee to add" + }, + "responses": { + "201": { + "description": "employee created", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } } } } } } } - } - }, - "/employees/{employeeId}": { - "parameters": [ - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], - "get": { - "tags": ["Employees"], - "summary": "Get an Employee", - "operationId": "Get a Employee", - "description": "List all the employees you have in your app.\n", - "responses": { - "200": { "description": "search results matching criteria" } - } }, - "put": { - "tags": ["Employees"], - "summary": "Update an employee", - "operationId": "Update Employee", - "description": "Update an employee.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "lastName": { "type": "string" }, - "mainEmail": { "type": "string" }, - "email": { "type": "string" }, - "nationality": { "type": "string" }, - "phone": { "type": "string" }, - "mobile": { "type": "string" }, - "dateOfBirth": { - "type": "string", - "description": "dd/mm/yyyy" - }, - "gender": { "type": "string", "description": "male or female" }, - "mainLanguage": { - "type": "string", - "description": "options = English, English(UK), English(US), English(Canada), Spanish, Spanish(Spain), Spanish(Mexico), Spanish(Argentina), Spanish(Colombia), Portuguese, Portuguese(Portugal), Portuguese(Brazil), Catalan, Galician, Euskera, French, German(Deutsch), Italian, Greek, Swedish, Dutch, Finnish, Irish, Norwegian, Danish, Czech, Croatian, Russian, Polish" - }, - "iban": { "type": "string" }, - "timeOffPolicyId": { "type": "string" }, - "timeOffSupervisors": { - "type": "array", - "items": { "type": "string" }, - "description": "containing employeesId" - }, - "reportingTo": { - "type": "string", - "description": "should be an employeeId" - }, - "code": { "type": "string", "description": "nif" }, - "socialSecurityNum": { "type": "string" }, - "address": { + "/employees/{employeeId}": { + "parameters": [ + { + "name": "employeeId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "get": { + "tags": ["Employees"], + "summary": "Get an Employee", + "operationId": "Get a Employee", + "description": "List all the employees you have in your app.\n", + "responses": { + "200": { + "description": "search results matching criteria" + } + } + }, + "put": { + "tags": ["Employees"], + "summary": "Update an employee", + "operationId": "Update Employee", + "description": "Update an employee.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "mainEmail": { + "type": "string" + }, + "email": { + "type": "string" + }, + "nationality": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "mobile": { + "type": "string" + }, + "dateOfBirth": { + "type": "string", + "description": "dd/mm/yyyy" + }, + "gender": { + "type": "string", + "description": "male or female" + }, + "mainLanguage": { + "type": "string", + "description": "options = English, English(UK), English(US), English(Canada), Spanish, Spanish(Spain), Spanish(Mexico), Spanish(Argentina), Spanish(Colombia), Portuguese, Portuguese(Portugal), Portuguese(Brazil), Catalan, Galician, Euskera, French, German(Deutsch), Italian, Greek, Swedish, Dutch, Finnish, Irish, Norwegian, Danish, Czech, Croatian, Russian, Polish" + }, + "iban": { + "type": "string" + }, + "timeOffPolicyId": { + "type": "string" + }, + "timeOffSupervisors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "containing employeesId" + }, + "reportingTo": { + "type": "string", + "description": "should be an employeeId" + }, + "code": { + "type": "string", + "description": "nif" + }, + "socialSecurityNum": { + "type": "string" + }, + "address": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "city": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "province": { + "type": "string" + }, + "country": { + "type": "string" + } + } + }, + "fiscalResidence": { + "type": "boolean" + }, + "fiscalAddress": { + "type": "object", + "description": "You need to set fiscalResidence to false in order to be able to send a fiscalAdress", + "properties": { + "idNum": { + "type": "string" + }, + "address": { + "type": "string" + }, + "city": { + "type": "string" + }, + "cityOfBirth": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "province": { + "type": "string" + }, + "country": { + "type": "string" + }, + "countryOfBirth": { + "type": "string" + }, + "endSituationDate": { + "type": "string" + } + } + }, + "workplace": { + "type": "string", + "description": "workplace ID" + }, + "teams": { + "type": "array", + "description": "array of strings containing team ID's", + "items": { + "type": "string" + } + }, + "holdedUserId": { + "type": "string" + } + } + } + } + }, + "description": "Employee to update" + }, + "responses": { + "200": { + "description": "employee updated", + "content": { + "application/json": { + "schema": { "type": "object", "properties": { - "address": { "type": "string" }, - "city": { "type": "string" }, - "postalCode": { "type": "string" }, - "province": { "type": "string" }, - "country": { "type": "string" } + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "tags": ["Employees"], + "summary": "Delete an Employee", + "operationId": "Delete a Employee", + "description": "Delete an employee.\n", + "responses": { + "200": { + "description": "Deleted" + } + } + } + }, + "/employees/times": { + "get": { + "tags": ["Employees' time-tracking"], + "summary": "List all the time-trackings of all your employees", + "operationId": "listTimes", + "description": "List all the time-trackings of all your employees.\n", + "parameters": [ + { + "in": "query", + "name": "page", + "description": "the response is paginated and limited to 500 employees,", + "required": false, + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "search results matching criteria" + }, + "400": { + "description": "bad input parameter" + } + } + } + }, + "/employees/times/{employeeTimeId}": { + "parameters": [ + { + "name": "employeeTimeId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "get": { + "tags": ["Employees' time-tracking"], + "summary": "Get a specific time-tracking", + "operationId": "getTime", + "description": "Get a specific time-tracking by Id.\n", + "responses": { + "200": { + "description": "search results matching criteria" + }, + "400": { + "description": "bad input parameter" + } + } + }, + "put": { + "tags": ["Employees' time-tracking"], + "summary": "Update a time-tracking", + "operationId": "UpdateTime", + "description": "Update a time-tracking.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "startTmp": { + "type": "string" + }, + "endTmp": { + "type": "string" } }, - "fiscalResidence": { "type": "boolean" }, - "fiscalAddress": { + "required": ["startTmp", "endTmp"] + } + } + }, + "description": "Employee to update" + }, + "responses": { + "200": { + "description": "time-tracking updated", + "content": { + "application/json": { + "schema": { "type": "object", - "description": "You need to set fiscalResidence to false in order to be able to send a fiscalAdress", "properties": { - "idNum": { "type": "string" }, - "address": { "type": "string" }, - "city": { "type": "string" }, - "cityOfBirth": { "type": "string" }, - "postalCode": { "type": "string" }, - "province": { "type": "string" }, - "country": { "type": "string" }, - "countryOfBirth": { "type": "string" }, - "endSituationDate": { "type": "string" } + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } } - }, - "workplace": { - "type": "string", - "description": "workplace ID" - }, - "teams": { - "type": "array", - "description": "array of strings containing team ID's", - "items": { "type": "string" } - }, - "holdedUserId": { "type": "string" } + } } } } - }, - "description": "Employee to update" + } }, - "responses": { - "200": { - "description": "employee updated", + "delete": { + "tags": ["Employees' time-tracking"], + "summary": "Delete a time-tracking", + "operationId": "deleteTime", + "description": "Delete a time-tracking.\n", + "responses": { + "200": { + "description": "Deleted" + } + } + } + }, + "/employees/{employeeId}/times": { + "parameters": [ + { + "name": "employeeId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "get": { + "tags": ["Employees' time-tracking"], + "summary": "List all the time-trackings of a single employee", + "operationId": "listemployeeTimes", + "description": "List all the time-trackings of a single employee.\n", + "responses": { + "200": { + "description": "search results matching criteria" + }, + "400": { + "description": "bad input parameter" + } + } + }, + "post": { + "tags": ["Employees' time-tracking"], + "summary": "Create a time-tracking for an specific employee", + "operationId": "createEmployeeTime", + "description": "Create a time-tracking for an specific employee.", + "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } + "startTmp": { + "type": "string" + }, + "endTmp": { + "type": "string" + } + }, + "required": ["startTmp", "endTmp"] + } + } + }, + "description": "Employee's time to add" + }, + "responses": { + "201": { + "description": "employee's time-tracking created", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } } } } @@ -178,85 +494,116 @@ } } }, - "delete": { - "tags": ["Employees"], - "summary": "Delete an Employee", - "operationId": "Delete a Employee", - "description": "Delete an employee.\n", - "responses": { "200": { "description": "Deleted" } } - } - }, - "/employees/times": { - "get": { - "tags": ["Employees' time-tracking"], - "summary": "List all the time-trackings of all your employees", - "operationId": "listTimes", - "description": "List all the time-trackings of all your employees.\n", + "/employees/{employeeId}/times/clockin": { "parameters": [ { - "in": "query", - "name": "page", - "description": "the response is paginated and limited to 500 employees,", - "required": false, - "schema": { "type": "number" } + "name": "employeeId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } } ], - "responses": { - "200": { "description": "search results matching criteria" }, - "400": { "description": "bad input parameter" } - } - } - }, - "/employees/times/{employeeTimeId}": { - "parameters": [ - { - "name": "employeeTimeId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], - "get": { - "tags": ["Employees' time-tracking"], - "summary": "Get a specific time-tracking", - "operationId": "getTime", - "description": "Get a specific time-tracking by Id.\n", - "responses": { - "200": { "description": "search results matching criteria" }, - "400": { "description": "bad input parameter" } + "post": { + "tags": ["Employees' time-tracking"], + "summary": "Employee clock-in", + "operationId": "employeeClockin", + "description": "Start counting employee time-tracking.\n", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "location": { + "type": "string" + } + } + } + } + }, + "description": "Employee's time to add" + }, + "responses": { + "201": { + "description": "employee's time-tracking starts", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } + } + } + } + } + } } }, - "put": { - "tags": ["Employees' time-tracking"], - "summary": "Update a time-tracking", - "operationId": "UpdateTime", - "description": "Update a time-tracking.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "startTmp": { "type": "string" }, - "endTmp": { "type": "string" } - }, - "required": ["startTmp", "endTmp"] - } + "/employees/{employeeId}/times/clockout": { + "parameters": [ + { + "name": "employeeId", + "in": "path", + "required": true, + "schema": { + "type": "string" } - }, - "description": "Employee to update" - }, - "responses": { - "200": { - "description": "time-tracking updated", + } + ], + "post": { + "tags": ["Employees' time-tracking"], + "summary": "Employee clock-out", + "operationId": "employeeClockout", + "description": "End counting employee time-tracking.\n", + "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } + "latitude": { + "type": "string", + "description": "Eg. -7.45556" + }, + "longitude": { + "type": "string", + "description": "Eg. 55.55765" + } + } + } + } + }, + "description": "Employee's time to add" + }, + "responses": { + "201": { + "description": "employee's time-tracking ends", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } } } } @@ -264,108 +611,121 @@ } } }, - "delete": { - "tags": ["Employees' time-tracking"], - "summary": "Delete a time-tracking", - "operationId": "deleteTime", - "description": "Delete a time-tracking.\n", - "responses": { "200": { "description": "Deleted" } } - } - }, - "/employees/{employeeId}/times": { - "parameters": [ - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], - "get": { - "tags": ["Employees' time-tracking"], - "summary": "List all the time-trackings of a single employee", - "operationId": "listemployeeTimes", - "description": "List all the time-trackings of a single employee.\n", - "responses": { - "200": { "description": "search results matching criteria" }, - "400": { "description": "bad input parameter" } - } - }, - "post": { - "tags": ["Employees' time-tracking"], - "summary": "Create a time-tracking for an specific employee", - "operationId": "createEmployeeTime", - "description": "Create a time-tracking for an specific employee.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "startTmp": { "type": "string" }, - "endTmp": { "type": "string" } - }, - "required": ["startTmp", "endTmp"] - } + "/employees/{employeeId}/times/pause": { + "parameters": [ + { + "name": "employeeId", + "in": "path", + "required": true, + "schema": { + "type": "string" } - }, - "description": "Employee's time to add" - }, - "responses": { - "201": { - "description": "employee's time-tracking created", + } + ], + "post": { + "tags": ["Employees' time-tracking"], + "summary": "Employee time-tracking pause", + "operationId": "employeePause", + "description": "Pause employee time-tracking.\n", + "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } + "latitude": { + "type": "string", + "description": "Eg. -7.45556" + }, + "longitude": { + "type": "string", + "description": "Eg. 55.55765" + } + } + } + } + }, + "description": "Employee's geolocation info" + }, + "responses": { + "201": { + "description": "employee's time-tracking pauses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } } } } } } } - } - }, - "/employees/{employeeId}/times/clockin": { - "parameters": [ - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], - "post": { - "tags": ["Employees' time-tracking"], - "summary": "Employee clock-in", - "operationId": "employeeClockin", - "description": "Start counting employee time-tracking.\n", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { "location": { "type": "string" } } - } + }, + "/employees/{employeeId}/times/unpause": { + "parameters": [ + { + "name": "employeeId", + "in": "path", + "required": true, + "schema": { + "type": "string" } - }, - "description": "Employee's time to add" - }, - "responses": { - "201": { - "description": "employee's time-tracking starts", + } + ], + "post": { + "tags": ["Employees' time-tracking"], + "summary": "Employee time-tracking unpause", + "operationId": "employeeUnpause", + "description": "Unpause employee time-tracking.\n", + "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } + "latitude": { + "type": "string", + "description": "Eg. -7.45556" + }, + "longitude": { + "type": "string", + "description": "Eg. 55.55765" + } + } + } + } + }, + "description": "Employee's geolocation info" + }, + "responses": { + "200": { + "description": "employee's time-tracking continues", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "info": { + "type": "string" + }, + "id": { + "type": "string" + } + } } } } @@ -374,50 +734,39 @@ } } }, - "/employees/{employeeId}/times/clockout": { - "parameters": [ - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { "type": "string" } - } - ], - "post": { - "tags": ["Employees' time-tracking"], - "summary": "Employee clock-out", - "operationId": "employeeClockout", - "description": "End counting employee time-tracking.\n", - "requestBody": { + "servers": [ + { + "url": "https://api.holded.com/api/team/v1" + } + ], + "components": { + "requestBodies": { + "employeePauseEmployee": { "content": { "application/json": { "schema": { "type": "object", "properties": { - "latitude": { "type": "string", "description": "Eg. -7.45556" }, - "longitude": { "type": "string", "description": "Eg. 55.55765" } - } - } - } - }, - "description": "Employee's time to add" - }, - "responses": { - "201": { - "description": "employee's time-tracking ends", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { "type": "integer" }, - "info": { "type": "string" }, - "id": { "type": "string" } + "latitude": { + "type": "string", + "description": "Eg. -7.45556" + }, + "longitude": { + "type": "string", + "description": "Eg. 55.55765" } } } } - } + }, + "description": "Employee's geolocation info" + } + }, + "securitySchemes": { + "Auth": { + "type": "apiKey", + "name": "key", + "in": "header" } } } From a4063a1de1bf961f737397e6eaf0297edb73d969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Garc=C3=ADa?= Date: Fri, 19 Sep 2025 15:16:34 +0200 Subject: [PATCH 02/18] feat: add openapi spec reader --- includes/class-openapi.php | 142 +++++++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 includes/class-openapi.php diff --git a/includes/class-openapi.php b/includes/class-openapi.php new file mode 100644 index 00000000..451684a5 --- /dev/null +++ b/includes/class-openapi.php @@ -0,0 +1,142 @@ +data = $data; + $this->version = $data['openapi']; + } + + public function path($path) + { + $path = self::parse_path($path); + + foreach ($this->data['paths'] as $name => $spec) { + if (preg_match_all('/{([^}]+)}/', $name, $matches)) { + $regexp = $name; + + foreach ($matches[0] as $match) { + $regexp = str_replace($match, '[^\/]+', $regexp); + } + + if (preg_match('$' . $regexp . '$', $path)) { + return $spec; + } + } elseif ($path === $name) { + return $spec; + } + } + } + + public function encoding($path, $method) + { + $path = $this->path($path); + $content = $path[$method]['requestBody']['content'] ?? null; + + if (!$content) { + return; + } + + return array_keys($content); + } + + public function params($path, $method = null) + { + $path = self::parse_path($path); + + $path_spec = $this->path($path); + if (!$path_spec) { + return; + } + + $parameters = $path_spec['parameters'] ?? null; + if (!$parameters) { + if (!$method) { + return; + } + + $parameters = []; + } + + $method_spec = $path_spec[$method] ?? null; + if ($method && !$method_spec) { + return; + } + + $parameters = array_merge( + $parameters, + $method_spec['parameters'] ?? [] + ); + + if ($body = $method_spec['requestBody'] ?? null) { + $parameters = array_merge($parameters, self::body_to_params($body)); + } + + return $parameters; + } + + private static function body_to_params($spec) + { + $parameters = []; + foreach ($spec['content'] as $encoding => $spec) { + foreach ($spec['shema']['properties'] as $name => $defn) { + $parameters[] = array_merge( + [ + 'name' => $name, + 'encoding' => $encoding, + ], + $defn + ); + } + } + + return $parameters; + } + + private static function parse_path($path) + { + $url = parse_url($path); + if (empty($url['path'])) { + return '/'; + } + + $path = strpos($path, '/') !== 0 ? '/' . $path : $path; + return preg_replace('/\/+$/', '', $path); + } +} From 3f480424cb90ad215b9b0c5c7b28877773b32b2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Garc=C3=ADa?= Date: Mon, 17 Nov 2025 23:51:13 +0100 Subject: [PATCH 03/18] fix: place of the openapi explorer class --- forms-bridge/includes/class-openapi.php | 278 ++++++++++++++++++++++++ includes/class-openapi.php | 142 ------------ 2 files changed, 278 insertions(+), 142 deletions(-) create mode 100644 forms-bridge/includes/class-openapi.php delete mode 100644 includes/class-openapi.php diff --git a/forms-bridge/includes/class-openapi.php b/forms-bridge/includes/class-openapi.php new file mode 100644 index 00000000..db19edfa --- /dev/null +++ b/forms-bridge/includes/class-openapi.php @@ -0,0 +1,278 @@ + + */ + public const METHODS = array( 'get', 'post', 'put', 'patch', 'delete', 'trace' ); + + /** + * Holds the swagger data. + * + * @var array + */ + public $data; + + /** + * Handles the standard version of the data. + * + * @var string + */ + public $version; + + /** + * Return an OpenAPI parser instance from a filepath to a swagger file. + * + * @param string $path File path. + * + * @return OpenAPI|null + */ + public static function from( $path ) { + if ( ! is_file( $path ) || ! is_readable( $path ) ) { + return; + } + + $content = file_get_contents( $path ); + + try { + $data = json_decode( $content, true, JSON_THROW_ON_ERROR ); + } catch ( Error ) { + return; + } + + return new OpenAPI( $data ); + } + + /** + * Class constructor. + * + * @param array $data Swagger data. + * + * @throws Exception In case data is not a valid swagger condiguration. + */ + public function __construct( $data ) { + if ( ! isset( $data['openapi'] ) && ! isset( $data['swagger'] ) ) { + throw new Exception( 'Invalid OpenAPI data' ); + } + + $this->data = $data; + $this->version = $data['openapi'] ?? $data['swagger']; + } + + /** + * Returns the available list of API endpoints or swagger paths. + * + * @return array + */ + public function paths() { + return array_keys( $this->data['paths'] ); + } + + /** + * Search for a path object in the swagger data. + * + * @param string $path Target path. + * + * @return array|null + */ + public function path_obj( $path ) { + $path = self::parse_path( $path ); + + foreach ( $this->data['paths'] as $name => $obj ) { + if ( preg_match_all( '/{([^}]+)}/', $name, $matches ) ) { + $regexp = $name; + + foreach ( $matches[0] as $match ) { + $regexp = str_replace( $match, '[^\/]+', $regexp ); + } + + if ( preg_match( '$' . $regexp . '$', $path ) ) { + return $obj; + } + } elseif ( $path === $name ) { + return $obj; + } + } + } + + /** + * Retrives allowed content type for a path and an HTTP method. + * + * @param string $path Target path. + * @param string $method HTTP method. + * + * @return array|null + */ + public function encoding( $path, $method ) { + $path = $this->path_obj( $path ); + $content = $path[ $method ]['requestBody']['content'] ?? null; + + if ( ! $content ) { + return; + } + + return array_keys( $content ); + } + + /** + * Retrives params for a path and an HTTP method. Optionally, filtered by the + * param source. + * + * @param string $path Target path. + * @param string $method HTTP method. + * @param string|array $source Param source or sources. It could be body, path, query or cookie. + * + * @return array|null + */ + public function params( $path, $method = null, $source = null ) { + $path = self::parse_path( $path ); + + $path_obj = $this->path_obj( $path ); + if ( ! $path_obj ) { + return; + } + + $parameters = $path_obj['parameters'] ?? null; + if ( ! $parameters ) { + if ( ! $method ) { + return; + } + + $parameters = array(); + } + + foreach ( $parameters as $param ) { + $param['in'] = 'path'; + } + + $method_obj = $path_obj[ $method ] ?? null; + if ( $method && ! $method_obj ) { + return; + } + + $parameters = array_merge( + $parameters, + $method_obj['parameters'] ?? array() + ); + + $body = $method_obj['requestBody'] ?? null; + if ( $body ) { + $parameters = array_merge( $parameters, self::body_to_params( $body ) ); + } + + if ( $source ) { + $parameters = array_values( + array_filter( + $parameters, + function ( $param ) use ( $source ) { + $in = $param['in'] ?? null; + + if ( is_array( $source ) ) { + return in_array( $in, $source, true ); + } + + return $in === $source; + } + ) + ); + } + + $l = count( $parameters ); + for ( $i = 0; $i < $l; $i++ ) { + $param = &$parameters[ $i ]; + + if ( isset( $param['$ref'] ) ) { + $parameters[ $i ] = $this->get_ref( $param['$ref'] ); + } elseif ( isset( $param['schema']['$ref'] ) ) { + $param['schema'] = $this->get_ref( $param['schema']['$ref'] ); + } + } + + return $parameters; + } + + /** + * Retrives the value of a ref in the swagger data. + * + * @param string $ref Ref absolute path. + * + * @return mixed|null + */ + public function get_ref( $ref ) { + if ( ! str_starts_with( $ref, '#/' ) ) { + return; + } + + $pointer = str_replace( '/', '.', substr( $ref, 2 ) ); + + if ( ! JSON_Finger::validate( $pointer ) ) { + return; + } + + $finger = new JSON_Finger( $this->data ); + return $finger->get( $pointer ); + } + + /** + * Scans a body object and return its attributes as an array of parameters. + * + * @param array $body Body object. + * + * @return array + */ + private static function body_to_params( $body ) { + $parameters = array(); + + foreach ( $body['content'] as $encoding => $obj ) { + foreach ( $obj['schema']['properties'] as $name => $defn ) { + $parameters[] = array_merge( + array( + 'name' => $name, + 'encoding' => $encoding, + 'in' => 'body', + ), + $defn + ); + } + } + + return $parameters; + } + + /** + * URL path normalizer. + * + * @param string $path Target path. + * + * @return string Normalized path. + */ + private static function parse_path( $path ) { + $url = wp_parse_url( $path ); + if ( empty( $url['path'] ) ) { + return '/'; + } + + $path = strpos( $path, '/' ) !== 0 ? '/' . $path : $path; + return preg_replace( '/\/+$/', '', $path ); + } +} diff --git a/includes/class-openapi.php b/includes/class-openapi.php deleted file mode 100644 index 451684a5..00000000 --- a/includes/class-openapi.php +++ /dev/null @@ -1,142 +0,0 @@ -data = $data; - $this->version = $data['openapi']; - } - - public function path($path) - { - $path = self::parse_path($path); - - foreach ($this->data['paths'] as $name => $spec) { - if (preg_match_all('/{([^}]+)}/', $name, $matches)) { - $regexp = $name; - - foreach ($matches[0] as $match) { - $regexp = str_replace($match, '[^\/]+', $regexp); - } - - if (preg_match('$' . $regexp . '$', $path)) { - return $spec; - } - } elseif ($path === $name) { - return $spec; - } - } - } - - public function encoding($path, $method) - { - $path = $this->path($path); - $content = $path[$method]['requestBody']['content'] ?? null; - - if (!$content) { - return; - } - - return array_keys($content); - } - - public function params($path, $method = null) - { - $path = self::parse_path($path); - - $path_spec = $this->path($path); - if (!$path_spec) { - return; - } - - $parameters = $path_spec['parameters'] ?? null; - if (!$parameters) { - if (!$method) { - return; - } - - $parameters = []; - } - - $method_spec = $path_spec[$method] ?? null; - if ($method && !$method_spec) { - return; - } - - $parameters = array_merge( - $parameters, - $method_spec['parameters'] ?? [] - ); - - if ($body = $method_spec['requestBody'] ?? null) { - $parameters = array_merge($parameters, self::body_to_params($body)); - } - - return $parameters; - } - - private static function body_to_params($spec) - { - $parameters = []; - foreach ($spec['content'] as $encoding => $spec) { - foreach ($spec['shema']['properties'] as $name => $defn) { - $parameters[] = array_merge( - [ - 'name' => $name, - 'encoding' => $encoding, - ], - $defn - ); - } - } - - return $parameters; - } - - private static function parse_path($path) - { - $url = parse_url($path); - if (empty($url['path'])) { - return '/'; - } - - $path = strpos($path, '/') !== 0 ? '/' . $path : $path; - return preg_replace('/\/+$/', '', $path); - } -} From af9fad83b7d8b68efcaccd2f1211ca4af6a44d9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Garc=C3=ADa?= Date: Tue, 18 Nov 2025 16:31:48 +0100 Subject: [PATCH 04/18] feat: add http method arg on endpoint schema callback --- forms-bridge/deps/http | 2 +- forms-bridge/deps/plugin | 2 +- forms-bridge/forms-bridge.php | 1 + .../class-rest-settings-controller.php | 42 +++++++++++++++++-- 4 files changed, 42 insertions(+), 5 deletions(-) diff --git a/forms-bridge/deps/http b/forms-bridge/deps/http index bab9e100..418b5932 160000 --- a/forms-bridge/deps/http +++ b/forms-bridge/deps/http @@ -1 +1 @@ -Subproject commit bab9e100a6bc805fca11921a087e925d65695fac +Subproject commit 418b593220c9babdeeed18c7f78a57d9fadd3bfd diff --git a/forms-bridge/deps/plugin b/forms-bridge/deps/plugin index bccdde34..88c43d2f 160000 --- a/forms-bridge/deps/plugin +++ b/forms-bridge/deps/plugin @@ -1 +1 @@ -Subproject commit bccdde34a97aca13a5118e9e08222d0dd0a17129 +Subproject commit 88c43d2f09f0cdf6d14eac99f14abf80832c20d1 diff --git a/forms-bridge/forms-bridge.php b/forms-bridge/forms-bridge.php index 70a076af..4253287e 100644 --- a/forms-bridge/forms-bridge.php +++ b/forms-bridge/forms-bridge.php @@ -37,6 +37,7 @@ /* Classes */ require_once __DIR__ . '/includes/class-api.php'; require_once __DIR__ . '/includes/class-json-finger.php'; +require_once __DIR__ . '/includes/class-openapi.php'; require_once __DIR__ . '/includes/class-rest-settings-controller.php'; require_once __DIR__ . '/includes/class-settings-store.php'; require_once __DIR__ . '/includes/class-logger.php'; diff --git a/forms-bridge/includes/class-rest-settings-controller.php b/forms-bridge/includes/class-rest-settings-controller.php index 7c7ff229..789896b1 100644 --- a/forms-bridge/includes/class-rest-settings-controller.php +++ b/forms-bridge/includes/class-rest-settings-controller.php @@ -367,6 +367,13 @@ private static function register_backend_routes() { 'type' => 'string', 'required' => true, ), + 'method' => array( + 'description' => __( + 'HTTP method', + 'forms-bridge', + ), + 'type' => 'string', + ), ), ), ) @@ -584,8 +591,8 @@ private static function reset_template( $addon, $name ) { /** * Callback for POST requests to the templates endpoint. * - * @param string $addon Name of the owner addon of the template. - * @param REST_Request $request CUrrent REST request instance. + * @param string $addon Name of the owner addon of the template. + * @param WP_REST_Request $request Current REST request instance. * * @return array|WP_Error Template use result. */ @@ -775,6 +782,14 @@ private static function prepare_addon_backend_request_handler( return array( $addon, $backend['name'], $credential['name'] ?? null ); } + /** + * Callback to the backend ping endpoint. + * + * @param string $addon Addon name. + * @param WP_REST_Request $request Request object. + * + * @return array|WP_Error + */ private static function ping_backend( $addon, $request ) { $handler = self::prepare_addon_backend_request_handler( $addon, @@ -803,18 +818,27 @@ private static function ping_backend( $addon, $request ) { return array( 'success' => $result ); } + /** + * Backend endpoint schema route callback. + * + * @param string $addon Addon name. + * @param WP_REST_Request $request Request object. + * + * @return array|WP_Error + */ private static function get_endpoint_schema( $addon, $request ) { $handler = self::prepare_addon_backend_request_handler( $addon, $request ); + if ( is_wp_error( $handler ) ) { return $handler; } [$addon, $backend] = $handler; - $schema = $addon->get_endpoint_schema( $request['endpoint'], $backend ); + $schema = $addon->get_endpoint_schema( $request['endpoint'], $backend, $request['method'] ); if ( is_wp_error( $schema ) ) { $error = self::internal_server_error(); @@ -830,11 +854,23 @@ private static function get_endpoint_schema( $addon, $request ) { return $schema; } + /** + * Callback of the addon schemas endpoint. + * + * @param string $name Addon name. + * + * @return array + */ private static function addon_schemas( $name ) { $bridge = FBAPI::get_bridge_schema( $name ); return array( 'bridge' => $bridge ); } + /** + * Callback of the http schemas endpoint. + * + * @return array + */ private static function http_schemas() { $backend = FBAPI::get_backend_schema(); $credential = FBAPI::get_credential_schema(); From 1f61d79cdfd585e2ec7581d3c2296836dff69be3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Garc=C3=ADa?= Date: Tue, 18 Nov 2025 16:32:15 +0100 Subject: [PATCH 05/18] feat: fetch dolibarr swagger on endpoint introspections --- .../addons/dolibarr/class-dolibarr-addon.php | 55 +- forms-bridge/addons/dolibarr/swagger.json | 18297 ---------------- 2 files changed, 42 insertions(+), 18310 deletions(-) delete mode 100644 forms-bridge/addons/dolibarr/swagger.json diff --git a/forms-bridge/addons/dolibarr/class-dolibarr-addon.php b/forms-bridge/addons/dolibarr/class-dolibarr-addon.php index 209fbf20..8c9e1f0f 100644 --- a/forms-bridge/addons/dolibarr/class-dolibarr-addon.php +++ b/forms-bridge/addons/dolibarr/class-dolibarr-addon.php @@ -7,6 +7,8 @@ namespace FORMS_BRIDGE; +use FORMS_BRIDGE\OpenAPI; + if ( ! defined( 'ABSPATH' ) ) { exit(); } @@ -21,25 +23,32 @@ class Dolibarr_Addon extends Addon { /** - * Handles the addon's title. + * Holds the addon's title. + * + * @var string + */ + public const TITLE = 'Dolibarr'; + + /** + * Holds the addon's name. * * @var string */ - const TITLE = 'Dolibarr'; + public const NAME = 'dolibarr'; /** - * Handles the addon's name. + * Holds the addom's custom bridge class. * * @var string */ - const NAME = 'dolibarr'; + public const BRIDGE = '\FORMS_BRIDGE\Dolibarr_Form_Bridge'; /** - * Handles the addom's custom bridge class. + * Holds the Dolibarr's REST API swagger.json endpoint. * * @var string */ - const BRIDGE = '\FORMS_BRIDGE\Dolibarr_Form_Bridge'; + public const SWAGGER_ENDPOINT = '/api/index.php/explorer/swagger.json'; /** * Performs a request against the backend to check the connexion status. @@ -101,22 +110,44 @@ public function fetch( $endpoint, $backend ) { * Performs an introspection of the backend endpoint and returns API fields * and accepted content type. * - * @param string $endpoint API endpoint. - * @param string $backend Backend name. + * @param string $endpoint API endpoint. + * @param string $backend Backend name. + * @param string|null $method HTTP method. * * @return array */ - public function get_endpoint_schema( $endpoint, $backend ) { + public function get_endpoint_schema( $endpoint, $backend, $method = null ) { $bridge = new Dolibarr_Form_Bridge( array( 'name' => '__dolibarr-' . time(), - 'endpoint' => $endpoint, + 'endpoint' => self::SWAGGER_ENDPOINT, 'backend' => $backend, 'method' => 'GET', ) ); - $response = $bridge->submit( array( 'limit' => 1 ) ); + $response = $bridge->submit(); + + if ( is_wp_error( $response ) ) { + return array(); + } + + $version = $response['data']['swagger'] ?? null; + if ( ! $version ) { + return array(); + } + + $oa_explorer = new OpenAPI( $response['data'] ); + + $path = preg_replace( '/.*\/api\/index.php/', '', $endpoint ); + $method = strtolower( $method ?? 'post' ); + $params = $oa_explorer->params( $path, $method ); + if ( empty( $params ) ) { + return array(); + } + + $response = $bridge->patch( array( 'endpoint' => $endpoint ) ) + ->submit( array( 'limit' => '1' ) ); if ( is_wp_error( $response ) ) { return array(); @@ -131,8 +162,6 @@ public function get_endpoint_schema( $endpoint, $backend ) { foreach ( $entry as $field => $value ) { if ( wp_is_numeric_array( $value ) ) { $type = 'array'; - } elseif ( is_array( $value ) ) { - $type = 'object'; } elseif ( is_double( $value ) ) { $type = 'number'; } elseif ( is_int( $value ) ) { diff --git a/forms-bridge/addons/dolibarr/swagger.json b/forms-bridge/addons/dolibarr/swagger.json deleted file mode 100644 index e2bfc83f..00000000 --- a/forms-bridge/addons/dolibarr/swagger.json +++ /dev/null @@ -1,18297 +0,0 @@ -{ - "swagger": "2.0", - "host": "erp-test-femfeina.somnuvol.coop", - "basePath": "/api/index.php", - "produces": ["application/json", "application/xml"], - "consumes": ["application/json", "application/xml", "multipart/form-data"], - "paths": { - "/accountancy/exportdata": { - "get": { - "operationId": "accountancyExportData", - "tags": ["accountancy"], - "parameters": [ - { - "name": "period", - "type": "string", - "description": "Period : 'lastmonth', 'currentmonth', 'last3months', 'last6months', 'currentyear', 'lastyear', 'fiscalyear', 'lastfiscalyear', 'actualandlastfiscalyear' or 'custom' (see above)", - "in": "query", - "required": true - }, - { - "name": "date_min", - "type": "string", - "description": "[=''] Start date of period if 'custom' is set in period parameter Date format is 'YYYY-MM-DD'", - "in": "query", - "required": false - }, - { - "name": "date_max", - "type": "string", - "description": "[=''] End date of period if 'custom' is set in period parameter Date format is 'YYYY-MM-DD'", - "in": "query", - "required": false - }, - { - "name": "format", - "type": "string", - "description": "[=''] by default uses '1' for 'Configurable (CSV)' for format number or '1000' for FEC or '1010' for FEC2 (see AccountancyExport class)", - "in": "query", - "required": false - }, - { - "name": "lettering", - "type": "integer", - "format": "int64", - "description": "[=0] by default don't export or 1 to export lettering data (columns 'letterring_code' and 'date_lettering' returns empty or not)", - "in": "query", - "required": false - }, - { - "name": "alreadyexport", - "type": "integer", - "format": "int64", - "description": "[=0] by default export data only if it's not yet exported or 1 already exported (always export data even if 'date_export\" is set)", - "in": "query", - "required": false - }, - { - "name": "notnotifiedasexport", - "type": "integer", - "format": "int64", - "description": "[=0] by default notified as exported or 1 not notified as exported (when the export is done, notified or not the column 'date_export')", - "in": "query", - "required": false - } - ], - "summary": "Accountancy export data 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Insufficient rights" - }, - "404": { - "description": "Accountancy export format not found" - }, - "500": { - "description": "Error on accountancy export" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/agendaevents/{id}": { - "get": { - "operationId": "retrieveAgendaevents", - "tags": ["agendaevents"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of Agenda Events", - "in": "path", - "required": true - } - ], - "summary": "Get properties of a Agenda Events object 🔐", - "description": "Return an array with Agenda Events information", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "put": { - "operationId": "updateAgendaevents", - "tags": ["agendaevents"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of Agenda Event to update", - "in": "path", - "required": true - }, - { - "name": "updateAgendaeventsModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/updateAgendaeventsModel" - } - } - ], - "summary": "Update Agenda Event general fields 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "removeAgendaevents", - "tags": ["agendaevents"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Agenda Event ID", - "in": "path", - "required": true - } - ], - "summary": "Delete Agenda Event 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/agendaevents": { - "get": { - "operationId": "listAgendaevents", - "tags": ["agendaevents"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "t.id", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - }, - { - "name": "user_ids", - "type": "string", - "description": "User ids filter field (owners of event). Example: '1' or '1,2,3'", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.label:like:'%dol%') and (t.datec:<:'20160101')\"", - "in": "query", - "required": false - }, - { - "name": "properties", - "type": "string", - "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", - "in": "query", - "required": false - } - ], - "summary": "List Agenda Events 🔐", - "description": "Get a list of Agenda Events", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "createAgendaevents", - "tags": ["agendaevents"], - "parameters": [ - { - "name": "createAgendaeventsModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/createAgendaeventsModel" - } - } - ], - "summary": "Create Agenda Event object 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/bankaccounts": { - "get": { - "operationId": "listBankaccounts", - "tags": ["bankaccounts"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "t.rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - }, - { - "name": "category", - "type": "integer", - "format": "int64", - "description": "Use this param to filter list by category", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.import_key:<:'20160101')\"", - "in": "query", - "required": false - }, - { - "name": "properties", - "type": "string", - "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", - "in": "query", - "required": false - } - ], - "summary": "Get the list of accounts. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "createBankaccounts", - "tags": ["bankaccounts"], - "parameters": [ - { - "name": "createBankaccountsModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/createBankaccountsModel" - } - } - ], - "summary": "Create account object 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/bankaccounts/{id}": { - "get": { - "operationId": "retrieveBankaccounts", - "tags": ["bankaccounts"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of account", - "in": "path", - "required": true - } - ], - "summary": "Get account by ID. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "put": { - "operationId": "updateBankaccounts", - "tags": ["bankaccounts"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of account", - "in": "path", - "required": true - }, - { - "name": "updateBankaccountsModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/updateBankaccountsModel" - } - } - ], - "summary": "Update account 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "removeBankaccounts", - "tags": ["bankaccounts"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of account", - "in": "path", - "required": true - } - ], - "summary": "Delete account 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/bankaccounts/transfer": { - "post": { - "operationId": "bankaccountsTransfer", - "tags": ["bankaccounts"], - "parameters": [ - { - "name": "bankaccountsTransferModel", - "description": "bankaccount_from_id \nbankaccount_to_id \ndate \ndescription \namount \namount_to \ncheque_number \n", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/bankaccountsTransferModel" - } - } - ], - "summary": "Create an internal wire transfer between two bank accounts 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "401": { - "description": "Unauthorized: User does not have permission to configure bank accounts" - }, - "404": { - "description": "Not Found: Either the source or the destination bankaccount for the provided id does not exist" - }, - "500": { - "description": "Internal Server Error: Error(s) returned by the RDBMS" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/bankaccounts/{id}/lines": { - "get": { - "operationId": "bankaccountsRetrieveLines", - "tags": ["bankaccounts"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of account", - "in": "path", - "required": true - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.import_key:<:'20160101')\"", - "in": "query", - "required": false - } - ], - "summary": "Get the list of lines of the account. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "bankaccountsAddLine", - "tags": ["bankaccounts"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of account", - "in": "path", - "required": true - }, - { - "name": "bankaccountsAddLineModel", - "description": "**date** (required) \n**type** (required) \n**label** (required) \n**amount** (required) \ncategory \ncheque_number \ncheque_writer \ncheque_bank \naccountancycode \ndatev \nnum_releve \n", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/bankaccountsAddLineModel" - } - } - ], - "summary": "Add a line to an account 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/bankaccounts/{id}/lines/{line_id}/links": { - "post": { - "operationId": "bankaccountsAddLink", - "tags": ["bankaccounts"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of account", - "in": "path", - "required": true - }, - { - "name": "line_id", - "type": "integer", - "format": "int64", - "description": "ID of account line", - "in": "path", - "required": true - }, - { - "name": "bankaccountsAddLinkModel", - "description": "**url_id** (required) \n**url** (required) \n**label** (required) \n**type** (required) \n", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/bankaccountsAddLinkModel" - } - } - ], - "summary": "Add a link to an account line 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "get": { - "operationId": "bankaccountsRetrieveLinks", - "tags": ["bankaccounts"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of account", - "in": "path", - "required": true - }, - { - "name": "line_id", - "type": "integer", - "format": "int64", - "description": "ID of account line", - "in": "path", - "required": true - } - ], - "summary": "Get the list of links for a line of the account. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/bankaccounts/{id}/lines/{line_id}": { - "put": { - "operationId": "bankaccountsUpdateLine", - "tags": ["bankaccounts"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of account", - "in": "path", - "required": true - }, - { - "name": "line_id", - "type": "integer", - "format": "int64", - "description": "ID of account line", - "in": "path", - "required": true - }, - { - "name": "bankaccountsUpdateLineModel", - "description": "**label** (required) \n", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/bankaccountsUpdateLineModel" - } - } - ], - "summary": "Update an account line 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "bankaccountsRemoveLine", - "tags": ["bankaccounts"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of account", - "in": "path", - "required": true - }, - { - "name": "line_id", - "type": "integer", - "format": "int64", - "description": "ID of account line", - "in": "path", - "required": true - } - ], - "summary": "Delete an account line 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/boms/{id}": { - "get": { - "operationId": "retrieveBoms", - "tags": ["boms"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of bom", - "in": "path", - "required": true - } - ], - "summary": "Get properties of a bom object 🔐", - "description": "Return an array with bom information", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "403": { - "description": "Access denied" - }, - "404": { - "description": "BOM not found" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "put": { - "operationId": "updateBoms", - "tags": ["boms"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of bom to update", - "in": "path", - "required": true - }, - { - "name": "updateBomsModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/updateBomsModel" - } - } - ], - "summary": "Update bom 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "403": { - "description": "Access denied" - }, - "404": { - "description": "BOM not found" - }, - "500": { - "description": "Error updating bom" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "removeBoms", - "tags": ["boms"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "BOM ID", - "in": "path", - "required": true - } - ], - "summary": "Delete bom 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "403": { - "description": "Access denied" - }, - "404": { - "description": "BOM not found" - }, - "500": { - "description": "Error deleting bom" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/boms": { - "get": { - "operationId": "listBoms", - "tags": ["boms"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "t.rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')\"", - "in": "query", - "required": false - }, - { - "name": "properties", - "type": "string", - "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", - "in": "query", - "required": false - } - ], - "summary": "List boms 🔐", - "description": "Get a list of boms", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad sqlfilters" - }, - "403": { - "description": "Access denied" - }, - "503": { - "description": "Error retrieving list of boms" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "createBoms", - "tags": ["boms"], - "parameters": [ - { - "name": "createBomsModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/createBomsModel" - } - } - ], - "summary": "Create bom object 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - }, - "403": { - "description": "Access denied" - }, - "500": { - "description": "Error retrieving list of boms" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/boms/{id}/lines": { - "get": { - "operationId": "bomsRetrieveLines", - "tags": ["boms"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of BOM", - "in": "path", - "required": true - } - ], - "summary": "Get lines of an BOM 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "403": { - "description": "Access denied" - }, - "404": { - "description": "BOM not found" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "bomsCreateLine", - "tags": ["boms"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of BOM to update", - "in": "path", - "required": true - }, - { - "name": "bomsCreateLineModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/bomsCreateLineModel" - } - } - ], - "summary": "Add a line to given BOM 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - }, - "403": { - "description": "Access denied" - }, - "404": { - "description": "BOM not found" - }, - "500": { - "description": "Error adding bom line" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/boms/{id}/lines/{lineid}": { - "put": { - "operationId": "bomsUpdateLine", - "tags": ["boms"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of BOM to update", - "in": "path", - "required": true - }, - { - "name": "lineid", - "type": "integer", - "format": "int64", - "description": "Id of line to update", - "in": "path", - "required": true - }, - { - "name": "bomsUpdateLineModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/bomsUpdateLineModel" - } - } - ], - "summary": "Update a line to given BOM 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "403": { - "description": "Access denied" - }, - "404": { - "description": "BOM not found" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "bomsRemoveLine", - "tags": ["boms"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of BOM to update", - "in": "path", - "required": true - }, - { - "name": "lineid", - "type": "integer", - "format": "int64", - "description": "Id of line to delete", - "in": "path", - "required": true - } - ], - "summary": "Delete a line to given BOM 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "403": { - "description": "Access denied" - }, - "404": { - "description": "BOM not found" - }, - "500": { - "description": "Error deleting bom line" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/categories/{id}": { - "get": { - "operationId": "retrieveCategories", - "tags": ["categories"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of category", - "in": "path", - "required": true - }, - { - "name": "include_childs", - "type": "boolean", - "description": "Include child categories list (true or false)", - "in": "query", - "required": false - } - ], - "summary": "Get properties of a category object 🔐", - "description": "Return an array with category information", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "put": { - "operationId": "updateCategories", - "tags": ["categories"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of category to update", - "in": "path", - "required": true - }, - { - "name": "updateCategoriesModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/updateCategoriesModel" - } - } - ], - "summary": "Update category 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "removeCategories", - "tags": ["categories"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Category ID", - "in": "path", - "required": true - } - ], - "summary": "Delete category 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/categories": { - "get": { - "operationId": "listCategories", - "tags": ["categories"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "t.rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - }, - { - "name": "type", - "type": "string", - "description": "Type of category ('member', 'customer', 'supplier', 'product', 'contact', 'actioncomm')", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')\"", - "in": "query", - "required": false - }, - { - "name": "properties", - "type": "string", - "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", - "in": "query", - "required": false - } - ], - "summary": "List categories 🔐", - "description": "Get a list of categories", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "createCategories", - "tags": ["categories"], - "parameters": [ - { - "name": "createCategoriesModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/createCategoriesModel" - } - } - ], - "summary": "Create category object 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/categories/object/{type}/{id}": { - "get": { - "operationId": "categoriesRetrieveListForObject", - "tags": ["categories"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Object ID", - "in": "path", - "required": true - }, - { - "name": "type", - "type": "string", - "description": "Type of category ('member', 'customer', 'supplier', 'product', 'contact', 'project', 'actioncomm')", - "in": "path", - "required": true - }, - { - "name": "sortfield", - "type": "string", - "defaultValue": "s.rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - } - ], - "summary": "List categories of an object 🔐", - "description": "Get the list of categories linked to an object", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/categories/{id}/objects/{type}/{object_id}": { - "post": { - "operationId": "categoriesLinkObjectById", - "tags": ["categories"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of category", - "in": "path", - "required": true - }, - { - "name": "type", - "type": "string", - "description": "Type of category ('member', 'customer', 'supplier', 'product', 'contact', 'actioncomm')", - "in": "path", - "required": true - }, - { - "name": "object_id", - "type": "integer", - "format": "int64", - "description": "ID of object", - "in": "path", - "required": true - } - ], - "summary": "Link an object to a category by id 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "categoriesUnlinkObjectById", - "tags": ["categories"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of category", - "in": "path", - "required": true - }, - { - "name": "type", - "type": "string", - "description": "Type of category ('member', 'customer', 'supplier', 'product', 'contact', 'actioncomm')", - "in": "path", - "required": true - }, - { - "name": "object_id", - "type": "integer", - "format": "int64", - "description": "ID of the object", - "in": "path", - "required": true - } - ], - "summary": "Unlink an object from a category by id 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/categories/{id}/objects/{type}/ref/{object_ref}": { - "post": { - "operationId": "categoriesLinkObjectByRef", - "tags": ["categories"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of category", - "in": "path", - "required": true - }, - { - "name": "type", - "type": "string", - "description": "Type of category ('member', 'customer', 'supplier', 'product', 'contact')", - "in": "path", - "required": true - }, - { - "name": "object_ref", - "type": "string", - "description": "Reference of object", - "in": "path", - "required": true - } - ], - "summary": "Link an object to a category by ref 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "categoriesUnlinkObjectByRef", - "tags": ["categories"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of category", - "in": "path", - "required": true - }, - { - "name": "type", - "type": "string", - "description": "Type of category ('member', 'customer', 'supplier', 'product', 'contact', 'actioncomm')", - "in": "path", - "required": true - }, - { - "name": "object_ref", - "type": "string", - "description": "Reference of the object", - "in": "path", - "required": true - } - ], - "summary": "Unlink an object from a category by ref 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/categories/{id}/objects": { - "get": { - "operationId": "categoriesRetrieveObjects", - "tags": ["categories"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of category", - "in": "path", - "required": true - }, - { - "name": "type", - "type": "string", - "description": "Type of category ('member', 'customer', 'supplier', 'product', 'contact', 'project')", - "in": "query", - "required": true - }, - { - "name": "onlyids", - "type": "integer", - "format": "int64", - "description": "Return only ids of objects (consume less memory)", - "in": "query", - "required": false - } - ], - "summary": "Get the list of objects in a category. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/contacts/{id}": { - "get": { - "operationId": "retrieveContacts", - "tags": ["contacts"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of contact", - "in": "path", - "required": true - }, - { - "name": "includecount", - "type": "integer", - "format": "int64", - "description": "Count and return also number of elements the contact is used as a link for", - "in": "query", - "required": false - }, - { - "name": "includeroles", - "type": "integer", - "format": "int64", - "description": "Includes roles of the contact", - "in": "query", - "required": false - } - ], - "summary": "Get properties of a contact object 🔐", - "description": "Return an array with contact information", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "put": { - "operationId": "updateContacts", - "tags": ["contacts"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of contact to update", - "in": "path", - "required": true - }, - { - "name": "updateContactsModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/updateContactsModel" - } - } - ], - "summary": "Update contact 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "500": { - "description": "Internal Server Error" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "removeContacts", - "tags": ["contacts"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Contact ID", - "in": "path", - "required": true - } - ], - "summary": "Delete contact 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/contacts/email/{email}": { - "get": { - "operationId": "contactsRetrieveByEmail", - "tags": ["contacts"], - "parameters": [ - { - "name": "email", - "type": "string", - "description": "Email of contact", - "in": "path", - "required": true - }, - { - "name": "includecount", - "type": "integer", - "format": "int64", - "description": "Count and return also number of elements the contact is used as a link for", - "in": "query", - "required": false - }, - { - "name": "includeroles", - "type": "integer", - "format": "int64", - "description": "Includes roles of the contact", - "in": "query", - "required": false - } - ], - "summary": "Get properties of a contact object by Email 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Insufficient rights" - }, - "404": { - "description": "User or group not found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/contacts": { - "get": { - "operationId": "listContacts", - "tags": ["contacts"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "t.rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - }, - { - "name": "thirdparty_ids", - "type": "string", - "description": "Thirdparty ids to filter contacts of (example '1' or '1,2,3')", - "in": "query", - "required": false - }, - { - "name": "category", - "type": "integer", - "format": "int64", - "description": "Use this param to filter list by category", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')\"", - "in": "query", - "required": false - }, - { - "name": "includecount", - "type": "integer", - "format": "int64", - "description": "Count and return also number of elements the contact is used as a link for", - "in": "query", - "required": false - }, - { - "name": "includeroles", - "type": "integer", - "format": "int64", - "description": "Includes roles of the contact", - "in": "query", - "required": false - }, - { - "name": "properties", - "type": "string", - "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", - "in": "query", - "required": false - } - ], - "summary": "List contacts 🔐", - "description": "Get a list of contacts", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "createContacts", - "tags": ["contacts"], - "parameters": [ - { - "name": "createContactsModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/createContactsModel" - } - } - ], - "summary": "Create contact object 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/contacts/{id}/createUser": { - "post": { - "operationId": "contactsCreateUser", - "tags": ["contacts"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of contact", - "in": "path", - "required": true - }, - { - "name": "contactsCreateUserModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/contactsCreateUserModel" - } - } - ], - "summary": "Create an user account object from contact (external user) 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/contacts/{id}/categories": { - "get": { - "operationId": "contactsRetrieveCategories", - "tags": ["contacts"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of contact", - "in": "path", - "required": true - }, - { - "name": "sortfield", - "type": "string", - "defaultValue": "s.rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - } - ], - "summary": "Get categories for a contact 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/contacts/{id}/categories/{category_id}": { - "put": { - "operationId": "contactsAddCategory", - "tags": ["contacts"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of contact", - "in": "path", - "required": true - }, - { - "name": "category_id", - "type": "integer", - "format": "int64", - "description": "Id of category", - "in": "path", - "required": true - } - ], - "summary": "Add a category to a contact 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Insufficient rights" - }, - "404": { - "description": "Category or contact not found" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "contactsRemoveCategory", - "tags": ["contacts"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of contact", - "in": "path", - "required": true - }, - { - "name": "category_id", - "type": "integer", - "format": "int64", - "description": "Id of category", - "in": "path", - "required": true - } - ], - "summary": "Remove the link between a category and a contact 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "500": { - "description": "404 Category or contact not found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/documents/download": { - "get": { - "operationId": "listDocuments", - "tags": ["documents"], - "parameters": [ - { - "name": "modulepart", - "type": "string", - "description": "Name of module or area concerned by file download ('facture', ...)", - "in": "query", - "required": true - }, - { - "name": "original_file", - "type": "string", - "description": "Relative path with filename, relative to modulepart (for example: IN201701-999/IN201701-999.pdf)", - "in": "query", - "required": false - } - ], - "summary": "Download a document. 🔐", - "description": " Note that, this API is similar to using the wrapper link \"documents.php\" to download a file (used for internal HTML links of documents into application), but with no need to have a session cookie (the token is used instead).", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad value for parameter modulepart or original_file" - }, - "403": { - "description": "Access denied" - }, - "404": { - "description": "File not found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/documents/builddoc": { - "put": { - "operationId": "documentsBuilddoc", - "tags": ["documents"], - "parameters": [ - { - "name": "documentsBuilddocModel", - "description": "**modulepart** (required) \noriginal_file \ndoctemplate \nlangcode \n", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/documentsBuilddocModel" - } - } - ], - "summary": "Build a document. 🔐", - "description": " Test sample 1: { \"modulepart\": \"invoice\", \"original_file\": \"FA1701-001/FA1701-001.pdf\", \"doctemplate\": \"crabe\", \"langcode\": \"fr_FR\" }. Supported modules: invoice, order, proposal, contract, shipment", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad value for parameter modulepart or original_file" - }, - "403": { - "description": "Access denied" - }, - "404": { - "description": "Invoice, Order, Proposal, Contract or Shipment not found" - }, - "500": { - "description": "Error generating document" - }, - "501": { - "description": "File not found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/documents": { - "get": { - "operationId": "documentsRetrieveDocumentsListByElement", - "tags": ["documents"], - "parameters": [ - { - "name": "modulepart", - "type": "string", - "description": "Name of module or area concerned ('thirdparty', 'member', 'proposal', 'order', 'invoice', 'supplier_invoice', 'shipment', 'project', ...)", - "in": "query", - "required": true - }, - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of element", - "in": "query", - "required": false - }, - { - "name": "ref", - "type": "string", - "description": "Ref of element", - "in": "query", - "required": false - }, - { - "name": "sortfield", - "type": "string", - "description": "Sort criteria ('','fullname','relativename','name','date','size')", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "description": "Sort order ('asc' or 'desc')", - "in": "query", - "required": false - } - ], - "summary": "Return the list of documents of a dedicated element (from its ID or Ref) 🔐", - "description": "Supported modules: thirdparty, user, member, proposal, order, supplier_order, shipment, invoice, supplier_invoice, product, event, expensereport, knowledgemanagement, category, contract", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad value for parameter modulepart, id or ref" - }, - "403": { - "description": "Access denied" - }, - "404": { - "description": "Thirdparty, User, Member, Order, Invoice or Proposal not found" - }, - "500": { - "description": "Error while fetching object" - }, - "503": { - "description": "Error when retrieve ecm list" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "removeDocuments", - "tags": ["documents"], - "parameters": [ - { - "name": "modulepart", - "type": "string", - "description": "Name of module or area concerned by file download ('product', ...)", - "in": "query", - "required": true - }, - { - "name": "original_file", - "type": "string", - "description": "Relative path with filename, relative to modulepart (for example: PRODUCT-REF-999/IMAGE-999.jpg)", - "in": "query", - "required": true - } - ], - "summary": "Delete a document. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad value for parameter original_file" - }, - "403": { - "description": "Access denied" - }, - "404": { - "description": "File not found" - }, - "500": { - "description": "Error on file operation" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/documents/upload": { - "post": { - "operationId": "createDocuments", - "tags": ["documents"], - "parameters": [ - { - "name": "createDocumentsModel", - "description": "**filename** (required) \n**modulepart** (required) \nref \nsubdir \nfilecontent \nfileencoding \noverwriteifexists \ncreatedirifnotexists \n", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/createDocumentsModel" - } - } - ], - "summary": "Upload a document. 🔐", - "description": " Test sample for invoice: { \"filename\": \"mynewfile.txt\", \"modulepart\": \"invoice\", \"ref\": \"FA1701-001\", \"subdir\": \"\", \"filecontent\": \"content text\", \"fileencoding\": \"\", \"overwriteifexists\": \"0\" }. Test sample for supplier invoice: { \"filename\": \"mynewfile.txt\", \"modulepart\": \"supplier_invoice\", \"ref\": \"FA1701-001\", \"subdir\": \"\", \"filecontent\": \"content text\", \"fileencoding\": \"\", \"overwriteifexists\": \"0\" }. Test sample for medias file: { \"filename\": \"mynewfile.txt\", \"modulepart\": \"medias\", \"ref\": \"\", \"subdir\": \"image/mywebsite\", \"filecontent\": \"Y29udGVudCB0ZXh0Cg==\", \"fileencoding\": \"base64\", \"overwriteifexists\": \"0\" }. Supported modules: invoice, order, supplier_order, task/project_task, product/service, expensereport, fichinter, member, propale, agenda, contact", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "400": { - "description": "Bad Request" - }, - "403": { - "description": "Access denied" - }, - "404": { - "description": "Object not found" - }, - "500": { - "description": "Error on file operationw" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/donations/{id}": { - "get": { - "operationId": "retrieveDonations", - "tags": ["donations"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of order", - "in": "path", - "required": true - } - ], - "summary": "Get properties of an donation object 🔐", - "description": "Return an array with donation information", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "put": { - "operationId": "updateDonations", - "tags": ["donations"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of order to update", - "in": "path", - "required": true - }, - { - "name": "updateDonationsModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/updateDonationsModel" - } - } - ], - "summary": "Update order general fields (won't touch lines of order) 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "removeDonations", - "tags": ["donations"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Order ID", - "in": "path", - "required": true - } - ], - "summary": "Delete donation 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/donations": { - "get": { - "operationId": "listDonations", - "tags": ["donations"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "t.rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - }, - { - "name": "thirdparty_ids", - "type": "string", - "description": "Thirdparty ids to filter orders of (example '1' or '1,2,3')", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')\"", - "in": "query", - "required": false - }, - { - "name": "properties", - "type": "string", - "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", - "in": "query", - "required": false - } - ], - "summary": "List donations 🔐", - "description": "Get a list of donations", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "createDonations", - "tags": ["donations"], - "parameters": [ - { - "name": "createDonationsModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/createDonationsModel" - } - } - ], - "summary": "Create donation object 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/donations/{id}/validate": { - "post": { - "operationId": "donationsValidate", - "tags": ["donations"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Order ID", - "in": "path", - "required": true - }, - { - "name": "donationsValidateModel", - "description": "idwarehouse \nnotrigger \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/donationsValidateModel" - } - } - ], - "summary": "Validate an donation 🔐", - "description": "If you get a bad value for param notrigger check, provide this in body { \"idwarehouse\": 0, \"notrigger\": 0 }", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "304": { - "description": "Not Modified" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - }, - "500": { - "description": "System error" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/expensereports/{id}": { - "get": { - "operationId": "retrieveExpensereports", - "tags": ["expensereports"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of Expense Report", - "in": "path", - "required": true - } - ], - "summary": "Get properties of an Expense Report 🔐", - "description": "Return an array with Expense Report information", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "put": { - "operationId": "updateExpensereports", - "tags": ["expensereports"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of Expense Report to update", - "in": "path", - "required": true - }, - { - "name": "updateExpensereportsModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/updateExpensereportsModel" - } - } - ], - "summary": "Update Expense Report general fields (won't touch lines of expensereport) 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "401": { - "description": "Not allowed" - }, - "500": { - "description": "System error" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "removeExpensereports", - "tags": ["expensereports"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Expense Report ID", - "in": "path", - "required": true - } - ], - "summary": "Delete Expense Report 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/expensereports": { - "get": { - "operationId": "listExpensereports", - "tags": ["expensereports"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "t.rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - }, - { - "name": "user_ids", - "type": "string", - "description": "User ids filter field. Example: '1' or '1,2,3'", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')\"", - "in": "query", - "required": false - }, - { - "name": "properties", - "type": "string", - "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", - "in": "query", - "required": false - } - ], - "summary": "List Expense Reports 🔐", - "description": "Get a list of Expense Reports", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "createExpensereports", - "tags": ["expensereports"], - "parameters": [ - { - "name": "createExpensereportsModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/createExpensereportsModel" - } - } - ], - "summary": "Create Expense Report object 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/expensereports/payments": { - "get": { - "operationId": "expensereportsRetrieveAllPayments", - "tags": ["expensereports"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "t.rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - } - ], - "summary": "Get the list of payments of expensereport. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/expensereports/payments/{pid}": { - "get": { - "operationId": "expensereportsRetrievePayments", - "tags": ["expensereports"], - "parameters": [ - { - "name": "pid", - "type": "integer", - "format": "int64", - "description": "Payment ID", - "in": "path", - "required": true - } - ], - "summary": "Get a given payment. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/expensereports/{id}/payments": { - "post": { - "operationId": "expensereportsAddPayment", - "tags": ["expensereports"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of expense report", - "in": "path", - "required": true - }, - { - "name": "expensereportsAddPaymentModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/expensereportsAddPaymentModel" - } - } - ], - "summary": "Create payment of ExpenseReport 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "put": { - "operationId": "expensereportsUpdatePayment", - "tags": ["expensereports"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of paymentExpenseReport", - "in": "path", - "required": true - }, - { - "name": "expensereportsUpdatePaymentModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/expensereportsUpdatePaymentModel" - } - } - ], - "summary": "Update a payment of ExpenseReport 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/interventions/{id}": { - "get": { - "operationId": "retrieveInterventions", - "tags": ["interventions"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of Expense Report", - "in": "path", - "required": true - } - ], - "summary": "Get properties of a Expense Report object Return an array with Expense Report information 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "removeInterventions", - "tags": ["interventions"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Order ID", - "in": "path", - "required": true - } - ], - "summary": "Delete order 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/interventions": { - "get": { - "operationId": "listInterventions", - "tags": ["interventions"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "t.rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - }, - { - "name": "thirdparty_ids", - "type": "string", - "description": "Thirdparty ids to filter orders of (example '1' or '1,2,3')", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')\"", - "in": "query", - "required": false - }, - { - "name": "properties", - "type": "string", - "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", - "in": "query", - "required": false - } - ], - "summary": "List of interventions Return a list of interventions 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "createInterventions", - "tags": ["interventions"], - "parameters": [ - { - "name": "createInterventionsModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/createInterventionsModel" - } - } - ], - "summary": "Create intervention object 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/interventions/{id}/lines": { - "post": { - "operationId": "interventionsCreateLine", - "tags": ["interventions"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of intervention to update", - "in": "path", - "required": true - }, - { - "name": "interventionsCreateLineModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/interventionsCreateLineModel" - } - } - ], - "summary": "Add a line to a given intervention 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/interventions/{id}/validate": { - "post": { - "operationId": "interventionsValidate", - "tags": ["interventions"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Intervention ID", - "in": "path", - "required": true - }, - { - "name": "interventionsValidateModel", - "description": "notrigger \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/interventionsValidateModel" - } - } - ], - "summary": "Validate an intervention 🔐", - "description": "If you get a bad value for param notrigger check, provide this in body { \"notrigger\": 0 }", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/interventions/{id}/close": { - "post": { - "operationId": "interventionsCloseFichinter", - "tags": ["interventions"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Intervention ID", - "in": "path", - "required": true - } - ], - "summary": "Close an intervention 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/invoices/{id}": { - "get": { - "operationId": "retrieveInvoices", - "tags": ["invoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of invoice", - "in": "path", - "required": true - }, - { - "name": "contact_list", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "description": "0:Return array contains all properties, 1:Return array contains just id, -1: Do not return contacts/adddesses", - "in": "query", - "required": false - } - ], - "summary": "Get properties of a invoice object 🔐", - "description": "Return an array with invoice information", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "put": { - "operationId": "updateInvoices", - "tags": ["invoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of invoice to update", - "in": "path", - "required": true - }, - { - "name": "updateInvoicesModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/updateInvoicesModel" - } - } - ], - "summary": "Update invoice 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "removeInvoices", - "tags": ["invoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Invoice ID", - "in": "path", - "required": true - } - ], - "summary": "Delete invoice 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/invoices/ref/{ref}": { - "get": { - "operationId": "invoicesRetrieveByRef", - "tags": ["invoices"], - "parameters": [ - { - "name": "ref", - "type": "string", - "description": "Ref of object", - "in": "path", - "required": true - }, - { - "name": "contact_list", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "description": "0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id, -1: Do not return contacts/adddesses", - "in": "query", - "required": false - } - ], - "summary": "Get properties of an invoice object by ref 🔐", - "description": "Return an array with invoice information", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/invoices/ref_ext/{ref_ext}": { - "get": { - "operationId": "invoicesRetrieveByRefExt", - "tags": ["invoices"], - "parameters": [ - { - "name": "ref_ext", - "type": "string", - "description": "External reference of object", - "in": "path", - "required": true - }, - { - "name": "contact_list", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "description": "0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id, -1: Do not return contacts/adddesses", - "in": "query", - "required": false - } - ], - "summary": "Get properties of an invoice object by ref_ext 🔐", - "description": "Return an array with invoice information", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/invoices": { - "get": { - "operationId": "listInvoices", - "tags": ["invoices"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "t.rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - }, - { - "name": "thirdparty_ids", - "type": "string", - "description": "Thirdparty ids to filter orders of (example '1' or '1,2,3')", - "in": "query", - "required": false - }, - { - "name": "status", - "type": "string", - "description": "Filter by invoice status : draft | unpaid | paid | cancelled", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')\"", - "in": "query", - "required": false - }, - { - "name": "properties", - "type": "string", - "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", - "in": "query", - "required": false - } - ], - "summary": "List invoices 🔐", - "description": "Get a list of invoices", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "404": { - "description": "Not found" - }, - "503": { - "description": "Error" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "createInvoices", - "tags": ["invoices"], - "parameters": [ - { - "name": "createInvoicesModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/createInvoicesModel" - } - } - ], - "summary": "Create invoice object 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/invoices/createfromorder/{orderid}": { - "post": { - "operationId": "invoicesCreateInvoiceFromOrder", - "tags": ["invoices"], - "parameters": [ - { - "name": "orderid", - "type": "integer", - "format": "int64", - "description": "Id of the order", - "in": "path", - "required": true - } - ], - "summary": "Create an invoice using an existing order. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/invoices/createfromcontract/{contractid}": { - "post": { - "operationId": "invoicesCreateInvoiceFromContract", - "tags": ["invoices"], - "parameters": [ - { - "name": "contractid", - "type": "integer", - "format": "int64", - "description": "Id of the contract", - "in": "path", - "required": true - } - ], - "summary": "Create an invoice using a contract. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/invoices/{id}/lines": { - "get": { - "operationId": "invoicesRetrieveLines", - "tags": ["invoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of invoice", - "in": "path", - "required": true - } - ], - "summary": "Get lines of an invoice 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "invoicesCreateLine", - "tags": ["invoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of invoice", - "in": "path", - "required": true - }, - { - "name": "invoicesCreateLineModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/invoicesCreateLineModel" - } - } - ], - "summary": "Add a line to a given invoice 🔐", - "description": "Example of POST query : { \"desc\": \"Desc\", \"subprice\": \"1.00000000\", \"qty\": \"1\", \"tva_tx\": \"20.000\", \"localtax1_tx\": \"0.000\", \"localtax2_tx\": \"0.000\", \"fk_product\": \"1\", \"remise_percent\": \"0\", \"date_start\": \"\", \"date_end\": \"\", \"fk_code_ventilation\": 0, \"info_bits\": \"0\", \"fk_remise_except\": null, \"product_type\": \"1\", \"rang\": \"-1\", \"special_code\": \"0\", \"fk_parent_line\": null, \"fk_fournprice\": null, \"pa_ht\": \"0.00000000\", \"label\": \"\", \"array_options\": [], \"situation_percent\": \"100\", \"fk_prev_id\": null, \"fk_unit\": null }", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - }, - "304": { - "description": "Not Modified" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "400": { - "description": "Bad Request" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/invoices/{id}/lines/{lineid}": { - "put": { - "operationId": "invoicesUpdateLine", - "tags": ["invoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of invoice to update", - "in": "path", - "required": true - }, - { - "name": "lineid", - "type": "integer", - "format": "int64", - "description": "Id of line to update", - "in": "path", - "required": true - }, - { - "name": "invoicesUpdateLineModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/invoicesUpdateLineModel" - } - } - ], - "summary": "Update a line to a given invoice 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "304": { - "description": "Not Modified" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Invoice not found" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "invoicesRemoveLine", - "tags": ["invoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of invoice", - "in": "path", - "required": true - }, - { - "name": "lineid", - "type": "integer", - "format": "int64", - "description": "Id of the line to delete", - "in": "path", - "required": true - } - ], - "summary": "Deletes a line of a given invoice 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/invoices/{id}/contact/{contactid}/{type}": { - "post": { - "operationId": "invoicesCreateContact", - "tags": ["invoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of invoice to update", - "in": "path", - "required": true - }, - { - "name": "contactid", - "type": "integer", - "format": "int64", - "description": "Id of contact to add", - "in": "path", - "required": true - }, - { - "name": "type", - "type": "string", - "description": "Type of the contact (BILLING, SHIPPING, CUSTOMER)", - "in": "path", - "required": true - } - ], - "summary": "Add a contact type of given invoice 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "invoicesRemoveContact", - "tags": ["invoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of invoice to update", - "in": "path", - "required": true - }, - { - "name": "contactid", - "type": "integer", - "format": "int64", - "description": "Row key of the contact in the array contact_ids.", - "in": "path", - "required": true - }, - { - "name": "type", - "type": "string", - "description": "Type of the contact (BILLING, SHIPPING, CUSTOMER).", - "in": "path", - "required": true - } - ], - "summary": "Delete a contact type of given invoice 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "500": { - "description": "System error" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/invoices/{id}/contacts": { - "post": { - "operationId": "invoicesAddContact", - "tags": ["invoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Order ID", - "in": "path", - "required": true - }, - { - "name": "invoicesAddContactModel", - "description": "**fk_socpeople** (required) \n**type_contact** (required) \n**source** (required) \nnotrigger \n", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/invoicesAddContactModel" - } - } - ], - "summary": "Adds a contact to an invoice 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "304": { - "description": "Not Modified" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "500": { - "description": "System error" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/invoices/{id}/settodraft": { - "post": { - "operationId": "invoicesSettodraft", - "tags": ["invoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Order ID", - "in": "path", - "required": true - }, - { - "name": "invoicesSettodraftModel", - "description": "idwarehouse \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/invoicesSettodraftModel" - } - } - ], - "summary": "Sets an invoice as draft 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "304": { - "description": "Not Modified" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "500": { - "description": "System error" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/invoices/{id}/validate": { - "post": { - "operationId": "invoicesValidate", - "tags": ["invoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Invoice ID", - "in": "path", - "required": true - }, - { - "name": "invoicesValidateModel", - "description": "force_number \nidwarehouse \nnotrigger \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/invoicesValidateModel" - } - } - ], - "summary": "Validate an invoice 🔐", - "description": "If you get a bad value for param notrigger check that ou provide this in body { \"idwarehouse\": 0, \"notrigger\": 0 }", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/invoices/{id}/settopaid": { - "post": { - "operationId": "invoicesSettopaid", - "tags": ["invoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Order ID", - "in": "path", - "required": true - }, - { - "name": "invoicesSettopaidModel", - "description": "close_code \nclose_note \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/invoicesSettopaidModel" - } - } - ], - "summary": "Sets an invoice as paid 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "304": { - "description": "Not Modified" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "500": { - "description": "System error" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/invoices/{id}/settounpaid": { - "post": { - "operationId": "invoicesSettounpaid", - "tags": ["invoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Order ID", - "in": "path", - "required": true - } - ], - "summary": "Sets an invoice as unpaid 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "304": { - "description": "Not Modified" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "500": { - "description": "System error" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/invoices/{id}/discount": { - "get": { - "operationId": "invoicesRetrieveDiscount", - "tags": ["invoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of invoice", - "in": "path", - "required": true - } - ], - "summary": "Get discount from invoice 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/invoices/{id}/markAsCreditAvailable": { - "post": { - "operationId": "invoicesMarkAsCreditAvailable", - "tags": ["invoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Invoice ID", - "in": "path", - "required": true - } - ], - "summary": "Create a discount (credit available) for a credit note or a deposit. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "304": { - "description": "Not Modified" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "500": { - "description": "System error" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/invoices/{id}/usediscount/{discountid}": { - "post": { - "operationId": "invoicesUseDiscount", - "tags": ["invoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of invoice", - "in": "path", - "required": true - }, - { - "name": "discountid", - "type": "integer", - "format": "int64", - "description": "Id of discount", - "in": "path", - "required": true - } - ], - "summary": "Add a discount line into an invoice (as an invoice line) using an existing absolute discount 🔐", - "description": "Note that this consume the discount.", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/invoices/{id}/usecreditnote/{discountid}": { - "post": { - "operationId": "invoicesUseCreditNote", - "tags": ["invoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of invoice", - "in": "path", - "required": true - }, - { - "name": "discountid", - "type": "integer", - "format": "int64", - "description": "Id of a discount coming from a credit note", - "in": "path", - "required": true - } - ], - "summary": "Add an available credit note discount to payments of an existing invoice. 🔐", - "description": " Note that this consume the credit note.", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/invoices/{id}/payments": { - "get": { - "operationId": "invoicesRetrievePayments", - "tags": ["invoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of invoice", - "in": "path", - "required": true - } - ], - "summary": "Get list of payments of a given invoice 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "invoicesAddPayment", - "tags": ["invoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of invoice", - "in": "path", - "required": true - }, - { - "name": "invoicesAddPaymentModel", - "description": "**datepaye** (required) \n**paymentid** (required) \n**closepaidinvoices** (required) \n**accountid** (required) \nnum_payment \ncomment \nchqemetteur \nchqbank \n", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/invoicesAddPaymentModel" - } - } - ], - "summary": "Add payment line to a specific invoice with the remain to pay as amount. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/invoices/paymentsdistributed": { - "post": { - "operationId": "invoicesAddPaymentDistributed", - "tags": ["invoices"], - "parameters": [ - { - "name": "invoicesAddPaymentDistributedModel", - "description": "**arrayofamounts** (required) \n**datepaye** (required) \n**paymentid** (required) \n**closepaidinvoices** (required) \n**accountid** (required) \nnum_payment \ncomment \nchqemetteur \nchqbank \nref_ext \naccepthigherpayment \n", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/invoicesAddPaymentDistributedModel" - } - } - ], - "summary": "Add a payment to pay partially or completely one or several invoices. 🔐", - "description": "Warning: Take care that all invoices are owned by the same customer. Example of value for parameter arrayofamounts: {\"1\": {\"amount\": \"99.99\", \"multicurrency_amount\": \"\"}, \"2\": {\"amount\": \"\", \"multicurrency_amount\": \"10\"}}", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/invoices/payments/{id}": { - "put": { - "operationId": "invoicesUpdatePayment", - "tags": ["invoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of payment", - "in": "path", - "required": true - }, - { - "name": "invoicesUpdatePaymentModel", - "description": "num_payment \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/invoicesUpdatePaymentModel" - } - } - ], - "summary": "Update a payment 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad parameters" - }, - "401": { - "description": "Not allowed" - }, - "404": { - "description": "Not found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/invoices/templates/{id}": { - "get": { - "operationId": "invoicesRetrieveTemplateInvoice", - "tags": ["invoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of template invoice", - "in": "path", - "required": true - }, - { - "name": "contact_list", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "description": "0:Return array contains all properties, 1:Return array contains just id, -1: Do not return contacts/adddesses", - "in": "query", - "required": false - } - ], - "summary": "Get properties of a template invoice object 🔐", - "description": "Return an array with invoice information", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/login": { - "get": { - "operationId": "loginLoginUnsecured", - "tags": ["login"], - "parameters": [ - { - "name": "login", - "type": "string", - "description": "User login", - "in": "query", - "required": true - }, - { - "name": "password", - "type": "string", - "description": "User password", - "in": "query", - "required": true - }, - { - "name": "entity", - "type": "string", - "description": "Entity (when multicompany module is used). '' means 1=first company.", - "in": "query", - "required": false - }, - { - "name": "reset", - "type": "integer", - "format": "int64", - "description": "Reset token (0=get current token, 1=ask a new token and canceled old token. This means access using current existing API token of user will fails: new token will be required for new access)", - "in": "query", - "required": false - } - ], - "summary": "Login 🔓", - "description": "Request the API token for a couple username / password. WARNING: You should NEVER use this API, like you should never use the similar API that uses the POST method. This will expose your password. To use the APIs, you should instead set an API token to the user you want to allow to use API (This API token called DOLAPIKEY can be found/set on the user page) and use this token as credential for any API call. From the API explorer, you can enter directly the \"DOLAPIKEY\" into the field at the top right of the page to get access to any allowed APIs.", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "403": { - "description": "Access denied" - }, - "500": { - "description": "System error" - } - } - }, - "post": { - "operationId": "listLogin", - "tags": ["login"], - "parameters": [ - { - "name": "listLoginModel", - "description": "**login** (required) \n**password** (required) \nentity \nreset \n", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/listLoginModel" - } - } - ], - "summary": "Login 🔓", - "description": "Request the API token for a couple username / password. WARNING: You should NEVER use this API, like you should never use the similar API that uses the POST method. This will expose your password. To use the APIs, you should instead set an API token to the user you want to allow to use API (This API token called DOLAPIKEY can be found/set on the user page) and use this token as credential for any API call. From the API explorer, you can enter directly the \"DOLAPIKEY\" into the field at the top right of the page to get access to any allowed APIs.", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "403": { - "description": "Access denied" - }, - "500": { - "description": "System error" - } - } - } - }, - "/mos/{id}": { - "get": { - "operationId": "retrieveMos", - "tags": ["mos"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of MO", - "in": "path", - "required": true - } - ], - "summary": "Get properties of a MO object 🔐", - "description": "Return an array with MO information", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "put": { - "operationId": "updateMos", - "tags": ["mos"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of MO to update", - "in": "path", - "required": true - }, - { - "name": "updateMosModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/updateMosModel" - } - } - ], - "summary": "Update MO 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "removeMos", - "tags": ["mos"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "MO ID", - "in": "path", - "required": true - } - ], - "summary": "Delete MO 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/mos": { - "get": { - "operationId": "listMos", - "tags": ["mos"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "t.rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')\"", - "in": "query", - "required": false - }, - { - "name": "properties", - "type": "string", - "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", - "in": "query", - "required": false - } - ], - "summary": "List Mos 🔐", - "description": "Get a list of MOs", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "createMos", - "tags": ["mos"], - "parameters": [ - { - "name": "createMosModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/createMosModel" - } - } - ], - "summary": "Create MO object 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/mos/{id}/produceandconsumeall": { - "post": { - "operationId": "mosProduceAndConsumeAll", - "tags": ["mos"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of state", - "in": "path", - "required": true - }, - { - "name": "mosProduceAndConsumeAllModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/mosProduceAndConsumeAllModel" - } - } - ], - "summary": "Produce and consume all 🔐", - "description": "- If arraytoconsume and arraytoproduce are both filled, this fill an empty MO with the lines to consume and produce and record the consumption and production. - If arraytoconsume and arraytoproduce are not provided, it consumes and produces all existing lines. Example: { \"inventorylabel\": \"Produce and consume using API\", \"inventorycode\": \"PRODUCEAPI-YY-MM-DD\", \"autoclose\": 1, \"arraytoconsume\": [ \"objectid\": 123, -- ID_of_product \"qty\": \"2\", \"fk_warehouse\": \"789\" ], \"arraytoproduce\": [ \"objectid\": 456, -- ID_of_product \"qty\": \"1\", \"fk_warehouse\": \"789\" ] }", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/mos/{id}/produceandconsume": { - "post": { - "operationId": "mosProduceAndConsume", - "tags": ["mos"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of state", - "in": "path", - "required": true - }, - { - "name": "mosProduceAndConsumeModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/mosProduceAndConsumeModel" - } - } - ], - "summary": "Produce and consume 🔐", - "description": "Example: { \"inventorylabel\": \"Produce and consume using API\", \"inventorycode\": \"PRODUCEAPI-YY-MM-DD\", \"autoclose\": 1, \"arraytoconsume\": [ { \"objectid\": \"123\", -- rowid of MoLine \"qty\": \"2\", \"fk_warehouse\": \"789\" -- \"0\" or empty, if stock change is disabled. } ], \"arraytoproduce\": [ { \"objectid\": \"456\", -- rowid of MoLine \"qty\": \"1\", \"fk_warehouse\": \"789\", \"pricetoproduce\": \"12.3\" -- optional } ] }", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/orders/{id}": { - "get": { - "operationId": "retrieveOrders", - "tags": ["orders"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of order", - "in": "path", - "required": true - }, - { - "name": "contact_list", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "description": "0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id", - "in": "query", - "required": false - } - ], - "summary": "Get properties of an order object by id 🔐", - "description": "Return an array with order information", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "put": { - "operationId": "updateOrders", - "tags": ["orders"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of order to update", - "in": "path", - "required": true - }, - { - "name": "updateOrdersModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/updateOrdersModel" - } - } - ], - "summary": "Update order general fields (won't touch lines of order) 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "removeOrders", - "tags": ["orders"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Order ID", - "in": "path", - "required": true - } - ], - "summary": "Delete order 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/orders/ref/{ref}": { - "get": { - "operationId": "ordersRetrieveByRef", - "tags": ["orders"], - "parameters": [ - { - "name": "ref", - "type": "string", - "description": "Ref of object", - "in": "path", - "required": true - }, - { - "name": "contact_list", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "description": "0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id", - "in": "query", - "required": false - } - ], - "summary": "Get properties of an order object by ref 🔐", - "description": "Return an array with order information", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/orders/ref_ext/{ref_ext}": { - "get": { - "operationId": "ordersRetrieveByRefExt", - "tags": ["orders"], - "parameters": [ - { - "name": "ref_ext", - "type": "string", - "description": "External reference of object", - "in": "path", - "required": true - }, - { - "name": "contact_list", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "description": "0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id", - "in": "query", - "required": false - } - ], - "summary": "Get properties of an order object by ref_ext 🔐", - "description": "Return an array with order information", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/orders": { - "get": { - "operationId": "listOrders", - "tags": ["orders"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "t.rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - }, - { - "name": "thirdparty_ids", - "type": "string", - "description": "Thirdparty ids to filter orders of (example '1' or '1,2,3')", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')\"", - "in": "query", - "required": false - }, - { - "name": "sqlfilterlines", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(tl.fk_product:=:'17') and (tl.price:<:'250')\"", - "in": "query", - "required": false - }, - { - "name": "properties", - "type": "string", - "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", - "in": "query", - "required": false - } - ], - "summary": "List orders 🔐", - "description": "Get a list of orders", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "404": { - "description": "Not found" - }, - "503": { - "description": "Error" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "createOrders", - "tags": ["orders"], - "parameters": [ - { - "name": "createOrdersModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/createOrdersModel" - } - } - ], - "summary": "Create a sale order 🔐", - "description": "Example: { \"socid\": 2, \"date\": 1595196000, \"type\": 0, \"lines\": [{ \"fk_product\": 2, \"qty\": 1 }] }", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/orders/{id}/lines": { - "get": { - "operationId": "ordersRetrieveLines", - "tags": ["orders"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of order", - "in": "path", - "required": true - } - ], - "summary": "Get lines of an order 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "ordersCreateLine", - "tags": ["orders"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of order to update", - "in": "path", - "required": true - }, - { - "name": "ordersCreateLineModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/ordersCreateLineModel" - } - } - ], - "summary": "Add a line to given order 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/orders/{id}/lines/{lineid}": { - "put": { - "operationId": "ordersUpdateLine", - "tags": ["orders"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of order to update", - "in": "path", - "required": true - }, - { - "name": "lineid", - "type": "integer", - "format": "int64", - "description": "Id of line to update", - "in": "path", - "required": true - }, - { - "name": "ordersUpdateLineModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/ordersUpdateLineModel" - } - } - ], - "summary": "Update a line to given order 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "ordersRemoveLine", - "tags": ["orders"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of order to update", - "in": "path", - "required": true - }, - { - "name": "lineid", - "type": "integer", - "format": "int64", - "description": "Id of line to delete", - "in": "path", - "required": true - } - ], - "summary": "Delete a line of a given order 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/orders/{id}/contacts": { - "get": { - "operationId": "ordersRetrieveContacts", - "tags": ["orders"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of order", - "in": "path", - "required": true - }, - { - "name": "type", - "type": "string", - "description": "Type of the contact (BILLING, SHIPPING, CUSTOMER)", - "in": "query", - "required": false - } - ], - "summary": "Get contacts of given order 🔐", - "description": "Return an array with contact information", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/orders/{id}/contact/{contactid}/{type}": { - "post": { - "operationId": "ordersCreateContact", - "tags": ["orders"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of order to update", - "in": "path", - "required": true - }, - { - "name": "contactid", - "type": "integer", - "format": "int64", - "description": "Id of contact to add", - "in": "path", - "required": true - }, - { - "name": "type", - "type": "string", - "description": "Type of the contact (BILLING, SHIPPING, CUSTOMER)", - "in": "path", - "required": true - } - ], - "summary": "Add a contact type of given order 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "ordersRemoveContact", - "tags": ["orders"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of order to update", - "in": "path", - "required": true - }, - { - "name": "contactid", - "type": "integer", - "format": "int64", - "description": "Id of contact", - "in": "path", - "required": true - }, - { - "name": "type", - "type": "string", - "description": "Type of the contact (BILLING, SHIPPING, CUSTOMER).", - "in": "path", - "required": true - } - ], - "summary": "Unlink a contact type of given order 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "500": { - "description": "System error" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/orders/{id}/validate": { - "post": { - "operationId": "ordersValidate", - "tags": ["orders"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Order ID", - "in": "path", - "required": true - }, - { - "name": "ordersValidateModel", - "description": "idwarehouse \nnotrigger \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/ordersValidateModel" - } - } - ], - "summary": "Validate an order 🔐", - "description": "If you get a bad value for param notrigger check, provide this in body { \"idwarehouse\": 0, \"notrigger\": 0 }", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "304": { - "description": "Not Modified" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "500": { - "description": "System error" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/orders/{id}/reopen": { - "post": { - "operationId": "ordersReopen", - "tags": ["orders"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of the order", - "in": "path", - "required": true - } - ], - "summary": "Tag the order as validated (opened) 🔐", - "description": "Function used when order is reopend after being closed.", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - }, - "304": { - "description": "Not Modified" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/orders/{id}/setinvoiced": { - "post": { - "operationId": "ordersSetinvoiced", - "tags": ["orders"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of the order", - "in": "path", - "required": true - } - ], - "summary": "Classify the order as invoiced. Could be also called setbilled 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/orders/{id}/close": { - "post": { - "operationId": "ordersClose", - "tags": ["orders"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Order ID", - "in": "path", - "required": true - }, - { - "name": "ordersCloseModel", - "description": "notrigger \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/ordersCloseModel" - } - } - ], - "summary": "Close an order (Classify it as \"Delivered\") 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/orders/{id}/settodraft": { - "post": { - "operationId": "ordersSettodraft", - "tags": ["orders"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Order ID", - "in": "path", - "required": true - }, - { - "name": "ordersSettodraftModel", - "description": "idwarehouse \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/ordersSettodraftModel" - } - } - ], - "summary": "Set an order to draft 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/orders/createfromproposal/{proposalid}": { - "post": { - "operationId": "ordersCreateOrderFromProposal", - "tags": ["orders"], - "parameters": [ - { - "name": "proposalid", - "type": "integer", - "format": "int64", - "description": "Id of the proposal", - "in": "path", - "required": true - } - ], - "summary": "Create an order using an existing proposal. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/orders/{id}/shipment": { - "get": { - "operationId": "ordersRetrieveOrderShipments", - "tags": ["orders"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of the order", - "in": "path", - "required": true - } - ], - "summary": "Get the shipments of an order 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "500": { - "description": "System error" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/orders/{id}/shipment/{warehouse_id}": { - "post": { - "operationId": "ordersCreateOrderShipment", - "tags": ["orders"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of the order", - "in": "path", - "required": true - }, - { - "name": "warehouse_id", - "type": "integer", - "format": "int64", - "description": "Id of a warehouse", - "in": "path", - "required": true - } - ], - "summary": "Create the shipment of an order 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "500": { - "description": "System error" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/products/{id}": { - "get": { - "operationId": "retrieveProducts", - "tags": ["products"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of product", - "in": "path", - "required": true - }, - { - "name": "includestockdata", - "type": "integer", - "format": "int64", - "description": "Load also information about stock (slower)", - "in": "query", - "required": false - }, - { - "name": "includesubproducts", - "type": "boolean", - "description": "Load information about subproducts", - "in": "query", - "required": false - }, - { - "name": "includeparentid", - "type": "boolean", - "description": "Load also ID of parent product (if product is a variant of a parent product)", - "in": "query", - "required": false - }, - { - "name": "includetrans", - "type": "boolean", - "description": "Load also the translations of product label and description", - "in": "query", - "required": false - } - ], - "summary": "Get properties of a product object by id 🔐", - "description": "Return an array with product information.", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "put": { - "operationId": "updateProducts", - "tags": ["products"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of product to update", - "in": "path", - "required": true - }, - { - "name": "updateProductsModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/updateProductsModel" - } - } - ], - "summary": "Update product. 🔐", - "description": "Price will be updated by this API only if option is set on \"One price per product\" or if PRODUIT_MULTIPRICES is set (1 price per segment) See other APIs for other price modes.", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "removeProducts", - "tags": ["products"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Product ID", - "in": "path", - "required": true - } - ], - "summary": "Delete product 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/products/ref/{ref}": { - "get": { - "operationId": "productsRetrieveByRef", - "tags": ["products"], - "parameters": [ - { - "name": "ref", - "type": "string", - "description": "Ref of element", - "in": "path", - "required": true - }, - { - "name": "includestockdata", - "type": "integer", - "format": "int64", - "description": "Load also information about stock (slower)", - "in": "query", - "required": false - }, - { - "name": "includesubproducts", - "type": "boolean", - "description": "Load information about subproducts", - "in": "query", - "required": false - }, - { - "name": "includeparentid", - "type": "boolean", - "description": "Load also ID of parent product (if product is a variant of a parent product)", - "in": "query", - "required": false - }, - { - "name": "includetrans", - "type": "boolean", - "description": "Load also the translations of product label and description", - "in": "query", - "required": false - } - ], - "summary": "Get properties of a product object by ref 🔐", - "description": "Return an array with product information.", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/products/ref_ext/{ref_ext}": { - "get": { - "operationId": "productsRetrieveByRefExt", - "tags": ["products"], - "parameters": [ - { - "name": "ref_ext", - "type": "string", - "description": "Ref_ext of element", - "in": "path", - "required": true - }, - { - "name": "includestockdata", - "type": "integer", - "format": "int64", - "description": "Load also information about stock (slower)", - "in": "query", - "required": false - }, - { - "name": "includesubproducts", - "type": "boolean", - "description": "Load information about subproducts", - "in": "query", - "required": false - }, - { - "name": "includeparentid", - "type": "boolean", - "description": "Load also ID of parent product (if product is a variant of a parent product)", - "in": "query", - "required": false - }, - { - "name": "includetrans", - "type": "boolean", - "description": "Load also the translations of product label and description", - "in": "query", - "required": false - } - ], - "summary": "Get properties of a product object by ref_ext 🔐", - "description": "Return an array with product information.", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/products/barcode/{barcode}": { - "get": { - "operationId": "productsRetrieveByBarcode", - "tags": ["products"], - "parameters": [ - { - "name": "barcode", - "type": "string", - "description": "Barcode of element", - "in": "path", - "required": true - }, - { - "name": "includestockdata", - "type": "integer", - "format": "int64", - "description": "Load also information about stock (slower)", - "in": "query", - "required": false - }, - { - "name": "includesubproducts", - "type": "boolean", - "description": "Load information about subproducts", - "in": "query", - "required": false - }, - { - "name": "includeparentid", - "type": "boolean", - "description": "Load also ID of parent product (if product is a variant of a parent product)", - "in": "query", - "required": false - }, - { - "name": "includetrans", - "type": "boolean", - "description": "Load also the translations of product label and description", - "in": "query", - "required": false - } - ], - "summary": "Get properties of a product object by barcode 🔐", - "description": "Return an array with product information.", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/products": { - "get": { - "operationId": "listProducts", - "tags": ["products"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "t.ref", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - }, - { - "name": "mode", - "type": "integer", - "format": "int64", - "description": "Use this param to filter list (0 for all, 1 for only product, 2 for only service)", - "in": "query", - "required": false - }, - { - "name": "category", - "type": "integer", - "format": "int64", - "description": "Use this param to filter list by category", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.tobuy:=:0) and (t.tosell:=:1)\"", - "in": "query", - "required": false - }, - { - "name": "ids_only", - "type": "boolean", - "description": "Return only IDs of product instead of all properties (faster, above all if list is long)", - "in": "query", - "required": false - }, - { - "name": "variant_filter", - "type": "integer", - "format": "int64", - "description": "Use this param to filter list (0 = all, 1=products without variants, 2=parent of variants, 3=variants only)", - "in": "query", - "required": false - }, - { - "name": "pagination_data", - "type": "boolean", - "description": "If this parameter is set to true the response will include pagination data. Default value is false. Page starts from 0", - "in": "query", - "required": false - }, - { - "name": "includestockdata", - "type": "integer", - "format": "int64", - "description": "Load also information about stock (slower)", - "in": "query", - "required": false - }, - { - "name": "properties", - "type": "string", - "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", - "in": "query", - "required": false - } - ], - "summary": "List products 🔐", - "description": "Get a list of products", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "createProducts", - "tags": ["products"], - "parameters": [ - { - "name": "createProductsModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/createProductsModel" - } - } - ], - "summary": "Create product object 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/products/{id}/subproducts": { - "get": { - "operationId": "productsRetrieveSubproducts", - "tags": ["products"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of parent product/service", - "in": "path", - "required": true - } - ], - "summary": "Get the list of subproducts of the product. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "RestException" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/products/{id}/subproducts/add": { - "post": { - "operationId": "productsAddSubproducts", - "tags": ["products"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of parent product/service", - "in": "path", - "required": true - }, - { - "name": "productsAddSubproductsModel", - "description": "**subproduct_id** (required) \n**qty** (required) \nincdec \n", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/productsAddSubproductsModel" - } - } - ], - "summary": "Add subproduct. 🔐", - "description": " Link a product/service to a parent product/service", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - }, - "500": { - "description": "RestException" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/products/{id}/subproducts/remove/{subproduct_id}": { - "delete": { - "operationId": "productsDelSubproducts", - "tags": ["products"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of parent product/service", - "in": "path", - "required": true - }, - { - "name": "subproduct_id", - "type": "integer", - "format": "int64", - "description": "Id of child product/service", - "in": "path", - "required": true - } - ], - "summary": "Remove subproduct. 🔐", - "description": "Unlink a product/service from a parent product/service", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/products/{id}/categories": { - "get": { - "operationId": "productsRetrieveCategories", - "tags": ["products"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of product", - "in": "path", - "required": true - }, - { - "name": "sortfield", - "type": "string", - "defaultValue": "s.rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - } - ], - "summary": "Get categories for a product 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/products/{id}/selling_multiprices/per_segment": { - "get": { - "operationId": "productsRetrieveCustomerPricesPerSegment", - "tags": ["products"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of product", - "in": "path", - "required": true - } - ], - "summary": "Get prices per segment for a product 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/products/{id}/selling_multiprices/per_customer": { - "get": { - "operationId": "productsRetrieveCustomerPricesPerCustomer", - "tags": ["products"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of product", - "in": "path", - "required": true - }, - { - "name": "thirdparty_id", - "type": "string", - "description": "Thirdparty id to filter orders of (example '1')", - "in": "query", - "required": false - } - ], - "summary": "Get prices per customer for a product 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/products/{id}/selling_multiprices/per_quantity": { - "get": { - "operationId": "productsRetrieveCustomerPricesPerQuantity", - "tags": ["products"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of product", - "in": "path", - "required": true - } - ], - "summary": "Get prices per quantity for a product 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/products/{id}/purchase_prices": { - "post": { - "operationId": "productsAddPurchasePrice", - "tags": ["products"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of Product", - "in": "path", - "required": true - }, - { - "name": "productsAddPurchasePriceModel", - "description": "**qty** (required) \n**buyprice** (required) \n**price_base_type** (required) \n**fourn_id** (required) \n**availability** (required) \n**ref_fourn** (required) \n**tva_tx** (required) \ncharges \nremise_percent \nremise \nnewnpr \ndelivery_time_days \nsupplier_reputation \nlocaltaxes_array \nnewdefaultvatcode \nmulticurrency_buyprice \nmulticurrency_price_base_type \nmulticurrency_tx \nmulticurrency_code \ndesc_fourn \nbarcode \nfk_barcode_type \n", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/productsAddPurchasePriceModel" - } - } - ], - "summary": "Add/Update purchase prices for a product. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - }, - "500": { - "description": "System error" - }, - "401": { - "description": "Unauthorized" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "get": { - "operationId": "productsRetrievePurchasePrices", - "tags": ["products"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of product", - "in": "path", - "required": true - }, - { - "name": "ref", - "type": "string", - "description": "Ref of element", - "in": "query", - "required": false - }, - { - "name": "ref_ext", - "type": "string", - "description": "Ref ext of element", - "in": "query", - "required": false - }, - { - "name": "barcode", - "type": "string", - "description": "Barcode of element", - "in": "query", - "required": false - } - ], - "summary": "Get purchase prices for a product 🔐", - "description": "Return an array with product information. TODO implement getting a product by ref or by $ref_ext", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/products/{id}/purchase_prices/{priceid}": { - "delete": { - "operationId": "productsRemovePurchasePrice", - "tags": ["products"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Product ID", - "in": "path", - "required": true - }, - { - "name": "priceid", - "type": "integer", - "format": "int64", - "description": "purchase price ID", - "in": "path", - "required": true - } - ], - "summary": "Delete purchase price for a product 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/products/purchase_prices": { - "get": { - "operationId": "productsRetrieveSupplierProducts", - "tags": ["products"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "t.ref", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - }, - { - "name": "mode", - "type": "integer", - "format": "int64", - "description": "Use this param to filter list (0 for all, 1 for only product, 2 for only service)", - "in": "query", - "required": false - }, - { - "name": "category", - "type": "integer", - "format": "int64", - "description": "Use this param to filter list by category of product", - "in": "query", - "required": false - }, - { - "name": "supplier", - "type": "integer", - "format": "int64", - "description": "Use this param to filter list by supplier", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.tobuy:=:0) and (t.tosell:=:1)\"", - "in": "query", - "required": false - } - ], - "summary": "Get a list of all purchase prices of products 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/products/attributes": { - "get": { - "operationId": "productsRetrieveAttributes", - "tags": ["products"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "t.ref", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:color)\"", - "in": "query", - "required": false - }, - { - "name": "properties", - "type": "string", - "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", - "in": "query", - "required": false - } - ], - "summary": "Get attributes. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "503": { - "description": "Service Unavailable" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "productsAddAttributes", - "tags": ["products"], - "parameters": [ - { - "name": "productsAddAttributesModel", - "description": "**ref** (required) \n**label** (required) \nref_ext \n", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/productsAddAttributesModel" - } - } - ], - "summary": "Add attributes. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - }, - "500": { - "description": "System error" - }, - "401": { - "description": "Unauthorized" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/products/attributes/{id}": { - "get": { - "operationId": "productsRetrieveAttributeById", - "tags": ["products"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of Attribute", - "in": "path", - "required": true - } - ], - "summary": "Get attribute by ID. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "put": { - "operationId": "productsUpdateAttributes", - "tags": ["products"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of Attribute", - "in": "path", - "required": true - }, - { - "name": "productsUpdateAttributesModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/productsUpdateAttributesModel" - } - } - ], - "summary": "Update attributes by id. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "500": { - "description": "RestException" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "productsRemoveAttributes", - "tags": ["products"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of Attribute", - "in": "path", - "required": true - } - ], - "summary": "Delete attributes by id. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - }, - "500": { - "description": "System error" - }, - "401": { - "description": "Unauthorized" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/products/attributes/ref/{ref}": { - "get": { - "operationId": "productsRetrieveAttributesByRef", - "tags": ["products"], - "parameters": [ - { - "name": "ref", - "type": "string", - "description": "Reference of Attribute", - "in": "path", - "required": true - } - ], - "summary": "Get attributes by ref. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/products/attributes/ref_ext/{ref_ext}": { - "get": { - "operationId": "productsRetrieveAttributesByRefExt", - "tags": ["products"], - "parameters": [ - { - "name": "ref_ext", - "type": "string", - "description": "External reference of Attribute", - "in": "path", - "required": true - } - ], - "summary": "Get attributes by ref_ext. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "System error" - }, - "401": { - "description": "Unauthorized" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/products/attributes/values/{id}": { - "get": { - "operationId": "productsRetrieveAttributeValueById", - "tags": ["products"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of Attribute value", - "in": "path", - "required": true - } - ], - "summary": "Get attribute value by id. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "System error" - }, - "401": { - "description": "Unauthorized" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "put": { - "operationId": "productsUpdateAttributeValue", - "tags": ["products"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of Attribute", - "in": "path", - "required": true - }, - { - "name": "productsUpdateAttributeValueModel", - "description": "**request_data** (required) \n", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/productsUpdateAttributeValueModel" - } - } - ], - "summary": "Update attribute value. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "401": { - "description": "Unauthorized" - }, - "500": { - "description": "System error" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "productsRemoveAttributeValueById", - "tags": ["products"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of Attribute value", - "in": "path", - "required": true - } - ], - "summary": "Delete attribute value by id. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - }, - "500": { - "description": "System error" - }, - "401": { - "description": "Unauthorized" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/products/attributes/{id}/values/ref/{ref}": { - "get": { - "operationId": "productsRetrieveAttributeValueByRef", - "tags": ["products"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of Attribute value", - "in": "path", - "required": true - }, - { - "name": "ref", - "type": "string", - "description": "Ref of Attribute value", - "in": "path", - "required": true - } - ], - "summary": "Get attribute value by ref. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "System error" - }, - "401": { - "description": "Unauthorized" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "productsRemoveAttributeValueByRef", - "tags": ["products"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of Attribute", - "in": "path", - "required": true - }, - { - "name": "ref", - "type": "string", - "description": "Ref of Attribute value", - "in": "path", - "required": true - } - ], - "summary": "Delete attribute value by ref. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/products/attributes/{id}/values": { - "get": { - "operationId": "productsRetrieveAttributeValues", - "tags": ["products"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of an Attribute", - "in": "path", - "required": true - } - ], - "summary": "Get all values for an attribute id. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "401": { - "description": "Unauthorized" - }, - "500": { - "description": "System error" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "productsAddAttributeValue", - "tags": ["products"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of Attribute", - "in": "path", - "required": true - }, - { - "name": "productsAddAttributeValueModel", - "description": "**ref** (required) \n**value** (required) \n", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/productsAddAttributeValueModel" - } - } - ], - "summary": "Add attribute value. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - }, - "500": { - "description": "System error" - }, - "401": { - "description": "Unauthorized" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/products/attributes/ref/{ref}/values": { - "get": { - "operationId": "productsRetrieveAttributeValuesByRef", - "tags": ["products"], - "parameters": [ - { - "name": "ref", - "type": "string", - "description": "Ref of an Attribute", - "in": "path", - "required": true - } - ], - "summary": "Get all values for an attribute ref. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "401": { - "description": "Unauthorized" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/products/{id}/variants": { - "get": { - "operationId": "productsRetrieveVariants", - "tags": ["products"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of Product", - "in": "path", - "required": true - }, - { - "name": "includestock", - "type": "integer", - "format": "int64", - "description": "Default value 0. If parameter is set to 1 the response will contain stock data of each variant", - "in": "query", - "required": false - } - ], - "summary": "Get product variants. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "System error" - }, - "401": { - "description": "Unauthorized" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "productsAddVariant", - "tags": ["products"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of Product", - "in": "path", - "required": true - }, - { - "name": "productsAddVariantModel", - "description": "**weight_impact** (required) \n**price_impact** (required) \n**price_impact_is_percent** (required) \n**features** (required) \nreference \nref_ext \n", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/productsAddVariantModel" - } - } - ], - "summary": "Add variant. 🔐", - "description": " \"features\" is a list of attributes pairs id_attribute=>id_value. Example: array(id_color=>id_Blue, id_size=>id_small, id_option=>id_val_a, ...)", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - }, - "500": { - "description": "System error" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/products/ref/{ref}/variants": { - "get": { - "operationId": "productsRetrieveVariantsByProdRef", - "tags": ["products"], - "parameters": [ - { - "name": "ref", - "type": "string", - "description": "Ref of Product", - "in": "path", - "required": true - } - ], - "summary": "Get product variants by Product ref. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "System error" - }, - "401": { - "description": "Unauthorized" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "productsAddVariantByProductRef", - "tags": ["products"], - "parameters": [ - { - "name": "ref", - "type": "string", - "description": "Ref of Product", - "in": "path", - "required": true - }, - { - "name": "productsAddVariantByProductRefModel", - "description": "**weight_impact** (required) \n**price_impact** (required) \n**price_impact_is_percent** (required) \n**features** (required) \n", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/productsAddVariantByProductRefModel" - } - } - ], - "summary": "Add variant by product ref. 🔐", - "description": " \"features\" is a list of attributes pairs id_attribute=>id_value. Example: array(id_color=>id_Blue, id_size=>id_small, id_option=>id_val_a, ...)", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - }, - "500": { - "description": "System error" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/products/variants/{id}": { - "put": { - "operationId": "productsUpdateVariant", - "tags": ["products"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of Variant", - "in": "path", - "required": true - }, - { - "name": "productsUpdateVariantModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/productsUpdateVariantModel" - } - } - ], - "summary": "Put product variants. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - }, - "500": { - "description": "System error" - }, - "401": { - "description": "Unauthorized" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "productsRemoveVariant", - "tags": ["products"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of Variant", - "in": "path", - "required": true - } - ], - "summary": "Delete product variants. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - }, - "500": { - "description": "System error" - }, - "401": { - "description": "Unauthorized" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/products/{id}/stock": { - "get": { - "operationId": "productsRetrieveStock", - "tags": ["products"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of Product", - "in": "path", - "required": true - }, - { - "name": "selected_warehouse_id", - "type": "integer", - "format": "int64", - "description": "ID of warehouse", - "in": "query", - "required": false - } - ], - "summary": "Get stock data for the product id given. 🔐", - "description": "Optionally with $selected_warehouse_id parameter user can get stock of specific warehouse", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "System error" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/projects/{id}": { - "get": { - "operationId": "retrieveProjects", - "tags": ["projects"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of project", - "in": "path", - "required": true - } - ], - "summary": "Get properties of a project object 🔐", - "description": "Return an array with project information", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "put": { - "operationId": "updateProjects", - "tags": ["projects"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of project to update", - "in": "path", - "required": true - }, - { - "name": "updateProjectsModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/updateProjectsModel" - } - } - ], - "summary": "Update project general fields (won't touch lines of project) 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "removeProjects", - "tags": ["projects"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Project ID", - "in": "path", - "required": true - } - ], - "summary": "Delete project 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/projects/ref/{ref}": { - "get": { - "operationId": "projectsRetrieveByRef", - "tags": ["projects"], - "parameters": [ - { - "name": "ref", - "type": "string", - "description": "Ref of project", - "in": "path", - "required": true - } - ], - "summary": "Get properties of a project object 🔐", - "description": "Return an array with project information", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/projects/ref_ext/{ref_ext}": { - "get": { - "operationId": "projectsRetrieveByRefExt", - "tags": ["projects"], - "parameters": [ - { - "name": "ref_ext", - "type": "string", - "description": "Ref_Ext of project", - "in": "path", - "required": true - } - ], - "summary": "Get properties of a project object 🔐", - "description": "Return an array with project information", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/projects/email_msgid/{email_msgid}": { - "get": { - "operationId": "projectsRetrieveByMsgId", - "tags": ["projects"], - "parameters": [ - { - "name": "email_msgid", - "type": "string", - "description": "Email msgid of project", - "in": "path", - "required": true - } - ], - "summary": "Get properties of a project object 🔐", - "description": "Return an array with project information", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/projects": { - "get": { - "operationId": "listProjects", - "tags": ["projects"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "t.rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - }, - { - "name": "thirdparty_ids", - "type": "string", - "description": "Thirdparty ids to filter projects of (example '1' or '1,2,3')", - "in": "query", - "required": false - }, - { - "name": "category", - "type": "integer", - "format": "int64", - "description": "Use this param to filter list by category", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')\"", - "in": "query", - "required": false - }, - { - "name": "properties", - "type": "string", - "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", - "in": "query", - "required": false - } - ], - "summary": "List projects 🔐", - "description": "Get a list of projects", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "createProjects", - "tags": ["projects"], - "parameters": [ - { - "name": "createProjectsModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/createProjectsModel" - } - } - ], - "summary": "Create project object 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/projects/{id}/tasks": { - "get": { - "operationId": "projectsRetrieveLines", - "tags": ["projects"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of project", - "in": "path", - "required": true - }, - { - "name": "includetimespent", - "type": "integer", - "format": "int64", - "description": "0=Return only list of tasks. 1=Include a summary of time spent, 2=Include details of time spent lines", - "in": "query", - "required": false - } - ], - "summary": "Get tasks of a project. 🔐", - "description": "See also API /tasks", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/projects/{id}/roles": { - "get": { - "operationId": "projectsRetrieveRoles", - "tags": ["projects"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of project", - "in": "path", - "required": true - }, - { - "name": "userid", - "type": "integer", - "format": "int64", - "description": "Id of user (0 = connected user)", - "in": "query", - "required": false - } - ], - "summary": "Get roles a user is assigned to a project with 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/projects/{id}/validate": { - "post": { - "operationId": "projectsValidate", - "tags": ["projects"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Project ID", - "in": "path", - "required": true - }, - { - "name": "projectsValidateModel", - "description": "notrigger \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/projectsValidateModel" - } - } - ], - "summary": "Validate a project. 🔐", - "description": "You can test this API with the following input message { \"notrigger\": 0 }", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/proposals/{id}": { - "get": { - "operationId": "retrieveProposals", - "tags": ["proposals"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of commercial proposal", - "in": "path", - "required": true - }, - { - "name": "contact_list", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "description": "0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id", - "in": "query", - "required": false - } - ], - "summary": "Get properties of a commercial proposal object 🔐", - "description": "Return an array with commercial proposal information", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "put": { - "operationId": "updateProposals", - "tags": ["proposals"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of commercial proposal to update", - "in": "path", - "required": true - }, - { - "name": "updateProposalsModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/updateProposalsModel" - } - } - ], - "summary": "Update commercial proposal general fields (won't touch lines of commercial proposal) 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "removeProposals", - "tags": ["proposals"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Commercial proposal ID", - "in": "path", - "required": true - } - ], - "summary": "Delete commercial proposal 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/proposals/ref/{ref}": { - "get": { - "operationId": "proposalsRetrieveByRef", - "tags": ["proposals"], - "parameters": [ - { - "name": "ref", - "type": "string", - "description": "Ref of object", - "in": "path", - "required": true - }, - { - "name": "contact_list", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "description": "0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id", - "in": "query", - "required": false - } - ], - "summary": "Get properties of an proposal object by ref 🔐", - "description": "Return an array with proposal information", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/proposals/ref_ext/{ref_ext}": { - "get": { - "operationId": "proposalsRetrieveByRefExt", - "tags": ["proposals"], - "parameters": [ - { - "name": "ref_ext", - "type": "string", - "description": "External reference of object", - "in": "path", - "required": true - }, - { - "name": "contact_list", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "description": "0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id", - "in": "query", - "required": false - } - ], - "summary": "Get properties of an proposal object by ref_ext 🔐", - "description": "Return an array with proposal information", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/proposals": { - "get": { - "operationId": "listProposals", - "tags": ["proposals"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "t.rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - }, - { - "name": "thirdparty_ids", - "type": "string", - "description": "Thirdparty ids to filter commercial proposals (example '1' or '1,2,3')", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.datec:<:'2016-01-01')\"", - "in": "query", - "required": false - }, - { - "name": "properties", - "type": "string", - "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", - "in": "query", - "required": false - } - ], - "summary": "List commercial proposals 🔐", - "description": "Get a list of commercial proposals", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "createProposals", - "tags": ["proposals"], - "parameters": [ - { - "name": "createProposalsModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/createProposalsModel" - } - } - ], - "summary": "Create commercial proposal object 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/proposals/{id}/lines": { - "get": { - "operationId": "proposalsRetrieveLines", - "tags": ["proposals"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of commercial proposal", - "in": "path", - "required": true - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. d is the alias for proposal lines table, p is the alias for product table. \"Syntax example \"(p.ref:like:'SO-%') AND (d.date_start:<:'20220101')\"", - "in": "query", - "required": false - } - ], - "summary": "Get lines of a commercial proposal 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "proposalsCreateLines", - "tags": ["proposals"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of commercial proposal to update", - "in": "path", - "required": true - }, - { - "name": "proposalsCreateLinesModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/proposalsCreateLinesModel" - } - } - ], - "summary": "Add lines to given commercial proposal 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/proposals/{id}/line": { - "post": { - "operationId": "proposalsCreateLine", - "tags": ["proposals"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of commercial proposal to update", - "in": "path", - "required": true - }, - { - "name": "proposalsCreateLineModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/proposalsCreateLineModel" - } - } - ], - "summary": "Add a line to given commercial proposal 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/proposals/{id}/lines/{lineid}": { - "put": { - "operationId": "proposalsUpdateLine", - "tags": ["proposals"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of commercial proposal to update", - "in": "path", - "required": true - }, - { - "name": "lineid", - "type": "integer", - "format": "int64", - "description": "Id of line to update", - "in": "path", - "required": true - }, - { - "name": "proposalsUpdateLineModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/proposalsUpdateLineModel" - } - } - ], - "summary": "Update a line of given commercial proposal 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "proposalsRemoveLine", - "tags": ["proposals"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of commercial proposal to update", - "in": "path", - "required": true - }, - { - "name": "lineid", - "type": "integer", - "format": "int64", - "description": "Id of line to delete", - "in": "path", - "required": true - } - ], - "summary": "Delete a line of given commercial proposal 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/proposals/{id}/contact/{contactid}/{type}/{source}": { - "post": { - "operationId": "proposalsCreateContact", - "tags": ["proposals"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of commercial proposal to update", - "in": "path", - "required": true - }, - { - "name": "contactid", - "type": "integer", - "format": "int64", - "description": "Id of external or internal contact to add", - "in": "path", - "required": true - }, - { - "name": "type", - "type": "string", - "description": "Type of the external contact (BILLING, SHIPPING, CUSTOMER), internal contact (SALESREPFOLL)", - "in": "path", - "required": true - }, - { - "name": "source", - "type": "string", - "defaultValue": "external", - "description": "Source of the contact (internal, external)", - "in": "path", - "required": false - } - ], - "summary": "Add a contact type of given commercial proposal 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/proposals/{id}/contact/{contactid}/{type}": { - "delete": { - "operationId": "proposalsRemoveContact", - "tags": ["proposals"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of commercial proposal to update", - "in": "path", - "required": true - }, - { - "name": "contactid", - "type": "integer", - "format": "int64", - "description": "Row key of the contact in the array contact_ids.", - "in": "path", - "required": true - }, - { - "name": "type", - "type": "string", - "description": "Type of the contact (BILLING, SHIPPING, CUSTOMER).", - "in": "path", - "required": true - } - ], - "summary": "Delete a contact type of given commercial proposal 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "500": { - "description": "System error" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/proposals/{id}/settodraft": { - "post": { - "operationId": "proposalsSettodraft", - "tags": ["proposals"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Order ID", - "in": "path", - "required": true - } - ], - "summary": "Set a proposal to draft 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/proposals/{id}/validate": { - "post": { - "operationId": "proposalsValidate", - "tags": ["proposals"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Commercial proposal ID", - "in": "path", - "required": true - }, - { - "name": "proposalsValidateModel", - "description": "notrigger \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/proposalsValidateModel" - } - } - ], - "summary": "Validate a commercial proposal 🔐", - "description": "If you get a bad value for param notrigger check that ou provide this in body { \"notrigger\": 0 }", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "304": { - "description": "Not Modified" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "500": { - "description": "System error" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/proposals/{id}/close": { - "post": { - "operationId": "proposalsClose", - "tags": ["proposals"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Commercial proposal ID", - "in": "path", - "required": true - }, - { - "name": "proposalsCloseModel", - "description": "**status** (required) \nnote_private \nnotrigger \n", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/proposalsCloseModel" - } - } - ], - "summary": "Close (Accept or refuse) a quote / commercial proposal 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/proposals/{id}/setinvoiced": { - "post": { - "operationId": "proposalsSetinvoiced", - "tags": ["proposals"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Commercial proposal ID", - "in": "path", - "required": true - } - ], - "summary": "Set a commercial proposal billed. Could be also called setbilled 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/salaries": { - "get": { - "operationId": "listSalaries", - "tags": ["salaries"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "t.rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - } - ], - "summary": "Get the list of salaries. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "createSalaries", - "tags": ["salaries"], - "parameters": [ - { - "name": "createSalariesModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/createSalariesModel" - } - } - ], - "summary": "Create salary object 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/salaries/{id}": { - "get": { - "operationId": "retrieveSalaries", - "tags": ["salaries"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of salary", - "in": "path", - "required": true - } - ], - "summary": "Get salary by ID. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "put": { - "operationId": "updateSalaries", - "tags": ["salaries"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of salary", - "in": "path", - "required": true - }, - { - "name": "updateSalariesModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/updateSalariesModel" - } - } - ], - "summary": "Update salary 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/salaries/payments": { - "get": { - "operationId": "salariesRetrieveAllPayments", - "tags": ["salaries"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "t.rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - } - ], - "summary": "Get the list of payment of salaries. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/salaries/payments/{pid}": { - "get": { - "operationId": "salariesRetrievePayments", - "tags": ["salaries"], - "parameters": [ - { - "name": "pid", - "type": "integer", - "format": "int64", - "description": "ID of payment salary", - "in": "path", - "required": true - } - ], - "summary": "Get a given payment. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/salaries/{id}/payments": { - "post": { - "operationId": "salariesUpdatePayment", - "tags": ["salaries"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of paymentsalary", - "in": "path", - "required": true - }, - { - "name": "salariesUpdatePaymentModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/salariesUpdatePaymentModel" - } - } - ], - "summary": "Update paymentsalary 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/ordering_methods": { - "get": { - "operationId": "setupRetrieveOrderingMethods", - "tags": ["setup"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "code", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Number of items per page", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - }, - { - "name": "active", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "maximum": 1, - "description": "Payment type is active or not", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "SQL criteria to filter with. Syntax example \"(t.code:=:'OrderByWWW')\"", - "in": "query", - "required": false - } - ], - "summary": "Get the list of ordering methods. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad value for sqlfilters" - }, - "403": { - "description": "Access denied" - }, - "503": { - "description": "Error retrieving list of ordering methods" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/ordering_origins": { - "get": { - "operationId": "setupRetrieveOrderingOrigins", - "tags": ["setup"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "code", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Number of items per page", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - }, - { - "name": "active", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "maximum": 1, - "description": "Payment type is active or not", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "SQL criteria to filter with. Syntax example \"(t.code:=:'OrderByWWW')\"", - "in": "query", - "required": false - } - ], - "summary": "Get the list of ordering origins. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad value for sqlfilters" - }, - "403": { - "description": "Access denied" - }, - "503": { - "description": "Error retrieving list of ordering origins" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/payment_types": { - "get": { - "operationId": "setupRetrievePaymentTypes", - "tags": ["setup"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "code", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Number of items per page", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - }, - { - "name": "active", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "maximum": 1, - "description": "Payment type is active or not", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "SQL criteria to filter with. Syntax example \"(t.code:=:'CHQ')\"", - "in": "query", - "required": false - } - ], - "summary": "Get the list of payments types. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad value for sqlfilters" - }, - "403": { - "description": "Access denied" - }, - "503": { - "description": "Error retrieving list of payment types" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/regions": { - "get": { - "operationId": "setupRetrieveListOfRegions", - "tags": ["setup"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "code_region", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Number of items per page", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number (starting from zero)", - "in": "query", - "required": false - }, - { - "name": "country", - "type": "integer", - "format": "int64", - "description": "To filter on country", - "in": "query", - "required": false - }, - { - "name": "filter", - "type": "string", - "description": "To filter the regions by name", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", - "in": "query", - "required": false - } - ], - "summary": "Get the list of regions. 🔐", - "description": " The returned list is sorted by region ID.", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad value for sqlfilters" - }, - "503": { - "description": "Error retrieving list of regions" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/regions/{id}": { - "get": { - "operationId": "setupRetrieveRegionByID", - "tags": ["setup"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of region", - "in": "path", - "required": true - } - ], - "summary": "Get region by ID. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "404": { - "description": "Region not found" - }, - "503": { - "description": "Error retrieving region" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/regions/byCode/{code}": { - "get": { - "operationId": "setupRetrieveRegionByCode", - "tags": ["setup"], - "parameters": [ - { - "name": "code", - "type": "string", - "description": "Code of region", - "in": "path", - "required": true - } - ], - "summary": "Get region by Code. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "404": { - "description": "Region not found" - }, - "503": { - "description": "Error when retrieving region" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/states": { - "get": { - "operationId": "setupRetrieveListOfStates", - "tags": ["setup"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "code_departement", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Number of items per page", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number (starting from zero)", - "in": "query", - "required": false - }, - { - "name": "country", - "type": "integer", - "format": "int64", - "description": "To filter on country", - "in": "query", - "required": false - }, - { - "name": "filter", - "type": "string", - "description": "To filter the states by name", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", - "in": "query", - "required": false - } - ], - "summary": "Get the list of states/provinces. 🔐", - "description": " The names of the states will be translated to the given language if the $lang parameter is provided. The value of $lang must be a language code supported by Dolibarr, for example 'en_US' or 'fr_FR'. The returned list is sorted by state ID.", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad value for sqlfilters" - }, - "503": { - "description": "Error retrieving list of states" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/states/{id}": { - "get": { - "operationId": "setupRetrieveStateByID", - "tags": ["setup"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of state", - "in": "path", - "required": true - } - ], - "summary": "Get state by ID. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "404": { - "description": "State not found" - }, - "503": { - "description": "Error retrieving state" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/states/byCode/{code}": { - "get": { - "operationId": "setupRetrieveStateByCode", - "tags": ["setup"], - "parameters": [ - { - "name": "code", - "type": "string", - "description": "Code of state", - "in": "path", - "required": true - } - ], - "summary": "Get state by Code. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "404": { - "description": "State not found" - }, - "503": { - "description": "Error retrieving state" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/countries": { - "get": { - "operationId": "setupRetrieveListOfCountries", - "tags": ["setup"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "code", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Number of items per page", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number (starting from zero)", - "in": "query", - "required": false - }, - { - "name": "filter", - "type": "string", - "description": "To filter the countries by name", - "in": "query", - "required": false - }, - { - "name": "lang", - "type": "string", - "description": "Code of the language the label of the countries must be translated to", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", - "in": "query", - "required": false - } - ], - "summary": "Get the list of countries. 🔐", - "description": " The names of the countries will be translated to the given language if the $lang parameter is provided. The value of $lang must be a language code supported by Dolibarr, for example 'en_US' or 'fr_FR'. The returned list is sorted by country ID.", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad value for sqlfilters" - }, - "503": { - "description": "Error retrieving list of countries" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/countries/{id}": { - "get": { - "operationId": "setupRetrieveCountryByID", - "tags": ["setup"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of country", - "in": "path", - "required": true - }, - { - "name": "lang", - "type": "string", - "description": "Code of the language the name of the country must be translated to", - "in": "query", - "required": false - } - ], - "summary": "Get country by ID. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "404": { - "description": "Country not found" - }, - "503": { - "description": "Error retrieving country" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/countries/byCode/{code}": { - "get": { - "operationId": "setupRetrieveCountryByCode", - "tags": ["setup"], - "parameters": [ - { - "name": "code", - "type": "string", - "description": "Code of country (2 characters)", - "in": "path", - "required": true - }, - { - "name": "lang", - "type": "string", - "description": "Code of the language the name of the country must be translated to", - "in": "query", - "required": false - } - ], - "summary": "Get country by Code. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "404": { - "description": "Country not found" - }, - "503": { - "description": "Error retrieving country" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/countries/byISO/{iso}": { - "get": { - "operationId": "setupRetrieveCountryByISO", - "tags": ["setup"], - "parameters": [ - { - "name": "iso", - "type": "string", - "description": "ISO of country (3 characters)", - "in": "path", - "required": true - }, - { - "name": "lang", - "type": "string", - "description": "Code of the language the name of the country must be translated to", - "in": "query", - "required": false - } - ], - "summary": "Get country by Iso. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "404": { - "description": "Country not found" - }, - "503": { - "description": "Error retrieving country" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/availability": { - "get": { - "operationId": "setupRetrieveAvailability", - "tags": ["setup"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "code", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Number of items per page", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - }, - { - "name": "active", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "maximum": 1, - "description": "Delivery times is active or not", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "SQL criteria to filter with.", - "in": "query", - "required": false - } - ], - "summary": "Get the list of delivery times. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad value for sqlfilters" - }, - "403": { - "description": "Access denied" - }, - "503": { - "description": "Error when retrieving list of availabilities" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/event_types": { - "get": { - "operationId": "setupRetrieveListOfEventTypes", - "tags": ["setup"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "code", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Number of items per page", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number (starting from zero)", - "in": "query", - "required": false - }, - { - "name": "type", - "type": "string", - "description": "To filter on type of event", - "in": "query", - "required": false - }, - { - "name": "module", - "type": "string", - "description": "To filter on module events", - "in": "query", - "required": false - }, - { - "name": "active", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "maximum": 1, - "description": "Event's type is active or not", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", - "in": "query", - "required": false - } - ], - "summary": "Get the list of events types. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad value for sqlfilters" - }, - "503": { - "description": "Error when retrieving list of events types" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/expensereport_types": { - "get": { - "operationId": "setupRetrieveListOfExpenseReportsTypes", - "tags": ["setup"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "code", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Number of items per page", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number (starting from zero)", - "in": "query", - "required": false - }, - { - "name": "module", - "type": "string", - "description": "To filter on module", - "in": "query", - "required": false - }, - { - "name": "active", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "maximum": 1, - "description": "Event's type is active or not", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", - "in": "query", - "required": false - } - ], - "summary": "Get the list of Expense Report types. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad value for sqlfilters" - }, - "503": { - "description": "Error when retrieving list of expense report types" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/contact_types": { - "get": { - "operationId": "setupRetrieveListOfContactTypes", - "tags": ["setup"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "code", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Number of items per page", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number (starting from zero)", - "in": "query", - "required": false - }, - { - "name": "type", - "type": "string", - "description": "To filter on type of contact", - "in": "query", - "required": false - }, - { - "name": "module", - "type": "string", - "description": "To filter on module contacts", - "in": "query", - "required": false - }, - { - "name": "active", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "maximum": 1, - "description": "Contact's type is active or not", - "in": "query", - "required": false - }, - { - "name": "lang", - "type": "string", - "description": "Code of the language the label of the civility must be translated to", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", - "in": "query", - "required": false - } - ], - "summary": "Get the list of contacts types. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad value for sqlfilters" - }, - "503": { - "description": "Error when retrieving list of contacts types" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/civilities": { - "get": { - "operationId": "setupRetrieveListOfCivilities", - "tags": ["setup"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "code", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Number of items per page", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number (starting from zero)", - "in": "query", - "required": false - }, - { - "name": "module", - "type": "string", - "description": "To filter on module events", - "in": "query", - "required": false - }, - { - "name": "active", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "maximum": 1, - "description": "Civility is active or not", - "in": "query", - "required": false - }, - { - "name": "lang", - "type": "string", - "description": "Code of the language the label of the civility must be translated to", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", - "in": "query", - "required": false - } - ], - "summary": "Get the list of civilities. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad value for sqlfilters" - }, - "503": { - "description": "Error when retrieving list of civilities" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/currencies": { - "get": { - "operationId": "setupRetrieveListOfCurrencies", - "tags": ["setup"], - "parameters": [ - { - "name": "multicurrency", - "type": "integer", - "format": "int64", - "maximum": 2, - "description": "Multicurrency rates (0: no multicurrency, 1: last rate, 2: all rates)", - "in": "query", - "required": false - }, - { - "name": "sortfield", - "type": "string", - "defaultValue": "code_iso", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Number of items per page", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number (starting from zero)", - "in": "query", - "required": false - }, - { - "name": "active", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "maximum": 1, - "description": "Payment term is active or not", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", - "in": "query", - "required": false - } - ], - "summary": "Get the list of currencies. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad value for sqlfilters" - }, - "503": { - "description": "Error when retrieving list of currencies" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/extrafields": { - "get": { - "operationId": "setupRetrieveListOfExtrafields", - "tags": ["setup"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "t.pos", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "elementtype", - "type": "string", - "description": "Type of element ('adherent', 'commande', 'thirdparty', 'facture', 'propal', 'product', ...)", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.label:like:'SO-%')\"", - "in": "query", - "required": false - } - ], - "summary": "Get the list of extra fields. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad value for sqlfilters" - }, - "503": { - "description": "Error when retrieving list of extra fields" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/extrafields/{elementtype}/{attrname}": { - "delete": { - "operationId": "setupRemoveExtrafieldsFromNames", - "tags": ["setup"], - "parameters": [ - { - "name": "attrname", - "type": "string", - "description": "extrafield attrname", - "in": "path", - "required": true - }, - { - "name": "elementtype", - "type": "string", - "description": "extrafield elementtype", - "in": "path", - "required": true - } - ], - "summary": "Delete extrafield 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "get": { - "operationId": "setupRetrieveExtrafields", - "tags": ["setup"], - "parameters": [ - { - "name": "attrname", - "type": "string", - "description": "extrafield attrname", - "in": "path", - "required": true - }, - { - "name": "elementtype", - "type": "string", - "description": "extrafield elementtype", - "in": "path", - "required": true - } - ], - "summary": " 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "setupCreateExtrafields", - "tags": ["setup"], - "parameters": [ - { - "name": "attrname", - "type": "string", - "description": "extrafield attrname", - "in": "path", - "required": true - }, - { - "name": "elementtype", - "type": "string", - "description": "extrafield elementtype", - "in": "path", - "required": true - }, - { - "name": "setupCreateExtrafieldsModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/setupCreateExtrafieldsModel" - } - } - ], - "summary": "Create Extrafield object 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "put": { - "operationId": "setupUpdateExtrafields", - "tags": ["setup"], - "parameters": [ - { - "name": "attrname", - "type": "string", - "description": "extrafield attrname", - "in": "path", - "required": true - }, - { - "name": "elementtype", - "type": "string", - "description": "extrafield elementtype", - "in": "path", - "required": true - }, - { - "name": "setupUpdateExtrafieldsModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/setupUpdateExtrafieldsModel" - } - } - ], - "summary": "Update Extrafield object 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/towns": { - "get": { - "operationId": "setupRetrieveListOfTowns", - "tags": ["setup"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "zip,town", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Number of items per page", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number (starting from zero)", - "in": "query", - "required": false - }, - { - "name": "zipcode", - "type": "string", - "description": "To filter on zipcode", - "in": "query", - "required": false - }, - { - "name": "town", - "type": "string", - "description": "To filter on city name", - "in": "query", - "required": false - }, - { - "name": "active", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "maximum": 1, - "description": "Town is active or not", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", - "in": "query", - "required": false - } - ], - "summary": "Get the list of towns. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad value for sqlfilters" - }, - "503": { - "description": "Error when retrieving list of towns" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/payment_terms": { - "get": { - "operationId": "setupRetrievePaymentTerms", - "tags": ["setup"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "sortorder", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Number of items per page", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - }, - { - "name": "active", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "maximum": 1, - "description": "Payment term is active or not", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "SQL criteria to filter. Syntax example \"(t.code:=:'CHQ')\"", - "in": "query", - "required": false - } - ], - "summary": "Get the list of payments terms. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad value for sqlfilters" - }, - "403": { - "description": "Access denied" - }, - "503": { - "description": "Error when retrieving list of payments terms" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/shipping_methods": { - "get": { - "operationId": "setupRetrieveShippingModes", - "tags": ["setup"], - "parameters": [ - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Number of items per page", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - }, - { - "name": "active", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "maximum": 1, - "description": "Shipping methodsm is active or not", - "in": "query", - "required": false - }, - { - "name": "lang", - "type": "string", - "description": "Code of the language the label of the method must be translated to", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "SQL criteria to filter. Syntax example \"(t.code:=:'CHQ')\"", - "in": "query", - "required": false - } - ], - "summary": "Get the list of shipping methods. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad value for sqlfilters" - }, - "503": { - "description": "Error when retrieving list of shipping modes" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/units": { - "get": { - "operationId": "setupRetrieveListOfMeasuringUnits", - "tags": ["setup"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Number of items per page", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number (starting from zero)", - "in": "query", - "required": false - }, - { - "name": "active", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "maximum": 1, - "description": "Measuring unit is active or not", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", - "in": "query", - "required": false - } - ], - "summary": "Get the list of measuring units. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad value for sqlfilters" - }, - "503": { - "description": "Error when retrieving list of measuring units" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/legal_form": { - "get": { - "operationId": "setupRetrieveListOfLegalForm", - "tags": ["setup"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Number of items per page", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number (starting from zero)", - "in": "query", - "required": false - }, - { - "name": "country", - "type": "integer", - "format": "int64", - "description": "To filter on country", - "in": "query", - "required": false - }, - { - "name": "active", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "maximum": 1, - "description": "Lega form is active or not", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", - "in": "query", - "required": false - } - ], - "summary": "Get the list of legal form of business. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad value for sqlfilters" - }, - "503": { - "description": "Error when retrieving list of legal form" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/staff": { - "get": { - "operationId": "setupRetrieveListOfStaff", - "tags": ["setup"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "id", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Number of items per page", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number (starting from zero)", - "in": "query", - "required": false - }, - { - "name": "active", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "maximum": 1, - "description": "Staff is active or not", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", - "in": "query", - "required": false - } - ], - "summary": "Get the list of staff. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad value for sqlfilters" - }, - "503": { - "description": "Error when retrieving list of staff" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/socialnetworks": { - "get": { - "operationId": "setupRetrieveListOfsocialNetworks", - "tags": ["setup"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Number of items per page", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number (starting from zero)", - "in": "query", - "required": false - }, - { - "name": "active", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "maximum": 1, - "description": "Social network is active or not", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", - "in": "query", - "required": false - } - ], - "summary": "Get the list of social networks. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad value for sqlfilters" - }, - "503": { - "description": "Error when retrieving list of social networks" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/ticket_categories": { - "get": { - "operationId": "setupRetrieveTicketsCategories", - "tags": ["setup"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "code", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Number of items per page", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number (starting from zero)", - "in": "query", - "required": false - }, - { - "name": "active", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "maximum": 1, - "description": "Payment term is active or not", - "in": "query", - "required": false - }, - { - "name": "lang", - "type": "string", - "description": "Code of the language the label of the category must be translated to", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", - "in": "query", - "required": false - } - ], - "summary": "Get the list of tickets categories. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad value for sqlfilters" - }, - "503": { - "description": "Error when retrieving list of tickets categories" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/ticket_severities": { - "get": { - "operationId": "setupRetrieveTicketsSeverities", - "tags": ["setup"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "code", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Number of items per page", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number (starting from zero)", - "in": "query", - "required": false - }, - { - "name": "active", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "maximum": 1, - "description": "Payment term is active or not", - "in": "query", - "required": false - }, - { - "name": "lang", - "type": "string", - "description": "Code of the language the label of the severity must be translated to", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", - "in": "query", - "required": false - } - ], - "summary": "Get the list of tickets severity. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad value for sqlfilters" - }, - "503": { - "description": "Error when retrieving list of tickets severities" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/ticket_types": { - "get": { - "operationId": "setupRetrieveTicketsTypes", - "tags": ["setup"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "code", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Number of items per page", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number (starting from zero)", - "in": "query", - "required": false - }, - { - "name": "active", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "maximum": 1, - "description": "Payment term is active or not", - "in": "query", - "required": false - }, - { - "name": "lang", - "type": "string", - "description": "Code of the language the label of the type must be translated to", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", - "in": "query", - "required": false - } - ], - "summary": "Get the list of tickets types. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad value for sqlfilters" - }, - "503": { - "description": "Error when retrieving list of tickets types" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/dictionary/incoterms": { - "get": { - "operationId": "setupRetrieveListOfIncoterms", - "tags": ["setup"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "code", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Number of items per page", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number (starting from zero)", - "in": "query", - "required": false - }, - { - "name": "active", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "maximum": 1, - "description": "Payment term is active or not", - "in": "query", - "required": false - }, - { - "name": "lang", - "type": "string", - "description": "Code of the language the label of the type must be translated to", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.code:like:'A%') and (t.active:>=:0)\"", - "in": "query", - "required": false - } - ], - "summary": "Get the list of incoterms. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "503": { - "description": "Error when retrieving list of incoterms types" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/company": { - "get": { - "operationId": "setupRetrieveCompany", - "tags": ["setup"], - "parameters": [], - "summary": "Get properties of company 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "403": { - "description": "Forbidden" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/establishments": { - "get": { - "operationId": "setupRetrieveEstablishments", - "tags": ["setup"], - "parameters": [], - "summary": "Get the list of establishments. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "503": { - "description": "Error when retrieving list of establishments" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/establishments/{id}": { - "get": { - "operationId": "setupRetrieveEtablishmentByID", - "tags": ["setup"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of establishment", - "in": "path", - "required": true - } - ], - "summary": "Get establishment by ID. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "404": { - "description": "Establishment not found" - }, - "503": { - "description": "Error when retrieving establishment" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/conf/{constantname}": { - "get": { - "operationId": "setupRetrieveConf", - "tags": ["setup"], - "parameters": [ - { - "name": "constantname", - "type": "string", - "description": "Name of conf variable to get", - "in": "path", - "required": true - } - ], - "summary": "Get value of a setup variables 🔐", - "description": "Note that conf variables that stores security key or password hashes can't be loaded with API.", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "400": { - "description": "Error Bad or unknown value for constantname" - }, - "403": { - "description": "Forbidden" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/checkintegrity": { - "get": { - "operationId": "setupRetrieveCheckIntegrity", - "tags": ["setup"], - "parameters": [ - { - "name": "target", - "type": "string", - "description": "Can be 'local' or 'default' or Url of the signatures file to use for the test. Must be reachable by the tested Dolibarr.", - "in": "query", - "required": true - } - ], - "summary": "Do a test of integrity for files and setup. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Signature file not found" - }, - "500": { - "description": "Technical error" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/setup/modules": { - "get": { - "operationId": "setupRetrieveModules", - "tags": ["setup"], - "parameters": [], - "summary": "Get list of enabled modules 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "403": { - "description": "Forbidden" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/status": { - "get": { - "operationId": "listStatus", - "tags": ["status"], - "parameters": [], - "summary": "Get status (Dolibarr version) 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/supplierinvoices/{id}": { - "get": { - "operationId": "retrieveSupplierinvoices", - "tags": ["supplierinvoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of supplier invoice", - "in": "path", - "required": true - } - ], - "summary": "Get properties of a supplier invoice object 🔐", - "description": "Return an array with supplier invoice information", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "500": { - "description": "404" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "put": { - "operationId": "updateSupplierinvoices", - "tags": ["supplierinvoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of supplier invoice to update", - "in": "path", - "required": true - }, - { - "name": "updateSupplierinvoicesModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/updateSupplierinvoicesModel" - } - } - ], - "summary": "Update supplier invoice 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "removeSupplierinvoices", - "tags": ["supplierinvoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Supplier invoice ID", - "in": "path", - "required": true - } - ], - "summary": "Delete supplier invoice 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - }, - "500": { - "description": "System error" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/supplierinvoices": { - "get": { - "operationId": "listSupplierinvoices", - "tags": ["supplierinvoices"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "t.rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - }, - { - "name": "thirdparty_ids", - "type": "string", - "description": "Thirdparty ids to filter invoices of (example '1' or '1,2,3')", - "in": "query", - "required": false - }, - { - "name": "status", - "type": "string", - "description": "Filter by invoice status : draft | unpaid | paid | cancelled", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.datec:<:'20160101')\"", - "in": "query", - "required": false - }, - { - "name": "properties", - "type": "string", - "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", - "in": "query", - "required": false - } - ], - "summary": "List invoices 🔐", - "description": "Get a list of supplier invoices", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "createSupplierinvoices", - "tags": ["supplierinvoices"], - "parameters": [ - { - "name": "createSupplierinvoicesModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/createSupplierinvoicesModel" - } - } - ], - "summary": "Create supplier invoice object 🔐", - "description": "Note: soc_id = dolibarr_order_id Example: {'ref': 'auto', 'ref_supplier': '7985630', 'socid': 1, 'note': 'Inserted with Python', 'order_supplier': 1, 'date': '2021-07-28'}", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - }, - "403": { - "description": "Forbidden" - }, - "500": { - "description": "System error" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/supplierinvoices/{id}/validate": { - "post": { - "operationId": "supplierinvoicesValidate", - "tags": ["supplierinvoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Invoice ID", - "in": "path", - "required": true - }, - { - "name": "supplierinvoicesValidateModel", - "description": "idwarehouse \nnotrigger \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/supplierinvoicesValidateModel" - } - } - ], - "summary": "Validate an invoice 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "304": { - "description": "Not Modified" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "500": { - "description": "System error" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/supplierinvoices/{id}/payments": { - "get": { - "operationId": "supplierinvoicesRetrievePayments", - "tags": ["supplierinvoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of SupplierInvoice", - "in": "path", - "required": true - } - ], - "summary": "Get list of payments of a given supplier invoice 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad Request" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "supplierinvoicesAddPayment", - "tags": ["supplierinvoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of invoice", - "in": "path", - "required": true - }, - { - "name": "supplierinvoicesAddPaymentModel", - "description": "**datepaye** (required) \n**payment_mode_id** (required) \n**closepaidinvoices** (required) \n**accountid** (required) \nnum_payment \ncomment \nchqemetteur \nchqbank \namount \n", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/supplierinvoicesAddPaymentModel" - } - } - ], - "summary": "Add payment line to a specific supplier invoice with the remain to pay as amount. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - }, - "400": { - "description": "Bad Request" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/supplierinvoices/{id}/lines": { - "get": { - "operationId": "supplierinvoicesRetrieveLines", - "tags": ["supplierinvoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of supplier invoice", - "in": "path", - "required": true - } - ], - "summary": "Get lines of a supplier invoice 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "supplierinvoicesCreateLine", - "tags": ["supplierinvoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of supplier invoice to update", - "in": "path", - "required": true - }, - { - "name": "supplierinvoicesCreateLineModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/supplierinvoicesCreateLineModel" - } - } - ], - "summary": "Add a line to given supplier invoice 🔐", - "description": "Note: socid = dolibarr_order_id, pu_ht = net price, remise = discount Example: {'socid': 1, 'qty': 1, 'pu_ht': 21.0, 'tva_tx': 25.0, 'fk_product': '1189', 'product_type': 0, 'remise_percent': 1.0, 'vat_src_code': None}", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/supplierinvoices/{id}/lines/{lineid}": { - "put": { - "operationId": "supplierinvoicesUpdateLine", - "tags": ["supplierinvoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of supplier invoice to update", - "in": "path", - "required": true - }, - { - "name": "lineid", - "type": "integer", - "format": "int64", - "description": "Id of line to update", - "in": "path", - "required": true - }, - { - "name": "supplierinvoicesUpdateLineModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/supplierinvoicesUpdateLineModel" - } - } - ], - "summary": "Update a line to a given supplier invoice 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "403": { - "description": "Not allowed" - }, - "404": { - "description": "Not found" - }, - "304": { - "description": "Error" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "supplierinvoicesRemoveLine", - "tags": ["supplierinvoices"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of supplier invoice", - "in": "path", - "required": true - }, - { - "name": "lineid", - "type": "integer", - "format": "int64", - "description": "Id of the line to delete", - "in": "path", - "required": true - } - ], - "summary": "Deletes a line of a given supplier invoice 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad parameters" - }, - "403": { - "description": "Not allowed" - }, - "404": { - "description": "Not found" - }, - "405": { - "description": "Error" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/supplierorders/{id}": { - "get": { - "operationId": "retrieveSupplierorders", - "tags": ["supplierorders"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of supplier order", - "in": "path", - "required": true - } - ], - "summary": "Get properties of a supplier order object 🔐", - "description": "Return an array with supplier order information", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "put": { - "operationId": "updateSupplierorders", - "tags": ["supplierorders"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of supplier order to update", - "in": "path", - "required": true - }, - { - "name": "updateSupplierordersModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/updateSupplierordersModel" - } - } - ], - "summary": "Update supplier order 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "removeSupplierorders", - "tags": ["supplierorders"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Supplier order ID", - "in": "path", - "required": true - } - ], - "summary": "Delete supplier order 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/supplierorders": { - "get": { - "operationId": "listSupplierorders", - "tags": ["supplierorders"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "t.rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - }, - { - "name": "thirdparty_ids", - "type": "string", - "description": "Thirdparty ids to filter orders of (example '1' or '1,2,3')", - "in": "query", - "required": false - }, - { - "name": "product_ids", - "type": "string", - "description": "Product ids to filter orders of (example '1' or '1,2,3')", - "in": "query", - "required": false - }, - { - "name": "status", - "type": "string", - "description": "Filter by order status : draft | validated | approved | running | received_start | received_end | cancelled | refused", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.datec:<:'20160101')\"", - "in": "query", - "required": false - }, - { - "name": "sqlfilterlines", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(tl.fk_product:=:'17') and (tl.price:<:'250')\"", - "in": "query", - "required": false - }, - { - "name": "properties", - "type": "string", - "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", - "in": "query", - "required": false - } - ], - "summary": "List orders 🔐", - "description": "Get a list of supplier orders", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "createSupplierorders", - "tags": ["supplierorders"], - "parameters": [ - { - "name": "createSupplierordersModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/createSupplierordersModel" - } - } - ], - "summary": "Create supplier order object 🔐", - "description": "Example: {\"ref\": \"auto\", \"ref_supplier\": \"1234\", \"socid\": \"1\", \"multicurrency_code\": \"SEK\", \"multicurrency_tx\": 1, \"tva_tx\": 25, \"note\": \"Imported via the REST API\"}", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/supplierorders/{id}/contacts": { - "get": { - "operationId": "supplierordersRetrieveContacts", - "tags": ["supplierorders"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of supplier order", - "in": "path", - "required": true - }, - { - "name": "source", - "type": "string", - "description": "Source of the contact (internal, external, all).", - "in": "query", - "required": true - }, - { - "name": "type", - "type": "string", - "description": "Type of the contact (BILLING, SHIPPING, CUSTOMER, SALESREPFOLL, ...)", - "in": "query", - "required": false - } - ], - "summary": "Get contacts of given supplier order 🔐", - "description": "Return an array with contact information", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/supplierorders/{id}/contact/{contactid}/{type}/{source}": { - "post": { - "operationId": "supplierordersCreateContact", - "tags": ["supplierorders"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of supplier order to update", - "in": "path", - "required": true - }, - { - "name": "contactid", - "type": "integer", - "format": "int64", - "description": "Id of contact/user to add", - "in": "path", - "required": true - }, - { - "name": "type", - "type": "string", - "description": "Type of the contact (BILLING, SHIPPING, CUSTOMER, SALESREPFOLL, ...)", - "in": "path", - "required": true - }, - { - "name": "source", - "type": "string", - "description": "Source of the contact (external, internal)", - "in": "path", - "required": true - } - ], - "summary": "Add a contact type of given supplier order 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "supplierordersRemoveContact", - "tags": ["supplierorders"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of supplier order to update", - "in": "path", - "required": true - }, - { - "name": "contactid", - "type": "integer", - "format": "int64", - "description": "Id of contact/user to add", - "in": "path", - "required": true - }, - { - "name": "type", - "type": "string", - "description": "Type of the contact (BILLING, SHIPPING, CUSTOMER, SALESREPFOLL, ...).", - "in": "path", - "required": true - }, - { - "name": "source", - "type": "string", - "description": "Source of the contact (internal, external).", - "in": "path", - "required": true - } - ], - "summary": "Unlink a contact type of given supplier order 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "500": { - "description": "System error" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/supplierorders/{id}/validate": { - "post": { - "operationId": "supplierordersValidate", - "tags": ["supplierorders"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Order ID", - "in": "path", - "required": true - }, - { - "name": "supplierordersValidateModel", - "description": "idwarehouse \nnotrigger \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/supplierordersValidateModel" - } - } - ], - "summary": "Validate an order 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/supplierorders/{id}/approve": { - "post": { - "operationId": "supplierordersApprove", - "tags": ["supplierorders"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Order ID", - "in": "path", - "required": true - }, - { - "name": "supplierordersApproveModel", - "description": "idwarehouse \nsecondlevel \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/supplierordersApproveModel" - } - } - ], - "summary": "Approve an order 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/supplierorders/{id}/makeorder": { - "post": { - "operationId": "supplierordersMakeOrder", - "tags": ["supplierorders"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Order ID", - "in": "path", - "required": true - }, - { - "name": "supplierordersMakeOrderModel", - "description": "**date** (required) \n**method** (required) \ncomment \n", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/supplierordersMakeOrderModel" - } - } - ], - "summary": "Sends an order to the vendor 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/supplierorders/{id}/receive": { - "post": { - "operationId": "supplierordersReceiveOrder", - "tags": ["supplierorders"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Order ID", - "in": "path", - "required": true - }, - { - "name": "supplierordersReceiveOrderModel", - "description": "**closeopenorder** (required) \n**comment** (required) \n**lines** (required) \n", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/supplierordersReceiveOrderModel" - } - } - ], - "summary": "Receives the order, dispatches products. 🔐", - "description": " Example: { \"closeopenorder\": 1, \"comment\": \"\", \"lines\": [{ \"id\": 14, \"fk_product\": 112, \"qty\": 18, \"warehouse\": 1, \"price\": 114, \"comment\": \"\", \"eatby\": 0, \"sellby\": 0, \"batch\": 0, \"notrigger\": 0 }] }", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/tasks/{id}": { - "get": { - "operationId": "retrieveTasks", - "tags": ["tasks"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of task", - "in": "path", - "required": true - }, - { - "name": "includetimespent", - "type": "integer", - "format": "int64", - "description": "0=Return only task. 1=Include a summary of time spent, 2=Include details of time spent lines", - "in": "query", - "required": false - } - ], - "summary": "Get properties of a task object 🔐", - "description": "Return an array with task information", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "put": { - "operationId": "updateTasks", - "tags": ["tasks"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of task to update", - "in": "path", - "required": true - }, - { - "name": "updateTasksModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/updateTasksModel" - } - } - ], - "summary": "Update task general fields (won't touch time spent of task) 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "removeTasks", - "tags": ["tasks"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Task ID", - "in": "path", - "required": true - } - ], - "summary": "Delete task 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/tasks": { - "get": { - "operationId": "listTasks", - "tags": ["tasks"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "t.rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')\"", - "in": "query", - "required": false - }, - { - "name": "properties", - "type": "string", - "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", - "in": "query", - "required": false - } - ], - "summary": "List tasks 🔐", - "description": "Get a list of tasks", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "createTasks", - "tags": ["tasks"], - "parameters": [ - { - "name": "createTasksModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/createTasksModel" - } - } - ], - "summary": "Create task object 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/tasks/{id}/roles": { - "get": { - "operationId": "tasksRetrieveRoles", - "tags": ["tasks"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of task", - "in": "path", - "required": true - }, - { - "name": "userid", - "type": "integer", - "format": "int64", - "description": "Id of user (0 = connected user)", - "in": "query", - "required": false - } - ], - "summary": "Get roles a user is assigned to a task with 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/tasks/{id}/addtimespent": { - "post": { - "operationId": "tasksAddTimeSpent", - "tags": ["tasks"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Task ID", - "in": "path", - "required": true - }, - { - "name": "tasksAddTimeSpentModel", - "description": "**date** (required) \n**duration** (required) \nuser_id \nnote \n", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/tasksAddTimeSpentModel" - } - } - ], - "summary": "Add time spent to a task of a project. 🔐", - "description": "You can test this API with the following input message { \"date\": \"2016-12-31 23:15:00\", \"duration\": 1800, \"user_id\": 1, \"note\": \"My time test\" }", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/tasks/{id}/timespent/{timespent_id}": { - "put": { - "operationId": "tasksUpdateTimeSpent", - "tags": ["tasks"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Task ID", - "in": "path", - "required": true - }, - { - "name": "timespent_id", - "type": "integer", - "format": "int64", - "description": "Time spent ID (llx_element_time.rowid)", - "in": "path", - "required": true - }, - { - "name": "tasksUpdateTimeSpentModel", - "description": "**date** (required) \n**duration** (required) \nuser_id \nnote \n", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/tasksUpdateTimeSpentModel" - } - } - ], - "summary": "Update time spent for a task of a project. 🔐", - "description": "You can test this API with the following input message { \"date\": \"2016-12-31 23:15:00\", \"duration\": 1800, \"user_id\": 1, \"note\": \"My time test\" }", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "tasksRemoveTimeSpent", - "tags": ["tasks"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Task ID", - "in": "path", - "required": true - }, - { - "name": "timespent_id", - "type": "integer", - "format": "int64", - "description": "Time spent ID (llx_element_time.rowid)", - "in": "path", - "required": true - } - ], - "summary": "Delete time spent for a task of a project. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/tasks/timespentrecordchecks/{id}": { - "get": { - "operationId": "tasksTimespentRecordChecks", - "tags": ["tasks"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Task ID", - "in": "path", - "required": true - }, - { - "name": "timespent_id", - "type": "integer", - "format": "int64", - "description": "Time spent ID (llx_element_time.rowid)", - "in": "query", - "required": true - } - ], - "summary": "Validate task & timespent IDs for timespent API methods. 🔐", - "description": "Loads the selected task & timespent records.", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/thirdparties/{id}": { - "get": { - "operationId": "retrieveThirdparties", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of third party to load", - "in": "path", - "required": true - } - ], - "summary": "Get properties of a thirdparty object 🔐", - "description": "Return an array with thirdparty information", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "put": { - "operationId": "updateThirdparties", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of thirdparty to update", - "in": "path", - "required": true - }, - { - "name": "updateThirdpartiesModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/updateThirdpartiesModel" - } - } - ], - "summary": "Update thirdparty 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "500": { - "description": "Internal Server Error" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "removeThirdparties", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Thirdparty ID", - "in": "path", - "required": true - } - ], - "summary": "Delete thirdparty 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/thirdparties/email/{email}": { - "get": { - "operationId": "thirdpartiesRetrieveByEmail", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "email", - "type": "string", - "description": "Email of third party to load", - "in": "path", - "required": true - } - ], - "summary": "Get properties of a thirdparty object by email. 🔐", - "description": " Return an array with thirdparty information", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/thirdparties/barcode/{barcode}": { - "get": { - "operationId": "thirdpartiesRetrieveByBarcode", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "barcode", - "type": "string", - "description": "Barcode of third party to load", - "in": "path", - "required": true - } - ], - "summary": "Get properties of a thirdparty object by barcode. 🔐", - "description": " Return an array with thirdparty information", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "500": { - "description": "RestException" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/thirdparties": { - "get": { - "operationId": "listThirdparties", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "t.rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - }, - { - "name": "mode", - "type": "integer", - "format": "int64", - "description": "Set to 1 to show only customers Set to 2 to show only prospects Set to 3 to show only those are not customer neither prospect Set to 4 to show only suppliers", - "in": "query", - "required": false - }, - { - "name": "category", - "type": "integer", - "format": "int64", - "description": "Use this param to filter list by category", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"((t.nom:like:'TheCompany%') or (t.name_alias:like:'TheCompany%')) and (t.datec:<:'20160101')\"", - "in": "query", - "required": false - }, - { - "name": "properties", - "type": "string", - "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", - "in": "query", - "required": false - } - ], - "summary": "List thirdparties 🔐", - "description": "Get a list of thirdparties", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "createThirdparties", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "createThirdpartiesModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/createThirdpartiesModel" - } - } - ], - "summary": "Create thirdparty object 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/thirdparties/{id}/merge/{idtodelete}": { - "put": { - "operationId": "thirdpartiesMerge", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of thirdparty to keep (the target third party)", - "in": "path", - "required": true - }, - { - "name": "idtodelete", - "type": "integer", - "format": "int64", - "description": "ID of thirdparty to remove (the thirdparty to delete), once data has been merged into the target third party.", - "in": "path", - "required": true - } - ], - "summary": "Merge a third party into another one. 🔐", - "description": " Merge content (properties, notes) and objects (like invoices, events, orders, proposals, ...) of a thirdparty into a target third party, then delete the merged third party. If a property has a defined value both in third party to delete and third party to keep, the value into the third party to delete will be ignored, the value of target thirdparty will remain, except for notes (content is concatenated).", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/thirdparties/{id}/setpricelevel/{priceLevel}": { - "put": { - "operationId": "thirdpartiesSetThirdpartyPriceLevel", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of thirdparty", - "in": "path", - "required": true - }, - { - "name": "priceLevel", - "type": "integer", - "format": "int64", - "description": "Price level to apply to thirdparty", - "in": "path", - "required": true - } - ], - "summary": "Set new price level for the given thirdparty 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "400": { - "description": "Price level out of bounds" - }, - "401": { - "description": "Access not allowed for your login" - }, - "404": { - "description": "Thirdparty not found" - }, - "500": { - "description": "Error fetching/setting price level" - }, - "501": { - "description": "Request needs modules \"Thirdparties\" and \"Products\" and setting Multiprices activated" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/thirdparties/{id}/representative/{representative_id}": { - "post": { - "operationId": "thirdpartiesAddRepresentative", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of thirdparty", - "in": "path", - "required": true - }, - { - "name": "representative_id", - "type": "integer", - "format": "int64", - "description": "Id of representative", - "in": "path", - "required": true - } - ], - "summary": "Add a customer representative to a thirdparty 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - }, - "401": { - "description": "Access not allowed for your login" - }, - "404": { - "description": "User or Thirdparty not found" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "thirdpartiesRemoveRepresentative", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of thirdparty", - "in": "path", - "required": true - }, - { - "name": "representative_id", - "type": "integer", - "format": "int64", - "description": "Id of representative", - "in": "path", - "required": true - } - ], - "summary": "Delete a customer representative to a thirdparty 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - }, - "401": { - "description": "Access not allowed for your login" - }, - "404": { - "description": "User or Thirdparty not found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/thirdparties/{id}/categories": { - "get": { - "operationId": "thirdpartiesRetrieveCategories", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of thirdparty", - "in": "path", - "required": true - }, - { - "name": "sortfield", - "type": "string", - "defaultValue": "s.rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - } - ], - "summary": "Get customer categories for a thirdparty 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/thirdparties/{id}/categories/{category_id}": { - "put": { - "operationId": "thirdpartiesAddCategory", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of thirdparty", - "in": "path", - "required": true - }, - { - "name": "category_id", - "type": "integer", - "format": "int64", - "description": "Id of category", - "in": "path", - "required": true - } - ], - "summary": "Add a customer category to a thirdparty 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "thirdpartiesRemoveCategory", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of thirdparty", - "in": "path", - "required": true - }, - { - "name": "category_id", - "type": "integer", - "format": "int64", - "description": "Id of category", - "in": "path", - "required": true - } - ], - "summary": "Remove the link between a customer category and the thirdparty 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/thirdparties/{id}/supplier_categories": { - "get": { - "operationId": "thirdpartiesRetrieveSupplierCategories", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of thirdparty", - "in": "path", - "required": true - }, - { - "name": "sortfield", - "type": "string", - "defaultValue": "s.rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - } - ], - "summary": "Get supplier categories for a thirdparty 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/thirdparties/{id}/supplier_categories/{category_id}": { - "put": { - "operationId": "thirdpartiesAddSupplierCategory", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of thirdparty", - "in": "path", - "required": true - }, - { - "name": "category_id", - "type": "integer", - "format": "int64", - "description": "Id of category", - "in": "path", - "required": true - } - ], - "summary": "Add a supplier category to a thirdparty 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "thirdpartiesRemoveSupplierCategory", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of thirdparty", - "in": "path", - "required": true - }, - { - "name": "category_id", - "type": "integer", - "format": "int64", - "description": "Id of category", - "in": "path", - "required": true - } - ], - "summary": "Remove the link between a category and the thirdparty 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/thirdparties/{id}/outstandingproposals": { - "get": { - "operationId": "thirdpartiesRetrieveOutStandingProposals", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of the thirdparty", - "in": "path", - "required": true - }, - { - "name": "mode", - "type": "string", - "defaultValue": "customer", - "description": "'customer' or 'supplier'", - "in": "query", - "required": false - } - ], - "summary": "Get outstanding proposals of thirdparty 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/thirdparties/{id}/outstandingorders": { - "get": { - "operationId": "thirdpartiesRetrieveOutStandingOrder", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of the thirdparty", - "in": "path", - "required": true - }, - { - "name": "mode", - "type": "string", - "defaultValue": "customer", - "description": "'customer' or 'supplier'", - "in": "query", - "required": false - } - ], - "summary": "Get outstanding orders of thirdparty 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/thirdparties/{id}/outstandinginvoices": { - "get": { - "operationId": "thirdpartiesRetrieveOutStandingInvoices", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of the thirdparty", - "in": "path", - "required": true - }, - { - "name": "mode", - "type": "string", - "defaultValue": "customer", - "description": "'customer' or 'supplier'", - "in": "query", - "required": false - } - ], - "summary": "Get outstanding invoices of thirdparty 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/thirdparties/{id}/representatives": { - "get": { - "operationId": "thirdpartiesRetrieveSalesRepresentatives", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of the thirdparty", - "in": "path", - "required": true - }, - { - "name": "mode", - "type": "integer", - "format": "int64", - "description": "0=Array with properties, 1=Array of id.", - "in": "query", - "required": false - } - ], - "summary": "Get representatives of thirdparty 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/thirdparties/{id}/fixedamountdiscounts": { - "get": { - "operationId": "thirdpartiesRetrieveFixedAmountDiscounts", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of the thirdparty", - "in": "path", - "required": true - }, - { - "name": "filter", - "type": "string", - "defaultValue": "none", - "enum": ["none", "available", "used"], - "description": "Filter exceptional discount. \"none\" will return every discount, \"available\" returns unapplied discounts, \"used\" returns applied discounts", - "in": "query", - "required": false - }, - { - "name": "sortfield", - "type": "string", - "defaultValue": "f.type", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - } - ], - "summary": "Get fixed amount discount of a thirdparty (all sources: deposit, credit note, commercial offers...) 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "503": { - "description": "Service Unavailable" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/thirdparties/{id}/getinvoicesqualifiedforreplacement": { - "get": { - "operationId": "thirdpartiesRetrieveInvoicesQualifiedForReplacement", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of thirdparty", - "in": "path", - "required": true - } - ], - "summary": "Return list of invoices qualified to be replaced by another invoice. 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/thirdparties/{id}/getinvoicesqualifiedforcreditnote": { - "get": { - "operationId": "thirdpartiesRetrieveInvoicesQualifiedForCreditNote", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of thirdparty", - "in": "path", - "required": true - } - ], - "summary": "Return list of invoices qualified to be corrected by a credit note. 🔐", - "description": "Invoices matching the following rules are returned (validated + payment on process) or classified (paid completely or paid partially) + not already replaced + not already a credit note", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/thirdparties/{id}/notifications": { - "get": { - "operationId": "thirdpartiesRetrieveCompanyNotification", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of thirdparty", - "in": "path", - "required": true - } - ], - "summary": "Get CompanyNotification objects for thirdparty 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "thirdpartiesCreateCompanyNotification", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of thirdparty", - "in": "path", - "required": true - }, - { - "name": "thirdpartiesCreateCompanyNotificationModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/thirdpartiesCreateCompanyNotificationModel" - } - } - ], - "summary": "Create CompanyNotification object for thirdparty 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/thirdparties/{id}/notifications/{notification_id}": { - "delete": { - "operationId": "thirdpartiesRemoveCompanyNotification", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of thirdparty", - "in": "path", - "required": true - }, - { - "name": "notification_id", - "type": "integer", - "format": "int64", - "description": "ID of CompanyNotification", - "in": "path", - "required": true - } - ], - "summary": "Delete a CompanyNotification attached to a thirdparty 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "put": { - "operationId": "thirdpartiesUpdateCompanyNotification", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of thirdparty", - "in": "path", - "required": true - }, - { - "name": "notification_id", - "type": "integer", - "format": "int64", - "description": "ID of CompanyNotification", - "in": "path", - "required": true - }, - { - "name": "thirdpartiesUpdateCompanyNotificationModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/thirdpartiesUpdateCompanyNotificationModel" - } - } - ], - "summary": "Update CompanyNotification object for thirdparty 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/thirdparties/{id}/bankaccounts": { - "get": { - "operationId": "thirdpartiesRetrieveCompanyBankAccount", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of thirdparty", - "in": "path", - "required": true - } - ], - "summary": "Get CompanyBankAccount objects for thirdparty 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "thirdpartiesCreateCompanyBankAccount", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of thirdparty", - "in": "path", - "required": true - }, - { - "name": "thirdpartiesCreateCompanyBankAccountModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/thirdpartiesCreateCompanyBankAccountModel" - } - } - ], - "summary": "Create CompanyBankAccount object for thirdparty 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/thirdparties/{id}/bankaccounts/{bankaccount_id}": { - "put": { - "operationId": "thirdpartiesUpdateCompanyBankAccount", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of thirdparty", - "in": "path", - "required": true - }, - { - "name": "bankaccount_id", - "type": "integer", - "format": "int64", - "description": "ID of CompanyBankAccount", - "in": "path", - "required": true - }, - { - "name": "thirdpartiesUpdateCompanyBankAccountModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/thirdpartiesUpdateCompanyBankAccountModel" - } - } - ], - "summary": "Update CompanyBankAccount object for thirdparty 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "thirdpartiesRemoveCompanyBankAccount", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of thirdparty", - "in": "path", - "required": true - }, - { - "name": "bankaccount_id", - "type": "integer", - "format": "int64", - "description": "ID of CompanyBankAccount", - "in": "path", - "required": true - } - ], - "summary": "Delete a bank account attached to a thirdparty 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/thirdparties/{id}/generateBankAccountDocument/{companybankid}/{model}": { - "get": { - "operationId": "thirdpartiesGenerateBankAccountDocument", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Thirdparty id", - "in": "path", - "required": true - }, - { - "name": "companybankid", - "type": "integer", - "format": "int64", - "description": "Companybank id", - "in": "path", - "required": false - }, - { - "name": "model", - "type": "string", - "defaultValue": "sepamandate", - "description": "Model of document to generate", - "in": "path", - "required": false - } - ], - "summary": "Generate a Document from a bank account record (like SEPA mandate) 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/thirdparties/{id}/accounts": { - "get": { - "operationId": "thirdpartiesRetrieveSocieteAccounts", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of thirdparty", - "in": "path", - "required": true - }, - { - "name": "site", - "type": "string", - "description": "Site key", - "in": "query", - "required": false - } - ], - "summary": "Get a specific account attached to a thirdparty (by specifying the site key) 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized: User does not have permission to read thirdparties" - }, - "404": { - "description": "Not Found: Specified thirdparty ID does not belongs to an existing thirdparty" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "thirdpartiesCreateSocieteAccount", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of thirdparty", - "in": "path", - "required": true - }, - { - "name": "thirdpartiesCreateSocieteAccountModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/thirdpartiesCreateSocieteAccountModel" - } - } - ], - "summary": "Create and attach a new account to an existing thirdparty 🔐", - "description": "Possible fields for request_data (request body) are specified in llx_societe_account table.
See Table llx_societe_account wiki page for more information

Example body payload :
{\"key_account\": \"cus_DAVkLSs1LYyYI\", \"site\": \"stripe\"}
", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized: User does not have permission to read thirdparties" - }, - "409": { - "description": "Conflict: An Account already exists for this company and site." - }, - "500": { - "description": "Internal Server Error: Error creating SocieteAccount account" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "thirdpartiesRemoveSocieteAccounts", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of thirdparty", - "in": "path", - "required": true - } - ], - "summary": "Delete all accounts attached to a thirdparty 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized: User does not have permission to delete thirdparties accounts" - }, - "404": { - "description": "Not Found: Specified thirdparty ID does not belongs to an existing thirdparty" - }, - "500": { - "description": "Internal Server Error: Error deleting SocieteAccount entity" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/thirdparties/{id}/accounts/{site}": { - "put": { - "operationId": "thirdpartiesUpdateSocieteAccount", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of thirdparty", - "in": "path", - "required": true - }, - { - "name": "site", - "type": "string", - "description": "Site key", - "in": "path", - "required": true - }, - { - "name": "thirdpartiesUpdateSocieteAccountModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/thirdpartiesUpdateSocieteAccountModel" - } - } - ], - "summary": "Create and attach a new (or replace an existing) specific site account to a thirdparty 🔐", - "description": "You MUST pass all values to keep (otherwise, they will be deleted) !
If you just need to update specific fields prefer PATCH /thirdparties/{id}/accounts/{site} endpoint.

When a SocieteAccount entity does not exist for the id and site supplied, a new one will be created. In that case fk_soc and site members form request body payload will be ignored and id and site query strings parameters will be used instead.", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized: User does not have permission to read thirdparties" - }, - "500": { - "description": "Internal Server Error: Error updating SocieteAccount entity" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "patch": { - "operationId": "thirdpartiesModifySocieteAccount", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of thirdparty", - "in": "path", - "required": true - }, - { - "name": "site", - "type": "string", - "description": "Site key", - "in": "path", - "required": true - }, - { - "name": "thirdpartiesModifySocieteAccountModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/thirdpartiesModifySocieteAccountModel" - } - } - ], - "summary": "Update specified values of a specific account attached to a thirdparty 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized: User does not have permission to read thirdparties" - }, - "404": { - "description": "Not Found: Specified thirdparty ID does not belongs to an existing thirdparty" - }, - "409": { - "description": "Conflict: Another SocieteAccount entity already exists for this thirdparty with this site key." - }, - "500": { - "description": "Internal Server Error: Error updating SocieteAccount entity" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "thirdpartiesRemoveSocieteAccount", - "tags": ["thirdparties"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of thirdparty", - "in": "path", - "required": true - }, - { - "name": "site", - "type": "integer", - "format": "int64", - "description": "Site key", - "in": "path", - "required": true - } - ], - "summary": "Delete a specific site account attached to a thirdparty (by account id) 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized: User does not have permission to delete thirdparties accounts" - }, - "404": { - "description": "Not Found: Specified thirdparty ID does not belongs to an existing thirdparty" - }, - "500": { - "description": "Internal Server Error: Error deleting SocieteAccount entity" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/users": { - "get": { - "operationId": "listUsers", - "tags": ["users"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "t.rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - }, - { - "name": "user_ids", - "type": "string", - "description": "User ids filter field. Example: '1' or '1,2,3'", - "in": "query", - "required": false - }, - { - "name": "category", - "type": "integer", - "format": "int64", - "description": "Use this param to filter list by category", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')\"", - "in": "query", - "required": false - }, - { - "name": "properties", - "type": "string", - "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", - "in": "query", - "required": false - } - ], - "summary": "List Users 🔐", - "description": "Get a list of Users", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "post": { - "operationId": "createUsers", - "tags": ["users"], - "parameters": [ - { - "name": "createUsersModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/createUsersModel" - } - } - ], - "summary": "Create user account 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - }, - "401": { - "description": "Not allowed" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/users/{id}": { - "get": { - "operationId": "retrieveUsers", - "tags": ["users"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "ID of user", - "in": "path", - "required": true - }, - { - "name": "includepermissions", - "type": "integer", - "format": "int64", - "description": "Set this to 1 to have the array of permissions loaded (not done by default for performance purpose)", - "in": "query", - "required": false - } - ], - "summary": "Get properties of an user object 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Insufficient rights" - }, - "404": { - "description": "User or group not found" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "put": { - "operationId": "updateUsers", - "tags": ["users"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of account to update", - "in": "path", - "required": true - }, - { - "name": "updateUsersModel", - "description": "request_data \n", - "in": "body", - "required": false, - "schema": { - "$ref": "#/definitions/updateUsersModel" - } - } - ], - "summary": "Update user account 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Obj" - } - }, - "403": { - "description": "Not allowed" - }, - "404": { - "description": "Not found" - }, - "500": { - "description": "System error" - } - }, - "security": [ - { - "api_key": [] - } - ] - }, - "delete": { - "operationId": "removeUsers", - "tags": ["users"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Account ID", - "in": "path", - "required": true - } - ], - "summary": "Delete account/user 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "403": { - "description": "Not allowed" - }, - "404": { - "description": "User not found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/users/login/{login}": { - "get": { - "operationId": "usersRetrieveByLogin", - "tags": ["users"], - "parameters": [ - { - "name": "login", - "type": "string", - "description": "Login of user", - "in": "path", - "required": true - }, - { - "name": "includepermissions", - "type": "integer", - "format": "int64", - "description": "Set this to 1 to have the array of permissions loaded (not done by default for performance purpose)", - "in": "query", - "required": false - } - ], - "summary": "Get properties of an user object by login 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "400": { - "description": "Bad request" - }, - "401": { - "description": "Insufficient rights" - }, - "404": { - "description": "User or group not found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/users/email/{email}": { - "get": { - "operationId": "usersRetrieveByEmail", - "tags": ["users"], - "parameters": [ - { - "name": "email", - "type": "string", - "description": "Email of user", - "in": "path", - "required": true - }, - { - "name": "includepermissions", - "type": "integer", - "format": "int64", - "description": "Set this to 1 to have the array of permissions loaded (not done by default for performance purpose)", - "in": "query", - "required": false - } - ], - "summary": "Get properties of an user object by Email 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "400": { - "description": "Bad request" - }, - "401": { - "description": "Insufficient rights" - }, - "404": { - "description": "User or group not found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/users/info": { - "get": { - "operationId": "usersRetrieveInfo", - "tags": ["users"], - "parameters": [ - { - "name": "includepermissions", - "type": "integer", - "format": "int64", - "description": "Set this to 1 to have the array of permissions loaded (not done by default for performance purpose)", - "in": "query", - "required": false - } - ], - "summary": "Get more properties of a user 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Insufficient rights" - }, - "404": { - "description": "User or group not found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/users/{id}/groups": { - "get": { - "operationId": "usersRetrieveGroups", - "tags": ["users"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "Id of user", - "in": "path", - "required": true - } - ], - "summary": "List the groups of a user 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "403": { - "description": "Not allowed" - }, - "404": { - "description": "Not found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/users/{id}/setGroup/{group}": { - "get": { - "operationId": "usersSetGroup", - "tags": ["users"], - "parameters": [ - { - "name": "id", - "type": "integer", - "format": "int64", - "description": "User ID", - "in": "path", - "required": true - }, - { - "name": "group", - "type": "integer", - "format": "int64", - "description": "Group ID", - "in": "path", - "required": true - }, - { - "name": "entity", - "type": "integer", - "format": "int64", - "defaultValue": 1, - "description": "Entity ID (valid only for superadmin in multicompany transverse mode)", - "in": "query", - "required": false - } - ], - "summary": "Add a user into a group 🔐", - "description": "", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "integer", - "format": "int64" - } - }, - "403": { - "description": "Not allowed" - }, - "404": { - "description": "User not found" - }, - "500": { - "description": "System error" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/users/groups": { - "get": { - "operationId": "usersListGroups", - "tags": ["users"], - "parameters": [ - { - "name": "sortfield", - "type": "string", - "defaultValue": "t.rowid", - "description": "Sort field", - "in": "query", - "required": false - }, - { - "name": "sortorder", - "type": "string", - "defaultValue": "ASC", - "description": "Sort order", - "in": "query", - "required": false - }, - { - "name": "limit", - "type": "integer", - "format": "int64", - "defaultValue": 100, - "description": "Limit for list", - "in": "query", - "required": false - }, - { - "name": "page", - "type": "integer", - "format": "int64", - "description": "Page number", - "in": "query", - "required": false - }, - { - "name": "group_ids", - "type": "string", - "description": "Groups ids filter field. Example: '1' or '1,2,3'", - "in": "query", - "required": false - }, - { - "name": "sqlfilters", - "type": "string", - "description": "Other criteria to filter answers separated by a comma. Syntax example \"(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')\"", - "in": "query", - "required": false - }, - { - "name": "properties", - "type": "string", - "description": "Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names", - "in": "query", - "required": false - } - ], - "summary": "List Groups 🔐", - "description": "Return an array with a list of Groups", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "403": { - "description": "Not allowed" - }, - "404": { - "description": "User not found" - }, - "503": { - "description": "Error" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - }, - "/users/groups/{group}": { - "get": { - "operationId": "usersInfoGroups", - "tags": ["users"], - "parameters": [ - { - "name": "group", - "type": "integer", - "format": "int64", - "description": "ID of group", - "in": "path", - "required": true - }, - { - "name": "load_members", - "type": "integer", - "format": "int64", - "maximum": 1, - "description": "Load members list or not", - "in": "query", - "required": false - } - ], - "summary": "Get properties of an group object 🔐", - "description": "Return an array with group information", - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "string" - } - }, - "403": { - "description": "Not allowed" - }, - "404": { - "description": "User not found" - } - }, - "security": [ - { - "api_key": [] - } - ] - } - } - }, - "definitions": { - "Obj": { - "properties": { - "stringEncoderFunction": { - "type": "string", - "description": "" - }, - "numberEncoderFunction": { - "type": "string", - "description": "" - }, - "fix": { - "type": "array", - "items": { - "type": "string" - }, - "description": "key value pairs for fixing value types using functions. For example 'id'=>'intval' will make sure all values of the id properties will be converted to integers intval function 'password'=> null will remove all the password entries" - }, - "separatorChar": { - "type": "string", - "description": "character that is used to identify sub objects For example when Object::$separatorChar = '.'; array('my.object'=>true) will result in array( 'my'=>array('object'=>true) );" - }, - "removeEmpty": { - "type": "boolean", - "description": "set it to true when empty arrays, blank strings, null values to be automatically removed from response" - }, - "removeNull": { - "type": "boolean", - "description": "set it to true to remove all null values from the result" - } - }, - "required": [ - "stringEncoderFunction", - "numberEncoderFunction", - "fix", - "separatorChar", - "removeEmpty", - "removeNull" - ] - }, - "updateAgendaeventsModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Datas" - } - } - }, - "createAgendaeventsModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request data" - } - } - }, - "createBankaccountsModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request data" - } - } - }, - "updateBankaccountsModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "data" - } - } - }, - "bankaccountsTransferModel": { - "properties": { - "bankaccount_from_id": { - "type": "integer", - "format": "int64", - "description": "BankAccount ID to use as the source of the internal wire transfer" - }, - "bankaccount_to_id": { - "type": "integer", - "format": "int64", - "description": "BankAccount ID to use as the destination of the internal wire transfer" - }, - "date": { - "type": "string", - "description": "Date of the internal wire transfer (UNIX timestamp)" - }, - "description": { - "type": "string", - "description": "Description of the internal wire transfer" - }, - "amount": { - "type": "number", - "format": "double", - "description": "Amount to transfer from the source to the destination BankAccount" - }, - "amount_to": { - "type": "number", - "format": "double", - "description": "Amount to transfer to the destination BankAccount (only when accounts does not share the same currency)" - }, - "cheque_number": { - "type": "string", - "description": "Cheque numero" - } - }, - "required": [ - "bankaccount_from_id", - "bankaccount_to_id", - "date", - "description", - "amount" - ] - }, - "bankaccountsAddLineModel": { - "properties": { - "date": { - "type": "string", - "description": "Payment date (timestamp)" - }, - "type": { - "type": "string", - "description": "Payment mode (TYP,VIR,PRE,LIQ,VAD,CB,CHQ...)" - }, - "label": { - "type": "string", - "description": "Label" - }, - "amount": { - "type": "number", - "format": "double", - "description": "Amount (may be 0)" - }, - "category": { - "type": "integer", - "format": "int64", - "description": "Category" - }, - "cheque_number": { - "type": "string", - "description": "Cheque numero" - }, - "cheque_writer": { - "type": "string", - "description": "Name of cheque writer" - }, - "cheque_bank": { - "type": "string", - "description": "Bank of cheque writer" - }, - "accountancycode": { - "type": "string", - "description": "Accountancy code" - }, - "datev": { - "type": "string", - "description": "Payment date value (timestamp)" - }, - "num_releve": { - "type": "string", - "description": "Bank statement numero" - } - }, - "required": ["date", "type", "label", "amount"] - }, - "bankaccountsAddLinkModel": { - "properties": { - "url_id": { - "type": "integer", - "format": "int64", - "description": "ID to set in the URL" - }, - "url": { - "type": "string", - "description": "URL of the link" - }, - "label": { - "type": "string", - "description": "Label" - }, - "type": { - "type": "string", - "description": "Type of link ('payment', 'company', 'member', ...)" - } - }, - "required": ["url_id", "url", "label", "type"] - }, - "bankaccountsUpdateLineModel": { - "properties": { - "label": { - "type": "string", - "description": "Label" - } - }, - "required": ["label"] - }, - "updateBomsModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Datas" - } - } - }, - "createBomsModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request datas" - } - } - }, - "bomsCreateLineModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "BOMLine data" - } - } - }, - "bomsUpdateLineModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "BOMLine data" - } - } - }, - "updateCategoriesModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Datas" - } - } - }, - "createCategoriesModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request data" - } - } - }, - "updateContactsModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Datas" - } - } - }, - "createContactsModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request datas" - } - } - }, - "contactsCreateUserModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request datas" - } - } - }, - "documentsBuilddocModel": { - "properties": { - "modulepart": { - "type": "string", - "description": "Name of module or area concerned by file download ('thirdparty', 'member', 'proposal', 'supplier_proposal', 'order', 'supplier_order', 'invoice', 'supplier_invoice', 'shipment', 'project', ...)" - }, - "original_file": { - "type": "string", - "description": "Relative path with filename, relative to modulepart (for example: IN201701-999/IN201701-999.pdf)." - }, - "doctemplate": { - "type": "string", - "description": "Set here the doc template to use for document generation (If not set, use the default template)." - }, - "langcode": { - "type": "string", - "description": "Language code like 'en_US', 'fr_FR', 'es_ES', ... (If not set, use the default language)." - } - }, - "required": ["modulepart"] - }, - "createDocumentsModel": { - "properties": { - "filename": { - "type": "string", - "description": "Name of file to create ('FA1705-0123.txt')" - }, - "modulepart": { - "type": "string", - "description": "Name of module or area concerned by file upload ('product', 'service', 'invoice', 'proposal', 'project', 'project_task', 'supplier_invoice', 'expensereport', 'member', ...)" - }, - "ref": { - "type": "string", - "description": "Reference of object (This will define subdir automatically and store submitted file into it)" - }, - "subdir": { - "type": "string", - "description": "Subdirectory (Only if ref not provided)" - }, - "filecontent": { - "type": "string", - "description": "File content (string with file content. An empty file will be created if this parameter is not provided)" - }, - "fileencoding": { - "type": "string", - "description": "File encoding (''=no encoding, 'base64'=Base 64)" - }, - "overwriteifexists": { - "type": "integer", - "format": "int64", - "description": "Overwrite file if exists (1 by default)" - }, - "createdirifnotexists": { - "type": "integer", - "format": "int64", - "description": "Create subdirectories if the doesn't exists (1 by default)", - "defaultValue": 1 - } - }, - "required": ["filename", "modulepart"] - }, - "updateDonationsModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Datas" - } - } - }, - "createDonationsModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request data" - } - } - }, - "donationsValidateModel": { - "properties": { - "idwarehouse": { - "type": "integer", - "format": "int64", - "description": "Warehouse ID" - }, - "notrigger": { - "type": "integer", - "format": "int64", - "description": "1=Does not execute triggers, 0= execute triggers" - } - } - }, - "updateExpensereportsModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Datas" - } - } - }, - "createExpensereportsModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request data" - } - } - }, - "expensereportsAddPaymentModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request data" - } - } - }, - "expensereportsUpdatePaymentModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "data" - } - } - }, - "createInterventionsModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request data" - } - } - }, - "interventionsCreateLineModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request data" - } - } - }, - "interventionsValidateModel": { - "properties": { - "notrigger": { - "type": "integer", - "format": "int64", - "description": "1=Does not execute triggers, 0= execute triggers" - } - } - }, - "updateInvoicesModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Datas" - } - } - }, - "createInvoicesModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request datas" - } - } - }, - "invoicesCreateLineModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "InvoiceLine data" - } - } - }, - "invoicesUpdateLineModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "InvoiceLine data" - } - } - }, - "invoicesAddContactModel": { - "properties": { - "fk_socpeople": { - "type": "integer", - "format": "int64", - "description": "Id of thirdparty contact (if source = 'external') or id of user (if source = 'internal') to link" - }, - "type_contact": { - "type": "string", - "description": "Type of contact (code). Must a code found into table llx_c_type_contact. For example: BILLING" - }, - "source": { - "type": "string", - "description": "external=Contact extern (llx_socpeople), internal=Contact intern (llx_user)" - }, - "notrigger": { - "type": "integer", - "format": "int64", - "description": "Disable all triggers" - } - }, - "required": ["fk_socpeople", "type_contact", "source"] - }, - "invoicesSettodraftModel": { - "properties": { - "idwarehouse": { - "type": "integer", - "format": "int64", - "description": "Warehouse ID", - "defaultValue": -1 - } - } - }, - "invoicesValidateModel": { - "properties": { - "force_number": { - "type": "string", - "description": "force ref invoice" - }, - "idwarehouse": { - "type": "integer", - "format": "int64", - "description": "Warehouse ID" - }, - "notrigger": { - "type": "integer", - "format": "int64", - "description": "1=Does not execute triggers, 0= execute triggers" - } - } - }, - "invoicesSettopaidModel": { - "properties": { - "close_code": { - "type": "string", - "description": "Code filled if we classify to 'Paid completely' when payment is not complete (for escompte for example)" - }, - "close_note": { - "type": "string", - "description": "Comment defined if we classify to 'Paid' when payment is not complete (for escompte for example)" - } - } - }, - "invoicesAddPaymentModel": { - "properties": { - "datepaye": { - "type": "string", - "description": "Payment date" - }, - "paymentid": { - "type": "integer", - "format": "int64", - "description": "Payment mode Id", - "minimum": 1 - }, - "closepaidinvoices": { - "type": "string", - "description": "Close paid invoices", - "enum": ["yes", "no"] - }, - "accountid": { - "type": "integer", - "format": "int64", - "description": "Account Id", - "minimum": 1 - }, - "num_payment": { - "type": "string", - "description": "Payment number (optional)" - }, - "comment": { - "type": "string", - "description": "Note private (optional)" - }, - "chqemetteur": { - "type": "string", - "description": "Payment issuer (mandatory if paymentcode = 'CHQ')" - }, - "chqbank": { - "type": "string", - "description": "Issuer bank name (optional)" - } - }, - "required": ["datepaye", "paymentid", "closepaidinvoices", "accountid"] - }, - "invoicesAddPaymentDistributedModel": { - "properties": { - "arrayofamounts": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Array with id of invoices with amount to pay for each invoice" - }, - "datepaye": { - "type": "string", - "description": "Payment date" - }, - "paymentid": { - "type": "integer", - "format": "int64", - "description": "Payment mode Id", - "minimum": 1 - }, - "closepaidinvoices": { - "type": "string", - "description": "Close paid invoices", - "enum": ["yes", "no"] - }, - "accountid": { - "type": "integer", - "format": "int64", - "description": "Account Id", - "minimum": 1 - }, - "num_payment": { - "type": "string", - "description": "Payment number (optional)" - }, - "comment": { - "type": "string", - "description": "Note private (optional)" - }, - "chqemetteur": { - "type": "string", - "description": "Payment issuer (mandatory if paiementcode = 'CHQ')" - }, - "chqbank": { - "type": "string", - "description": "Issuer bank name (optional)" - }, - "ref_ext": { - "type": "string", - "description": "External reference (optional)" - }, - "accepthigherpayment": { - "type": "boolean", - "description": "Accept higher payments that it remains to be paid (optional)" - } - }, - "required": [ - "arrayofamounts", - "datepaye", - "paymentid", - "closepaidinvoices", - "accountid" - ] - }, - "invoicesUpdatePaymentModel": { - "properties": { - "num_payment": { - "type": "string", - "description": "Payment number" - } - } - }, - "listLoginModel": { - "properties": { - "login": { - "type": "string", - "description": "User login" - }, - "password": { - "type": "string", - "description": "User password" - }, - "entity": { - "type": "string", - "description": "Entity (when multicompany module is used). '' means 1=first company." - }, - "reset": { - "type": "integer", - "format": "int64", - "description": "Reset token (0=get current token, 1=ask a new token and canceled old token. This means access using current existing API token of user will fails: new token will be required for new access)" - } - }, - "required": ["login", "password"] - }, - "updateMosModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Datas" - } - } - }, - "createMosModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request datas" - } - } - }, - "mosProduceAndConsumeAllModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request datas" - } - } - }, - "mosProduceAndConsumeModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request datas" - } - } - }, - "updateOrdersModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Datas" - } - } - }, - "createOrdersModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request data" - } - } - }, - "ordersCreateLineModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "OrderLine data" - } - } - }, - "ordersUpdateLineModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "OrderLine data" - } - } - }, - "ordersValidateModel": { - "properties": { - "idwarehouse": { - "type": "integer", - "format": "int64", - "description": "Warehouse ID" - }, - "notrigger": { - "type": "integer", - "format": "int64", - "description": "1=Does not execute triggers, 0= execute triggers" - } - } - }, - "ordersCloseModel": { - "properties": { - "notrigger": { - "type": "integer", - "format": "int64", - "description": "Disabled triggers" - } - } - }, - "ordersSettodraftModel": { - "properties": { - "idwarehouse": { - "type": "integer", - "format": "int64", - "description": "Warehouse ID to use for stock change (Used only if option STOCK_CALCULATE_ON_VALIDATE_ORDER is on)", - "defaultValue": -1 - } - } - }, - "updateProductsModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Datas" - } - } - }, - "createProductsModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request data" - } - } - }, - "productsAddSubproductsModel": { - "properties": { - "subproduct_id": { - "type": "integer", - "format": "int64", - "description": "Id of child product/service" - }, - "qty": { - "type": "number", - "format": "double", - "description": "Quantity" - }, - "incdec": { - "type": "integer", - "format": "int64", - "description": "1=Increase/decrease stock of child when parent stock increase/decrease", - "defaultValue": 1 - } - }, - "required": ["subproduct_id", "qty"] - }, - "productsAddPurchasePriceModel": { - "properties": { - "qty": { - "type": "number", - "format": "double", - "description": "Min quantity for which price is valid" - }, - "buyprice": { - "type": "number", - "format": "double", - "description": "Purchase price for the quantity min" - }, - "price_base_type": { - "type": "string", - "description": "HT or TTC" - }, - "fourn_id": { - "type": "integer", - "format": "int64", - "description": "Supplier ID" - }, - "availability": { - "type": "integer", - "format": "int64", - "description": "Product availability" - }, - "ref_fourn": { - "type": "string", - "description": "Supplier ref" - }, - "tva_tx": { - "type": "number", - "format": "double", - "description": "New VAT Rate (For example 8.5. Should not be a string)" - }, - "charges": { - "type": "number", - "format": "double", - "description": "costs affering to product" - }, - "remise_percent": { - "type": "number", - "format": "double", - "description": "Discount regarding qty (percent)" - }, - "remise": { - "type": "number", - "format": "double", - "description": "Discount regarding qty (amount)" - }, - "newnpr": { - "type": "integer", - "format": "int64", - "description": "Set NPR or not" - }, - "delivery_time_days": { - "type": "integer", - "format": "int64", - "description": "Delay in days for delivery (max). May be '' if not defined." - }, - "supplier_reputation": { - "type": "string", - "description": "Reputation with this product to the defined supplier (empty, FAVORITE, DONOTORDER)" - }, - "localtaxes_array": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Array with localtaxes info array('0'=>type1,'1'=>rate1,'2'=>type2,'3'=>rate2) (loaded by getLocalTaxesFromRate(vatrate, 0, ...) function)." - }, - "newdefaultvatcode": { - "type": "string", - "description": "Default vat code" - }, - "multicurrency_buyprice": { - "type": "number", - "format": "double", - "description": "Purchase price for the quantity min in currency" - }, - "multicurrency_price_base_type": { - "type": "string", - "description": "HT or TTC in currency", - "defaultValue": "HT" - }, - "multicurrency_tx": { - "type": "number", - "format": "double", - "description": "Rate currency", - "defaultValue": 1 - }, - "multicurrency_code": { - "type": "string", - "description": "Currency code" - }, - "desc_fourn": { - "type": "string", - "description": "Custom description for product_fourn_price" - }, - "barcode": { - "type": "string", - "description": "Barcode" - }, - "fk_barcode_type": { - "type": "integer", - "format": "int64", - "description": "Barcode type" - } - }, - "required": [ - "qty", - "buyprice", - "price_base_type", - "fourn_id", - "availability", - "ref_fourn", - "tva_tx" - ] - }, - "productsAddAttributesModel": { - "properties": { - "ref": { - "type": "string", - "description": "Reference of Attribute" - }, - "label": { - "type": "string", - "description": "Label of Attribute" - }, - "ref_ext": { - "type": "string", - "description": "Reference of Attribute" - } - }, - "required": ["ref", "label"] - }, - "productsUpdateAttributesModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Datas" - } - } - }, - "productsUpdateAttributeValueModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Datas" - } - }, - "required": ["request_data"] - }, - "productsAddAttributeValueModel": { - "properties": { - "ref": { - "type": "string", - "description": "Reference of Attribute value" - }, - "value": { - "type": "string", - "description": "Value of Attribute value" - } - }, - "required": ["ref", "value"] - }, - "productsAddVariantModel": { - "properties": { - "weight_impact": { - "type": "number", - "format": "double", - "description": "Weight impact of variant" - }, - "price_impact": { - "type": "number", - "format": "double", - "description": "Price impact of variant" - }, - "price_impact_is_percent": { - "type": "boolean", - "description": "Price impact in percent (true or false)" - }, - "features": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of attributes pairs id_attribute->id_value. Example: array(id_color=>id_Blue, id_size=>id_small, id_option=>id_val_a, ...)" - }, - "reference": { - "type": "string", - "description": "Customized reference of variant" - }, - "ref_ext": { - "type": "string", - "description": "External reference of variant" - } - }, - "required": [ - "weight_impact", - "price_impact", - "price_impact_is_percent", - "features" - ] - }, - "productsAddVariantByProductRefModel": { - "properties": { - "weight_impact": { - "type": "number", - "format": "double", - "description": "Weight impact of variant" - }, - "price_impact": { - "type": "number", - "format": "double", - "description": "Price impact of variant" - }, - "price_impact_is_percent": { - "type": "boolean", - "description": "Price impact in percent (true or false)" - }, - "features": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of attributes pairs id_attribute->id_value. Example: array(id_color=>id_Blue, id_size=>id_small, id_option=>id_val_a, ...)" - } - }, - "required": [ - "weight_impact", - "price_impact", - "price_impact_is_percent", - "features" - ] - }, - "productsUpdateVariantModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Datas" - } - } - }, - "updateProjectsModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Datas" - } - } - }, - "createProjectsModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request data" - } - } - }, - "projectsValidateModel": { - "properties": { - "notrigger": { - "type": "integer", - "format": "int64", - "description": "1=Does not execute triggers, 0= execute triggers" - } - } - }, - "updateProposalsModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Datas" - } - } - }, - "createProposalsModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request data" - } - } - }, - "proposalsCreateLinesModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Commercial proposal line data" - } - } - }, - "proposalsCreateLineModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Commercial proposal line data" - } - } - }, - "proposalsUpdateLineModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Commercial proposal line data" - } - } - }, - "proposalsValidateModel": { - "properties": { - "notrigger": { - "type": "integer", - "format": "int64", - "description": "1=Does not execute triggers, 0= execute triggers" - } - } - }, - "proposalsCloseModel": { - "properties": { - "status": { - "type": "integer", - "format": "int64", - "description": "Must be 2 (accepted) or 3 (refused)", - "minimum": 2, - "maximum": 3 - }, - "note_private": { - "type": "string", - "description": "Add this mention at end of private note" - }, - "notrigger": { - "type": "integer", - "format": "int64", - "description": "Disabled triggers" - } - }, - "required": ["status"] - }, - "createSalariesModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request data" - } - } - }, - "updateSalariesModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Data" - } - } - }, - "salariesUpdatePaymentModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "data" - } - } - }, - "setupCreateExtrafieldsModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request datas" - } - } - }, - "setupUpdateExtrafieldsModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request datas" - } - } - }, - "updateSupplierinvoicesModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Datas" - } - } - }, - "createSupplierinvoicesModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request datas" - } - } - }, - "supplierinvoicesValidateModel": { - "properties": { - "idwarehouse": { - "type": "integer", - "format": "int64", - "description": "Warehouse ID" - }, - "notrigger": { - "type": "integer", - "format": "int64", - "description": "1=Does not execute triggers, 0= execute triggers" - } - } - }, - "supplierinvoicesAddPaymentModel": { - "properties": { - "datepaye": { - "type": "string", - "description": "Payment date" - }, - "payment_mode_id": { - "type": "integer", - "format": "int64", - "description": "Payment mode ID (look it up via REST GET to /setup/dictionary/payment_types)", - "minimum": 1 - }, - "closepaidinvoices": { - "type": "string", - "description": "Close paid invoices", - "enum": ["yes", "no"] - }, - "accountid": { - "type": "integer", - "format": "int64", - "description": "Bank account ID (look it up via REST GET to /bankaccounts)", - "minimum": 1 - }, - "num_payment": { - "type": "string", - "description": "Payment number (optional)" - }, - "comment": { - "type": "string", - "description": "Note (optional)" - }, - "chqemetteur": { - "type": "string", - "description": "Payment issuer (mandatory if payment_mode_id corresponds to 'CHQ'-payment type)" - }, - "chqbank": { - "type": "string", - "description": "Issuer bank name (optional)" - }, - "amount": { - "type": "number", - "format": "double", - "description": "Amount of payment if we don't want to use the remain to pay" - } - }, - "required": [ - "datepaye", - "payment_mode_id", - "closepaidinvoices", - "accountid" - ] - }, - "supplierinvoicesCreateLineModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "supplier invoice line data" - } - } - }, - "supplierinvoicesUpdateLineModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "InvoiceLine data" - } - } - }, - "updateSupplierordersModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Datas" - } - } - }, - "createSupplierordersModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request datas" - } - } - }, - "supplierordersValidateModel": { - "properties": { - "idwarehouse": { - "type": "integer", - "format": "int64", - "description": "Warehouse ID" - }, - "notrigger": { - "type": "integer", - "format": "int64", - "description": "1=Does not execute triggers, 0= execute triggers" - } - } - }, - "supplierordersApproveModel": { - "properties": { - "idwarehouse": { - "type": "integer", - "format": "int64", - "description": "Warehouse ID" - }, - "secondlevel": { - "type": "integer", - "format": "int64", - "description": "1=Does not execute triggers, 0= execute triggers" - } - } - }, - "supplierordersMakeOrderModel": { - "properties": { - "date": { - "type": "integer", - "format": "int64", - "description": "Date (unix timestamp in sec)" - }, - "method": { - "type": "integer", - "format": "int64", - "description": "Method" - }, - "comment": { - "type": "string", - "description": "Comment" - } - }, - "required": ["date", "method"] - }, - "supplierordersReceiveOrderModel": { - "properties": { - "closeopenorder": { - "type": "integer", - "format": "int64", - "description": "Close order if everything is received" - }, - "comment": { - "type": "string", - "description": "Comment" - }, - "lines": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Array of product dispatches" - } - }, - "required": ["lines"] - }, - "updateTasksModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Datas" - } - } - }, - "createTasksModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request data" - } - } - }, - "tasksAddTimeSpentModel": { - "properties": { - "date": { - "type": "string", - "format": "date-time", - "description": "Date (YYYY-MM-DD HH:MI:SS in GMT)" - }, - "duration": { - "type": "integer", - "format": "int64", - "description": "Duration in seconds (3600 = 1h)" - }, - "user_id": { - "type": "integer", - "format": "int64", - "description": "User (Use 0 for connected user)" - }, - "note": { - "type": "string", - "description": "Note" - } - }, - "required": ["date", "duration"] - }, - "tasksUpdateTimeSpentModel": { - "properties": { - "date": { - "type": "string", - "format": "date-time", - "description": "Date (YYYY-MM-DD HH:MI:SS in GMT)" - }, - "duration": { - "type": "integer", - "format": "int64", - "description": "Duration in seconds (3600 = 1h)" - }, - "user_id": { - "type": "integer", - "format": "int64", - "description": "User (Use 0 for connected user)" - }, - "note": { - "type": "string", - "description": "Note" - } - }, - "required": ["date", "duration"] - }, - "updateThirdpartiesModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Datas" - } - } - }, - "createThirdpartiesModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request datas" - } - } - }, - "thirdpartiesCreateCompanyNotificationModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request data" - } - } - }, - "thirdpartiesUpdateCompanyNotificationModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request data" - } - } - }, - "thirdpartiesCreateCompanyBankAccountModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request data" - } - } - }, - "thirdpartiesUpdateCompanyBankAccountModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request data" - } - } - }, - "thirdpartiesCreateSocieteAccountModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request data" - } - } - }, - "thirdpartiesUpdateSocieteAccountModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request data" - } - } - }, - "thirdpartiesModifySocieteAccountModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Request data" - } - } - }, - "createUsersModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "New user data" - } - } - }, - "updateUsersModel": { - "properties": { - "request_data": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Datas" - } - } - } - }, - "securityDefinitions": { - "api_key": { - "type": "apiKey", - "name": "api_key", - "in": "query" - } - }, - "info": { - "version": "1", - "title": "Restler API Explorer", - "description": "Live API Documentation", - "contact": { - "name": "Restler Support", - "url": "luracast.com/products/restler", - "email": "arul@luracast.com" - }, - "license": { - "name": "LGPL-2.1", - "url": "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html" - } - } -} From 04d13fd40b48a37c45f49ddbbe211243b0271ee1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Garc=C3=ADa?= Date: Tue, 18 Nov 2025 17:28:38 +0100 Subject: [PATCH 06/18] feat: swagger mailchimp introspection --- .../mailchimp/class-mailchimp-addon.php | 153 ++++-------------- 1 file changed, 30 insertions(+), 123 deletions(-) diff --git a/forms-bridge/addons/mailchimp/class-mailchimp-addon.php b/forms-bridge/addons/mailchimp/class-mailchimp-addon.php index bf7c53dc..24cea214 100644 --- a/forms-bridge/addons/mailchimp/class-mailchimp-addon.php +++ b/forms-bridge/addons/mailchimp/class-mailchimp-addon.php @@ -20,25 +20,33 @@ class Mailchimp_Addon extends Addon { /** - * Handles the addon's title. + * Holds the addon's title. * * @var string */ - const TITLE = 'Mailchimp'; + public const TITLE = 'Mailchimp'; /** - * Handles the addon's name. + * Holds the addon's name. * * @var string */ - const NAME = 'mailchimp'; + public const NAME = 'mailchimp'; /** - * Handles the addom's custom bridge class. + * Holds the addom's custom bridge class. * * @var string */ - const BRIDGE = '\FORMS_BRIDGE\Mailchimp_Form_Bridge'; + public const BRIDGE = '\FORMS_BRIDGE\Mailchimp_Form_Bridge'; + + /** + * Holds the mailchimp marketing API swagger URL. + * + * @var string + */ + public const SWAGGER_URL = 'https://mailchimp.com/developer/spec/marketing.json'; + /** * Performs a request against the backend to check the connexion status. @@ -93,128 +101,27 @@ public function fetch( $endpoint, $backend ) { * Performs an introspection of the backend endpoint and returns API fields * and accepted content type. * - * @param string $endpoint API endpoint. - * @param string $backend Backend name. + * @param string $endpoint API endpoint. + * @param string $backend Backend name. + * @param string|null $method HTTP method. * * @return array */ - public function get_endpoint_schema( $endpoint, $backend ) { - if ( strstr( $endpoint, '/lists/' ) !== false ) { - $fields = array( - array( - 'name' => 'email_address', - 'schema' => array( 'type' => 'string' ), - 'required' => true, - ), - array( - 'name' => 'status', - 'schema' => array( 'type' => 'string' ), - 'required' => true, - ), - array( - 'name' => 'email_type', - 'schema' => array( 'type' => 'string' ), - ), - array( - 'name' => 'interests', - 'schema' => array( - 'type' => 'object', - 'properties' => array(), - ), - ), - array( - 'name' => 'language', - 'schema' => array( 'type' => 'string' ), - ), - array( - 'name' => 'vip', - 'schema' => array( 'type' => 'boolean' ), - ), - array( - 'name' => 'location', - 'schema' => array( - 'type' => 'object', - 'properties' => array( - 'latitude' => array( 'type' => 'number' ), - 'longitude' => array( 'type' => 'number' ), - ), - ), - ), - array( - 'name' => 'marketing_permissions', - 'schema' => array( - 'type' => 'array', - 'items' => array( - 'type' => 'object', - 'properties' => array( - 'marketing_permission_id' => array( - 'type' => 'string', - ), - 'enabled' => array( 'type' => 'boolean' ), - ), - ), - ), - ), - array( - 'name' => 'ip_signup', - 'schema' => array( 'type' => 'string' ), - ), - array( - 'name' => 'ip_opt', - 'schema' => array( 'type' => 'string' ), - ), - array( - 'name' => 'timestamp_opt', - 'schema' => array( 'type' => 'string' ), - ), - array( - 'name' => 'tags', - 'schema' => array( - 'type' => 'array', - 'items' => array( 'type' => 'string' ), - ), - ), - array( - 'name' => 'merge_fields', - 'schema' => array( - 'type' => 'object', - 'properties' => array(), - ), - ), - ); - - $fields_endpoint = str_replace( - '/members', - '/merge-fields', - $endpoint - ); - - $bridge = new Mailchimp_Form_Bridge( - array( - 'name' => '__mailchimp-' . time(), - 'endpoint' => $fields_endpoint, - 'method' => 'GET', - 'backend' => $backend, - ) - ); - - $response = $bridge->submit(); - - if ( is_wp_error( $response ) ) { - return array(); - } - - foreach ( $response['data']['merge_fields'] as $field ) { - $fields[] = array( - 'name' => 'merge_fields.' . $field['tag'], - 'schema' => array( 'type' => 'string' ), - ); - } - - return $fields; + public function get_endpoint_schema( $endpoint, $backend, $method = null ) { + $response = wp_remote_get( self::SWAGGER_URL ); + + if ( is_wp_error( $response ) ) { + return array(); } - return array(); + $data = json_decode( $response['body'], true ); + $oa_explorer = new OpenAPI( $data ); + + $method = strtolower( $method ?? 'post' ); + $path = preg_replace( '/^\/\d+(\.\d+)?/', '', $endpoint ); + $params = $oa_explorer->params( $path, $method ); + + return $params; } } From ac4cc94374dc29301dd654f592e3ee1e414d02b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Garc=C3=ADa?= Date: Tue, 18 Nov 2025 17:29:06 +0100 Subject: [PATCH 07/18] feat: oas brevo introspection --- .../addons/brevo/class-brevo-addon.php | 245 ++---------------- 1 file changed, 20 insertions(+), 225 deletions(-) diff --git a/forms-bridge/addons/brevo/class-brevo-addon.php b/forms-bridge/addons/brevo/class-brevo-addon.php index b6d2b9b3..3cda3bc0 100644 --- a/forms-bridge/addons/brevo/class-brevo-addon.php +++ b/forms-bridge/addons/brevo/class-brevo-addon.php @@ -25,21 +25,28 @@ class Brevo_Addon extends Addon { * * @var string */ - const TITLE = 'Brevo'; + public const TITLE = 'Brevo'; /** * Handles the addon's name. * * @var string */ - const NAME = 'brevo'; + public const NAME = 'brevo'; /** * Handles the addom's custom bridge class. * * @var string */ - const BRIDGE = '\FORMS_BRIDGE\Brevo_Form_Bridge'; + public const BRIDGE = '\FORMS_BRIDGE\Brevo_Form_Bridge'; + + /** + * Holds the OAS URL. + * + * @var string + */ + public const OAS_URL = 'https://developers.brevo.com/reference/getaccount?json=on'; /** * Performs a request against the backend to check the connexion status. @@ -100,232 +107,20 @@ public function fetch( $endpoint, $backend ) { * @return array */ public function get_endpoint_schema( $endpoint, $backend ) { - $bridge = new Brevo_Form_Bridge( - array( - 'name' => '__brevo-' . time(), - 'endpoint' => $endpoint, - 'backend' => $backend, - 'method' => 'GET', - ) - ); - - if ( strstr( $bridge->endpoint, 'contacts' ) ) { - $response = $bridge - ->patch( - array( - 'name' => 'brevo-contacts-attributes', - 'endpoint' => '/v3/contacts/attributes', - 'method' => 'GET', - ) - ) - ->submit(); - - if ( is_wp_error( $response ) ) { - return array(); - } - - if ( $bridge->endpoint === '/v3/contacts/doubleOptinConfirmation' ) { - $fields = array( - array( - 'name' => 'email', - 'schema' => array( 'type' => 'string' ), - 'required' => true, - ), - array( - 'name' => 'includeListIds', - 'schema' => array( - 'type' => 'array', - 'items' => array( 'type' => 'integer' ), - ), - 'required' => true, - ), - array( - 'name' => 'excludeListIds', - 'schema' => array( - 'type' => 'array', - 'items' => array( 'type' => 'integer' ), - ), - ), - array( - 'name' => 'templateId', - 'schema' => array( 'type' => 'integer' ), - 'required' => true, - ), - array( - 'name' => 'redirectionUrl', - 'schema' => array( 'type' => 'string' ), - 'required' => true, - ), - array( - 'name' => 'attributes', - 'schema' => array( - 'type' => 'object', - 'properties' => array(), - ), - ), - ); - } else { - $fields = array( - array( - 'name' => 'email', - 'schema' => array( 'type' => 'string' ), - 'required' => true, - ), - array( - 'name' => 'ext_id', - 'schema' => array( 'type' => 'string' ), - ), - array( - 'name' => 'emailBlacklisted', - 'schema' => array( 'type' => 'boolean' ), - ), - array( - 'name' => 'smsBlacklisted', - 'schema' => array( 'type' => 'boolean' ), - ), - array( - 'name' => 'listIds', - 'schema' => array( - 'type' => 'array', - 'items' => array( 'type' => 'integer' ), - ), - ), - array( - 'name' => 'updateEnabled', - 'schema' => array( 'type' => 'boolean' ), - ), - array( - 'name' => 'smtpBlacklistSender', - 'schema' => array( 'type' => 'boolean' ), - ), - array( - 'name' => 'attributes', - 'schema' => array( - 'type' => 'object', - 'properties' => array(), - ), - ), - ); - } - - foreach ( $response['data']['attributes'] as $attribute ) { - $fields[] = array( - 'name' => 'attributes.' . $attribute['name'], - 'schema' => array( 'type' => 'string' ), - ); - } - - return $fields; - } else { - if ( ! preg_match( '/\/([a-z]+)$/', $bridge->endpoint, $matches ) ) { - return array(); - } + $response = wp_remote_get( self::OAS_URL ); - $module = $matches[1]; - $response = $bridge - ->patch( - array( - 'name' => "brevo-{$module}-attributes", - 'endpoint' => "/v3/crm/attributes/{$module}", - 'method' => 'GET', - ) - ) - ->submit(); - - if ( is_wp_error( $response ) ) { - return array(); - } - - if ( 'companies' === $module ) { - $fields = array( - array( - 'name' => 'name', - 'schema' => array( 'type' => 'string' ), - 'required' => true, - ), - array( - 'name' => 'countryCode', - 'schema' => array( 'type' => 'integer' ), - ), - array( - 'name' => 'linkedContactsIds', - 'schema' => array( - 'type' => 'array', - 'items' => array( 'type' => 'integer' ), - ), - ), - array( - 'name' => 'linkedDealsIds', - 'schema' => array( - 'type' => 'array', - 'items' => array( 'type' => 'integer' ), - ), - ), - array( - 'name' => 'attributes', - 'schema' => array( - 'type' => 'object', - 'properties' => array(), - ), - ), - ); - } elseif ( 'deals' === $module ) { - $fields = array( - array( - 'name' => 'name', - 'schema' => array( 'type' => 'string' ), - 'required' => true, - ), - array( - 'name' => 'linkedDealsIds', - 'schema' => array( - 'type' => 'array', - 'items' => array( 'type' => 'integer' ), - ), - ), - array( - 'name' => 'linkedCompaniesIds', - 'schema' => array( - 'type' => 'array', - 'items' => array( 'type' => 'integer' ), - ), - ), - array( - 'name' => 'attributes', - 'schema' => array( - 'type' => 'object', - 'properties' => array(), - ), - ), - ); - } + if ( is_wp_error( $response ) ) { + return array(); + } - foreach ( $response['data'] as $attribute ) { - switch ( $attribute['attributeTypeName'] ) { - case 'number': - $type = 'number'; - break; - case 'text': - $type = 'string'; - break; - case 'user': - $type = 'email'; - break; - case 'date': - $type = 'date'; - break; - default: - $type = 'string'; - } + $data = json_decode( $response['body'], true ); + $oa_explorer = new OpenAPI( $data['oasDefinition'] ); - $fields[] = array( - 'name' => 'attributes.' . $attribute['internalName'], - 'schema' => array( 'type' => $type ), - ); - } + $method = strtolower( $method ?? 'post' ); + $path = preg_replace( '/^\/v\d+/', '', $endpoint ); + $params = $oa_explorer->params( $path, $method ); - return $fields; - } + return $params; } } From fb6b023125aea79bbeeba28c3bc64bf57fd7741f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Garc=C3=ADa?= Date: Tue, 18 Nov 2025 17:30:00 +0100 Subject: [PATCH 08/18] feat: expand body params as object types with properties on oas explorer --- forms-bridge/includes/class-openapi.php | 29 +++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/forms-bridge/includes/class-openapi.php b/forms-bridge/includes/class-openapi.php index db19edfa..c199c108 100644 --- a/forms-bridge/includes/class-openapi.php +++ b/forms-bridge/includes/class-openapi.php @@ -106,7 +106,7 @@ public function path_obj( $path ) { $regexp = str_replace( $match, '[^\/]+', $regexp ); } - if ( preg_match( '$' . $regexp . '$', $path ) ) { + if ( preg_match( '#^' . $regexp . '$#', $path ) ) { return $obj; } } elseif ( $path === $name ) { @@ -161,7 +161,7 @@ public function params( $path, $method = null, $source = null ) { $parameters = array(); } - foreach ( $parameters as $param ) { + foreach ( $parameters as &$param ) { $param['in'] = 'path'; } @@ -175,6 +175,24 @@ public function params( $path, $method = null, $source = null ) { $method_obj['parameters'] ?? array() ); + $c = count( $parameters ); + for ( $i = 0; $i < $c; $i++ ) { + $param = &$parameters[ $i ]; + if ( 'body' === $param['in'] && isset( $param['schema'] ) && 'object' === $param['schema']['type'] ) { + array_splice( $parameters, $i, 1 ); + + foreach ( $param['schema']['properties'] as $prop => $prop_schema ) { + $parameters[] = array_merge( + $prop_schema, + array( + 'name' => $prop, + 'in' => 'body', + ), + ); + } + } + } + $body = $method_obj['requestBody'] ?? null; if ( $body ) { $parameters = array_merge( $parameters, self::body_to_params( $body ) ); @@ -201,6 +219,11 @@ function ( $param ) use ( $source ) { for ( $i = 0; $i < $l; $i++ ) { $param = &$parameters[ $i ]; + if ( isset( $param['type'] ) && ! isset( $param['schema'] ) ) { + $param['schema'] = array( 'type' => $param['type'] ); + unset( $param['type'] ); + } + if ( isset( $param['$ref'] ) ) { $parameters[ $i ] = $this->get_ref( $param['$ref'] ); } elseif ( isset( $param['schema']['$ref'] ) ) { @@ -270,6 +293,8 @@ private static function parse_path( $path ) { $url = wp_parse_url( $path ); if ( empty( $url['path'] ) ) { return '/'; + } else { + $path = $url['path']; } $path = strpos( $path, '/' ) !== 0 ? '/' . $path : $path; From b59254322b053d73fd4970c54c828bcf3a666865 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Garc=C3=ADa?= Date: Tue, 18 Nov 2025 18:04:39 +0100 Subject: [PATCH 09/18] feat: holded oas introspection --- .../addons/brevo/class-brevo-addon.php | 2 +- .../addons/holded/class-holded-addon.php | 104 +- .../holded/data/swagger/accounting.json | 256 - .../addons/holded/data/swagger/crm.json | 4952 --------- .../addons/holded/data/swagger/invoicing.json | 9531 ----------------- .../addons/holded/data/swagger/projects.json | 3504 ------ .../addons/holded/data/swagger/team.json | 773 -- .../mailchimp/class-mailchimp-addon.php | 2 +- 8 files changed, 39 insertions(+), 19085 deletions(-) delete mode 100644 forms-bridge/addons/holded/data/swagger/accounting.json delete mode 100644 forms-bridge/addons/holded/data/swagger/crm.json delete mode 100644 forms-bridge/addons/holded/data/swagger/invoicing.json delete mode 100644 forms-bridge/addons/holded/data/swagger/projects.json delete mode 100644 forms-bridge/addons/holded/data/swagger/team.json diff --git a/forms-bridge/addons/brevo/class-brevo-addon.php b/forms-bridge/addons/brevo/class-brevo-addon.php index 3cda3bc0..da2d68ec 100644 --- a/forms-bridge/addons/brevo/class-brevo-addon.php +++ b/forms-bridge/addons/brevo/class-brevo-addon.php @@ -120,7 +120,7 @@ public function get_endpoint_schema( $endpoint, $backend ) { $path = preg_replace( '/^\/v\d+/', '', $endpoint ); $params = $oa_explorer->params( $path, $method ); - return $params; + return $params ?: array(); } } diff --git a/forms-bridge/addons/holded/class-holded-addon.php b/forms-bridge/addons/holded/class-holded-addon.php index 0c2c1f33..059fe56b 100644 --- a/forms-bridge/addons/holded/class-holded-addon.php +++ b/forms-bridge/addons/holded/class-holded-addon.php @@ -23,25 +23,45 @@ class Holded_Addon extends Addon { /** - * Handles the addon's title. + * Holds the addon's title. * * @var string */ - const TITLE = 'Holded'; + public const TITLE = 'Holded'; /** - * Handles the addon's name. + * Holds the addon's name. * * @var string */ - const NAME = 'holded'; + public const NAME = 'holded'; /** - * Handles the addom's custom bridge class. + * Holds the addom's custom bridge class. * * @var string */ - const BRIDGE = '\FORMS_BRIDGE\Holded_Form_Bridge'; + public const BRIDGE = '\FORMS_BRIDGE\Holded_Form_Bridge'; + + /** + * Holds the OAS endpoints base URL. + * + * @var string + */ + public const OAS_BASE_URL = 'https://developers.holded.com/holded/api-next'; + + /** + * Holds the addon OAS URLs map. + * + * @var array + */ + public const OAS_URLS = array( + 'invoicing' => '/v2/branches/1.0/reference/list-contacts-1', + 'crm' => '/v2/branches/1.0/reference/list-leads-1', + 'projects' => '/v2/branches/1.0/reference/list-projects', + 'team' => '/v2/branches/1.0/reference/listemployees', + 'accounting' => '/v2/branches/1.0/reference/listdailyledger', + ); /** * Performs a request against the backend to check the connexion status. @@ -114,75 +134,25 @@ public function get_endpoint_schema( $endpoint, $backend ) { [, $module, $version, $resource] = $chunks; - if ( - ! in_array( - $module, - array( - 'invoicing', - 'crm', - 'projects', - 'team', - 'accounting', - ), - true - ) || - 'v1' !== $version - ) { - return array(); - } - - $path = plugin_dir_path( __FILE__ ) . "/data/swagger/{$module}.json"; - if ( ! is_file( $path ) ) { - return array(); - } - - $file_content = file_get_contents( $path ); - try { - $paths = json_decode( $file_content, true ); - } catch ( TypeError ) { + $oas_url = self::OAS_URLS[ $module ] ?? null; + if ( ! $oas_url ) { return array(); } - $path = '/' . $resource; - if ( 'documents' === $resource ) { - $path .= '/{docType}'; - } - - if ( ! isset( $paths[ $path ] ) ) { + $oas_url = self::OAS_BASE_URL . $oas_url . '?dereference=false&reduce=false'; + $response = wp_remote_get( $oas_url ); + if ( is_wp_error( $response ) ) { return array(); } - $schema = $paths[ $path ]; - if ( ! isset( $schema['post'] ) ) { - return array(); - } + $data = json_decode( $response['body'], true ); + $oa_explorer = new OpenAPI( $data['data']['api']['schema'] ); - $schema = $schema['post']; - - $fields = array(); - if ( isset( $schema['parameters'] ) ) { - foreach ( $schema['parameters'] as $param ) { - $fields[] = array( - 'name' => $param['name'], - 'schema' => $param['schema'], - ); - } - } elseif ( - isset( - $schema['requestBody']['content']['application/json']['schema']['properties'] - ) - ) { - $properties = - $schema['requestBody']['content']['application/json']['schema']['properties']; - foreach ( $properties as $name => $schema ) { - $fields[] = array( - 'name' => $name, - 'schema' => $schema, - ); - } - } + $method = strtolower( $method ?? 'post' ); + $path = preg_replace( '/\/api\/' . $module . '\/v\d+/', '', $endpoint ); + $params = $oa_explorer->params( $path, $method ); - return $fields; + return $params ?: array(); } } diff --git a/forms-bridge/addons/holded/data/swagger/accounting.json b/forms-bridge/addons/holded/data/swagger/accounting.json deleted file mode 100644 index 459c1613..00000000 --- a/forms-bridge/addons/holded/data/swagger/accounting.json +++ /dev/null @@ -1,256 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "description": "The Holded's Accounting API is organized around REST, using HTTP responses code to keep you informed about what's going on. Our endpoints will returns you metada in JSON format directly from Holded.", - "version": "1.0.0", - "title": "Accounting API", - "contact": { - "email": "developers@holded.com" - } - }, - "x-samples-languages": ["curl", "node", "ruby", "python"], - "security": [ - { - "Auth": [] - } - ], - "tags": [ - { - "name": "Daily Ledger", - "description": "CRUD Daily Ledger" - }, - { - "name": "Chart of Accounts", - "description": "CRUD Chart of Accounts" - } - ], - "paths": { - "/dailyledger": { - "get": { - "tags": ["Daily Ledger"], - "summary": "List all your entries", - "operationId": "listDailyLedger", - "description": "List all the entries you have in your daily ledger.\n", - "parameters": [ - { - "in": "query", - "name": "page", - "description": "the response is paginated and limited to 500 entries,", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "starttmp", - "in": "query", - "description": "Starting timestamp", - "schema": { - "type": "string" - } - }, - { - "name": "endtmp", - "in": "query", - "description": "Ending timestamp", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "search results matching criteria" - }, - "400": { - "description": "bad input parameter" - } - } - } - }, - "/entry": { - "post": { - "tags": ["Daily Ledger"], - "summary": "Create entry", - "operationId": "createEntry", - "description": "Create a new accounting entry\n", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "date": { - "type": "integer", - "description": "Timestamp for entry date" - }, - "lines": { - "type": "array", - "items": { - "type": "object", - "properties": { - "account": { - "type": "integer", - "description": "Account number for this entry line" - }, - "credit": { - "type": "number" - }, - "debit": { - "type": "number" - }, - "description": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": ["account"] - } - }, - "notes": { - "type": "string", - "description": "Entry Note" - } - }, - "required": ["date", "lines"] - } - } - } - }, - "responses": { - "200": { - "description": "The output when an entry has successfully been created", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "entryGroupId": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/chartofaccounts": { - "get": { - "tags": ["Chart of Accounts"], - "summary": "List all your accounting accounts", - "operationId": "listaccounts", - "description": "List all your accounting accounts.\n", - "parameters": [ - { - "name": "starttmp", - "in": "query", - "description": "Starting timestamp", - "schema": { - "type": "string" - } - }, - { - "name": "endtmp", - "in": "query", - "description": "Ending timestamp", - "schema": { - "type": "string" - } - }, - { - "name": "includeEmpty", - "in": "query", - "description": "Include Empty accounts (0: no include empty, 1: include empty)", - "required": false, - "schema": { - "type": "number", - "enum": [0, 1] - } - } - ], - "responses": { - "200": { - "description": "search results matching criteria" - }, - "400": { - "description": "bad input parameter" - } - } - } - }, - "/account": { - "post": { - "tags": ["Chart of Accounts"], - "summary": "Create a new accounting account", - "operationId": "createAccount", - "description": "Create a new accounting account\n", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "prefix": { - "type": "integer", - "description": "4 digit prefix of the account to be created" - }, - "name": { - "type": "string", - "description": "Name of the account to be created (falls back to parent account name if empty)" - }, - "color": { - "type": "string", - "description": "Hex code" - } - }, - "required": ["prefix"] - } - } - } - }, - "responses": { - "200": { - "description": "The output if an account has successfully been created", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "accountId": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "servers": [ - { - "url": "https://api.holded.com/api/accounting/v1" - } - ], - "components": { - "securitySchemes": { - "Auth": { - "type": "apiKey", - "name": "key", - "in": "header" - } - } - }, - "x-readme": { - "explorer-enabled": true, - "proxy-enabled": true - } -} diff --git a/forms-bridge/addons/holded/data/swagger/crm.json b/forms-bridge/addons/holded/data/swagger/crm.json deleted file mode 100644 index 87f32799..00000000 --- a/forms-bridge/addons/holded/data/swagger/crm.json +++ /dev/null @@ -1,4952 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "title": "CRM API", - "version": "1.0", - "description": "The Holded’s CRM API is organized around REST, using HTTP responses code to keep you informed about what’s going on. Our endpoints will returns you metada in JSON format directly from Holded." - }, - "x-samples-languages": ["curl", "node", "ruby", "python"], - "paths": { - "/funnels": { - "get": { - "operationId": "List Funnels", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "title": "Funnel Basic Output", - "description": "The properties that are included when fetching a list of Funnels.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Funnel Common", - "description": "The properties that are shared amongst all versions of the Funnel model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "stages": { - "type": "array", - "items": { - "type": "object", - "properties": { - "stageId": { - "type": "string" - }, - "key": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - } - } - } - }, - "won": { - "type": "object", - "properties": { - "num": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "leads": { - "type": "object", - "properties": { - "num": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "lost": { - "type": "object", - "properties": { - "num": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "recentWon": { - "type": "array", - "items": { - "type": "string" - } - }, - "recentLeads": { - "type": "array", - "items": { - "type": "string" - } - }, - "recentLost": { - "type": "array", - "items": { - "type": "string" - } - }, - "labels": { - "type": "array", - "items": { - "type": "object", - "properties": { - "labelId": { - "type": "string" - }, - "labelName": { - "type": "string" - }, - "labelColor": { - "type": "string" - } - } - } - }, - "preferences": { - "type": "object", - "properties": { - "emails": { - "type": "array", - "items": { - "type": "object" - } - } - } - }, - "customFields": { - "type": "array", - "items": { - "type": "object" - } - } - }, - "x-readme-ref-name": "funnel-common" - } - ], - "x-readme-ref-name": "funnel-output" - } - }, - "examples": { - "response": { - "value": [ - { - "id": "5acb866012d56e00100540e7", - "name": "Marketing funnel", - "stages": [ - { - "stageId": "5acb866012d56e00100540e2", - "key": "leadin", - "name": "Lead In", - "desc": "" - }, - { - "stageId": "5acb866012d56e00100540e3", - "key": "contacted", - "name": "Contacted", - "desc": "" - }, - { - "stageId": "5acb866012d56e00100540e4", - "key": "fitting", - "name": "Fitting", - "desc": "" - }, - { - "stageId": "5acb866012d56e00100540e5", - "key": "proposal", - "name": "Proposal", - "desc": "" - }, - { - "stageId": "5acb866012d56e00100540e6", - "key": "closing", - "name": "Closing", - "desc": "" - } - ], - "won": { - "num": 2, - "value": 3490093 - }, - "leads": { - "num": 1, - "value": 2343546 - }, - "lost": { - "num": 1, - "value": 2334454 - }, - "recentWon": [ - "5acb866f12d56e000a3b0c23", - "5acb86b112d56e00110130b2" - ], - "recentLeads": ["5acb873c12d56e001d137e62"], - "recentLost": ["5acb86e512d56e0016586e32"], - "labels": [ - { - "labelId": "5acb87b312d56e001b10afa3", - "labelName": "Marketing", - "labelColor": "#33ffff" - } - ], - "preferences": { - "emails": [] - }, - "customFields": [] - } - ] - } - } - } - } - } - }, - "tags": ["FUNNELS"], - "description": "Get all your funnels." - }, - "post": { - "operationId": "Create Funnel", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "required": ["name"] - } - } - }, - "x-examples": { - "application/json": { - "name": "New funnel" - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Created", - "id": "5ac4f2cec839ea004e18a463" - } - } - } - } - } - } - }, - "tags": ["FUNNELS"], - "description": "Create a new funnel." - } - }, - "/funnels/{funnelId}": { - "parameters": [ - { - "name": "funnelId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "operationId": "Get Funnel", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "stages": { - "type": "array", - "items": { - "type": "object", - "properties": { - "stageId": { - "type": "string" - }, - "key": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - } - } - } - }, - "won": { - "type": "object", - "properties": { - "num": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "leads": { - "type": "object", - "properties": { - "num": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "lost": { - "type": "object", - "properties": { - "num": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "recentWon": { - "type": "array", - "items": { - "type": "string" - } - }, - "recentLeads": { - "type": "array", - "items": { - "type": "string" - } - }, - "recentLost": { - "type": "array", - "items": { - "type": "string" - } - }, - "labels": { - "type": "array", - "items": { - "type": "object", - "properties": { - "labelId": { - "type": "string" - }, - "labelName": { - "type": "string" - }, - "labelColor": { - "type": "string" - } - } - } - }, - "preferences": { - "type": "object", - "properties": { - "emails": { - "type": "array", - "items": { - "type": "object" - } - } - } - }, - "customFields": { - "type": "array", - "items": { - "type": "object" - } - } - } - }, - "examples": { - "response": { - "value": { - "id": "5acb866012d56e00100540e7", - "name": "Marketing funnel", - "stages": [ - { - "stageId": "5acb866012d56e00100540e2", - "key": "leadin", - "name": "Lead In", - "desc": "" - }, - { - "stageId": "5acb866012d56e00100540e3", - "key": "contacted", - "name": "Contacted", - "desc": "" - }, - { - "stageId": "5acb866012d56e00100540e4", - "key": "fitting", - "name": "Fitting", - "desc": "" - }, - { - "stageId": "5acb866012d56e00100540e5", - "key": "proposal", - "name": "Proposal", - "desc": "" - }, - { - "stageId": "5acb866012d56e00100540e6", - "key": "closing", - "name": "Closing", - "desc": "" - } - ], - "won": { - "num": 2, - "value": 3490093 - }, - "leads": { - "num": 1, - "value": 2343546 - }, - "lost": { - "num": 1, - "value": 2334454 - }, - "recentWon": [ - "5acb866f12d56e000a3b0c23", - "5acb86b112d56e00110130b2" - ], - "recentLeads": ["5acb873c12d56e001d137e62"], - "recentLost": ["5acb86e512d56e0016586e32"], - "labels": [ - { - "labelId": "5acb87b312d56e001b10afa3", - "labelName": "Marketing", - "labelColor": "#33ffff" - } - ], - "preferences": { - "emails": [] - }, - "customFields": [] - } - } - } - } - } - } - }, - "tags": ["FUNNELS"], - "description": "Get a specific funnel." - }, - "put": { - "operationId": "Update Funnel", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "stages": { - "type": "array", - "items": { - "type": "object", - "properties": { - "stageId": { - "type": "string" - }, - "key": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - } - } - } - }, - "labels": { - "type": "array", - "items": { - "type": "object", - "properties": { - "labelId": { - "type": "string" - }, - "labelName": { - "type": "string" - }, - "labelColor": { - "type": "string" - } - } - } - }, - "preferences": { - "type": "object", - "properties": { - "emails": { - "type": "array", - "items": { - "type": "object" - } - } - } - }, - "customFields": { - "type": "array", - "items": { - "type": "object" - } - } - } - } - } - }, - "x-examples": { - "application/json": { - "name": "Marketing funnel", - "stages": [ - { - "stageId": "5acb866012d56e00100540e2", - "key": "leadin", - "name": "Lead In", - "desc": "" - }, - { - "stageId": "5acb866012d56e00100540e3", - "key": "contacted", - "name": "Contacted", - "desc": "" - }, - { - "stageId": "5acb866012d56e00100540e4", - "key": "fitting", - "name": "Fitting", - "desc": "" - } - ], - "labels": [ - { - "labelId": "5acb87b312d56e001b10afa3", - "labelName": "Marketing", - "labelColor": "#33ffff" - } - ], - "preferences": { - "emails": [] - }, - "customFields": [] - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5ac4f2cec839ea004e18a463" - } - } - } - } - } - } - }, - "tags": ["FUNNELS"], - "description": "Update a specific funnel.\n\nOnly the params included in the operation will update the funnel." - }, - "delete": { - "operationId": "Delete Funnel", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" - } - } - } - } - } - } - }, - "tags": ["FUNNELS"], - "description": "Delete a specific funnel." - } - }, - "/leads": { - "get": { - "operationId": "List Leads", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "title": "Lead Basic Output", - "description": "The properties that are included when fetching a list of Leads.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Lead Common", - "description": "The properties that are shared amongst all versions of the Lead model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "funnelId": { - "type": "string" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "person": { - "type": "integer" - }, - "personName": { - "type": "string" - }, - "value": { - "type": "integer" - }, - "potential": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - }, - "stageId": { - "type": "string" - }, - "createdAt": { - "type": "integer" - }, - "updatedAt": { - "type": "integer" - }, - "customFields": { - "type": "array", - "items": { - "type": "object" - } - }, - "status": { - "type": "integer" - }, - "events": { - "type": "array", - "items": { - "type": "object", - "properties": { - "eventId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "title": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "createdAt": { - "type": "integer" - }, - "userId": { - "type": "string" - } - } - } - }, - "tasks": { - "type": "array", - "items": { - "type": "object", - "properties": { - "taskId": { - "type": "string" - }, - "taskName": { - "type": "string" - }, - "taskStatus": { - "type": "integer" - } - } - } - }, - "files": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "x-readme-ref-name": "lead-common" - } - ], - "x-readme-ref-name": "lead-output" - } - }, - "examples": { - "response": { - "value": [ - { - "id": "5ab27cc411aff3003e655fb3", - "userId": "5ab13e373697ac00e305444d", - "funnelId": "5ab13e373697ac00e305333b", - "contactId": "5aaa65e05b706400300ad246", - "contactName": "Gumersindo supply", - "name": "Gumersindo", - "person": 0, - "personName": "", - "value": 48000, - "potential": 100, - "dueDate": 1521646788, - "stageId": "5ab13e373697ac00e3053336", - "createdAt": 1521646788, - "updatedAt": 1521659747, - "customfields": [ - { - "field": "New", - "value": "custom field" - }, - { - "field": "other", - "value": "custom field" - } - ], - "status": 0, - "events": [ - { - "eventId": "5ab2863c11aff300532c40b3", - "type": "note", - "title": "Lunch!", - "desc": "My note", - "createdAt": 1521649212, - "userId": "5a05cc5a60cea100094baf22" - }, - { - "eventId": "5ab294d811aff300587d96c4", - "type": "note", - "title": "Dinner", - "desc": "other event", - "createdAt": 1521652952, - "userId": "" - }, - { - "eventId": "5ab29ba711aff300587d96c5", - "type": "note", - "title": "Skype", - "desc": "with Sindo", - "createdAt": 1521654695, - "userId": "" - } - ], - "tasks": [ - { - "taskId": "5acb8f0112d56e00201fed93", - "taskName": "call", - "taskStatus": 1 - }, - { - "taskId": "5acb8f1212d56e00227196e3", - "taskName": "invite to him a coffee", - "taskStatus": 0 - } - ], - "files": ["config.ini"] - } - ] - } - } - } - } - } - }, - "tags": ["LEADS"], - "description": "Get all your leads." - }, - "post": { - "operationId": "Create Lead", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "funnelId": { - "type": "string" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "value": { - "type": "integer" - }, - "potential": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - }, - "stageId": { - "type": "string", - "description": "Either Stage ID or exact name are accepted. In the latter case, if there are multiple matches the oldest stage created will be selected." - } - } - } - } - }, - "x-examples": { - "application/json": { - "funnelId": "5ab13e373697ac00e305333b", - "contactId": "5aaa65e05b706400300ad246", - "contactName": "Gumersindo supply", - "name": "Gumersindo", - "value": 48000, - "potential": 100, - "dueDate": 1521646788, - "stageId": "5ab13e373697ac00e3053336" - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Created", - "id": "5ac4f2cec839ea004e18a463" - } - } - } - } - } - } - }, - "tags": ["LEADS"], - "description": "Create a new lead." - } - }, - "/leads/{leadId}": { - "parameters": [ - { - "name": "leadId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "operationId": "Get Lead", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "funnelId": { - "type": "string" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "person": { - "type": "integer" - }, - "personName": { - "type": "string" - }, - "value": { - "type": "integer" - }, - "potential": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - }, - "stageId": { - "type": "string" - }, - "createdAt": { - "type": "integer" - }, - "updatedAt": { - "type": "integer" - }, - "customFields": { - "type": "array", - "items": { - "type": "object", - "properties": { - "field": { - "type": "string" - }, - "value": { - "type": "string" - }, - "": { - "type": "string" - } - } - } - }, - "status": { - "type": "integer" - }, - "events": { - "type": "array", - "items": { - "type": "object", - "properties": { - "eventId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "title": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "createdAt": { - "type": "integer" - }, - "userId": { - "type": "string" - } - } - } - }, - "tasks": { - "type": "array", - "items": { - "type": "object", - "properties": { - "taskId": { - "type": "string" - }, - "taskName": { - "type": "string" - }, - "taskStatus": { - "type": "integer" - } - } - } - }, - "files": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "examples": { - "response": { - "value": { - "id": "5ab27cc411aff3003e655fb3", - "userId": "5ab13e373697ac00e305444d", - "funnelId": "5ab13e373697ac00e305333b", - "contactId": "5aaa65e05b706400300ad246", - "contactName": "Gumersindo supply", - "name": "Gumersindo", - "person": 0, - "personName": "", - "value": 48000, - "potential": 100, - "dueDate": 1521646788, - "stageId": "5ab13e373697ac00e3053336", - "createdAt": 1521646788, - "updatedAt": 1521659747, - "customFields": [ - { - "field": "New", - "value": "custom field" - }, - { - "field": "other", - "value": "custom field" - } - ], - "status": 0, - "events": [ - { - "eventId": "5ab2863c11aff300532c40b3", - "type": "note", - "title": "Lunch!", - "desc": "My note", - "createdAt": 1521649212, - "userId": "5a05cc5a60cea100094baf22" - }, - { - "eventId": "5ab294d811aff300587d96c4", - "type": "note", - "title": "Dinner", - "desc": "other event", - "createdAt": 1521652952, - "userId": "" - }, - { - "eventId": "5ab29ba711aff300587d96c5", - "type": "note", - "title": "Skype", - "desc": "with Sindo", - "createdAt": 1521654695, - "userId": "" - } - ], - "tasks": [ - { - "taskId": "5acb8f0112d56e00201fed93", - "taskName": "call", - "taskStatus": 1 - }, - { - "taskId": "5acb8f1212d56e00227196e3", - "taskName": "invite to him a coffee", - "taskStatus": 0 - } - ], - "files": ["config.ini"] - } - } - } - } - } - } - }, - "tags": ["LEADS"], - "description": "Get a specific lead." - }, - "put": { - "operationId": "Update Lead", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - }, - "customFields": { - "type": "array", - "items": { - "type": "object", - "properties": { - "field": { - "type": "string" - }, - "value": { - "type": "string" - } - } - } - }, - "status": { - "type": "integer" - } - } - } - } - }, - "x-examples": { - "application/json": { - "name": "Gumersindo", - "value": 48000, - "dueDate": 1521646788, - "customFields": [ - { - "field": "New", - "value": "custom field" - }, - { - "field": "other", - "value": "custom field" - } - ], - "status": 0 - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5ac4f2cec839ea004e18a463" - } - } - } - } - } - } - }, - "tags": ["LEADS"], - "description": "Update a specific lead.\n\nOnly the params included in the operation will update the lead." - }, - "delete": { - "operationId": "Delete Lead", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" - } - } - } - } - } - } - }, - "tags": ["LEADS"], - "description": "Delete a specific lead." - } - }, - "/leads/{leadId}/notes": { - "post": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Created", - "id": "5ac4f2cec839ea004e18a463" - } - } - } - } - } - } - }, - "operationId": "Create Lead Note", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "desc": { - "type": "string" - } - }, - "required": ["title"] - } - } - }, - "x-examples": { - "application/json": { - "title": "New note", - "desc": "this note is a reminder" - } - } - }, - "tags": ["LEADS"], - "description": "Create a new lead note." - }, - "parameters": [ - { - "name": "leadId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "put": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5ac4f2cec839ea004e18a463" - } - } - } - } - } - } - }, - "operationId": "Update Lead Note", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "noteId": { - "type": "string" - }, - "title": { - "type": "string" - }, - "desc": { - "type": "string" - } - }, - "required": ["noteId"] - } - } - }, - "x-examples": { - "application/json": { - "noteId": "3on4o2h0u2080282bn", - "title": "Meeting", - "desc": "remionder for the meeting" - } - } - }, - "tags": ["LEADS"], - "description": "Update a specific lead note.\n\nOnly the params included in the operation will update the note." - } - }, - "/leads/{leadId}/tasks": { - "post": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Created", - "id": "5ac4f2cec839ea004e18a463" - } - } - } - } - } - } - }, - "operationId": "Create Lead Task", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - } - } - } - }, - "x-examples": { - "application/json": { - "name": "Main task" - } - } - }, - "tags": ["LEADS"], - "description": "Create a new lead task." - }, - "parameters": [ - { - "name": "leadId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "put": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "operationId": "Update Lead Task", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "taskId": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": ["taskId"] - } - } - }, - "x-examples": { - "application/json": { - "taskId": "4hi5o3357840730857h", - "name": "new task name" - } - } - }, - "tags": ["LEADS"], - "description": "Update a specific lead task.\n\nOnly the params included in the operation will update the task." - }, - "delete": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" - } - } - } - } - } - } - }, - "operationId": "Delete Lead Task", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "taskId": { - "type": "string" - } - }, - "required": ["taskId"] - } - } - }, - "x-examples": { - "application/json": { - "taskId": "5aba68b1c5d438006425ad45" - } - } - }, - "tags": ["LEADS"], - "description": "Delete a specific lead task." - } - }, - "/leads/{leadId}/dates": { - "put": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5ac4f2cec839ea004e18a463" - } - } - } - } - } - } - }, - "operationId": "Update Lead Creation Date", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "date": { - "type": "integer" - } - } - } - } - }, - "x-examples": { - "application/json": { - "date": 11523287868 - } - } - }, - "tags": ["LEADS"], - "description": "Update a specific lead creation's date." - }, - "parameters": [ - { - "name": "leadId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "/leads/{leadId}/stages": { - "put": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5ac4f2cec839ea004e18a463" - } - } - } - } - } - } - }, - "operationId": "Update Lead Stage", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "stageId": { - "type": "string", - "description": "Either Stage ID or exact name are accepted. In the latter case, if there are multiple matches the oldest stage created will be selected." - } - } - } - } - }, - "x-examples": { - "application/json": { - "stageId": "5ac4f2cec839ea004e18a463" - } - } - }, - "tags": ["LEADS"], - "description": "Update a specific lead stage." - }, - "parameters": [ - { - "name": "leadId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "/events": { - "get": { - "operationId": "List Events", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "title": "Event Basic Output", - "description": "The properties that are included when fetching a list of Events.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Event Common", - "description": "The properties that are shared amongst all versions of the Event model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "startDate": { - "type": "integer" - }, - "endDate": { - "type": "integer" - }, - "status": { - "type": "integer" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "locationDesc": { - "type": "string" - }, - "leadId": { - "type": "string" - }, - "funnelId": { - "type": "string" - } - }, - "x-readme-ref-name": "event-common" - } - ], - "x-readme-ref-name": "event-output" - } - }, - "examples": { - "response": { - "value": [ - { - "id": "5ab11f1a3697ac00cd0a6423", - "name": "Coffe with P", - "contactId": "5ab11f1a3697ac00cd0a6423", - "contactName": "Patrick", - "kind": "coffee", - "desc": "meeting tot alk about the incoming events", - "startDate": 1522228026, - "endDate": 15222229430, - "status": 0, - "tags": ["tig", "tag"], - "locationDesc": "c/ Llacuna, 12", - "leadId": "5acb873c12d56e001d137e62", - "funnelId": "5acb866012d56e00100540e7" - }, - { - "id": "5ab13ab03697ac00e3053333", - "name": "Dinner with P", - "contactId": "", - "contactName": null, - "kind": "dinner", - "desc": null, - "startDate": 1521564336, - "endDate": 3043132272, - "status": 0, - "tags": [], - "locationDesc": null - } - ] - } - } - } - } - } - }, - "tags": ["EVENTS"], - "description": "Get all your events." - }, - "post": { - "operationId": "Create Event", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "startDate": { - "type": "integer" - }, - "duration": { - "type": "integer" - }, - "status": { - "type": "integer" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "locationDesc": { - "type": "string" - }, - "leadId": { - "type": "string" - }, - "funnelId": { - "type": "string" - }, - "userId": { - "type": "string" - } - } - } - } - }, - "x-examples": { - "application/json": { - "name": "Coffe with P", - "contactId": "5ab11f1a3697ac00cd0a6423", - "contactName": "Patrick", - "kind": "coffee", - "desc": "meeting to talk about the incoming events", - "startDate": 1522228026, - "duration": 3600, - "status": 0, - "tags": ["tig", "tag"], - "locationDesc": "c/ Llacuna, 12", - "leadId": "5acb873c12d56e001d137e62", - "funnelId": "5acb866012d56e00100540e7" - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Created", - "id": "5ac4f2cec839ea004e18a463" - } - } - } - } - } - } - }, - "tags": ["EVENTS"], - "description": "Create a new event." - } - }, - "/events/{eventId}": { - "parameters": [ - { - "name": "eventId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "operationId": "Get Event", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "title": "Event Detailed Output", - "description": "The properties that are included when fetching a single Event.", - "allOf": [ - { - "title": "Event Basic Output", - "description": "The properties that are included when fetching a list of Events.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Event Common", - "description": "The properties that are shared amongst all versions of the Event model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "startDate": { - "type": "integer" - }, - "endDate": { - "type": "integer" - }, - "status": { - "type": "integer" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "locationDesc": { - "type": "string" - }, - "leadId": { - "type": "string" - }, - "funnelId": { - "type": "string" - } - }, - "x-readme-ref-name": "event-common" - } - ], - "x-readme-ref-name": "event-output" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "event-output-detailed" - }, - "examples": { - "response": { - "value": { - "id": "5ab11f1a3697ac00cd0a6423", - "name": "Coffe with P", - "contactId": "5ab11f1a3697ac00cd0a6423", - "contactName": "Patrick", - "kind": "coffee", - "desc": "meeting tot alk about the incoming events", - "startDate": 1522228026, - "endDate": 15222229430, - "status": 0, - "tags": ["tig", "tag"], - "locationDesc": "c/ Llacuna, 12", - "leadId": "5acb873c12d56e001d137e62", - "funnelId": "5acb866012d56e00100540e7" - } - } - } - } - } - } - }, - "tags": ["EVENTS"], - "description": "Get a specific event." - }, - "put": { - "operationId": "Update Event", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "startDate": { - "type": "integer" - }, - "duration": { - "type": "integer" - }, - "status": { - "type": "integer" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "locationDesc": { - "type": "string" - }, - "leadId": { - "type": "string" - }, - "funnelId": { - "type": "string" - }, - "userId": { - "type": "string" - } - } - } - } - }, - "x-examples": { - "application/json": { - "name": "Coffe with Patrick", - "contactId": "5ab11f1a3697ac00cd0a6423", - "contactName": "Patrick", - "kind": "coffee", - "desc": "meeting to talk about the incoming events", - "startDate": 1522228026, - "duration": 3600, - "status": 0, - "tags": ["tig", "tag"], - "locationDesc": "c/ Llacuna, 12", - "leadId": "5acb873c12d56e001d137e62", - "funnelId": "5acb866012d56e00100540e7" - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5ac4f2cec839ea004e18a463" - } - } - } - } - } - } - }, - "tags": ["EVENTS"], - "description": "Update a specific event.\n\nOnly the params included in the operation will update the event." - }, - "delete": { - "operationId": "Delete Event", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" - } - } - } - } - } - } - }, - "tags": ["EVENTS"], - "description": "Delete a specific event." - } - }, - "/bookings/locations": { - "get": { - "operationId": "List Locations", - "responses": { - "200": { - "description": "List of account locations", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "title": "Location Basic Output", - "description": "The properties that are included when fetching a list of Locations.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Location Common", - "description": "The properties that are shared amongst all versions of the Location model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "availableServices": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "x-readme-ref-name": "location-common" - } - ], - "x-readme-ref-name": "location-output" - } - }, - "examples": { - "response": { - "value": [ - { - "id": "5ab11f1a3697ac00cd0a6423", - "name": "Tienda en Girona", - "description": "Lorem ipsum dolor sit amet.", - "active": true, - "availableServices": [ - "67167a61f7ce326e820ab569", - "67167a61f7ce326e820ab568" - ] - }, - { - "id": "5ab11f1a3697ac00cd0a6424", - "name": "Tienda en Barcelona", - "description": "Lorem ipsum dolor sit amet.", - "active": false, - "availableServices": [] - } - ] - } - } - } - } - } - }, - "tags": ["BOOKINGS"], - "description": "Get all your locations." - } - }, - "/bookings/locations/{locationId}/slots": { - "parameters": [ - { - "name": "locationId", - "in": "path", - "required": true, - "description": "Specific location ID", - "schema": { - "type": "string" - } - }, - { - "name": "serviceId", - "in": "query", - "required": true, - "description": "Specific service ID", - "schema": { - "type": "string" - } - }, - { - "name": "day", - "in": "query", - "required": true, - "description": "Specific day (yyyy-mm-dd)", - "schema": { - "type": "string" - } - } - ], - "get": { - "operationId": "Get available slots for location", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "title": "Booking Slot Common", - "description": "Definition of a Slot object.", - "type": "object", - "properties": { - "dateTime": { - "type": "integer" - }, - "from": { - "type": "string" - }, - "to": { - "type": "string" - }, - "duration": { - "type": "integer" - } - }, - "x-readme-ref-name": "booking-slot" - } - }, - "examples": { - "response": { - "value": [ - { - "dateTime": 1732615200, - "from": "2024-11-26T10:00:00+00:00", - "to": "2024-11-26T10:30:00+00:00", - "duration": 1800 - }, - { - "dateTime": 1732616100, - "from": "2024-11-26T10:15:00+00:00", - "to": "2024-11-26T10:45:00+00:00", - "duration": 1800 - }, - { - "dateTime": 1732617000, - "from": "2024-11-26T10:30:00+00:00", - "to": "2024-11-26T11:00:00+00:00", - "duration": 1800 - } - ] - } - } - } - } - } - }, - "tags": ["BOOKINGS"], - "description": "Get a list of available time slots for a location, specifying a service and a date." - } - }, - "/bookings": { - "get": { - "operationId": "List Bookings", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "title": "Booking Basic Output", - "description": "The properties that are included when fetching a list of Booking.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Booking Common", - "description": "The properties that are shared amongst all versions of the Booking model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "startTime": { - "type": "integer" - }, - "endTime": { - "type": "integer" - }, - "duration": { - "type": "integer" - }, - "createdAt": { - "type": "integer" - }, - "updatedAt": { - "type": "integer" - }, - "status": { - "type": "string" - }, - "service": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "duration": { - "type": "integer" - }, - "subtotal": { - "type": "object", - "properties": { - "amount": { - "type": "number" - }, - "currency": { - "type": "string" - } - } - }, - "total": { - "type": "object", - "properties": { - "amount": { - "type": "number" - }, - "currency": { - "type": "string" - } - } - } - } - }, - "space": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - } - }, - "outcome": { - "type": "object", - "properties": { - "documentId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "exportedAt": { - "type": "integer" - } - } - }, - "customFieldsValues": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "label": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - } - } - } - }, - "x-readme-ref-name": "booking-common" - } - ], - "x-readme-ref-name": "booking-output" - } - }, - "examples": { - "response": { - "value": [ - { - "id": "5ab11f1a3697ac00cd0a6423", - "startTime": 1726124400, - "endTime": 1726125900, - "duration": 1500, - "createdAt": 1725619450, - "updatedAt": 1725619450, - "status": "confirmed", - "service": [ - { - "id": "66704f4a0ace9fc5e30078b5", - "name": "Planchado", - "description": "Planchado de pelo", - "duration": 1500, - "subtotal": [ - { - "amount": 2.48, - "currency": "EUR" - } - ], - "total": [ - { - "amount": 3, - "currency": "EUR" - } - ] - } - ], - "space": [ - { - "id": "66ac8cab99b9e2b2310bdd66", - "name": "Sala 1A" - } - ], - "outcome": [ - { - "documentId": "6717b925f2753f36670594a6", - "type": "salesreceipt", - "exportedAt": 1729607974 - } - ], - "customFields": [ - { - "key": "name", - "label": "Nombre", - "type": "text", - "value": "Jon Snow" - }, - { - "key": "email", - "label": "E-mail", - "type": "email", - "value": "jon.snow@somemail.com" - } - ] - }, - { - "id": "5ab11f1a3697ac00cd0a6422", - "startTime": 1726124400, - "endTime": 1726125900, - "duration": 1500, - "createdAt": 1725619450, - "updatedAt": 1725619450, - "status": "confirmed", - "service": [ - { - "id": "66704f4a0ace9fc5e30078b6", - "name": "Corte", - "description": "Corte de pelo", - "duration": 1500, - "subtotal": [ - { - "amount": 2.48, - "currency": "EUR" - } - ], - "total": [ - { - "amount": 3, - "currency": "EUR" - } - ] - } - ], - "space": [ - { - "id": "66ac8cab99b9e2b2310bdd67", - "name": "Sala 1B" - } - ], - "outcome": [ - { - "documentId": "6717b925f2753f36670594a7", - "type": "salesreceipt", - "exportedAt": 1729607974 - } - ], - "customFields": [ - { - "key": "name", - "label": "Nombre", - "type": "text", - "value": "Arya Stark" - }, - { - "key": "email", - "label": "E-mail", - "type": "email", - "value": "arya.stark@somemail.com" - } - ] - } - ] - } - } - } - } - } - }, - "tags": ["BOOKINGS"], - "description": "Get all your bookings." - }, - "post": { - "operationId": "Create Booking", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "locationId": { - "type": "string" - }, - "serviceId": { - "type": "string" - }, - "dateTime": { - "type": "integer" - }, - "timezone": { - "type": "string" - }, - "language": { - "type": "string" - }, - "customFields": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "string" - } - } - } - } - }, - "required": [ - "locationId", - "serviceId", - "dateTime", - "timezone", - "language", - "customFields" - ] - } - } - }, - "x-examples": { - "application/json": { - "locationId": "6710e0b21ab397666906c6f4", - "serviceId": "66704f4a0ace9fc5e30078b5", - "dateTime": 1730109600, - "timezone": "Europe/Luxembourg", - "language": "es", - "customFields": [ - { - "key": "name", - "value": "Jon Snow" - }, - { - "key": "email", - "value": "jon.snow@somemail.com" - } - ] - } - } - }, - "responses": { - "201": { - "description": "Booking created successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "id": { - "type": "string" - } - } - } - } - } - }, - "410": { - "description": "Unavailable time slot", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - } - } - } - } - } - } - }, - "tags": ["BOOKINGS"], - "description": "Create new booking." - } - }, - "/bookings/{bookingId}": { - "parameters": [ - { - "name": "bookingId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "operationId": "Get Booking", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "title": "Booking Detailed Output", - "description": "The properties that are included when fetching a single Booking.", - "allOf": [ - { - "title": "Booking Basic Output", - "description": "The properties that are included when fetching a list of Booking.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Booking Common", - "description": "The properties that are shared amongst all versions of the Booking model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "startTime": { - "type": "integer" - }, - "endTime": { - "type": "integer" - }, - "duration": { - "type": "integer" - }, - "createdAt": { - "type": "integer" - }, - "updatedAt": { - "type": "integer" - }, - "status": { - "type": "string" - }, - "service": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "duration": { - "type": "integer" - }, - "subtotal": { - "type": "object", - "properties": { - "amount": { - "type": "number" - }, - "currency": { - "type": "string" - } - } - }, - "total": { - "type": "object", - "properties": { - "amount": { - "type": "number" - }, - "currency": { - "type": "string" - } - } - } - } - }, - "space": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - } - }, - "outcome": { - "type": "object", - "properties": { - "documentId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "exportedAt": { - "type": "integer" - } - } - }, - "customFieldsValues": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "label": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - } - } - } - }, - "x-readme-ref-name": "booking-common" - } - ], - "x-readme-ref-name": "booking-output" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "booking-output-detailed" - }, - "examples": { - "response": { - "value": null - } - } - }, - "id": { - "examples": { - "response": { - "value": "5ab11f1a3697ac00cd0a6423" - } - } - } - } - } - }, - "tags": ["BOOKINGS"], - "description": "Get a specific booking." - }, - "put": { - "operationId": "Update Booking", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "dateTime": { - "type": "integer" - }, - "customFields": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "id": "5ac4f2cec839ea004e18a463" - } - } - } - } - } - } - }, - "tags": ["BOOKINGS"], - "description": "Update a specific booking.\n\nOnly the params included in the operation will update the booking." - }, - "delete": { - "operationId": "Cancel Booking", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Booking canceled", - "id": "5aba68b1c5d438006425ad45" - } - } - } - } - } - } - }, - "tags": ["BOOKINGS"], - "description": "Cancel a specific booking." - } - } - }, - "tags": [ - { - "name": "FUNNELS" - }, - { - "name": "LEADS" - }, - { - "name": "EVENTS" - }, - { - "name": "LOCATIONS" - }, - { - "name": "BOOKINGS" - } - ], - "security": [ - { - "Auth": [] - } - ], - "servers": [ - { - "url": "https://api.holded.com/api/crm/v1" - } - ], - "components": { - "responses": { - "Standard_Error": { - "description": "Something went wrong", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 0, - "info": "Not found" - } - } - } - } - } - } - }, - "securitySchemes": { - "Auth": { - "type": "apiKey", - "name": "key", - "in": "header" - } - }, - "schemas": { - "funnel-common": { - "title": "Funnel Common", - "description": "The properties that are shared amongst all versions of the Funnel model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "stages": { - "type": "array", - "items": { - "type": "object", - "properties": { - "stageId": { - "type": "string" - }, - "key": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - } - } - } - }, - "won": { - "type": "object", - "properties": { - "num": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "leads": { - "type": "object", - "properties": { - "num": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "lost": { - "type": "object", - "properties": { - "num": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "recentWon": { - "type": "array", - "items": { - "type": "string" - } - }, - "recentLeads": { - "type": "array", - "items": { - "type": "string" - } - }, - "recentLost": { - "type": "array", - "items": { - "type": "string" - } - }, - "labels": { - "type": "array", - "items": { - "type": "object", - "properties": { - "labelId": { - "type": "string" - }, - "labelName": { - "type": "string" - }, - "labelColor": { - "type": "string" - } - } - } - }, - "preferences": { - "type": "object", - "properties": { - "emails": { - "type": "array", - "items": { - "type": "object" - } - } - } - }, - "customFields": { - "type": "array", - "items": { - "type": "object" - } - } - }, - "x-readme-ref-name": "funnel-common" - }, - "funnel-input": { - "title": "Funnel Input", - "description": "The properties that are allowed when creating or updating a Funnel.", - "allOf": [ - { - "title": "Funnel Common", - "description": "The properties that are shared amongst all versions of the Funnel model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "stages": { - "type": "array", - "items": { - "type": "object", - "properties": { - "stageId": { - "type": "string" - }, - "key": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - } - } - } - }, - "won": { - "type": "object", - "properties": { - "num": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "leads": { - "type": "object", - "properties": { - "num": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "lost": { - "type": "object", - "properties": { - "num": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "recentWon": { - "type": "array", - "items": { - "type": "string" - } - }, - "recentLeads": { - "type": "array", - "items": { - "type": "string" - } - }, - "recentLost": { - "type": "array", - "items": { - "type": "string" - } - }, - "labels": { - "type": "array", - "items": { - "type": "object", - "properties": { - "labelId": { - "type": "string" - }, - "labelName": { - "type": "string" - }, - "labelColor": { - "type": "string" - } - } - } - }, - "preferences": { - "type": "object", - "properties": { - "emails": { - "type": "array", - "items": { - "type": "object" - } - } - } - }, - "customFields": { - "type": "array", - "items": { - "type": "object" - } - } - }, - "x-readme-ref-name": "funnel-common" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "funnel-input" - }, - "funnel-output": { - "title": "Funnel Basic Output", - "description": "The properties that are included when fetching a list of Funnels.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Funnel Common", - "description": "The properties that are shared amongst all versions of the Funnel model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "stages": { - "type": "array", - "items": { - "type": "object", - "properties": { - "stageId": { - "type": "string" - }, - "key": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - } - } - } - }, - "won": { - "type": "object", - "properties": { - "num": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "leads": { - "type": "object", - "properties": { - "num": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "lost": { - "type": "object", - "properties": { - "num": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "recentWon": { - "type": "array", - "items": { - "type": "string" - } - }, - "recentLeads": { - "type": "array", - "items": { - "type": "string" - } - }, - "recentLost": { - "type": "array", - "items": { - "type": "string" - } - }, - "labels": { - "type": "array", - "items": { - "type": "object", - "properties": { - "labelId": { - "type": "string" - }, - "labelName": { - "type": "string" - }, - "labelColor": { - "type": "string" - } - } - } - }, - "preferences": { - "type": "object", - "properties": { - "emails": { - "type": "array", - "items": { - "type": "object" - } - } - } - }, - "customFields": { - "type": "array", - "items": { - "type": "object" - } - } - }, - "x-readme-ref-name": "funnel-common" - } - ], - "x-readme-ref-name": "funnel-output" - }, - "funnel-output-detailed": { - "title": "Funnel Detailed Output", - "description": "The properties that are included when fetching a single Funnel.", - "allOf": [ - { - "title": "Funnel Basic Output", - "description": "The properties that are included when fetching a list of Funnels.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Funnel Common", - "description": "The properties that are shared amongst all versions of the Funnel model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "stages": { - "type": "array", - "items": { - "type": "object", - "properties": { - "stageId": { - "type": "string" - }, - "key": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - } - } - } - }, - "won": { - "type": "object", - "properties": { - "num": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "leads": { - "type": "object", - "properties": { - "num": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "lost": { - "type": "object", - "properties": { - "num": { - "type": "integer" - }, - "value": { - "type": "integer" - } - } - }, - "recentWon": { - "type": "array", - "items": { - "type": "string" - } - }, - "recentLeads": { - "type": "array", - "items": { - "type": "string" - } - }, - "recentLost": { - "type": "array", - "items": { - "type": "string" - } - }, - "labels": { - "type": "array", - "items": { - "type": "object", - "properties": { - "labelId": { - "type": "string" - }, - "labelName": { - "type": "string" - }, - "labelColor": { - "type": "string" - } - } - } - }, - "preferences": { - "type": "object", - "properties": { - "emails": { - "type": "array", - "items": { - "type": "object" - } - } - } - }, - "customFields": { - "type": "array", - "items": { - "type": "object" - } - } - }, - "x-readme-ref-name": "funnel-common" - } - ], - "x-readme-ref-name": "funnel-output" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "funnel-output-detailed" - }, - "lead-common": { - "title": "Lead Common", - "description": "The properties that are shared amongst all versions of the Lead model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "funnelId": { - "type": "string" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "person": { - "type": "integer" - }, - "personName": { - "type": "string" - }, - "value": { - "type": "integer" - }, - "potential": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - }, - "stageId": { - "type": "string" - }, - "createdAt": { - "type": "integer" - }, - "updatedAt": { - "type": "integer" - }, - "customFields": { - "type": "array", - "items": { - "type": "object" - } - }, - "status": { - "type": "integer" - }, - "events": { - "type": "array", - "items": { - "type": "object", - "properties": { - "eventId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "title": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "createdAt": { - "type": "integer" - }, - "userId": { - "type": "string" - } - } - } - }, - "tasks": { - "type": "array", - "items": { - "type": "object", - "properties": { - "taskId": { - "type": "string" - }, - "taskName": { - "type": "string" - }, - "taskStatus": { - "type": "integer" - } - } - } - }, - "files": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "x-readme-ref-name": "lead-common" - }, - "lead-input": { - "title": "Lead Input", - "description": "The properties that are allowed when creating or updating a Lead.", - "allOf": [ - { - "title": "Lead Common", - "description": "The properties that are shared amongst all versions of the Lead model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "funnelId": { - "type": "string" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "person": { - "type": "integer" - }, - "personName": { - "type": "string" - }, - "value": { - "type": "integer" - }, - "potential": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - }, - "stageId": { - "type": "string" - }, - "createdAt": { - "type": "integer" - }, - "updatedAt": { - "type": "integer" - }, - "customFields": { - "type": "array", - "items": { - "type": "object" - } - }, - "status": { - "type": "integer" - }, - "events": { - "type": "array", - "items": { - "type": "object", - "properties": { - "eventId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "title": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "createdAt": { - "type": "integer" - }, - "userId": { - "type": "string" - } - } - } - }, - "tasks": { - "type": "array", - "items": { - "type": "object", - "properties": { - "taskId": { - "type": "string" - }, - "taskName": { - "type": "string" - }, - "taskStatus": { - "type": "integer" - } - } - } - }, - "files": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "x-readme-ref-name": "lead-common" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "lead-input" - }, - "lead-output": { - "title": "Lead Basic Output", - "description": "The properties that are included when fetching a list of Leads.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Lead Common", - "description": "The properties that are shared amongst all versions of the Lead model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "funnelId": { - "type": "string" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "person": { - "type": "integer" - }, - "personName": { - "type": "string" - }, - "value": { - "type": "integer" - }, - "potential": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - }, - "stageId": { - "type": "string" - }, - "createdAt": { - "type": "integer" - }, - "updatedAt": { - "type": "integer" - }, - "customFields": { - "type": "array", - "items": { - "type": "object" - } - }, - "status": { - "type": "integer" - }, - "events": { - "type": "array", - "items": { - "type": "object", - "properties": { - "eventId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "title": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "createdAt": { - "type": "integer" - }, - "userId": { - "type": "string" - } - } - } - }, - "tasks": { - "type": "array", - "items": { - "type": "object", - "properties": { - "taskId": { - "type": "string" - }, - "taskName": { - "type": "string" - }, - "taskStatus": { - "type": "integer" - } - } - } - }, - "files": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "x-readme-ref-name": "lead-common" - } - ], - "x-readme-ref-name": "lead-output" - }, - "lead-output-detailed": { - "title": "Lead Detailed Output", - "description": "The properties that are included when fetching a single Lead.", - "allOf": [ - { - "title": "Lead Basic Output", - "description": "The properties that are included when fetching a list of Leads.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Lead Common", - "description": "The properties that are shared amongst all versions of the Lead model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "funnelId": { - "type": "string" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "person": { - "type": "integer" - }, - "personName": { - "type": "string" - }, - "value": { - "type": "integer" - }, - "potential": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - }, - "stageId": { - "type": "string" - }, - "createdAt": { - "type": "integer" - }, - "updatedAt": { - "type": "integer" - }, - "customFields": { - "type": "array", - "items": { - "type": "object" - } - }, - "status": { - "type": "integer" - }, - "events": { - "type": "array", - "items": { - "type": "object", - "properties": { - "eventId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "title": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "createdAt": { - "type": "integer" - }, - "userId": { - "type": "string" - } - } - } - }, - "tasks": { - "type": "array", - "items": { - "type": "object", - "properties": { - "taskId": { - "type": "string" - }, - "taskName": { - "type": "string" - }, - "taskStatus": { - "type": "integer" - } - } - } - }, - "files": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "x-readme-ref-name": "lead-common" - } - ], - "x-readme-ref-name": "lead-output" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "lead-output-detailed" - }, - "event-common": { - "title": "Event Common", - "description": "The properties that are shared amongst all versions of the Event model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "startDate": { - "type": "integer" - }, - "endDate": { - "type": "integer" - }, - "status": { - "type": "integer" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "locationDesc": { - "type": "string" - }, - "leadId": { - "type": "string" - }, - "funnelId": { - "type": "string" - } - }, - "x-readme-ref-name": "event-common" - }, - "event-input": { - "title": "Event Input", - "description": "The properties that are allowed when creating or updating a Event.", - "allOf": [ - { - "title": "Event Common", - "description": "The properties that are shared amongst all versions of the Event model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "startDate": { - "type": "integer" - }, - "endDate": { - "type": "integer" - }, - "status": { - "type": "integer" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "locationDesc": { - "type": "string" - }, - "leadId": { - "type": "string" - }, - "funnelId": { - "type": "string" - } - }, - "x-readme-ref-name": "event-common" - }, - { - "type": "object", - "properties": { - "userId": { - "type": "string" - } - } - } - ], - "x-readme-ref-name": "event-input" - }, - "event-output": { - "title": "Event Basic Output", - "description": "The properties that are included when fetching a list of Events.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Event Common", - "description": "The properties that are shared amongst all versions of the Event model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "startDate": { - "type": "integer" - }, - "endDate": { - "type": "integer" - }, - "status": { - "type": "integer" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "locationDesc": { - "type": "string" - }, - "leadId": { - "type": "string" - }, - "funnelId": { - "type": "string" - } - }, - "x-readme-ref-name": "event-common" - } - ], - "x-readme-ref-name": "event-output" - }, - "event-output-detailed": { - "title": "Event Detailed Output", - "description": "The properties that are included when fetching a single Event.", - "allOf": [ - { - "title": "Event Basic Output", - "description": "The properties that are included when fetching a list of Events.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Event Common", - "description": "The properties that are shared amongst all versions of the Event model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "startDate": { - "type": "integer" - }, - "endDate": { - "type": "integer" - }, - "status": { - "type": "integer" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "locationDesc": { - "type": "string" - }, - "leadId": { - "type": "string" - }, - "funnelId": { - "type": "string" - } - }, - "x-readme-ref-name": "event-common" - } - ], - "x-readme-ref-name": "event-output" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "event-output-detailed" - }, - "location-common": { - "title": "Location Common", - "description": "The properties that are shared amongst all versions of the Location model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "availableServices": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "x-readme-ref-name": "location-common" - }, - "location-output": { - "title": "Location Basic Output", - "description": "The properties that are included when fetching a list of Locations.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Location Common", - "description": "The properties that are shared amongst all versions of the Location model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "availableServices": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "x-readme-ref-name": "location-common" - } - ], - "x-readme-ref-name": "location-output" - }, - "booking-common": { - "title": "Booking Common", - "description": "The properties that are shared amongst all versions of the Booking model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "startTime": { - "type": "integer" - }, - "endTime": { - "type": "integer" - }, - "duration": { - "type": "integer" - }, - "createdAt": { - "type": "integer" - }, - "updatedAt": { - "type": "integer" - }, - "status": { - "type": "string" - }, - "service": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "duration": { - "type": "integer" - }, - "subtotal": { - "type": "object", - "properties": { - "amount": { - "type": "number" - }, - "currency": { - "type": "string" - } - } - }, - "total": { - "type": "object", - "properties": { - "amount": { - "type": "number" - }, - "currency": { - "type": "string" - } - } - } - } - }, - "space": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - } - }, - "outcome": { - "type": "object", - "properties": { - "documentId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "exportedAt": { - "type": "integer" - } - } - }, - "customFieldsValues": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "label": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - } - } - } - }, - "x-readme-ref-name": "booking-common" - }, - "booking-slot": { - "title": "Booking Slot Common", - "description": "Definition of a Slot object.", - "type": "object", - "properties": { - "dateTime": { - "type": "integer" - }, - "from": { - "type": "string" - }, - "to": { - "type": "string" - }, - "duration": { - "type": "integer" - } - }, - "x-readme-ref-name": "booking-slot" - }, - "booking-output": { - "title": "Booking Basic Output", - "description": "The properties that are included when fetching a list of Booking.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Booking Common", - "description": "The properties that are shared amongst all versions of the Booking model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "startTime": { - "type": "integer" - }, - "endTime": { - "type": "integer" - }, - "duration": { - "type": "integer" - }, - "createdAt": { - "type": "integer" - }, - "updatedAt": { - "type": "integer" - }, - "status": { - "type": "string" - }, - "service": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "duration": { - "type": "integer" - }, - "subtotal": { - "type": "object", - "properties": { - "amount": { - "type": "number" - }, - "currency": { - "type": "string" - } - } - }, - "total": { - "type": "object", - "properties": { - "amount": { - "type": "number" - }, - "currency": { - "type": "string" - } - } - } - } - }, - "space": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - } - }, - "outcome": { - "type": "object", - "properties": { - "documentId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "exportedAt": { - "type": "integer" - } - } - }, - "customFieldsValues": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "label": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - } - } - } - }, - "x-readme-ref-name": "booking-common" - } - ], - "x-readme-ref-name": "booking-output" - }, - "booking-output-detailed": { - "title": "Booking Detailed Output", - "description": "The properties that are included when fetching a single Booking.", - "allOf": [ - { - "title": "Booking Basic Output", - "description": "The properties that are included when fetching a list of Booking.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Booking Common", - "description": "The properties that are shared amongst all versions of the Booking model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "startTime": { - "type": "integer" - }, - "endTime": { - "type": "integer" - }, - "duration": { - "type": "integer" - }, - "createdAt": { - "type": "integer" - }, - "updatedAt": { - "type": "integer" - }, - "status": { - "type": "string" - }, - "service": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "duration": { - "type": "integer" - }, - "subtotal": { - "type": "object", - "properties": { - "amount": { - "type": "number" - }, - "currency": { - "type": "string" - } - } - }, - "total": { - "type": "object", - "properties": { - "amount": { - "type": "number" - }, - "currency": { - "type": "string" - } - } - } - } - }, - "space": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - } - }, - "outcome": { - "type": "object", - "properties": { - "documentId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "exportedAt": { - "type": "integer" - } - } - }, - "customFieldsValues": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "label": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - } - } - } - }, - "x-readme-ref-name": "booking-common" - } - ], - "x-readme-ref-name": "booking-output" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "booking-output-detailed" - }, - "booking-available-slots": { - "title": "Booking Detailed Output", - "description": "The properties that are included when fetching a single Booking.", - "allOf": [ - { - "title": "Booking Basic Output", - "description": "The properties that are included when fetching a list of Booking.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Booking Common", - "description": "The properties that are shared amongst all versions of the Booking model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "startTime": { - "type": "integer" - }, - "endTime": { - "type": "integer" - }, - "duration": { - "type": "integer" - }, - "createdAt": { - "type": "integer" - }, - "updatedAt": { - "type": "integer" - }, - "status": { - "type": "string" - }, - "service": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "duration": { - "type": "integer" - }, - "subtotal": { - "type": "object", - "properties": { - "amount": { - "type": "number" - }, - "currency": { - "type": "string" - } - } - }, - "total": { - "type": "object", - "properties": { - "amount": { - "type": "number" - }, - "currency": { - "type": "string" - } - } - } - } - }, - "space": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - } - }, - "outcome": { - "type": "object", - "properties": { - "documentId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "exportedAt": { - "type": "integer" - } - } - }, - "customFieldsValues": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "label": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - } - } - } - }, - "x-readme-ref-name": "booking-common" - } - ], - "x-readme-ref-name": "booking-output" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "booking-available-slots" - } - } - }, - "x-readme": { - "explorer-enabled": true, - "proxy-enabled": true - } -} diff --git a/forms-bridge/addons/holded/data/swagger/invoicing.json b/forms-bridge/addons/holded/data/swagger/invoicing.json deleted file mode 100644 index 780a0cf1..00000000 --- a/forms-bridge/addons/holded/data/swagger/invoicing.json +++ /dev/null @@ -1,9531 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "title": "Invoice API", - "version": "1.4", - "description": "The Holded's Invoicing API is organized around REST, using HTTP responses code to keep you informed about what's going on. Our endpoints will returns you metada in JSON format directly from Holded." - }, - "x-samples-languages": ["curl", "node", "ruby", "python"], - "paths": { - "/contacts": { - "get": { - "operationId": "List Contacts", - "parameters": [ - { - "name": "phone", - "in": "query", - "required": false, - "description": "Must be an exact match, including special characters like \"+\", \"#\", and \"-\".", - "schema": { - "type": "string" - } - }, - { - "name": "mobile", - "in": "query", - "required": false, - "description": "Must be an exact match, including special characters like \"+\", \"#\", and \"-\".", - "schema": { - "type": "string" - } - }, - { - "name": "customId", - "in": "query", - "required": false, - "description": "Return only the contacts that matches with the provided customId", - "style": "form", - "explode": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "customId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "code": { - "type": "string" - }, - "tradeName": { - "type": "string" - }, - "email": { - "type": "string" - }, - "mobile": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "type": { - "type": "string" - }, - "iban": { - "type": "string" - }, - "swift": { - "type": "string" - }, - "clientRecord": { - "type": "integer" - }, - "supplierRecord": { - "type": "integer" - }, - "billAddress": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "integer" - }, - "province": { - "type": "string" - }, - "country": { - "type": "string" - }, - "countryCode": { - "type": "string" - }, - "info": { - "type": "string" - } - } - }, - "defaults": { - "type": "object", - "properties": { - "salesChannel": { - "type": "integer" - }, - "expensesAccount": { - "type": "integer" - }, - "dueDays": { - "type": "integer" - }, - "paymentMethod": { - "type": "integer" - }, - "discount": { - "type": "integer" - }, - "language": { - "type": "string" - }, - "currency": { - "type": "string" - }, - "tax": { - "type": "string" - }, - "retention": { - "type": "string" - } - } - }, - "socialNetworks": { - "type": "object", - "properties": { - "website": { - "type": "string" - } - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "notes": { - "type": "array", - "items": { - "type": "object", - "properties": { - "noteId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "color": { - "type": "string" - }, - "updatedAt": { - "type": "integer" - }, - "userId": { - "type": "string" - } - } - } - }, - "contactPersons": { - "type": "array", - "items": { - "type": "object", - "properties": { - "personId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "job": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "email": { - "type": "string" - }, - "sendDocumentsByDefault": { - "type": "boolean" - }, - "linkedin": { - "type": "string" - } - } - } - }, - "shippingAddresses": { - "type": "array", - "items": { - "type": "object", - "properties": { - "shippingId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "integer" - }, - "province": { - "type": "string" - }, - "country": { - "type": "string" - }, - "countryCode": { - "type": "string" - }, - "notes": { - "type": "string" - }, - "privateNotes": { - "type": "string" - } - } - } - }, - "customFields": { - "type": "array", - "items": { - "type": "object", - "properties": { - "field": { - "type": "string" - }, - "value": { - "type": "string" - } - } - } - } - } - } - }, - "examples": { - "response": { - "value": [ - { - "id": "5aaa43d35b7064002613c048", - "customId": "myReferenceId", - "name": "Custom Tech Inc.", - "code": "B3737387", - "tradeName": "Mapple", - "email": "email@mapple.com", - "mobile": "63738383", - "phone": "3949494", - "type": "client", - "iban": "ES436677378638786", - "swift": "", - "clientRecord": 0, - "supplierRecord": 0, - "billAddress": { - "address": "Carrer del Mar", - "city": "Barcelona", - "postalCode": 8767, - "province": "Barcelona", - "country": "Spain", - "countryCode": "ES", - "info": "Random info" - }, - "defaults": { - "salesChannel": 0, - "expensesAccount": 0, - "dueDays": 3, - "paymentMethod": 0, - "discount": 45, - "language": "fr", - "currency": "eur", - "tax": "default", - "retention": "default" - }, - "socialNetworks": { - "website": "www.mapple.com" - }, - "tags": ["tag", "otherTag"], - "notes": [ - { - "noteId": "5aba2365c5d43800316b2a53", - "name": "My first note", - "description": "An important note", - "color": "primary", - "updatedAt": 1522148197, - "userId": "5a05cc5a60cea100094baf22" - }, - { - "noteId": "5aba26efc5d43800316b2a54", - "name": "Note", - "description": "Another note", - "color": "#ee575d", - "updatedAt": 1522149103, - "userId": "" - } - ], - "contactPersons": [ - { - "personId": "5aba40fdc5d43800316b2a55", - "name": "Pep", - "job": "Ito", - "phone": "966", - "email": "noway@frog.com", - "sendDocumentsByDefault": true, - "linkedin": "no link" - } - ], - "shippingAddresses": [ - { - "shippingId": "5aba4147c5d43800342fc4a3", - "name": "Mapple shipping address", - "address": "c/Lafranch", - "city": "Vilafranca del Monport ", - "postalCode": 899, - "province": "Barcelona", - "country": "Spain", - "countryCode": "ES", - "notes": "A public note", - "privateNotes": "This is a private note, don't read it" - } - ], - "customFields": [ - { - "field": "FieldOne", - "value": "valueOne" - } - ] - } - ] - } - } - } - } - } - }, - "tags": ["CONTACTS"], - "summary": "List Contacts", - "description": "Get all your contact." - }, - "post": { - "operationId": "Create Contact", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "CustomId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "code": { - "type": "string" - }, - "email": { - "type": "string" - }, - "mobile": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "type": { - "type": "string", - "description": "Options: supplier, debtor, creditor, client, lead" - }, - "isperson": { - "type": "boolean", - "description": "When true the contact is created as a Contact Person instead of as a Company" - }, - "iban": { - "type": "string" - }, - "swift": { - "type": "string" - }, - "sepaRef": { - "type": "string" - }, - "groupId": { - "type": "string" - }, - "taxOperation": { - "type": "string", - "description": "options for Spain (general, intra, impexp, nosujeto, receq, exento)" - }, - "sepaDate": { - "type": "number" - }, - "clientRecord": { - "type": "integer" - }, - "supplierRecord": { - "type": "integer" - }, - "billAddress": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "province": { - "type": "string" - }, - "country": { - "type": "string" - } - } - }, - "numberingSeries": { - "type": "object", - "description": "The value of each document should be a valid ID.", - "properties": { - "invoice": { - "type": "string" - }, - "receipt": { - "type": "string" - }, - "salesOrder": { - "type": "string" - }, - "purchasesOrder": { - "type": "string" - }, - "proform": { - "type": "string" - }, - "waybill": { - "type": "string" - } - } - }, - "shippingAddresses": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "province": { - "type": "string" - }, - "country": { - "type": "string" - }, - "note": { - "type": "string" - }, - "privateNote": { - "type": "string" - } - } - } - }, - "defaults": { - "type": "object", - "properties": { - "expensesAccountRecord": { - "type": "integer" - }, - "expensesAccountName": { - "type": "string" - }, - "salesAccountRecord": { - "type": "integer" - }, - "salesAccountName": { - "type": "string" - }, - "dueDays": { - "type": "integer" - }, - "salesTax": { - "type": "integer" - }, - "salesTaxes": { - "type": "array", - "items": { - "type": "string" - } - }, - "purchasesTax": { - "type": "integer" - }, - "purchasesTaxes": { - "type": "array", - "items": { - "type": "string" - } - }, - "accumulateInForm347": { - "type": "string", - "description": "Yes or No" - }, - "paymentMethod": { - "type": "string", - "description": "Should be a valid ID" - }, - "discount": { - "type": "integer" - }, - "currency": { - "type": "string", - "description": "Currency ISO code in lowercase (e.g., eur = Euro, usd = U.S. Dollar, etc )" - }, - "language": { - "type": "string", - "description": "options (es = spanish, en = english, fr = french, de = german, it = italian, ca = catalan, eu = euskera)" - }, - "showTradeNameOnDocs": { - "type": "boolean" - }, - "showCountryOnDocs": { - "type": "boolean" - } - } - }, - "socialNetworks": { - "type": "object", - "properties": { - "website": { - "type": "string" - } - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "note": { - "type": "string" - }, - "contactPersons": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "email": { - "type": "string" - } - } - }, - "required": ["name"] - } - } - } - } - }, - "x-examples": { - "application/json": { - "CustomId": "My reference", - "name": "Custom Tech Inc.", - "code": "B3737387", - "email": "email@mapple.com", - "mobile": "63738383", - "phone": "3949494", - "type": "supplier", - "iban": "ES436677378638786", - "swift": "", - "clientRecord": 0, - "supplierRecord": 0, - "billAddress": { - "address": "Carrer del Mar", - "city": "Barcelona", - "postalCode": 8767, - "province": "Barcelona", - "country": "Spain" - }, - "defaults": { - "salesChannel": 0, - "expensesAccount": 0, - "dueDays": 3, - "paymentMethod": 0, - "discount": 45, - "language": "fr", - "currency": "eur", - "tax": "default", - "retention": "default" - }, - "socialNetworks": { - "website": "www.mapple.com" - }, - "tags": ["tag", "otherTag"], - "notes": "My note", - "contactPersons": { - "name": "Pep", - "phone": "966", - "email": "noway@frog.com" - } - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Created", - "id": "5ac4f2cec839ea004e18a463" - } - } - } - } - } - } - }, - "tags": ["CONTACTS"], - "summary": "Create Contact", - "description": "Create a new contact." - } - }, - "/contacts/{contactId}": { - "parameters": [ - { - "name": "contactId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "operationId": "Get Contact", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "customId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "code": { - "type": "string" - }, - "tradeName": { - "type": "string" - }, - "email": { - "type": "string" - }, - "mobile": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "type": { - "type": "string" - }, - "iban": { - "type": "string" - }, - "swift": { - "type": "string" - }, - "clientRecord": { - "type": "integer" - }, - "supplierRecord": { - "type": "integer" - }, - "billAddress": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "integer" - }, - "province": { - "type": "string" - }, - "country": { - "type": "string" - }, - "countryCode": { - "type": "string" - }, - "info": { - "type": "string" - } - } - }, - "defaults": { - "type": "object", - "properties": { - "salesChannel": { - "type": "integer" - }, - "expensesAccount": { - "type": "integer" - }, - "dueDays": { - "type": "integer" - }, - "paymentMethod": { - "type": "integer" - }, - "discount": { - "type": "integer" - }, - "language": { - "type": "string" - }, - "currency": { - "type": "string" - }, - "tax": { - "type": "string" - }, - "retention": { - "type": "string" - } - } - }, - "socialNetworks": { - "type": "object", - "properties": { - "website": { - "type": "string" - } - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "notes": { - "type": "array", - "items": { - "type": "object", - "properties": { - "noteId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "color": { - "type": "string" - }, - "updatedAt": { - "type": "integer" - }, - "userId": { - "type": "string" - } - } - } - }, - "contactPersons": { - "type": "array", - "items": { - "type": "object", - "properties": { - "personId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "job": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "email": { - "type": "string" - }, - "sendDocumentsByDefault": { - "type": "boolean" - }, - "linkedin": { - "type": "string" - } - } - } - }, - "shippingAddresses": { - "type": "array", - "items": { - "type": "object", - "properties": { - "shippingId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "integer" - }, - "province": { - "type": "string" - }, - "country": { - "type": "string" - }, - "countryCode": { - "type": "string" - }, - "notes": { - "type": "string" - }, - "privateNotes": { - "type": "string" - } - } - } - }, - "customFields": { - "type": "array", - "items": { - "type": "object", - "properties": { - "field": { - "type": "string" - }, - "value": { - "type": "string" - } - } - } - } - } - }, - "examples": { - "response": { - "value": { - "id": "5aaa43d35b7064002613c048", - "customId": "myReferenceId", - "name": "Custom Tech Inc.", - "code": "B3737387", - "tradeName": "Mapple", - "email": "email@mapple.com", - "mobile": "63738383", - "phone": "3949494", - "type": "client", - "iban": "ES436677378638786", - "swift": "", - "clientRecord": 0, - "supplierRecord": 0, - "billAddress": { - "address": "Carrer del Mar", - "city": "Barcelona", - "postalCode": 8767, - "province": "Barcelona", - "country": "Spain", - "countryCode": "ES", - "info": "Random info" - }, - "defaults": { - "salesChannel": 0, - "expensesAccount": 0, - "dueDays": 3, - "paymentMethod": 0, - "discount": 45, - "language": "fr", - "currency": "eur", - "tax": "default", - "retention": "default" - }, - "socialNetworks": { - "website": "www.mapple.com" - }, - "tags": ["tag", "otherTag"], - "notes": [ - { - "noteId": "5aba2365c5d43800316b2a53", - "name": "My first note", - "description": "An important note", - "color": "primary", - "updatedAt": 1522148197, - "userId": "5a05cc5a60cea100094baf22" - }, - { - "noteId": "5aba26efc5d43800316b2a54", - "name": "Note", - "description": "Another note", - "color": "#ee575d", - "updatedAt": 1522149103, - "userId": "" - } - ], - "contactPersons": [ - { - "personId": "5aba40fdc5d43800316b2a55", - "name": "Pep", - "job": "Ito", - "phone": "966", - "email": "noway@frog.com", - "sendDocumentsByDefault": true, - "linkedin": "no link" - } - ], - "shippingAddresses": [ - { - "shippingId": "5aba4147c5d43800342fc4a3", - "name": "Mapple shipping address", - "address": "c/LLafranch", - "city": "Vilafranca del Monport ", - "postalCode": 899, - "province": "Lleida", - "country": "Spain", - "countryCode": "ES", - "notes": "A public note", - "privateNotes": "This is a private note, don't read it" - } - ], - "customFields": [ - { - "field": "FieldOne", - "value": "noValue" - } - ] - } - } - } - } - } - } - }, - "tags": ["CONTACTS"], - "summary": "Get Contact", - "description": "Get a specific contact." - }, - "put": { - "operationId": "Update Contact", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "code": { - "type": "string" - }, - "tradeName": { - "type": "string" - }, - "email": { - "type": "string" - }, - "mobile": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "type": { - "type": "string", - "description": "Options: supplier, debtor, creditor, client, lead" - }, - "isperson": { - "type": "boolean", - "description": "When true the contact is created as a Contact Person instead of as a Company" - }, - "iban": { - "type": "string" - }, - "swift": { - "type": "string" - }, - "sepaRef": { - "type": "string" - }, - "sepaDate": { - "type": "number" - }, - "clientRecord": { - "type": "integer" - }, - "supplierRecord": { - "type": "integer" - }, - "groupId": { - "type": "string" - }, - "taxOperation": { - "type": "string", - "description": "options for Spain (general, intra, impexp, nosujeto, receq, exento)" - }, - "billAddress": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "province": { - "type": "string" - }, - "country": { - "type": "string" - }, - "countryCode": { - "type": "string" - } - } - }, - "shippingAddresses": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "province": { - "type": "string" - }, - "country": { - "type": "string" - }, - "notes": { - "type": "string" - }, - "privateNote": { - "type": "string" - } - } - } - }, - "defaults": { - "type": "object", - "properties": { - "expensesAccountRecord": { - "type": "integer" - }, - "expensesAccountName": { - "type": "string" - }, - "salesAccountRecord": { - "type": "integer" - }, - "salesAccountName": { - "type": "string" - }, - "dueDays": { - "type": "integer" - }, - "salesTax": { - "type": "integer" - }, - "purchasesTax": { - "type": "integer" - }, - "accumulateInForm347": { - "type": "string", - "description": "Yes or No" - }, - "paymentMethod": { - "type": "string", - "description": "Should be a valid ID." - }, - "discount": { - "type": "integer" - }, - "currency": { - "type": "string", - "description": "Currency ISO code in lowercase (e.g., eur = Euro, usd = U.S. Dollar, etc )" - }, - "language": { - "type": "string", - "description": "options (es = spanish, en = english, fr = french, de = german, it = italian, ca = catalan, eu = euskera)" - }, - "showTradeNameOnDocs": { - "type": "boolean" - }, - "showCountryOnDocs": { - "type": "boolean" - } - } - }, - "socialNetworks": { - "type": "object", - "properties": { - "website": { - "type": "string" - } - } - }, - "numberingSeries": { - "type": "object", - "description": "The value of each document should be a valid ID.", - "properties": { - "invoice": { - "type": "string" - }, - "receipt": { - "type": "string" - }, - "salesOrder": { - "type": "string" - }, - "purchasesOrder": { - "type": "string" - }, - "proform": { - "type": "string" - }, - "waybill": { - "type": "string" - } - } - } - } - } - } - }, - "x-examples": { - "application/json": { - "name": "Custom Tech Inc.", - "code": "B3737387", - "tradeName": "Mapple", - "email": "email@mapple.com", - "mobile": "63738383", - "phone": "3949494", - "type": "client", - "iban": "ES436677378638786", - "swift": "UJ45623456", - "clientRecord": 0, - "supplierRecord": 0, - "billAddress": { - "address": "Carrer del Mar", - "city": "Barcelona", - "postalCode": 8767, - "province": "Barcelona", - "country": "Spain", - "countryCode": "ES" - }, - "defaults": { - "salesChannel": 0, - "expensesAccount": 0, - "dueDays": 3, - "paymentMethod": 0, - "discount": 45, - "language": "fr" - }, - "socialNetworks": { - "website": "www.mapple.com" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5ac4f2cec839ea004e18a463" - } - } - } - } - } - } - }, - "tags": ["CONTACTS"], - "summary": "Update Contact", - "description": "Update a specific contact.\n\nOnly the params included in the operation will update the contact." - }, - "delete": { - "operationId": "Delete Contact", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" - } - } - } - } - } - } - }, - "tags": ["CONTACTS"], - "summary": "Delete Contact", - "description": "Delete specific contact" - } - }, - "/contacts/{contactId}/attachments/list": { - "parameters": [ - { - "name": "contactId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "operationId": "Get attachments list", - "responses": { - "200": { - "description": "Get attachments list for a given contact", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - } - }, - "tags": ["CONTACTS"], - "summary": "Get contact attachments list", - "description": "Get attachments list for a given contact." - } - }, - "/contacts/{contactId}/attachments/get": { - "parameters": [ - { - "name": "contactId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "filename", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "operationId": "Get attachment", - "responses": { - "200": { - "description": "Get attachment", - "content": { - "application/json": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - } - }, - "tags": ["CONTACTS"], - "summary": "Get attachment", - "description": "Get attachment" - } - }, - "/contacts/groups": { - "get": { - "operationId": "List Contact Groups", - "summary": "List Contact Groups", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "color": { - "type": "string" - } - } - } - } - } - } - } - }, - "tags": ["CONTACT GROUPS"] - }, - "post": { - "operationId": "Create Contact Group", - "summary": "Create Contact Group", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "color": { - "type": "string" - } - }, - "required": ["name"] - } - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - } - } - } - } - }, - "tags": ["CONTACT GROUPS"] - } - }, - "/contacts/groups/{groupId}": { - "parameters": [ - { - "name": "groupId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "operationId": "Get Contact Group", - "summary": "Get Contact Group", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "color": { - "type": "string" - } - } - } - } - } - } - }, - "tags": ["CONTACT GROUPS"] - }, - "put": { - "operationId": "Update Contact Group", - "summary": "Update Contact Group", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "color": { - "type": "string" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - } - } - } - } - }, - "tags": ["CONTACT GROUPS"] - }, - "delete": { - "operationId": "Delete Contact Group", - "summary": "Delete Contact Group", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" - } - } - } - } - } - } - }, - "tags": ["CONTACT GROUPS"] - } - }, - "/products": { - "get": { - "operationId": "List Products", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "title": "Product Basic Output", - "description": "The properties that are included when fetching a list of Products.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Product Common", - "description": "The properties that are shared amongst all versions of the Product model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "typeId": { - "type": "string" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "price": { - "type": "integer" - }, - "tax": { - "type": "integer" - }, - "total": { - "type": "number" - }, - "rates": { - "type": "array", - "items": { - "type": "object" - } - }, - "hasStock": { - "type": "integer" - }, - "stock": { - "type": "integer" - }, - "barcode": { - "type": "string" - }, - "sku": { - "type": "string" - }, - "cost": { - "type": "integer" - }, - "purchasePrice": { - "type": "number" - }, - "weight": { - "type": "number" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "categoryId": { - "type": "string" - }, - "factoryCode": { - "type": "string" - }, - "attributes": { - "type": "array", - "items": { - "type": "object" - } - }, - "forSale": { - "type": "integer" - }, - "forPurchase": { - "type": "integer" - }, - "salesChannelId": { - "type": "string" - }, - "expAccountId": { - "type": "string" - }, - "warehouseId": { - "type": "string" - }, - "variants": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "barcode": { - "type": "string" - }, - "sku": { - "type": "string" - }, - "price": { - "type": "integer" - }, - "cost": { - "type": "integer" - }, - "purchasePrice": { - "type": "number" - }, - "stock": { - "type": "integer" - } - } - } - } - }, - "x-readme-ref-name": "product-common" - } - ], - "x-readme-ref-name": "product-output" - } - }, - "examples": { - "response": { - "value": [ - { - "id": "5abbc9980823dd002b5c36f5", - "kind": "simple", - "name": "Brand new shirt", - "desc": "Black shirt", - "typeId": "5abbc8e40823dd00274ca482", - "contactId": "5aaa51ab5b70640028340186", - "contactName": "Iron Supply", - "price": 95, - "tax": 21, - "total": 119.45, - "rates": [], - "hasStock": 1, - "stock": 2, - "barcode": "45the54", - "sku": "23454657", - "cost": 20, - "purchasePrice": 11.5, - "weight": 0.5, - "tags": ["tig", "tag", "tug"], - "categoryId": "5abbc9110823dd0025411fb4", - "factoryCode": "32435g", - "attributes": [], - "forSale": 1, - "forPurchase": 1, - "salesChannelId": "5abbc324g3vdd002b5c36f3", - "expAccountId": "5abbc9980823d3245b5c36f3", - "warehouseId": "5abbc89e5823dd002b5c36f3", - "variants": [ - { - "id": "5abbc9980823dd002b5c36f3", - "barcode": "35647", - "sku": "34354", - "price": 45, - "cost": 20, - "purchasePrice": 11.5, - "stock": 2 - }, - { - "id": "5abbc9980823dd002b5c36f4", - "barcode": "", - "sku": "", - "price": 45, - "cost": 20, - "purchasePrice": 11.5, - "stock": 0 - } - ] - }, - { - "id": "5abbd1cf0823dd004562b685", - "kind": "simple", - "name": "Tata shoes", - "desc": "brand new shoes", - "typeId": "480yhfn2b3498o243upj2", - "contactId": "2p4hjrnfob3hli2khpn", - "contactName": "Tata industry", - "price": 100, - "tax": 21, - "total": 121, - "rates": [], - "hasStock": 1, - "stock": 234, - "barcode": "232435465", - "sku": "234rwt54", - "cost": 39, - "purchasePrice": 11, - "weight": 0, - "tags": [""], - "categoryId": "5abbd15e0823dd003b085005", - "factoryCode": "324t5f4", - "attributes": [], - "forSale": 1, - "forPurchase": 1, - "salesChannelId": "0", - "expAccountId": "0", - "warehouseId": "0", - "variants": [ - { - "id": "5abbd1cf0823dd004562b683", - "barcode": "123", - "sku": "123", - "price": 2, - "cost": 1, - "purchasePrice": 1, - "stock": 234 - }, - { - "id": "5abbd1cf0823dd004562b684", - "barcode": "", - "sku": "", - "price": 0, - "cost": 0, - "purchasePrice": 2, - "stock": 0 - } - ] - }, - { - "id": "5abbca020823dd00343d0a44", - "kind": "simple", - "name": "new simple product", - "desc": "the best simple product you can buy", - "typeId": "3l4kbn5j3oknl645t574354", - "contactId": "", - "contactName": "", - "price": 0, - "tax": 21, - "total": 0, - "rates": [], - "hasStock": 1, - "stock": 0, - "barcode": "", - "sku": "", - "cost": 0, - "purchasePrice": 0, - "weight": 0, - "tags": [""], - "categoryId": "0", - "factoryCode": "", - "attributes": [], - "forSale": 1, - "forPurchase": 1, - "salesChannelId": "0", - "expAccountId": "0", - "warehouseId": "0", - "variants": [ - { - "id": "5abbca020823dd00343d0a43", - "barcode": "", - "sku": "", - "price": 0, - "cost": 0, - "purchasePrice": 0, - "stock": 0 - } - ] - } - ] - } - } - } - } - } - }, - "tags": ["PRODUCTS"], - "summary": "List Products" - }, - "post": { - "operationId": "Create Product", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "kind": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "price": { - "type": "number" - }, - "tax": { - "type": "number" - }, - "cost": { - "type": "number" - }, - "calculatecost": { - "type": "number" - }, - "purchasePrice": { - "type": "number" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "barcode": { - "type": "string" - }, - "sku": { - "type": "string" - }, - "weight": { - "type": "number" - }, - "stock": { - "type": "integer" - } - } - } - } - }, - "x-examples": { - "application/json": {}, - "new": { - "kind": "simple", - "name": "Brand new shirt" - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Created", - "id": "5aa97e595b706400153f9f94" - } - } - } - } - } - } - }, - "tags": ["PRODUCTS"], - "summary": "Create Product" - } - }, - "/products/{productId}": { - "parameters": [ - { - "name": "productId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "put": { - "operationId": "Update Product", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "kind": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "tax": { - "type": "integer" - }, - "subtotal": { - "type": "number" - }, - "barcode": { - "type": "string" - }, - "sku": { - "type": "string" - }, - "cost": { - "type": "number" - }, - "purchasePrice": { - "type": "number" - }, - "weight": { - "type": "number" - } - } - } - } - }, - "x-examples": { - "application/json": { - "kind": "simple", - "name": "Brand new shirt", - "desc": "Black shirt", - "tax": 21, - "subtotal": 119.45, - "barcode": "45the54", - "sku": "23454657", - "cost": 20, - "purchasePrice": 10, - "weight": 0.5 - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5aa97e595b706400153f9f94" - } - } - } - } - } - } - }, - "tags": ["PRODUCTS"], - "summary": "Update Product" - }, - "delete": { - "operationId": "Delete Product", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" - } - } - } - } - } - } - }, - "tags": ["PRODUCTS"], - "summary": "Delete Product" - }, - "get": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "operationId": "Get product", - "summary": "Get Product", - "description": "Get a speccific product", - "tags": ["PRODUCTS"] - } - }, - "/warehouses": { - "get": { - "operationId": "List Warehouses", - "summary": "List Warehouses", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "email": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "mobile": { - "type": "string" - }, - "address": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "province": { - "type": "string" - }, - "country": { - "type": "string" - }, - "countryCode": { - "type": "string" - } - } - }, - "default": { - "type": "boolean" - }, - "warehouseRecord": { - "type": "integer" - } - } - } - }, - "examples": { - "response": { - "value": [ - { - "id": "5a05cc6e60cea100094baf2f", - "userId": "2344000h2o4b5s4n3o45", - "name": "Main Warehouse", - "email": "main@warehouse.com", - "phone": "765837638", - "mobile": "23456673", - "address": { - "address": "Av. Meridiana, 13", - "city": "Barcelona", - "postalCode": 3849, - "province": "Barcelona", - "country": "Spain", - "countryCode": "ES" - }, - "default": true, - "warehouseRecord": 30000001 - }, - { - "id": "5aab9ae87bdcef002641e0c3", - "userId": "5a05cc5a60cea100094baf22", - "name": "Second warehouse", - "email": "second@warehouse.com", - "phone": "", - "mobile": "", - "address": { - "address": "Main Street, 3", - "city": "London", - "postalCode": "04747", - "province": "London", - "country": "United Kingdom", - "countryCode": "UK" - }, - "default": false, - "warehouseRecord": null - }, - { - "id": "5aaba5237bdcef002c4979d5", - "userId": "", - "name": "Third warehouse", - "email": "third@warehouse.com", - "phone": "123", - "mobile": "123", - "address": { - "address": "Av. Blasco Ibañez, 34", - "city": "Valencia", - "postalCode": 8054, - "province": "Valencia", - "country": "Spain", - "countryCode": "ES" - }, - "default": false, - "warehouseRecord": null - } - ] - } - } - } - } - } - }, - "tags": ["WAREHOUSES"] - }, - "post": { - "operationId": "Create Warehouse", - "summary": "Create Warehouse", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "email": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "mobile": { - "type": "string" - }, - "address": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "province": { - "type": "string" - }, - "country": { - "type": "string" - }, - "countryCode": { - "type": "string" - } - } - }, - "default": { - "type": "boolean" - } - } - } - } - }, - "x-examples": { - "application/json": { - "name": "Main Warehouse", - "email": "main@warehouse.com", - "phone": "765837638", - "mobile": "23456673", - "address": { - "address": "Av. Meridiana, 13", - "city": "Barcelona", - "postalCode": 3849, - "province": "Barcelona", - "country": "Spain", - "countryCode": "ES" - }, - "default": true - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Created", - "id": "5aa97e595b706400153f9f94" - } - } - } - } - } - } - }, - "tags": ["WAREHOUSES"] - } - }, - "/warehouses/{warehouseId}/stock": { - "parameters": [ - { - "name": "warehouseId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "operationId": "List products stock", - "summary": "List products stock", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "warehouse": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "color": { - "type": "string" - }, - "products": { - "type": "array", - "items": { - "type": "object", - "properties": { - "_id": { - "type": "string" - }, - "stock": { - "type": "integer" - }, - "variants": { - "type": "object", - "properties": { - "ObjectId": { - "type": "integer" - } - } - } - } - } - } - } - } - } - } - } - } - } - }, - "tags": ["WAREHOUSES"] - } - }, - "/warehouses/{warehouseId}": { - "parameters": [ - { - "name": "warehouseId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "operationId": "Get Warehouse", - "summary": "Get Warehouse", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "email": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "mobile": { - "type": "string" - }, - "address": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "province": { - "type": "string" - }, - "country": { - "type": "string" - }, - "countryCode": { - "type": "string" - } - } - }, - "default": { - "type": "boolean" - }, - "warehouseRecord": { - "type": "integer" - } - } - }, - "examples": { - "response": { - "value": { - "id": "5a05cc6e60cea100094baf2f", - "userId": "2344000h2o4b5s4n3o45", - "name": "Main Warehouse", - "email": "main@warehouse.com", - "phone": "765837638", - "mobile": "23456673", - "address": { - "address": "Av. Meridiana, 13", - "city": "Barcelona", - "postalCode": 3849, - "province": "Barcelona", - "country": "Spain", - "countryCode": "ES" - }, - "default": true, - "warehouseRecord": 30000001 - } - } - } - } - } - } - }, - "tags": ["WAREHOUSES"] - }, - "put": { - "operationId": "Update Warehouse", - "summary": "Update Warehouse", - "requestBody": { - "content": { - "application/json": { - "schema": { - "title": "Warehouse Input", - "description": "The properties that are allowed when creating or updating a Warehouse.", - "allOf": [ - { - "title": "Warehouse Common", - "description": "The properties that are shared amongst all versions of the Warehouse model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "email": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "mobile": { - "type": "string" - }, - "address": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "province": { - "type": "string" - }, - "country": { - "type": "string" - }, - "countryCode": { - "type": "string" - } - } - }, - "default": { - "type": "boolean" - }, - "warehouseRecord": { - "type": "integer" - } - }, - "x-readme-ref-name": "warehouse-common" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "warehouse-input" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "email": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "mobile": { - "type": "string" - }, - "address": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "province": { - "type": "string" - }, - "country": { - "type": "string" - }, - "countryCode": { - "type": "string" - } - } - } - } - }, - "examples": { - "response": { - "value": { - "name": "Main Warehouse", - "email": "main@warehouse.com", - "phone": "765837638", - "mobile": "23456673", - "address": { - "address": "Av. Meridiana, 13", - "city": "Barcelona", - "postalCode": 3849, - "province": "Barcelona", - "country": "Spain", - "countryCode": "ES" - } - } - } - } - } - } - } - }, - "tags": ["WAREHOUSES"] - }, - "delete": { - "operationId": "Delete Warehouse", - "summary": "Delete Warehouse", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" - } - } - } - } - } - } - }, - "tags": ["WAREHOUSES"] - } - }, - "/taxes": { - "get": { - "operationId": "getTaxes", - "summary": "Get Taxes", - "description": "Get all the taxes information for a specific account", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "amount": { - "type": "string" - }, - "scope": { - "type": "string" - }, - "key": { - "type": "string" - }, - "group": { - "type": "string" - }, - "type": { - "type": "string" - } - } - } - }, - "examples": { - "response": { - "value": [ - { - "name": "IVA 21%", - "amount": "21", - "scope": "sales", - "key": "s_iva_21", - "group": "iva", - "type": "percentage" - }, - { - "name": "IVA 10%", - "amount": "10", - "scope": "sales", - "key": "s_iva_10", - "group": "iva", - "type": "percentage" - } - ] - } - } - } - } - } - }, - "tags": ["TAXES"] - } - }, - "/treasury": { - "get": { - "operationId": "List Treasuries", - "summary": "List Treasuries Accounts", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "balance": { - "type": "integer" - }, - "accountNumber": { - "type": "integer" - }, - "iban": { - "type": "string" - }, - "swift": { - "type": "string" - }, - "bank": { - "type": "string" - }, - "bankname": { - "type": "string" - } - } - } - }, - "examples": { - "response": { - "value": [ - { - "id": "5aba68b1c5d438006425ad45", - "name": "Abanca bank", - "type": "bank", - "balance": 0, - "accountNumber": 57200003, - "iban": "ES123456789", - "swift": "CAGLESMM", - "bank": "abanca", - "bankname": "Abanca" - }, - { - "id": "5aba68b1c5d2453654ad90", - "name": "ING bank", - "type": "bank", - "balance": 32435, - "accountNumber": 65305004, - "iban": "ES112345678", - "swift": "DSFGT", - "bank": "ing", - "bankname": "ING" - } - ] - } - } - } - } - } - }, - "tags": ["TREASURIES"] - }, - "post": { - "operationId": "Create Treasury", - "summary": "Create Treasury Account", - "requestBody": { - "content": { - "application/json": { - "schema": { - "title": "Bank Input", - "description": "The properties that are allowed when creating or updating a Bank.", - "allOf": [ - { - "title": "Bank Common", - "description": "The properties that are shared amongst all versions of the Bank model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "balance": { - "type": "integer" - }, - "accountNumber": { - "type": "integer" - }, - "iban": { - "type": "string" - }, - "swift": { - "type": "string" - }, - "bank": { - "type": "string" - }, - "bankname": { - "type": "string" - } - }, - "x-readme-ref-name": "bank-common" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "bank-input" - } - } - } - }, - "responses": { - "201": { - "description": "dddd", - "content": { - "application/json": { - "schema": { - "title": "Bank Detailed Output", - "description": "The properties that are included when fetching a single Bank.", - "allOf": [ - { - "title": "Bank Basic Output", - "description": "The properties that are included when fetching a list of Banks.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Bank Common", - "description": "The properties that are shared amongst all versions of the Bank model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "balance": { - "type": "integer" - }, - "accountNumber": { - "type": "integer" - }, - "iban": { - "type": "string" - }, - "swift": { - "type": "string" - }, - "bank": { - "type": "string" - }, - "bankname": { - "type": "string" - } - }, - "x-readme-ref-name": "bank-common" - } - ], - "x-readme-ref-name": "bank-output" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "bank-output-detailed" - }, - "examples": { - "response": { - "value": { - "under": "development" - } - } - } - } - } - } - }, - "tags": ["TREASURIES"] - } - }, - "/treasury/{treasuryId}": { - "parameters": [ - { - "name": "treasuryId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "operationId": "Get Treasury", - "summary": "Get Treasury Account", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "balance": { - "type": "integer" - }, - "accountNumber": { - "type": "integer" - }, - "iban": { - "type": "string" - }, - "swift": { - "type": "string" - }, - "bank": { - "type": "string" - }, - "bankname": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "id": "5aba68b1c5d438006425ad45", - "name": "Abanca bank", - "type": "bank", - "balance": 0, - "accountNumber": 57200003, - "iban": "ES123456789", - "swift": "CAGLESMM", - "bank": "abanca", - "bankname": "Abanca" - } - } - } - } - } - } - }, - "tags": ["TREASURIES"] - } - }, - "/numberingseries/{type}": { - "get": { - "operationId": "Get Numbering Series", - "summary": "Get Numbering Series by Type", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "format": { - "type": "string" - }, - "last": { - "type": "integer" - }, - "type": { - "type": "string" - } - } - } - }, - "examples": { - "response": { - "value": [ - { - "id": "5a05cc6e60cea100094baf24", - "name": "Default", - "format": "F17%%%%", - "last": 6, - "type": "invoice" - }, - { - "id": "5ab12cd63697ac00d1489fe3", - "name": "nl SO", - "format": "SO[YY]%%%", - "last": 0, - "type": "salesOrder" - } - ] - } - } - } - } - } - }, - "tags": ["NUMBERING SERIES"] - }, - "post": { - "operationId": "Create Numbering Serie", - "summary": "Create Numbering Serie", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "format": { - "type": "string" - }, - "last": { - "type": "integer" - }, - "type": { - "type": "string" - } - } - } - } - }, - "x-examples": { - "application/json": { - "name": "Default", - "format": "F17%%%%", - "last": 6, - "type": "invoice" - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "msg": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "msg": "Created", - "id": "4365gqrtg51446tg14f5" - } - } - } - } - } - } - }, - "tags": ["NUMBERING SERIES"] - }, - "parameters": [ - { - "name": "type", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "/numberingseries/{type}/{numberingSeriesId}": { - "parameters": [ - { - "name": "type", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "numberingSeriesId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "put": { - "operationId": "Update Numbering Serie", - "summary": "Update Numbering Serie", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "format": { - "type": "string" - }, - "last": { - "type": "string" - } - } - } - } - }, - "x-examples": { - "application/json": { - "name": "Default", - "format": "receipt", - "last": "ff01" - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5ac4f2cec839ea004e18a463" - } - } - } - } - } - } - }, - "tags": ["NUMBERING SERIES"] - }, - "delete": { - "operationId": "Delete Numbering Serie", - "summary": "Delete Numbering Serie", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "msg": { - "type": "string" - }, - "id": { - "type": "integer" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "msg": "Successfully deleted", - "id": 484 - } - } - } - } - } - } - }, - "tags": ["NUMBERING SERIES"] - } - }, - "/expensesaccounts": { - "get": { - "operationId": "List Expenses Accounts", - "summary": "List Expenses Accounts", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "color": { - "type": "string" - }, - "accNum": { - "type": "integer" - } - } - }, - "examples": { - "response": { - "value": { - "id": "5aaf8c5f3697ac001f676082", - "name": "Exp Account main", - "desc": "My main expeses account dude", - "color": "#2C0934", - "accNum": 60000001 - } - } - } - } - } - } - }, - "tags": ["EXPENSES ACCOUNTS"], - "description": "List all your expenses accounts." - }, - "post": { - "operationId": "Create Expenses Account", - "summary": "Create Expenses Account", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "accountNum": { - "type": "integer" - } - }, - "required": ["name", "desc", "accountNum"] - } - } - }, - "x-examples": { - "application/json": { - "name": "Alt exp account", - "desc": "My second expenses account" - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Created", - "id": "5ac4f2cec839ea004e18a463" - } - } - } - } - } - } - }, - "tags": ["EXPENSES ACCOUNTS"], - "description": "Create an expenses account." - } - }, - "/expensesaccounts/{expensesAccountId}": { - "parameters": [ - { - "name": "expensesAccountId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "operationId": "Get Expenses Account", - "summary": "Get Expenses Account", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "color": { - "type": "string" - }, - "accNum": { - "type": "integer" - } - } - }, - "examples": { - "response": { - "value": { - "id": "5aaf8c5f3697ac001f676082", - "name": "Exp Account", - "desc": "My main expenses accoun", - "color": "#2C0934", - "accNum": 60000001 - } - } - } - } - } - } - }, - "tags": ["EXPENSES ACCOUNTS"], - "description": "Get a specific expenses account." - }, - "put": { - "operationId": "Update Expenses Account", - "summary": "Update Expenses Account", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "color": { - "type": "string" - } - } - } - } - }, - "x-examples": { - "application/json": { - "name": "New Exp Account", - "desc": "My fnew exp account", - "color": "#2C0934" - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5ac4f2cec839ea004e18a463" - } - } - } - } - } - } - }, - "tags": ["EXPENSES ACCOUNTS"], - "description": "Update a specific expenses account." - }, - "delete": { - "operationId": "Delete Expenses account", - "summary": "Delete Expenses Account", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" - } - } - } - } - } - } - }, - "tags": ["EXPENSES ACCOUNTS"], - "description": "Delete a specific expenses account." - } - }, - "/saleschannels": { - "get": { - "operationId": "List Sales Channels", - "summary": "List Sales Channels", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "color": { - "type": "string" - }, - "accNum": { - "type": "integer" - } - } - } - }, - "examples": { - "response": { - "value": [ - { - "id": "5aba667fc5d438006425ad44", - "name": "My brand new sales channel", - "desc": "Main income", - "color": "#507C6C", - "accNum": 700002 - }, - { - "id": "5aba667fc5d438006425ad44", - "name": "My second brand new channel", - "desc": "Second income stream", - "color": "#507C6C", - "accNum": null - } - ] - } - } - } - } - } - }, - "tags": ["SALES CHANNELS"] - }, - "post": { - "operationId": "Create Sales Channel", - "summary": "Create Sales Channel", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "accountNum": { - "type": "integer" - } - }, - "required": ["name", "desc", "accountNum"] - } - } - }, - "x-examples": { - "application/json": { - "name": "My brand new sales channel", - "desc": "Main income" - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Created", - "id": "5ac4f2cec839ea004e18a463" - } - } - } - } - } - } - }, - "tags": ["SALES CHANNELS"] - } - }, - "/saleschannels/{salesChannelId}": { - "parameters": [ - { - "name": "salesChannelId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "operationId": "Get Sales Channel", - "summary": "Get Sales Channel", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "color": { - "type": "string" - }, - "accNum": { - "type": "integer" - } - } - }, - "examples": { - "response": { - "value": { - "id": "5aba667fc5d438006425ad44", - "name": "My second brand new channel", - "desc": "Second income stream", - "color": "#507C6C", - "accNum": null - } - } - } - } - } - } - }, - "tags": ["SALES CHANNELS"] - }, - "put": { - "operationId": "Update Sales Channel", - "summary": "Update Sales Channel", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "color": { - "type": "string" - } - } - } - } - }, - "x-examples": { - "application/json": { - "name": "My second brand new channel", - "desc": "Second income stream modified", - "color": "#507C6C" - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5ac4f2cec839ea004e18a463" - } - } - } - } - } - } - }, - "tags": ["SALES CHANNELS"] - }, - "delete": { - "operationId": "Delete Sales Channel", - "summary": "Delete Sales Channel", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" - } - } - } - } - } - } - }, - "tags": ["SALES CHANNELS"] - } - }, - "/payments": { - "get": { - "parameters": [ - { - "name": "starttmp", - "in": "query", - "description": "Starting timestamp", - "schema": { - "type": "string" - } - }, - { - "name": "endtmp", - "in": "query", - "description": "Ending timestamp", - "schema": { - "type": "string" - } - } - ], - "operationId": "List Payments", - "summary": "List Payments", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "bankId": { - "type": "string" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "amount": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "date": { - "type": "integer" - } - } - } - }, - "examples": { - "response": { - "value": [ - { - "id": "5aaa81685b7064004342fd82", - "bankId": "", - "contactId": "", - "contactName": "", - "amount": 100, - "desc": "Gift", - "date": 1521068400 - }, - { - "id": "5aaa82455b7064004e0bbd02", - "bankId": "5aaa82095b70640046270413", - "contactId": "5aaa65e05b706400300ad246", - "contactName": "Benedicto", - "amount": 355, - "desc": "Invoice F17003421", - "date": 1520982000 - }, - { - "id": "5ab4f6f61d6d820023411433", - "bankId": "5aaf71763697ac000a0b34d3", - "contactId": "5aa939a95b70640009653d72", - "contactName": "Bose QC", - "amount": 290, - "desc": "Invoice F170001 ", - "date": 1521759600 - } - ] - } - } - } - } - } - }, - "tags": ["PAYMENTS"] - }, - "post": { - "operationId": "Create Payment", - "summary": "Create Payment", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "bankId": { - "type": "string" - }, - "contactId": { - "type": "string" - }, - "amount": { - "type": "number" - }, - "desc": { - "type": "string" - }, - "date": { - "type": "integer" - } - } - } - } - }, - "x-examples": { - "application/json": { - "bankId": "5aaa82095b70640046270413", - "contactId": "5aaa65e05b706400300ad246", - "amount": 355, - "desc": "Invoice F17003421", - "date": 1520982000 - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Created", - "id": "5ac4f2cec839ea004e18a463" - } - } - } - } - } - } - }, - "tags": ["PAYMENTS"] - } - }, - "/payments/{paymentId}": { - "parameters": [ - { - "name": "paymentId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "operationId": "Get Payment", - "summary": "Get Payment", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "bankId": { - "type": "string" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "amount": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "date": { - "type": "integer" - } - } - }, - "examples": { - "response": { - "value": { - "id": "5ab4f6f61d6d820023411433", - "bankId": "5aaf71763697ac000a0b34d3", - "contactId": "5aa939a95b70640009653d72", - "contactName": "Bose QC", - "amount": 290, - "desc": "Invoice F170001 ", - "date": 1521759600 - } - } - } - } - } - } - }, - "tags": ["PAYMENTS"] - }, - "put": { - "operationId": "Update Payment", - "summary": "Update Payment", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "bankId": { - "type": "string" - }, - "contactId": { - "type": "string" - }, - "amount": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "date": { - "type": "integer" - } - } - } - } - }, - "x-examples": { - "application/json": { - "bankId": "5aaf71763697ac000a0b34d3", - "contactId": "5aa939a95b70640009653d72", - "amount": 290, - "desc": "Invoice F170001 ", - "date": 1521759600 - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5aba68b1c5d438006425ad45" - } - } - } - } - } - } - }, - "tags": ["PAYMENTS"] - }, - "delete": { - "operationId": "Delete Payment", - "summary": "Delete Payment", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" - } - } - } - } - } - } - }, - "tags": ["PAYMENTS"] - } - }, - "/documents/{docType}": { - "parameters": [ - { - "name": "docType", - "in": "path", - "required": true, - "description": "docType should be one of: {invoice, salesreceipt, creditnote, salesorder, proform, waybill,estimate, purchase, purchaseorder or purchaserefund}", - "schema": { - "type": "string" - } - } - ], - "get": { - "parameters": [ - { - "name": "docType", - "in": "path", - "required": true, - "description": "docType should be one of: {invoice, salesreceipt, creditnote, salesorder, proform, waybill,estimate, purchase, purchaseorder or purchaserefund}", - "schema": { - "type": "string" - } - }, - { - "name": "starttmp", - "in": "query", - "description": "Starting timestamp", - "schema": { - "type": "string" - } - }, - { - "name": "endtmp", - "in": "query", - "description": "Ending timestamp", - "schema": { - "type": "string" - } - }, - { - "name": "contactid", - "in": "query", - "description": "Filtering by contact Id", - "schema": { - "type": "string" - } - }, - { - "name": "paid", - "in": "query", - "description": "Filtering by paid status. 0 = not paid, 1 = paid, 2 = partially paid", - "schema": { - "type": "string" - } - }, - { - "name": "billed", - "in": "query", - "description": "Filtering by billed status. 0 = not billed, 1 = billed", - "schema": { - "type": "string" - } - }, - { - "name": "sort", - "in": "query", - "description": "Sort documents. Options: `created-asc` to sort by creation date of documents in ascending order or `created-desc` to sort by creation date of documents in descending order", - "schema": { - "type": "string" - } - } - ], - "operationId": "List Documents", - "summary": "List Documents", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "title": "Document Basic Output", - "description": "The properties that are included when fetching a list of Documents.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Document Common", - "description": "The properties that are shared amongst all versions of the Document model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "contact": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - }, - "notes": { - "type": "string" - }, - "products": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "price": { - "type": "integer" - }, - "units": { - "type": "integer" - }, - "tax": { - "type": "integer" - }, - "discount": { - "type": "integer" - }, - "retention": { - "type": "integer" - }, - "weight": { - "type": "integer" - }, - "costPrice": { - "type": "integer" - }, - "sku": { - "type": "string" - }, - "productId": { - "type": "string" - } - } - } - }, - "tax": { - "type": "number" - }, - "subtotal": { - "type": "number" - }, - "discount": { - "type": "integer" - }, - "total": { - "type": "number" - }, - "language": { - "type": "string" - }, - "status": { - "type": "integer" - }, - "customFields": { - "type": "array", - "items": { - "type": "object", - "properties": { - "field": { - "type": "string" - }, - "value": { - "type": "string" - } - } - } - }, - "docNumber": { - "type": "string" - }, - "currency": { - "type": "string" - }, - "currencyChange": { - "type": "integer" - }, - "paymentsTotal": { - "type": "integer" - }, - "paymentsPending": { - "type": "number" - }, - "paymentsRefunds": { - "type": "integer" - }, - "salesChannelId": { - "type": "string" - } - }, - "x-readme-ref-name": "document-common" - } - ], - "x-readme-ref-name": "document-output" - } - }, - "examples": { - "response": { - "value": {} - } - } - }, - "new": { - "examples": { - "response": { - "value": [ - { - "id": "5ab391071d6d820034294783", - "contact": "5aa939a95b70640009653d72", - "contactName": "Mapple Inc", - "desc": "description goes here", - "date": 1521673200, - "dueDate": 1521673200, - "notes": "notes go here", - "products": [ - { - "name": "Headphone", - "desc": "Best headphones you can buy", - "price": 299, - "units": 1, - "tax": 21, - "discount": 0, - "retention": 0, - "weight": 200, - "costPrice": 110, - "sku": "21324t1gv", - "productId": "5acccbe412d56e004903a385#5acccbe412d56e004903a384" - } - ], - "tax": 234.61, - "subtotal": 1117.18, - "discount": 0, - "total": 1351.79, - "language": "en", - "status": 2, - "customFields": [ - { - "field": "FieldOne", - "value": "noValue" - } - ], - "docNumber": "F170001", - "currency": "eur", - "currencyChange": 1, - "paymentsTotal": 290, - "paymentsPending": 1061.79, - "paymentsRefunds": 0, - "salesChannelId": "5aba667fc5d438006425ad44" - } - ] - } - } - } - } - } - }, - "tags": ["DOCUMENTS"], - "description": "Get all your documents by type." - }, - "post": { - "operationId": "Create Document", - "summary": "Create Document", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "applyContactDefaults": { - "type": "boolean", - "description": "Contact defaults are applied by default. If you don't want to apply it, set this field to false" - }, - "contactCode": { - "type": "string", - "description": "(NIF / CIF / VAT) Field required if you want to choose an existing contact and contactId field is empty" - }, - "contactId": { - "type": "string", - "description": "(Contact ID) Field required if you want to choose an existing contact and contactCode field is empty" - }, - "contactName": { - "type": "string", - "description": "Field required if contactCode and contactId fields are empty and you want to create a new contact" - }, - "contactEmail": { - "type": "string" - }, - "contactAddress": { - "type": "string" - }, - "contactCity": { - "type": "string" - }, - "contactCp": { - "type": "string" - }, - "contactProvince": { - "type": "string" - }, - "contactCountryCode": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "notes": { - "type": "string" - }, - "salesChannelId": { - "type": "string", - "description": "Set an existing account id" - }, - "paymentMethodId": { - "type": "string" - }, - "designId": { - "type": "string" - }, - "language": { - "type": "string" - }, - "warehouseId": { - "type": "string", - "description": "Choose the warehouse for your salesorder, purchaseorder or waybill." - }, - "approveDoc": { - "type": "boolean", - "description": "Choose if the document needs to be approved or not. The default option is False." - }, - "items": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "units": { - "type": "number" - }, - "sku": { - "type": "string" - }, - "serviceId": { - "type": "string" - }, - "accountingAccountId": { - "type": "string" - }, - "subtotal": { - "type": "number" - }, - "discount": { - "type": "number" - }, - "tax": { - "type": "integer", - "description": "IVA percentage. In case you need to inform more than one tax, use the field taxes instead" - }, - "taxes": { - "type": "array", - "description": "Comma separated Tax keys. e.g. (s_iva_21,s_ret_19)", - "items": { - "type": "string" - } - }, - "supplied": { - "type": "string", - "description": "Optional (Yes/No)" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - }, - "customFields": { - "type": "array", - "items": { - "type": "object", - "properties": { - "field": { - "type": "string" - }, - "value": { - "type": "string" - } - } - } - }, - "invoiceNum": { - "type": "string" - }, - "numSerieId": { - "type": "string" - }, - "currency": { - "type": "string" - }, - "currencyChange": { - "type": "number" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "dueDate": { - "type": "integer" - }, - "shippingAddress": { - "type": "string" - }, - "shippingPostalCode": { - "type": "string" - }, - "shippingCity": { - "type": "string" - }, - "shippingProvince": { - "type": "string" - }, - "shippingCountry": { - "type": "string" - }, - "salesChannel": { - "type": "number" - } - }, - "required": ["date"] - } - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "title": "Document Detailed Output", - "description": "The properties that are included when fetching a single Document.", - "allOf": [ - { - "title": "Document Basic Output", - "description": "The properties that are included when fetching a list of Documents.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Document Common", - "description": "The properties that are shared amongst all versions of the Document model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "contact": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - }, - "notes": { - "type": "string" - }, - "products": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "price": { - "type": "integer" - }, - "units": { - "type": "integer" - }, - "tax": { - "type": "integer" - }, - "discount": { - "type": "integer" - }, - "retention": { - "type": "integer" - }, - "weight": { - "type": "integer" - }, - "costPrice": { - "type": "integer" - }, - "sku": { - "type": "string" - }, - "productId": { - "type": "string" - } - } - } - }, - "tax": { - "type": "number" - }, - "subtotal": { - "type": "number" - }, - "discount": { - "type": "integer" - }, - "total": { - "type": "number" - }, - "language": { - "type": "string" - }, - "status": { - "type": "integer" - }, - "customFields": { - "type": "array", - "items": { - "type": "object", - "properties": { - "field": { - "type": "string" - }, - "value": { - "type": "string" - } - } - } - }, - "docNumber": { - "type": "string" - }, - "currency": { - "type": "string" - }, - "currencyChange": { - "type": "integer" - }, - "paymentsTotal": { - "type": "integer" - }, - "paymentsPending": { - "type": "number" - }, - "paymentsRefunds": { - "type": "integer" - }, - "salesChannelId": { - "type": "string" - } - }, - "x-readme-ref-name": "document-common" - } - ], - "x-readme-ref-name": "document-output" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "document-output-detailed" - }, - "examples": { - "response": { - "value": { - "status": 1, - "id": "5acce41e12d56e005e0e62d3", - "invoiceNum": "F170009", - "contactId": "5ac3a7b68fbd9d000f07e237" - } - } - } - } - } - } - }, - "tags": ["DOCUMENTS"], - "description": "Create a new document type." - } - }, - "/documents/{docType}/{documentId}": { - "parameters": [ - { - "name": "docType", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "documentId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "operationId": "getDocument", - "summary": "Get Document", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "title": "Document Detailed Output", - "description": "The properties that are included when fetching a single Document.", - "allOf": [ - { - "title": "Document Basic Output", - "description": "The properties that are included when fetching a list of Documents.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Document Common", - "description": "The properties that are shared amongst all versions of the Document model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "contact": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - }, - "notes": { - "type": "string" - }, - "products": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "price": { - "type": "integer" - }, - "units": { - "type": "integer" - }, - "tax": { - "type": "integer" - }, - "discount": { - "type": "integer" - }, - "retention": { - "type": "integer" - }, - "weight": { - "type": "integer" - }, - "costPrice": { - "type": "integer" - }, - "sku": { - "type": "string" - }, - "productId": { - "type": "string" - } - } - } - }, - "tax": { - "type": "number" - }, - "subtotal": { - "type": "number" - }, - "discount": { - "type": "integer" - }, - "total": { - "type": "number" - }, - "language": { - "type": "string" - }, - "status": { - "type": "integer" - }, - "customFields": { - "type": "array", - "items": { - "type": "object", - "properties": { - "field": { - "type": "string" - }, - "value": { - "type": "string" - } - } - } - }, - "docNumber": { - "type": "string" - }, - "currency": { - "type": "string" - }, - "currencyChange": { - "type": "integer" - }, - "paymentsTotal": { - "type": "integer" - }, - "paymentsPending": { - "type": "number" - }, - "paymentsRefunds": { - "type": "integer" - }, - "salesChannelId": { - "type": "string" - } - }, - "x-readme-ref-name": "document-common" - } - ], - "x-readme-ref-name": "document-output" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "document-output-detailed" - } - } - } - } - }, - "tags": ["DOCUMENTS"], - "description": "Get a specific document." - }, - "put": { - "operationId": "Update Document", - "summary": "Update Document", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "desc": { - "type": "string" - }, - "notes": { - "type": "string" - }, - "language": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "paymentMethod": { - "type": "string" - }, - "warehouseId": { - "type": "string", - "description": "Choose the warehouse for your salesorder, purchaseorder or waybill." - }, - "items": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "subtotal": { - "type": "integer" - }, - "tax": { - "type": "integer" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "units": { - "type": "integer" - }, - "discount": { - "type": "integer" - }, - "accountingAccountId": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "sku": { - "type": "string" - }, - "lotSku": { - "type": "string" - }, - "supplied": { - "type": "string", - "description": "Optional (Yes/No)" - } - } - } - }, - "salesChannelId": { - "type": "string" - }, - "expAccountId": { - "type": "string" - }, - "customFields": { - "type": "array", - "items": { - "type": "object", - "properties": { - "field": { - "type": "string" - }, - "value": { - "type": "string" - } - } - } - } - } - } - } - }, - "x-examples": { - "application/json": { - "desc": "description goes here", - "notes": "notes goes here", - "language": "es", - "date": 15243534, - "paymentMethod": "3243546", - "products": [ - { - "name": "item name", - "desc": "item desc", - "subtotal": 344, - "tax": 21, - "units": 3, - "discount": 0 - } - ], - "salesChannelId": "345463o5hj432kjb4o23n1l5j5", - "expAccountId": "345463o5hj43n1l5jowr3onb5" - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5ac4f2cec839ea004e18a463" - } - } - } - } - } - } - }, - "tags": ["DOCUMENTS"], - "description": "Update a specific document. {lotSku} field is only needed when {kind} is lots." - }, - "delete": { - "operationId": "Delete Document", - "summary": "Delete Document", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" - } - } - } - } - } - } - }, - "tags": ["DOCUMENTS"], - "description": "Delete specific document type." - } - }, - "/documents/{docType}/{documentId}/pay": { - "parameters": [ - { - "name": "docType", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "documentId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "post": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "invoiceId": { - "type": "string" - }, - "invoiceNum": { - "type": "string" - }, - "paymentId": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "invoiceId": "13f14gl5i46ñ5b64vp1535", - "invoiceNum": "F170007", - "paymentId": "3245bkjblhj3v2k6vl4bhbv145b" - } - } - } - } - } - } - }, - "operationId": "Pay Document", - "summary": "Pay Document", - "tags": ["DOCUMENTS"], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "date": { - "type": "integer" - }, - "treasury": { - "type": "string", - "description": "Your treasury holded's id" - }, - "desc": { - "type": "string" - }, - "amount": { - "type": "number" - } - }, - "required": ["date", "amount"] - } - } - }, - "x-examples": { - "application/json": { - "date": 1513245364, - "treasury": "4156257683", - "desc": "description", - "amount": 345 - } - } - }, - "description": "Pay one specific document" - } - }, - "/documents/{docType}/{documentId}/send": { - "post": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Document sent" - } - } - } - } - } - } - }, - "operationId": "Send Document", - "summary": "Send Document", - "tags": ["DOCUMENTS"], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": ["emails"], - "properties": { - "mailTemplateId": { - "type": "string" - }, - "emails": { - "type": "string" - }, - "subject": { - "type": "string", - "minLength": 10, - "description": "Minimum 10 characters" - }, - "message": { - "type": "string", - "minLength": 20, - "description": "Minimum 20 characters" - }, - "docIds": { - "type": "string" - } - } - } - } - }, - "x-examples": { - "application/json": { - "mailTemplateId": "456lkn5er467522115", - "emails": "email@example.com, email2@example.com", - "subject": "subject email", - "message": "email messages goes here", - "docIds": "" - } - } - }, - "description": "Send a specific document by email." - }, - "parameters": [ - { - "name": "docType", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "documentId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "/documents/{docType}/{documentId}/pdf": { - "get": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "data": "<>" - } - } - } - } - } - } - }, - "operationId": "GetDocumentPDF", - "summary": "Get Document PDF", - "tags": ["DOCUMENTS"], - "description": "Get a specific document pdf." - }, - "parameters": [ - { - "name": "docType", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "documentId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "/documents/salesorder/{documentId}/shipall": { - "post": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Items Shipped" - } - } - } - } - } - } - }, - "operationId": "Ship all items", - "summary": "Ship All Items", - "tags": ["DOCUMENTS"], - "description": "Ship all the items of a specific sales order." - }, - "parameters": [ - { - "name": "documentId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "/documents/salesorder/{documentId}/shipbylines": { - "post": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Items Shipped" - } - } - } - } - } - } - }, - "operationId": "Ship items by line", - "summary": "Ship items by line", - "tags": ["DOCUMENTS"], - "description": "Ship a specific item of a specific sales order (itemLinePosition starts at 0).", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "lines": { - "type": "array", - "items": { - "type": "object", - "properties": { - "itemLinePosition": { - "type": "integer" - }, - "units": { - "type": "integer" - } - } - } - } - } - } - } - } - } - }, - "parameters": [ - { - "name": "documentId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "/documents/{docType}/{documentId}/shippeditems": { - "parameters": [ - { - "name": "docType", - "in": "path", - "required": true, - "description": "docType should be one of: {salesorder, order}", - "schema": { - "type": "string" - } - }, - { - "name": "documentId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "sku": { - "type": "string" - }, - "total": { - "type": "number" - }, - "sent": { - "type": "number" - }, - "pending": { - "type": "number" - } - } - } - } - } - } - } - }, - "operationId": "Shipped units by item", - "summary": "Shipped units by item", - "tags": ["DOCUMENTS"], - "description": "For each item included in a sales or purchase order, get the number of units shipped or recieved." - } - }, - "/documents/{docType}/{documentId}/attach": { - "post": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "data": "<>" - } - } - } - } - } - } - }, - "operationId": "Attach File", - "summary": "Attach File to a specific document", - "parameters": [ - { - "name": "docType", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "documentId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "description": "The file to upload.", - "type": "string", - "format": "binary" - }, - "setMain": { - "type": "boolean" - } - } - } - } - } - }, - "tags": ["DOCUMENTS"], - "description": "Attach File to a specific document." - } - }, - "/documents/{docType}/{documentId}/updatetracking": { - "post": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "data": "Updated" - } - } - } - } - } - } - }, - "operationId": "Update tracking info", - "summary": "Update tracking info from specific document.", - "tags": ["DOCUMENTS"], - "description": "Update tracking info from specific document.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "example": "correos", - "description": "key should be one of: {mrw, ups, fedex,tnt, seur, nacex, correos, asm, uspostalservice, dbschenker, royalmail, bluedart, palletways, correosexpress, tourline, other (for custom)}" - }, - "name": { - "type": "string", - "example": "correos", - "description": "name should be one of: {mrw, ups, fedex,tnt, seur, nacex, correos, asm, United States Postal Service, dbschenker, royalmail, bluedart, palletways, correosexpress, tourline, custom name (for custom)}" - }, - "num": { - "type": "string", - "example": "1,2-3", - "description": "Tracking numbers. Can be added more numbers separated by , or -" - }, - "pickUpDate": { - "type": "string", - "example": "01/01/2020", - "description": "pickUpDate should be formated like DD/MM/YYYY" - }, - "deliveryDate": { - "type": "string", - "example": "01/01/2020", - "description": "deliveryDate should be formated like DD/MM/YYYY" - }, - "notes": { - "type": "string", - "example": "note", - "description": "notes for the tracking" - } - } - } - } - } - } - }, - "parameters": [ - { - "name": "documentId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "docType", - "in": "path", - "required": true, - "description": "docType should be one of: {salesorder, waybill}", - "schema": { - "type": "string" - } - } - ] - }, - "/documents/{docType}/{documentId}/pipeline/set": { - "post": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Done" - } - } - } - } - } - } - }, - "operationId": "Update document pipeline", - "summary": "Update pipeline from specific document.", - "tags": ["DOCUMENTS"], - "description": "Update pipeline from specific document.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "pipeline": { - "type": "string" - } - } - } - } - } - } - }, - "parameters": [ - { - "name": "documentId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "docType", - "in": "path", - "description": "docType should be one of: {salesorder, waybill}", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "/paymentmethods": { - "get": { - "responses": { - "200": { - "description": "List Payment methods", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "dueDays": { - "type": "string" - }, - "bankId": { - "type": "string" - } - } - } - } - } - } - }, - "operationId": "List Payment methods", - "summary": "List Payment methods", - "tags": ["DOCUMENTS"], - "description": "List Payment methods" - } - }, - "/remittances": { - "get": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "summary": "List Remittances", - "operationId": "List Remittances", - "tags": ["REMITTANCES"], - "security": [ - { - "Auth": [] - } - ] - } - }, - "/remittances/{remittanceId}": { - "get": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "operationId": "Get Remittance", - "summary": "Get Remittance", - "tags": ["REMITTANCES"] - }, - "parameters": [ - { - "name": "remittanceId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "/products/{productId}/image": { - "get": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "summary": "Get Product Main Image", - "description": "Get the main image of a specific product", - "operationId": "Get Product Image", - "tags": ["PRODUCTS"] - }, - "parameters": [ - { - "name": "productId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "/products/{productId}/imagesList": { - "get": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "summary": "List Product Images", - "operationId": "List Product Images", - "tags": ["PRODUCTS"], - "description": "List all secondary product images" - }, - "parameters": [ - { - "name": "productId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "/products/{productId}/image/{imageFileName}": { - "get": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {} - } - } - } - } - }, - "summary": "Get Product Secondary Image", - "tags": ["PRODUCTS"], - "description": "Get a specific secondary Image" - }, - "parameters": [ - { - "name": "productId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "imageFileName", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "/products/{productId}/stock": { - "parameters": [ - { - "name": "productId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "put": { - "operationId": "Update Product stock", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "stock": { - "type": "object", - "additionalProperties": { - "type": "object", - "description": "WarehouseId's", - "additionalProperties": { - "type": "number", - "description": "ProductId or VariantId followed by stock to update", - "default": { - "ProductId": 1 - } - } - } - } - } - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5aa97e595b706400153f9f94" - } - } - } - } - } - } - }, - "tags": ["PRODUCTS"], - "summary": "Update Product stock" - } - }, - "/services": { - "get": { - "operationId": "List Services", - "summary": "List Services", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "balance": { - "type": "integer" - }, - "accountNumber": { - "type": "integer" - }, - "iban": { - "type": "string" - }, - "swift": { - "type": "string" - }, - "bank": { - "type": "string" - }, - "bankname": { - "type": "string" - } - } - } - } - } - } - } - }, - "tags": ["SERVICES"] - }, - "post": { - "operationId": "Create Service", - "summary": "Create Service", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "tax": { - "type": "number" - }, - "subtotal": { - "type": "integer" - }, - "salesChannelId": { - "type": "string" - }, - "cost": { - "type": "number" - } - } - } - } - } - }, - "responses": { - "201": { - "description": "" - } - }, - "tags": ["SERVICES"] - } - }, - "/services/{serviceId}": { - "parameters": [ - { - "name": "serviceId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "operationId": "Get Service", - "summary": "Get Service", - "responses": { - "200": { - "description": "" - } - }, - "tags": ["SERVICES"] - }, - "put": { - "operationId": "Update Service", - "summary": "Update Service", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "tax": { - "type": "number" - }, - "subtotal": { - "type": "integer" - }, - "salesChannelId": { - "type": "string" - }, - "cost": { - "type": "number" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "title": "Bank Detailed Output", - "description": "The properties that are included when fetching a single Bank.", - "allOf": [ - { - "title": "Bank Basic Output", - "description": "The properties that are included when fetching a list of Banks.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Bank Common", - "description": "The properties that are shared amongst all versions of the Bank model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "balance": { - "type": "integer" - }, - "accountNumber": { - "type": "integer" - }, - "iban": { - "type": "string" - }, - "swift": { - "type": "string" - }, - "bank": { - "type": "string" - }, - "bankname": { - "type": "string" - } - }, - "x-readme-ref-name": "bank-common" - } - ], - "x-readme-ref-name": "bank-output" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "bank-output-detailed" - } - } - } - } - }, - "tags": ["SERVICES"] - }, - "delete": { - "operationId": "Delete Service", - "summary": "Delete Service", - "responses": { - "200": { - "description": "" - } - }, - "tags": ["SERVICES"] - } - } - }, - "tags": [ - { - "name": "TREASURIES" - }, - { - "name": "CONTACTS" - }, - { - "name": "EXPENSES ACCOUNTS" - }, - { - "name": "NUMBERING SERIES" - }, - { - "name": "PRODUCTS" - }, - { - "name": "SALES CHANNELS" - }, - { - "name": "WAREHOUSES" - }, - { - "name": "PAYMENTS" - }, - { - "name": "TAXES" - }, - { - "name": "DOCUMENTS" - } - ], - "security": [ - { - "Auth": [] - } - ], - "servers": [ - { - "url": "https://api.holded.com/api/invoicing/v1" - } - ], - "components": { - "responses": { - "Standard_Error": { - "description": "Something went wrong", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 0, - "info": "Not found" - } - } - } - } - } - } - }, - "requestBodies": { - "Create_ServiceBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "tax": { - "type": "number" - }, - "subtotal": { - "type": "integer" - }, - "salesChannelId": { - "type": "string" - }, - "cost": { - "type": "number" - } - } - } - } - } - } - }, - "securitySchemes": { - "Auth": { - "type": "apiKey", - "name": "key", - "in": "header" - } - }, - "schemas": { - "contact-common": { - "title": "Contact Common", - "description": "The properties that are shared amongst all versions of the Contact model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "customId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "code": { - "type": "string" - }, - "tradeName": { - "type": "string" - }, - "email": { - "type": "string" - }, - "mobile": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "type": { - "type": "string" - }, - "iban": { - "type": "string" - }, - "swift": { - "type": "string" - }, - "clientRecord": { - "type": "integer" - }, - "supplierRecord": { - "type": "integer" - }, - "billAddress": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "province": { - "type": "string" - }, - "country": { - "type": "string" - }, - "countryCode": { - "type": "string" - }, - "info": { - "type": "string" - } - } - }, - "defaults": { - "type": "object", - "properties": { - "salesChannel": { - "type": "integer" - }, - "expensesAccount": { - "type": "integer" - }, - "dueDays": { - "type": "integer" - }, - "paymentMethod": { - "type": "integer" - }, - "discount": { - "type": "integer" - }, - "language": { - "type": "string" - }, - "currency": { - "type": "string" - }, - "tax": { - "type": "string" - }, - "retention": { - "type": "string" - } - } - }, - "socialNetworks": { - "type": "object", - "properties": { - "website": { - "type": "string" - } - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "notes": { - "type": "array", - "items": { - "type": "object", - "properties": { - "noteId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "color": { - "type": "string" - }, - "updatedAt": { - "type": "integer" - }, - "userId": { - "type": "string" - } - } - } - }, - "contactPersons": { - "type": "array", - "items": { - "type": "object", - "properties": { - "personId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "job": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "email": { - "type": "string" - }, - "sendDocumentsByDefault": { - "type": "boolean" - }, - "linkedin": { - "type": "string" - } - } - } - }, - "shippingAddresses": { - "type": "array", - "items": { - "type": "object", - "properties": { - "shippingId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "province": { - "type": "string" - }, - "country": { - "type": "string" - }, - "countryCode": { - "type": "string" - }, - "notes": { - "type": "string" - }, - "privateNotes": { - "type": "string" - } - } - } - } - }, - "x-readme-ref-name": "contact-common" - }, - "contact-input": { - "title": "Contact Input", - "description": "The properties that are allowed when creating or updating a Contact.", - "allOf": [ - { - "title": "Contact Common", - "description": "The properties that are shared amongst all versions of the Contact model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "customId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "code": { - "type": "string" - }, - "tradeName": { - "type": "string" - }, - "email": { - "type": "string" - }, - "mobile": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "type": { - "type": "string" - }, - "iban": { - "type": "string" - }, - "swift": { - "type": "string" - }, - "clientRecord": { - "type": "integer" - }, - "supplierRecord": { - "type": "integer" - }, - "billAddress": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "province": { - "type": "string" - }, - "country": { - "type": "string" - }, - "countryCode": { - "type": "string" - }, - "info": { - "type": "string" - } - } - }, - "defaults": { - "type": "object", - "properties": { - "salesChannel": { - "type": "integer" - }, - "expensesAccount": { - "type": "integer" - }, - "dueDays": { - "type": "integer" - }, - "paymentMethod": { - "type": "integer" - }, - "discount": { - "type": "integer" - }, - "language": { - "type": "string" - }, - "currency": { - "type": "string" - }, - "tax": { - "type": "string" - }, - "retention": { - "type": "string" - } - } - }, - "socialNetworks": { - "type": "object", - "properties": { - "website": { - "type": "string" - } - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "notes": { - "type": "array", - "items": { - "type": "object", - "properties": { - "noteId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "color": { - "type": "string" - }, - "updatedAt": { - "type": "integer" - }, - "userId": { - "type": "string" - } - } - } - }, - "contactPersons": { - "type": "array", - "items": { - "type": "object", - "properties": { - "personId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "job": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "email": { - "type": "string" - }, - "sendDocumentsByDefault": { - "type": "boolean" - }, - "linkedin": { - "type": "string" - } - } - } - }, - "shippingAddresses": { - "type": "array", - "items": { - "type": "object", - "properties": { - "shippingId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "province": { - "type": "string" - }, - "country": { - "type": "string" - }, - "countryCode": { - "type": "string" - }, - "notes": { - "type": "string" - }, - "privateNotes": { - "type": "string" - } - } - } - } - }, - "x-readme-ref-name": "contact-common" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "contact-input" - }, - "contact-output": { - "title": "Contact Basic Output", - "description": "The properties that are included when fetching a list of Contacts.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Contact Common", - "description": "The properties that are shared amongst all versions of the Contact model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "customId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "code": { - "type": "string" - }, - "tradeName": { - "type": "string" - }, - "email": { - "type": "string" - }, - "mobile": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "type": { - "type": "string" - }, - "iban": { - "type": "string" - }, - "swift": { - "type": "string" - }, - "clientRecord": { - "type": "integer" - }, - "supplierRecord": { - "type": "integer" - }, - "billAddress": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "province": { - "type": "string" - }, - "country": { - "type": "string" - }, - "countryCode": { - "type": "string" - }, - "info": { - "type": "string" - } - } - }, - "defaults": { - "type": "object", - "properties": { - "salesChannel": { - "type": "integer" - }, - "expensesAccount": { - "type": "integer" - }, - "dueDays": { - "type": "integer" - }, - "paymentMethod": { - "type": "integer" - }, - "discount": { - "type": "integer" - }, - "language": { - "type": "string" - }, - "currency": { - "type": "string" - }, - "tax": { - "type": "string" - }, - "retention": { - "type": "string" - } - } - }, - "socialNetworks": { - "type": "object", - "properties": { - "website": { - "type": "string" - } - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "notes": { - "type": "array", - "items": { - "type": "object", - "properties": { - "noteId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "color": { - "type": "string" - }, - "updatedAt": { - "type": "integer" - }, - "userId": { - "type": "string" - } - } - } - }, - "contactPersons": { - "type": "array", - "items": { - "type": "object", - "properties": { - "personId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "job": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "email": { - "type": "string" - }, - "sendDocumentsByDefault": { - "type": "boolean" - }, - "linkedin": { - "type": "string" - } - } - } - }, - "shippingAddresses": { - "type": "array", - "items": { - "type": "object", - "properties": { - "shippingId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "province": { - "type": "string" - }, - "country": { - "type": "string" - }, - "countryCode": { - "type": "string" - }, - "notes": { - "type": "string" - }, - "privateNotes": { - "type": "string" - } - } - } - } - }, - "x-readme-ref-name": "contact-common" - } - ], - "x-readme-ref-name": "contact-output" - }, - "contact-output-detailed": { - "title": "Contact Detailed Output", - "description": "The properties that are included when fetching a single Contact.", - "allOf": [ - { - "title": "Contact Basic Output", - "description": "The properties that are included when fetching a list of Contacts.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Contact Common", - "description": "The properties that are shared amongst all versions of the Contact model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "customId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "code": { - "type": "string" - }, - "tradeName": { - "type": "string" - }, - "email": { - "type": "string" - }, - "mobile": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "type": { - "type": "string" - }, - "iban": { - "type": "string" - }, - "swift": { - "type": "string" - }, - "clientRecord": { - "type": "integer" - }, - "supplierRecord": { - "type": "integer" - }, - "billAddress": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "province": { - "type": "string" - }, - "country": { - "type": "string" - }, - "countryCode": { - "type": "string" - }, - "info": { - "type": "string" - } - } - }, - "defaults": { - "type": "object", - "properties": { - "salesChannel": { - "type": "integer" - }, - "expensesAccount": { - "type": "integer" - }, - "dueDays": { - "type": "integer" - }, - "paymentMethod": { - "type": "integer" - }, - "discount": { - "type": "integer" - }, - "language": { - "type": "string" - }, - "currency": { - "type": "string" - }, - "tax": { - "type": "string" - }, - "retention": { - "type": "string" - } - } - }, - "socialNetworks": { - "type": "object", - "properties": { - "website": { - "type": "string" - } - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "notes": { - "type": "array", - "items": { - "type": "object", - "properties": { - "noteId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "color": { - "type": "string" - }, - "updatedAt": { - "type": "integer" - }, - "userId": { - "type": "string" - } - } - } - }, - "contactPersons": { - "type": "array", - "items": { - "type": "object", - "properties": { - "personId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "job": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "email": { - "type": "string" - }, - "sendDocumentsByDefault": { - "type": "boolean" - }, - "linkedin": { - "type": "string" - } - } - } - }, - "shippingAddresses": { - "type": "array", - "items": { - "type": "object", - "properties": { - "shippingId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "province": { - "type": "string" - }, - "country": { - "type": "string" - }, - "countryCode": { - "type": "string" - }, - "notes": { - "type": "string" - }, - "privateNotes": { - "type": "string" - } - } - } - } - }, - "x-readme-ref-name": "contact-common" - } - ], - "x-readme-ref-name": "contact-output" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "contact-output-detailed" - }, - "product-common": { - "title": "Product Common", - "description": "The properties that are shared amongst all versions of the Product model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "typeId": { - "type": "string" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "price": { - "type": "integer" - }, - "tax": { - "type": "integer" - }, - "total": { - "type": "number" - }, - "rates": { - "type": "array", - "items": { - "type": "object" - } - }, - "hasStock": { - "type": "integer" - }, - "stock": { - "type": "integer" - }, - "barcode": { - "type": "string" - }, - "sku": { - "type": "string" - }, - "cost": { - "type": "integer" - }, - "purchasePrice": { - "type": "number" - }, - "weight": { - "type": "number" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "categoryId": { - "type": "string" - }, - "factoryCode": { - "type": "string" - }, - "attributes": { - "type": "array", - "items": { - "type": "object" - } - }, - "forSale": { - "type": "integer" - }, - "forPurchase": { - "type": "integer" - }, - "salesChannelId": { - "type": "string" - }, - "expAccountId": { - "type": "string" - }, - "warehouseId": { - "type": "string" - }, - "variants": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "barcode": { - "type": "string" - }, - "sku": { - "type": "string" - }, - "price": { - "type": "integer" - }, - "cost": { - "type": "integer" - }, - "purchasePrice": { - "type": "number" - }, - "stock": { - "type": "integer" - } - } - } - } - }, - "x-readme-ref-name": "product-common" - }, - "product-input": { - "title": "Product Input", - "description": "The properties that are allowed when creating or updating a Product.", - "allOf": [ - { - "title": "Product Common", - "description": "The properties that are shared amongst all versions of the Product model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "typeId": { - "type": "string" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "price": { - "type": "integer" - }, - "tax": { - "type": "integer" - }, - "total": { - "type": "number" - }, - "rates": { - "type": "array", - "items": { - "type": "object" - } - }, - "hasStock": { - "type": "integer" - }, - "stock": { - "type": "integer" - }, - "barcode": { - "type": "string" - }, - "sku": { - "type": "string" - }, - "cost": { - "type": "integer" - }, - "purchasePrice": { - "type": "number" - }, - "weight": { - "type": "number" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "categoryId": { - "type": "string" - }, - "factoryCode": { - "type": "string" - }, - "attributes": { - "type": "array", - "items": { - "type": "object" - } - }, - "forSale": { - "type": "integer" - }, - "forPurchase": { - "type": "integer" - }, - "salesChannelId": { - "type": "string" - }, - "expAccountId": { - "type": "string" - }, - "warehouseId": { - "type": "string" - }, - "variants": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "barcode": { - "type": "string" - }, - "sku": { - "type": "string" - }, - "price": { - "type": "integer" - }, - "cost": { - "type": "integer" - }, - "purchasePrice": { - "type": "number" - }, - "stock": { - "type": "integer" - } - } - } - } - }, - "x-readme-ref-name": "product-common" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "product-input" - }, - "product-output": { - "title": "Product Basic Output", - "description": "The properties that are included when fetching a list of Products.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Product Common", - "description": "The properties that are shared amongst all versions of the Product model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "typeId": { - "type": "string" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "price": { - "type": "integer" - }, - "tax": { - "type": "integer" - }, - "total": { - "type": "number" - }, - "rates": { - "type": "array", - "items": { - "type": "object" - } - }, - "hasStock": { - "type": "integer" - }, - "stock": { - "type": "integer" - }, - "barcode": { - "type": "string" - }, - "sku": { - "type": "string" - }, - "cost": { - "type": "integer" - }, - "purchasePrice": { - "type": "number" - }, - "weight": { - "type": "number" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "categoryId": { - "type": "string" - }, - "factoryCode": { - "type": "string" - }, - "attributes": { - "type": "array", - "items": { - "type": "object" - } - }, - "forSale": { - "type": "integer" - }, - "forPurchase": { - "type": "integer" - }, - "salesChannelId": { - "type": "string" - }, - "expAccountId": { - "type": "string" - }, - "warehouseId": { - "type": "string" - }, - "variants": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "barcode": { - "type": "string" - }, - "sku": { - "type": "string" - }, - "price": { - "type": "integer" - }, - "cost": { - "type": "integer" - }, - "purchasePrice": { - "type": "number" - }, - "stock": { - "type": "integer" - } - } - } - } - }, - "x-readme-ref-name": "product-common" - } - ], - "x-readme-ref-name": "product-output" - }, - "product-output-detailed": { - "title": "Product Detailed Output", - "description": "The properties that are included when fetching a single Product.", - "allOf": [ - { - "title": "Product Basic Output", - "description": "The properties that are included when fetching a list of Products.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Product Common", - "description": "The properties that are shared amongst all versions of the Product model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "typeId": { - "type": "string" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "price": { - "type": "integer" - }, - "tax": { - "type": "integer" - }, - "total": { - "type": "number" - }, - "rates": { - "type": "array", - "items": { - "type": "object" - } - }, - "hasStock": { - "type": "integer" - }, - "stock": { - "type": "integer" - }, - "barcode": { - "type": "string" - }, - "sku": { - "type": "string" - }, - "cost": { - "type": "integer" - }, - "purchasePrice": { - "type": "number" - }, - "weight": { - "type": "number" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "categoryId": { - "type": "string" - }, - "factoryCode": { - "type": "string" - }, - "attributes": { - "type": "array", - "items": { - "type": "object" - } - }, - "forSale": { - "type": "integer" - }, - "forPurchase": { - "type": "integer" - }, - "salesChannelId": { - "type": "string" - }, - "expAccountId": { - "type": "string" - }, - "warehouseId": { - "type": "string" - }, - "variants": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "barcode": { - "type": "string" - }, - "sku": { - "type": "string" - }, - "price": { - "type": "integer" - }, - "cost": { - "type": "integer" - }, - "purchasePrice": { - "type": "number" - }, - "stock": { - "type": "integer" - } - } - } - } - }, - "x-readme-ref-name": "product-common" - } - ], - "x-readme-ref-name": "product-output" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "product-output-detailed" - }, - "warehouse-common": { - "title": "Warehouse Common", - "description": "The properties that are shared amongst all versions of the Warehouse model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "email": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "mobile": { - "type": "string" - }, - "address": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "province": { - "type": "string" - }, - "country": { - "type": "string" - }, - "countryCode": { - "type": "string" - } - } - }, - "default": { - "type": "boolean" - }, - "warehouseRecord": { - "type": "integer" - } - }, - "x-readme-ref-name": "warehouse-common" - }, - "warehouse-input": { - "title": "Warehouse Input", - "description": "The properties that are allowed when creating or updating a Warehouse.", - "allOf": [ - { - "title": "Warehouse Common", - "description": "The properties that are shared amongst all versions of the Warehouse model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "email": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "mobile": { - "type": "string" - }, - "address": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "province": { - "type": "string" - }, - "country": { - "type": "string" - }, - "countryCode": { - "type": "string" - } - } - }, - "default": { - "type": "boolean" - }, - "warehouseRecord": { - "type": "integer" - } - }, - "x-readme-ref-name": "warehouse-common" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "warehouse-input" - }, - "warehouse-output": { - "title": "Warehouse Basic Output", - "description": "The properties that are included when fetching a list of Warehouses.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Warehouse Common", - "description": "The properties that are shared amongst all versions of the Warehouse model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "email": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "mobile": { - "type": "string" - }, - "address": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "province": { - "type": "string" - }, - "country": { - "type": "string" - }, - "countryCode": { - "type": "string" - } - } - }, - "default": { - "type": "boolean" - }, - "warehouseRecord": { - "type": "integer" - } - }, - "x-readme-ref-name": "warehouse-common" - } - ], - "x-readme-ref-name": "warehouse-output" - }, - "warehouse-output-detailed": { - "title": "Warehouse Detailed Output", - "description": "The properties that are included when fetching a single Warehouse.", - "allOf": [ - { - "title": "Warehouse Basic Output", - "description": "The properties that are included when fetching a list of Warehouses.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Warehouse Common", - "description": "The properties that are shared amongst all versions of the Warehouse model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "email": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "mobile": { - "type": "string" - }, - "address": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "province": { - "type": "string" - }, - "country": { - "type": "string" - }, - "countryCode": { - "type": "string" - } - } - }, - "default": { - "type": "boolean" - }, - "warehouseRecord": { - "type": "integer" - } - }, - "x-readme-ref-name": "warehouse-common" - } - ], - "x-readme-ref-name": "warehouse-output" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "warehouse-output-detailed" - }, - "bank-common": { - "title": "Bank Common", - "description": "The properties that are shared amongst all versions of the Bank model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "balance": { - "type": "integer" - }, - "accountNumber": { - "type": "integer" - }, - "iban": { - "type": "string" - }, - "swift": { - "type": "string" - }, - "bank": { - "type": "string" - }, - "bankname": { - "type": "string" - } - }, - "x-readme-ref-name": "bank-common" - }, - "bank-input": { - "title": "Bank Input", - "description": "The properties that are allowed when creating or updating a Bank.", - "allOf": [ - { - "title": "Bank Common", - "description": "The properties that are shared amongst all versions of the Bank model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "balance": { - "type": "integer" - }, - "accountNumber": { - "type": "integer" - }, - "iban": { - "type": "string" - }, - "swift": { - "type": "string" - }, - "bank": { - "type": "string" - }, - "bankname": { - "type": "string" - } - }, - "x-readme-ref-name": "bank-common" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "bank-input" - }, - "bank-output": { - "title": "Bank Basic Output", - "description": "The properties that are included when fetching a list of Banks.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Bank Common", - "description": "The properties that are shared amongst all versions of the Bank model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "balance": { - "type": "integer" - }, - "accountNumber": { - "type": "integer" - }, - "iban": { - "type": "string" - }, - "swift": { - "type": "string" - }, - "bank": { - "type": "string" - }, - "bankname": { - "type": "string" - } - }, - "x-readme-ref-name": "bank-common" - } - ], - "x-readme-ref-name": "bank-output" - }, - "bank-output-detailed": { - "title": "Bank Detailed Output", - "description": "The properties that are included when fetching a single Bank.", - "allOf": [ - { - "title": "Bank Basic Output", - "description": "The properties that are included when fetching a list of Banks.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Bank Common", - "description": "The properties that are shared amongst all versions of the Bank model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "balance": { - "type": "integer" - }, - "accountNumber": { - "type": "integer" - }, - "iban": { - "type": "string" - }, - "swift": { - "type": "string" - }, - "bank": { - "type": "string" - }, - "bankname": { - "type": "string" - } - }, - "x-readme-ref-name": "bank-common" - } - ], - "x-readme-ref-name": "bank-output" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "bank-output-detailed" - }, - "numberingSeries-common": { - "title": "Numberingseries Common", - "description": "The properties that are shared amongst all versions of the Numberingseries model.", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "format": { - "type": "string" - }, - "last": { - "type": "string" - } - }, - "x-readme-ref-name": "numberingSeries-common" - }, - "numberingSeries-input": { - "title": "Numberingseries Input", - "description": "The properties that are allowed when creating or updating a Numberingseries.", - "allOf": [ - { - "title": "Numberingseries Common", - "description": "The properties that are shared amongst all versions of the Numberingseries model.", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "format": { - "type": "string" - }, - "last": { - "type": "string" - } - }, - "x-readme-ref-name": "numberingSeries-common" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "numberingSeries-input" - }, - "numberingSeries-output": { - "title": "Numberingseries Basic Output", - "description": "The properties that are included when fetching a list of Numberingseries.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Numberingseries Common", - "description": "The properties that are shared amongst all versions of the Numberingseries model.", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "format": { - "type": "string" - }, - "last": { - "type": "string" - } - }, - "x-readme-ref-name": "numberingSeries-common" - } - ], - "x-readme-ref-name": "numberingSeries-output" - }, - "numberingSeries-output-detailed": { - "title": "Numberingseries Detailed Output", - "description": "The properties that are included when fetching a single Numberingseries.", - "allOf": [ - { - "title": "Numberingseries Basic Output", - "description": "The properties that are included when fetching a list of Numberingseries.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Numberingseries Common", - "description": "The properties that are shared amongst all versions of the Numberingseries model.", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "format": { - "type": "string" - }, - "last": { - "type": "string" - } - }, - "x-readme-ref-name": "numberingSeries-common" - } - ], - "x-readme-ref-name": "numberingSeries-output" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "numberingSeries-output-detailed" - }, - "expensesAccount-common": { - "title": "Expenses account Common", - "description": "The properties that are shared amongst all versions of the Expenses account model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "color": { - "type": "string" - }, - "accNum": { - "type": "integer" - } - }, - "x-readme-ref-name": "expensesAccount-common" - }, - "expensesAccount-input": { - "title": "Expenses account Input", - "description": "The properties that are allowed when creating or updating a Expenses account.", - "allOf": [ - { - "title": "Expenses account Common", - "description": "The properties that are shared amongst all versions of the Expenses account model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "color": { - "type": "string" - }, - "accNum": { - "type": "integer" - } - }, - "x-readme-ref-name": "expensesAccount-common" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "expensesAccount-input" - }, - "expensesAccount-output": { - "title": "Expenses account Basic Output", - "description": "The properties that are included when fetching a list of Expenses accounts.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Expenses account Common", - "description": "The properties that are shared amongst all versions of the Expenses account model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "color": { - "type": "string" - }, - "accNum": { - "type": "integer" - } - }, - "x-readme-ref-name": "expensesAccount-common" - } - ], - "x-readme-ref-name": "expensesAccount-output" - }, - "expensesAccount-output-detailed": { - "title": "Expenses account Detailed Output", - "description": "The properties that are included when fetching a single Expenses account.", - "allOf": [ - { - "title": "Expenses account Basic Output", - "description": "The properties that are included when fetching a list of Expenses accounts.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Expenses account Common", - "description": "The properties that are shared amongst all versions of the Expenses account model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "color": { - "type": "string" - }, - "accNum": { - "type": "integer" - } - }, - "x-readme-ref-name": "expensesAccount-common" - } - ], - "x-readme-ref-name": "expensesAccount-output" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "expensesAccount-output-detailed" - }, - "salesChannel-common": { - "title": "Saleschannel Common", - "description": "The properties that are shared amongst all versions of the Saleschannel model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "color": { - "type": "string" - }, - "accNum": { - "type": "integer" - } - }, - "x-readme-ref-name": "salesChannel-common" - }, - "salesChannel-input": { - "title": "Saleschannel Input", - "description": "The properties that are allowed when creating or updating a Saleschannel.", - "allOf": [ - { - "title": "Saleschannel Common", - "description": "The properties that are shared amongst all versions of the Saleschannel model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "color": { - "type": "string" - }, - "accNum": { - "type": "integer" - } - }, - "x-readme-ref-name": "salesChannel-common" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "salesChannel-input" - }, - "salesChannel-output": { - "title": "Saleschannel Basic Output", - "description": "The properties that are included when fetching a list of Saleschannels.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Saleschannel Common", - "description": "The properties that are shared amongst all versions of the Saleschannel model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "color": { - "type": "string" - }, - "accNum": { - "type": "integer" - } - }, - "x-readme-ref-name": "salesChannel-common" - } - ], - "x-readme-ref-name": "salesChannel-output" - }, - "salesChannel-output-detailed": { - "title": "Saleschannel Detailed Output", - "description": "The properties that are included when fetching a single Saleschannel.", - "allOf": [ - { - "title": "Saleschannel Basic Output", - "description": "The properties that are included when fetching a list of Saleschannels.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Saleschannel Common", - "description": "The properties that are shared amongst all versions of the Saleschannel model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "color": { - "type": "string" - }, - "accNum": { - "type": "integer" - } - }, - "x-readme-ref-name": "salesChannel-common" - } - ], - "x-readme-ref-name": "salesChannel-output" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "salesChannel-output-detailed" - }, - "payment-common": { - "title": "Payment Common", - "description": "The properties that are shared amongst all versions of the Payment model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "bankId": { - "type": "string" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "amount": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "date": { - "type": "integer" - } - }, - "x-readme-ref-name": "payment-common" - }, - "payment-input": { - "title": "Payment Input", - "description": "The properties that are allowed when creating or updating a Payment.", - "allOf": [ - { - "title": "Payment Common", - "description": "The properties that are shared amongst all versions of the Payment model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "bankId": { - "type": "string" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "amount": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "date": { - "type": "integer" - } - }, - "x-readme-ref-name": "payment-common" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "payment-input" - }, - "payment-output": { - "title": "Payment Basic Output", - "description": "The properties that are included when fetching a list of Payments.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Payment Common", - "description": "The properties that are shared amongst all versions of the Payment model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "bankId": { - "type": "string" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "amount": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "date": { - "type": "integer" - } - }, - "x-readme-ref-name": "payment-common" - } - ], - "x-readme-ref-name": "payment-output" - }, - "payment-output-detailed": { - "title": "Payment Detailed Output", - "description": "The properties that are included when fetching a single Payment.", - "allOf": [ - { - "title": "Payment Basic Output", - "description": "The properties that are included when fetching a list of Payments.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Payment Common", - "description": "The properties that are shared amongst all versions of the Payment model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "bankId": { - "type": "string" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "amount": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "date": { - "type": "integer" - } - }, - "x-readme-ref-name": "payment-common" - } - ], - "x-readme-ref-name": "payment-output" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "payment-output-detailed" - }, - "document-common": { - "title": "Document Common", - "description": "The properties that are shared amongst all versions of the Document model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "contact": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - }, - "notes": { - "type": "string" - }, - "products": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "price": { - "type": "integer" - }, - "units": { - "type": "integer" - }, - "tax": { - "type": "integer" - }, - "discount": { - "type": "integer" - }, - "retention": { - "type": "integer" - }, - "weight": { - "type": "integer" - }, - "costPrice": { - "type": "integer" - }, - "sku": { - "type": "string" - }, - "productId": { - "type": "string" - } - } - } - }, - "tax": { - "type": "number" - }, - "subtotal": { - "type": "number" - }, - "discount": { - "type": "integer" - }, - "total": { - "type": "number" - }, - "language": { - "type": "string" - }, - "status": { - "type": "integer" - }, - "customFields": { - "type": "array", - "items": { - "type": "object", - "properties": { - "field": { - "type": "string" - }, - "value": { - "type": "string" - } - } - } - }, - "docNumber": { - "type": "string" - }, - "currency": { - "type": "string" - }, - "currencyChange": { - "type": "integer" - }, - "paymentsTotal": { - "type": "integer" - }, - "paymentsPending": { - "type": "number" - }, - "paymentsRefunds": { - "type": "integer" - }, - "salesChannelId": { - "type": "string" - } - }, - "x-readme-ref-name": "document-common" - }, - "document-input": { - "title": "Document Input", - "description": "The properties that are allowed when creating or updating a Document.", - "allOf": [ - { - "title": "Document Common", - "description": "The properties that are shared amongst all versions of the Document model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "contact": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - }, - "notes": { - "type": "string" - }, - "products": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "price": { - "type": "integer" - }, - "units": { - "type": "integer" - }, - "tax": { - "type": "integer" - }, - "discount": { - "type": "integer" - }, - "retention": { - "type": "integer" - }, - "weight": { - "type": "integer" - }, - "costPrice": { - "type": "integer" - }, - "sku": { - "type": "string" - }, - "productId": { - "type": "string" - } - } - } - }, - "tax": { - "type": "number" - }, - "subtotal": { - "type": "number" - }, - "discount": { - "type": "integer" - }, - "total": { - "type": "number" - }, - "language": { - "type": "string" - }, - "status": { - "type": "integer" - }, - "customFields": { - "type": "array", - "items": { - "type": "object", - "properties": { - "field": { - "type": "string" - }, - "value": { - "type": "string" - } - } - } - }, - "docNumber": { - "type": "string" - }, - "currency": { - "type": "string" - }, - "currencyChange": { - "type": "integer" - }, - "paymentsTotal": { - "type": "integer" - }, - "paymentsPending": { - "type": "number" - }, - "paymentsRefunds": { - "type": "integer" - }, - "salesChannelId": { - "type": "string" - } - }, - "x-readme-ref-name": "document-common" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "document-input" - }, - "document-output": { - "title": "Document Basic Output", - "description": "The properties that are included when fetching a list of Documents.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Document Common", - "description": "The properties that are shared amongst all versions of the Document model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "contact": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - }, - "notes": { - "type": "string" - }, - "products": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "price": { - "type": "integer" - }, - "units": { - "type": "integer" - }, - "tax": { - "type": "integer" - }, - "discount": { - "type": "integer" - }, - "retention": { - "type": "integer" - }, - "weight": { - "type": "integer" - }, - "costPrice": { - "type": "integer" - }, - "sku": { - "type": "string" - }, - "productId": { - "type": "string" - } - } - } - }, - "tax": { - "type": "number" - }, - "subtotal": { - "type": "number" - }, - "discount": { - "type": "integer" - }, - "total": { - "type": "number" - }, - "language": { - "type": "string" - }, - "status": { - "type": "integer" - }, - "customFields": { - "type": "array", - "items": { - "type": "object", - "properties": { - "field": { - "type": "string" - }, - "value": { - "type": "string" - } - } - } - }, - "docNumber": { - "type": "string" - }, - "currency": { - "type": "string" - }, - "currencyChange": { - "type": "integer" - }, - "paymentsTotal": { - "type": "integer" - }, - "paymentsPending": { - "type": "number" - }, - "paymentsRefunds": { - "type": "integer" - }, - "salesChannelId": { - "type": "string" - } - }, - "x-readme-ref-name": "document-common" - } - ], - "x-readme-ref-name": "document-output" - }, - "document-output-detailed": { - "title": "Document Detailed Output", - "description": "The properties that are included when fetching a single Document.", - "allOf": [ - { - "title": "Document Basic Output", - "description": "The properties that are included when fetching a list of Documents.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Document Common", - "description": "The properties that are shared amongst all versions of the Document model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "contact": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - }, - "notes": { - "type": "string" - }, - "products": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "price": { - "type": "integer" - }, - "units": { - "type": "integer" - }, - "tax": { - "type": "integer" - }, - "discount": { - "type": "integer" - }, - "retention": { - "type": "integer" - }, - "weight": { - "type": "integer" - }, - "costPrice": { - "type": "integer" - }, - "sku": { - "type": "string" - }, - "productId": { - "type": "string" - } - } - } - }, - "tax": { - "type": "number" - }, - "subtotal": { - "type": "number" - }, - "discount": { - "type": "integer" - }, - "total": { - "type": "number" - }, - "language": { - "type": "string" - }, - "status": { - "type": "integer" - }, - "customFields": { - "type": "array", - "items": { - "type": "object", - "properties": { - "field": { - "type": "string" - }, - "value": { - "type": "string" - } - } - } - }, - "docNumber": { - "type": "string" - }, - "currency": { - "type": "string" - }, - "currencyChange": { - "type": "integer" - }, - "paymentsTotal": { - "type": "integer" - }, - "paymentsPending": { - "type": "number" - }, - "paymentsRefunds": { - "type": "integer" - }, - "salesChannelId": { - "type": "string" - } - }, - "x-readme-ref-name": "document-common" - } - ], - "x-readme-ref-name": "document-output" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "document-output-detailed" - } - } - }, - "x-readme": { - "explorer-enabled": true, - "proxy-enabled": true - } -} diff --git a/forms-bridge/addons/holded/data/swagger/projects.json b/forms-bridge/addons/holded/data/swagger/projects.json deleted file mode 100644 index f0bb1ea6..00000000 --- a/forms-bridge/addons/holded/data/swagger/projects.json +++ /dev/null @@ -1,3504 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "title": "Projects API", - "version": "1.2", - "description": "The Holded’s Projects API is organized around REST, using HTTP responses code to keep you informed about what’s going on. Our endpoints will returns you metada in JSON format directly from Holded." - }, - "x-samples-languages": ["curl", "node", "ruby", "python"], - "paths": { - "/projects": { - "get": { - "operationId": "List Projects", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "title": "Project Basic Output", - "description": "The properties that are included when fetching a list of Projects.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Project Common", - "description": "The properties that are shared amongst all versions of the Project model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "category": { - "type": "integer" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - }, - "status": { - "type": "integer" - }, - "lists": { - "type": "array", - "items": { - "type": "object", - "properties": { - "listId": { - "type": "string" - }, - "key": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - } - } - } - }, - "billable": { - "type": "integer" - }, - "expenses": { - "type": "object", - "properties": { - "docId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "subtotal": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "invoiceNum": { - "type": "string" - }, - "total": { - "type": "integer" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - } - } - }, - "estimates": { - "type": "array", - "items": { - "type": "object", - "properties": { - "docId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "subtotal": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "invoiceNum": { - "type": "string" - }, - "total": { - "type": "number" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - } - } - } - }, - "sales": { - "type": "array", - "items": { - "type": "object", - "properties": { - "docId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "subtotal": { - "type": "number" - }, - "desc": { - "type": "string" - }, - "invoiceNum": { - "type": "string" - }, - "total": { - "type": "integer" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - } - } - } - }, - "timeTracking": { - "type": "object", - "properties": { - "timeId": { - "type": "string" - }, - "time": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "costHour": { - "type": "integer" - }, - "userId": { - "type": "string" - }, - "taskId": { - "type": "string" - }, - "total": { - "type": "number" - } - } - }, - "price": { - "type": "integer" - }, - "numberOfTasks": { - "type": "integer" - }, - "completedTasks": { - "type": "integer" - }, - "labels": { - "type": "array", - "items": { - "type": "object", - "properties": { - "labelId": { - "type": "string" - }, - "labelName": { - "type": "string" - }, - "labelColor": { - "type": "string" - } - } - } - } - }, - "x-readme-ref-name": "project-common" - } - ], - "x-readme-ref-name": "project-output" - } - }, - "examples": { - "response": { - "value": [ - { - "id": "5ab390311d6d82002432ec5a", - "name": "Building 301", - "desc": "Bulding 301 in Barcelona", - "tags": ["tag", "tog", "tug"], - "category": 0, - "contactId": "5aaa51ab5b70640028340186", - "contactName": "DIvero", - "date": 0, - "dueDate": 0, - "status": 2, - "lists": [ - { - "id": "5ab390311d6d82002432ec52", - "key": "pending", - "name": "Pending", - "desc": "nan" - }, - { - "id": "5ab390311d6d82002432ec53", - "key": "review", - "name": "Review", - "desc": "nan" - }, - { - "id": "5ab390311d6d82002432ec54", - "key": "done", - "name": "Done", - "desc": "nan" - } - ], - "billable": 1, - "expenses": { - "docId": "5ab3d4121d6d820062013ed3", - "type": "purchase", - "subtotal": 200, - "desc": "noooooo", - "invoiceNum": "123", - "total": 242, - "contactId": "5aaa51ab5b70640028340186", - "contactName": "DIvero (Divero)", - "date": 1521673200, - "dueDate": 1521759600 - }, - "estimates": [ - { - "docId": "5ab3d4cc1d6d82007711bba3", - "type": "estimate", - "subtotal": 34433, - "desc": "no desc", - "invoiceNum": "E170001", - "total": 41663.93, - "contactId": "5aaa51ab5b70640028340186", - "contactName": "DIvero (Divero)", - "date": 1517871600, - "dueDate": 1520118000 - } - ], - "sales": [ - { - "docId": "5ab391071d6d820034294783", - "type": "invoice", - "subtotal": 818.18, - "desc": "", - "invoiceNum": "F170001", - "total": 990, - "contactId": "5aa939a95b70640009653d72", - "contactName": "Bose QC", - "date": 1521673200, - "dueDate": 0 - } - ], - "timeTracking": { - "timeId": "5ac4f2cec839ea004e18a463", - "time": 45300, - "desc": "POOOOOSTuuuuuuu eeeee timetracking after refactor", - "costHour": 234, - "userId": "5a05cc5a60cea100094baf22", - "taskId": "5ab3cb7d1d6d8200440d4683", - "total": 2944.5 - }, - "price": 2345, - "numberOfTasks": 6, - "completedTasks": 3, - "labels": [ - { - "id": "5ab390311d6d82002432ec55", - "name": "New", - "color": "#10cf91" - }, - { - "id": "5ab390311d6d82002432ec56", - "name": "Confirmed", - "color": "#10cf91" - }, - { - "id": "5ab390311d6d82002432ec57", - "name": "Pending", - "color": "#f8d053" - }, - { - "id": "5ab390311d6d82002432ec58", - "name": "Fixed", - "color": "#4181f2" - }, - { - "id": "5ab390311d6d82002432ec59", - "name": "Urgent", - "color": "#ee585d" - } - ] - } - ] - } - } - } - } - } - }, - "tags": ["PROJECTS"], - "description": "Get all your projects." - }, - "post": { - "operationId": "Create Project", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "required": ["name"] - } - } - }, - "x-examples": { - "application/json": { - "name": "Project of the month" - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Created", - "id": "5ac4f2cec839ea004e18a463" - } - } - } - } - } - } - }, - "tags": ["PROJECTS"], - "description": "Create a new project." - } - }, - "/projects/{projectId}": { - "parameters": [ - { - "name": "projectId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "operationId": "Get Project", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "category": { - "type": "integer" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - }, - "status": { - "type": "integer" - }, - "lists": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "key": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - } - } - } - }, - "billable": { - "type": "integer" - }, - "expenses": { - "type": "object", - "properties": { - "docId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "subtotal": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "invoiceNum": { - "type": "string" - }, - "total": { - "type": "integer" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - } - } - }, - "estimates": { - "type": "array", - "items": { - "type": "object", - "properties": { - "docId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "subtotal": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "invoiceNum": { - "type": "string" - }, - "total": { - "type": "number" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - } - } - } - }, - "sales": { - "type": "array", - "items": { - "type": "object", - "properties": { - "docId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "subtotal": { - "type": "number" - }, - "desc": { - "type": "string" - }, - "invoiceNum": { - "type": "string" - }, - "total": { - "type": "integer" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - } - } - } - }, - "timeTracking": { - "type": "object", - "properties": { - "timeId": { - "type": "string" - }, - "time": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "costHour": { - "type": "integer" - }, - "userId": { - "type": "string" - }, - "taskId": { - "type": "string" - }, - "total": { - "type": "number" - } - } - }, - "price": { - "type": "integer" - }, - "numberOfTasks": { - "type": "integer" - }, - "completedTasks": { - "type": "integer" - }, - "labels": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "color": { - "type": "string" - } - } - } - } - } - }, - "examples": { - "response": { - "value": { - "id": "5ab390311d6d82002432ec5a", - "name": "Building 301", - "desc": "Bulding 301 in Barcelona", - "tags": ["tag", "tog", "tug"], - "category": 0, - "contactId": "5aaa51ab5b70640028340186", - "contactName": "DIvero", - "date": 0, - "dueDate": 0, - "status": 2, - "lists": [ - { - "id": "5ab390311d6d82002432ec52", - "key": "pending", - "name": "Pending", - "desc": "nan" - }, - { - "id": "5ab390311d6d82002432ec53", - "key": "review", - "name": "Review", - "desc": "nan" - }, - { - "id": "5ab390311d6d82002432ec54", - "key": "done", - "name": "Done", - "desc": "nan" - } - ], - "billable": 1, - "expenses": { - "docId": "5ab3d4121d6d820062013ed3", - "type": "purchase", - "subtotal": 200, - "desc": "noooooo", - "invoiceNum": "123", - "total": 242, - "contactId": "5aaa51ab5b70640028340186", - "contactName": "DIvero (Divero)", - "date": 1521673200, - "dueDate": 1521759600 - }, - "estimates": [ - { - "docId": "5ab3d4cc1d6d82007711bba3", - "type": "estimate", - "subtotal": 34433, - "desc": "no desc", - "invoiceNum": "E170001", - "total": 41663.93, - "contactId": "5aaa51ab5b70640028340186", - "contactName": "DIvero (Divero)", - "date": 1517871600, - "dueDate": 1520118000 - } - ], - "sales": [ - { - "docId": "5ab391071d6d820034294783", - "type": "invoice", - "subtotal": 818.18, - "desc": "", - "invoiceNum": "F170001", - "total": 990, - "contactId": "5aa939a95b70640009653d72", - "contactName": "Bose QC", - "date": 1521673200, - "dueDate": 0 - } - ], - "timeTracking": { - "timeId": "5ac4f2cec839ea004e18a463", - "time": 45300, - "desc": "POOOOOSTuuuuuuu eeeee timetracking after refactor", - "costHour": 234, - "userId": "5a05cc5a60cea100094baf22", - "taskId": "5ab3cb7d1d6d8200440d4683", - "total": 2944.5 - }, - "price": 2345, - "numberOfTasks": 6, - "completedTasks": 3, - "labels": [ - { - "id": "5ab390311d6d82002432ec55", - "name": "New", - "color": "#10cf91" - }, - { - "id": "5ab390311d6d82002432ec56", - "name": "Confirmed", - "color": "#10cf91" - }, - { - "id": "5ab390311d6d82002432ec57", - "name": "Pending", - "color": "#f8d053" - }, - { - "id": "5ab390311d6d82002432ec58", - "name": "Fixed", - "color": "#4181f2" - }, - { - "id": "5ab390311d6d82002432ec59", - "name": "Urgent", - "color": "#ee585d" - } - ] - } - } - } - } - } - } - }, - "tags": ["PROJECTS"], - "description": "Get a specific payment." - }, - "put": { - "operationId": "Update Project", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "contactName": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - }, - "status": { - "type": "integer" - }, - "lists": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "key": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - } - } - } - }, - "billable": { - "type": "integer" - }, - "price": { - "type": "integer" - }, - "labels": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "color": { - "type": "string" - } - } - } - } - } - } - } - }, - "x-examples": { - "application/json": { - "name": "Building 301", - "desc": "Bulding 301 in Barcelona", - "tags": ["tag", "tog", "tug"], - "contactName": "DIvero", - "date": 1521673200, - "dueDate": 1521759600, - "status": 2, - "lists": [ - { - "id": "5ab390311d6d82002432ec52", - "key": "pending", - "name": "Pending", - "desc": "nan" - }, - { - "id": "5ab390311d6d82002432ec53", - "key": "review", - "name": "Review", - "desc": "nan" - }, - { - "id": "5ab390311d6d82002432ec54", - "key": "done", - "name": "Done", - "desc": "nan" - } - ], - "billable": 1, - "price": 2345, - "labels": [ - { - "id": "5ab390311d6d82002432ec55", - "name": "New", - "color": "#10cf91" - }, - { - "id": "5ab390311d6d82002432ec56", - "name": "Confirmed", - "color": "#10cf91" - }, - { - "id": "5ab390311d6d82002432ec57", - "name": "Pending", - "color": "#f8d053" - }, - { - "id": "5ab390311d6d82002432ec58", - "name": "Fixed", - "color": "#4181f2" - }, - { - "id": "5ab390311d6d82002432ec59", - "name": "Urgent", - "color": "#ee585d" - } - ] - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5ab390311d6d82002432ec5a" - } - } - } - } - } - } - }, - "tags": ["PROJECTS"], - "description": "Update a specific project.\n\nOnly the params included in the operation will update the project." - }, - "delete": { - "operationId": "Delete Project", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" - } - } - } - } - } - } - }, - "tags": ["PROJECTS"], - "description": "Delete a specific project." - } - }, - "/tasks": { - "get": { - "operationId": "List Tasks", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "projectId": { - "type": "string" - }, - "listId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "labels": { - "type": "array", - "items": { - "type": "string" - } - }, - "comments": { - "type": "array", - "items": { - "type": "object", - "properties": { - "commentId": { - "type": "string" - }, - "createdAt": { - "type": "integer" - }, - "userId": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - }, - "userId": { - "type": "string" - }, - "createdAt": { - "type": "integer" - }, - "updatedAt": { - "type": "integer" - }, - "status": { - "type": "integer" - }, - "billable": { - "type": "integer" - }, - "featured": { - "type": "integer" - } - } - } - }, - "examples": { - "response": { - "value": [ - { - "id": "5ab3df6e1d6d82008c5777a4", - "projectId": "5ab390311d6d82002432ec5a", - "listId": "5ab390311d6d82002432ec53", - "name": "Business plan", - "desc": "business plan for the new project", - "labels": [ - "5ab390311d6d82002432ec58", - "5ab390311d6d82002432ec59" - ], - "comments": [ - { - "commentId": "5ab3df8c1d6d820088525aa3", - "createdAt": 1521737612, - "userId": "5a05cc5a60cea100094baf22", - "message": "no comments" - }, - { - "commentId": "5ab3df971d6d82008c5777a5", - "createdAt": 1521737623, - "userId": "5a05cc5a60cea100094baf22", - "message": "a piece of comment\n" - } - ], - "date": 1521737582, - "dueDate": 1521673200, - "userId": "5a05cc5a60cea100094baf22", - "createdAt": 1521737582, - "updatedAt": 1521737582, - "status": 0, - "billable": 0, - "featured": 1 - } - ] - } - } - } - } - } - }, - "tags": ["TASKS"], - "description": "Get all your tasks." - }, - "post": { - "operationId": "Create Task", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "projectId": { - "type": "string" - }, - "listId": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": ["projectId", "listId", "name"] - } - } - }, - "x-examples": { - "application/json": { - "projectId": "5ab390311d6d82002432ec5a", - "listId": "5ab390311d6d82002432ec52", - "name": "new task" - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Created", - "id": "5ac4f2cec839ea004e18a463" - } - } - } - } - } - } - }, - "tags": ["TASKS"], - "description": "Create a new task." - } - }, - "/tasks/{taskId}": { - "parameters": [ - { - "name": "taskId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "operationId": "Get Task", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "projectId": { - "type": "string" - }, - "listId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "labels": { - "type": "array", - "items": { - "type": "string" - } - }, - "comments": { - "type": "array", - "items": { - "type": "object", - "properties": { - "commentId": { - "type": "string" - }, - "createdAt": { - "type": "integer" - }, - "userId": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - }, - "userId": { - "type": "string" - }, - "createdAt": { - "type": "integer" - }, - "updatedAt": { - "type": "integer" - }, - "status": { - "type": "integer" - }, - "billable": { - "type": "integer" - }, - "featured": { - "type": "integer" - } - } - }, - "examples": { - "response": { - "value": { - "id": "5ab3df6e1d6d82008c5777a4", - "projectId": "5ab390311d6d82002432ec5a", - "listId": "5ab390311d6d82002432ec53", - "name": "Business plan", - "desc": "business plan for the new project", - "labels": [ - "5ab390311d6d82002432ec58", - "5ab390311d6d82002432ec59" - ], - "comments": [ - { - "commentId": "5ab3df8c1d6d820088525aa3", - "createdAt": 1521737612, - "userId": "5a05cc5a60cea100094baf22", - "message": "no comments" - }, - { - "commentId": "5ab3df971d6d82008c5777a5", - "createdAt": 1521737623, - "userId": "5a05cc5a60cea100094baf22", - "message": "a piece of comment\n" - } - ], - "date": 1521737582, - "dueDate": 1521673200, - "userId": "5a05cc5a60cea100094baf22", - "createdAt": 1521737582, - "updatedAt": 1521737582, - "status": 0, - "billable": 0, - "featured": 1 - } - } - } - } - } - } - }, - "tags": ["TASKS"], - "description": "Get a specific task." - }, - "delete": { - "operationId": "Delete Task", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" - } - } - } - } - } - } - }, - "tags": ["TASKS"], - "description": "Delete a specific task." - } - }, - "/projects/{projectId}/times": { - "parameters": [ - { - "name": "projectId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "operationId": "Get Project Times", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "title": "Timetracking Basic Output", - "description": "The properties that are included when fetching a list of Timetrackings.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Timetracking Common", - "description": "The properties that are shared amongst all versions of the Timetracking model.", - "type": "object", - "properties": { - "timeId": { - "type": "string" - }, - "duration": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "costHour": { - "type": "integer" - }, - "userId": { - "type": "string" - }, - "taskId": { - "type": "string" - }, - "total": { - "type": "number" - } - }, - "x-readme-ref-name": "timeTracking-common" - } - ], - "x-readme-ref-name": "timeTracking-output" - } - }, - "examples": { - "response": { - "value": [ - { - "timeId": "5ab3d2611d6d82005c4d2082", - "duration": 45300, - "desc": "timetracking project", - "costHour": 35, - "userId": "5a05cc5a60cea100094baf22", - "taskId": "5ab3cb7d1d6d8200440d4683", - "total": 440.41666666667 - } - ] - } - } - } - } - } - }, - "tags": ["TIME TRACKING"], - "description": "Get all your times tracking by project." - }, - "post": { - "operationId": "Create Project Time", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "duration": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "costHour": { - "type": "integer" - }, - "userId": { - "type": "string" - }, - "taskId": { - "type": "string" - } - }, - "required": ["duration", "costHour"] - } - } - }, - "x-examples": { - "application/json": { - "duration": 45300, - "desc": "new timetracking", - "costHour": 35, - "userId": "5a05cc5a60cea100094baf22", - "taskId": "5ab3cb7d1d6d8200440d4683" - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Created", - "id": "5ac4f2cec839ea004e18a463" - } - } - } - } - } - } - }, - "tags": ["TIME TRACKING"], - "description": "Create a new time tracking." - } - }, - "/projects/{projectId}/times/{timeTrackingId}": { - "parameters": [ - { - "name": "projectId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "timeTrackingId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "operationId": "GetProjectTimes", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "title": "Timetracking Detailed Output", - "description": "The properties that are included when fetching a single Timetracking.", - "allOf": [ - { - "title": "Timetracking Basic Output", - "description": "The properties that are included when fetching a list of Timetrackings.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Timetracking Common", - "description": "The properties that are shared amongst all versions of the Timetracking model.", - "type": "object", - "properties": { - "timeId": { - "type": "string" - }, - "duration": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "costHour": { - "type": "integer" - }, - "userId": { - "type": "string" - }, - "taskId": { - "type": "string" - }, - "total": { - "type": "number" - } - }, - "x-readme-ref-name": "timeTracking-common" - } - ], - "x-readme-ref-name": "timeTracking-output" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "timeTracking-output-detailed" - }, - "examples": { - "response": { - "value": { - "timeId": "5ab3d2611d6d82005c4d2082", - "duration": 45300, - "desc": "timetracking new project", - "costHour": 35, - "userId": "5a05cc5a60cea100094baf22", - "taskId": "5ab3cb7d1d6d8200440d4683", - "total": 440.41666666667 - } - } - } - } - } - } - }, - "tags": ["TIME TRACKING"], - "description": "Get a specific time tracking." - }, - "put": { - "operationId": "Update Project Time", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "duration": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "costHour": { - "type": "integer" - }, - "userId": { - "type": "string" - }, - "taskId": { - "type": "string" - } - }, - "required": ["duration", "costHour"] - } - } - }, - "x-examples": { - "application/json": { - "duration": 45300, - "desc": "timetracking new project", - "costHour": 35, - "userId": "5a05cc5a60cea100094baf22", - "taskId": "5ab3cb7d1d6d8200440d4683" - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Updated", - "id": "5ac4f2cec839ea004e18a463" - } - } - } - } - } - } - }, - "tags": ["TIME TRACKING"], - "description": "Update a specific time tracking.\n\nOnly the params included in the operation will update the time tracking." - }, - "delete": { - "operationId": "Delete Project Time", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 1, - "info": "Successfully deleted", - "id": "5aba68b1c5d438006425ad45" - } - } - } - } - } - } - }, - "tags": ["TIME TRACKING"], - "description": "Delete a specific time tracking." - } - }, - "/projects/times": { - "get": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "timeTracking": { - "type": "array", - "items": { - "type": "object", - "properties": { - "timeId": { - "type": "string" - }, - "duration": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "costHour": { - "type": "integer" - }, - "userId": { - "type": "string" - }, - "taskId": { - "type": "string" - }, - "total": { - "type": "number" - } - } - } - } - } - } - }, - "examples": { - "response": { - "value": [ - { - "id": "5ab390311d6d82002432ec5a", - "name": "Building", - "timeTracking": [ - { - "timeId": "5ab3d2611d6d82005c4d2082", - "duration": 45300, - "desc": "timetracking test", - "costHour": 35, - "userId": "5a05cc5a60cea100094baf22", - "taskId": "5ab3cb7d1d6d8200440d4683", - "total": 440.41666666667 - }, - { - "timeId": "5ab4bb421d6d820008184163", - "duration": 38760, - "desc": "first timetracking", - "costHour": 0, - "userId": "5a05cc5a60cea100094baf22", - "taskId": "5ab3cb7d1d6d8200440d4683", - "total": 0 - } - ] - } - ] - } - } - } - } - } - }, - "operationId": "List Times", - "parameters": [ - { - "name": "start", - "in": "query", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "end", - "in": "query", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "archived", - "in": "query", - "required": false, - "schema": { - "type": "boolean" - } - } - ], - "tags": ["TIME TRACKING"], - "description": "List time trackings in projects not archived from 18 months on" - } - }, - "/projects/{projectId}/summary": { - "get": { - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "projectEvolution": { - "type": "object", - "properties": { - "tasks": { - "type": "object", - "properties": { - "total": { - "type": "integer" - }, - "completed": { - "type": "integer" - } - } - }, - "dueDate": { - "type": "integer" - } - } - }, - "profitability": { - "type": "object", - "properties": { - "sales": { - "type": "number" - }, - "expenses": { - "type": "object", - "properties": { - "documents": { - "type": "integer" - }, - "personnel": { - "type": "number" - }, - "total": { - "type": "number" - } - } - }, - "profit": { - "type": "number" - } - } - }, - "economicStatus": { - "type": "object", - "properties": { - "sales": { - "type": "number" - }, - "quoted": { - "type": "integer" - }, - "difference": { - "type": "number" - }, - "estimatePrice": { - "type": "integer" - }, - "billed": { - "type": "number" - }, - "collected": { - "type": "integer" - }, - "remaining": { - "type": "number" - } - } - } - } - }, - "examples": { - "response": { - "value": { - "name": "Building", - "desc": "Bulding in Barcelona", - "projectEvolution": { - "tasks": { - "total": 6, - "completed": 3 - }, - "dueDate": 0 - }, - "profitability": { - "sales": 1117.18, - "expenses": { - "documents": 200, - "personnel": 15603.333333333, - "total": 15803.333333333 - }, - "profit": -14686.153333333 - }, - "economicStatus": { - "sales": 1117.18, - "quoted": 34433, - "difference": -33315.82, - "estimatePrice": 3453456, - "billed": 1351.79, - "collected": 290, - "remaining": 1061.79 - } - } - } - } - } - } - } - }, - "tags": ["PROJECTS"], - "description": "Get a specific project summary." - }, - "parameters": [ - { - "name": "projectId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "x-samples-enabled": true, - "tags": [ - { - "name": "PROJECTS" - }, - { - "name": "TASKS" - }, - { - "name": "TIME TRACKING" - } - ], - "security": [ - { - "Auth": [] - } - ], - "servers": [ - { - "url": "https://api.holded.com/api/projects/v1" - } - ], - "components": { - "responses": { - "Standard_Error": { - "description": "Something went wrong", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - } - } - }, - "examples": { - "response": { - "value": { - "status": 0, - "info": "Not found" - } - } - } - } - } - } - }, - "securitySchemes": { - "Auth": { - "type": "apiKey", - "name": "key", - "in": "header" - } - }, - "schemas": { - "project-common": { - "title": "Project Common", - "description": "The properties that are shared amongst all versions of the Project model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "category": { - "type": "integer" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - }, - "status": { - "type": "integer" - }, - "lists": { - "type": "array", - "items": { - "type": "object", - "properties": { - "listId": { - "type": "string" - }, - "key": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - } - } - } - }, - "billable": { - "type": "integer" - }, - "expenses": { - "type": "object", - "properties": { - "docId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "subtotal": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "invoiceNum": { - "type": "string" - }, - "total": { - "type": "integer" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - } - } - }, - "estimates": { - "type": "array", - "items": { - "type": "object", - "properties": { - "docId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "subtotal": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "invoiceNum": { - "type": "string" - }, - "total": { - "type": "number" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - } - } - } - }, - "sales": { - "type": "array", - "items": { - "type": "object", - "properties": { - "docId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "subtotal": { - "type": "number" - }, - "desc": { - "type": "string" - }, - "invoiceNum": { - "type": "string" - }, - "total": { - "type": "integer" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - } - } - } - }, - "timeTracking": { - "type": "object", - "properties": { - "timeId": { - "type": "string" - }, - "time": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "costHour": { - "type": "integer" - }, - "userId": { - "type": "string" - }, - "taskId": { - "type": "string" - }, - "total": { - "type": "number" - } - } - }, - "price": { - "type": "integer" - }, - "numberOfTasks": { - "type": "integer" - }, - "completedTasks": { - "type": "integer" - }, - "labels": { - "type": "array", - "items": { - "type": "object", - "properties": { - "labelId": { - "type": "string" - }, - "labelName": { - "type": "string" - }, - "labelColor": { - "type": "string" - } - } - } - } - }, - "x-readme-ref-name": "project-common" - }, - "project-input": { - "title": "Project Input", - "description": "The properties that are allowed when creating or updating a Project.", - "allOf": [ - { - "title": "Project Common", - "description": "The properties that are shared amongst all versions of the Project model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "category": { - "type": "integer" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - }, - "status": { - "type": "integer" - }, - "lists": { - "type": "array", - "items": { - "type": "object", - "properties": { - "listId": { - "type": "string" - }, - "key": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - } - } - } - }, - "billable": { - "type": "integer" - }, - "expenses": { - "type": "object", - "properties": { - "docId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "subtotal": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "invoiceNum": { - "type": "string" - }, - "total": { - "type": "integer" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - } - } - }, - "estimates": { - "type": "array", - "items": { - "type": "object", - "properties": { - "docId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "subtotal": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "invoiceNum": { - "type": "string" - }, - "total": { - "type": "number" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - } - } - } - }, - "sales": { - "type": "array", - "items": { - "type": "object", - "properties": { - "docId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "subtotal": { - "type": "number" - }, - "desc": { - "type": "string" - }, - "invoiceNum": { - "type": "string" - }, - "total": { - "type": "integer" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - } - } - } - }, - "timeTracking": { - "type": "object", - "properties": { - "timeId": { - "type": "string" - }, - "time": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "costHour": { - "type": "integer" - }, - "userId": { - "type": "string" - }, - "taskId": { - "type": "string" - }, - "total": { - "type": "number" - } - } - }, - "price": { - "type": "integer" - }, - "numberOfTasks": { - "type": "integer" - }, - "completedTasks": { - "type": "integer" - }, - "labels": { - "type": "array", - "items": { - "type": "object", - "properties": { - "labelId": { - "type": "string" - }, - "labelName": { - "type": "string" - }, - "labelColor": { - "type": "string" - } - } - } - } - }, - "x-readme-ref-name": "project-common" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "project-input" - }, - "project-output": { - "title": "Project Basic Output", - "description": "The properties that are included when fetching a list of Projects.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Project Common", - "description": "The properties that are shared amongst all versions of the Project model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "category": { - "type": "integer" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - }, - "status": { - "type": "integer" - }, - "lists": { - "type": "array", - "items": { - "type": "object", - "properties": { - "listId": { - "type": "string" - }, - "key": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - } - } - } - }, - "billable": { - "type": "integer" - }, - "expenses": { - "type": "object", - "properties": { - "docId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "subtotal": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "invoiceNum": { - "type": "string" - }, - "total": { - "type": "integer" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - } - } - }, - "estimates": { - "type": "array", - "items": { - "type": "object", - "properties": { - "docId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "subtotal": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "invoiceNum": { - "type": "string" - }, - "total": { - "type": "number" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - } - } - } - }, - "sales": { - "type": "array", - "items": { - "type": "object", - "properties": { - "docId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "subtotal": { - "type": "number" - }, - "desc": { - "type": "string" - }, - "invoiceNum": { - "type": "string" - }, - "total": { - "type": "integer" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - } - } - } - }, - "timeTracking": { - "type": "object", - "properties": { - "timeId": { - "type": "string" - }, - "time": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "costHour": { - "type": "integer" - }, - "userId": { - "type": "string" - }, - "taskId": { - "type": "string" - }, - "total": { - "type": "number" - } - } - }, - "price": { - "type": "integer" - }, - "numberOfTasks": { - "type": "integer" - }, - "completedTasks": { - "type": "integer" - }, - "labels": { - "type": "array", - "items": { - "type": "object", - "properties": { - "labelId": { - "type": "string" - }, - "labelName": { - "type": "string" - }, - "labelColor": { - "type": "string" - } - } - } - } - }, - "x-readme-ref-name": "project-common" - } - ], - "x-readme-ref-name": "project-output" - }, - "project-output-detailed": { - "title": "Project Detailed Output", - "description": "The properties that are included when fetching a single Project.", - "allOf": [ - { - "title": "Project Basic Output", - "description": "The properties that are included when fetching a list of Projects.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Project Common", - "description": "The properties that are shared amongst all versions of the Project model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "category": { - "type": "integer" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - }, - "status": { - "type": "integer" - }, - "lists": { - "type": "array", - "items": { - "type": "object", - "properties": { - "listId": { - "type": "string" - }, - "key": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - } - } - } - }, - "billable": { - "type": "integer" - }, - "expenses": { - "type": "object", - "properties": { - "docId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "subtotal": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "invoiceNum": { - "type": "string" - }, - "total": { - "type": "integer" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - } - } - }, - "estimates": { - "type": "array", - "items": { - "type": "object", - "properties": { - "docId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "subtotal": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "invoiceNum": { - "type": "string" - }, - "total": { - "type": "number" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - } - } - } - }, - "sales": { - "type": "array", - "items": { - "type": "object", - "properties": { - "docId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "subtotal": { - "type": "number" - }, - "desc": { - "type": "string" - }, - "invoiceNum": { - "type": "string" - }, - "total": { - "type": "integer" - }, - "contactId": { - "type": "string" - }, - "contactName": { - "type": "string" - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - } - } - } - }, - "timeTracking": { - "type": "object", - "properties": { - "timeId": { - "type": "string" - }, - "time": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "costHour": { - "type": "integer" - }, - "userId": { - "type": "string" - }, - "taskId": { - "type": "string" - }, - "total": { - "type": "number" - } - } - }, - "price": { - "type": "integer" - }, - "numberOfTasks": { - "type": "integer" - }, - "completedTasks": { - "type": "integer" - }, - "labels": { - "type": "array", - "items": { - "type": "object", - "properties": { - "labelId": { - "type": "string" - }, - "labelName": { - "type": "string" - }, - "labelColor": { - "type": "string" - } - } - } - } - }, - "x-readme-ref-name": "project-common" - } - ], - "x-readme-ref-name": "project-output" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "project-output-detailed" - }, - "task-common": { - "title": "Task Common", - "description": "The properties that are shared amongst all versions of the Task model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "projectId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "labels": { - "type": "array", - "items": { - "type": "string" - } - }, - "comments": { - "type": "array", - "items": { - "type": "object", - "properties": { - "commentId": { - "type": "string" - }, - "createdAt": { - "type": "integer" - }, - "userId": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - }, - "userId": { - "type": "string" - }, - "createdAt": { - "type": "integer" - }, - "updatedAt": { - "type": "integer" - }, - "status": { - "type": "integer" - }, - "billable": { - "type": "integer" - }, - "featured": { - "type": "integer" - } - }, - "x-readme-ref-name": "task-common" - }, - "task-input": { - "title": "Task Input", - "description": "The properties that are allowed when creating or updating a Task.", - "allOf": [ - { - "title": "Task Common", - "description": "The properties that are shared amongst all versions of the Task model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "projectId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "labels": { - "type": "array", - "items": { - "type": "string" - } - }, - "comments": { - "type": "array", - "items": { - "type": "object", - "properties": { - "commentId": { - "type": "string" - }, - "createdAt": { - "type": "integer" - }, - "userId": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - }, - "userId": { - "type": "string" - }, - "createdAt": { - "type": "integer" - }, - "updatedAt": { - "type": "integer" - }, - "status": { - "type": "integer" - }, - "billable": { - "type": "integer" - }, - "featured": { - "type": "integer" - } - }, - "x-readme-ref-name": "task-common" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "task-input" - }, - "task-output": { - "title": "Task Basic Output", - "description": "The properties that are included when fetching a list of Tasks.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Task Common", - "description": "The properties that are shared amongst all versions of the Task model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "projectId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "labels": { - "type": "array", - "items": { - "type": "string" - } - }, - "comments": { - "type": "array", - "items": { - "type": "object", - "properties": { - "commentId": { - "type": "string" - }, - "createdAt": { - "type": "integer" - }, - "userId": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - }, - "userId": { - "type": "string" - }, - "createdAt": { - "type": "integer" - }, - "updatedAt": { - "type": "integer" - }, - "status": { - "type": "integer" - }, - "billable": { - "type": "integer" - }, - "featured": { - "type": "integer" - } - }, - "x-readme-ref-name": "task-common" - } - ], - "x-readme-ref-name": "task-output" - }, - "task-output-detailed": { - "title": "Task Detailed Output", - "description": "The properties that are included when fetching a single Task.", - "allOf": [ - { - "title": "Task Basic Output", - "description": "The properties that are included when fetching a list of Tasks.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Task Common", - "description": "The properties that are shared amongst all versions of the Task model.", - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "projectId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "desc": { - "type": "string" - }, - "labels": { - "type": "array", - "items": { - "type": "string" - } - }, - "comments": { - "type": "array", - "items": { - "type": "object", - "properties": { - "commentId": { - "type": "string" - }, - "createdAt": { - "type": "integer" - }, - "userId": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - }, - "date": { - "type": "integer" - }, - "dueDate": { - "type": "integer" - }, - "userId": { - "type": "string" - }, - "createdAt": { - "type": "integer" - }, - "updatedAt": { - "type": "integer" - }, - "status": { - "type": "integer" - }, - "billable": { - "type": "integer" - }, - "featured": { - "type": "integer" - } - }, - "x-readme-ref-name": "task-common" - } - ], - "x-readme-ref-name": "task-output" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "task-output-detailed" - }, - "timeTracking-common": { - "title": "Timetracking Common", - "description": "The properties that are shared amongst all versions of the Timetracking model.", - "type": "object", - "properties": { - "timeId": { - "type": "string" - }, - "duration": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "costHour": { - "type": "integer" - }, - "userId": { - "type": "string" - }, - "taskId": { - "type": "string" - }, - "total": { - "type": "number" - } - }, - "x-readme-ref-name": "timeTracking-common" - }, - "timeTracking-input": { - "title": "Timetracking Input", - "description": "The properties that are allowed when creating or updating a Timetracking.", - "allOf": [ - { - "title": "Timetracking Common", - "description": "The properties that are shared amongst all versions of the Timetracking model.", - "type": "object", - "properties": { - "timeId": { - "type": "string" - }, - "duration": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "costHour": { - "type": "integer" - }, - "userId": { - "type": "string" - }, - "taskId": { - "type": "string" - }, - "total": { - "type": "number" - } - }, - "x-readme-ref-name": "timeTracking-common" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "timeTracking-input" - }, - "timeTracking-output": { - "title": "Timetracking Basic Output", - "description": "The properties that are included when fetching a list of Timetrackings.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Timetracking Common", - "description": "The properties that are shared amongst all versions of the Timetracking model.", - "type": "object", - "properties": { - "timeId": { - "type": "string" - }, - "duration": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "costHour": { - "type": "integer" - }, - "userId": { - "type": "string" - }, - "taskId": { - "type": "string" - }, - "total": { - "type": "number" - } - }, - "x-readme-ref-name": "timeTracking-common" - } - ], - "x-readme-ref-name": "timeTracking-output" - }, - "timeTracking-output-detailed": { - "title": "Timetracking Detailed Output", - "description": "The properties that are included when fetching a single Timetracking.", - "allOf": [ - { - "title": "Timetracking Basic Output", - "description": "The properties that are included when fetching a list of Timetrackings.", - "allOf": [ - { - "type": "object", - "properties": {} - }, - { - "title": "Timetracking Common", - "description": "The properties that are shared amongst all versions of the Timetracking model.", - "type": "object", - "properties": { - "timeId": { - "type": "string" - }, - "duration": { - "type": "integer" - }, - "desc": { - "type": "string" - }, - "costHour": { - "type": "integer" - }, - "userId": { - "type": "string" - }, - "taskId": { - "type": "string" - }, - "total": { - "type": "number" - } - }, - "x-readme-ref-name": "timeTracking-common" - } - ], - "x-readme-ref-name": "timeTracking-output" - }, - { - "type": "object", - "properties": {} - } - ], - "x-readme-ref-name": "timeTracking-output-detailed" - } - } - }, - "x-readme": { - "explorer-enabled": true, - "proxy-enabled": true - } -} diff --git a/forms-bridge/addons/holded/data/swagger/team.json b/forms-bridge/addons/holded/data/swagger/team.json deleted file mode 100644 index 215d75c4..00000000 --- a/forms-bridge/addons/holded/data/swagger/team.json +++ /dev/null @@ -1,773 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "description": "The Holded's Team API is organized around REST, using HTTP responses code to keep you informed about what's going on. Our endpoints will returns you metada in JSON format directly from Holded.", - "version": "1.0.1", - "title": "Team API", - "contact": { - "email": "developers@holded.com" - } - }, - "x-samples-languages": ["curl", "node", "ruby", "python"], - "security": [ - { - "Auth": [] - } - ], - "tags": [ - { - "name": "Employees", - "description": "CRUD Employees" - }, - { - "name": "Employees' time-tracking", - "description": "CRUD employees' time-tracking" - } - ], - "paths": { - "/employees": { - "get": { - "tags": ["Employees"], - "summary": "List all your employees", - "operationId": "listEmployees", - "description": "List all the employees you have in your app.\n", - "parameters": [ - { - "in": "query", - "name": "page", - "description": "the response is paginated and limited to 500 employees,", - "required": false, - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "search results matching criteria" - }, - "400": { - "description": "bad input parameter" - } - } - }, - "post": { - "tags": ["Employees"], - "summary": "Create a new employee", - "operationId": "createEmployee", - "description": "Create a new employee in you app.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "lastName": { - "type": "string" - }, - "email": { - "type": "string" - }, - "sendInvite": { - "type": "boolean" - } - }, - "required": ["name", "lastName", "email"] - } - } - }, - "description": "Employee to add" - }, - "responses": { - "201": { - "description": "employee created", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/employees/{employeeId}": { - "parameters": [ - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "tags": ["Employees"], - "summary": "Get an Employee", - "operationId": "Get a Employee", - "description": "List all the employees you have in your app.\n", - "responses": { - "200": { - "description": "search results matching criteria" - } - } - }, - "put": { - "tags": ["Employees"], - "summary": "Update an employee", - "operationId": "Update Employee", - "description": "Update an employee.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "lastName": { - "type": "string" - }, - "mainEmail": { - "type": "string" - }, - "email": { - "type": "string" - }, - "nationality": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "mobile": { - "type": "string" - }, - "dateOfBirth": { - "type": "string", - "description": "dd/mm/yyyy" - }, - "gender": { - "type": "string", - "description": "male or female" - }, - "mainLanguage": { - "type": "string", - "description": "options = English, English(UK), English(US), English(Canada), Spanish, Spanish(Spain), Spanish(Mexico), Spanish(Argentina), Spanish(Colombia), Portuguese, Portuguese(Portugal), Portuguese(Brazil), Catalan, Galician, Euskera, French, German(Deutsch), Italian, Greek, Swedish, Dutch, Finnish, Irish, Norwegian, Danish, Czech, Croatian, Russian, Polish" - }, - "iban": { - "type": "string" - }, - "timeOffPolicyId": { - "type": "string" - }, - "timeOffSupervisors": { - "type": "array", - "items": { - "type": "string" - }, - "description": "containing employeesId" - }, - "reportingTo": { - "type": "string", - "description": "should be an employeeId" - }, - "code": { - "type": "string", - "description": "nif" - }, - "socialSecurityNum": { - "type": "string" - }, - "address": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "province": { - "type": "string" - }, - "country": { - "type": "string" - } - } - }, - "fiscalResidence": { - "type": "boolean" - }, - "fiscalAddress": { - "type": "object", - "description": "You need to set fiscalResidence to false in order to be able to send a fiscalAdress", - "properties": { - "idNum": { - "type": "string" - }, - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "cityOfBirth": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "province": { - "type": "string" - }, - "country": { - "type": "string" - }, - "countryOfBirth": { - "type": "string" - }, - "endSituationDate": { - "type": "string" - } - } - }, - "workplace": { - "type": "string", - "description": "workplace ID" - }, - "teams": { - "type": "array", - "description": "array of strings containing team ID's", - "items": { - "type": "string" - } - }, - "holdedUserId": { - "type": "string" - } - } - } - } - }, - "description": "Employee to update" - }, - "responses": { - "200": { - "description": "employee updated", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - } - } - } - } - } - }, - "delete": { - "tags": ["Employees"], - "summary": "Delete an Employee", - "operationId": "Delete a Employee", - "description": "Delete an employee.\n", - "responses": { - "200": { - "description": "Deleted" - } - } - } - }, - "/employees/times": { - "get": { - "tags": ["Employees' time-tracking"], - "summary": "List all the time-trackings of all your employees", - "operationId": "listTimes", - "description": "List all the time-trackings of all your employees.\n", - "parameters": [ - { - "in": "query", - "name": "page", - "description": "the response is paginated and limited to 500 employees,", - "required": false, - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "search results matching criteria" - }, - "400": { - "description": "bad input parameter" - } - } - } - }, - "/employees/times/{employeeTimeId}": { - "parameters": [ - { - "name": "employeeTimeId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "tags": ["Employees' time-tracking"], - "summary": "Get a specific time-tracking", - "operationId": "getTime", - "description": "Get a specific time-tracking by Id.\n", - "responses": { - "200": { - "description": "search results matching criteria" - }, - "400": { - "description": "bad input parameter" - } - } - }, - "put": { - "tags": ["Employees' time-tracking"], - "summary": "Update a time-tracking", - "operationId": "UpdateTime", - "description": "Update a time-tracking.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "startTmp": { - "type": "string" - }, - "endTmp": { - "type": "string" - } - }, - "required": ["startTmp", "endTmp"] - } - } - }, - "description": "Employee to update" - }, - "responses": { - "200": { - "description": "time-tracking updated", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - } - } - } - } - } - }, - "delete": { - "tags": ["Employees' time-tracking"], - "summary": "Delete a time-tracking", - "operationId": "deleteTime", - "description": "Delete a time-tracking.\n", - "responses": { - "200": { - "description": "Deleted" - } - } - } - }, - "/employees/{employeeId}/times": { - "parameters": [ - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "get": { - "tags": ["Employees' time-tracking"], - "summary": "List all the time-trackings of a single employee", - "operationId": "listemployeeTimes", - "description": "List all the time-trackings of a single employee.\n", - "responses": { - "200": { - "description": "search results matching criteria" - }, - "400": { - "description": "bad input parameter" - } - } - }, - "post": { - "tags": ["Employees' time-tracking"], - "summary": "Create a time-tracking for an specific employee", - "operationId": "createEmployeeTime", - "description": "Create a time-tracking for an specific employee.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "startTmp": { - "type": "string" - }, - "endTmp": { - "type": "string" - } - }, - "required": ["startTmp", "endTmp"] - } - } - }, - "description": "Employee's time to add" - }, - "responses": { - "201": { - "description": "employee's time-tracking created", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/employees/{employeeId}/times/clockin": { - "parameters": [ - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "post": { - "tags": ["Employees' time-tracking"], - "summary": "Employee clock-in", - "operationId": "employeeClockin", - "description": "Start counting employee time-tracking.\n", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "location": { - "type": "string" - } - } - } - } - }, - "description": "Employee's time to add" - }, - "responses": { - "201": { - "description": "employee's time-tracking starts", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/employees/{employeeId}/times/clockout": { - "parameters": [ - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "post": { - "tags": ["Employees' time-tracking"], - "summary": "Employee clock-out", - "operationId": "employeeClockout", - "description": "End counting employee time-tracking.\n", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "latitude": { - "type": "string", - "description": "Eg. -7.45556" - }, - "longitude": { - "type": "string", - "description": "Eg. 55.55765" - } - } - } - } - }, - "description": "Employee's time to add" - }, - "responses": { - "201": { - "description": "employee's time-tracking ends", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/employees/{employeeId}/times/pause": { - "parameters": [ - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "post": { - "tags": ["Employees' time-tracking"], - "summary": "Employee time-tracking pause", - "operationId": "employeePause", - "description": "Pause employee time-tracking.\n", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "latitude": { - "type": "string", - "description": "Eg. -7.45556" - }, - "longitude": { - "type": "string", - "description": "Eg. 55.55765" - } - } - } - } - }, - "description": "Employee's geolocation info" - }, - "responses": { - "201": { - "description": "employee's time-tracking pauses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/employees/{employeeId}/times/unpause": { - "parameters": [ - { - "name": "employeeId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "post": { - "tags": ["Employees' time-tracking"], - "summary": "Employee time-tracking unpause", - "operationId": "employeeUnpause", - "description": "Unpause employee time-tracking.\n", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "latitude": { - "type": "string", - "description": "Eg. -7.45556" - }, - "longitude": { - "type": "string", - "description": "Eg. 55.55765" - } - } - } - } - }, - "description": "Employee's geolocation info" - }, - "responses": { - "200": { - "description": "employee's time-tracking continues", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "info": { - "type": "string" - }, - "id": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "servers": [ - { - "url": "https://api.holded.com/api/team/v1" - } - ], - "components": { - "requestBodies": { - "employeePauseEmployee": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "latitude": { - "type": "string", - "description": "Eg. -7.45556" - }, - "longitude": { - "type": "string", - "description": "Eg. 55.55765" - } - } - } - } - }, - "description": "Employee's geolocation info" - } - }, - "securitySchemes": { - "Auth": { - "type": "apiKey", - "name": "key", - "in": "header" - } - } - } -} diff --git a/forms-bridge/addons/mailchimp/class-mailchimp-addon.php b/forms-bridge/addons/mailchimp/class-mailchimp-addon.php index 24cea214..19055048 100644 --- a/forms-bridge/addons/mailchimp/class-mailchimp-addon.php +++ b/forms-bridge/addons/mailchimp/class-mailchimp-addon.php @@ -121,7 +121,7 @@ public function get_endpoint_schema( $endpoint, $backend, $method = null ) { $path = preg_replace( '/^\/\d+(\.\d+)?/', '', $endpoint ); $params = $oa_explorer->params( $path, $method ); - return $params; + return $params ?: array(); } } From b7712437fb544e39327a5661e5be90facba320e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Garc=C3=ADa?= Date: Tue, 18 Nov 2025 19:14:13 +0100 Subject: [PATCH 10/18] feat: listmonk oas yaml introspection --- .../addons/listmonk/class-listmonk-addon.php | 75 ++++++++++++++++--- 1 file changed, 66 insertions(+), 9 deletions(-) diff --git a/forms-bridge/addons/listmonk/class-listmonk-addon.php b/forms-bridge/addons/listmonk/class-listmonk-addon.php index b9bb33c4..dea75896 100644 --- a/forms-bridge/addons/listmonk/class-listmonk-addon.php +++ b/forms-bridge/addons/listmonk/class-listmonk-addon.php @@ -20,25 +20,32 @@ class Listmonk_Addon extends Addon { /** - * Handles the addon's title. + * Holds the addon's title. * * @var string */ - const TITLE = 'Listmonk'; + public const TITLE = 'Listmonk'; /** - * Handles the addon's name. + * Holds the addon's name. * * @var string */ - const NAME = 'listmonk'; + public const NAME = 'listmonk'; /** - * Handles the addom's custom bridge class. + * Holds the addom's custom bridge class. * * @var string */ - const BRIDGE = '\FORMS_BRIDGE\Listmonk_Form_Bridge'; + public const BRIDGE = '\FORMS_BRIDGE\Listmonk_Form_Bridge'; + + /** + * Holds the addon's OAS URL. + * + * @var string + */ + public const OAS_URL = 'https://listmonk.app/docs/swagger/collections.yaml'; /** * Performs a request against the backend to check the connexion status. @@ -89,16 +96,66 @@ public function fetch( $endpoint, $backend ) { return $bridge->submit(); } + /** + * Fetch available models from the backend + * + * @param Backend $backend HTTP backend object. + * + * @return array + * + * @todo Implementar el endpoint de consulta de endpoints disponibles. + */ + public function get_endpoints( $backend ) { + if ( function_exists( 'yaml_parse' ) ) { + $response = wp_remote_get( self::OAS_URL ); + + if ( ! is_wp_error( $response ) ) { + $data = yaml_parse( $response['body'] ); + + $oa_explorer = new OpenAPI( $data ); + $paths = $oa_explorer->paths(); + + return array_map( + function ( $path ) { + return '/api' . $path; + }, + $paths + ); + } + } + + return array( + '/api/subscribers', + ); + } + /** * Performs an introspection of the backend endpoint and returns API fields * and accepted content type. * - * @param string $endpoint API endpoint. - * @param string $backend Backend name. + * @param string $endpoint API endpoint. + * @param string $backend Backend name. + * @param string|null $method HTTP method. * * @return array */ - public function get_endpoint_schema( $endpoint, $backend ) { + public function get_endpoint_schema( $endpoint, $backend, $method = null ) { + if ( function_exists( 'yaml_parse' ) ) { + $response = wp_remote_get( self::OAS_URL ); + + if ( ! is_wp_error( $response ) ) { + $data = yaml_parse( $response['body'] ); + + $oa_explorer = new OpenAPI( $data ); + + $method = strtolower( $method ?? 'post' ); + $path = preg_replace( '/^\/api/', '', $endpoint ); + $params = $oa_explorer->params( $path, $method ); + + return $params ?: array(); + } + } + if ( '/api/subscribers' === $endpoint ) { return array( array( From c4f5102e431169a0382bee14e2924a192d1f1be8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Garc=C3=ADa?= Date: Tue, 18 Nov 2025 19:14:47 +0100 Subject: [PATCH 11/18] feat: odoo addon list models method --- forms-bridge/addons/odoo/class-odoo-addon.php | 45 ++++++++++++++++--- 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/forms-bridge/addons/odoo/class-odoo-addon.php b/forms-bridge/addons/odoo/class-odoo-addon.php index 423ccb3c..f940fdd2 100644 --- a/forms-bridge/addons/odoo/class-odoo-addon.php +++ b/forms-bridge/addons/odoo/class-odoo-addon.php @@ -21,25 +21,25 @@ class Odoo_Addon extends Addon { /** - * Handles the addon's title. + * Holds the addon's title. * * @var string */ - const TITLE = 'Odoo'; + public const TITLE = 'Odoo'; /** - * Handles the addon's name. + * Holds the addon's name. * * @var string */ - const NAME = 'odoo'; + public const NAME = 'odoo'; /** - * Handles the addom's custom bridge class. + * Holds the addom's custom bridge class. * * @var string */ - const BRIDGE = '\FORMS_BRIDGE\Odoo_Form_Bridge'; + public const BRIDGE = '\FORMS_BRIDGE\Odoo_Form_Bridge'; /** * Performs a request against the backend to check the connexion status. @@ -90,6 +90,39 @@ public function fetch( $endpoint, $backend ) { return $bridge->submit( array(), array( 'id', 'name' ) ); } + /** + * Fetch available models from the backend + * + * @param Backend $backend HTTP backend object. + * + * @return array + * + * @todo Implementar el endpoint de consulta de endpoints disponibles. + */ + public function get_endpoints( $backend ) { + $bridge = new Odoo_Form_Bridge( + array( + 'name' => '__odoo-' . time(), + 'method' => 'search_read', + 'endpoint' => 'ir.model', + 'backend' => $backend, + ) + ); + + $response = $bridge->submit( array(), array( 'name', 'model' ) ); + + if ( is_wp_error( $response ) ) { + return array(); + } + + return array_map( + function ( $model ) { + return $model['model']; + }, + $response['data']['result'] + ); + } + /** * Performs an introspection of the backend model and returns API fields * and accepted content type. From 6f9e3daa005361e9e3f5189a1a2ef026f78fe07d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Garc=C3=ADa?= Date: Tue, 18 Nov 2025 19:15:13 +0100 Subject: [PATCH 12/18] fix: holded endpoint schema method arguments --- forms-bridge/addons/holded/class-holded-addon.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/forms-bridge/addons/holded/class-holded-addon.php b/forms-bridge/addons/holded/class-holded-addon.php index 059fe56b..b5ef7e1c 100644 --- a/forms-bridge/addons/holded/class-holded-addon.php +++ b/forms-bridge/addons/holded/class-holded-addon.php @@ -116,12 +116,13 @@ public function fetch( $endpoint, $backend ) { * Performs an introspection of the backend endpoint and returns API fields * and accepted content type. * - * @param string $endpoint API endpoint. - * @param string $backend Backend name. + * @param string $endpoint API endpoint. + * @param string $backend Backend name. + * @param string|null $method HTTP method. * * @return array List of fields and content type of the endpoint. */ - public function get_endpoint_schema( $endpoint, $backend ) { + public function get_endpoint_schema( $endpoint, $backend, $method = null ) { $chunks = array_values( array_filter( explode( '/', $endpoint ) ) ); if ( empty( $chunks ) ) { return array(); From 12a01e53f530251521bb8eae5b55ed613ce73bcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Garc=C3=ADa?= Date: Tue, 18 Nov 2025 19:16:04 +0100 Subject: [PATCH 13/18] fix: openapi following of requestBody parameters refs --- forms-bridge/includes/class-openapi.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/forms-bridge/includes/class-openapi.php b/forms-bridge/includes/class-openapi.php index c199c108..7fce0322 100644 --- a/forms-bridge/includes/class-openapi.php +++ b/forms-bridge/includes/class-openapi.php @@ -195,7 +195,7 @@ public function params( $path, $method = null, $source = null ) { $body = $method_obj['requestBody'] ?? null; if ( $body ) { - $parameters = array_merge( $parameters, self::body_to_params( $body ) ); + $parameters = array_merge( $parameters, $this->body_to_params( $body ) ); } if ( $source ) { @@ -263,10 +263,14 @@ public function get_ref( $ref ) { * * @return array */ - private static function body_to_params( $body ) { + private function body_to_params( $body ) { $parameters = array(); foreach ( $body['content'] as $encoding => $obj ) { + if ( isset( $obj['schema']['$ref'] ) ) { + $obj['schema'] = $this->get_ref( $obj['schema']['$ref'] ); + } + foreach ( $obj['schema']['properties'] as $name => $defn ) { $parameters[] = array_merge( array( From e7d6336bc07c8da2851e0f1c9f6f8e17de831f76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Garc=C3=ADa?= Date: Tue, 18 Nov 2025 19:20:43 +0100 Subject: [PATCH 14/18] feat: brevo list endpoints method --- .../addons/brevo/class-brevo-addon.php | 29 +++++++++++++++++++ .../addons/listmonk/class-listmonk-addon.php | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/forms-bridge/addons/brevo/class-brevo-addon.php b/forms-bridge/addons/brevo/class-brevo-addon.php index da2d68ec..98038de9 100644 --- a/forms-bridge/addons/brevo/class-brevo-addon.php +++ b/forms-bridge/addons/brevo/class-brevo-addon.php @@ -97,6 +97,35 @@ public function fetch( $endpoint, $backend ) { return $bridge->submit(); } + /** + * Fetch available models from the OAS spec. + * + * @param Backend $backend HTTP backend object. + * + * @return array + * + * @todo Implementar el endpoint de consulta de endpoints disponibles. + */ + public function get_endpoints( $backend ) { + $response = wp_remote_get( self::OAS_URL ); + + if ( is_wp_error( $response ) ) { + return array(); + } + + $data = json_decode( $response['body'], true ); + $oa_explorer = new OpenAPI( $data['oasDefinition'] ); + + $paths = $oa_explorer->paths(); + + return array_map( + function ( $path ) { + return '/v3' . $path; + }, + $paths, + ); + } + /** * Performs an introspection of the backend endpoint and returns API fields * and accepted content type. diff --git a/forms-bridge/addons/listmonk/class-listmonk-addon.php b/forms-bridge/addons/listmonk/class-listmonk-addon.php index dea75896..e12a09ea 100644 --- a/forms-bridge/addons/listmonk/class-listmonk-addon.php +++ b/forms-bridge/addons/listmonk/class-listmonk-addon.php @@ -97,7 +97,7 @@ public function fetch( $endpoint, $backend ) { } /** - * Fetch available models from the backend + * Fetch available models from the OAS spec. * * @param Backend $backend HTTP backend object. * From 1e5b0b7a1ba1b33abb472ed38fcd169760183919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Garc=C3=ADa?= Date: Tue, 18 Nov 2025 19:55:39 +0100 Subject: [PATCH 15/18] feat: spoof headers on openapi data requests to external sources --- .../addons/brevo/class-brevo-addon.php | 37 ++++++++++++++++--- .../addons/holded/class-holded-addon.php | 23 ++++++++++-- .../addons/listmonk/class-listmonk-addon.php | 3 +- .../mailchimp/class-mailchimp-addon.php | 15 +++++++- forms-bridge/includes/class-openapi.php | 28 ++++++++------ 5 files changed, 84 insertions(+), 22 deletions(-) diff --git a/forms-bridge/addons/brevo/class-brevo-addon.php b/forms-bridge/addons/brevo/class-brevo-addon.php index 98038de9..367247fe 100644 --- a/forms-bridge/addons/brevo/class-brevo-addon.php +++ b/forms-bridge/addons/brevo/class-brevo-addon.php @@ -46,7 +46,7 @@ class Brevo_Addon extends Addon { * * @var string */ - public const OAS_URL = 'https://developers.brevo.com/reference/getaccount?json=on'; + public const OAS_URL = 'https://developers.brevo.com/reference/get_companies?json=on'; /** * Performs a request against the backend to check the connexion status. @@ -107,7 +107,18 @@ public function fetch( $endpoint, $backend ) { * @todo Implementar el endpoint de consulta de endpoints disponibles. */ public function get_endpoints( $backend ) { - $response = wp_remote_get( self::OAS_URL ); + $response = wp_remote_get( + self::OAS_URL, + array( + 'headers' => array( + 'Accept' => 'application/json', + 'Host' => 'developers.brevo.com', + 'Referer' => 'https://developers.brevo.com/reference/get_companies', + 'Alt-Used' => 'developers.brevo.com', + 'User-Agent' => 'Mozilla/5.0 (X11; Linux x86_64; rv:144.0) Gecko/20100101 Firefox/144.0', + ), + ) + ); if ( is_wp_error( $response ) ) { return array(); @@ -136,18 +147,34 @@ function ( $path ) { * @return array */ public function get_endpoint_schema( $endpoint, $backend ) { - $response = wp_remote_get( self::OAS_URL ); + $response = wp_remote_get( + self::OAS_URL, + array( + 'headers' => array( + 'Accept' => 'application/json', + 'Host' => 'developers.brevo.com', + 'Referer' => 'https://developers.brevo.com/reference/get_companies', + 'Alt-Used' => 'developers.brevo.com', + 'User-Agent' => 'Mozilla/5.0 (X11; Linux x86_64; rv:144.0) Gecko/20100101 Firefox/144.0', + ), + ) + ); if ( is_wp_error( $response ) ) { return array(); } - $data = json_decode( $response['body'], true ); + $data = json_decode( $response['body'], true ); + if ( ! $data ) { + return array(); + } + $oa_explorer = new OpenAPI( $data['oasDefinition'] ); $method = strtolower( $method ?? 'post' ); $path = preg_replace( '/^\/v\d+/', '', $endpoint ); - $params = $oa_explorer->params( $path, $method ); + $source = in_array( $method, array( 'post', 'put', 'patch' ), true ) ? 'body' : 'query'; + $params = $oa_explorer->params( $path, $method, $source ); return $params ?: array(); } diff --git a/forms-bridge/addons/holded/class-holded-addon.php b/forms-bridge/addons/holded/class-holded-addon.php index b5ef7e1c..409b7f65 100644 --- a/forms-bridge/addons/holded/class-holded-addon.php +++ b/forms-bridge/addons/holded/class-holded-addon.php @@ -141,17 +141,34 @@ public function get_endpoint_schema( $endpoint, $backend, $method = null ) { } $oas_url = self::OAS_BASE_URL . $oas_url . '?dereference=false&reduce=false'; - $response = wp_remote_get( $oas_url ); + $response = wp_remote_get( + $oas_url, + array( + 'headers' => array( + 'Accept' => 'application/json', + 'Host' => 'developers.holded.com', + 'Alt-Used' => 'developers.holded.com', + 'Referer' => 'https://developers.holded.com/reference/list-contacts-1', + 'User-Agent' => 'Mozilla/5.0 (X11; Linux x86_64; rv:144.0) Gecko/20100101 Firefox/144.0', + ), + ), + ); + if ( is_wp_error( $response ) ) { return array(); } - $data = json_decode( $response['body'], true ); + $data = json_decode( $response['body'], true ); + if ( ! $data ) { + return array(); + } + $oa_explorer = new OpenAPI( $data['data']['api']['schema'] ); $method = strtolower( $method ?? 'post' ); $path = preg_replace( '/\/api\/' . $module . '\/v\d+/', '', $endpoint ); - $params = $oa_explorer->params( $path, $method ); + $source = in_array( $method, array( 'post', 'put', 'patch' ), true ) ? 'body' : 'query'; + $params = $oa_explorer->params( $path, $method, $source ); return $params ?: array(); } diff --git a/forms-bridge/addons/listmonk/class-listmonk-addon.php b/forms-bridge/addons/listmonk/class-listmonk-addon.php index e12a09ea..1964c8ff 100644 --- a/forms-bridge/addons/listmonk/class-listmonk-addon.php +++ b/forms-bridge/addons/listmonk/class-listmonk-addon.php @@ -150,7 +150,8 @@ public function get_endpoint_schema( $endpoint, $backend, $method = null ) { $method = strtolower( $method ?? 'post' ); $path = preg_replace( '/^\/api/', '', $endpoint ); - $params = $oa_explorer->params( $path, $method ); + $source = in_array( $method, array( 'post', 'put', 'patch' ), true ) ? 'body' : 'query'; + $params = $oa_explorer->params( $path, $method, $source ); return $params ?: array(); } diff --git a/forms-bridge/addons/mailchimp/class-mailchimp-addon.php b/forms-bridge/addons/mailchimp/class-mailchimp-addon.php index 19055048..2dd86a60 100644 --- a/forms-bridge/addons/mailchimp/class-mailchimp-addon.php +++ b/forms-bridge/addons/mailchimp/class-mailchimp-addon.php @@ -108,7 +108,17 @@ public function fetch( $endpoint, $backend ) { * @return array */ public function get_endpoint_schema( $endpoint, $backend, $method = null ) { - $response = wp_remote_get( self::SWAGGER_URL ); + $response = wp_remote_get( + self::SWAGGER_URL, + array( + 'headers' => array( + 'Accept' => 'application/json', + 'Host' => 'mailchimp.com', + 'Referer' => 'https://mailchimp.com/developer/marketing/api/', + 'User-Agent' => 'Mozilla/5.0 (X11; Linux x86_64; rv:144.0) Gecko/20100101 Firefox/144.0', + ), + ), + ); if ( is_wp_error( $response ) ) { return array(); @@ -119,7 +129,8 @@ public function get_endpoint_schema( $endpoint, $backend, $method = null ) { $method = strtolower( $method ?? 'post' ); $path = preg_replace( '/^\/\d+(\.\d+)?/', '', $endpoint ); - $params = $oa_explorer->params( $path, $method ); + $source = in_array( $method, array( 'post', 'put', 'patch' ), true ) ? 'body' : 'query'; + $params = $oa_explorer->params( $path, $method, $source ); return $params ?: array(); } diff --git a/forms-bridge/includes/class-openapi.php b/forms-bridge/includes/class-openapi.php index 7fce0322..420d49c2 100644 --- a/forms-bridge/includes/class-openapi.php +++ b/forms-bridge/includes/class-openapi.php @@ -178,17 +178,23 @@ public function params( $path, $method = null, $source = null ) { $c = count( $parameters ); for ( $i = 0; $i < $c; $i++ ) { $param = &$parameters[ $i ]; - if ( 'body' === $param['in'] && isset( $param['schema'] ) && 'object' === $param['schema']['type'] ) { - array_splice( $parameters, $i, 1 ); - - foreach ( $param['schema']['properties'] as $prop => $prop_schema ) { - $parameters[] = array_merge( - $prop_schema, - array( - 'name' => $prop, - 'in' => 'body', - ), - ); + if ( 'body' === $param['in'] && isset( $param['schema'] ) ) { + if ( isset( $param['schema']['$ref'] ) ) { + $param['schema'] = $this->get_ref( $param['schema']['$ref'] ); + } + + if ( isset( $param['schema']['properties'] ) && is_array( $param['schema']['properties'] ) ) { + array_splice( $parameters, $i, 1 ); + + foreach ( $param['schema']['properties'] as $prop => $prop_schema ) { + $parameters[] = array_merge( + $prop_schema, + array( + 'name' => $prop, + 'in' => 'body', + ), + ); + } } } } From a73fe8ea15bb3f43d9ea1e060b3d54830bef1b41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Garc=C3=ADa?= Date: Tue, 18 Nov 2025 20:47:25 +0100 Subject: [PATCH 16/18] feat: improve brevo swagger request spoofing --- .../addons/brevo/class-brevo-addon.php | 30 ++++++++++++++----- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/forms-bridge/addons/brevo/class-brevo-addon.php b/forms-bridge/addons/brevo/class-brevo-addon.php index 367247fe..71d561e3 100644 --- a/forms-bridge/addons/brevo/class-brevo-addon.php +++ b/forms-bridge/addons/brevo/class-brevo-addon.php @@ -141,21 +141,35 @@ function ( $path ) { * Performs an introspection of the backend endpoint and returns API fields * and accepted content type. * - * @param string $endpoint API endpoint. - * @param string $backend Backend name. + * @param string $endpoint API endpoint. + * @param string $backend Backend name. + * @param string|null $method HTTP method. * * @return array */ - public function get_endpoint_schema( $endpoint, $backend ) { + public function get_endpoint_schema( $endpoint, $backend, $method = null ) { + $bytes = random_bytes( 16 ); + $bytes[6] = chr( ord( $bytes[6] ) & 0x0f | 0x40 ); // set version to 0100 + $bytes[8] = chr( ord( $bytes[8] ) & 0x3f | 0x80 ); // set bits 6-7 to 10 + $uuid = vsprintf( '%s%s-%s-%s-%s-%s%s%s', str_split( bin2hex( $bytes ), 4 ) ); + $response = wp_remote_get( self::OAS_URL, array( 'headers' => array( - 'Accept' => 'application/json', - 'Host' => 'developers.brevo.com', - 'Referer' => 'https://developers.brevo.com/reference/get_companies', - 'Alt-Used' => 'developers.brevo.com', - 'User-Agent' => 'Mozilla/5.0 (X11; Linux x86_64; rv:144.0) Gecko/20100101 Firefox/144.0', + 'Accept' => 'application/json', + 'Host' => 'developers.brevo.com', + 'Referer' => 'https://developers.brevo.com/reference/get_companies', + 'Alt-Used' => 'developers.brevo.com', + 'User-Agent' => 'Mozilla/5.0 (X11; Linux x86_64; rv:144.0) Gecko/20100101 Firefox/144.0', + 'X-Requested-With' => 'XMLHttpRequest', + ), + 'cookies' => array( + 'anonymous_id' => $uuid, + 'first_referrer' => 'https://app.brevo.com/', + 'pscd' => 'get.brevo.com', + 'readme_language' => 'shell', + 'readme_library' => '{%22shell%22:%22curl%22}', ), ) ); From 7ffa1c0baae9a8ccad88ec5c2f5841af1fbdd452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Garc=C3=ADa?= Date: Tue, 18 Nov 2025 20:48:08 +0100 Subject: [PATCH 17/18] feat: addon endpoint schema method API standarization --- forms-bridge/addons/bigin/class-bigin-addon.php | 11 ++++++++--- .../addons/financoop/class-financoop-addon.php | 11 ++++++++--- .../addons/gsheets/class-gsheets-addon.php | 11 ++++++++--- .../addons/listmonk/class-listmonk-addon.php | 14 ++++++++------ .../addons/mailchimp/class-mailchimp-addon.php | 6 +++++- .../addons/nextcloud/class-nextcloud-addon.php | 11 ++++++++--- forms-bridge/addons/odoo/class-odoo-addon.php | 11 ++++++++--- forms-bridge/addons/zoho/class-zoho-addon.php | 11 ++++++++--- forms-bridge/includes/class-addon.php | 7 ++++--- 9 files changed, 65 insertions(+), 28 deletions(-) diff --git a/forms-bridge/addons/bigin/class-bigin-addon.php b/forms-bridge/addons/bigin/class-bigin-addon.php index 49f06038..9c17ad95 100644 --- a/forms-bridge/addons/bigin/class-bigin-addon.php +++ b/forms-bridge/addons/bigin/class-bigin-addon.php @@ -101,12 +101,17 @@ public function ping( $backend ) { /** * Performs an introspection of the backend endpoint and returns API fields. * - * @param string $endpoint API endpoint. - * @param string $backend Backend name. + * @param string $endpoint API endpoint. + * @param string $backend Backend name. + * @param string|null $method HTTP method. * * @return array List of fields and content type of the endpoint. */ - public function get_endpoint_schema( $endpoint, $backend ) { + public function get_endpoint_schema( $endpoint, $backend, $method = null ) { + if ( in_array( $method, array( 'POST', 'PUT' ), true ) ) { + return array(); + } + if ( ! preg_match( '/\/(([A-Z][a-z]+(_[A-Z][a-z])?)(?:\/upsert)?$)/', diff --git a/forms-bridge/addons/financoop/class-financoop-addon.php b/forms-bridge/addons/financoop/class-financoop-addon.php index 9fd7a111..49cc4dc0 100644 --- a/forms-bridge/addons/financoop/class-financoop-addon.php +++ b/forms-bridge/addons/financoop/class-financoop-addon.php @@ -94,12 +94,17 @@ public function fetch( $endpoint, $backend ) { * Performs an introspection of the backend endpoint and returns API fields * and accepted content type. * - * @param string $endpoint API endpoint. - * @param string $backend Backend name. + * @param string $endpoint API endpoint. + * @param string $backend Backend name. + * @param string|null $method HTTP method. * * @return array */ - public function get_endpoint_schema( $endpoint, $backend ) { + public function get_endpoint_schema( $endpoint, $backend, $method = null ) { + if ( 'POST' !== $method ) { + return array(); + } + $bridge = new Finan_Coop_Form_Bridge( array( 'name' => '__financoop-' . time(), diff --git a/forms-bridge/addons/gsheets/class-gsheets-addon.php b/forms-bridge/addons/gsheets/class-gsheets-addon.php index be75d4fd..4109b145 100644 --- a/forms-bridge/addons/gsheets/class-gsheets-addon.php +++ b/forms-bridge/addons/gsheets/class-gsheets-addon.php @@ -156,12 +156,17 @@ public function fetch( $endpoint, $backend ) { * Performs an introspection of the backend endpoint and returns API fields * and accepted content type. * - * @param string $endpoint Concatenation of spreadsheet ID and tab name. - * @param string $backend Backend name. + * @param string $endpoint Concatenation of spreadsheet ID and tab name. + * @param string $backend Backend name. + * @param string|null $method HTTP method. * * @return array List of fields and content type of the endpoint. */ - public function get_endpoint_schema( $endpoint, $backend ) { + public function get_endpoint_schema( $endpoint, $backend, $method = null ) { + if ( 'POST' !== $method ) { + return array(); + } + $bridges = FBAPI::get_addon_bridges( self::NAME ); foreach ( $bridges as $candidate ) { $data = $candidate->data(); diff --git a/forms-bridge/addons/listmonk/class-listmonk-addon.php b/forms-bridge/addons/listmonk/class-listmonk-addon.php index 1964c8ff..c595c22e 100644 --- a/forms-bridge/addons/listmonk/class-listmonk-addon.php +++ b/forms-bridge/addons/listmonk/class-listmonk-addon.php @@ -146,14 +146,16 @@ public function get_endpoint_schema( $endpoint, $backend, $method = null ) { if ( ! is_wp_error( $response ) ) { $data = yaml_parse( $response['body'] ); - $oa_explorer = new OpenAPI( $data ); + if ( $data ) { + $oa_explorer = new OpenAPI( $data ); - $method = strtolower( $method ?? 'post' ); - $path = preg_replace( '/^\/api/', '', $endpoint ); - $source = in_array( $method, array( 'post', 'put', 'patch' ), true ) ? 'body' : 'query'; - $params = $oa_explorer->params( $path, $method, $source ); + $method = strtolower( $method ?? 'post' ); + $path = preg_replace( '/^\/api/', '', $endpoint ); + $source = in_array( $method, array( 'post', 'put', 'patch' ), true ) ? 'body' : 'query'; + $params = $oa_explorer->params( $path, $method, $source ); - return $params ?: array(); + return $params ?: array(); + } } } diff --git a/forms-bridge/addons/mailchimp/class-mailchimp-addon.php b/forms-bridge/addons/mailchimp/class-mailchimp-addon.php index 2dd86a60..a595a2d1 100644 --- a/forms-bridge/addons/mailchimp/class-mailchimp-addon.php +++ b/forms-bridge/addons/mailchimp/class-mailchimp-addon.php @@ -124,7 +124,11 @@ public function get_endpoint_schema( $endpoint, $backend, $method = null ) { return array(); } - $data = json_decode( $response['body'], true ); + $data = json_decode( $response['body'], true ); + if ( ! $data ) { + return array(); + } + $oa_explorer = new OpenAPI( $data ); $method = strtolower( $method ?? 'post' ); diff --git a/forms-bridge/addons/nextcloud/class-nextcloud-addon.php b/forms-bridge/addons/nextcloud/class-nextcloud-addon.php index 59cb3dbe..06ec01bb 100644 --- a/forms-bridge/addons/nextcloud/class-nextcloud-addon.php +++ b/forms-bridge/addons/nextcloud/class-nextcloud-addon.php @@ -110,12 +110,17 @@ public function fetch( $endpoint, $backend ) { * Performs an introspection of the backend model and returns API fields * and accepted content type. * - * @param string $filepath Filepath. - * @param string $backend Backend name. + * @param string $filepath Filepath. + * @param string $backend Backend name. + * @param string|null $method HTTP method. * * @return array List of fields and content type of the model. */ - public function get_endpoint_schema( $filepath, $backend ) { + public function get_endpoint_schema( $filepath, $backend, $method = null ) { + if ( 'PUT' !== $method ) { + return array(); + } + $bridge = new Nextcloud_Form_Bridge( array( 'name' => '__nextcloud-' . time(), diff --git a/forms-bridge/addons/odoo/class-odoo-addon.php b/forms-bridge/addons/odoo/class-odoo-addon.php index f940fdd2..824bcde2 100644 --- a/forms-bridge/addons/odoo/class-odoo-addon.php +++ b/forms-bridge/addons/odoo/class-odoo-addon.php @@ -127,12 +127,17 @@ function ( $model ) { * Performs an introspection of the backend model and returns API fields * and accepted content type. * - * @param string $model Target model name. - * @param string $backend Target backend name. + * @param string $model Target model name. + * @param string $backend Target backend name. + * @param string|null $method HTTP method. * * @return array List of fields and content type of the model. */ - public function get_endpoint_schema( $model, $backend ) { + public function get_endpoint_schema( $model, $backend, $method = null ) { + if ( ! in_array( $method, array( 'write', 'create' ), true ) ) { + return array(); + } + $bridge = new Odoo_Form_Bridge( array( 'name' => '__odoo-' . time(), diff --git a/forms-bridge/addons/zoho/class-zoho-addon.php b/forms-bridge/addons/zoho/class-zoho-addon.php index 56529bf6..db008fd0 100644 --- a/forms-bridge/addons/zoho/class-zoho-addon.php +++ b/forms-bridge/addons/zoho/class-zoho-addon.php @@ -122,12 +122,17 @@ public function fetch( $endpoint, $backend ) { /** * Performs an introspection of the backend endpoint and returns API fields. * - * @param string $endpoint API endpoint. - * @param string $backend Backend name. + * @param string $endpoint API endpoint. + * @param string $backend Backend name. + * @param string|null $method HTTP method. * * @return array List of fields and content type of the endpoint. */ - public function get_endpoint_schema( $endpoint, $backend ) { + public function get_endpoint_schema( $endpoint, $backend, $method = null ) { + if ( in_array( $method, array( 'POST', 'PUT' ), true ) ) { + return array(); + } + if ( ! preg_match( '/\/(([A-Z][a-z]+(_[A-Z][a-z])?)(?:\/upsert)?$)/', diff --git a/forms-bridge/includes/class-addon.php b/forms-bridge/includes/class-addon.php index 001c950e..ffc9659c 100644 --- a/forms-bridge/includes/class-addon.php +++ b/forms-bridge/includes/class-addon.php @@ -589,12 +589,13 @@ public function fetch( $endpoint, $backend ) { * Performs an introspection of the backend endpoint and returns API fields * and accepted content type. * - * @param string $endpoint Target endpoint name. - * @param string $backend Target backend name. + * @param string $endpoint Target endpoint name. + * @param string $backend Target backend name. + * @param string|null $method HTTP method. * * @return array|WP_Error */ - public function get_endpoint_schema( $endpoint, $backend ) { + public function get_endpoint_schema( $endpoint, $backend, $method = null ) { return array(); } From 8fb3d4901112c84173d57321c02ed8cd0e6b5a53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Garc=C3=ADa?= Date: Tue, 18 Nov 2025 20:48:34 +0100 Subject: [PATCH 18/18] feat: include method on endpoint schema requests --- src/providers/ApiSchema.jsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/providers/ApiSchema.jsx b/src/providers/ApiSchema.jsx index 7e7f9e3c..ef2e9ca2 100644 --- a/src/providers/ApiSchema.jsx +++ b/src/providers/ApiSchema.jsx @@ -23,10 +23,11 @@ export default function ApiSchemaProvider({ children, bridge }) { const key = useMemo( () => JSON.stringify({ + method: bridge?.method, endpoint: bridge?.endpoint, backend, }), - [bridge?.endpoint, backend] + [bridge?.endpoint, bridge?.method, backend] ); const addSchema = (key, schema) => { @@ -34,13 +35,13 @@ export default function ApiSchemaProvider({ children, bridge }) { updates((i) => i + 1); }; - const fetch = (key, endpoint, backend) => { + const fetch = (key, { endpoint, method }, backend) => { setLoading(true); apiFetch({ path: `forms-bridge/v1/${addon}/backend/endpoint/schema`, method: "POST", - data: { endpoint, backend }, + data: { endpoint, method, backend }, }) .then((schema) => addSchema(key, schema)) .catch(() => addSchema(key, [])) @@ -53,10 +54,7 @@ export default function ApiSchemaProvider({ children, bridge }) { if (!backend || !bridge?.endpoint || loading || schemas.get(key)) return; - timeout.current = setTimeout( - () => fetch(key, bridge.endpoint, backend), - 400 - ); + timeout.current = setTimeout(() => fetch(key, bridge, backend), 400); }, [key, bridge, backend]); const schema = schemas.get(key);