BexioApiClient.SalesOrderManagement (bexio_api_client v2.0.0)

Copy Markdown

Bexio API for the sales order management part of the API.

Summary

Functions

Accept a quote.

Cancel an invoice.

Create a delivery from an order.

Create an invoice (id in order will be ignored). Be also aware: whether you need or must not send a document number depends on the settings in Bexio. It cannot be controlled by the API and as such will just send if it exists.

Create an invoice from an order.

Create an invoice from a quote.

Create a payment for an invoice.

Create a reminder for an invoice.

Create an order (id in order will be ignored). Be also aware: whether you need or must not send a document number depends on the settings in Bexio. It cannot be controlled by the API and as such will just send if it exists.

Create an order from a quote.

Create a quote (id in order will be ignored). Be also aware: whether you need or must not send a document number depends on the settings in Bexio. It cannot be controlled by the API and as such will just send if it exists.

Decline a quote.

Delete an invoice.

Delete a payment of an invoice.

Delete an order.

Delete the repetition of an order.

Delete a quote.

Edit an invoice.

Edit an order.

Edit the repetition of an order.

Edit a quote.

This action fetches a single comment.

This action fetches a list of comments.

This action fetches a single default position for a document.

This action fetches a list of all default positions for a document.

This action fetches a list of all deliveries.

This action fetches a single delivery

This action fetches a single discount position for a document.

This action fetches a list of all discount positions for a document.

Fetch a list of document settings

This action fetches a single invoice

This action fetches a single payment of an invoice.

This action fetches a list of all payments for an invoice.

This action fetches a single reminder of an invoice.

This action fetches a list of all reminders for an invoice.

This action fetches a list of all invoices.

This action fetches a single item position for a document.

This action fetches a list of all item positions for a document.

This action fetches a single order

This action fetches the repetition of an order.

This action fetches a list of all orders.

This action fetches a single pagebreak position for a document.

This action fetches a list of all pagebreak positions for a document.

This action fetches a single quote

This action fetches a list of all quotes.

This action fetches a single subposition position for a document.

This action fetches a list of all subposition positions for a document.

This action fetches a single subtotal position for a document.

This action fetches a list of all subtotal positions for a document.

This action fetches a single text position for a document.

This action fetches a list of all text positions for a document.

This action returns a pdf document of the quote

This action returns a pdf document of the reminder of an invoice.

