Skip to content

Customer Sale Search

Sean Callan edited this page Jun 9, 2020 · 1 revision

Beans_Customer_Sale_Search

Search for customer sales.


Parameters

  • auth_uid (required) INTEGER - The ID for your API key.

  • auth_key (required) STRING - The API key.

  • auth_expiration (required) INTEGER - Unique ID tied to your key; changes if you reset your key.

  • sort_by (optional) STRING - The sort pattern for the returned results: 'newest', 'oldest', 'duesoonest', 'duelatest'

  • page (optional) INTEGER - The page to return.

  • page_size (optional) INTEGER - The number of results on each page.

  • search_customer_id (optional) INTEGER - Limit the search to a specific Beans_Customer.

  • keywords (optional) STRING - A generic query string that will be compared to both users ( name, company name, phone number ) and sales ( total, Sale Number, Order Number, and PO Number ).

  • invoiced (optional) BOOLEAN - Whether or not the sale has been invoiced. Can be true or false.

  • sent (optional) BOOLEAN - Whether or not the sale has been sent in its current form. Can be true or false.

  • past_due (optional) BOOLEAN - Whether or not the sale is past due. Can be true or false.

  • has_balance (optional) BOOLEAN - Whether or not the sale has a balance. Can be true or false.

  • date_created_before (optional) STRING - Search sales created before a YYYY-MM-DD date.

  • date_created_after (optional) STRING - Search sales created after a YYYY-MM-DD date.

  • date_billed_before (optional) STRING - Search sales billed before a YYYY-MM-DD date.

  • date_billed_after (optional) STRING - Search sales billed after a YYYY-MM-DD date.


Returns

  • sales ARRAY - An array of Beans_Customer_Sale.

  • total_results INTEGER - Total number of results.

  • sort_by STRING - The sort method used in the returned results.

  • pages INTEGER - The total number of pages of results.

  • page INTEGER - The currently returned page index.

Clone this wiki locally