kiotviet-client-sdk - v0.3.4
    Preparing search index...

    Class KiotVietClient

    Index

    Constructors

    Properties

    apiClient: AxiosInstance
    bankAccounts: BankAccountHandler
    branches: BranchHandler
    cashFlow: CashFlowHandler
    categories: CategoryHandler
    customers: CustomerHandler
    invoices: InvoiceHandler
    orders: OrderHandler
    priceBooks: PriceBookHandler
    products: ProductHandler
    purchaseOrders: PurchaseOrderHandler
    salesChannels: SalesChannelsHandler
    settings: SettingsHandler
    suppliers: SupplierHandler
    surcharges: SurchargeHandler
    trademarks: TrademarksHandler
    transfers: TransferHandler
    vouchers: VouchersHandler
    webhooks: WebhookHandler

    Methods

    • Make a DELETE request

      Type Parameters

      • T

      Parameters

      • url: string

        The URL to make the request to

      • Optionalconfig: AxiosRequestConfig<any>

        Optional axios request configuration

      Returns Promise<T>

      Promise with the response data

    • Make a GET request

      Type Parameters

      • T

      Parameters

      • url: string

        The URL to make the request to

      • Optionalconfig: AxiosRequestConfig<any>

        Optional axios request configuration

      Returns Promise<T>

      Promise with the response data

    post

    • post<T>(
          url: string,
          data?: unknown,
          config?: AxiosRequestConfig<any>,
      ): Promise<T>

      Make a POST request

      Type Parameters

      • T

      Parameters

      • url: string

        The URL to make the request to

      • Optionaldata: unknown

        The data to send in the request body

      • Optionalconfig: AxiosRequestConfig<any>

        Optional axios request configuration

      Returns Promise<T>

      Promise with the response data

    • Make a PUT request

      Type Parameters

      • T

      Parameters

      • url: string

        The URL to make the request to

      • Optionaldata: any

        The data to send in the request body

      • Optionalconfig: AxiosRequestConfig<any>

        Optional axios request configuration

      Returns Promise<T>

      Promise with the response data

    • Manually trigger a token refresh

      Returns Promise<string>

      Promise The new access token