Orders

class py_veeqo.endpoints.orders.Orders(api_key: str | None = None)

Bases: PyVeeqo

This class implements all the orders api calls.

create_new_allocation(order_id: int, data: Dict = None, json: Dict[str, Any] | List[Any] | str | int | float | bool | None = None) Result

Allocate new stock to an order by passing information in either data or json format. https://developers.veeqo.com/docs#/reference/allocations/allocation-collection/create-a-new-allocation

Parameters:
  • order_id (int) – Veeqo unique order identifier.

  • data (Dict, optional) – Order data in dict format.

  • None. (Defaults to) –

  • json (Optional[JSONType], optional) – Order data in json format.

  • None.

Returns:

Result object containing status code, message and data.

Return type:

Result

create_new_order(data: Dict = None, json: Dict[str, Any] | List[Any] | str | int | float | bool | None = None) Result

Create a new order by passing information in either data or json format. https://developers.veeqo.com/docs#/reference/orders/order-collection/create-a-new-order

Parameters:
  • data (Dict, optional) – Order data in dict format.

  • None. (Defaults to) –

  • json (Optional[JSONType], optional) – Order data in json format.

  • None.

Returns:

Result object containing status code, message and data.

Return type:

Result

create_new_order_note(order_id: int, data: Dict = None, json: Dict[str, Any] | List[Any] | str | int | float | bool | None = None) Result

Create a new order note by passing information in either data or json format. https://developers.veeqo.com/docs#/reference/orders/order-notes/create-a-new-order-note

Parameters:
  • order_id (int) – Veeqo unique order identifier.

  • data (Dict, optional) – Order data in dict format.

  • None. (Defaults to) –

  • json (Optional[JSONType], optional) – Order data in json format.

  • None.

Returns:

Result object containing status code, message and data.

Return type:

Result

delete_allocation(order_id: int, allocation_id: int) Result

Delete a specific order allocation, specified by the unique Veeqo identifiers for the order and specific allocation. https://developers.veeqo.com/docs#/reference/allocations/allocation/delete

Parameters:
  • order_id (int) – Veeqo unique order identifier.

  • allocation_id (int) – Veeqo unique allocation identifier.

Returns:

Result object containing status code, message and data.

Return type:

Result

get_all_orders(since_id: int = None, created_at_min: str = None, updated_at_min: str = None, page_size: int = 12, page: int = 1, query: str = None, status: str = None, tags: str = None, allocated_at: int = None) Result

Get a list of all historical orders and their corresponding information. https://developers.veeqo.com/docs#/reference/orders/order-collection/list-all-orders

Parameters:
  • since_id (int, optional) – Return orders with id greater than this

  • None. (Defaults to) –

  • created_at_min (str, optional) – Return orders created after this

  • None.

  • updated_at_min (str, optional) – Return orders updated after this

  • None.

  • page_size (int, optional) – Number of orders per page. Defaults to 12.

  • page (int, optional) – Page number. Defaults to 1.

  • query (str, optional) – Search query. Defaults to None.

  • status (str, optional) – Order status. Defaults to None.

  • tags (str, optional) – Order tags. Defaults to None.

  • allocated_at (int, optional) – Return orders allocated at this time.

  • None.

Returns:

Result object containing status code, message and data.

Return type:

Result

get_order_detail(order_id: int) Result

Get order details for a specified order id. https://developers.veeqo.com/docs#/reference/orders/order/view-an-order-detail

Parameters:

order_id (str) – Unique Veeqo id number for a given order.

Returns:

Result object containing status code, message and data.

Return type:

Result

get_order_returns(order_id: int) Result

Show returns for a given order. https://developers.veeqo.com/docs#/reference/returns/returns/show-returns-on-order

Parameters:

order_id (str) – Unique Veeqo id number for a given order.

Returns:

Result object containing status code, message and data.

Return type:

Result

update_allocation_detail(order_id: int, allocation_id: int, data: Dict = None) Result

Update the details of an order allocation, specified by the unique Veeqo identifiers for the order and specific allocation. https://developers.veeqo.com/docs#/reference/allocations/allocation/update-allocation-detail :param order_id: Veeqo unique order identifier. :type order_id: int :param allocation_id: Veeqo unique allocation identifier. :type allocation_id: int :param data: Order data in dict format. :type data: Dict, optional :param Defaults to None.:

Returns:

Result object containing status code, message and data.

Return type:

Result

update_allocation_package(allocation_id: int, data: Dict = None, json: Dict[str, Any] | List[Any] | str | int | float | bool | None = None) Result

create a package for a specific sales-order allocation, specified by the unique Veeqo allocation_id. https://developers.veeqo.com/api/operations/update-allocation-package/

Parameters:
  • allocation_id (int) – Veeqo unique allocation identifier.

  • allocation_package – obj

Returns:

Result object containing status code, message and data of allocation_package details.

Return type:

Result

update_order_detail(order_id: int, data: Dict = None) Result

Update the details of an order, specified by it’s unique Veeqo identifier. https://developers.veeqo.com/docs#/reference/orders/order/update-order-detail

Parameters:
  • order_id (int) – Veeqo unique order identifier.

  • data (Dict, optional) – Order data in dict format.

  • None. (Defaults to) –

Returns:

Result object containing status code, message and data.

Return type:

Result