Pennylane API Client
    Preparing search index...

    Variable TransactionsApiConst

    TransactionsApi: {
        createTransaction: (
            body: CreateTransactionBody,
        ) => Effect<
            {
                amount: string;
                archived_at: string
                | null;
                attachment_required: boolean;
                bank_account: { id: number; url: string };
                categories: readonly {
                    analytical_code: string | null;
                    category_group: { id: number };
                    created_at: string;
                    id: number;
                    label: string;
                    updated_at: string;
                    weight: string;
                }[];
                created_at: string;
                currency: string
                | null;
                currency_amount: string;
                currency_fee: string | null;
                customer: { id: number; url: string } | null;
                date: string;
                fee: string | null;
                id: number;
                interbank_code: string | null;
                journal: { id: number; url: string };
                label: string | null;
                matched_invoices: { url: string };
                outstanding_balance: string | null;
                pro_account_expense:
                    | {
                        card_masked_number: string;
                        employee: { first_name: string; id: number; last_name: string }
                        | null;
                    }
                    | null;
                supplier: { id: number; url: string }
                | null;
                updated_at: string;
            },
            CreateTransactionError,
            PennylaneClient,
        >;
        getTransaction: (
            id: number,
        ) => Effect<
            {
                amount: string;
                archived_at: string
                | null;
                attachment_required: boolean;
                bank_account: { id: number; url: string };
                categories: readonly {
                    analytical_code: string | null;
                    category_group: { id: number };
                    created_at: string;
                    id: number;
                    label: string;
                    updated_at: string;
                    weight: string;
                }[];
                created_at: string;
                currency: string
                | null;
                currency_amount: string;
                currency_fee: string | null;
                customer: { id: number; url: string } | null;
                date: string;
                fee: string | null;
                id: number;
                interbank_code: string | null;
                journal: { id: number; url: string };
                label: string | null;
                matched_invoices: { url: string };
                outstanding_balance: string | null;
                pro_account_expense:
                    | {
                        card_masked_number: string;
                        employee: { first_name: string; id: number; last_name: string }
                        | null;
                    }
                    | null;
                supplier: { id: number; url: string }
                | null;
                updated_at: string;
            },
            GetTransactionError,
            PennylaneClient,
        >;
        getTransactionMatchedInvoices: (
            transactionId: number,
            params?: GetTransactionMatchedInvoicesQueryParams,
        ) => Effect<
            {
                has_more: boolean;
                items: readonly {
                    id: number;
                    type: "customer"
                    | "supplier";
                    url: string;
                }[];
                next_cursor?: string
                | null;
            },
            GetTransactionMatchedInvoicesError,
            PennylaneClient,
        >;
        getTransactions: (
            params?: GetTransactionsQueryParams,
        ) => Effect<
            {
                has_more: boolean;
                items: readonly {
                    amount: string;
                    archived_at: string
                    | null;
                    attachment_required: boolean;
                    bank_account: { id: number; url: string };
                    categories: readonly {
                        analytical_code: string | null;
                        category_group: { id: number };
                        created_at: string;
                        id: number;
                        label: string;
                        updated_at: string;
                        weight: string;
                    }[];
                    created_at: string;
                    currency: string
                    | null;
                    currency_amount: string;
                    currency_fee: string | null;
                    customer: { id: number; url: string } | null;
                    date: string;
                    fee: string | null;
                    id: number;
                    interbank_code: string | null;
                    journal: { id: number; url: string };
                    label: string | null;
                    matched_invoices: { url: string };
                    outstanding_balance: string | null;
                    pro_account_expense:
                        | {
                            card_masked_number: string;
                            employee: { first_name: string; id: number; last_name: string }
                            | null;
                        }
                        | null;
                    supplier: { id: number; url: string }
                    | null;
                    updated_at: string;
                }[];
                next_cursor?: string
                | null;
            },
            GetTransactionsError,
            PennylaneClient,
        >;
        updateTransaction: (
            id: number,
            body: UpdateTransactionBody,
        ) => Effect<
            {
                amount: string;
                archived_at: string
                | null;
                attachment_required: boolean;
                bank_account: { id: number; url: string };
                categories: readonly {
                    analytical_code: string | null;
                    category_group: { id: number };
                    created_at: string;
                    id: number;
                    label: string;
                    updated_at: string;
                    weight: string;
                }[];
                created_at: string;
                currency: string
                | null;
                currency_amount: string;
                currency_fee: string | null;
                customer: { id: number; url: string } | null;
                date: string;
                fee: string | null;
                id: number;
                interbank_code: string | null;
                journal: { id: number; url: string };
                label: string | null;
                matched_invoices: { url: string };
                outstanding_balance: string | null;
                pro_account_expense:
                    | {
                        card_masked_number: string;
                        employee: { first_name: string; id: number; last_name: string }
                        | null;
                    }
                    | null;
                supplier: { id: number; url: string }
                | null;
                updated_at: string;
            },
            UpdateTransactionError,
            PennylaneClient,
        >;
    } = ...

    Service containing methods for the "transactions" endpoints (bank transactions).

    Type Declaration

    • createTransaction: (
          body: CreateTransactionBody,
      ) => Effect<
          {
              amount: string;
              archived_at: string
              | null;
              attachment_required: boolean;
              bank_account: { id: number; url: string };
              categories: readonly {
                  analytical_code: string | null;
                  category_group: { id: number };
                  created_at: string;
                  id: number;
                  label: string;
                  updated_at: string;
                  weight: string;
              }[];
              created_at: string;
              currency: string
              | null;
              currency_amount: string;
              currency_fee: string | null;
              customer: { id: number; url: string } | null;
              date: string;
              fee: string | null;
              id: number;
              interbank_code: string | null;
              journal: { id: number; url: string };
              label: string | null;
              matched_invoices: { url: string };
              outstanding_balance: string | null;
              pro_account_expense:
                  | {
                      card_masked_number: string;
                      employee: { first_name: string; id: number; last_name: string }
                      | null;
                  }
                  | null;
              supplier: { id: number; url: string }
              | null;
              updated_at: string;
          },
          CreateTransactionError,
          PennylaneClient,
      >

      Creates a bank transaction.

      Possible errors:

      • CreateTransactionBadRequest (400): Missing or invalid request body
      • CreateTransactionUnauthorized (401): Invalid or missing API key
      • CreateTransactionForbidden (403): Insufficient permissions (transactions:all scope required)
      • CreateTransactionNotFound (404): Bank account not found
      • CreateTransactionUnprocessableEntity (422): Request rejected by business validation
    • getTransaction: (
          id: number,
      ) => Effect<
          {
              amount: string;
              archived_at: string
              | null;
              attachment_required: boolean;
              bank_account: { id: number; url: string };
              categories: readonly {
                  analytical_code: string | null;
                  category_group: { id: number };
                  created_at: string;
                  id: number;
                  label: string;
                  updated_at: string;
                  weight: string;
              }[];
              created_at: string;
              currency: string
              | null;
              currency_amount: string;
              currency_fee: string | null;
              customer: { id: number; url: string } | null;
              date: string;
              fee: string | null;
              id: number;
              interbank_code: string | null;
              journal: { id: number; url: string };
              label: string | null;
              matched_invoices: { url: string };
              outstanding_balance: string | null;
              pro_account_expense:
                  | {
                      card_masked_number: string;
                      employee: { first_name: string; id: number; last_name: string }
                      | null;
                  }
                  | null;
              supplier: { id: number; url: string }
              | null;
              updated_at: string;
          },
          GetTransactionError,
          PennylaneClient,
      >

      Retrieves a single bank transaction by its identifier.

      Possible errors:

      • GetTransactionBadRequest (400): Invalid request
      • GetTransactionUnauthorized (401): Invalid or missing API key
      • GetTransactionForbidden (403): Insufficient permissions for this operation
      • GetTransactionNotFound (404): Transaction not found
    • getTransactionMatchedInvoices: (
          transactionId: number,
          params?: GetTransactionMatchedInvoicesQueryParams,
      ) => Effect<
          {
              has_more: boolean;
              items: readonly { id: number; type: "customer"
              | "supplier"; url: string }[];
              next_cursor?: string | null;
          },
          GetTransactionMatchedInvoicesError,
          PennylaneClient,
      >

      Retrieves the invoices (customer or supplier) matched to a bank transaction.

      Uses cursor-based pagination.

      Possible errors:

      • GetTransactionMatchedInvoicesBadRequest (400): Missing or invalid query parameters
      • GetTransactionMatchedInvoicesUnauthorized (401): Invalid or missing API key
      • GetTransactionMatchedInvoicesForbidden (403): Insufficient permissions for this operation
      • GetTransactionMatchedInvoicesNotFound (404): Transaction not found
    • getTransactions: (
          params?: GetTransactionsQueryParams,
      ) => Effect<
          {
              has_more: boolean;
              items: readonly {
                  amount: string;
                  archived_at: string
                  | null;
                  attachment_required: boolean;
                  bank_account: { id: number; url: string };
                  categories: readonly {
                      analytical_code: string | null;
                      category_group: { id: number };
                      created_at: string;
                      id: number;
                      label: string;
                      updated_at: string;
                      weight: string;
                  }[];
                  created_at: string;
                  currency: string
                  | null;
                  currency_amount: string;
                  currency_fee: string | null;
                  customer: { id: number; url: string } | null;
                  date: string;
                  fee: string | null;
                  id: number;
                  interbank_code: string | null;
                  journal: { id: number; url: string };
                  label: string | null;
                  matched_invoices: { url: string };
                  outstanding_balance: string | null;
                  pro_account_expense:
                      | {
                          card_masked_number: string;
                          employee: { first_name: string; id: number; last_name: string }
                          | null;
                      }
                      | null;
                  supplier: { id: number; url: string }
                  | null;
                  updated_at: string;
              }[];
              next_cursor?: string
              | null;
          },
          GetTransactionsError,
          PennylaneClient,
      >

      Retrieves a list of bank transactions.

      Uses cursor-based pagination.

      Possible errors:

      • GetTransactionsBadRequest (400): Missing or invalid query parameters
      • GetTransactionsUnauthorized (401): Invalid or missing API key
      • GetTransactionsForbidden (403): Insufficient permissions (transactions:readonly scope required)
      • GetTransactionsNotFound (404): Resource not found
    • updateTransaction: (
          id: number,
          body: UpdateTransactionBody,
      ) => Effect<
          {
              amount: string;
              archived_at: string
              | null;
              attachment_required: boolean;
              bank_account: { id: number; url: string };
              categories: readonly {
                  analytical_code: string | null;
                  category_group: { id: number };
                  created_at: string;
                  id: number;
                  label: string;
                  updated_at: string;
                  weight: string;
              }[];
              created_at: string;
              currency: string
              | null;
              currency_amount: string;
              currency_fee: string | null;
              customer: { id: number; url: string } | null;
              date: string;
              fee: string | null;
              id: number;
              interbank_code: string | null;
              journal: { id: number; url: string };
              label: string | null;
              matched_invoices: { url: string };
              outstanding_balance: string | null;
              pro_account_expense:
                  | {
                      card_masked_number: string;
                      employee: { first_name: string; id: number; last_name: string }
                      | null;
                  }
                  | null;
              supplier: { id: number; url: string }
              | null;
              updated_at: string;
          },
          UpdateTransactionError,
          PennylaneClient,
      >

      Updates a bank transaction by assigning it to a customer or to a supplier.

      Possible errors:

      • UpdateTransactionBadRequest (400): Missing or invalid request body
      • UpdateTransactionUnauthorized (401): Invalid or missing API key
      • UpdateTransactionForbidden (403): Insufficient permissions (transactions:all scope required)
      • UpdateTransactionNotFound (404): Transaction not found
      • UpdateTransactionUnprocessableEntity (422): Request rejected by business validation