%PDF- %PDF-
Direktori : /www/varak.net/nextcloud.varak.net/apps_old/apps/cospend/ |
Current File : //www/varak.net/nextcloud.varak.net/apps_old/apps/cospend/openapi.json |
{ "openapi": "3.0.3", "info": { "title": "cospend", "version": "0.0.1", "description": " ", "license": { "name": "agpl" } }, "components": { "securitySchemes": { "basic_auth": { "type": "http", "scheme": "basic" }, "bearer_auth": { "type": "http", "scheme": "bearer" } }, "schemas": { "AccessLevel": { "type": "integer", "format": "int64", "enum": [ 0, 1, 2, 3, 4 ] }, "BaseShare": { "type": "object", "required": [ "id", "accesslevel" ], "properties": { "id": { "type": "integer", "format": "int64" }, "accesslevel": { "$ref": "#/components/schemas/AccessLevel" } } }, "Bill": { "type": "object", "required": [ "id", "amount", "what", "comment", "timestamp", "date", "payer_id", "owers", "owerIds", "repeat", "paymentmode", "paymentmodeid", "categoryid", "lastchanged", "repeatallactive", "repeatuntil", "repeatfreq", "deleted" ], "properties": { "id": { "type": "integer", "format": "int64" }, "amount": { "type": "number", "format": "float" }, "what": { "type": "string" }, "comment": { "type": "string" }, "timestamp": { "type": "integer", "format": "int64" }, "date": { "type": "string" }, "payer_id": { "type": "integer", "format": "int64" }, "owers": { "type": "array", "items": { "$ref": "#/components/schemas/Ower" } }, "owerIds": { "type": "array", "items": { "type": "integer", "format": "int64" } }, "repeat": { "$ref": "#/components/schemas/Frequency" }, "paymentmode": { "type": "string" }, "paymentmodeid": { "type": "integer", "format": "int64" }, "categoryid": { "type": "integer", "format": "int64" }, "lastchanged": { "type": "integer", "format": "int64" }, "repeatallactive": { "type": "integer", "format": "int64" }, "repeatuntil": { "type": "string" }, "repeatfreq": { "type": "integer", "format": "int64" }, "deleted": { "type": "integer", "format": "int64" } } }, "Category": { "$ref": "#/components/schemas/CategoryOrPaymentMode" }, "CategoryOrPaymentMode": { "type": "object", "required": [ "id", "projectid", "name", "color", "icon", "order" ], "properties": { "id": { "type": "integer", "format": "int64" }, "projectid": { "type": "string" }, "name": { "type": "string", "nullable": true }, "color": { "type": "string", "nullable": true }, "icon": { "type": "string", "nullable": true }, "order": { "type": "integer", "format": "int64" } } }, "CircleShare": { "allOf": [ { "$ref": "#/components/schemas/BaseShare" }, { "type": "object", "required": [ "type", "circleid", "name" ], "properties": { "type": { "type": "string", "enum": [ "c" ] }, "circleid": { "type": "string" }, "name": { "type": "string" } } } ] }, "Currency": { "type": "object", "required": [ "id", "name", "exchange_rate", "projectid" ], "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "exchange_rate": { "type": "number", "format": "float" }, "projectid": { "type": "string" } } }, "ExtraProjectInfo": { "type": "object", "required": [ "active_members", "members", "balance", "nb_bills", "total_spent", "nb_trashbin_bills", "shares", "currencies", "categories", "paymentmodes" ], "properties": { "active_members": { "type": "array", "items": { "$ref": "#/components/schemas/Member" } }, "members": { "type": "array", "items": { "$ref": "#/components/schemas/Member" } }, "balance": { "type": "array", "items": { "type": "number", "format": "float" } }, "nb_bills": { "type": "integer", "format": "int64" }, "total_spent": { "type": "number", "format": "float" }, "nb_trashbin_bills": { "type": "integer", "format": "int64" }, "shares": { "type": "array", "items": { "$ref": "#/components/schemas/Share" } }, "currencies": { "type": "array", "items": { "$ref": "#/components/schemas/Currency" } }, "categories": { "type": "array", "items": { "$ref": "#/components/schemas/CategoryOrPaymentMode" } }, "paymentmodes": { "type": "array", "items": { "$ref": "#/components/schemas/CategoryOrPaymentMode" } } } }, "Frequency": { "type": "string", "enum": [ "n", "d", "w", "b", "s", "m", "y" ] }, "FullProjectInfo": { "allOf": [ { "$ref": "#/components/schemas/ProjectInfoPlusExtra" }, { "type": "object", "required": [ "myaccesslevel" ], "properties": { "myaccesslevel": { "type": "integer", "format": "int64" } } } ] }, "FullPublicProjectInfo": { "allOf": [ { "$ref": "#/components/schemas/PublicProjectInfoPlusExtra" }, { "type": "object", "required": [ "myaccesslevel" ], "properties": { "myaccesslevel": { "type": "integer", "format": "int64" } } } ] }, "GroupShare": { "allOf": [ { "$ref": "#/components/schemas/BaseShare" }, { "type": "object", "required": [ "type", "groupid", "name" ], "properties": { "type": { "type": "string", "enum": [ "g" ] }, "groupid": { "type": "string" }, "name": { "type": "string" } } } ] }, "Member": { "type": "object", "required": [ "activated", "userid", "name", "id", "weight", "color", "lastchanged" ], "properties": { "activated": { "type": "boolean" }, "userid": { "type": "string", "nullable": true }, "name": { "type": "string" }, "id": { "type": "integer", "format": "int64" }, "weight": { "type": "number", "format": "float" }, "color": { "type": "object", "required": [ "r", "g", "b" ], "properties": { "r": { "type": "integer", "format": "int64" }, "g": { "type": "integer", "format": "int64" }, "b": { "type": "integer", "format": "int64" } } }, "lastchanged": { "type": "integer", "format": "int64" } } }, "OCSMeta": { "type": "object", "required": [ "status", "statuscode" ], "properties": { "status": { "type": "string" }, "statuscode": { "type": "integer" }, "message": { "type": "string" }, "totalitems": { "type": "string" }, "itemsperpage": { "type": "string" } } }, "Ower": { "type": "object", "required": [ "id", "weight", "name", "activated" ], "properties": { "id": { "type": "integer", "format": "int64" }, "weight": { "type": "number", "format": "float" }, "name": { "type": "string" }, "activated": { "type": "boolean" } } }, "PaymentMode": { "allOf": [ { "$ref": "#/components/schemas/CategoryOrPaymentMode" }, { "type": "object", "required": [ "old_id" ], "properties": { "old_id": { "type": "string" } } } ] }, "ProjectInfo": { "allOf": [ { "$ref": "#/components/schemas/PublicProjectInfo" }, { "type": "object", "required": [ "userid" ], "properties": { "userid": { "type": "string" } } } ] }, "ProjectInfoPlusExtra": { "allOf": [ { "$ref": "#/components/schemas/ProjectInfo" }, { "$ref": "#/components/schemas/ExtraProjectInfo" } ] }, "ProjectSettlement": { "type": "object", "required": [ "transactions", "balances" ], "properties": { "transactions": { "type": "array", "nullable": true, "items": { "type": "object", "required": [ "to", "amount", "from" ], "properties": { "to": { "type": "integer", "format": "int64" }, "amount": { "type": "number", "format": "float" }, "from": { "type": "integer", "format": "int64" } } } }, "balances": { "type": "object", "additionalProperties": { "type": "number", "format": "float" } } } }, "ProjectStatistics": { "type": "object", "additionalProperties": { "type": "object" } }, "PublicCapabilities": { "type": "object", "additionalProperties": { "type": "object", "additionalProperties": { "oneOf": [ { "type": "boolean" }, { "type": "string" } ] } } }, "PublicProjectInfo": { "type": "object", "required": [ "id", "name", "email", "autoexport", "lastchanged", "deletiondisabled", "categorysort", "paymentmodesort", "currencyname", "archived_ts" ], "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "email": { "type": "string", "nullable": true }, "autoexport": { "type": "string" }, "lastchanged": { "type": "integer", "format": "int64" }, "deletiondisabled": { "type": "boolean" }, "categorysort": { "type": "string" }, "paymentmodesort": { "type": "string" }, "currencyname": { "type": "string" }, "archived_ts": { "type": "integer", "format": "int64" } } }, "PublicProjectInfoPlusExtra": { "allOf": [ { "$ref": "#/components/schemas/PublicProjectInfo" }, { "$ref": "#/components/schemas/ExtraProjectInfo" } ] }, "PublicShare": { "allOf": [ { "$ref": "#/components/schemas/BaseShare" }, { "type": "object", "required": [ "type", "token", "label", "password" ], "properties": { "type": { "type": "string", "enum": [ "l" ] }, "token": { "type": "string" }, "label": { "type": "string", "nullable": true }, "password": { "type": "string", "nullable": true } } } ] }, "Share": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/UserShare" }, { "$ref": "#/components/schemas/GroupShare" }, { "$ref": "#/components/schemas/CircleShare" }, { "$ref": "#/components/schemas/PublicShare" } ] } }, "UserShare": { "allOf": [ { "$ref": "#/components/schemas/BaseShare" }, { "type": "object", "required": [ "type", "userid", "name", "manually_added" ], "properties": { "type": { "type": "string", "enum": [ "u" ] }, "userid": { "type": "string" }, "name": { "type": "string" }, "manually_added": { "type": "boolean" } } } ] } } }, "paths": { "/ocs/v2.php/apps/cospend/api/{apiVersion}/option-values": { "get": { "operationId": "settings-get-options-values", "summary": "Get setting values", "description": "Get setting values from the database for the current user", "tags": [ "Settings" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "values" ], "properties": { "values": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } } } } } } }, "put": { "operationId": "settings-save-option-values", "summary": "Save setting values", "description": "Save setting values to the database for the current user", "tags": [ "Settings" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "options[]", "in": "query", "description": "Array of setting key/values to save", "required": true, "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/ping": { "get": { "operationId": "api-ping", "summary": "Ping", "description": "Used by MoneyBuster to check if weblogin is valid", "tags": [ "api" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "array", "items": { "type": "string", "nullable": true } } } } } } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects": { "get": { "operationId": "projects-get-projects", "summary": "Get project list", "tags": [ "Projects" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "Project list", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/FullProjectInfo" } } } } } } } } } } }, "post": { "operationId": "projects-create-project", "summary": "Create a project", "description": "Change for clients: response now contains full project info", "tags": [ "Projects" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "id", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "name", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "Project successfully created", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/FullProjectInfo" } } } } } } } }, "400": { "description": "Failed to create project", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}": { "delete": { "operationId": "projects-delete-project", "summary": "Delete a project", "tags": [ "Projects" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The project was successfully deleted", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "404": { "description": "The project was not found", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } } } }, "put": { "operationId": "projects-edit-project", "summary": "Edit a project", "tags": [ "Projects" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "name", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "autoExport", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "currencyName", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "deletionDisabled", "in": "query", "schema": { "type": "integer", "nullable": true, "default": 0, "enum": [ 0, 1 ] } }, { "name": "categorySort", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "paymentModeSort", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "archivedTs", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The project was successfully update", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "400": { "description": "Failed to edit the project", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } }, "get": { "operationId": "projects-get-project-info", "summary": "Get project information", "tags": [ "Projects" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "Project info", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/FullProjectInfo" } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/export-csv-project": { "get": { "operationId": "projects-export-csv-project", "summary": "Export project", "description": "Export project to CSV", "tags": [ "Projects" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "name", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "path" ], "properties": { "path": { "type": "string" } } } } } } } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/import-csv-project": { "get": { "operationId": "projects-import-csv-project", "summary": "Import project", "description": "Import a project from a Cospend CSV file", "tags": [ "Projects" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "path", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/FullProjectInfo" } } } } } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/import-sw-project": { "get": { "operationId": "projects-importsw-project", "summary": "Import a SplitWise project", "description": "Import a project from a SplitWise CSV file", "tags": [ "Projects" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "path", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/FullProjectInfo" } } } } } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/statistics": { "get": { "operationId": "projects-get-project-statistics", "summary": "Get statistics data", "tags": [ "Projects" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "tsMin", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "tsMax", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "paymentModeId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "categoryId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "amountMin", "in": "query", "schema": { "type": "number", "format": "float", "nullable": true } }, { "name": "amountMax", "in": "query", "schema": { "type": "number", "format": "float", "nullable": true } }, { "name": "showDisabled", "in": "query", "schema": { "type": "string", "default": "1" } }, { "name": "currencyId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "payerId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ProjectStatistics" } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/export-csv-statistics": { "get": { "operationId": "projects-export-csv-statistics", "summary": "Export statistics", "description": "Export statistics to CSV", "tags": [ "Projects" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "tsMin", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "tsMax", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "paymentModeId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "category", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "amountMin", "in": "query", "schema": { "type": "number", "format": "float", "nullable": true } }, { "name": "amountMax", "in": "query", "schema": { "type": "number", "format": "float", "nullable": true } }, { "name": "showDisabled", "in": "query", "schema": { "type": "integer", "format": "int64", "default": 1 } }, { "name": "currencyId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "path" ], "properties": { "path": { "type": "string" } } } } } } } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/settlement": { "get": { "operationId": "projects-get-project-settlement", "summary": "Get settlement data", "tags": [ "Projects" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "centeredOn", "in": "query", "description": "Member ID to center the settlement on. All suggested transactions will involve this member.", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "maxTimestamp", "in": "query", "description": "Settle at a precise date. So the member balances are all back to zero at this date.", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ProjectSettlement" } } } } } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/auto-settlement": { "get": { "operationId": "projects-auto-settlement", "summary": "Automatic settlement plan", "description": "Create reimbursement bills to automatically settle a project", "tags": [ "Projects" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "centeredOn", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "precision", "in": "query", "schema": { "type": "integer", "format": "int64", "default": 2 } }, { "name": "maxTimestamp", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/export-csv-settlement": { "get": { "operationId": "projects-export-csv-settlement", "summary": "Export settlement plan", "description": "Export settlement plan as CSV", "tags": [ "Projects" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "centeredOn", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "maxTimestamp", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "path" ], "properties": { "path": { "type": "string" } } } } } } } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/public-file-share": { "post": { "operationId": "sharing-get-public-file-share", "summary": "Get or create file share", "description": "Get or create a public file share from a node path", "tags": [ "Sharing" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "path", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "token" ], "properties": { "token": { "type": "string" } } } } } } } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/public/projects/{token}/{password}": { "delete": { "operationId": "[public api] projects-public-delete-project", "summary": "Delete a project", "tags": [ "[Public API] Projects" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } } } }, "put": { "operationId": "[public api] projects-public-edit-project", "summary": "Edit a project", "tags": [ "[Public API] Projects" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "name", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "autoExport", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "currencyName", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "deletionDisabled", "in": "query", "schema": { "type": "integer", "nullable": true, "default": 0, "enum": [ 0, 1 ] } }, { "name": "categorySort", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "paymentModeSort", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "archivedTs", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } }, "get": { "operationId": "[public api] projects-public-get-project-info", "summary": "Get project information", "tags": [ "[Public API] Projects" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/FullPublicProjectInfo" } } } } } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/public/projects/{token}/{password}/statistics": { "get": { "operationId": "[public api] projects-public-get-project-statistics", "summary": "Get statistics data", "tags": [ "[Public API] Projects" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "tsMin", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "tsMax", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "paymentModeId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "categoryId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "amountMin", "in": "query", "schema": { "type": "number", "format": "float", "nullable": true } }, { "name": "amountMax", "in": "query", "schema": { "type": "number", "format": "float", "nullable": true } }, { "name": "showDisabled", "in": "query", "schema": { "type": "string", "default": "1" } }, { "name": "currencyId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "payerId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ProjectStatistics" } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/public/projects/{token}/{password}/settlement": { "get": { "operationId": "[public api] projects-public-get-project-settlement", "summary": "Get project settlement info", "tags": [ "[Public API] Projects" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "centeredOn", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "maxTimestamp", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ProjectSettlement" } } } } } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/public/projects/{token}/{password}/auto-settlement": { "get": { "operationId": "[public api] projects-public-auto-settlement", "summary": "Get automatic settlement plan", "tags": [ "[Public API] Projects" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "centeredOn", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "precision", "in": "query", "schema": { "type": "integer", "format": "int64", "default": 2 } }, { "name": "maxTimestamp", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/bills": { "post": { "operationId": "bills-create-bill", "summary": "Create a bill", "tags": [ "Bills" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "date", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "what", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "payer", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "payedFor", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "amount", "in": "query", "schema": { "type": "number", "format": "float", "nullable": true } }, { "name": "repeat", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "paymentMode", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "paymentModeId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "categoryId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "repeatAllActive", "in": "query", "schema": { "type": "integer", "format": "int64", "default": 0 } }, { "name": "repeatUntil", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "timestamp", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "comment", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "repeatFreq", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The bill was successfully created", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "integer", "format": "int64" } } } } } } } }, "400": { "description": "Failed to create the bill", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "error" ], "properties": { "error": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } }, "get": { "operationId": "bills-get-bills", "summary": "Get a project's bill list", "tags": [ "Bills" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "lastChanged", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "offset", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true, "default": 0 } }, { "name": "limit", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "reverse", "in": "query", "schema": { "type": "integer", "default": 0, "enum": [ 0, 1 ] } }, { "name": "payerId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "categoryId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "paymentModeId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "includeBillId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "searchTerm", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "deleted", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true, "default": 0 } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The bill list was successfully obtained", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "nb_bills", "allBillIds", "timestamp", "bills" ], "properties": { "nb_bills": { "type": "integer", "format": "int64" }, "allBillIds": { "type": "array", "items": { "type": "integer", "format": "int64" } }, "timestamp": { "type": "integer", "format": "int64" }, "bills": { "type": "array", "items": { "$ref": "#/components/schemas/Bill" } } } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } }, "delete": { "operationId": "bills-delete-bills", "summary": "Delete multiple bills", "tags": [ "Bills" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "billIds[]", "in": "query", "required": true, "schema": { "type": "array", "items": { "type": "integer", "format": "int64" } } }, { "name": "moveToTrash", "in": "query", "schema": { "type": "integer", "default": 1, "enum": [ 0, 1 ] } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "Bills were successfully deleted", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "403": { "description": "This action is forbidden", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } }, "put": { "operationId": "bills-edit-bills", "summary": "Edit multiple bills", "tags": [ "Bills" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "billIds[]", "in": "query", "required": true, "schema": { "type": "array", "items": { "type": "integer", "format": "int64" } } }, { "name": "categoryId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "date", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "what", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "payer", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "payedFor", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "amount", "in": "query", "schema": { "type": "number", "format": "float", "nullable": true } }, { "name": "repeat", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "paymentMode", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "paymentModeId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "repeatAllActive", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "repeatUntil", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "timestamp", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "comment", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "repeatFreq", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "deleted", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The bills were successfully edited", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "array", "items": { "type": "integer", "format": "int64" } } } } } } } } }, "400": { "description": "Failed to edit the bills", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/bills/{billId}": { "get": { "operationId": "bills-get-bill", "summary": "Get a bill", "tags": [ "Bills" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "billId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The bill was successfully obtained", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/Bill" } } } } } } } }, "404": { "description": "The bill was not found", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } } } }, "delete": { "operationId": "bills-delete-bill", "summary": "Delete a bill", "tags": [ "Bills" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "moveToTrash", "in": "query", "schema": { "type": "integer", "default": 1, "enum": [ 0, 1 ] } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "billId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "Bill was successfully deleted", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "403": { "description": "This action is forbidden", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } }, "put": { "operationId": "bills-edit-bill", "summary": "Edit a bill", "tags": [ "Bills" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "date", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "what", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "payer", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "payedFor", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "amount", "in": "query", "schema": { "type": "number", "format": "float", "nullable": true } }, { "name": "repeat", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "paymentMode", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "paymentModeId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "categoryId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "repeatAllActive", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "repeatUntil", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "timestamp", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "comment", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "repeatFreq", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "deleted", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "billId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The bill was successfully edited", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "integer", "format": "int64" } } } } } } } }, "400": { "description": "Failed to edit the bill", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/trash-bin": { "delete": { "operationId": "bills-clear-trash-bin", "summary": "Clear the trash bin", "tags": [ "Bills" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The trash bin was successfully cleared", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "400": { "description": "Failed to clear the trash bin", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/bills/{billId}/move": { "post": { "operationId": "bills-move-bill", "summary": "Move a bill", "description": "Move a bill from one project to another", "tags": [ "Bills" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "toProjectId", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "billId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The bill was moved successfully", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "integer", "format": "int64" } } } } } } } }, "400": { "description": "Failed to move the bill", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "401": { "description": "Current user is not allowed to create a bill in the target project", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/bills/{billId}/repeat": { "get": { "operationId": "bills-repeat-bill", "summary": "Repeat a bill", "description": "Trigger bill repetition for a specific bill", "tags": [ "Bills" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "billId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "array", "items": { "type": "object", "required": [ "new_bill_id", "date_orig", "date_repeat", "what", "project_name" ], "properties": { "new_bill_id": { "type": "integer", "format": "int64" }, "date_orig": { "type": "string" }, "date_repeat": { "type": "string" }, "what": { "type": "string" }, "project_name": { "type": "string" } } } } } } } } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/public/projects/{token}/{password}/bills": { "post": { "operationId": "[public api] bills-public-create-bill", "summary": "Create a bill", "tags": [ "[Public API] Bills" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "date", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "what", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "payer", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "payedFor", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "amount", "in": "query", "schema": { "type": "number", "format": "float", "nullable": true } }, { "name": "repeat", "in": "query", "schema": { "type": "string", "default": "n" } }, { "name": "paymentMode", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "paymentModeId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "categoryId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "repeatAllActive", "in": "query", "schema": { "type": "integer", "format": "int64", "default": 0 } }, { "name": "repeatUntil", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "timestamp", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "comment", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "repeatFreq", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "integer", "format": "int64" } } } } } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "error" ], "properties": { "error": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } }, "get": { "operationId": "[public api] bills-public-get-bills", "summary": "Get a project's bill list", "tags": [ "[Public API] Bills" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "lastChanged", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "offset", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true, "default": 0 } }, { "name": "limit", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "reverse", "in": "query", "schema": { "type": "integer", "default": 0, "enum": [ 0, 1 ] } }, { "name": "payerId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "categoryId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "paymentModeId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "includeBillId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "searchTerm", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "deleted", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true, "default": 0 } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "nb_bills", "allBillIds", "timestamp", "bills" ], "properties": { "nb_bills": { "type": "integer", "format": "int64" }, "allBillIds": { "type": "array", "items": { "type": "integer", "format": "int64" } }, "timestamp": { "type": "integer", "format": "int64" }, "bills": { "type": "array", "items": { "$ref": "#/components/schemas/Bill" } } } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } }, "delete": { "operationId": "[public api] bills-public-delete-bills", "summary": "Delete multiple bills", "tags": [ "[Public API] Bills" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "billIds[]", "in": "query", "required": true, "schema": { "type": "array", "items": { "type": "integer", "format": "int64" } } }, { "name": "moveToTrash", "in": "query", "schema": { "type": "integer", "default": 1, "enum": [ 0, 1 ] } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } }, "put": { "operationId": "[public api] bills-public-edit-bills", "summary": "Edit multiple bills", "tags": [ "[Public API] Bills" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "billIds[]", "in": "query", "required": true, "schema": { "type": "array", "items": { "type": "integer", "format": "int64" } } }, { "name": "categoryId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "date", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "what", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "payer", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "payedFor", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "amount", "in": "query", "schema": { "type": "number", "format": "float", "nullable": true } }, { "name": "repeat", "in": "query", "schema": { "type": "string", "nullable": true, "default": "n" } }, { "name": "paymentMode", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "paymentModeId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "repeatAllActive", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "repeatUntil", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "timestamp", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "comment", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "repeatFreq", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "deleted", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "array", "items": { "type": "integer", "format": "int64" } } } } } } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/public/projects/{token}/{password}/bills/{billId}/repeat": { "get": { "operationId": "[public api] bills-public-repeat-bill", "summary": "Trigger bill repetition for a specific bill", "tags": [ "[Public API] Bills" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "billId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "array", "items": { "type": "object", "required": [ "new_bill_id", "date_orig", "date_repeat", "what", "project_name" ], "properties": { "new_bill_id": { "type": "integer", "format": "int64" }, "date_orig": { "type": "string" }, "date_repeat": { "type": "string" }, "what": { "type": "string" }, "project_name": { "type": "string" } } } } } } } } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/public/projects/{token}/{password}/bills/{billId}": { "get": { "operationId": "[public api] bills-public-get-bill", "tags": [ "[Public API] Bills" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "billId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The bill was successfully obtained", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/Bill" } } } } } } } }, "404": { "description": "The bill was not found", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } }, "delete": { "operationId": "[public api] bills-public-delete-bill", "summary": "Delete a bill", "tags": [ "[Public API] Bills" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "moveToTrash", "in": "query", "schema": { "type": "integer", "default": 1, "enum": [ 0, 1 ] } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "billId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } }, "put": { "operationId": "[public api] bills-public-edit-bill", "summary": "Edit a bill", "tags": [ "[Public API] Bills" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "date", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "what", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "payer", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "payedFor", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "amount", "in": "query", "schema": { "type": "number", "format": "float", "nullable": true } }, { "name": "repeat", "in": "query", "schema": { "type": "string", "default": "n" } }, { "name": "paymentMode", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "paymentModeId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "categoryId", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "repeatAllActive", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "repeatUntil", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "timestamp", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "comment", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "repeatFreq", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "deleted", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "billId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "integer", "format": "int64" } } } } } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/public/projects/{token}/{password}/trash-bin": { "delete": { "operationId": "[public api] projects-public-clear-trash-bin", "summary": "Clear the trash bin", "tags": [ "[Public API] Projects" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/members": { "get": { "operationId": "members-get-members", "summary": "Get members", "tags": [ "Members" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "lastChanged", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "List of members", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/Member" } } } } } } } } } } }, "post": { "operationId": "members-create-member", "summary": "Create a member", "tags": [ "Members" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "name", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "userId", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "weight", "in": "query", "schema": { "type": "number", "format": "float", "default": 1 } }, { "name": "active", "in": "query", "schema": { "type": "integer", "format": "int64", "default": 1 } }, { "name": "color", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The member was successfully created", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/Member" } } } } } } } }, "400": { "description": "Failed to create the member", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "error" ], "properties": { "error": { "type": "string" } } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/members/{memberId}": { "put": { "operationId": "members-edit-member", "summary": "Edit a member", "tags": [ "Members" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "name", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "weight", "in": "query", "schema": { "type": "number", "format": "float", "nullable": true } }, { "name": "activated", "in": "query", "schema": { "nullable": true } }, { "name": "color", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "userId", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "memberId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "Member was successfully edited (and deleted if it was disabled and wasn't ower of any bill)", "content": { "application/json": { "schema": [ { "oneOf": [ { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "nullable": true } } } } }, { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/Member" } } } } } ] } ] } } }, "400": { "description": "Failed to edit the member", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } } } } }, "delete": { "operationId": "members-delete-member", "summary": "Delete or disable a member", "tags": [ "Members" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "memberId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "Member was successfully disabled or deleted", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "404": { "description": "Member does not exist", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "error" ], "properties": { "error": { "type": "string" } } } } } } } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/public/projects/{token}/{password}/members": { "get": { "operationId": "[public api] members-public-get-members", "summary": "Get a project's member list", "tags": [ "[Public API] Members" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "lastChanged", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/Member" } } } } } } } } } } }, "post": { "operationId": "[public api] members-public-create-member", "summary": "Create a project member", "tags": [ "[Public API] Members" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "name", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "weight", "in": "query", "schema": { "type": "number", "format": "float", "default": 1 } }, { "name": "active", "in": "query", "schema": { "type": "integer", "format": "int64", "default": 1 } }, { "name": "color", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "userId", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/Member" } } } } } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/public/projects/{token}/{password}/members/{memberId}": { "put": { "operationId": "[public api] members-public-edit-member", "summary": "Edit a project member", "tags": [ "[Public API] Members" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "name", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "weight", "in": "query", "schema": { "type": "number", "format": "float", "nullable": true } }, { "name": "activated", "in": "query", "schema": { "nullable": true } }, { "name": "color", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "userId", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "memberId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": [ { "oneOf": [ { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "nullable": true } } } } }, { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/Member" } } } } } ] } ] } } }, "403": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } }, "delete": { "operationId": "[public api] members-public-delete-member", "summary": "Delete or disable a member", "tags": [ "[Public API] Members" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "memberId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "error" ], "properties": { "error": { "type": "string" } } } } } } } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/user-share": { "post": { "operationId": "sharing-create-user-share", "summary": "Create a user share", "tags": [ "Sharing" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "userId", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "accessLevel", "in": "query", "schema": { "type": "integer", "format": "int64" } }, { "name": "manuallyAdded", "in": "query", "schema": { "type": "integer", "default": 1, "enum": [ 0, 1 ] } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The user share was successfully created", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/UserShare" } } } } } } } }, "400": { "description": "Failed to create the user share", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/user-share/{shId}": { "delete": { "operationId": "sharing-delete-user-share", "summary": "Delete a user share", "tags": [ "Sharing" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "shId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The user share was successfully deleted", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "400": { "description": "Failed to delete the user share", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/group-share": { "post": { "operationId": "sharing-create-group-share", "summary": "Create a group share", "tags": [ "Sharing" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "groupId", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "accessLevel", "in": "query", "schema": { "type": "integer", "format": "int64" } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The group share was successfully created", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/GroupShare" } } } } } } } }, "400": { "description": "Failed to create the group share", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/group-share/{shId}": { "delete": { "operationId": "sharing-delete-group-share", "summary": "Delete a group share", "tags": [ "Sharing" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "shId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The group share was successfully deleted", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "400": { "description": "Failed to delete the group share", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/circle-share": { "post": { "operationId": "sharing-create-circle-share", "summary": "Create a circle share", "tags": [ "Sharing" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "circleId", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "accessLevel", "in": "query", "schema": { "type": "integer", "format": "int64" } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The circle share was successfully created", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/CircleShare" } } } } } } } }, "400": { "description": "Failed to create the circle share", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/circle-share/{shId}": { "delete": { "operationId": "sharing-delete-circle-share", "summary": "Delete a circle share", "tags": [ "Sharing" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "shId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The circle share was successfully deleted", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "400": { "description": "Failed to delete the circle share", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/public-share": { "post": { "operationId": "sharing-create-public-share", "summary": "Create a public share link", "tags": [ "Sharing" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "label", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "password", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "accessLevel", "in": "query", "schema": { "type": "integer", "format": "int64" } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The public share was successfully created", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/PublicShare" } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/public-share/{shId}": { "delete": { "operationId": "sharing-delete-public-share", "summary": "Delete a public share link", "tags": [ "Sharing" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "shId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The public share was successfully deleted", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "400": { "description": "Failed to delete the public share", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/share-access-level/{shId}": { "put": { "operationId": "sharing-edit-shared-access-level", "summary": "Edit a shared access level", "tags": [ "Sharing" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "accessLevel", "in": "query", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "shId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The shared access level was successfully edited", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string", "enum": [ "OK" ] } } } } } } } }, "400": { "description": "Failed to edit the access level", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "401": { "description": "The current user cannot set this access level", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/share-access/{shId}": { "put": { "operationId": "sharing-edit-shared-access", "summary": "Edit a shared access", "tags": [ "Sharing" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "label", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "password", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "shId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The shared access was successfully edited", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string", "enum": [ "OK" ] } } } } } } } }, "400": { "description": "Failed to edit the access level", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "401": { "description": "The current user is not allowed to edit this shared access", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/currency": { "post": { "operationId": "currencies-create-currency", "summary": "Create a currency", "tags": [ "Currencies" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "name", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "rate", "in": "query", "required": true, "schema": { "type": "number", "format": "float" } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The currency was successfully created", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "integer", "format": "int64" } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/currency/{currencyId}": { "put": { "operationId": "currencies-edit-currency", "summary": "Edit a currency", "tags": [ "Currencies" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "name", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "rate", "in": "query", "required": true, "schema": { "type": "number", "format": "float" } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "currencyId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The currency was successfully edited", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/Currency" } } } } } } } }, "400": { "description": "Failed to edit the currency", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } }, "delete": { "operationId": "currencies-delete-currency", "summary": "Delete a currency", "tags": [ "Currencies" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "currencyId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The currency was successfully deleted", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "400": { "description": "Failed to delete the currency", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/public/projects/{token}/{password}/currency": { "post": { "operationId": "[public api] currencies-public-create-currency", "summary": "Create a currency", "tags": [ "[Public API] Currencies" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "name", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "rate", "in": "query", "required": true, "schema": { "type": "number", "format": "float" } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "integer", "format": "int64" } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/public/projects/{token}/{password}/currency/{currencyId}": { "put": { "operationId": "[public api] currencies-public-edit-currency", "summary": "Edit a currency", "tags": [ "[Public API] Currencies" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "name", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "rate", "in": "query", "required": true, "schema": { "type": "number", "format": "float" } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "currencyId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/Currency" } } } } } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } }, "delete": { "operationId": "[public api] currencies-public-delete-currency", "summary": "Delete a currency", "tags": [ "[Public API] Currencies" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "currencyId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/paymentmode": { "post": { "operationId": "payment modes-create-payment-mode", "summary": "Create a payment mode", "tags": [ "Payment modes" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "name", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "icon", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "color", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "order", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true, "default": 0 } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "Payment mode was successfully created", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "integer", "format": "int64" } } } } } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/paymentmode/{pmId}": { "put": { "operationId": "payment modes-edit-payment-mode", "summary": "Edit a payment mode", "tags": [ "Payment modes" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "name", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "icon", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "color", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pmId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The payment mode was successfully edited", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/PaymentMode" } } } } } } } }, "400": { "description": "Failed to edit the payment mode", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } } } } }, "delete": { "operationId": "payment modes-delete-payment-mode", "summary": "Delete a payment mode", "tags": [ "Payment modes" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pmId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The payment mode was successfully deleted", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "400": { "description": "Failed to delete the payment mode", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/paymentmode-order": { "put": { "operationId": "payment modes-save-payment-mode-order", "summary": "Save payment modes order", "tags": [ "Payment modes" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "order[]", "in": "query", "description": "Array of objects, each object contains the order number and the payment mode ID", "required": true, "schema": { "type": "array", "items": { "type": "object", "required": [ "order", "id" ], "properties": { "order": { "type": "integer", "format": "int64" }, "id": { "type": "integer", "format": "int64" } } } } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The payment mode order was successfully saved", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "400": { "description": "Failed to save the payment mode order", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/public/projects/{token}/{password}/paymentmode": { "post": { "operationId": "[public api] payment modes-public-create-payment-mode", "summary": "Create a payment mode", "tags": [ "[Public API] Payment modes" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "name", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "icon", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "color", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "order", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true, "default": 0 } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "integer", "format": "int64" } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/public/projects/{token}/{password}/paymentmode/{pmId}": { "put": { "operationId": "[public api] payment modes-public-edit-payment-mode", "summary": "Edit a payment mode", "tags": [ "[Public API] Payment modes" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "name", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "icon", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "color", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pmId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/PaymentMode" } } } } } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } } } } }, "delete": { "operationId": "[public api] payment modes-public-delete-payment-mode", "summary": "Delete a payment mode", "tags": [ "[Public API] Payment modes" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pmId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "integer", "format": "int64" } } } } } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/public/projects/{token}/{password}/paymentmode-order": { "put": { "operationId": "[public api] payment modes-public-save-payment-mode-order", "summary": "Save payment modes order", "tags": [ "[Public API] Payment modes" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "order[]", "in": "query", "required": true, "schema": { "type": "array", "items": { "type": "object", "required": [ "order", "id" ], "properties": { "order": { "type": "integer", "format": "int64" }, "id": { "type": "integer", "format": "int64" } } } } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/category": { "post": { "operationId": "categories-create-category", "summary": "Create a category", "tags": [ "Categories" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "name", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "icon", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "color", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "order", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true, "default": 0 } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The category was successfully created", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "integer", "format": "int64" } } } } } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/category/{categoryId}": { "put": { "operationId": "categories-edit-category", "summary": "Edit a category", "tags": [ "Categories" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "name", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "icon", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "color", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "categoryId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The category was successfully edited", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/Category" } } } } } } } }, "400": { "description": "Failed to edit the category", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } }, "delete": { "operationId": "categories-delete-category", "summary": "Delete a category", "tags": [ "Categories" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "categoryId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The category was successfully deleted", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "400": { "description": "Failed to delete the category", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/projects/{projectId}/category-order": { "put": { "operationId": "categories-save-category-order", "summary": "Save categories order", "tags": [ "Categories" ], "security": [ { "basic_auth": [] } ], "parameters": [ { "name": "order[]", "in": "query", "required": true, "schema": { "type": "array", "items": { "type": "object", "required": [ "order", "id" ], "properties": { "order": { "type": "integer", "format": "int64" }, "id": { "type": "integer", "format": "int64" } } } } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "The category order was successfully saved", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "boolean", "enum": [ true ] } } } } } } } }, "400": { "description": "Failed to save the category order", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "boolean", "enum": [ false ] } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/public/projects/{token}/{password}/category": { "post": { "operationId": "[public api] categories-public-create-category", "summary": "Create a category", "tags": [ "[Public API] Categories" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "name", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "icon", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "color", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "order", "in": "query", "schema": { "type": "integer", "format": "int64", "nullable": true, "default": 0 } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "integer", "format": "int64" } } } } } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/public/projects/{token}/{password}/category/{categoryId}": { "put": { "operationId": "[public api] categories-public-edit-category", "summary": "Edit a category", "tags": [ "[Public API] Categories" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "name", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "icon", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "color", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "categoryId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/Category" } } } } } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } }, "delete": { "operationId": "[public api] categories-public-delete-category", "summary": "Delete a category", "tags": [ "[Public API] Categories" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "categoryId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "integer", "format": "int64" } } } } } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/cospend/api/{apiVersion}/public/projects/{token}/{password}/category-order": { "put": { "operationId": "[public api] categories-public-save-category-order", "summary": "Save categories order", "tags": [ "[Public API] Categories" ], "security": [ {}, { "basic_auth": [] } ], "parameters": [ { "name": "order[]", "in": "query", "required": true, "schema": { "type": "array", "items": { "type": "object", "required": [ "order", "id" ], "properties": { "order": { "type": "integer", "format": "int64" }, "id": { "type": "integer", "format": "int64" } } } } }, { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9]{4,64}$" } }, { "name": "password", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "string" } } } } } } } }, "500": { "description": "", "content": { "text/plain": { "schema": { "type": "string" } } } } } } } }, "tags": [] }