openapi: 3.2.0 info: title: FlowPay Constructions API version: 2.0.0-alpha.4 description: $ref: docs/general.md termsOfService: https://developer.flowpay.it/tos license: name: FlowPay SRL url: https://developer.flowpay.it/tos x-logo: url: https://images.flowpay.it/logo altText: FlowPay contact: name: API Support url: https://developer.flowpay.it email: api-support@flowpay.it x-json-schema-faker: locale: it-IT omitNulls: true fillProperties: true reuseProperties: true servers: - url: https://api.flowpay.it/v2 description: Production server (Not implementend) - url: https://mock.flowpay.it/v2 description: Mock server - url: https://sandbox.{customerID}.flowpay.it/v2 description: Customer-assigned sandbox server variables: customerID: default: 00000000-00000000-00000000-00000000 description: Unique customer identifier assigned after contract signature - url: http://localhost:5002 description: Debug tags: - name: Constructions paths: /constructions/sites/{identifier}/cashout: post: operationId: cashout summary: Cashout description: 'Allows to cashout residual money from a site. The request acts on the site wallet owned by the owner of the oauth token used to call the endpoint.' parameters: - name: identifier in: path description: Site identifier required: true schema: type: string format: uuid requestBody: description: Cashout details content: application/json: schema: type: object properties: amount: type: number format: float example: 75500.01 description: Amount to be cashed out, this amount will be used to generate a document to be paid in order to transfer the amount from the wallet to the owner bank account. account: type: string format: uuid description: Identifier of the bank account to be used to transfer the amount. If not specified, the default bank account will be used. description: type: string description: Remittance information to be used to generate the document. Details are not mandatory but an exhaustive description is recommended to help during the verification process and to avoid delays or more information requests. example: Pagamento stipendio dipendenti, pagamento fornitore XYZ x-faker: lorem.paragraph reference: type: string description: Reference number of the cashout example: C-123456 x-faker: lorem.sentence required: - site - amount - description security: - oAuth2: - construction:write - wallet:construction responses: '201': description: Created content: application/json: schema: type: object properties: fingerprint: $ref: '#/components/schemas/Fingerprint' required: - fingerprint '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Forbidden' '403': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/Conflict' '500': $ref: '#/components/responses/InternalServerError' tags: - Constructions components: responses: InternalServerError: description: Server encountered an unexpected condition that prevented it from fulfilling the request content: application/json: schema: type: object properties: statusCode: $ref: '#/components/schemas/StatusCode' requestID: $ref: '#/components/schemas/RequestID' required: - statusCode - requestID Conflict: description: The requested resource is in conflict with the current state of the server content: application/json: schema: type: object properties: statusCode: $ref: '#/components/schemas/StatusCode' requestID: $ref: '#/components/schemas/RequestID' message: type: string description: Error message example: Invoice already paid required: - statusCode - requestID - message NotFound: description: The requested resource was not found content: application/json: schema: type: object properties: statusCode: $ref: '#/components/schemas/StatusCode' requestID: $ref: '#/components/schemas/RequestID' message: type: string description: Error message example: Invoice not found required: - statusCode - requestID - message Unauthorized: description: Client has not provided valid credentials to access the requested resource content: application/json: schema: type: object properties: statusCode: $ref: '#/components/schemas/StatusCode' requestID: $ref: '#/components/schemas/RequestID' message: type: string description: Error message example: You must provide a valid access token required: - statusCode - requestID - message BadRequest: description: Client has provided invalid data content: application/json: schema: type: object properties: statusCode: $ref: '#/components/schemas/StatusCode' requestID: $ref: '#/components/schemas/RequestID' message: type: string description: Error message example: Proforma invoice can not have a due date later than the invoice date additionalInfo: type: object description: Additional information about the error properties: path: type: string description: JSON path of the field that caused the error example: .dueDate key: type: string description: JSON key of the field that caused the error example: dueDate type: type: string description: Expected type of the field that caused the error example: string required: - path required: - statusCode - requestID - message - additionalInfo Forbidden: description: Client is not authorized to access the requested resource content: application/json: schema: type: object properties: statusCode: $ref: '#/components/schemas/StatusCode' requestID: $ref: '#/components/schemas/RequestID' message: type: string description: Error message example: You can't create a new invoice for this tenant required: - statusCode - requestID - message schemas: RequestID: type: string description: Unique identifier of the request.
It is helpful to identify the request in case of errors, providing it to the support team. Please submit it in the support ticket. format: uuid x-faker: random.uuid StatusCode: type: integer description: HTTP status code example: 404 Fingerprint: type: string description: Fingerprint of the document example: d41d8cd98f00b204e9800998ecf8427e securitySchemes: oAuth2: type: oauth2 description: OAuth2 flow flows: authorizationCode: authorizationUrl: /openid/authenticate tokenUrl: /oauth/token refreshUrl: /oauth/token scopes: accounts:read: Allow to read accounts accounts:write: Allow to mediate accounts creation and open banking consent renewal invoices:read: Allow to read invoices invoices:write: Allow to create invoices and manage lifecycle bills:read: Allow to read bills bills:write: Allow to create bills and manage lifecycle constructions:read: Allow to read information about construction sites constructions:write: Allow to create construction sites and manage the lifecycle openid: Allow to read user profile pagopa:read: Allow to retrieve users' PagoPA payment notices pagopa:write: Allow to create PagoPA payment notices transfers:read: Allow to read transfers transfers:write: Allow to create transfers and manage lifecycle wallet:`document_type`: Allow to manage wallet for the specified use case clientCredentials: tokenUrl: /oauth/token scopes: ade: Allow to interact with Agenzia delle Entrate services accounts:read: Allow to read accounts accounts:write: Allow to mediate accounts creation and open banking consent renewal invoices:read: Allow to read invoices invoices:write: Allow to create invoices and manage lifecycle bills:read: Allow to read bills bills:write: Allow to create bills and manage lifecycle constructions:read: Allow to read information about construction sites constructions:write: Allow to create construction sites and manage the lifecycle openid: Allow to read user profile pagopa:read: Allow to retrieve users' PagoPA payment notices pagopa:write: Allow to create PagoPA payment notices transfers:read: Allow to read transfers transfers:write: Allow to create transfers and manage lifecycle wallet:`document_type`: Allow to manage wallet for the specified use case