Create order
farmbrite_create_orderWRITE: create a sales order with line items (status defaults to Draft and payment_status to Due unless you set them; memo is internal, note is customer-facing). Farmbrite may email the customer or generate an invoice depending on the account's settings and the status chosen; the API reference does not say, so use Draft unless the user asks otherwise and only pass email when told to. Orders are entered as back-office orders (is_admin). Creating twice makes two orders. POST /orders.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| memo | No | Internal memo, not shown to the customer. | |
| note | No | A message for the CUSTOMER associated with the order (Farmbrite's customer-facing note). Only set it when the user wants the customer to read it; use memo for internal text. | |
| No | |||
| phone | No | ||
| status | No | Draft | |
| due_date | No | ||
| tax_rate | No | Tax rate in percent. | |
| last_name | No | ||
| contact_id | No | Existing contact id for the customer (a Farmbrite id string). | |
| first_name | No | ||
| order_date | No | ||
| order_items | Yes | Line items. | |
| payment_method | No | ||
| payment_status | No | Due | |
| delivery_amount | No | ||
| discount_amount | No |