Files
cospend-nc/openapi.json
Julien Veyssier 42a90e5f68 go on with federation, new middleware
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2024-09-01 23:32:38 +02:00

13064 lines
541 KiB
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": "double"
},
"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": "double"
},
"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": "double"
}
},
"nb_bills": {
"type": "integer",
"format": "int64"
},
"total_spent": {
"type": "number",
"format": "double"
},
"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": "double"
},
"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": "double"
},
"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": "double"
},
"from": {
"type": "integer",
"format": "int64"
}
}
}
},
"balances": {
"type": "object",
"additionalProperties": {
"type": "number",
"format": "double"
}
}
}
},
"ProjectStatistics": {
"type": "object",
"additionalProperties": {
"type": "object"
}
},
"PublicCapabilities": {
"type": "object",
"required": [
"cospend"
],
"properties": {
"cospend": {
"type": "object",
"required": [
"version"
],
"properties": {
"version": {
"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": {
"anyOf": [
{
"$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}/ping": {
"get": {
"operationId": "api-ping",
"summary": "Ping",
"description": "Used by MoneyBuster to check if weblogin is valid",
"tags": [
"api"
],
"security": [
{
"bearer_auth": []
},
{
"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": "api-get-projects",
"summary": "Get project list",
"tags": [
"Projects"
],
"security": [
{
"bearer_auth": []
},
{
"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": "api-create-project",
"summary": "Create a project",
"description": "Change for clients: response now contains full project info",
"tags": [
"Projects"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"id",
"name"
],
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}
}
},
"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 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": "api-delete-project",
"summary": "Delete a project",
"tags": [
"Projects"
],
"security": [
{
"bearer_auth": []
},
{
"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": "api-edit-project",
"summary": "Edit a project",
"tags": [
"Projects"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"nullable": true
},
"autoExport": {
"type": "string",
"nullable": true
},
"currencyName": {
"type": "string",
"nullable": true
},
"deletionDisabled": {
"type": "boolean",
"nullable": true
},
"categorySort": {
"type": "string",
"nullable": true
},
"paymentModeSort": {
"type": "string",
"nullable": true
},
"archivedTs": {
"type": "integer",
"format": "int64",
"nullable": true
}
}
}
}
}
},
"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 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": "api-get-project-info",
"summary": "Get project information",
"tags": [
"Projects"
],
"security": [
{
"bearer_auth": []
},
{
"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": "api-export-csv-project",
"summary": "Export project",
"description": "Export project to CSV",
"tags": [
"Projects"
],
"security": [
{
"bearer_auth": []
},
{
"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": "name",
"in": "query",
"schema": {
"type": "string",
"nullable": true
}
},
{
"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": "api-import-csv-project",
"summary": "Import project",
"description": "Import a project from a Cospend CSV file",
"tags": [
"Projects"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "apiVersion",
"in": "path",
"required": true,
"schema": {
"type": "string",
"enum": [
"v1"
],
"default": "v1"
}
},
{
"name": "path",
"in": "query",
"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/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": "api-importsw-project",
"summary": "Import a SplitWise project",
"description": "Import a project from a SplitWise CSV file",
"tags": [
"Projects"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "apiVersion",
"in": "path",
"required": true,
"schema": {
"type": "string",
"enum": [
"v1"
],
"default": "v1"
}
},
{
"name": "path",
"in": "query",
"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/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": "api-get-project-statistics",
"summary": "Get statistics data",
"tags": [
"Projects"
],
"security": [
{
"bearer_auth": []
},
{
"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": "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": "double",
"nullable": true
}
},
{
"name": "amountMax",
"in": "query",
"schema": {
"type": "number",
"format": "double",
"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": "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": "api-export-csv-statistics",
"summary": "Export statistics",
"description": "Export statistics to CSV",
"tags": [
"Projects"
],
"security": [
{
"bearer_auth": []
},
{
"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": "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": "double",
"nullable": true
}
},
{
"name": "amountMax",
"in": "query",
"schema": {
"type": "number",
"format": "double",
"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": "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": "api-get-project-settlement",
"summary": "Get settlement data",
"tags": [
"Projects"
],
"security": [
{
"bearer_auth": []
},
{
"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": "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": "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": "api-auto-settlement",
"summary": "Automatic settlement plan",
"description": "Create reimbursement bills to automatically settle a project",
"tags": [
"Projects"
],
"security": [
{
"bearer_auth": []
},
{
"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": "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": "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": "api-export-csv-settlement",
"summary": "Export settlement plan",
"description": "Export settlement plan as CSV",
"tags": [
"Projects"
],
"security": [
{
"bearer_auth": []
},
{
"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": "centeredOn",
"in": "query",
"schema": {
"type": "integer",
"format": "int64",
"nullable": true
}
},
{
"name": "maxTimestamp",
"in": "query",
"schema": {
"type": "integer",
"format": "int64",
"nullable": true
}
},
{
"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": "api-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": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"type": "string"
}
}
}
}
}
},
"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": [
"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-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-public-edit-project",
"summary": "Edit a project",
"tags": [
"Public-API_Projects"
],
"security": [
{},
{
"basic_auth": []
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"nullable": true
},
"autoExport": {
"type": "string",
"nullable": true
},
"currencyName": {
"type": "string",
"nullable": true
},
"deletionDisabled": {
"type": "boolean",
"nullable": true
},
"categorySort": {
"type": "string",
"nullable": true
},
"paymentModeSort": {
"type": "string",
"nullable": true
},
"archivedTs": {
"type": "integer",
"format": "int64",
"nullable": true
}
}
}
}
}
},
"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": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
}
}
}
},
"500": {
"description": "",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}
}
}
},
"get": {
"operationId": "public_api-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-public-get-project-statistics",
"summary": "Get statistics data",
"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": "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": "double",
"nullable": true
}
},
{
"name": "amountMax",
"in": "query",
"schema": {
"type": "number",
"format": "double",
"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": "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-public-get-project-settlement",
"summary": "Get project settlement info",
"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": "centeredOn",
"in": "query",
"schema": {
"type": "integer",
"format": "int64",
"nullable": true
}
},
{
"name": "maxTimestamp",
"in": "query",
"schema": {
"type": "integer",
"format": "int64",
"nullable": true
}
},
{
"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-public-auto-settlement",
"summary": "Get automatic settlement plan",
"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": "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": "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": "api-create-bill",
"summary": "Create a bill",
"tags": [
"Bills"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"date": {
"type": "string",
"nullable": true
},
"what": {
"type": "string",
"nullable": true
},
"payer": {
"type": "integer",
"format": "int64",
"nullable": true
},
"payedFor": {
"type": "string",
"nullable": true
},
"amount": {
"type": "number",
"format": "double",
"nullable": true
},
"repeat": {
"type": "string",
"nullable": true
},
"paymentMode": {
"type": "string",
"nullable": true
},
"paymentModeId": {
"type": "integer",
"format": "int64",
"nullable": true
},
"categoryId": {
"type": "integer",
"format": "int64",
"nullable": true
},
"repeatAllActive": {
"type": "integer",
"format": "int64",
"default": 0
},
"repeatUntil": {
"type": "string",
"nullable": true
},
"timestamp": {
"type": "integer",
"format": "int64",
"nullable": true
},
"comment": {
"type": "string",
"nullable": true
},
"repeatFreq": {
"type": "integer",
"format": "int64",
"nullable": true
}
}
}
}
}
},
"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 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": "api-get-bills",
"summary": "Get a project's bill list",
"tags": [
"Bills"
],
"security": [
{
"bearer_auth": []
},
{
"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": "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": "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": "api-delete-bills",
"summary": "Delete multiple bills",
"tags": [
"Bills"
],
"security": [
{
"bearer_auth": []
},
{
"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": "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": "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": "api-edit-bills",
"summary": "Edit multiple bills",
"tags": [
"Bills"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"billIds"
],
"properties": {
"billIds": {
"type": "array",
"items": {
"type": "integer",
"format": "int64"
}
},
"categoryId": {
"type": "integer",
"format": "int64",
"nullable": true
},
"date": {
"type": "string",
"nullable": true
},
"what": {
"type": "string",
"nullable": true
},
"payer": {
"type": "integer",
"format": "int64",
"nullable": true
},
"payedFor": {
"type": "string",
"nullable": true
},
"amount": {
"type": "number",
"format": "double",
"nullable": true
},
"repeat": {
"type": "string",
"nullable": true
},
"paymentMode": {
"type": "string",
"nullable": true
},
"paymentModeId": {
"type": "integer",
"format": "int64",
"nullable": true
},
"repeatAllActive": {
"type": "integer",
"format": "int64",
"nullable": true
},
"repeatUntil": {
"type": "string",
"nullable": true
},
"timestamp": {
"type": "integer",
"format": "int64",
"nullable": true
},
"comment": {
"type": "string",
"nullable": true
},
"repeatFreq": {
"type": "integer",
"format": "int64",
"nullable": true
},
"deleted": {
"type": "integer",
"format": "int64",
"nullable": true
}
}
}
}
}
},
"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 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": "api-get-bill",
"summary": "Get a bill",
"tags": [
"Bills"
],
"security": [
{
"bearer_auth": []
},
{
"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": "api-delete-bill",
"summary": "Delete a bill",
"tags": [
"Bills"
],
"security": [
{
"bearer_auth": []
},
{
"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": "moveToTrash",
"in": "query",
"schema": {
"type": "integer",
"default": 1,
"enum": [
0,
1
]
}
},
{
"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": "api-edit-bill",
"summary": "Edit a bill",
"tags": [
"Bills"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"date": {
"type": "string",
"nullable": true
},
"what": {
"type": "string",
"nullable": true
},
"payer": {
"type": "integer",
"format": "int64",
"nullable": true
},
"payedFor": {
"type": "string",
"nullable": true
},
"amount": {
"type": "number",
"format": "double",
"nullable": true
},
"repeat": {
"type": "string",
"nullable": true
},
"paymentMode": {
"type": "string",
"nullable": true
},
"paymentModeId": {
"type": "integer",
"format": "int64",
"nullable": true
},
"categoryId": {
"type": "integer",
"format": "int64",
"nullable": true
},
"repeatAllActive": {
"type": "integer",
"format": "int64",
"nullable": true
},
"repeatUntil": {
"type": "string",
"nullable": true
},
"timestamp": {
"type": "integer",
"format": "int64",
"nullable": true
},
"comment": {
"type": "string",
"nullable": true
},
"repeatFreq": {
"type": "integer",
"format": "int64",
"nullable": true
},
"deleted": {
"type": "integer",
"format": "int64",
"nullable": true
}
}
}
}
}
},
"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 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": "api-clear-trash-bin",
"summary": "Clear the trash bin",
"tags": [
"Bills"
],
"security": [
{
"bearer_auth": []
},
{
"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": "api-move-bill",
"summary": "Move a bill",
"description": "Move a bill from one project to another",
"tags": [
"Bills"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"toProjectId"
],
"properties": {
"toProjectId": {
"type": "string"
}
}
}
}
}
},
"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 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": "api-repeat-bill",
"summary": "Repeat a bill",
"description": "Trigger bill repetition for a specific bill",
"tags": [
"Bills"
],
"security": [
{
"bearer_auth": []
},
{
"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-public-create-bill",
"summary": "Create a bill",
"tags": [
"Public-API_Bills"
],
"security": [
{},
{
"basic_auth": []
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"date": {
"type": "string",
"nullable": true
},
"what": {
"type": "string",
"nullable": true
},
"payer": {
"type": "integer",
"format": "int64",
"nullable": true
},
"payedFor": {
"type": "string",
"nullable": true
},
"amount": {
"type": "number",
"format": "double",
"nullable": true
},
"repeat": {
"type": "string",
"default": "n"
},
"paymentMode": {
"type": "string",
"nullable": true
},
"paymentModeId": {
"type": "integer",
"format": "int64",
"nullable": true
},
"categoryId": {
"type": "integer",
"format": "int64",
"nullable": true
},
"repeatAllActive": {
"type": "integer",
"format": "int64",
"default": 0
},
"repeatUntil": {
"type": "string",
"nullable": true
},
"timestamp": {
"type": "integer",
"format": "int64",
"nullable": true
},
"comment": {
"type": "string",
"nullable": true
},
"repeatFreq": {
"type": "integer",
"format": "int64",
"nullable": true
}
}
}
}
}
},
"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": "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-public-get-bills",
"summary": "Get a project's bill list",
"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": "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": "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-public-delete-bills",
"summary": "Delete multiple bills",
"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": "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": "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-public-edit-bills",
"summary": "Edit multiple bills",
"tags": [
"Public-API_Bills"
],
"security": [
{},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"billIds"
],
"properties": {
"billIds": {
"type": "array",
"items": {
"type": "integer",
"format": "int64"
}
},
"categoryId": {
"type": "integer",
"format": "int64",
"nullable": true
},
"date": {
"type": "string",
"nullable": true
},
"what": {
"type": "string",
"nullable": true
},
"payer": {
"type": "integer",
"format": "int64",
"nullable": true
},
"payedFor": {
"type": "string",
"nullable": true
},
"amount": {
"type": "number",
"format": "double",
"nullable": true
},
"repeat": {
"type": "string",
"nullable": true,
"default": "n"
},
"paymentMode": {
"type": "string",
"nullable": true
},
"paymentModeId": {
"type": "integer",
"format": "int64",
"nullable": true
},
"repeatAllActive": {
"type": "integer",
"format": "int64",
"nullable": true
},
"repeatUntil": {
"type": "string",
"nullable": true
},
"timestamp": {
"type": "integer",
"format": "int64",
"nullable": true
},
"comment": {
"type": "string",
"nullable": true
},
"repeatFreq": {
"type": "integer",
"format": "int64",
"nullable": true
},
"deleted": {
"type": "integer",
"format": "int64",
"nullable": true
}
}
}
}
}
},
"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": "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-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-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-public-delete-bill",
"summary": "Delete a 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": "moveToTrash",
"in": "query",
"schema": {
"type": "integer",
"default": 1,
"enum": [
0,
1
]
}
},
{
"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-public-edit-bill",
"summary": "Edit a bill",
"tags": [
"Public-API_Bills"
],
"security": [
{},
{
"basic_auth": []
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"date": {
"type": "string",
"nullable": true
},
"what": {
"type": "string",
"nullable": true
},
"payer": {
"type": "integer",
"format": "int64",
"nullable": true
},
"payedFor": {
"type": "string",
"nullable": true
},
"amount": {
"type": "number",
"format": "double",
"nullable": true
},
"repeat": {
"type": "string",
"default": "n"
},
"paymentMode": {
"type": "string",
"nullable": true
},
"paymentModeId": {
"type": "integer",
"format": "int64",
"nullable": true
},
"categoryId": {
"type": "integer",
"format": "int64",
"nullable": true
},
"repeatAllActive": {
"type": "integer",
"format": "int64",
"nullable": true
},
"repeatUntil": {
"type": "string",
"nullable": true
},
"timestamp": {
"type": "integer",
"format": "int64",
"nullable": true
},
"comment": {
"type": "string",
"nullable": true
},
"repeatFreq": {
"type": "integer",
"format": "int64",
"nullable": true
},
"deleted": {
"type": "integer",
"format": "int64",
"nullable": true
}
}
}
}
}
},
"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": "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-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": "api-get-members",
"summary": "Get members",
"tags": [
"Members"
],
"security": [
{
"bearer_auth": []
},
{
"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": "lastChanged",
"in": "query",
"schema": {
"type": "integer",
"format": "int64",
"nullable": true
}
},
{
"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": "api-create-member",
"summary": "Create a member",
"tags": [
"Members"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"userId": {
"type": "string",
"nullable": true
},
"weight": {
"type": "number",
"format": "double",
"default": 1
},
"active": {
"type": "integer",
"format": "int64",
"default": 1
},
"color": {
"type": "string",
"nullable": true
}
}
}
}
}
},
"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 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": "api-edit-member",
"summary": "Edit a member",
"tags": [
"Members"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"nullable": true
},
"weight": {
"type": "number",
"format": "double",
"nullable": true
},
"activated": {
"nullable": true
},
"color": {
"type": "string",
"nullable": true
},
"userId": {
"type": "string",
"nullable": true
}
}
}
}
}
},
"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 edited (and deleted if it was disabled and wasn't ower of any bill)",
"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",
"nullable": true
}
}
}
}
}
}
}
},
"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": "api-delete-member",
"summary": "Delete or disable a member",
"tags": [
"Members"
],
"security": [
{
"bearer_auth": []
},
{
"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-public-get-members",
"summary": "Get a project's member list",
"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": "lastChanged",
"in": "query",
"schema": {
"type": "integer",
"format": "int64",
"nullable": true
}
},
{
"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-public-create-member",
"summary": "Create a project member",
"tags": [
"Public-API_Members"
],
"security": [
{},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"weight": {
"type": "number",
"format": "double",
"default": 1
},
"active": {
"type": "integer",
"format": "int64",
"default": 1
},
"color": {
"type": "string",
"nullable": true
},
"userId": {
"type": "string",
"nullable": true
}
}
}
}
}
},
"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/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-public-edit-member",
"summary": "Edit a project member",
"tags": [
"Public-API_Members"
],
"security": [
{},
{
"basic_auth": []
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"nullable": true
},
"weight": {
"type": "number",
"format": "double",
"nullable": true
},
"activated": {
"nullable": true
},
"color": {
"type": "string",
"nullable": true
},
"userId": {
"type": "string",
"nullable": true
}
}
}
}
}
},
"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": {
"$ref": "#/components/schemas/Member",
"nullable": true
}
}
}
}
}
}
}
},
"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-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": "api-create-user-share",
"summary": "Create a user share",
"tags": [
"Sharing"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"userId",
"accessLevel"
],
"properties": {
"userId": {
"type": "string"
},
"accessLevel": {
"type": "integer",
"format": "int64"
},
"manuallyAdded": {
"type": "boolean",
"default": true
}
}
}
}
}
},
"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 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": "api-delete-user-share",
"summary": "Delete a user share",
"tags": [
"Sharing"
],
"security": [
{
"bearer_auth": []
},
{
"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": "api-create-group-share",
"summary": "Create a group share",
"tags": [
"Sharing"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"groupId",
"accessLevel"
],
"properties": {
"groupId": {
"type": "string"
},
"accessLevel": {
"type": "integer",
"format": "int64"
}
}
}
}
}
},
"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 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": "api-delete-group-share",
"summary": "Delete a group share",
"tags": [
"Sharing"
],
"security": [
{
"bearer_auth": []
},
{
"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": "api-create-circle-share",
"summary": "Create a circle share",
"tags": [
"Sharing"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"circleId",
"accessLevel"
],
"properties": {
"circleId": {
"type": "string"
},
"accessLevel": {
"type": "integer",
"format": "int64"
}
}
}
}
}
},
"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 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": "api-delete-circle-share",
"summary": "Delete a circle share",
"tags": [
"Sharing"
],
"security": [
{
"bearer_auth": []
},
{
"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": "api-create-public-share",
"summary": "Create a public share link",
"tags": [
"Sharing"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"accessLevel"
],
"properties": {
"label": {
"type": "string",
"nullable": true
},
"password": {
"type": "string",
"nullable": true
},
"accessLevel": {
"type": "integer",
"format": "int64"
}
}
}
}
}
},
"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 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": "api-delete-public-share",
"summary": "Delete a public share link",
"tags": [
"Sharing"
],
"security": [
{
"bearer_auth": []
},
{
"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": "api-edit-shared-access-level",
"summary": "Edit a shared access level",
"tags": [
"Sharing"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"accessLevel"
],
"properties": {
"accessLevel": {
"type": "integer",
"format": "int64"
}
}
}
}
}
},
"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 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": "api-edit-shared-access",
"summary": "Edit a shared access",
"tags": [
"Sharing"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"label": {
"type": "string",
"nullable": true
},
"password": {
"type": "string",
"nullable": true
}
}
}
}
}
},
"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 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": "api-create-currency",
"summary": "Create a currency",
"tags": [
"Currencies"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"name",
"rate"
],
"properties": {
"name": {
"type": "string"
},
"rate": {
"type": "number",
"format": "double"
}
}
}
}
}
},
"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 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": "api-edit-currency",
"summary": "Edit a currency",
"tags": [
"Currencies"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"name",
"rate"
],
"properties": {
"name": {
"type": "string"
},
"rate": {
"type": "number",
"format": "double"
}
}
}
}
}
},
"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 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": "api-delete-currency",
"summary": "Delete a currency",
"tags": [
"Currencies"
],
"security": [
{
"bearer_auth": []
},
{
"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-public-create-currency",
"summary": "Create a currency",
"tags": [
"Public-API_Currencies"
],
"security": [
{},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"name",
"rate"
],
"properties": {
"name": {
"type": "string"
},
"rate": {
"type": "number",
"format": "double"
}
}
}
}
}
},
"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": "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-public-edit-currency",
"summary": "Edit a currency",
"tags": [
"Public-API_Currencies"
],
"security": [
{},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"name",
"rate"
],
"properties": {
"name": {
"type": "string"
},
"rate": {
"type": "number",
"format": "double"
}
}
}
}
}
},
"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": {
"$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-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": "api-create-payment-mode",
"summary": "Create a payment mode",
"tags": [
"Payment-modes"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"name",
"color"
],
"properties": {
"name": {
"type": "string"
},
"icon": {
"type": "string",
"nullable": true
},
"color": {
"type": "string"
},
"order": {
"type": "integer",
"format": "int64",
"nullable": true,
"default": 0
}
}
}
}
}
},
"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": "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": "api-edit-payment-mode",
"summary": "Edit a payment mode",
"tags": [
"Payment-modes"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"nullable": true
},
"icon": {
"type": "string",
"nullable": true
},
"color": {
"type": "string",
"nullable": true
}
}
}
}
}
},
"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 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": "api-delete-payment-mode",
"summary": "Delete a payment mode",
"tags": [
"Payment-modes"
],
"security": [
{
"bearer_auth": []
},
{
"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": "api-save-payment-mode-order",
"summary": "Save payment modes order",
"tags": [
"Payment-modes"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"order"
],
"properties": {
"order": {
"type": "array",
"description": "Array of objects, each object contains the order number and the payment mode ID",
"items": {
"type": "object",
"required": [
"order",
"id"
],
"properties": {
"order": {
"type": "integer",
"format": "int64"
},
"id": {
"type": "integer",
"format": "int64"
}
}
}
}
}
}
}
}
},
"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 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-public-create-payment-mode",
"summary": "Create a payment mode",
"tags": [
"Public-API_Payment-modes"
],
"security": [
{},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"name",
"color"
],
"properties": {
"name": {
"type": "string"
},
"icon": {
"type": "string",
"nullable": true
},
"color": {
"type": "string"
},
"order": {
"type": "integer",
"format": "int64",
"nullable": true,
"default": 0
}
}
}
}
}
},
"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": "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-public-edit-payment-mode",
"summary": "Edit a payment mode",
"tags": [
"Public-API_Payment-modes"
],
"security": [
{},
{
"basic_auth": []
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"nullable": true
},
"icon": {
"type": "string",
"nullable": true
},
"color": {
"type": "string",
"nullable": true
}
}
}
}
}
},
"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": {
"$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-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-public-save-payment-mode-order",
"summary": "Save payment modes order",
"tags": [
"Public-API_Payment-modes"
],
"security": [
{},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"order"
],
"properties": {
"order": {
"type": "array",
"items": {
"type": "object",
"required": [
"order",
"id"
],
"properties": {
"order": {
"type": "integer",
"format": "int64"
},
"id": {
"type": "integer",
"format": "int64"
}
}
}
}
}
}
}
}
},
"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"
}
}
}
}
}
}
}
},
"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": "api-create-category",
"summary": "Create a category",
"tags": [
"Categories"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"name",
"color"
],
"properties": {
"name": {
"type": "string"
},
"icon": {
"type": "string",
"nullable": true
},
"color": {
"type": "string"
},
"order": {
"type": "integer",
"format": "int64",
"nullable": true,
"default": 0
}
}
}
}
}
},
"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 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": "api-edit-category",
"summary": "Edit a category",
"tags": [
"Categories"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"nullable": true
},
"icon": {
"type": "string",
"nullable": true
},
"color": {
"type": "string",
"nullable": true
}
}
}
}
}
},
"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 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": "api-delete-category",
"summary": "Delete a category",
"tags": [
"Categories"
],
"security": [
{
"bearer_auth": []
},
{
"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": "api-save-category-order",
"summary": "Save categories order",
"tags": [
"Categories"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"order"
],
"properties": {
"order": {
"type": "array",
"items": {
"type": "object",
"required": [
"order",
"id"
],
"properties": {
"order": {
"type": "integer",
"format": "int64"
},
"id": {
"type": "integer",
"format": "int64"
}
}
}
}
}
}
}
}
},
"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 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-public-create-category",
"summary": "Create a category",
"tags": [
"Public-API_Categories"
],
"security": [
{},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"name",
"color"
],
"properties": {
"name": {
"type": "string"
},
"icon": {
"type": "string",
"nullable": true
},
"color": {
"type": "string"
},
"order": {
"type": "integer",
"format": "int64",
"nullable": true,
"default": 0
}
}
}
}
}
},
"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": "integer",
"format": "int64"
}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/cospend/api/{apiVersion}/public/projects/{token}/{password}/category/{categoryId}": {
"put": {
"operationId": "public_api-public-edit-category",
"summary": "Edit a category",
"tags": [
"Public-API_Categories"
],
"security": [
{},
{
"basic_auth": []
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"nullable": true
},
"icon": {
"type": "string",
"nullable": true
},
"color": {
"type": "string",
"nullable": true
}
}
}
}
}
},
"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": {
"$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-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",
"description": "Project share token",
"required": true,
"schema": {
"type": "string",
"pattern": "^[a-z0-9]{4,64}$"
}
},
{
"name": "password",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "categoryId",
"in": "path",
"description": "Category ID",
"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": "Category is deleted",
"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": "Category is not 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",
"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-public-save-category-order",
"summary": "Save categories order",
"tags": [
"Public-API_Categories"
],
"security": [
{},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"order"
],
"properties": {
"order": {
"type": "array",
"description": "Array describing the categories ordering",
"items": {
"type": "object",
"required": [
"order",
"id"
],
"properties": {
"order": {
"type": "integer",
"format": "int64"
},
"id": {
"type": "integer",
"format": "int64"
}
}
}
}
}
}
}
}
},
"parameters": [
{
"name": "apiVersion",
"in": "path",
"required": true,
"schema": {
"type": "string",
"enum": [
"v1"
],
"default": "v1"
}
},
{
"name": "token",
"in": "path",
"description": "Project share token",
"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": "Categories order is 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"
}
}
}
}
}
}
}
},
"403": {
"description": "Not 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"
}
}
}
}
}
}
}
},
"500": {
"description": "",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}
}
}
}
}
},
"tags": []
}