{ "openapi": "3.0.4", "info": { "title": "DoliMiddlewareApi", "version": "1.0" }, "paths": { "/api/Invoices": { "get": { "tags": [ "Invoices" ], "parameters": [ { "name": "limit", "in": "query", "schema": { "type": "integer", "format": "int32", "default": 50 } }, { "name": "page", "in": "query", "schema": { "maximum": 2147483647, "minimum": 1, "type": "integer", "format": "int32", "default": 1 } }, { "name": "status", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/InvoiceDto" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/InvoiceDto" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/InvoiceDto" } } } } }, "500": { "description": "Internal Server Error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/api/Invoices/{id}": { "get": { "tags": [ "Invoices" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/InvoiceDetailDto" } }, "application/json": { "schema": { "$ref": "#/components/schemas/InvoiceDetailDto" } }, "text/json": { "schema": { "$ref": "#/components/schemas/InvoiceDetailDto" } } } }, "404": { "description": "Not Found", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "500": { "description": "Internal Server Error", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } } }, "components": { "schemas": { "InvoiceDetailDto": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32" }, "number": { "type": "string", "nullable": true }, "date": { "type": "string", "format": "date-time", "nullable": true }, "expireDate": { "type": "string", "format": "date-time", "nullable": true }, "clientId": { "type": "integer", "format": "int32" }, "total": { "type": "number", "format": "double", "nullable": true }, "remainToPay": { "type": "number", "format": "double", "nullable": true }, "status": { "type": "string", "nullable": true }, "lines": { "type": "array", "items": { "$ref": "#/components/schemas/InvoiceLineDto" }, "nullable": true } }, "additionalProperties": false }, "InvoiceDto": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32" }, "number": { "type": "string", "nullable": true }, "date": { "type": "string", "format": "date-time", "nullable": true }, "expireDate": { "type": "string", "format": "date-time", "nullable": true }, "clientId": { "type": "integer", "format": "int32" }, "total": { "type": "number", "format": "double", "nullable": true }, "remainToPay": { "type": "number", "format": "double", "nullable": true }, "status": { "type": "string", "nullable": true } }, "additionalProperties": false }, "InvoiceLineDto": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32" }, "description": { "type": "string", "nullable": true }, "quantity": { "type": "number", "format": "double" }, "unitPrice": { "type": "number", "format": "double" }, "taxRate": { "type": "number", "format": "double" }, "total": { "type": "number", "format": "double" } }, "additionalProperties": false }, "ProblemDetails": { "type": "object", "properties": { "type": { "type": "string", "nullable": true }, "title": { "type": "string", "nullable": true }, "status": { "type": "integer", "format": "int32", "nullable": true }, "detail": { "type": "string", "nullable": true }, "instance": { "type": "string", "nullable": true } }, "additionalProperties": { } } } }, "tags": [ { "name": "Invoices" } ] }