openapi: 3.2.0 info: title: Monite Data export 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 Data export 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: Data export paths: /data_exports: get: tags: - Data export summary: Get all export jobs operationId: get_data_exports parameters: - required: true schema: type: string format: date example: '2023-09-01' name: x-monite-version in: header - description: Sort order (ascending by default). Typically used together with the `sort` parameter. required: false schema: allOf: - $ref: '#/components/schemas/OrderEnum' default: asc name: order in: query - description: The number of items (0 .. 100) to return in a single page of the response. The response may contain fewer items if it is the last or only page. required: false schema: type: integer maximum: 100.0 minimum: 1.0 default: 100 name: limit in: query - description: 'A pagination token obtained from a previous call to this endpoint. Use it to get the next or previous page of results for your initial query. If `pagination_token` is specified, all other query parameters are ignored and inferred from the initial query. If not specified, the first page of results will be returned.' required: false schema: type: string name: pagination_token in: query - description: The field to sort the results by. Typically used together with the `order` parameter. required: false schema: allOf: - $ref: '#/components/schemas/DataExportCursorFields' name: sort in: query - required: false schema: type: string format: date-time name: created_at__gt in: query - required: false schema: type: string format: date-time name: created_at__lt in: query - required: false schema: type: string format: date-time name: created_at__gte in: query - required: false schema: type: string format: date-time name: created_at__lte in: query - required: false schema: type: string format: uuid name: created_by_entity_user_id in: query - description: The ID of the entity that owns the requested resource. required: true schema: type: string format: uuid examples: - 9d2b4c8f-2087-4738-ba91-7359683c49a4 name: x-monite-entity-id in: header responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AllDocumentExportResponseSchema' '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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '406': description: Not Acceptable content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] post: tags: - Data export summary: Create an export job description: Request the export of payable and receivable documents with the specified statuses. operationId: post_data_exports parameters: - required: true schema: type: string format: date example: '2023-09-01' name: x-monite-version in: header - description: The ID of the entity that owns the requested resource. required: true schema: type: string format: uuid examples: - 9d2b4c8f-2087-4738-ba91-7359683c49a4 name: x-monite-entity-id in: header requestBody: content: application/json: schema: $ref: '#/components/schemas/ExportPayloadSchema' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CreateExportTaskResponseSchema' '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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '409': description: 'Possible responses: `Not all statuses are available: {missed_statuses}. Available ones: {object_statuses},`{missed_objects} are not allowed. Available only {objects}`' 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 /data_exports/supported_formats: get: tags: - Data export summary: Get supported export formats operationId: get_data_exports_supported_formats parameters: - required: true schema: type: string format: date example: '2023-09-01' name: x-monite-version in: header - description: The ID of the entity that owns the requested resource. required: true schema: type: string format: uuid examples: - 9d2b4c8f-2087-4738-ba91-7359683c49a4 name: x-monite-entity-id in: header responses: '200': description: Successful Response content: application/json: schema: items: $ref: '#/components/schemas/SupportedFormatSchema' type: array title: Response Get Data Exports Supported Formats '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 /data_exports/{document_export_id}: get: tags: - Data export summary: Get the export job status by ID operationId: get_data_exports_id parameters: - required: true schema: type: string format: date example: '2023-09-01' name: x-monite-version in: header - required: true schema: type: string format: uuid name: document_export_id in: path - description: The ID of the entity that owns the requested resource. required: true schema: type: string format: uuid examples: - 9d2b4c8f-2087-4738-ba91-7359683c49a4 name: x-monite-entity-id in: header responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/DocumentExportResponseSchema' '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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '403': description: Forbidden 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: AllDocumentExportResponseSchema: properties: data: items: $ref: '#/components/schemas/DocumentExportResponseSchema' type: array description: A set of export objects returned per page. next_pagination_token: type: string description: A token that can be sent in the `pagination_token` query parameter to get the next page of results. If there is no next page, i.e. you have reached the last page, the value is `null`. prev_pagination_token: type: string description: A token that can be sent in the `pagination_token` query parameter to get the previous page of results. If there is no previous page, i.e. you have reached the first page, the value is `null`. additionalProperties: false type: object required: - data SupportedFormatSchema: properties: available_types: additionalProperties: items: $ref: '#/components/schemas/ExportFormat' type: array type: object object_type: type: string enum: - payable - receivable additionalProperties: false type: object required: - available_types - object_type OrderEnum: type: string enum: - asc - desc ExportPayloadSchema: properties: date_from: type: string format: date date_to: type: string format: date format: $ref: '#/components/schemas/ExportFormat' objects: items: $ref: '#/components/schemas/ExportObjectSchema' type: array additionalProperties: false type: object required: - date_from - date_to - format - objects ExportObjectSchema: oneOf: - $ref: '#/components/schemas/ExportPayableSchema' - $ref: '#/components/schemas/ExportReceivableSchema' additionalProperties: false discriminator: propertyName: name mapping: payable: '#/components/schemas/ExportPayableSchema' receivable: '#/components/schemas/ExportReceivableSchema' CreateExportTaskResponseSchema: properties: id: type: string format: uuid type: object required: - id DocumentExportResponseSchema: properties: id: type: string format: uuid count: type: integer created_by_entity_user_id: type: string format: uuid end_datetime: type: string format: date-time entity_id: type: string format: uuid format: type: string language: type: string source_url: type: string maxLength: 2083 minLength: 1 format: uri start_datetime: type: string format: date-time status: type: string type: object required: - id - count - entity_id - format - language - status HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array type: object ExportFormat: type: string enum: - csv - pdf - csv_xero ExportPayableSchema: properties: name: type: string enum: - payable statuses: items: $ref: '#/components/schemas/PayableStateEnum' type: array additionalProperties: false type: object required: - name - statuses ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array msg: type: string type: type: string type: object required: - loc - msg - type DataExportCursorFields: type: string enum: - created_at ExportReceivableSchema: properties: name: type: string enum: - receivable statuses: items: $ref: '#/components/schemas/ReceivablesStatusEnum' type: array additionalProperties: false type: object required: - name - statuses ReceivablesStatusEnum: type: string enum: - draft - issuing - issued - failed - accepted - expired - declined - recurring - partially_paid - paid - overdue - uncollectible - canceled - deleted description: 'This Enum the results of combining two types of statuses from QuoteStateEnum, CreditNoteStateEnum and InvoiceStateEnum. You shouldn''t use it in your scenarios if only for edge cases in workers, but ideally need to remove this shared Enum.' ErrorSchemaResponse: properties: error: $ref: '#/components/schemas/ErrorSchema' type: object required: - error PayableStateEnum: type: string enum: - draft - new - approve_in_progress - waiting_to_be_paid - partially_paid - paid - canceled - rejected ErrorSchema: properties: message: type: string type: object required: - message securitySchemes: HTTPBearer: type: http scheme: bearer x-refined-from: - monite-openapi-2023-09-01.json - monite-openapi-2024-05-25.json - monite-openapi.yml