Infusionsoft.Endpoints.XML.Data (Infusionsoft v0.7.0) View Source

Provides the raw endpoints to Infusionsoft's XML API for Data actions.

Link to this section Summary

Functions

This function is not mapped to any Infusionsoft API endpoint. Instead, it is a helper to recurse on query_a_data_table/6 and get the full number of records instead of one page.

Link to this section Functions

Link to this function

count_records(table, query_data, token, app \\ nil)

View Source

Specs

count_records(String.t(), map(), String.t(), nil | String.t()) ::
  {:ok, integer()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#data-count-a-data-table-s-records

Link to this function

create_a_record(table, values, token, app \\ nil)

View Source

Specs

create_a_record(String.t(), map(), String.t(), nil | String.t()) ::
  {:ok, integer()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#data-create-a-record

Link to this function

create_custom_field(custom_field_type, display_name, data_type, header_id, token, app \\ nil)

View Source

Specs

create_custom_field(
  String.t(),
  String.t(),
  String.t(),
  integer(),
  String.t(),
  nil | String.t()
) :: {:ok, integer()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#data-create-a-custom-field

Link to this function

delete_a_record(table, id, token, app \\ nil)

View Source

Specs

delete_a_record(String.t(), integer(), String.t(), nil | String.t()) ::
  {:ok, boolean()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#data-delete-a-record

Link to this function

find_by_field(table, field_name, field_value, return_fields, token, app, opts \\ [])

View Source

Specs

find_by_field(
  String.t(),
  String.t(),
  String.t(),
  [String.t()],
  String.t(),
  nil | String.t(),
  keyword()
) :: {:ok, list()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#data-find-a-record-by-matching-a-specific-field

Available options: page - defaults to 0 limit - defaults to 1000

Link to this function

query_a_data_table(table, query_data, selected_fields, token, app, opts \\ [])

View Source

Specs

query_a_data_table(
  String.t(),
  map(),
  [String.t()],
  String.t(),
  nil | String.t(),
  keyword()
) :: {:ok, [map()]} | {:error, any()}

https://developer.infusionsoft.com/docs/xml-rpc/#data-query-a-data-table

Available options: page - defaults to 0 limit - defaults to 1000 order_by - defualts to Id ascending - defaults to false

Link to this function

query_all_from_table(table, query_data, fields, token, app, opts \\ [])

View Source

Specs

query_all_from_table(
  String.t(),
  map(),
  [String.t()],
  String.t(),
  nil | String.t(),
  keyword()
) :: {:ok, list()} | {:error, String.t()}

This function is not mapped to any Infusionsoft API endpoint. Instead, it is a helper to recurse on query_a_data_table/6 and get the full number of records instead of one page.

https://developer.infusionsoft.com/docs/xml-rpc/#data-query-a-data-table

Available options: order_by - defualts to Id ascending - defaults to false

Link to this function

retrieve_a_record(table, id, fields, token, app \\ nil)

View Source

Specs

retrieve_a_record(
  String.t(),
  integer(),
  [String.t()],
  String.t(),
  nil | String.t()
) :: {:ok, map()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#data-retrieve-a-record

Link to this function

retrieve_application_setting(module, setting, token, app \\ nil)

View Source

Specs

retrieve_application_setting(
  String.t(),
  String.t(),
  String.t(),
  nil | String.t()
) :: {:ok, String.t()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#data-retrieve-application-setting

Link to this function

retrieve_appointments_ical(appointment_id, token, app \\ nil)

View Source

Specs

retrieve_appointments_ical(integer(), String.t(), nil | String.t()) ::
  {:ok, String.t()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#data-retrieve-an-appointment-s-icalendar-file

Link to this function

update_a_custom_field(custom_field_id, values, token, app \\ nil)

View Source

Specs

update_a_custom_field(integer(), map(), String.t(), nil | String.t()) ::
  {:ok, boolean()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#data-update-a-custom-field

Link to this function

update_a_record(table, record_id, values, token, app \\ nil)

View Source

Specs

update_a_record(String.t(), integer(), map(), String.t(), nil | String.t()) ::
  {:ok, integer()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#data-update-a-record

Link to this function

validate_a_users_credentials(username, password_hash, token, app \\ nil)

View Source

Specs

validate_a_users_credentials(
  String.t(),
  String.t(),
  String.t(),
  nil | String.t()
) :: {:ok, integer() | String.t()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#data-validate-a-user-s-credentials