diff --git a/openapi/openapi.json b/openapi/openapi.json index 013fce0..86e5757 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -639,6 +639,126 @@ } ] }, + "/cart/{cart-id}": { + "get": { + "tags": [ + "API-getCart" + ], + "summary": "Retrieve from CosmosDB the cart with the given cart id", + "operationId": "GetCart", + "parameters": [ + { + "in": "path", + "name": "cart-id", + "description": "Cart id.", + "schema": { + "type": "string" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Successful Calls.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CartForReceipt" + } + } + } + }, + "400": { + "description": "Bad request.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "404": { + "description": "Receipt error not found.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "500": { + "description": "Receipt could not be updated with the new attachments", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "default": { + "description": "Unexpected error.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "ApiKey": [] + } + ] + }, + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } + } + ] + }, "/receipts-error/{event-id}/reviewed": { "post": { "tags": [ @@ -1530,6 +1650,33 @@ } } }, + "CartForReceipt": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "example": "712341" + }, + "cartPaymentId": { + "type": "array", + "items": { + "type": "string", + "example": "76abb1f1-c9f9-4ead-9e66-12fec4d51042" + } + }, + "totalNotice": { + "type": "integer", + "example": "3" + }, + "status": { + "type": "string", + "enum": ["INSERTED", "FAILED", "SENT"] + }, + "reasonError": { + "$ref": "#/components/schemas/ReasonErr" + } + } + }, "ProblemJson": { "type": "object", "properties": {