CatalogApi v0.0.1 CatalogApi View Source

Link to this section Summary

Functions

Places an order using the address and items in the cart. Deletes the cart if this request is successful. Returns an error if the order could not be placed

Unlocks a cart that has been unlocked via the cart_validate method

Validates the address and items in the cart. This is intended to be called just before placing an order to make sure that the order would not be rejected

Lists the orders placed by the user associated with the external_user_id

Provides tracking information for a specific order number. Provides information on the current status, as well as metadata around fulfillment

Link to this section Functions

Link to this function cart_add_item(socket_id, external_user_id, catalog_item_id, option_id, quantity) View Source
Link to this function cart_empty(socket_id, external_user_id) View Source
Link to this function cart_order_place(socket_id, external_user_id, cart_version \\ nil) View Source

Places an order using the address and items in the cart. Deletes the cart if this request is successful. Returns an error if the order could not be placed.

If the cart_version argument is supplied, this method will only succeed if the passed version matches the version of the current cart. This can be used to ensure that the state of the users cart in your application has not become stale before the order is placed.

Link to this function cart_remove_item(socket_id, external_user_id, catalog_item_id, option_id, quantity) View Source
Link to this function cart_set_address(socket_id, external_user_id, address_params) View Source
Link to this function cart_set_item_quantity(socket_id, external_user_id, catalog_item_id, option_id, quantity) View Source
Link to this function cart_unlock(socket_id, external_user_id) View Source

Unlocks a cart that has been unlocked via the cart_validate method.

Link to this function cart_validate(socket_id, external_user_id, locked \\ false) View Source

Validates the address and items in the cart. This is intended to be called just before placing an order to make sure that the order would not be rejected.

If the locked argument is supplied as true, then the cart will be locked. A locked cart cannot be modified and the address cannot be changed. This should be used before processing a credit card transaction so that users cannot change relevant information after the transaction has been finalized.

Link to this function cart_view(socket_id, external_user_id) View Source
Link to this function catalog_breakdown(socket_id, opts \\ %{}) View Source
Link to this function list_available_catalogs() View Source
Link to this function order_list(external_user_id, opts \\ []) View Source

Lists the orders placed by the user associated with the external_user_id.

Options that can be supplied:

  • per_page: Maximum number of results to be displayed per page. Defaults to

    1. Maximum of 50.
  • page: Page of results to return.
Link to this function order_track(order_number) View Source

Provides tracking information for a specific order number. Provides information on the current status, as well as metadata around fulfillment.

If the item is a gift card, then this method provides additional information around gift card redemption as well as other metadata.

Link to this function search_catalog(socket_id, opts \\ %{}) View Source
Link to this function view_item(socket_id, catalog_item_id) View Source