openapi: 3.2.0 info: title: Monite Files API contact: name: Monite team url: https://monite.com/about/ email: developers@monite.com termsOfService: https://monite.com/terms version: '1.0' description: 'Operations tagged Files across 3 of this provider''s published API definitions: monite-openapi-2023-09-01.json, monite-openapi-2024-05-25.json, monite-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://api.dev.monite.com/v1 description: Development environment - url: https://api.sandbox.monite.com/v1 description: Sandbox environment - url: https://api.monite.com/v1 description: Production environment (Europe) - url: https://us.api.monite.com/v1 description: Production environment (North America) - url: https://api.monite.oaknorth.co.uk/v1 description: Oak POC environment tags: - name: Files paths: /files: get: tags: - Files summary: Get files operationId: get_files parameters: - required: true schema: type: string format: date example: '2023-09-01' name: x-monite-version in: header - name: id__in in: query required: false schema: anyOf: - type: array items: type: string format: uuid maxItems: 250 - type: 'null' - name: file_type in: query required: false schema: anyOf: - $ref: '#/components/schemas/AllowedFileTypes' - type: 'null' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/FilesResponse' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] post: tags: - Files summary: Upload a file operationId: post_files parameters: - required: true schema: type: string format: date example: '2023-09-01' name: x-monite-version in: header requestBody: required: true content: multipart/form-data: schema: $ref: '#/components/schemas/UploadFile' responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/FileResponse' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] servers: - url: https://api.dev.monite.com/v1 description: Development environment - url: https://api.sandbox.monite.com/v1 description: Sandbox environment - url: https://api.monite.com/v1 description: Production environment (Europe) - url: https://us.api.monite.com/v1 description: Production environment (North America) - url: https://api.monite.oaknorth.co.uk/v1 description: Oak POC environment /files/{file_id}: get: tags: - Files summary: Get a file by ID operationId: get_files_id parameters: - required: true schema: type: string format: date example: '2023-09-01' name: x-monite-version in: header - name: file_id in: path required: true schema: type: string format: uuid responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/FileResponse' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] delete: tags: - Files summary: Delete a file operationId: delete_files_id parameters: - required: true schema: type: string format: date example: '2023-09-01' name: x-monite-version in: header - name: file_id in: path required: true schema: type: string format: uuid responses: '204': description: Successful Response '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] servers: - url: https://api.dev.monite.com/v1 description: Development environment - url: https://api.sandbox.monite.com/v1 description: Sandbox environment - url: https://api.monite.com/v1 description: Production environment (Europe) - url: https://us.api.monite.com/v1 description: Production environment (North America) - url: https://api.monite.oaknorth.co.uk/v1 description: Oak POC environment components: schemas: FilesResponse: properties: data: items: $ref: '#/components/schemas/FileResponse' type: array additionalProperties: false type: object required: - data HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array type: object ErrorSchema: properties: message: type: string type: object required: - message ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array msg: type: string type: type: string type: object required: - loc - msg - type ErrorSchemaResponse: properties: error: $ref: '#/components/schemas/ErrorSchema' type: object required: - error AllowedFileTypes: type: string enum: - ocr_results - ocr_files - payables - receivables - delivery_notes - receipts - userpics - entity_logo - companies_logo - zip - identity_documents - additional_identity_documents - receivable_signatures - einvoices_xml - attachments UploadFile: properties: file: type: string format: binary file_type: $ref: '#/components/schemas/AllowedFileTypes' type: object required: - file - file_type FileResponse: properties: id: type: string format: uuid created_at: type: string format: date-time updated_at: type: string format: date-time file_type: type: string md5: type: string mimetype: type: string name: type: string region: type: string s3_bucket: type: string s3_file_path: type: string size: type: integer url: type: string type: object required: - id - created_at - updated_at - file_type - md5 - mimetype - name - region - s3_bucket - s3_file_path - size - url securitySchemes: HTTPBearer: type: http scheme: bearer x-refined-from: - monite-openapi-2023-09-01.json - monite-openapi-2024-05-25.json - monite-openapi.yml