-
Notifications
You must be signed in to change notification settings - Fork 36
Customer Sale Create
Create a new customer sale.
-
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.
-
customer_id (required) INTEGER - The ID for the Beans_Customer this will belong to.
-
date_created (required) STRING - The date of the sale in YYYY-MM-DD format.
-
date_billed (optional) STRING - The bill date in YYYY-MM-DD for the sale; adding this will automatically convert it to an invoice.
-
date_due (optional) STRING - The due date in YYYY-MM-DD for the sale; adding this will automatically convert it to an invoice.
-
account_id (optional) INTEGER - The ID for the Accounts Receivable Beans_Account this sale will be tied to.
-
sent (optional) STRING - The sent status for the sale: "email", "phone", or "both".
-
sale_number (optional) STRING - A customer sale number to reference this sale. If none is created, it will auto-generate.
-
order_number (optional) STRING - An order number to help identify this sale.
-
po_number (optional) STRING - A purchase order number to help identify this sale.
-
quote_number (optional) STRING - A quote number to help identify this sale.
-
tax_exempt (optional) BOOLEAN - If set to true, all lines will be marked as tax_exempt.
-
tax_exempt_reason (optional) 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 (optional) INTEGER - The ID of the Beans_Customer_Address for billing this sale.
-
shipping_address_id (optional) INTEGER - The ID of the Beans_Customer_Address for shipping this sale.
-
lines (required) ARRAY - An array of objects representing line items for the sale.
-
description (required) STRING - The text for the line item.
-
amount (required) - DECIMAL The amount per unit.
-
quantity (required) - DECIMAL The number of units (up to three decimal places).
-
account_id (optional) INTEGER - The ID of the Beans_Account to count the sale towards ( in terms of revenue ).
-
tax_exempt (optional) BOOLEAN -
-
-
description (required) STRING - The text for the line item.
-
amount (required) - DECIMAL The amount per unit.
-
quantity (required) - DECIMAL The number of units (up to three decimal places).
-
account_id (optional) INTEGER - The ID of the Beans_Account to count the sale towards ( in terms of revenue ).
-
tax_exempt (optional) BOOLEAN -
-
taxes (optional) ARRAY - An array of objects representing taxes applicable to the sale.
- tax_id (required) - The ID of the Beans_Tax that should be applied.
-
tax_id (required) - The ID of the Beans_Tax that should be applied.
- sale OBJECT - The resulting Beans_Customer_Sale.