### Approve Payable Example Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Example of how to confirm a payable is ready for payment. ```typescript await client.payables.approvePaymentById("payable_id"); ``` -------------------------------- ### Install Monite Node Client Source: https://github.com/team-monite/monite-node-client/blob/main/README.md Installs the Monite Node.js client package using npm. ```shell npm i -s @monite/node-client ``` -------------------------------- ### Get Entities Persons Example Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Example usage for retrieving all persons associated with entities using the Monite Node Client. ```typescript await client.entities.persons.get(); ``` -------------------------------- ### Update Payable Example Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Example of how to update the information for a specific payable. ```typescript await client.payables.updateById("payable_id"); ``` -------------------------------- ### Mark Payable as Paid Example Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Example of marking a payable as paid. ```typescript await client.payables.markAsPaidById("payable_id", { ...params }); ``` -------------------------------- ### Attach File to Payable Example Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Example of attaching a file to a payable that does not have an existing attachment. ```typescript await client.payables.attachFileById(fs.createReadStream("/path/to/your/file"), "payable_id"); ``` -------------------------------- ### Create Entity Person Example Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Example usage for creating a new person associated with an entity using the Monite Node Client. ```typescript await client.entities.persons.create({ email: "email", first_name: "first_name", last_name: "last_name", relationship: {}, }); ``` -------------------------------- ### Reject Payable Example Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Example showing how to reject a payable by its ID using the Monite Node.js client. ```typescript await client.payables.rejectById("payable_id"); ``` -------------------------------- ### Reopen Payable Example Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Example of how to reopen a rejected payable by its ID using the Monite Node.js client. ```typescript await client.payables.reopenById("payable_id"); ``` -------------------------------- ### Get Entity VAT ID Example Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Example usage for retrieving a specific entity's VAT ID using the Monite Node Client. ```typescript await client.entities.vatIds.getById("id", "entity_id"); ``` -------------------------------- ### Mark Payable as Partially Paid Example Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Example demonstrating how to mark a payable as partially paid, specifying the amount paid, using the Monite Node.js client. ```typescript await client.payables.markAsPartiallyPaidById("payable_id", { amount_paid: 1, }); ``` -------------------------------- ### Get Entity Onboarding Data Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Retrieve the onboarding data for a specific entity. ```typescript await client.entities.onboardingData.get("entity_id"); ``` -------------------------------- ### Get Entity Person by ID Example Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Example usage for retrieving a specific person by their ID using the Monite Node Client. ```typescript await client.entities.persons.getById("person_id"); ``` -------------------------------- ### Customize Fetch Client Source: https://github.com/team-monite/monite-node-client/blob/main/README.md Provides an example of how to inject a custom fetch implementation for advanced use cases or unsupported environments. ```typescript import { MoniteClient } from "@monite/node-client"; const client = new MoniteClient({ ... fetcher: // provide your implementation here }); ``` -------------------------------- ### Cancel Payable Example Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Example of how to cancel a payable that has not been confirmed during the review process. ```typescript await client.payables.cancelById("payable_id"); ``` -------------------------------- ### Get Entity Onboarding Requirements Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Retrieves the onboarding requirements for an entity. This method fetches the necessary information and documentation needed for the entity's onboarding process. ```APIDOC client.entities.getOnboardingRequirements(requestOptions?: Entities.RequestOptions): Promise Parameters: requestOptions: Entities.RequestOptions - Optional request options. Returns: Promise - The response containing onboarding requirements. ``` ```typescript await client.entities.getOnboardingRequirements(); ``` -------------------------------- ### Get Purchase Order Variables Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Retrieves a list of placeholders that can be used for customizing email templates related to purchase orders. ```typescript await client.purchaseOrders.getVariables(); ``` -------------------------------- ### Submit Payable for Approval - Monite Node Client Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Starts the approval process for an uploaded payable once it has been validated. Requires a payable ID. ```typescript await client.payables.submitForApprovalById("payable_id"); ``` -------------------------------- ### Mark Payable as Paid Example Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Example of how to mark a specific payable as paid using its ID with the Monite Node.js client. ```typescript await client.payables.markAsPaidById("payable_id"); ``` -------------------------------- ### Submit Payable Credit Note for Approval Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Starts the approval process for a validated credit note. Requires the credit note ID. ```typescript await client.creditNotes.postPayableCreditNotesIdSubmitForApproval("credit_note_id"); ``` -------------------------------- ### Monite Roles Get Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Finds all roles matching search criteria. Accepts Monite.RolesGetRequest and optional Roles.RequestOptions. Returns a Monite.RolePaginationResponse. ```typescript await client.roles.get(); ``` -------------------------------- ### Cancel OCR Processing Example Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Example of requesting to cancel the OCR processing for a specific payable. ```typescript await client.payables.postPayablesIdCancelOcr("payable_id"); ``` -------------------------------- ### Update Entity VAT ID Example Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Example usage for updating a specific entity's VAT ID using the Monite Node Client. ```typescript await client.entities.vatIds.updateById("id", "entity_id"); ``` -------------------------------- ### Get Entity Settings Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Retrieves all settings configured for a specific entity. Requires the entity's unique ID. ```typescript client.entities.getSettingsById(entityId: string, requestOptions?: Entities.RequestOptions): Promise Description: Retrieve all settings for this entity. Parameters: - entityId: string — The unique ID of the entity. - requestOptions: Entities.RequestOptions — Optional request options. Usage Example: ```typescript await client.entities.getSettingsById("ea837e28-509b-4b6a-a600-d54b6aa0b1f5"); ``` ``` -------------------------------- ### Get Entity Payment Methods Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Retrieve all enabled payment methods for an entity. ```typescript await client.entities.paymentMethods.get("entity_id"); ``` -------------------------------- ### Get Receivable PDF Link Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Retrieves a pre-signed URL for downloading the PDF version of a specific receivable. This is useful for sharing or archiving receivable documents. ```typescript await client.receivables.getPdfLinkById("receivable_id"); ``` -------------------------------- ### Monite Client Files API Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Provides documentation for the Monite client's file management operations, including getting, uploading, retrieving by ID, and deleting files. Each method details its parameters and return types. ```typescript client.files.get({ ...params }) -> Monite.FilesResponse // Usage: await client.files.get(); // Parameters: // request: Monite.FilesGetRequest // requestOptions: Files.RequestOptions ``` ```typescript client.files.upload(file, { ...params }) -> Monite.FileResponse // Usage: await client.files.upload(fs.createReadStream("/path/to/your/file"), { file_type: "ocr_results", }); // Parameters: // file: File | fs.ReadStream | Blob // request: Monite.UploadFile // requestOptions: Files.RequestOptions ``` ```typescript client.files.getById(fileId) -> Monite.FileResponse // Usage: await client.files.getById("file_id"); // Parameters: // fileId: string // requestOptions: Files.RequestOptions ``` ```typescript client.files.delete(fileId) -> void // Usage: await client.files.delete("file_id"); // Parameters: // fileId: string // requestOptions: Files.RequestOptions ``` -------------------------------- ### Monite Products API Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md API endpoints for managing products within the Monite platform. Supports retrieving, creating, getting by ID, deleting by ID, and updating by ID. ```APIDOC client.products.get({ ...params }) -> Monite.ProductServicePaginationResponse Retrieves a paginated list of products. Parameters: request: Monite.ProductsGetRequest requestOptions: Products.RequestOptions Usage: await client.products.get(); client.products.create({ ...params }) -> Monite.ProductServiceResponse Creates a new product. Parameters: request: Monite.ProductServiceRequest requestOptions: Products.RequestOptions Usage: await client.products.create({ name: "name", }); client.products.getById(productId) -> Monite.ProductServiceResponse Retrieves a specific product by its ID. Parameters: productId: string requestOptions: Products.RequestOptions Usage: await client.products.getById("product_id"); client.products.deleteById(productId) -> void Deletes a product by its ID. Parameters: productId: string requestOptions: Products.RequestOptions Usage: await client.products.deleteById("product_id"); client.products.updateById(productId, { ...params }) -> Monite.ProductServiceResponse Updates an existing product by its ID. Parameters: productId: string request: Monite.ProductServiceUpdate requestOptions: Products.RequestOptions Usage: await client.products.updateById("product_id"); ``` -------------------------------- ### Create Payable - Monite Node Client Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Adds a new payable to the system. This can be done by providing direct details like amount, currency, vendor, or by including a base64-encoded invoice file. Newly created payables start in the 'draft' status. ```typescript await client.payables.create({ ...params }); ``` -------------------------------- ### Monite Payables Line Items API (APIDOC) Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Provides comprehensive documentation for managing line items associated with payables. This includes fetching lists, creating new items, replacing all items, and retrieving specific line items by ID. Related guides and concepts are linked for further context. ```APIDOC client.payables.lineItems.get(payableId, { ...params }) -> Monite.LineItemPaginationResponse Description: Get a list of all line items related to a specific payable. Related guide: [List all payable line items](https://docs.monite.com/accounts-payable/payables/line-items#list-all-line-items-of-a-payable) Usage: await client.payables.lineItems.get("payable_id"); Parameters: payableId: string request: Monite.payables.LineItemsGetRequest requestOptions: LineItems.RequestOptions client.payables.lineItems.create(payableId, { ...params }) -> Monite.LineItemResponse Description: Add a new line item to a specific payable. The `subtotal` and `total` fields are automatically calculated and read-only. The `ledger_account_id` is required only for account integration. Related guide: [Add line items to a payable](https://docs.monite.com/accounts-payable/payables/line-items#add-line-items-to-a-payable) Usage: await client.payables.lineItems.create("payable_id", {}); Parameters: payableId: string request: Monite.LineItemRequest requestOptions: LineItems.RequestOptions client.payables.lineItems.replace(payableId, { ...params }) -> Monite.LineItemsReplaceResponse Description: Replaces the information of all line items of a specific payable. Related guide: [Replace all line items](https://docs.monite.com/accounts-payable/payables/line-items#replace-all-line-items) Usage: await client.payables.lineItems.replace("payable_id", { data: [{}], }); Parameters: payableId: string request: Monite.payables.LineItemsReplaceRequest requestOptions: LineItems.RequestOptions client.payables.lineItems.getById(lineItemId, payableId) -> Monite.LineItemResponse Description: Get information about a specific line item with a given ID. Related guide: [Retrieve a line item](https://docs.monite.com/accounts-payable/payables/line-items#retrieve-a-line-item) Usage: await client.payables.lineItems.getById("line_item_id", "payable_id"); Parameters: lineItemId: string payableId: string ``` -------------------------------- ### Get Payable Variables - Monite Node Client (TypeScript) Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Retrieves a list of placeholders allowed for use in email templates for customization. Accepts optional request options. ```typescript await client.payables.getVariables(); ``` -------------------------------- ### Get Purchase Orders Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Retrieves a paginated list of purchase orders. Supports filtering and sorting via request parameters. ```typescript await client.purchaseOrders.get(); ``` -------------------------------- ### Monite Projects API Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md API endpoints for managing projects within the Monite platform. Supports retrieving, creating, getting by ID, deleting by ID, and updating by ID. ```APIDOC client.projects.get({ ...params }) -> Monite.ProjectPaginationResponse Get all projects for an entity. Parameters: request: Monite.ProjectsGetRequest requestOptions: Projects.RequestOptions Usage: await client.projects.get(); client.projects.create({ ...params }) -> Monite.ProjectResource Create a new project. Parameters: request: Monite.ProjectCreateRequest requestOptions: Projects.RequestOptions Usage: await client.projects.create({ name: "Marketing", }); client.projects.getById(projectId) -> Monite.ProjectResource Get a project with the given ID. Parameters: projectId: string requestOptions: Projects.RequestOptions Usage: await client.projects.getById("project_id"); client.projects.deleteById(projectId) -> void Delete a project. Parameters: projectId: string requestOptions: Projects.RequestOptions Usage: await client.projects.deleteById("project_id"); ``` -------------------------------- ### Instantiate and Use Monite Client Source: https://github.com/team-monite/monite-node-client/blob/main/README.md Demonstrates how to create an instance of the MoniteClient and make a basic API call to create a product. ```typescript import { MoniteClient } from "@monite/node-client"; const client = new MoniteClient({ token: "YOUR_TOKEN", moniteVersion: "YOUR_MONITE_VERSION", moniteEntityId: "YOUR_MONITE_ENTITY_ID", }); await client.products.create({ name: "name", }); ``` -------------------------------- ### Monite Approval Requests API Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Provides methods for managing Approval Requests in the Monite API. Supports getting, creating, approving, canceling, and rejecting requests. ```APIDOC client.approvalRequests.get({ ...params }) -> Monite.ApprovalRequestResourceList Description: Retrieves a list of approval requests. Usage: await client.approvalRequests.get(); Parameters: request: Monite.ApprovalRequestsGetRequest requestOptions: ApprovalRequests.RequestOptions ``` ```APIDOC client.approvalRequests.create({ ...params }) -> Monite.ApprovalRequestResourceWithMetadata Description: Creates a new approval request. Usage: await client.approvalRequests.create({ object_id: "object_id", object_type: "account", required_approval_count: 1, role_ids: ["role_ids"], }); Parameters: request: Monite.ApprovalRequestCreateRequest requestOptions: ApprovalRequests.RequestOptions ``` ```APIDOC client.approvalRequests.getById(approvalRequestId) -> Monite.ApprovalRequestResourceWithMetadata Description: Retrieves a specific approval request by its ID. Usage: await client.approvalRequests.getById("approval_request_id"); Parameters: approvalRequestId: string requestOptions: ApprovalRequests.RequestOptions ``` ```APIDOC client.approvalRequests.approveById(approvalRequestId) -> Monite.ApprovalRequestResourceWithMetadata Description: Approves a specific approval request by its ID. Usage: await client.approvalRequests.approveById("approval_request_id"); Parameters: approvalRequestId: string requestOptions: ApprovalRequests.RequestOptions ``` ```APIDOC client.approvalRequests.cancelById(approvalRequestId) -> Monite.ApprovalRequestResourceWithMetadata Description: Cancels a specific approval request by its ID. Usage: await client.approvalRequests.cancelById("approval_request_id"); Parameters: approvalRequestId: string requestOptions: ApprovalRequests.RequestOptions ``` ```APIDOC client.approvalRequests.rejectById(approvalRequestId) -> Monite.ApprovalRequestResourceWithMetadata Description: Rejects a specific approval request by its ID. Usage: await client.approvalRequests.rejectById("approval_request_id"); Parameters: approvalRequestId: string requestOptions: ApprovalRequests.RequestOptions ``` -------------------------------- ### Mail Templates API Operations Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Provides documentation for various operations on mail templates within the Monite Node Client, including getting, creating, previewing, deleting, updating, and making templates default. Each method details its purpose, parameters, and return types. ```APIDOC MailTemplates.get() -> Monite.CustomTemplatesPaginationResponse Description: Get all custom templates. Parameters: request: Monite.MailTemplatesGetRequest requestOptions: MailTemplates.RequestOptions Usage: await client.mailTemplates.get(); ``` ```APIDOC MailTemplates.create(request: Monite.AddCustomTemplateSchema, requestOptions: MailTemplates.RequestOptions) -> Monite.CustomTemplateDataSchema Description: Create custom template. Parameters: request: Monite.AddCustomTemplateSchema - Object containing template details like body_template, name, subject_template, and type. requestOptions: MailTemplates.RequestOptions Usage: await client.mailTemplates.create({ body_template: "body_template", name: "name", subject_template: "subject_template", type: "receivables_quote", }); ``` ```APIDOC MailTemplates.preview(request: Monite.PreviewTemplateRequest, requestOptions: MailTemplates.RequestOptions) -> Monite.PreviewTemplateResponse Description: Preview rendered template. Parameters: request: Monite.PreviewTemplateRequest - Object containing body, document_type, language_code, and subject for preview. requestOptions: MailTemplates.RequestOptions Usage: await client.mailTemplates.preview({ body: "body", document_type: "receivables_quote", language_code: "ab", subject: "subject", }); ``` ```APIDOC MailTemplates.getSystem() -> Monite.SystemTemplates Description: Get all system templates. Parameters: requestOptions: MailTemplates.RequestOptions Usage: await client.mailTemplates.getSystem(); ``` ```APIDOC MailTemplates.getById(templateId: string, requestOptions: MailTemplates.RequestOptions) -> Monite.CustomTemplateDataSchema Description: Get custom template by ID. Parameters: templateId: string - The ID of the custom template to retrieve. requestOptions: MailTemplates.RequestOptions Usage: await client.mailTemplates.getById("template_id"); ``` ```APIDOC MailTemplates.deleteById(templateId: string, requestOptions: MailTemplates.RequestOptions) -> void Description: Delete custom template by ID. Parameters: templateId: string - The ID of the custom template to delete. requestOptions: MailTemplates.RequestOptions Usage: await client.mailTemplates.deleteById("template_id"); ``` ```APIDOC MailTemplates.updateById(templateId: string, request: Monite.UpdateCustomTemplateSchemaRequest, requestOptions: MailTemplates.RequestOptions) -> Monite.CustomTemplateDataSchema Description: Update custom template by ID. Parameters: templateId: string - The ID of the custom template to update. request: Monite.UpdateCustomTemplateSchemaRequest - Object containing updated template data. requestOptions: MailTemplates.RequestOptions Usage: await client.mailTemplates.updateById("template_id"); ``` ```APIDOC MailTemplates.makeDefaultById(templateId: string, requestOptions: MailTemplates.RequestOptions) -> Monite.CustomTemplateDataSchema Description: Make a custom template the default by ID. Parameters: templateId: string - The ID of the custom template to set as default. requestOptions: MailTemplates.RequestOptions Usage: await client.mailTemplates.makeDefaultById("template_id"); ``` -------------------------------- ### Upload Entity Onboarding Documents Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Provides files for entity onboarding verification. This method is used to submit necessary documents for the entity's verification process. It does not return any specific data upon successful completion. ```APIDOC client.entities.uploadOnboardingDocuments(request: Monite.EntityOnboardingDocumentsPayload, requestOptions?: Entities.RequestOptions): Promise Parameters: request: Monite.EntityOnboardingDocumentsPayload - The payload containing the documents for onboarding. requestOptions: Entities.RequestOptions - Optional request options. Returns: Promise - Indicates successful completion. ``` ```typescript await client.entities.uploadOnboardingDocuments(); ``` -------------------------------- ### Upload Onboarding Documents for Person (TypeScript) Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Uploads documents required for person onboarding verification. It takes a person ID and a payload containing the documents. Request options can also be provided for advanced configurations. ```typescript await client.entities.persons.uploadOnboardingDocuments("person_id"); ``` -------------------------------- ### Delete Payable Example Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Example of how to delete a specific payable using its ID. ```typescript await client.payables.deleteById("payable_id"); ``` -------------------------------- ### Monite Partner Settings API Documentation Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md API documentation for managing partner settings in the Monite system. Covers retrieving and updating partner configurations. ```APIDOC client.partnerSettings.get(requestOptions) - Retrieves all settings for the current partner. - Description: Retrieve all settings for this partner. - Parameters: - requestOptions: PartnerSettings.RequestOptions - Options for the request. - Returns: Monite.PartnerProjectSettingsPayloadOutput - The partner settings. client.partnerSettings.update(request, requestOptions) - Updates partner settings. - Description: Change the specified fields with the provided values. - Parameters: - request: Monite.PartnerProjectSettingsPayloadInput - The payload with settings to update. - requestOptions: PartnerSettings.RequestOptions - Options for the request. - Returns: Monite.PartnerProjectSettingsPayloadOutput - The updated partner settings. ``` -------------------------------- ### Create Counterpart - TypeScript Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Demonstrates how to create a new organization counterpart. Requires specifying the counterpart type and organization details, including address and business roles (customer/vendor). ```typescript await client.counterparts.create({ type: "organization", organization: { address: { city: "Berlin", country: "AF", line1: "Flughafenstrasse 52", postal_code: "10115", }, is_customer: true, is_vendor: true, legal_name: "Acme Inc.", }, }); ``` -------------------------------- ### Update Entity Person by ID Example Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Example usage for updating a specific person by their ID using the Monite Node Client. ```typescript await client.entities.persons.updateById("person_id"); ``` -------------------------------- ### Delete Entity Person by ID Example Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Example usage for deleting a specific person by their ID using the Monite Node Client. ```typescript await client.entities.persons.deleteById("person_id"); ``` -------------------------------- ### Delete Entity VAT ID Example Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Example usage for deleting a specific entity's VAT ID using the Monite Node Client. ```typescript await client.entities.vatIds.deleteById("id", "entity_id"); ``` -------------------------------- ### Get Payables Analytics - Monite Node Client (TypeScript) Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Retrieves aggregated statistics for payables, including total amount and count, both overall and by status. For more flexible configuration, use GET /analytics/payables. Accepts an optional request object and request options. ```typescript await client.payables.getAnalytics(); ``` -------------------------------- ### Preview Receivable Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Generates a preview of a receivable, typically for email content. It allows specifying body and subject text for the preview. ```typescript await client.receivables.previewById("receivable_id", { body_text: "body_text", subject_text: "subject_text", }); ``` -------------------------------- ### Create Purchase Order Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Creates a new purchase order with specified details including counterpart, currency, items, and validity period. ```typescript await client.purchaseOrders.create({ counterpart_id: "counterpart_id", currency: "AED", items: [ { currency: "AED", name: "name", price: 1, quantity: 1, unit: "unit", vat_rate: 1, }, ], message: "message", valid_for_days: 1, }); ``` -------------------------------- ### PDF Templates API Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Provides methods to manage PDF templates. This includes retrieving all available templates, system templates, fetching a specific template by its ID, and setting a template as the default. ```APIDOC PDF Templates API: get() -> Monite.TemplateListResponse - Retrieves all supported PDF templates with language codes. - Parameters: - requestOptions: PdfTemplates.RequestOptions - Returns: Monite.TemplateListResponse - Usage: await client.pdfTemplates.get(); getSystem() -> Monite.TemplateListResponse - Retrieves all supported system PDF templates with language codes. - Parameters: - requestOptions: PdfTemplates.RequestOptions - Returns: Monite.TemplateListResponse - Usage: await client.pdfTemplates.getSystem(); getById(documentTemplateId: string) -> Monite.TemplateReceivableResponse - Retrieves a specific PDF template by its ID. - Parameters: - documentTemplateId: string - The ID of the document template. - requestOptions: PdfTemplates.RequestOptions - Returns: Monite.TemplateReceivableResponse - Usage: await client.pdfTemplates.getById("document_template_id"); makeDefaultById(documentTemplateId: string) -> Monite.TemplateReceivableResponse - Sets a specific PDF template as the default. - Parameters: - documentTemplateId: string - The ID of the document template to set as default. - requestOptions: PdfTemplates.RequestOptions - Returns: Monite.TemplateReceivableResponse - Usage: await client.pdfTemplates.makeDefaultById("document_template_id"); ``` -------------------------------- ### Monite Recurrences Get Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Retrieves recurrence data. Requires Recurrences.RequestOptions for optional parameters. ```typescript await client.recurrences.get(); ``` -------------------------------- ### Get Entity VAT IDs Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Retrieve the list of VAT identification numbers associated with an entity. ```typescript await client.entities.vatIds.get("entity_id"); ``` -------------------------------- ### Monite Node Client Text Template API Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Comprehensive API documentation for managing text templates using the Monite Node Client. This includes operations for retrieving, creating, updating, deleting, and setting default text templates. ```APIDOC client.textTemplates.get({ ...params }) -> Monite.TextTemplateResponseList Description: Get text templates. Usage: await client.textTemplates.get(); Parameters: request: Monite.TextTemplatesGetRequest requestOptions: TextTemplates.RequestOptions client.textTemplates.create({ ...params }) -> Monite.TextTemplateResponse Description: Create a text template. Usage: await client.textTemplates.create({ document_type: "quote", name: "name", template: "template", type: "email_header", }); Parameters: request: Monite.CreateTextTemplatePayload requestOptions: TextTemplates.RequestOptions client.textTemplates.getById(textTemplateId) -> Monite.TextTemplateResponse Description: Get all custom contents. Usage: await client.textTemplates.getById("text_template_id"); Parameters: textTemplateId: string requestOptions: TextTemplates.RequestOptions client.textTemplates.deleteById(textTemplateId) -> void Description: Delete custom content by ID. Usage: await client.textTemplates.deleteById("text_template_id"); Parameters: textTemplateId: string — UUID text_template ID requestOptions: TextTemplates.RequestOptions client.textTemplates.updateById(textTemplateId, { ...params }) -> Monite.TextTemplateResponse Description: Update custom content by ID. Usage: await client.textTemplates.updateById("text_template_id"); Parameters: textTemplateId: string — UUID text_template ID request: Monite.UpdateTextTemplatePayload requestOptions: TextTemplates.RequestOptions client.textTemplates.makeDefaultById(textTemplateId) -> Monite.TextTemplateResponse Description: Make text template default. Usage: await client.textTemplates.makeDefaultById("text_template_id"); Parameters: textTemplateId: string — UUID text_template ID requestOptions: TextTemplates.RequestOptions ``` -------------------------------- ### Get Purchase Order by ID Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Retrieves a specific purchase order using its unique identifier. ```typescript await client.purchaseOrders.getById("purchase_order_id"); ``` -------------------------------- ### Monite Node Client: Entities API Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Provides methods for retrieving, creating, and managing entities within the Monite system. Includes operations for listing all entities, creating new ones, and fetching/updating specific entities by ID. ```APIDOC client.entities.get(request, requestOptions) - **Description**: Retrieve a list of all entities. - **Parameters**: - `request`: `Monite.EntitiesGetRequest` - Optional request parameters for filtering/pagination. - `requestOptions`: `Entities.RequestOptions` - Optional request options. - **Returns**: `Monite.EntityPaginationResponse` - **Usage Example**: ```typescript await client.entities.get(); ``` client.entities.create(request, requestOptions) - **Description**: Create a new entity from the specified values. - **Parameters**: - `request`: `Monite.CreateEntityRequest` - Object containing entity details. - `address`: `object` - `city`: `string` - `country`: `string` - `line1`: `string` - `postal_code`: `string` - `email`: `string` - `type`: `string` (e.g., "individual") - `requestOptions`: `Entities.RequestOptions` - Optional request options. - **Returns**: `Monite.EntityResponse` - **Usage Example**: ```typescript await client.entities.create({ address: { city: "city", country: "AF", line1: "line1", postal_code: "postal_code", }, email: "email", type: "individual", }); ``` client.entities.getEntitiesMe(requestOptions) - **Description**: Deprecated. Use `GET /entity_users/my_entity` instead. - **Parameters**: - `requestOptions`: `Entities.RequestOptions` - Optional request options. - **Returns**: `Monite.EntityResponse` - **Usage Example**: ```typescript await client.entities.getEntitiesMe(); ``` client.entities.patchEntitiesMe(request, requestOptions) - **Description**: Deprecated. Use `PATCH /entity_users/my_entity` instead. - **Parameters**: - `request`: `Monite.UpdateEntityRequest` - Object containing fields to update. - `requestOptions`: `Entities.RequestOptions` - Optional request options. - **Returns**: `Monite.EntityResponse` - **Usage Example**: ```typescript await client.entities.patchEntitiesMe({}); ``` client.entities.getById(entityId, requestOptions) - **Description**: Retrieve an entity by its ID. - **Parameters**: - `entityId`: `string` - A unique ID to specify the entity. - `requestOptions`: `Entities.RequestOptions` - Optional request options. - **Returns**: `Monite.EntityResponse` - **Usage Example**: ```typescript await client.entities.getById("ea837e28-509b-4b6a-a600-d54b6aa0b1f5"); ``` client.entities.updateById(entityId, request, requestOptions) - **Description**: Change the specified fields with the provided values for an entity. - **Parameters**: - `entityId`: `string` - The ID of the entity to update. - `request`: `Monite.UpdateEntityRequest` - Object containing fields to update. - `requestOptions`: `Entities.RequestOptions` - Optional request options. - **Returns**: `Monite.EntityResponse` - **Usage Example**: ```typescript await client.entities.updateById("ea837e28-509b-4b6a-a600-d54b6aa0b1f5", {}); ``` ``` -------------------------------- ### Get Counterpart Contacts Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Retrieves a list of all contacts associated with a specific counterpart. Requires the counterpart ID. ```typescript await client.counterparts.contacts.get("counterpart_id"); ``` -------------------------------- ### Monite Tags API Documentation Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md API documentation for managing tags in the Monite system. Supports creating, retrieving, and deleting tags. ```APIDOC client.tags.get(request, requestOptions) - Retrieves a list of all tags. - Description: Get a list of all tags. Tags can be assigned to resources to assist with searching and filtering. Tags can also be used as trigger conditions in payable approval policies. - Parameters: - request: Monite.TagsGetRequest - Request object for filtering tags. - requestOptions: Tags.RequestOptions - Options for the request. - Returns: Monite.TagsPaginationResponse - A paginated list of tags. client.tags.create(request, requestOptions) - Creates a new tag. - Description: Create a new tag. The tag name must be unique. Tag names are case-sensitive. The response returns an auto-generated ID assigned to this tag. To assign this tag to a resource, send the tag ID in the `tag_ids` list when creating or updating a resource. - Parameters: - request: Monite.TagCreateSchema - The payload to create a tag, including its name. - requestOptions: Tags.RequestOptions - Options for the request. - Returns: Monite.TagReadSchema - The created tag information. client.tags.getById(tagId, requestOptions) - Retrieves information about a tag by its ID. - Description: Get information about a tag with the given ID. - Parameters: - tagId: string - The ID of the tag to retrieve. - requestOptions: Tags.RequestOptions - Options for the request. - Returns: Monite.TagReadSchema - The tag information. client.tags.deleteById(tagId, requestOptions) - Deletes a tag by its ID. - Description: Delete a tag with the given ID. This tag will be automatically deleted from all resources where it was used. - Parameters: - tagId: string - The ID of the tag to delete. - requestOptions: Tags.RequestOptions - Options for the request. - Returns: void ``` -------------------------------- ### Get Entity Partner Metadata Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Retrieves the metadata object associated with an entity, typically in JSON format. ```typescript client.entities.getPartnerMetadataById(entityId: string, requestOptions?: Entities.RequestOptions): Promise Description: Retrieve a metadata object associated with this entity, usually in a JSON format. Parameters: - entityId: string — The unique ID of the entity. - requestOptions: Entities.RequestOptions — Optional request options. Usage Example: ```typescript await client.entities.getPartnerMetadataById("entity_id"); ``` ``` -------------------------------- ### Get SyncedRecords Accounting Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Retrieves a list of synchronized records from the accounting system. Supports filtering by object type. ```typescript await client.accounting.syncedRecords.get({ object_type: "product", }); ``` -------------------------------- ### Create Entity User Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Creates a new entity user with the provided details. This method requires a payload containing information such as the user's first name and login credentials. ```APIDOC client.entityUsers.create(request: Monite.CreateEntityUserRequest, requestOptions?: EntityUsers.RequestOptions): Promise Parameters: request: Monite.CreateEntityUserRequest - The payload with details for the new entity user. requestOptions: EntityUsers.RequestOptions - Optional request options. Returns: Promise - The response containing the newly created entity user. ``` ```typescript await client.entityUsers.create({ first_name: "Casey", login: "login", }); ``` -------------------------------- ### Get All Recurrences Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Retrieves a list of all recurrences managed by the system. This endpoint is used to fetch all recurring payment schedules. ```typescript await client.recurrences.get(); ``` -------------------------------- ### Monite Client Financing API Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Details the Monite client's financing operations, including fetching financing invoices, pushing invoices for financing, retrieving financing offers, and obtaining financing tokens. Each method outlines its purpose, parameters, and expected responses. ```typescript client.financing.getFinancingInvoices({ ...params }) -> Monite.FinancingInvoiceListResponse // Description: // Returns a list of invoices requested for financing // Usage: await client.financing.getFinancingInvoices(); // Parameters: // request: Monite.GetFinancingInvoicesRequest // requestOptions: Financing.RequestOptions ``` ```typescript client.financing.postFinancingInvoices({ ...params }) -> Monite.FinancingPushInvoicesResponse // Description: // Returns a session token and a connect token to open Kanmon SDK for confirming invoice details. // Usage: await client.financing.postFinancingInvoices({ invoices: [ { id: "id", type: "payable", }, ], }); // Parameters: // request: Monite.FinancingPushInvoicesRequest // requestOptions: Financing.RequestOptions ``` ```typescript client.financing.getFinancingOffers() -> Monite.FinancingOffersResponse // Description: // Returns a list of financing offers and the business's onboarding status // Usage: await client.financing.getFinancingOffers(); // Parameters: // requestOptions: Financing.RequestOptions ``` ```typescript client.financing.postFinancingTokens() -> Monite.FinancingTokenResponse // Description: // Returns a token for Kanmon SDK. Creates a business and user on Kanmon if not already exist. // Usage: await client.financing.postFinancingTokens(); ``` -------------------------------- ### Create Receivable Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Creates a new accounts receivable document (e.g., invoice, quote, credit note). Requires details such as counterpart, currency, and line items. ```typescript await client.receivables.create({ counterpart_billing_address_id: "counterpart_billing_address_id", counterpart_id: "counterpart_id", currency: "AED", line_items: [ { quantity: 1.1, }, ], type: "quote", }); ``` -------------------------------- ### Get Payable Credit Notes Validations Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Retrieves the validations for payable credit notes. Requires request options for the operation. ```typescript await client.creditNotes.getPayableCreditNotesValidations(); ``` -------------------------------- ### Monite Roles Create Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Creates a new role with specified values. Accepts CreateRoleRequest and optional Roles.RequestOptions. Returns a Monite.RoleResponse. ```typescript await client.roles.create({ name: "name", permissions: {}, }); ``` -------------------------------- ### Import Request and Response Types Source: https://github.com/team-monite/monite-node-client/blob/main/README.md Shows how to import and use TypeScript interfaces for Monite API requests and responses. ```typescript import { Monite } from "@monite/node-client"; const request: Monite.GetAnalyticsCreditNotesRequest = { ... }; ``` -------------------------------- ### Get Counterpart Contact by ID Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Retrieves a specific counterpart contact by its unique ID. Requires both the contact ID and the counterpart ID. ```typescript await client.counterparts.contacts.getById("contact_id", "counterpart_id"); ``` -------------------------------- ### Create Payable - Monite Node Client (TypeScript) Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Creates a new payable. Requires a request object conforming to Monite.PayableUploadWithDataSchema and optional request options. ```typescript await client.payables.create(); ``` -------------------------------- ### Get Receivable Required Fields Source: https://github.com/team-monite/monite-node-client/blob/main/reference.md Retrieves the mandatory fields required for creating an invoice, based on the provided entity and counterpart details. ```typescript await client.receivables.getReceivablesRequiredFields(); ```