Issues a delivery (only possible if it's in draft status!). The result whether the issue was successful or not

Issue an invoice.

Issue a quote.

Mark an invoice as sent.

Mark a reminder of an invoice as sent.

Mark a reminder of an invoice as unsent.

Mark a quote as sent.

This action returns a pdf document of the order

This action returns a pdf document of the quote

Reissue a quote.

Revert Issue an invoice.

Revert Issue a quote.

Search the reminders of an invoice via query. The following search fields are supported

Search invoices via query. The following search fields are supported

Search orders via query. The following search fields are supported

Search quotes via query. The following search fields are supported

Types

api_error_type()

@type api_error_type() :: BexioApiClient.Helpers.api_error_type()

Functions

accept_quote(req, id)

@spec accept_quote(req :: Req.Request.t(), id :: non_neg_integer()) ::
  {:ok, boolean()} | api_error_type()

Accept a quote.

cancel_invoice(req, id)

@spec cancel_invoice(req :: Req.Request.t(), id :: non_neg_integer()) ::
  {:ok, boolean()} | api_error_type()

Cancel an invoice.

copy_invoice(req, invoice_id, contact_id, opts \\ [])

@spec copy_invoice(
  req :: Req.Request.t(),
  invoice_id :: pos_integer(),
  contact_id :: integer() | nil,
  opts :: [
    contact_sub_id: integer() | nil,
    is_valid_from: Date.t() | nil,
    title: String.t() | nil
  ]
) :: {:ok, BexioApiClient.SalesOrderManagement.Invoice.t()} | api_error_type()

Copy an invoice.

copy_quote(req, quote_id, contact_id, opts \\ [])

@spec copy_quote(
  req :: Req.Request.t(),
  quote_id :: pos_integer(),
  contact_id :: integer() | nil,
  opts :: [
    contact_sub_id: integer() | nil,
    is_valid_from: Date.t() | nil,
    pr_project_id: integer() | nil,
    title: String.t() | nil
  ]
) :: {:ok, BexioApiClient.SalesOrderManagement.Quote.t()} | api_error_type()

Copy a quote.

create_comment(req, document_type, document_id, comment)

@spec create_comment(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  comment :: BexioApiClient.SalesOrderManagement.Comment.t()
) :: {:ok, BexioApiClient.SalesOrderManagement.Comment.t()} | api_error_type()

Create a comment

create_default_position(req, document_type, document_id, position)

@spec create_default_position(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  position :: BexioApiClient.SalesOrderManagement.PositionDefault.t()
) ::
  {:ok, BexioApiClient.SalesOrderManagement.PositionDefault.t()}
  | api_error_type()

Create a default position

create_delivery_from_order(req, order_id)

@spec create_delivery_from_order(req :: Req.Request.t(), order_id :: pos_integer()) ::
  {:ok, BexioApiClient.SalesOrderManagement.Delivery.t()} | api_error_type()

Create a delivery from an order.

create_discount_position(req, document_type, document_id, position)

@spec create_discount_position(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  position :: BexioApiClient.SalesOrderManagement.PositionDiscount.t()
) ::
  {:ok, BexioApiClient.SalesOrderManagement.PositionDiscount.t()}
  | api_error_type()

Create a discount position

create_invoice(req, invoice)

Create an invoice (id in order will be ignored). Be also aware: whether you need or must not send a document number depends on the settings in Bexio. It cannot be controlled by the API and as such will just send if it exists.

create_invoice_from_order(req, order_id)

@spec create_invoice_from_order(req :: Req.Request.t(), order_id :: pos_integer()) ::
  {:ok, BexioApiClient.SalesOrderManagement.Invoice.t()} | api_error_type()

Create an invoice from an order.

create_invoice_from_quote(req, quote_id)

@spec create_invoice_from_quote(req :: Req.Request.t(), quote_id :: pos_integer()) ::
  {:ok, BexioApiClient.SalesOrderManagement.Invoice.t()} | api_error_type()

Create an invoice from a quote.

create_invoice_payment(req, invoice_id, payment)

@spec create_invoice_payment(
  req :: Req.Request.t(),
  invoice_id :: pos_integer(),
  payment :: BexioApiClient.SalesOrderManagement.Payment.t()
) :: {:ok, BexioApiClient.SalesOrderManagement.Payment.t()} | api_error_type()

Create a payment for an invoice.

create_invoice_reminder(req, invoice_id)

@spec create_invoice_reminder(req :: Req.Request.t(), invoice_id :: pos_integer()) ::
  {:ok, BexioApiClient.SalesOrderManagement.Reminder.t()} | api_error_type()

Create a reminder for an invoice.

create_item_position(req, document_type, document_id, position)

@spec create_item_position(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  position :: BexioApiClient.SalesOrderManagement.PositionItem.t()
) ::
  {:ok, BexioApiClient.SalesOrderManagement.PositionItem.t()} | api_error_type()

Create an item position

create_order(req, order)

Create an order (id in order will be ignored). Be also aware: whether you need or must not send a document number depends on the settings in Bexio. It cannot be controlled by the API and as such will just send if it exists.

create_order_from_quote(req, quote_id)

@spec create_order_from_quote(req :: Req.Request.t(), quote_id :: pos_integer()) ::
  {:ok, BexioApiClient.SalesOrderManagement.Order.t()} | api_error_type()

Create an order from a quote.

create_pagebreak_position(req, document_type, document_id)

@spec create_pagebreak_position(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer()
) ::
  {:ok, BexioApiClient.SalesOrderManagement.PositionPagebreak.t()}
  | api_error_type()

Create a pagebreak position

create_quote(req, offer)

Create a quote (id in order will be ignored). Be also aware: whether you need or must not send a document number depends on the settings in Bexio. It cannot be controlled by the API and as such will just send if it exists.

create_subposition_position(req, document_type, document_id, text, show_pos_nr?)

@spec create_subposition_position(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  text :: String.t(),
  show_pos_nr? :: boolean()
) ::
  {:ok, BexioApiClient.SalesOrderManagement.PositionSubposition.t()}
  | api_error_type()

Create a subposition position

create_subtotal_position(req, document_type, document_id, text)

@spec create_subtotal_position(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  text :: String.t()
) ::
  {:ok, BexioApiClient.SalesOrderManagement.PositionSubtotal.t()}
  | api_error_type()

Create a subtotal position.

create_text_position(req, document_type, document_id, text, show_pos_nr?)

@spec create_text_position(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  text :: String.t(),
  show_pos_nr? :: boolean()
) ::
  {:ok, BexioApiClient.SalesOrderManagement.PositionText.t()} | api_error_type()

Create a text position

decline_quote(req, id)

@spec decline_quote(req :: Req.Request.t(), id :: non_neg_integer()) ::
  {:ok, boolean()} | api_error_type()

Decline a quote.

delete_default_position(req, document_type, document_id, id)

@spec delete_default_position(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  id :: non_neg_integer()
) :: {:ok, boolean()} | api_error_type()

Delete a default position.

delete_discount_position(req, document_type, document_id, id)

@spec delete_discount_position(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  id :: non_neg_integer()
) :: {:ok, boolean()} | api_error_type()

Delete a discount position.

delete_invoice(req, id)

@spec delete_invoice(req :: Req.Request.t(), id :: non_neg_integer()) ::
  {:ok, boolean()} | api_error_type()

Delete an invoice.

delete_invoice_payment(req, invoice_id, payment_id)

@spec delete_invoice_payment(
  req :: Req.Request.t(),
  invoice_id :: pos_integer(),
  payment_id :: pos_integer()
) :: {:ok, boolean()} | api_error_type()

Delete a payment of an invoice.

delete_invoice_reminder(req, invoice_id, reminder_id)

@spec delete_invoice_reminder(
  req :: Req.Request.t(),
  invoice_id :: pos_integer(),
  reminder_id :: pos_integer()
) :: {:ok, boolean()} | api_error_type()

Delete a reminder of an invoice.

delete_item_position(req, document_type, document_id, id)

@spec delete_item_position(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  id :: non_neg_integer()
) :: {:ok, boolean()} | api_error_type()

Delete a default position.

delete_order(req, id)

@spec delete_order(req :: Req.Request.t(), id :: non_neg_integer()) ::
  {:ok, boolean()} | api_error_type()

Delete an order.

delete_order_repetition(req, order_id)

@spec delete_order_repetition(req :: Req.Request.t(), order_id :: pos_integer()) ::
  {:ok, boolean()} | api_error_type()

Delete the repetition of an order.

delete_pagebreak_position(req, document_type, document_id, id)

@spec delete_pagebreak_position(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  id :: non_neg_integer()
) :: {:ok, boolean()} | api_error_type()

Delete a pagebreak position.

delete_quote(req, id)

@spec delete_quote(req :: Req.Request.t(), id :: non_neg_integer()) ::
  {:ok, boolean()} | api_error_type()

Delete a quote.

delete_subposition_position(req, document_type, document_id, id)

@spec delete_subposition_position(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  id :: non_neg_integer()
) :: {:ok, boolean()} | api_error_type()

Delete a subposition position.

delete_subtotal_position(req, document_type, document_id, id)

@spec delete_subtotal_position(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  id :: non_neg_integer()
) :: {:ok, boolean()} | api_error_type()

Delete a subtotal position.

delete_text_position(req, document_type, document_id, id)

@spec delete_text_position(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  id :: non_neg_integer()
) :: {:ok, boolean()} | api_error_type()

Delete a text position.

edit_default_position(req, document_type, document_id, position)

@spec edit_default_position(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  position :: BexioApiClient.SalesOrderManagement.PositionDefault.t()
) ::
  {:ok, BexioApiClient.SalesOrderManagement.PositionDefault.t()}
  | api_error_type()

Edit a default position.

edit_discount_position(req, document_type, document_id, position)

@spec edit_discount_position(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  position :: BexioApiClient.SalesOrderManagement.PositionDiscount.t()
) ::
  {:ok, BexioApiClient.SalesOrderManagement.PositionDiscount.t()}
  | api_error_type()

Edit a discount position.

edit_invoice(req, invoice)

Edit an invoice.

edit_item_position(req, document_type, document_id, position)

@spec edit_item_position(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  position :: BexioApiClient.SalesOrderManagement.PositionItem.t()
) ::
  {:ok, BexioApiClient.SalesOrderManagement.PositionItem.t()} | api_error_type()

Edit an item.

edit_order(req, order)

Edit an order.

edit_order_repetition(req, order_id, repetition)

Edit the repetition of an order.

edit_pagebreak_position(req, document_type, document_id, position_id, pagebreak)

@spec edit_pagebreak_position(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  position_id :: pos_integer(),
  pagebreak :: boolean()
) ::
  {:ok, BexioApiClient.SalesOrderManagement.PositionPagebreak.t()}
  | api_error_type()

Edit a pagebreak position.

edit_quote(req, offer)

Edit a quote.

edit_subposition_position(req, document_type, document_id, position_id, text, show_pos_nr?)

@spec edit_subposition_position(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  position_id :: pos_integer(),
  text :: String.t(),
  show_pos_nr? :: boolean()
) ::
  {:ok, BexioApiClient.SalesOrderManagement.PositionSubposition.t()}
  | api_error_type()

Edit a subposition position.

edit_subtotal_position(req, document_type, document_id, position_id, text)

@spec edit_subtotal_position(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  position_id :: pos_integer(),
  text :: String.t()
) ::
  {:ok, BexioApiClient.SalesOrderManagement.PositionSubtotal.t()}
  | api_error_type()

Edit a subtotal position.

edit_text_position(req, document_type, document_id, position_id, text, show_pos_nr?)

@spec edit_text_position(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  position_id :: pos_integer(),
  text :: String.t(),
  show_pos_nr? :: boolean()
) ::
  {:ok, BexioApiClient.SalesOrderManagement.PositionText.t()} | api_error_type()

Edit a text position.

fetch_comment(req, document_type, document_id, comment_id)

@spec fetch_comment(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  comment_id :: pos_integer()
) :: {:ok, BexioApiClient.SalesOrderManagement.Comment.t()} | api_error_type()

This action fetches a single comment.

fetch_comments(req, document_type, document_id, opts \\ [])

@spec fetch_comments(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  opts :: [BexioApiClient.GlobalArguments.offset_without_order_by_arg()]
) :: {:ok, [BexioApiClient.SalesOrderManagement.Comment.t()]} | api_error_type()

This action fetches a list of comments.

fetch_default_position(req, document_type, document_id, position_id)

@spec fetch_default_position(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  position_id :: pos_integer()
) ::
  {:ok, BexioApiClient.SalesOrderManagement.PositionDefault.t()}
  | api_error_type()

This action fetches a single default position for a document.

fetch_default_positions(req, document_type, document_id, opts \\ [])

@spec fetch_default_positions(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  opts :: [BexioApiClient.GlobalArguments.offset_without_order_by_arg()]
) ::
  {:ok, [BexioApiClient.SalesOrderManagement.PositionDefault.t()]}
  | api_error_type()

This action fetches a list of all default positions for a document.

fetch_deliveries(req, opts \\ [])

This action fetches a list of all deliveries.

fetch_delivery(req, delivery_id)

@spec fetch_delivery(req :: Req.Request.t(), delivery_id :: pos_integer()) ::
  {:ok, BexioApiClient.SalesOrderManagement.Delivery.t()} | api_error_type()

This action fetches a single delivery

fetch_discount_position(req, document_type, document_id, position_id)

@spec fetch_discount_position(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  position_id :: pos_integer()
) ::
  {:ok, BexioApiClient.SalesOrderManagement.PositionDiscount.t()}
  | api_error_type()

This action fetches a single discount position for a document.

fetch_discount_positions(req, document_type, document_id, opts \\ [])

@spec fetch_discount_positions(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  opts :: [BexioApiClient.GlobalArguments.offset_without_order_by_arg()]
) ::
  {:ok, [BexioApiClient.SalesOrderManagement.PositionDiscount.t()]}
  | api_error_type()

This action fetches a list of all discount positions for a document.

fetch_document_settings(req, opts \\ [])

Fetch a list of document settings

fetch_invoice(req, invoice_id)

@spec fetch_invoice(req :: Req.Request.t(), invoice_id :: pos_integer()) ::
  {:ok, BexioApiClient.SalesOrderManagement.Quote.t()} | api_error_type()

This action fetches a single invoice

fetch_invoice_payment(req, invoice_id, payment_id)

@spec fetch_invoice_payment(
  req :: Req.Request.t(),
  invoice_id :: pos_integer(),
  payment_id :: pos_integer()
) :: {:ok, BexioApiClient.SalesOrderManagement.Payment.t()} | api_error_type()

This action fetches a single payment of an invoice.

fetch_invoice_payments(req, invoice_id, opts \\ [])

@spec fetch_invoice_payments(
  req :: Req.Request.t(),
  invoice_id :: pos_integer(),
  opts :: [BexioApiClient.GlobalArguments.offset_without_order_by_arg()]
) :: {:ok, [BexioApiClient.SalesOrderManagement.Payment.t()]} | api_error_type()

This action fetches a list of all payments for an invoice.

fetch_invoice_reminder(req, invoice_id, reminder_id)

@spec fetch_invoice_reminder(
  req :: Req.Request.t(),
  invoice_id :: pos_integer(),
  reminder_id :: pos_integer()
) :: {:ok, BexioApiClient.SalesOrderManagement.Reminder.t()} | api_error_type()

This action fetches a single reminder of an invoice.

fetch_invoice_reminders(req, invoice_id)

@spec fetch_invoice_reminders(req :: Req.Request.t(), invoice_id :: pos_integer()) ::
  {:ok, [BexioApiClient.SalesOrderManagement.Reminder.t()]} | api_error_type()

This action fetches a list of all reminders for an invoice.

fetch_invoices(req, opts \\ [])

This action fetches a list of all invoices.

fetch_item_position(req, document_type, document_id, position_id)

@spec fetch_item_position(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  position_id :: pos_integer()
) ::
  {:ok, BexioApiClient.SalesOrderManagement.PositionItem.t()} | api_error_type()

This action fetches a single item position for a document.

fetch_item_positions(req, document_type, document_id, opts \\ [])

@spec fetch_item_positions(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  opts :: [BexioApiClient.GlobalArguments.offset_without_order_by_arg()]
) ::
  {:ok, [BexioApiClient.SalesOrderManagement.PositionItem.t()]}
  | api_error_type()

This action fetches a list of all item positions for a document.

fetch_order(req, order_id)

@spec fetch_order(req :: Req.Request.t(), order_id :: pos_integer()) ::
  {:ok, BexioApiClient.SalesOrderManagement.Order.t()} | api_error_type()

This action fetches a single order

fetch_order_repetition(req, order_id)

@spec fetch_order_repetition(req :: Req.Request.t(), order_id :: pos_integer()) ::
  {:ok, BexioApiClient.SalesOrderManagement.OrderRepetition.t()}
  | api_error_type()

This action fetches the repetition of an order.

fetch_orders(req, opts \\ [])

This action fetches a list of all orders.

fetch_pagebreak_position(req, document_type, document_id, position_id)

@spec fetch_pagebreak_position(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  position_id :: pos_integer()
) ::
  {:ok, BexioApiClient.SalesOrderManagement.PositionPagebreak.t()}
  | api_error_type()

This action fetches a single pagebreak position for a document.

fetch_pagebreak_positions(req, document_type, document_id, opts \\ [])

@spec fetch_pagebreak_positions(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  opts :: [BexioApiClient.GlobalArguments.offset_without_order_by_arg()]
) ::
  {:ok, [BexioApiClient.SalesOrderManagement.PositionPagebreak.t()]}
  | api_error_type()

This action fetches a list of all pagebreak positions for a document.

fetch_quote(req, quote_id)

@spec fetch_quote(req :: Req.Request.t(), quote_id :: pos_integer()) ::
  {:ok, BexioApiClient.SalesOrderManagement.Quote.t()} | api_error_type()

This action fetches a single quote

fetch_quotes(req, opts \\ [])

This action fetches a list of all quotes.

fetch_subposition_position(req, document_type, document_id, position_id)

@spec fetch_subposition_position(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  position_id :: pos_integer()
) ::
  {:ok, BexioApiClient.SalesOrderManagement.PositionSubposition.t()}
  | api_error_type()

This action fetches a single subposition position for a document.

fetch_subposition_positions(req, document_type, document_id, opts \\ [])

@spec fetch_subposition_positions(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  opts :: [BexioApiClient.GlobalArguments.offset_without_order_by_arg()]
) ::
  {:ok, [BexioApiClient.SalesOrderManagement.PositionSubposition.t()]}
  | api_error_type()

This action fetches a list of all subposition positions for a document.

fetch_subtotal_position(req, document_type, document_id, position_id)

@spec fetch_subtotal_position(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  position_id :: pos_integer()
) ::
  {:ok, BexioApiClient.SalesOrderManagement.PositionSubtotal.t()}
  | api_error_type()

This action fetches a single subtotal position for a document.

fetch_subtotal_positions(req, document_type, document_id, opts \\ [])

@spec fetch_subtotal_positions(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  opts :: [BexioApiClient.GlobalArguments.offset_without_order_by_arg()]
) ::
  {:ok, [BexioApiClient.SalesOrderManagement.PositionSubtotal.t()]}
  | api_error_type()

This action fetches a list of all subtotal positions for a document.

fetch_text_position(req, document_type, document_id, position_id)

@spec fetch_text_position(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  position_id :: pos_integer()
) ::
  {:ok, BexioApiClient.SalesOrderManagement.PositionText.t()} | api_error_type()

This action fetches a single text position for a document.

fetch_text_positions(req, document_type, document_id, opts \\ [])

@spec fetch_text_positions(
  req :: Req.Request.t(),
  document_type :: :offer | :order | :invoice,
  document_id :: pos_integer(),
  opts :: [BexioApiClient.GlobalArguments.offset_without_order_by_arg()]
) ::
  {:ok, [BexioApiClient.SalesOrderManagement.PositionText.t()]}
  | api_error_type()

This action fetches a list of all text positions for a document.

invoice_pdf(req, invoice_id)

@spec invoice_pdf(req :: Req.Request.t(), invoice_id :: pos_integer()) ::
  {:ok, map()} | api_error_type()

This action returns a pdf document of the quote

invoice_reminder_pdf(req, invoice_id, reminder_id)

@spec invoice_reminder_pdf(
  req :: Req.Request.t(),
  invoice_id :: pos_integer(),
  reminder_id :: pos_integer()
) :: {:ok, map()} | api_error_type()

This action returns a pdf document of the reminder of an invoice.

issue_delivery(req, delivery_id)

@spec issue_delivery(req :: Req.Request.t(), delivery_id :: integer()) ::
  {:ok, boolean()} | api_error_type()

Issues a delivery (only possible if it's in draft status!). The result whether the issue was successful or not

issue_invoice(req, id)

@spec issue_invoice(req :: Req.Request.t(), id :: non_neg_integer()) ::
  {:ok, boolean()} | api_error_type()

Issue an invoice.

issue_quote(req, id)

@spec issue_quote(req :: Req.Request.t(), id :: non_neg_integer()) ::
  {:ok, boolean()} | api_error_type()

Issue a quote.

mark_invoice_as_sent(req, id)

@spec mark_invoice_as_sent(req :: Req.Request.t(), id :: non_neg_integer()) ::
  {:ok, boolean()} | api_error_type()

Mark an invoice as sent.

mark_invoice_reminder_as_sent(req, invoice_id, reminder_id)

@spec mark_invoice_reminder_as_sent(
  req :: Req.Request.t(),
  invoice_id :: pos_integer(),
  reminder_id :: pos_integer()
) :: {:ok, boolean()} | api_error_type()

Mark a reminder of an invoice as sent.

mark_invoice_reminder_as_unsent(req, invoice_id, reminder_id)

@spec mark_invoice_reminder_as_unsent(
  req :: Req.Request.t(),
  invoice_id :: pos_integer(),
  reminder_id :: pos_integer()
) :: {:ok, boolean()} | api_error_type()

Mark a reminder of an invoice as unsent.

mark_quote_as_sent(req, id)

@spec mark_quote_as_sent(req :: Req.Request.t(), id :: non_neg_integer()) ::
  {:ok, boolean()} | {:error, any()}

Mark a quote as sent.

order_pdf(req, order_id)

@spec order_pdf(req :: Req.Request.t(), order_id :: pos_integer()) ::
  {:ok, map()} | api_error_type()

This action returns a pdf document of the order

quote_pdf(req, quote_id)

@spec quote_pdf(req :: Req.Request.t(), quote_id :: pos_integer()) ::
  {:ok, map()} | api_error_type()

This action returns a pdf document of the quote

reissue_quote(req, id)

@spec reissue_quote(req :: Req.Request.t(), id :: non_neg_integer()) ::
  {:ok, boolean()} | api_error_type()

Reissue a quote.

revert_issue_invoice(req, id)

@spec revert_issue_invoice(req :: Req.Request.t(), id :: non_neg_integer()) ::
  {:ok, boolean()} | api_error_type()

Revert Issue an invoice.

revert_issue_quote(req, id)

@spec revert_issue_quote(req :: Req.Request.t(), id :: non_neg_integer()) ::
  {:ok, boolean()} | api_error_type()

Revert Issue a quote.

search_invoice_reminders(req, invoice_id, criteria)

@spec search_invoice_reminders(
  req :: Req.Request.t(),
  invoice_id :: pos_integer(),
  criteria :: [BexioApiClient.SearchCriteria.t()]
) ::
  {:ok, [BexioApiClient.SalesOrderManagement.Reminder.t()]} | api_error_type()

Search the reminders of an invoice via query. The following search fields are supported:

  • title
  • reminder_level
  • is_sent
  • is_valid_from
  • is_valid_to

search_invoices(req, criteria, opts \\ [])

Search invoices via query. The following search fields are supported:

  • id
  • kb_item_status
  • document_nr
  • title
  • contact_id
  • contact_sub_id
  • user_id
  • currency_id
  • total_gross
  • total_net
  • total
  • is_valid_from
  • is_valid_to
  • updated_at

search_orders(req, criteria, opts \\ [])

Search orders via query. The following search fields are supported:

  • id
  • kb_item_status
  • document_nr
  • title
  • contact_id
  • contact_sub_id
  • user_id
  • currency_id
  • total_gross
  • total_net
  • total
  • is_valid_from
  • updated_at

search_quotes(req, criteria, opts \\ [])

Search quotes via query. The following search fields are supported:

  • id
  • kb_item_status
  • document_nr
  • title
  • contact_id
  • contact_sub_id
  • user_id
  • currency_id
  • total_gross
  • total_net
  • total
  • is_valid_from
  • is_valid_until
  • is_valid_to (?)
  • updated_at

send_invoice(req, invoice_id, recipient_email, subject, message, opts \\ [])

@spec send_invoice(
  req :: Req.Request.t(),
  invoice_id :: pos_integer(),
  recipient_email :: String.t(),
  subject :: String.t(),
  message :: String.t(),
  opts :: [mark_as_open: boolean(), attach_pdf: boolean()]
) :: {:ok, boolean()} | api_error_type()

Send an invoice by email.

send_invoice_reminder(req, invoice_id, reminder_id, recipient_email, subject, message)

@spec send_invoice_reminder(
  req :: Req.Request.t(),
  invoice_id :: pos_integer(),
  reminder_id :: pos_integer(),
  recipient_email :: String.t(),
  subject :: String.t(),
  message :: String.t()
) :: {:ok, boolean()} | api_error_type()

Send a reminder of an invoice by email.

send_quote(req, quote_id, recipient_email, subject, message, opts \\ [])

@spec send_quote(
  req :: Req.Request.t(),
  quote_id :: pos_integer(),
  recipient_email :: String.t(),
  subject :: String.t(),
  message :: String.t(),
  opts :: [mark_as_open: boolean(), attach_pdf: boolean()]
) :: {:ok, boolean()} | api_error_type()

Send a quote by email.