API Documentation

Beans_Customer_Sale_Create

Create a new customer sale.


Parameters

auth_uid INTEGER The ID for your API key.
auth_key STRING The API key.
auth_expiration INTEGER Unique ID tied to your key; changes if you reset your key.
customer_id INTEGER The ID for the Beans_Customer this will belong to.
date_created STRING The date of the sale in YYYY-MM-DD format.
date_billed STRING The bill date in YYYY-MM-DD for the sale; adding this will automatically convert it to an invoice.
date_due STRING The due date in YYYY-MM-DD for the sale; adding this will automatically convert it to an invoice.
account_id INTEGER The ID for the Accounts Receivable Beans_Account this sale will be tied to.
sent STRING STRING The sent status for the sale: "email", "phone", or "both".
sale_number STRING A customer sale number to reference this sale. If none is created, it will auto-generate.
order_number STRING An order number to help identify this sale.
po_number STRING A purchase order number to help identify this sale.
quote_number STRING A quote number to help identify this sale.
tax_exempt BOOLEAN If set to true, all lines will be marked as tax_exempt.
tax_exempt_reason STRING An explanation for tax exemption. Required if tax_exempt is true. Will be set to NULL if tax_exempt is false.
billing_address_id INTEGER The ID of the Beans_Customer_Address for billing this sale.
shipping_address_id INTEGER The ID of the Beans_Customer_Address for shipping this sale.
lines ARRAY An array of objects representing line items for the sale.
description STRING The text for the line item.
amount DECIMAL The amount per unit.
quantity DECIMAL The number of units (up to three decimal places).
account_id INTEGER The ID of the Beans_Account to count the sale towards ( in terms of revenue ).
tax_exempt BOOLEAN
taxes ARRAY An array of objects representing taxes applicable to the sale.
tax_id The ID of the Beans_Tax that should be applied.

Returns

sale OBJECT The resulting Beans_Customer_Sale.