BexioApiClient.SalesOrderManagement (bexio_api_client v0.7.0)

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

Link to this section Summary

Functions

Accept a quote.

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 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 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 an order.

Delete a quote.

Edit an invoice.

Edit 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 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 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

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 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 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

Link to this section Types

Link to this type

api_error_type()

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

Link to this section Functions

Link to this function

accept_quote(req, id)

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

Accept a quote.

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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.

Link to this function

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

Link to this function

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.

Link to this function

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

Link to this function

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.

Link to this function

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

Link to this function

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.

Link to this function

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

Link to this function

decline_quote(req, id)

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

Decline a quote.

Link to this function

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.

Link to this function

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.

Link to this function

delete_invoice(req, id)

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

Delete an invoice.

Link to this function

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.

Link to this function

delete_order(req, id)

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

Delete an order.

Link to this function

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.

Link to this function

delete_quote(req, id)

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

Delete a quote.

Link to this function

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.

Link to this function

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.

Link to this function

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.

Link to this function

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.

Link to this function

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.

Link to this function

edit_invoice(req, invoice)

Edit an invoice.

Link to this function

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.

Link to this function

edit_order(req, order)

Edit an order.

Link to this function

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.

Link to this function

edit_quote(req, offer)

Edit a quote.

Link to this function

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.

Link to this function

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.

Link to this function

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.

Link to this function

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.

Link to this function

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.

Link to this function

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.

Link to this function

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.

Link to this function

fetch_deliveries(req, opts \\ [])

This action fetches a list of all deliveries.

Link to this function

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

Link to this function

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.

Link to this function

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.

Link to this function

fetch_document_settings(req, opts \\ [])

Fetch a list of document settings

Link to this function

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

Link to this function

fetch_invoices(req, opts \\ [])

This action fetches a list of all invoices.

Link to this function

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.

Link to this function

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.

Link to this function

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

Link to this function

fetch_orders(req, opts \\ [])

This action fetches a list of all orders.

Link to this function

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.

Link to this function

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.

Link to this function

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

Link to this function

fetch_quotes(req, opts \\ [])

This action fetches a list of all quotes.

Link to this function

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.

Link to this function

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.

Link to this function

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.

Link to this function

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.

Link to this function

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.

Link to this function

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.

Link to this function

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

Link to this function

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

Link to this function

issue_invoice(req, id)

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

Issue an invoice.

Link to this function

issue_quote(req, id)

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

Issue a quote.

Link to this function

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.

Link to this function

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

Link to this function

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

Link to this function

reissue_quote(req, id)

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

Reissue a quote.

Link to this function

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.

Link to this function

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.

Link to this function

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
Link to this function

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
Link to this function

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