Download OpenAPI specification:Download
All endpoints covered in this document are preceded by https://{{domain}}/api/v2/
unless otherwise noted.
Available domains
app.leaflink.com
- production environment
www.sandbox.leaflink.com
- sandbox environment
www.leaflink-integrations.leaflink.com
- integrations sandbox environment
Learn more about sandbox environments
Request paths must end in a slash character ('/'). Those that do not will return a 400 (Bad Request) response.
Some of our API endpoints support dynamic responses. These are responses that vary in content and/or object level payload size according to request path or query parameters.
Available parameters are listed beneath endpoint definitions.
number | string (Number) non-empty |
short_id | string The Order No. displayed in the user interface |
external_id_seller | string or null (External id seller) non-empty Number assigned to the order by the seller company |
external_id_buyer | string or null (External id buyer) non-empty Number assigned to the order by the buyer company |
ext_acct_id | string or null (Accounting Service ID) <= 255 characters Accounting Service ID |
created_on | string <date-time> (Created on) Date and time the order was created |
user | string (User) username of the user who last edited the order |
buyer | integer or null (Buyer) Company on the buy side of the order. |
seller | integer (Seller) Company on the sell side of the order. |
object (Customer) Seller's customer record for the company on the buyer side of the order | |
brand | integer or null (Brand of Order) id of the brand for this order. Only applicable if the seller has the "Separate Orders by Brand" setting enabled. |
status | string (Status) Enum: "Draft" "Submitted" "Accepted" "Backorder" "Fulfilled" "Shipped" "Complete" "Rejected" "Combined" "Cancelled" Order status |
manual | boolean (Manual) Was the order manually created by the seller company? |
discount | number <decimal> Discount value applied to the order |
discount_type | string non-empty Type of discount: % or $ |
tax_amount | number <decimal> (Tax amount) Tax amount applied to the order |
tax_type | string (Tax type) non-empty Type of tax: % or $ |
final_tax | string Tax total for the order |
object | |
object | |
payment_term | string or null (Payment term) Payment term for the order Deprecated field, please use payment_option instead |
payment_methods | Array of strings or null (Payment methods) Payment methods for the order Deprecated field, please use payment_option instead |
selected_payment_option | any |
payment_due_date | string or null <date-time> (Payment Due Date) Date that the Payment is due |
paid | boolean (Is paid?) If this order has been paid for |
paid_date | string or null <date> (Paid date) Date the order was paid |
ship_date | string or null <date-time> (Ship date) Date and time the order was shipped |
shipping_details | string or null (Shipping details) non-empty Shipping details included on an order |
notes | string or null (Order Notes) <= 2000 characters Additional notes for an Order |
internal_notes | string or null (Order Notes) <= 2000 characters Internal notes for an Order |
delivery_preferences | string or null (Delivery Preferences) Customer Delivery Preferences |
Array of objects (LightCompanyStaff) Sales representatives associated with the order. | |
classification | string (Classification) non-empty Classification of the license-type associated to the order |
payment_balance | string (Payment balance) The outstanding balance on the order |
available_transitions | string (Available transitions) States that the order can transition to |
modified | string <date-time> (Modified) Date and time that the order was last modified |
has_special_requests | boolean (Has special requests) Does the order have special requests? |
delivery_provider | integer or null (Delivery provider) The company delivering this order. |
Array of objects (LightOrderTax) Details about the taxes applied to the order | |
object (Delivery info) | |
is_combination | string (Is combination) |
llf_payment_method | boolean |
credits | string Total dollar value of credits applied to the order |
facility_id | integer Facility ID related to an order |
order_number | string (Order number) non-empty Read only alias of number. |
order_seller_number | string (Order seller number) Read only alias of external_id_seller.If external_id_seller is missing, short_id will be provided. |
order_buyer_number | string (Order buyer number) Read only alias of external_id_buyer. If external_id_buyer is missing, short_id will be provided. |
order_short_number | string (Order short number) non-empty Read only alias of short_id. |
distributor | string (Distributor) id of the distributor delivering this order |
external_ids | object (ExternalIds) Set of key-value pairs for storing external system IDs. Key value can be up to 36 characters long. |
object (Corporate Address) Read only corporate address as provided during order creation. | |
object (Delivery Address) Read only delivery address as provided during order creation. |
{- "number": "aec108ac-a1f4-40fa-966e-a12ga9bf6e2f",
- "short_id": "a9bf6e2f",
- "external_id_seller": null,
- "external_id_buyer": null,
- "ext_acct_id": null,
- "created_on": "2020-06-10T15:15:03.776119-06:00",
- "user": "james.g",
- "buyer": 6109,
- "seller": 1,
- "customer": {
- "id": 148515,
- "display_name": "Good Vibrations Dispensary",
- "ext_acct_id": null,
- "delinquent": false
}, - "brand": null,
- "status": "Accepted",
- "manual": false,
- "discount": 0,
- "discount_type": "%",
- "tax_amount": 0,
- "tax_type": "%",
- "final_tax": "0.00",
- "shipping_charge": {
- "amount": 0,
- "currency": "USD"
}, - "total": {
- "amount": 594,
- "currency": "USD"
}, - "payment_term": "Net 7",
- "payment_methods": [
- "Cash",
- "Check"
], - "available_payment_options": [
- {
- "id": 216377,
- "is_default": true,
- "payment_program": "flexible",
- "payment_strategy": "reverse_factored",
- "payment_method": {
- "id": 4,
- "method": "ACH"
}, - "payment_term": {
- "id": 3,
- "term": "Net 15",
- "days": 15,
- "code": "net15"
}
}, - {
- "id": 216375,
- "is_default": false,
- "payment_program": null,
- "payment_strategy": null,
- "payment_method": {
- "id": 1,
- "method": "Cash"
}, - "payment_term": {
- "id": 20,
- "term": "COD",
- "days": null,
- "code": "cod"
}
}
], - "selected_payment_option": {
- "id": 1732313,
- "is_default": true,
- "payment_program": "flexible",
- "payment_strategy": "reverse_factored",
- "payment_method": {
- "id": 4,
- "method": "ACH"
}, - "payment_term": {
- "id": 3,
- "term": "Net 15",
- "days": 15,
- "code": "net15"
}
}, - "payment_due_date": null,
- "paid": false,
- "paid_date": null,
- "ship_date": null,
- "shipping_details": null,
- "notes": "",
- "internal_notes": null,
- "delivery_preferences": "Monday - Wednesday Only Please",
- "sales_reps": [
- {
- "id": 13,
- "user": "John Doe"
}
], - "classification": "Adult Use",
- "payment_balance": 594,
- "available_transitions": [
- "fulfilled",
- "rejected"
], - "modified": "2020-06-10T16:14:49.494713-06:00",
- "has_special_requests": false,
- "delivery_provider": null,
- "order_taxes": [ ],
- "delivery_info": null,
- "is_combination": false,
- "credits": "420.10",
- "facility_id": 123,
- "order_number": "aec108ac-a1f4-40fa-966e-a12ga9bf6e2f",
- "order_seller_number": "a9bf6e2f",
- "order_buyer_number": "a9bf6e2f",
- "order_short_number": "a9bf6e2f",
- "distributor": "",
- "external_ids": {
- "system-name": "45897"
}, - "corporate_address": {
- "address": "17034 Highway 10",
- "city": "Moffat",
- "state": "CO",
- "unit_number": "1A",
- "zipcode": "81143"
}, - "delivery_address": {
- "address": "17034 Highway 17",
- "city": "Moffat",
- "state": "CO",
- "unit_number": "1A",
- "zipcode": "81143"
}
}
List received orders for all active companies where the user has the Manage Orders Received permission.
Per company via /companies/{company_id}/orders-received/
fields_include | string Include only specific fields in the response, separated by commas. |
fields_exclude | string Exclude specific fields in the response, separated by commas. |
fields_add | string Include additional fields in the response. Available values include |
include_children | string Include additional fields in the response. Available values include |
seller__slug__iexact | string Filter results the company slug on the seller side of the order. Case-insensitive exact match. |
modified__gte | string Filter by the modified date, greater than or equal to |
modified__lte | string Filter by the modified date, less than or equal to |
modified__gt | string Filter by the modified date, greater than |
modified__lt | string Filter by the modified date, less than |
external_id_seller | string Filter by the number assigned to the order by the seller company |
external_id_seller__icontains | string Filter by the number assigned to the order by the seller company. Case-insensitive containment match: returns orders that contain the string |
created_on__gte | string Filter by the created_on date, greater than or equal to |
created_on__lte | string Filter by the created_on date, less than or equal to |
created_on__gt | string Filter by the created_on date, greater than |
created_on__lt | string Filter by the created_on date, less than |
order_id | string Filter by the external_id_seller or the number |
number | string Filter by the unique order number generated by LeafLink. |
status | string Enum: "draft" "submitted" "accepted" "backorder" "fulfilled" "shipped" "complete" "rejected" "combined" "cancelled" Filter by status. Multiple statuses can be submitted as comma-separated list. Case Insensitive. |
status__not | string Enum: "draft" "submitted" "accepted" "backorder" "fulfilled" "shipped" "complete" "rejected" "combined" "cancelled" Exclude by order status. Multiple statuses can be submitted as a comma-separated list. Case Insensitive. |
brand | number Filter by brand id |
brand__in | number Filter by multiple brand ids, separated by commas |
buyer | string Filter by the id of the company on the buyer side of the order |
paid | string Filter by paid status |
customer | string Filter by the customer name or nickname for the company on the buyer side of the order |
sales_rep | number Filter by the user id of the sales rep assigned to an order. This is the id field on the company-staff object. |
classification | string Filter by the classification of the license-type associated to the order |
user | string Filter by the username, first name, or last name of the last person who edited the order |
connected_to_metrc | string Filter by whether or not they have metrc packages associated with their line items |
manual | string Filter by whether or not orders were manually created by the company on the seller side of the order |
company_slug | string Filter by the slug of seller company |
service_zone | number Filter Orders by service zone of customers |
limit | integer Number of results to return per page. |
offset | integer The initial index from which to return the results. |
external_id_key | string Filter for orders that match external_ids key:values. Must be used with external_id_values. |
external_id_values | string Filter for orders that match external_ids key:values. Multiple values separated by a comma. Must be used with external_id_key. |
{- "count": 2,
- "next": null,
- "previous": null,
- "results": [
- {
- "number": "aec108ac-a1f4-40fa-966e-a12ga9bf6e2f",
- "short_id": "a9bf6e2f",
- "external_id_seller": null,
- "external_id_buyer": null,
- "ext_acct_id": null,
- "created_on": "2020-06-10T15:15:03.776119-06:00",
- "user": "james.g",
- "buyer": 6109,
- "seller": 1,
- "customer": {
- "id": 148515,
- "display_name": "Good Vibrations Dispensary",
- "ext_acct_id": null,
- "delinquent": false
}, - "brand": null,
- "status": "Accepted",
- "manual": false,
- "discount": 0,
- "discount_type": "%",
- "tax_amount": 0,
- "tax_type": "%",
- "final_tax": "0.00",
- "shipping_charge": {
- "amount": 0,
- "currency": "USD"
}, - "total": {
- "amount": 594,
- "currency": "USD"
}, - "payment_term": "Net 7",
- "payment_methods": [
- "Cash",
- "ACH"
], - "available_payment_options": [
- {
- "id": 216377,
- "is_default": true,
- "payment_program": "flexible",
- "payment_strategy": "reverse_factored",
- "payment_method": {
- "id": 4,
- "method": "ACH"
}, - "payment_term": {
- "id": 3,
- "term": "Net 15",
- "days": 15,
- "code": "net15"
}
}, - {
- "id": 216375,
- "is_default": false,
- "payment_program": null,
- "payment_strategy": null,
- "payment_method": {
- "id": 1,
- "method": "Cash"
}, - "payment_term": {
- "id": 20,
- "term": "COD",
- "days": null,
- "code": "cod"
}
}
], - "selected_payment_option": {
- "id": 1732313,
- "is_default": true,
- "payment_program": "flexible",
- "payment_strategy": "reverse_factored",
- "payment_method": {
- "id": 4,
- "method": "ACH"
}, - "payment_term": {
- "id": 3,
- "term": "Net 15",
- "days": 15,
- "code": "net15"
}
}, - "payment_due_date": null,
- "paid": false,
- "paid_date": null,
- "ship_date": null,
- "shipping_details": null,
- "notes": "",
- "internal_notes": null,
- "delivery_preferences": "Monday - Wednesday Only Please",
- "sales_reps": [
- {
- "id": 13,
- "user": "John Doe"
}
], - "classification": "Adult Use",
- "payment_balance": 594,
- "available_transitions": [
- "fulfilled",
- "rejected"
], - "modified": "2020-06-10T16:14:49.494713-06:00",
- "has_special_requests": false,
- "delivery_provider": null,
- "order_taxes": [ ],
- "delivery_info": null,
- "is_combination": false,
- "credits": "0.00",
- "facility_id": 123,
- "order_number": "aec108ac-a1f4-40fa-966e-a12ga9bf6e2f",
- "order_seller_number": "a9bf6e2f",
- "order_buyer_number": "a9bf6e2f",
- "order_short_number": "a9bf6e2f",
- "distributor": "",
- "external_ids": {
- "system-name": "45897"
}, - "corporate_address": {
- "address": "17034 Highway 10",
- "city": "Moffat",
- "state": "CO",
- "unit_number": "1A",
- "zipcode": "81143"
}, - "delivery_address": {
- "address": "17034 Highway 17",
- "city": "Moffat",
- "state": "CO",
- "unit_number": "1A",
- "zipcode": "81143"
}
}, - {
- "number": "4165a155-979b-4e6e-b3a5-8ef917ce9491",
- "short_id": "17ce9491",
- "external_id_seller": null,
- "external_id_buyer": null,
- "ext_acct_id": null,
- "created_on": "2020-06-10T13:34:10.663097-06:00",
- "user": "scooter.s",
- "buyer": 3109,
- "seller": 1,
- "customer": {
- "id": 26032,
- "display_name": "New Leaf",
- "ext_acct_id": null,
- "delinquent": false
}, - "brand": null,
- "status": "Accepted",
- "manual": true,
- "discount": 0,
- "discount_type": "%",
- "tax_amount": 0,
- "tax_type": "%",
- "final_tax": "0.00",
- "shipping_charge": {
- "amount": 0,
- "currency": "USD"
}, - "total": {
- "amount": 210.4,
- "currency": "USD"
}, - "payment_term": "COD",
- "payment_methods": [
- "Wire Transfer"
], - "payment_due_date": null,
- "paid": false,
- "paid_date": null,
- "ship_date": null,
- "shipping_details": null,
- "notes": "Mary can process on 6/15",
- "internal_notes": null,
- "delivery_preferences": "",
- "sales_reps": [
- {
- "id": 5659,
- "user": "Jane Doe"
}
], - "classification": "Adult Use",
- "payment_balance": 210.4,
- "available_transitions": [
- "fulfilled",
- "rejected"
], - "modified": "2020-06-10T16:04:40.312860-06:00",
- "has_special_requests": true,
- "delivery_provider": null,
- "order_taxes": [ ],
- "delivery_info": null,
- "is_combination": false,
- "credits": "45.01",
- "facility_id": 123,
- "order_number": "4165a155-979b-4e6e-b3a5-8ef917ce9491",
- "order_seller_number": "17ce9491",
- "order_buyer_number": "17ce9491",
- "order_short_number": "17ce9491",
- "distributor": "",
- "external_ids": { },
- "corporate_address": {
- "address": "Some Address 2",
- "city": "Moffat",
- "state": "CO",
- "unit_number": "1A",
- "zipcode": "81143"
}, - "delivery_address": {
- "address": "Some Address 1",
- "city": "Moffat",
- "state": "CO",
- "unit_number": "1A",
- "zipcode": "81143"
}
}
]
}
Create an Order. May create child LineItem objects in the same request.
WARNING - BETA FEATURE: This API is in active development and is subject to change.
seller required | integer Seller company for this order |
required | object (Customer) Seller's customer record for the company on the buyer side of the order |
status required | string Enum: "Draft" "Submitted" Order status |
required | Array of objects (Line Item) |
brand | integer Brand for this order. Only applicable if the seller has the "Separate Orders by Brand" setting enabled. |
external_id_seller | string Number assigned to the order by the seller company |
ext_acct_id | string External account id. |
discount | number <decimal> Discount value applied to the order |
discount_type | string (Discount type) non-empty Type of discount: % or $ |
tax_amount | number <decimal> (Tax amount) Tax amount applied to the order |
tax_type | string (Tax type) non-empty Type of tax: % or $ |
object | |
payment_term | string or null (Payment term) Payment term for the order |
payment_due_date | string or null <date-time> (Payment Due Date) Date that the Payment is due |
paid | boolean (Is paid?) If this order has been paid for |
paid_date | string or null <date> (Paid date) Date the order was paid |
ship_date | string or null <date-time> (Ship date) Date and time the order was shipped |
shipping_details | string or null (Shipping details) non-empty Shipping details included on an order |
notes | string or null (Order Notes) <= 2000 characters Additional notes for an Order |
internal_notes | string or null (Order Notes) <= 2000 characters Internal notes for an Order |
delivery_preferences | string or null (Delivery Preferences) Customer Delivery Preferences |
Array of objects (CompanyStaff) Sales representatives associated with the order. | |
delivery_provider | integer or null (Delivery provider) The company delivering this order. |
object (Delivery info) | |
facility_id | integer or null (Facility) The facility fulfilling this order. |
{- "external_id_seller": "INV-1092",
- "ext_acct_id": null,
- "seller": 1,
- "customer": {
- "id": 148515
}, - "line_items": [
- {
- "product": 2093,
- "quantity": 10,
- "notes": "Please include sample",
- "ordered_unit_price": {
- "amount": 108,
- "currency": "USD"
}, - "sale_price": {
- "amount": 99,
- "currency": "USD"
}
}
], - "status": "Draft",
- "discount": 0,
- "discount_type": "%",
- "tax_amount": 0,
- "tax_type": "%",
- "shipping_charge": {
- "amount": 0,
- "currency": "USD"
}, - "payment_term": "Net 7",
- "selected_payment_option": {
- "payment_method_id": 4,
- "payment_term_id": 3
}, - "delivery_preferences": "Monday - Wednesday Only Please",
- "sales_reps": [
- {
- "id": 13
}
], - "facility_id": 123
}
{- "number": "aec108ac-a1f4-40fa-966e-a12ga9bf6e2f",
- "short_id": "a9bf6e2f",
- "external_id_seller": null,
- "external_id_buyer": null,
- "ext_acct_id": null,
- "created_on": "2020-06-10T15:15:03.776119-06:00",
- "user": "james.g",
- "buyer": 6109,
- "seller": 1,
- "customer": {
- "id": 148515,
- "display_name": "Good Vibrations Dispensary",
- "ext_acct_id": null,
- "delinquent": false
}, - "brand": null,
- "status": "Accepted",
- "manual": false,
- "discount": 0,
- "discount_type": "%",
- "tax_amount": 0,
- "tax_type": "%",
- "final_tax": "0.00",
- "shipping_charge": {
- "amount": 0,
- "currency": "USD"
}, - "total": {
- "amount": 594,
- "currency": "USD"
}, - "payment_term": "Net 7",
- "payment_methods": [
- "Cash",
- "Check"
], - "available_payment_options": [
- {
- "id": 216377,
- "is_default": true,
- "payment_program": "flexible",
- "payment_strategy": "reverse_factored",
- "payment_method": {
- "id": 4,
- "method": "ACH"
}, - "payment_term": {
- "id": 3,
- "term": "Net 15",
- "days": 15,
- "code": "net15"
}
}, - {
- "id": 216375,
- "is_default": false,
- "payment_program": null,
- "payment_strategy": null,
- "payment_method": {
- "id": 1,
- "method": "Cash"
}, - "payment_term": {
- "id": 20,
- "term": "COD",
- "days": null,
- "code": "cod"
}
}
], - "selected_payment_option": {
- "id": 1732313,
- "is_default": true,
- "payment_program": "flexible",
- "payment_strategy": "reverse_factored",
- "payment_method": {
- "id": 4,
- "method": "ACH"
}, - "payment_term": {
- "id": 3,
- "term": "Net 15",
- "days": 15,
- "code": "net15"
}
}, - "payment_due_date": null,
- "paid": false,
- "paid_date": null,
- "ship_date": null,
- "shipping_details": null,
- "notes": "",
- "internal_notes": null,
- "delivery_preferences": "Monday - Wednesday Only Please",
- "sales_reps": [
- {
- "id": 13,
- "user": "John Doe"
}
], - "classification": "Adult Use",
- "payment_balance": 594,
- "available_transitions": [
- "fulfilled",
- "rejected"
], - "modified": "2020-06-10T16:14:49.494713-06:00",
- "has_special_requests": false,
- "delivery_provider": null,
- "order_taxes": [ ],
- "delivery_info": null,
- "is_combination": false,
- "credits": "420.10",
- "facility_id": 123,
- "order_number": "aec108ac-a1f4-40fa-966e-a12ga9bf6e2f",
- "order_seller_number": "a9bf6e2f",
- "order_buyer_number": "a9bf6e2f",
- "order_short_number": "a9bf6e2f",
- "distributor": "",
- "external_ids": {
- "system-name": "45897"
}, - "corporate_address": {
- "address": "17034 Highway 10",
- "city": "Moffat",
- "state": "CO",
- "unit_number": "1A",
- "zipcode": "81143"
}, - "delivery_address": {
- "address": "17034 Highway 17",
- "city": "Moffat",
- "state": "CO",
- "unit_number": "1A",
- "zipcode": "81143"
}
}
Retrieve an individual order.
number required | string <uuid> Order number |
fields_include | string Include only specific fields in the response, separated by commas. |
fields_exclude | string Exclude specific fields in the response, separated by commas. |
fields_add | string Include additional fields in the response. Available values include |
include_children | string Include additional fields in the response. Available values include |
{- "number": "aec108ac-a1f4-40fa-966e-a12ga9bf6e2f",
- "short_id": "a9bf6e2f",
- "external_id_seller": null,
- "external_id_buyer": null,
- "ext_acct_id": null,
- "created_on": "2020-06-10T15:15:03.776119-06:00",
- "user": "james.g",
- "buyer": 6109,
- "seller": 1,
- "customer": {
- "id": 148515,
- "display_name": "Good Vibrations Dispensary",
- "ext_acct_id": null,
- "delinquent": false
}, - "brand": null,
- "status": "Accepted",
- "manual": false,
- "discount": 0,
- "discount_type": "%",
- "tax_amount": 0,
- "tax_type": "%",
- "final_tax": "0.00",
- "shipping_charge": {
- "amount": 0,
- "currency": "USD"
}, - "total": {
- "amount": 594,
- "currency": "USD"
}, - "payment_term": "Net 7",
- "payment_methods": [
- "Cash",
- "Check"
], - "available_payment_options": [
- {
- "id": 216377,
- "is_default": true,
- "payment_program": "flexible",
- "payment_strategy": "reverse_factored",
- "payment_method": {
- "id": 4,
- "method": "ACH"
}, - "payment_term": {
- "id": 3,
- "term": "Net 15",
- "days": 15,
- "code": "net15"
}
}, - {
- "id": 216375,
- "is_default": false,
- "payment_program": null,
- "payment_strategy": null,
- "payment_method": {
- "id": 1,
- "method": "Cash"
}, - "payment_term": {
- "id": 20,
- "term": "COD",
- "days": null,
- "code": "cod"
}
}
], - "selected_payment_option": {
- "id": 1732313,
- "is_default": true,
- "payment_program": "flexible",
- "payment_strategy": "reverse_factored",
- "payment_method": {
- "id": 4,
- "method": "ACH"
}, - "payment_term": {
- "id": 3,
- "term": "Net 15",
- "days": 15,
- "code": "net15"
}
}, - "payment_due_date": null,
- "paid": false,
- "paid_date": null,
- "ship_date": null,
- "shipping_details": null,
- "notes": "",
- "internal_notes": null,
- "delivery_preferences": "Monday - Wednesday Only Please",
- "sales_reps": [
- {
- "id": 13,
- "user": "John Doe"
}
], - "classification": "Adult Use",
- "payment_balance": 594,
- "available_transitions": [
- "fulfilled",
- "rejected"
], - "modified": "2020-06-10T16:14:49.494713-06:00",
- "has_special_requests": false,
- "delivery_provider": null,
- "order_taxes": [ ],
- "delivery_info": null,
- "is_combination": false,
- "credits": "420.10",
- "facility_id": 123,
- "order_number": "aec108ac-a1f4-40fa-966e-a12ga9bf6e2f",
- "order_seller_number": "a9bf6e2f",
- "order_buyer_number": "a9bf6e2f",
- "order_short_number": "a9bf6e2f",
- "distributor": "",
- "external_ids": {
- "system-name": "45897"
}, - "corporate_address": {
- "address": "17034 Highway 10",
- "city": "Moffat",
- "state": "CO",
- "unit_number": "1A",
- "zipcode": "81143"
}, - "delivery_address": {
- "address": "17034 Highway 17",
- "city": "Moffat",
- "state": "CO",
- "unit_number": "1A",
- "zipcode": "81143"
}
}
Update an Order. May update child LineItem objects in the same request.
number required | string <uuid> Order number |
discount | number <decimal> Discount value applied to the order |
discount_type | string (Discount type) non-empty Type of discount: % or $ |
tax_amount | number <decimal> (Tax amount) Tax amount applied to the order |
tax_type | string (Tax type) non-empty Type of tax: % or $ |
object | |
payment_term | string or null (Payment term) Payment term for the order Deprecated field, please use payment_option instead |
object (Selected payment option) Payment option that was selected for an order | |
payment_due_date | string or null <date-time> (Payment Due Date) Date that the Payment is due |
paid | boolean (Is paid?) If this order has been paid for |
paid_date | string or null <date> (Paid date) Date the order was paid |
ship_date | string or null <date-time> (Ship date) Date and time the order was shipped |
shipping_details | string or null (Shipping details) non-empty Shipping details included on an order |
notes | string or null (Order Notes) <= 2000 characters Additional notes for an Order |
internal_notes | string or null (Order Notes) <= 2000 characters Internal notes for an Order |
delivery_preferences | string or null (Delivery Preferences) Customer Delivery Preferences |
classification | string (Classification) non-empty Classification of the license-type associated to the order |
delivery_provider | integer or null (Delivery provider) The company delivering this order. |
object (Delivery info) | |
external_ids | object (ExternalIds) Set of key-value pairs for storing external system IDs. Key value can be up to 36 characters long. |
{- "discount": 15,
- "discount_type": "$"
}
{- "number": "aec108ac-a1f4-40fa-966e-a12ga9bf6e2f",
- "short_id": "a9bf6e2f",
- "external_id_seller": null,
- "external_id_buyer": null,
- "ext_acct_id": null,
- "created_on": "2020-06-10T15:15:03.776119-06:00",
- "user": "james.g",
- "buyer": 6109,
- "seller": 1,
- "customer": {
- "id": 148515,
- "display_name": "Good Vibrations Dispensary",
- "ext_acct_id": null,
- "delinquent": false
}, - "brand": null,
- "status": "Accepted",
- "manual": false,
- "discount": 0,
- "discount_type": "%",
- "tax_amount": 0,
- "tax_type": "%",
- "final_tax": "0.00",
- "shipping_charge": {
- "amount": 0,
- "currency": "USD"
}, - "total": {
- "amount": 594,
- "currency": "USD"
}, - "payment_term": "Net 7",
- "payment_methods": [
- "Cash",
- "Check"
], - "available_payment_options": [
- {
- "id": 216377,
- "is_default": true,
- "payment_program": "flexible",
- "payment_strategy": "reverse_factored",
- "payment_method": {
- "id": 4,
- "method": "ACH"
}, - "payment_term": {
- "id": 3,
- "term": "Net 15",
- "days": 15,
- "code": "net15"
}
}, - {
- "id": 216375,
- "is_default": false,
- "payment_program": null,
- "payment_strategy": null,
- "payment_method": {
- "id": 1,
- "method": "Cash"
}, - "payment_term": {
- "id": 20,
- "term": "COD",
- "days": null,
- "code": "cod"
}
}
], - "selected_payment_option": {
- "id": 1732313,
- "is_default": true,
- "payment_program": "flexible",
- "payment_strategy": "reverse_factored",
- "payment_method": {
- "id": 4,
- "method": "ACH"
}, - "payment_term": {
- "id": 3,
- "term": "Net 15",
- "days": 15,
- "code": "net15"
}
}, - "payment_due_date": null,
- "paid": false,
- "paid_date": null,
- "ship_date": null,
- "shipping_details": null,
- "notes": "",
- "internal_notes": null,
- "delivery_preferences": "Monday - Wednesday Only Please",
- "sales_reps": [
- {
- "id": 13,
- "user": "John Doe"
}
], - "classification": "Adult Use",
- "payment_balance": 594,
- "available_transitions": [
- "fulfilled",
- "rejected"
], - "modified": "2020-06-10T16:14:49.494713-06:00",
- "has_special_requests": false,
- "delivery_provider": null,
- "order_taxes": [ ],
- "delivery_info": null,
- "is_combination": false,
- "credits": "420.10",
- "facility_id": 123,
- "order_number": "aec108ac-a1f4-40fa-966e-a12ga9bf6e2f",
- "order_seller_number": "a9bf6e2f",
- "order_buyer_number": "a9bf6e2f",
- "order_short_number": "a9bf6e2f",
- "distributor": "",
- "external_ids": {
- "system-name": "45897"
}, - "corporate_address": {
- "address": "17034 Highway 10",
- "city": "Moffat",
- "state": "CO",
- "unit_number": "1A",
- "zipcode": "81143"
}, - "delivery_address": {
- "address": "17034 Highway 17",
- "city": "Moffat",
- "state": "CO",
- "unit_number": "1A",
- "zipcode": "81143"
}
}
Perform an order transition action.
number required | string Order number |
action required | string Order transition action. Available values include |
{- "number": "aec108ac-a1f4-40fa-966e-a12ga9bf6e2f",
- "short_id": "a9bf6e2f",
- "external_id_seller": null,
- "external_id_buyer": null,
- "ext_acct_id": null,
- "created_on": "2020-06-10T15:15:03.776119-06:00",
- "user": "james.g",
- "buyer": 6109,
- "seller": 1,
- "customer": {
- "id": 148515,
- "display_name": "Good Vibrations Dispensary",
- "ext_acct_id": null,
- "delinquent": false
}, - "brand": null,
- "status": "Accepted",
- "manual": false,
- "discount": 0,
- "discount_type": "%",
- "tax_amount": 0,
- "tax_type": "%",
- "final_tax": "0.00",
- "shipping_charge": {
- "amount": 0,
- "currency": "USD"
}, - "total": {
- "amount": 594,
- "currency": "USD"
}, - "payment_term": "Net 7",
- "payment_methods": [
- "Cash",
- "Check"
], - "available_payment_options": [
- {
- "id": 216377,
- "is_default": true,
- "payment_program": "flexible",
- "payment_strategy": "reverse_factored",
- "payment_method": {
- "id": 4,
- "method": "ACH"
}, - "payment_term": {
- "id": 3,
- "term": "Net 15",
- "days": 15,
- "code": "net15"
}
}, - {
- "id": 216375,
- "is_default": false,
- "payment_program": null,
- "payment_strategy": null,
- "payment_method": {
- "id": 1,
- "method": "Cash"
}, - "payment_term": {
- "id": 20,
- "term": "COD",
- "days": null,
- "code": "cod"
}
}
], - "selected_payment_option": {
- "id": 1732313,
- "is_default": true,
- "payment_program": "flexible",
- "payment_strategy": "reverse_factored",
- "payment_method": {
- "id": 4,
- "method": "ACH"
}, - "payment_term": {
- "id": 3,
- "term": "Net 15",
- "days": 15,
- "code": "net15"
}
}, - "payment_due_date": null,
- "paid": false,
- "paid_date": null,
- "ship_date": null,
- "shipping_details": null,
- "notes": "",
- "internal_notes": null,
- "delivery_preferences": "Monday - Wednesday Only Please",
- "sales_reps": [
- {
- "id": 13,
- "user": "John Doe"
}
], - "classification": "Adult Use",
- "payment_balance": 594,
- "available_transitions": [
- "fulfilled",
- "rejected"
], - "modified": "2020-06-10T16:14:49.494713-06:00",
- "has_special_requests": false,
- "delivery_provider": null,
- "order_taxes": [ ],
- "delivery_info": null,
- "is_combination": false,
- "credits": "420.10",
- "facility_id": 123,
- "order_number": "aec108ac-a1f4-40fa-966e-a12ga9bf6e2f",
- "order_seller_number": "a9bf6e2f",
- "order_buyer_number": "a9bf6e2f",
- "order_short_number": "a9bf6e2f",
- "distributor": "",
- "external_ids": {
- "system-name": "45897"
}, - "corporate_address": {
- "address": "17034 Highway 10",
- "city": "Moffat",
- "state": "CO",
- "unit_number": "1A",
- "zipcode": "81143"
}, - "delivery_address": {
- "address": "17034 Highway 17",
- "city": "Moffat",
- "state": "CO",
- "unit_number": "1A",
- "zipcode": "81143"
}
}
List payments for all active companies where the user has the Manage Orders Received permission.
Filter by order with /orders-received/{order_number}/payments/
limit | integer Number of results to return per page. |
offset | integer The initial index from which to return the results. |
{- "count": 0,
- "results": [
- {
- "id": 0,
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "order": "string",
- "recorded_by": 0,
- "recorder_name": "string",
- "total": {
- "amount": "string",
- "currency": "string"
}, - "payment_date": "2019-08-24T14:15:22Z",
- "reason": "string",
- "payment_type": "other"
}
]
}
Create a new payment
order required | string Number of the order this payment applies to. See |
recorded_by required | integer Id of the user recording this payment. See |
required | object |
payment_date required | string <date-time> Date and time the payment was submitted on. |
reason | string Description for this payment. |
payment_type | string Enum: "other" "cash" "check" "credit" "trade" "ach" "wire" "cashier" Type of payment |
{- "order": "string",
- "recorded_by": 0,
- "total": {
- "amount": "string",
- "currency": "string"
}, - "payment_date": "2019-08-24T14:15:22Z",
- "reason": "string",
- "payment_type": "other"
}
{- "id": 0,
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "order": "string",
- "recorded_by": 0,
- "recorder_name": "string",
- "total": {
- "amount": "string",
- "currency": "string"
}, - "payment_date": "2019-08-24T14:15:22Z",
- "reason": "string",
- "payment_type": "other"
}
Retrieve a payment by id.
id required | integer A unique integer value identifying the order payment. |
{- "id": 0,
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "order": "string",
- "recorded_by": 0,
- "recorder_name": "string",
- "total": {
- "amount": "string",
- "currency": "string"
}, - "payment_date": "2019-08-24T14:15:22Z",
- "reason": "string",
- "payment_type": "other"
}
List all OrderSalesReps under the company access scope. For legacy auth, includes companies where the user has the Can Manage Orders Received
permission.
limit | integer Number of results to return per page. |
offset | integer The initial index from which to return the results. |
{- "count": 0,
- "results": [
- {
- "id": 0,
- "order": "93b532b3-a125-4cd2-9b71-9996b1e164ce",
- "rep": 0,
- "created_on": "2019-08-24T14:15:22Z"
}
]
}
Create a new OrderSalesRep.
order required | string <uuid> (Order) |
rep required | integer (Rep) |
{- "order": "93b532b3-a125-4cd2-9b71-9996b1e164ce",
- "rep": 0
}
{- "id": 0,
- "order": "93b532b3-a125-4cd2-9b71-9996b1e164ce",
- "rep": 0,
- "created_on": "2019-08-24T14:15:22Z"
}
Retrieve an individual OrderSalesRep by ID.
id required | integer A unique integer value identifying this order sales rep. |
{- "id": 0,
- "order": "93b532b3-a125-4cd2-9b71-9996b1e164ce",
- "rep": 0,
- "created_on": "2019-08-24T14:15:22Z"
}
List all order event logs.
id | number Filter by id |
by | string Filter Event Logs by the username, first name, or last name of the person whose event created it. |
order | string Filter Event Logs by their associated order number. |
limit | integer Number of results to return per page. |
offset | integer The initial index from which to return the results. |
{- "count": 0,
- "results": [
- {
- "id": 0,
- "order": "93b532b3-a125-4cd2-9b71-9996b1e164ce",
- "author_name": "string",
- "by": "string",
- "event_type": "accepted",
- "description": "string",
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "timestamp": "2019-08-24T14:15:22Z",
- "changed_fields": { },
- "source": "app",
- "source_detail": "string"
}
]
}
Retrieve an individual order event log by id.
id required | integer A unique integer value identifying this order event log. |
{- "id": 0,
- "order": "93b532b3-a125-4cd2-9b71-9996b1e164ce",
- "author_name": "string",
- "by": "string",
- "event_type": "accepted",
- "description": "string",
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "timestamp": "2019-08-24T14:15:22Z",
- "changed_fields": { },
- "source": "app",
- "source_detail": "string"
}
id | integer (Id) id of the line item |
object Price at the time the order was placed | |
quantity | string <decimal> (Quantity) Number of units ordered |
order | string or null <uuid> (Order) The number of the order this line item is attached to. |
product | string (Product) id for the product |
notes | string or null (Notes) Notes for this specific ordered product |
is_sample | boolean (Is sample) Is this line item a sample? |
object Alternative sale price | |
unit_multiplier | integer (Unit multiplier) How many individual units are sold when compared to the assigned unit of measure |
is_medical_line_item | boolean (Is medical line item) Is this a medical line item? |
is_packed | boolean (Is packed) Is the line-item packed? |
packed_at | string or null <date-time> (Packed at) Date and time this line-item was packed |
packed_by | integer or null (CompanyStaff user) The CompanyStaff user that packed this product |
unit_of_measure | string (Unit of measure) Units this product is measured in |
position | integer or null (Position) Position for this line item in the displayed list of line items on the order |
bulk_units | integer (Bulk units) The number of units of bulk available. quantity / unit_multiplier |
on_sale | boolean (On sale) Is this line item on sale? |
is_backorder | boolean or null (Is backorder) Is this line item backordered? |
order_id | string (Order id) |
batch | integer or null (Batch) Batch that should be displayed in invoice. |
package_tags | string (Package tags) Tags associated to line items via attached packages. |
frozen_data | object (Frozen data) |
wholesale_price | string or null <decimal> (Wholesale price) Wholesale Price |
{- "id": 0,
- "ordered_unit_price": {
- "amount": "string",
- "currency": "string"
}, - "quantity": "string",
- "order": "93b532b3-a125-4cd2-9b71-9996b1e164ce",
- "product": "string",
- "notes": "string",
- "is_sample": true,
- "sale_price": {
- "amount": "string",
- "currency": "string"
}, - "unit_multiplier": 0,
- "is_medical_line_item": true,
- "is_packed": true,
- "packed_at": "2019-08-24T14:15:22Z",
- "packed_by": 0,
- "unit_of_measure": "string",
- "position": 0,
- "bulk_units": 0,
- "on_sale": true,
- "is_backorder": true,
- "order_id": "string",
- "batch": 0,
- "package_tags": "string",
- "frozen_data": { },
- "wholesale_price": "string"
}
List line items for all active companies where the user has the Manage Orders Received permission.
Line items can also be retrieved by order via /orders-received/{order_number}/line-items
or by company via /companies/{company_id}/line-items/
expand | string Expand an id field into its full object. Supported values include |
id | number Filter by id |
product__name | string Filter by product name. |
product_id | string Filter by product id. |
order | string Filter by order number or external_id_seller. Multiple values may be separated by commas. |
is_sample | string Filter by sample status. |
order__created_on__gte | string Filter by Order created_on, greater than or equal to |
order__created_on__lte | string Filter by Order created_on, less than or equal to |
order__ship_date__gte | string Filter by Order ship_date, greater than or equal to |
order__ship_date__lte | string Filter by Order ship_date, less than or equal to |
order__modified__gte | string Filter by Order modified, greater than or equal to |
order__modified__lte | string Filter by Order modified, less than or equal to |
order__customer__cities | string Filter by Order Customer cities, separated by commas. |
order__customer__managers | string Filter by Order Customer managers, separated by commas. |
order__customers | string Filter by Order Customer, separated by commas. |
company_slug | string Filter by seller company slug |
order__service_zone | number Filter by order__service_zone |
limit | integer Number of results to return per page. |
offset | integer The initial index from which to return the results. |
{- "count": 0,
- "results": [
- {
- "id": 0,
- "ordered_unit_price": {
- "amount": "string",
- "currency": "string"
}, - "quantity": "string",
- "order": "93b532b3-a125-4cd2-9b71-9996b1e164ce",
- "product": "string",
- "notes": "string",
- "is_sample": true,
- "sale_price": {
- "amount": "string",
- "currency": "string"
}, - "unit_multiplier": 0,
- "is_medical_line_item": true,
- "is_packed": true,
- "packed_at": "2019-08-24T14:15:22Z",
- "packed_by": 0,
- "unit_of_measure": "string",
- "position": 0,
- "bulk_units": 0,
- "on_sale": true,
- "is_backorder": true,
- "order_id": "string",
- "batch": 0,
- "package_tags": "string",
- "frozen_data": { },
- "wholesale_price": "string"
}
]
}
Create a line item for an existing order.
⚠️ WARNING - BETA FEATURE
This API is in active development and is subject to change.
required | object Price at the time the order was placed |
required | object Sale price for this order |
quantity required | string <decimal> (Quantity) Number of units ordered |
product required | string (Product) id for the product |
order | string or null <uuid> (Order) The number of the order this line item is attached to. Optional for line items embedded in an order object. |
notes | string or null (Notes) Notes for this specific ordered product |
is_sample | boolean (Is sample) Is this line item a sample? |
unit_multiplier | integer (Unit multiplier) How many individual units are sold when compared to the assigned unit of measure |
is_medical_line_item | boolean (Is medical line item) Is this a medical line item? |
is_packed | boolean (Is packed) Is the line-item packed? |
packed_at | string or null <date-time> (Packed at) Date and time this line-item was packed |
packed_by | integer or null (CompanyStaff user) The CompanyStaff user that packed this product |
position | integer or null (Position) Position for this line item in the displayed list of line items on the order |
batch | integer or null (Batch) Batch that should be displayed in invoice. |
wholesale_price | string or null <decimal> (Wholesale price) Wholesale Price |
{- "product": 2093,
- "quantity": 10,
- "notes": "Please include sample",
- "ordered_unit_price": {
- "amount": 108,
- "currency": "USD"
}, - "sale_price": {
- "amount": 99,
- "currency": "USD"
}, - "order": "93b532b3-a125-4cd2-9b71-9996b1e164ce"
}
{- "id": 0,
- "ordered_unit_price": {
- "amount": "string",
- "currency": "string"
}, - "quantity": "string",
- "order": "93b532b3-a125-4cd2-9b71-9996b1e164ce",
- "product": "string",
- "notes": "string",
- "is_sample": true,
- "sale_price": {
- "amount": "string",
- "currency": "string"
}, - "unit_multiplier": 0,
- "is_medical_line_item": true,
- "is_packed": true,
- "packed_at": "2019-08-24T14:15:22Z",
- "packed_by": 0,
- "unit_of_measure": "string",
- "position": 0,
- "bulk_units": 0,
- "on_sale": true,
- "is_backorder": true,
- "order_id": "string",
- "batch": 0,
- "package_tags": "string",
- "frozen_data": { },
- "wholesale_price": "string"
}
Retrieve an individual line item
id required | integer A unique integer value identifying this ordered product. |
expand | string Expand an id field into its full object. Supported values include |
{- "id": 0,
- "ordered_unit_price": {
- "amount": "string",
- "currency": "string"
}, - "quantity": "string",
- "order": "93b532b3-a125-4cd2-9b71-9996b1e164ce",
- "product": "string",
- "notes": "string",
- "is_sample": true,
- "sale_price": {
- "amount": "string",
- "currency": "string"
}, - "unit_multiplier": 0,
- "is_medical_line_item": true,
- "is_packed": true,
- "packed_at": "2019-08-24T14:15:22Z",
- "packed_by": 0,
- "unit_of_measure": "string",
- "position": 0,
- "bulk_units": 0,
- "on_sale": true,
- "is_backorder": true,
- "order_id": "string",
- "batch": 0,
- "package_tags": "string",
- "frozen_data": { },
- "wholesale_price": "string"
}
Update an existing line item
id required | integer A unique integer value identifying this ordered product. |
object Price at the time the order was placed | |
quantity | string <decimal> (Quantity) Number of units ordered |
notes | string or null (Notes) Notes for this specific ordered product |
is_sample | boolean (Is sample) Is this line item a sample? |
object Alternative sale price | |
is_packed | boolean (Is packed) Is the line-item packed? |
packed_at | string or null <date-time> (Packed at) Date and time this line-item was packed |
packed_by | integer or null (CompanyStaff user) The CompanyStaff user that packed this product |
position | integer or null (Position) Position for this line item in the displayed list of line items on the order |
batch | integer or null (Batch) Batch that should be displayed in invoice. |
{- "ordered_unit_price": {
- "amount": "string",
- "currency": "string"
}, - "quantity": "string",
- "notes": "string",
- "is_sample": true,
- "sale_price": {
- "amount": "string",
- "currency": "string"
}, - "is_packed": true,
- "packed_at": "2019-08-24T14:15:22Z",
- "packed_by": 0,
- "position": 0,
- "batch": 0
}
{- "id": 0,
- "ordered_unit_price": {
- "amount": "string",
- "currency": "string"
}, - "quantity": "string",
- "order": "93b532b3-a125-4cd2-9b71-9996b1e164ce",
- "product": "string",
- "notes": "string",
- "is_sample": true,
- "sale_price": {
- "amount": "string",
- "currency": "string"
}, - "unit_multiplier": 0,
- "is_medical_line_item": true,
- "is_packed": true,
- "packed_at": "2019-08-24T14:15:22Z",
- "packed_by": 0,
- "unit_of_measure": "string",
- "position": 0,
- "bulk_units": 0,
- "on_sale": true,
- "is_backorder": true,
- "order_id": "string",
- "batch": 0,
- "package_tags": "string",
- "frozen_data": { },
- "wholesale_price": "string"
}
id | integer Unique id generated by LeafLink. |
created_on | string <date-time> Date and time the product was created |
last_edit | string <date-time> Date and time the product was last edited by a user |
drop_date | string <date-time> Date and time the product is scheduled to transition to Available, if applicable. |
dropped | string <date-time> Date and time the product transitioned to Available. |
name | string |
sku | string <= 255 characters |
description | string |
quantity | string Inventory level |
reserved_qty | string Inventory reserved by orders in the |
available_inventory | string Inventory available for sale (quantity - reserved_qty). |
display_name | string If the product is a variety, the parent product name + the product name |
unit_multiplier | integer Default: 1 If sold in multiples, the number of units sold per case |
object Manufacturer's Suggested Retail Price (MSRP) | |
object Wholesale price displayed to buyers in the LeafLink marketplace | |
object Sale price displayed to buyers in the LeafLink marketplace | |
minimum_order | string Minimum units required for an order |
maximum_order | string Maximum units allowed for an order |
is_medical_line_item | boolean Is the product a medical product? |
AVAILABLE_FOR_SAMPLES | boolean Is this product available for samples? |
extern_acct_id | string Id of the product in QuickBooks Online. |
extern_income_acct_id | string The id for the QuickBooks Online income account. |
featured | boolean Is the product a featured product? |
tagline | string One-liner that displayed when the product is featured |
featured_on_deals | boolean Is this product featured on the LeafLink deals page? |
allow_fractional_quantities | boolean Does this product allow fractional quantities to be ordered? |
object (Parent) Parent product to which this product belongs. Required if creating a variety (child product) of a parent product. Varieties are useful when selling a single product in various sizes (i.e. as eighths, grams, and half ounces). | |
listing_state | string Enum: "Available" "Archived" "Sample" "Backorder" "Internal" "Unavailable" |
display_listing_state | string The listing state string displayed in the marketplace. |
inventory_management | string id for the inventory setting [1: "Managed", 2: "Unlimited", 3: "Inherited"] |
unit_of_measure | string Enum: "Milligram" "Gram" "Kilogram" "Ounce" "Pound" "Unit" "Liter" "Milliliter" |
sell_in_unit_of_measure | string Value: "Case" If selling the product in cases as opposed to individual units, set this field to Case. |
object (UnitDenomination) | |
category | integer Id for the category. See |
sub_category | integer Id for the subcategory. See |
grow_type | integer If a flower product, the id for the type of grow operation. |
seller | integer Id for the company listing the product. See |
brand | integer Id for the brand. See |
product_line | integer Id for the product line. See |
manufacturer | integer Id for the company that manufactured the product. See |
strain_classification | string Enum: "sativa" "indica" "hybrid" "na" "11-cbd" "high-cbd" "sativa-hybrid" "indica-hybrid" If not applicable to the product, use |
object (ComplianceLicense) | |
children_count | string Number of varieties of this product |
strains | Array of integers unique The strains associated with the product. This field is required for products with the |
price_schedule_price | string If using the buyer query parameter, the special price set for that customer with the price schedule feature. Otherwise, same as wholesale price. |
image_count | string The number of product images |
is_ancillary | boolean Is the product an ancillary product? |
s2s_conversion_amount | string <decimal> Conversion value used by the Metrc add on. |
extern_sts_ids | Array of strings Id used by the Metrc add on. |
strain_classification_display | string (Strain classification display) |
modified | string (Modified) Date and time the product data was last modified. |
has_deals_eligible_children | string Does the product have varieties that are eligible for LeafLink deals?' |
discount_percent | integer Discount applied to a product, calculated by comparing the wholesale and sale price. |
base_units_per_unit | string <decimal> If the product |
external_ids | object (ExternalIds) Set of key-value pairs for storing external system IDs. Key value can be up to 36 characters long. |
threshold_value | integer When product inventory quantity reaches below this value, take various actions. |
threshold_action | string Action to take when product inventory quantity reaches below a specified value. Available values include |
reverse_threshold_value | integer When product inventory quantity reaches above this value, take various actions. |
reverse_threshold_action | string Action to take when product inventory quantity reaches above a specified value. Available values include |
show_quantity | boolean Show inventory quantities to buyers? |
Array of objects Product specifications. |
{- "id": 2093,
- "created_on": "2020-02-19T00:36:22.353448-06:00",
- "last_edit": "2020-04-27T07:41:29.797149-06:00",
- "drop_date": null,
- "dropped": null,
- "name": "Swiss Masters Chocolate Bar (Dark)",
- "sku": "SWI-BAR-DAR-100",
- "description": "<p>Our premium Swiss Masters chocolate bars are bold, rich, and steeped in chocolate tradition. The Swiss Master dark chocolate has 70% dark chocolate paired with 100mg THC.</p>",
- "quantity": "800.0000",
- "reserved_qty": "120.0000",
- "display_name": "Swiss Masters Chocolate Bar (Dark)",
- "unit_multiplier": 12,
- "retail_price": {
- "amount": 18,
- "currency": "USD"
}, - "wholesale_price": {
- "amount": 108,
- "currency": "USD"
}, - "sale_price": {
- "amount": 0,
- "currency": "USD"
}, - "minimum_order": "1.0000",
- "maximum_order": null,
- "is_medical_line_item": false,
- "AVAILABLE_FOR_SAMPLES": true,
- "extern_acct_id": null,
- "extern_income_acct_id": "",
- "featured": false,
- "tagline": null,
- "featured_on_deals": false,
- "allow_fractional_quantities": false,
- "parent": null,
- "listing_state": "Available",
- "display_listing_state": "Available",
- "inventory_management": 1,
- "unit_of_measure": "Unit",
- "sell_in_unit_of_measure": "Case",
- "unit_denomination": {
- "id": 1,
- "value": "1.00000",
- "name": "One",
- "label": "1"
}, - "category": 7,
- "grow_type": null,
- "seller": 3721,
- "brand": 49,
- "product_line": 164,
- "manufacturer": 3721,
- "strain_classification": "na",
- "license": {
- "id": 2619,
- "number": "404R-00000",
- "type": "Recreational",
- "display_type": "Adult Use",
- "classification": "MIPS"
}, - "available_inventory": 680,
- "children_count": 0,
- "strains": [ ],
- "price_schedule_price": {
- "amount": 108,
- "currency": "USD"
}, - "image_count": 1,
- "is_ancillary": false,
- "s2s_conversion_amount": "1.0000",
- "extern_sts_ids": null,
- "strain_classification_display": "N/A",
- "modified": "2020-06-11T15:53:07.137980-06:00",
- "sub_category": 14,
- "has_deals_eligible_children": false,
- "discount_percent": 0,
- "base_units_per_unit": null,
- "external_ids": {
- "system-name": "1234567890"
}, - "threshold_value": 0,
- "threshold_action": "unavailable",
- "reverse_threshold_value": 1,
- "reverse_threshold_action": "available",
- "show_quantity": true,
- "product_data_items": [
- {
- "spec_type": "thc",
- "dosage_unit": "%",
- "decimal_value": "20.0"
}
]
}
List products for all active companies where the user has the Manage Inventory permission.
Products can also be retrieved by company via /companies/{company_id}/products/
or by parent product via /products/{parent_product_id}/products/
sku | string Filter by one or more sku, separated by commas. |
fields_include | string Include only specific fields in the response, separated by commas. |
fields_exclude | string Exclude specific fields in the response, separated by commas. |
include_children | string Include additional fields in the response. Available values include |
modified__lt | string Filter by the modified date, less than |
modified__lte | string Filter by the modified date, less than or equal to |
modified__gt | string Filter by the modified on date, greater than |
modified__gte | string Filter by the modified date, greater than or equal to |
last_edit__lt | string Filter by last edit date, less than |
last_edit__lte | string Filter by last edit date, less than or equal to |
last_edit__gt | string Filter by last edit date, greater than |
last_edit__gte | string Filter by last edit date, greater than or equal to |
created_on__lt | string Filter by created on date, less than |
created_on__lte | string Filter by created on date, less than or equal to |
created_on__gt | string Filter by created on date, greater than |
created_on__gte | string Filter by created on date, greater than or equal to |
id | number Filter by product id |
name | string Filter by name, case insensitive |
search | string Filter by a search term |
display_name | string Filter by display name, case insensitive |
brand | number Filter by brand. Multiple values separated by commas. |
company | number Filter by company id. Multiple values separated by commas. |
has_children | string Filter by whether or not products have children |
parent | number Filter by parent product id. Multiple values separated by commas. |
parent__isnull | string Filter by whether or not products are parent products. A null value for parent indicated a parent product. |
sub_category__isnull | string Filter by whether or not products have sub-categories assigned. Values can be |
product_line | number Filter by product line id. Multiple values separated by commas. |
strains | number Filter by strain id. Values available at the /strains/ endpoint. Multiple values separated by commas. |
category | number Filter by category id. Values available at the /product-categories/ endpoint. Multiple values separated by commas. |
sub_category | number Filter by sub_category id. Values available at the /product-subcategories/ endpoint. Multiple values separated by commas. |
license | number Filter by license id. Values available at the /licenses/ endpoint. Multiple values separated by commas. |
license__isnull | string Filter by license__isnull |
license__type | number Filter by license type display name. Values available at /license-types/ endpoint. Multiple values separated by commas. |
listing_state | string Filter by listing state id. Values available at /listing-states/ endpoint. Multiple values separated by commas. |
archived | string Filter by whether or not the product is archived |
buyer | number Filter by id for a specific buyer, view the products available to this buyer and the unique price_schedule_price if applicable |
s2s_connected | string Filter by s2s_connected |
company_slug | string Filter by the seller company slug |
limit | integer Number of results to return per page. |
offset | integer The initial index from which to return the results. |
external_id_key | string Filter for orders that match external_ids key:values. Must be used with external_id_values. |
external_id_values | string Filter for orders that match external_ids key:values. Multiple values separated by a comma. Must be used with external_id_key. |
{- "count": 2,
- "next": null,
- "previous": null,
- "results": [
- {
- "id": 2093,
- "created_on": "2020-02-19T00:36:22.353448-06:00",
- "last_edit": "2020-04-27T07:41:29.797149-06:00",
- "drop_date": null,
- "dropped": null,
- "name": "Swiss Masters Chocolate Bar (Dark)",
- "sku": "SWI-BAR-DAR-100",
- "description": "<p>Our premium Swiss Masters chocolate bars are bold, rich, and steeped in chocolate tradition. The Swiss Master dark chocolate has 70% dark chocolate paired with 100mg THC.</p>",
- "quantity": "800.0000",
- "reserved_qty": "120.0000",
- "display_name": "Swiss Masters Chocolate Bar (Dark)",
- "unit_multiplier": 12,
- "retail_price": {
- "amount": 18,
- "currency": "USD"
}, - "wholesale_price": {
- "amount": 108,
- "currency": "USD"
}, - "sale_price": {
- "amount": 0,
- "currency": "USD"
}, - "minimum_order": "1.0000",
- "maximum_order": null,
- "is_medical_line_item": false,
- "AVAILABLE_FOR_SAMPLES": true,
- "extern_acct_id": null,
- "extern_income_acct_id": "",
- "featured": false,
- "tagline": null,
- "featured_on_deals": false,
- "allow_fractional_quantities": false,
- "parent": null,
- "listing_state": "Available",
- "display_listing_state": "Available",
- "inventory_management": 1,
- "unit_of_measure": "Unit",
- "sell_in_unit_of_measure": "Case",
- "unit_denomination": {
- "id": 1,
- "value": "1.00000",
- "name": "One",
- "label": "1"
}, - "category": 7,
- "grow_type": null,
- "seller": 3721,
- "brand": 49,
- "product_line": 164,
- "manufacturer": 3721,
- "strain_classification": "na",
- "license": {
- "id": 2619,
- "number": "404R-00000",
- "type": "Recreational",
- "display_type": "Adult Use",
- "classification": "MIPS"
}, - "available_inventory": 680,
- "children_count": 0,
- "strains": [ ],
- "price_schedule_price": {
- "amount": 108,
- "currency": "USD"
}, - "image_count": 1,
- "is_ancillary": false,
- "s2s_conversion_amount": "1.0000",
- "extern_sts_ids": null,
- "strain_classification_display": "N/A",
- "modified": "2020-06-11T15:53:07.137980-06:00",
- "sub_category": 14,
- "has_deals_eligible_children": false,
- "discount_percent": 0,
- "base_units_per_unit": null,
- "external_ids": {
- "system-name": "1234567890"
}, - "threshold_value": 0,
- "threshold_action": "unavailable",
- "reverse_threshold_value": 1,
- "reverse_threshold_action": "available",
- "show_quantity": false
}, - {
- "id": 2094,
- "created_on": "2020-02-22T00:36:22.353448-06:00",
- "last_edit": "2020-04-10T07:41:29.797149-06:00",
- "drop_date": null,
- "dropped": null,
- "name": "Great Heights Chocolate Bar (Milk)",
- "sku": "GRE-BAR-CHO-100",
- "description": "<p>Our Great Heights chocolate bars are delicious. The milk chocolate contains 100mg THC.</p>",
- "quantity": "400.0000",
- "reserved_qty": "90.0000",
- "display_name": "Great Heights Chocolate Bar (Milk)",
- "unit_multiplier": 12,
- "retail_price": {
- "amount": 14,
- "currency": "USD"
}, - "wholesale_price": {
- "amount": 100,
- "currency": "USD"
}, - "sale_price": {
- "amount": 0,
- "currency": "USD"
}, - "minimum_order": "1.0000",
- "maximum_order": null,
- "is_medical_line_item": false,
- "AVAILABLE_FOR_SAMPLES": true,
- "extern_acct_id": null,
- "extern_income_acct_id": "",
- "featured": false,
- "tagline": null,
- "featured_on_deals": false,
- "allow_fractional_quantities": false,
- "parent": null,
- "listing_state": "Available",
- "display_listing_state": "Available",
- "inventory_management": 1,
- "unit_of_measure": "Unit",
- "sell_in_unit_of_measure": "Case",
- "unit_denomination": {
- "id": 1,
- "value": "1.00000",
- "name": "One",
- "label": "1"
}, - "category": 7,
- "grow_type": null,
- "seller": 3721,
- "brand": 49,
- "product_line": 164,
- "manufacturer": 3721,
- "strain_classification": "na",
- "license": {
- "id": 2619,
- "number": "404R-00000",
- "type": "Recreational",
- "display_type": "Adult Use",
- "classification": "MIPS"
}, - "available_inventory": 310,
- "children_count": 0,
- "strains": [ ],
- "price_schedule_price": {
- "amount": 100,
- "currency": "USD"
}, - "image_count": 1,
- "is_ancillary": false,
- "s2s_conversion_amount": "1.0000",
- "extern_sts_ids": null,
- "strain_classification_display": "N/A",
- "modified": "2020-06-11T15:53:07.137980-06:00",
- "sub_category": 14,
- "has_deals_eligible_children": false,
- "discount_percent": 0,
- "base_units_per_unit": null,
- "external_ids": { },
- "threshold_value": 0,
- "threshold_action": "unavailable",
- "reverse_threshold_value": 1,
- "reverse_threshold_action": "available",
- "show_quantity": true,
- "product_data_items": [ ]
}
]
}
Create a new product.
drop_date | string <date-time> Date and time the product is scheduled to transition to "Available", if applicable. The product must be set to a listing status of "Unavailable" in order to flip it to "Available" on the drop date. |
name required | string |
sku required | string <= 255 characters A company's unique identifier for a product. Commas are not supported. |
description required | string Populate with product name if no additional description is available in source system. |
quantity | string Inventory level. Required if seller is managing inventory |
unit_multiplier | integer Default: 1 Required if seller is selling in cases (multiples). This is a very common practice for sellers across all product categories. If sold in multiples, the number of units sold per case. If not selling in multiples, set to "1". |
required | object Manufacturer's Suggested Retail Price (MSRP). Use "0.00" if no retail price is stored in the source system. |
required | object Wholesale price displayed to buyers in the LeafLink marketplace. |
required | object Sale price displayed to buyers in the LeafLink marketplace. Use "0.00" if no sale price is stored in the source system. |
minimum_order required | string Minimum units required for an order. Use "0.01" if no minimum order quantity is stored in the source system. |
maximum_order required | string Maximum units allowed for an order. Use "100000" if no maximum order quantity is stored in the source system. |
AVAILABLE_FOR_SAMPLES | boolean Is this product available for samples? Set to "true" if value is not available in source system. Certain markets like Canada and OH do not allow samples. |
extern_acct_id | string Id of the product in QuickBooks Online. |
extern_income_acct_id | string The id for the QuickBooks Online income account. |
featured | boolean Is the product a featured product? Set to "false" if value is not available in source system. |
tagline | string One-liner that displayed when the product is featured |
allow_fractional_quantities | boolean Does this product allow fractional quantities to be ordered? Recommended if Flower category product is sold in bulk. |
object (Parent) Parent product to which this product belongs. Required if creating a variety (child product) of a parent product. Varieties are useful when selling a single product in various sizes (i.e. as eighths, grams, and half ounces). | |
listing_state required | string Enum: "Available" "Archived" "Sample" "Backorder" "Internal" "Unavailable" Set to "Available" to make the product available for selling/buying. "Internal" should be used when a seller does not want a product to be visible to buyers, but may be manually added to orders by the seller. |
display_listing_state | string The listing state string displayed in the marketplace. |
inventory_management required | string id for the inventory setting [1: "Managed", 2: "Unlimited", 3: "Inherited"] Use "1" to set the inventory of the product to managed. If set to "1", available inventory quantity should be set using "quantity" field. |
unit_of_measure required | string Enum: "Milligram" "Gram" "Kilogram" "Ounce" "Pound" "Unit" "Liter" "Milliliter" If appropriate unit of measure is not available as an option, use "Unit" and enter the number of units per unit in the base_units_per_unit field. |
sell_in_unit_of_measure | string Value: "Case" If selling the product in cases as opposed to individual units, set this field to "Case". Required if seller is selling in cases and unit_multiplier is greater than 1. |
unit_denomination required | integer id for the unit denomination [1: "1", 2: "1/2", 3: "1/4", 4: "1/8", 5: "3/4", 6: "2", 7: "3 1/2", 8: "7", 9: "14", 10: "6", 11: "28", 12: "5 1/4", 13: "4", 14: "2 1/2", 15: "8", 16: "3 3/4", 17: "1/10", 18: "6/5", 19: "3/2", 20: "2/10", 21: "1/5", 22: "1/3", 23: "1/6", 24: "3/10", 25: "4/10"]. Set to "1" if appropriate value is not available as an option. |
category required | integer Id for the category. See |
sub_category required | integer Id for the subcategory. See |
grow_type | integer If a flower product, the id for the type of grow operation. |
seller required | integer Id for the company listing the product. See |
brand required | integer Id for the brand. See |
product_line | integer Id for the product line. See |
manufacturer required | integer Id for the company that manufactured the product. See |
strain_classification required | string Enum: "sativa" "indica" "hybrid" "na" "11-cbd" "high-cbd" "sativa-hybrid" "indica-hybrid" If not applicable to the product, use |
license required | integer Id for the license. See |
strains | Array of integers unique The strains associated with the product. This field is required for products with the |
extern_sts_ids | Array of strings Id used by the Metrc add on. |
base_units_per_unit | string <decimal> Required if using Unit as base unit of measure. If the product |
external_ids | object (ExternalIds) Set of key-value pairs for storing external system IDs. Key value can be up to 36 characters long. |
threshold_value | integer When product inventory quantity reaches below this value, take various actions. |
threshold_action | string Action to take when product inventory quantity reaches below a specified value. Available values include |
reverse_threshold_value | integer When product inventory quantity reaches above this value, take various actions. |
reverse_threshold_action | string Action to take when product inventory quantity reaches above a specified value. Available values include |
show_quantity | boolean Show inventory quantities to buyers? |
Array of objects Product specifications. |
{- "name": "Swiss Masters Chocolate Bar (Dark)",
- "sku": "SWI-BAR-DAR-100",
- "description": "<p>Our premium Swiss Masters chocolate bars are bold, rich, and steeped in chocolate tradition. The Swiss Master dark chocolate has 70% dark chocolate paired with 100mg THC.</p>",
- "quantity": "800.0000",
- "display_name": "Swiss Masters Chocolate Bar (Dark)",
- "unit_multiplier": 12,
- "retail_price": {
- "amount": 18,
- "currency": "USD"
}, - "wholesale_price": {
- "amount": 108,
- "currency": "USD"
}, - "sale_price": {
- "amount": 0,
- "currency": "USD"
}, - "minimum_order": "1.0000",
- "maximum_order": null,
- "listing_state": "Available",
- "inventory_management": 1,
- "unit_of_measure": "Unit",
- "unit_denomination": 1,
- "category": 7,
- "seller": 3721,
- "brand": 49,
- "manufacturer": 3721,
- "strain_classification": "na",
- "license": 2619,
- "external_ids": {
- "system-name": "1234567890"
}, - "threshold_value": 0,
- "threshold_action": "unavailable",
- "reverse_threshold_value": 1,
- "reverse_threshold_action": "available",
- "show_quantity": true
}
{- "id": 2093,
- "created_on": "2020-02-19T00:36:22.353448-06:00",
- "last_edit": "2020-04-27T07:41:29.797149-06:00",
- "drop_date": null,
- "dropped": null,
- "name": "Swiss Masters Chocolate Bar (Dark)",
- "sku": "SWI-BAR-DAR-100",
- "description": "<p>Our premium Swiss Masters chocolate bars are bold, rich, and steeped in chocolate tradition. The Swiss Master dark chocolate has 70% dark chocolate paired with 100mg THC.</p>",
- "quantity": "800.0000",
- "reserved_qty": "120.0000",
- "display_name": "Swiss Masters Chocolate Bar (Dark)",
- "unit_multiplier": 12,
- "retail_price": {
- "amount": 18,
- "currency": "USD"
}, - "wholesale_price": {
- "amount": 108,
- "currency": "USD"
}, - "sale_price": {
- "amount": 0,
- "currency": "USD"
}, - "minimum_order": "1.0000",
- "maximum_order": null,
- "is_medical_line_item": false,
- "AVAILABLE_FOR_SAMPLES": true,
- "extern_acct_id": null,
- "extern_income_acct_id": "",
- "featured": false,
- "tagline": null,
- "featured_on_deals": false,
- "allow_fractional_quantities": false,
- "parent": null,
- "listing_state": "Available",
- "display_listing_state": "Available",
- "inventory_management": 1,
- "unit_of_measure": "Unit",
- "sell_in_unit_of_measure": "Case",
- "unit_denomination": {
- "id": 1,
- "value": "1.00000",
- "name": "One",
- "label": "1"
}, - "category": 7,
- "grow_type": null,
- "seller": 3721,
- "brand": 49,
- "product_line": 164,
- "manufacturer": 3721,
- "strain_classification": "na",
- "license": {
- "id": 2619,
- "number": "404R-00000",
- "type": "Recreational",
- "display_type": "Adult Use",
- "classification": "MIPS"
}, - "available_inventory": 680,
- "children_count": 0,
- "strains": [ ],
- "price_schedule_price": {
- "amount": 108,
- "currency": "USD"
}, - "image_count": 1,
- "is_ancillary": false,
- "s2s_conversion_amount": "1.0000",
- "extern_sts_ids": null,
- "strain_classification_display": "N/A",
- "modified": "2020-06-11T15:53:07.137980-06:00",
- "sub_category": 14,
- "has_deals_eligible_children": false,
- "discount_percent": 0,
- "base_units_per_unit": null,
- "external_ids": {
- "system-name": "1234567890"
}, - "threshold_value": 0,
- "threshold_action": "unavailable",
- "reverse_threshold_value": 1,
- "reverse_threshold_action": "available",
- "show_quantity": true,
- "product_data_items": [
- {
- "spec_type": "thc",
- "dosage_unit": "%",
- "decimal_value": "20.0"
}
]
}
Retrieve an individual product.
id required | integer The id for the product. |
fields_include | string Include only specific fields in the response, separated by commas. |
fields_exclude | string Exclude specific fields in the response, separated by commas. |
include_children | string Include additional fields in the response. Available values include |
{- "id": 2093,
- "created_on": "2020-02-19T00:36:22.353448-06:00",
- "last_edit": "2020-04-27T07:41:29.797149-06:00",
- "drop_date": null,
- "dropped": null,
- "name": "Swiss Masters Chocolate Bar (Dark)",
- "sku": "SWI-BAR-DAR-100",
- "description": "<p>Our premium Swiss Masters chocolate bars are bold, rich, and steeped in chocolate tradition. The Swiss Master dark chocolate has 70% dark chocolate paired with 100mg THC.</p>",
- "quantity": "800.0000",
- "reserved_qty": "120.0000",
- "display_name": "Swiss Masters Chocolate Bar (Dark)",
- "unit_multiplier": 12,
- "retail_price": {
- "amount": 18,
- "currency": "USD"
}, - "wholesale_price": {
- "amount": 108,
- "currency": "USD"
}, - "sale_price": {
- "amount": 0,
- "currency": "USD"
}, - "minimum_order": "1.0000",
- "maximum_order": null,
- "is_medical_line_item": false,
- "AVAILABLE_FOR_SAMPLES": true,
- "extern_acct_id": null,
- "extern_income_acct_id": "",
- "featured": false,
- "tagline": null,
- "featured_on_deals": false,
- "allow_fractional_quantities": false,
- "parent": null,
- "listing_state": "Available",
- "display_listing_state": "Available",
- "inventory_management": 1,
- "unit_of_measure": "Unit",
- "sell_in_unit_of_measure": "Case",
- "unit_denomination": {
- "id": 1,
- "value": "1.00000",
- "name": "One",
- "label": "1"
}, - "category": 7,
- "grow_type": null,
- "seller": 3721,
- "brand": 49,
- "product_line": 164,
- "manufacturer": 3721,
- "strain_classification": "na",
- "license": {
- "id": 2619,
- "number": "404R-00000",
- "type": "Recreational",
- "display_type": "Adult Use",
- "classification": "MIPS"
}, - "available_inventory": 680,
- "children_count": 0,
- "strains": [ ],
- "price_schedule_price": {
- "amount": 108,
- "currency": "USD"
}, - "image_count": 1,
- "is_ancillary": false,
- "s2s_conversion_amount": "1.0000",
- "extern_sts_ids": null,
- "strain_classification_display": "N/A",
- "modified": "2020-06-11T15:53:07.137980-06:00",
- "sub_category": 14,
- "has_deals_eligible_children": false,
- "discount_percent": 0,
- "base_units_per_unit": null,
- "external_ids": {
- "system-name": "1234567890"
}, - "threshold_value": 0,
- "threshold_action": "unavailable",
- "reverse_threshold_value": 1,
- "reverse_threshold_action": "available",
- "show_quantity": true,
- "product_data_items": [
- {
- "spec_type": "thc",
- "dosage_unit": "%",
- "decimal_value": "20.0"
}
]
}
Update an existing product.
id required | integer The id for the product. |
drop_date | string <date-time> Date and time the product is scheduled to transition to Available, if applicable. |
name | string |
sku | string <= 255 characters |
description | string |
quantity | string Inventory level |
available_inventory | string Inventory available for sale (quantity - reserved_qty). |
unit_multiplier | integer Default: 1 If sold in multiples, the number of units sold per case |
object Manufacturer's Suggested Retail Price (MSRP) | |
object Wholesale price displayed to buyers in the LeafLink marketplace | |
object Sale price displayed to buyers in the LeafLink marketplace | |
minimum_order | string Minimum units required for an order |
maximum_order | string Maximum units allowed for an order |
AVAILABLE_FOR_SAMPLES | boolean Is this product available for samples? |
extern_acct_id | string Id of the product in QuickBooks Online. |
extern_income_acct_id | string The id for the QuickBooks Online income account. |
featured | boolean Is the product a featured product? |
tagline | string One-liner that displayed when the product is featured |
allow_fractional_quantities | boolean Does this product allow fractional quantities to be ordered? |
object (Parent) Parent product to which this product belongs. Required if creating a variety (child product) of a parent product. Varieties are useful when selling a single product in various sizes (i.e. as eighths, grams, and half ounces). | |
listing_state | string Enum: "Available" "Archived" "Sample" "Backorder" "Internal" "Unavailable" |
display_listing_state | string The listing state string displayed in the marketplace. |
inventory_management | string id for the inventory setting [1: "Managed", 2: "Unlimited", 3: "Inherited"] |
unit_of_measure | string Enum: "Milligram" "Gram" "Kilogram" "Ounce" "Pound" "Unit" "Liter" "Milliliter" |
sell_in_unit_of_measure | string Value: "Case" If selling the product in cases as opposed to individual units, set this field to Case. |
unit_denomination | integer id for the unit denomination [1: "1", 2: "1/2", 3: "1/4", 4: "1/8", 5: "3/4", 6: "2", 7: "3 1/2", 8: "7", 9: "14", 10: "6", 11: "28", 12: "5 1/4", 13: "4", 14: "2 1/2", 15: "8", 16: "3 3/4", 17: "1/10", 18: "6/5", 19: "3/2", 20: "2/10", 21: "1/5", 22: "1/3", 23: "1/6", 24: "3/10", 25: "4/10"] |
category | integer Id for the category. See |
sub_category | integer Id for the subcategory. See |
grow_type | integer If a flower product, the id for the type of grow operation. |
seller | integer Id for the company listing the product. See |
brand | integer Id for the brand. See |
product_line | integer Id for the product line. See |
manufacturer | integer Id for the company that manufactured the product. See |
strain_classification | string Enum: "sativa" "indica" "hybrid" "na" "11-cbd" "high-cbd" "sativa-hybrid" "indica-hybrid" If not applicable to the product, use |
object (ComplianceLicense) | |
strains | Array of integers unique The strains associated with the product. This field is required for products with the |
extern_sts_ids | Array of strings Id used by the Metrc add on. |
base_units_per_unit | string <decimal> If the product |
external_ids | object (ExternalIds) Set of key-value pairs for storing external system IDs. Key value can be up to 36 characters long. |
threshold_value | integer When product inventory quantity reaches below this value, take various actions. |
threshold_action | string Action to take when product inventory quantity reaches below a specified value. Available values include |
reverse_threshold_value | integer When product inventory quantity reaches above this value, take various actions. |
reverse_threshold_action | string Action to take when product inventory quantity reaches above a specified value. Available values include |
show_quantity | boolean Show inventory quantities to buyers? |
Array of objects Product specifications. The list in the request will replace any existing product data items. |
{- "quantity": 2000
}
{- "id": 2093,
- "created_on": "2020-02-19T00:36:22.353448-06:00",
- "last_edit": "2020-04-27T07:41:29.797149-06:00",
- "drop_date": null,
- "dropped": null,
- "name": "Swiss Masters Chocolate Bar (Dark)",
- "sku": "SWI-BAR-DAR-100",
- "description": "<p>Our premium Swiss Masters chocolate bars are bold, rich, and steeped in chocolate tradition. The Swiss Master dark chocolate has 70% dark chocolate paired with 100mg THC.</p>",
- "quantity": "2000.0000",
- "reserved_qty": "120.0000",
- "display_name": "Swiss Masters Chocolate Bar (Dark)",
- "unit_multiplier": 12,
- "retail_price": {
- "amount": 18,
- "currency": "USD"
}, - "wholesale_price": {
- "amount": 108,
- "currency": "USD"
}, - "sale_price": {
- "amount": 0,
- "currency": "USD"
}, - "minimum_order": "1.0000",
- "maximum_order": null,
- "is_medical_line_item": false,
- "AVAILABLE_FOR_SAMPLES": true,
- "extern_acct_id": null,
- "extern_income_acct_id": "",
- "featured": false,
- "tagline": null,
- "featured_on_deals": false,
- "allow_fractional_quantities": false,
- "parent": null,
- "listing_state": "Available",
- "display_listing_state": "Available",
- "inventory_management": 1,
- "unit_of_measure": "Unit",
- "sell_in_unit_of_measure": "Case",
- "unit_denomination": {
- "id": 1,
- "value": "1.00000",
- "name": "One",
- "label": "1"
}, - "category": 7,
- "grow_type": null,
- "seller": 3721,
- "brand": 49,
- "product_line": 164,
- "manufacturer": 3721,
- "strain_classification": "na",
- "license": {
- "id": 2619,
- "number": "404R-00000",
- "type": "Recreational",
- "display_type": "Adult Use",
- "classification": "MIPS"
}, - "available_inventory": 1880,
- "children_count": 0,
- "strains": [ ],
- "price_schedule_price": {
- "amount": 108,
- "currency": "USD"
}, - "image_count": 1,
- "is_ancillary": false,
- "s2s_conversion_amount": "1.0000",
- "extern_sts_ids": null,
- "strain_classification_display": "N/A",
- "modified": "2020-06-11T15:53:07.137980-06:00",
- "sub_category": 14,
- "has_deals_eligible_children": false,
- "discount_percent": 0,
- "base_units_per_unit": null,
- "external_ids": {
- "system-name": "1234567890"
}, - "threshold_value": 0,
- "threshold_action": "unavailable",
- "reverse_threshold_value": 1,
- "reverse_threshold_action": "available",
- "show_quantity": true
}
Archive a product.
id required | integer The id for the product. |
{- "id": 2093,
- "created_on": "2020-02-19T00:36:22.353448-06:00",
- "last_edit": "2020-04-27T07:41:29.797149-06:00",
- "drop_date": null,
- "dropped": null,
- "name": "Swiss Masters Chocolate Bar (Dark)",
- "sku": "SWI-BAR-DAR-100",
- "description": "<p>Our premium Swiss Masters chocolate bars are bold, rich, and steeped in chocolate tradition. The Swiss Master dark chocolate has 70% dark chocolate paired with 100mg THC.</p>",
- "quantity": "800.0000",
- "reserved_qty": "120.0000",
- "display_name": "Swiss Masters Chocolate Bar (Dark)",
- "unit_multiplier": 12,
- "retail_price": {
- "amount": 18,
- "currency": "USD"
}, - "wholesale_price": {
- "amount": 108,
- "currency": "USD"
}, - "sale_price": {
- "amount": 0,
- "currency": "USD"
}, - "minimum_order": "1.0000",
- "maximum_order": null,
- "is_medical_line_item": false,
- "AVAILABLE_FOR_SAMPLES": true,
- "extern_acct_id": null,
- "extern_income_acct_id": "",
- "featured": false,
- "tagline": null,
- "featured_on_deals": false,
- "allow_fractional_quantities": false,
- "parent": null,
- "listing_state": "Archived",
- "display_listing_state": "Archived",
- "inventory_management": 1,
- "unit_of_measure": "Unit",
- "sell_in_unit_of_measure": "Case",
- "unit_denomination": {
- "id": 1,
- "value": "1.00000",
- "name": "One",
- "label": "1"
}, - "category": 7,
- "grow_type": null,
- "seller": 3721,
- "brand": 49,
- "product_line": 164,
- "manufacturer": 3721,
- "strain_classification": "na",
- "license": {
- "id": 2619,
- "number": "404R-00000",
- "type": "Recreational",
- "display_type": "Adult Use",
- "classification": "MIPS"
}, - "available_inventory": 680,
- "children_count": 0,
- "strains": [ ],
- "price_schedule_price": {
- "amount": 108,
- "currency": "USD"
}, - "image_count": 1,
- "is_ancillary": false,
- "s2s_conversion_amount": "1.0000",
- "extern_sts_ids": null,
- "strain_classification_display": "N/A",
- "modified": "2020-06-11T15:53:07.137980-06:00",
- "sub_category": 14,
- "has_deals_eligible_children": false,
- "discount_percent": 0,
- "base_units_per_unit": null,
- "external_ids": {
- "system-name": "1234567890"
}, - "threshold_value": 0,
- "threshold_action": "unavailable",
- "reverse_threshold_value": 1,
- "reverse_threshold_action": "available",
- "show_quantity": true
}
List all categories.
limit | integer Number of results to return per page. |
offset | integer The initial index from which to return the results. |
{- "count": 0,
- "results": [
- {
- "id": 0,
- "name": "string",
- "slug": "string",
- "description": "string"
}
]
}
List all subcategories.
limit | integer Number of results to return per page. |
offset | integer The initial index from which to return the results. |
{- "count": 0,
- "results": [
- {
- "id": 0,
- "name": "string",
- "slug": "string",
- "description": "string",
- "category": 0
}
]
}
List all all images.
Retrieved per product via the product query parameter or with the following path parameter, /products/{product_id}/images
product | number Filter by product id. |
id | number Filter by image id. |
company_slug | string Filter by company slug. |
limit | integer Number of results to return per page. |
offset | integer The initial index from which to return the results. |
{- "count": 0,
}
Upload a new product image. This request requires multipart form data.
image required | string <binary> The uploaded file, sent via multipart form data. Retrieved as a url link. |
product required | integer The id for the product that the image will be assigned to. |
position required | integer or null [ 1 .. 5 ] The position of the image. |
{- "id": 0,
- "product": 0,
- "position": 1
}
List all product lines.
brand | string Filter by brand |
id | number Filter by id |
company | number Filter by company |
company_slug | string Filter by owner company slug. |
limit | integer Number of results to return per page. |
offset | integer The initial index from which to return the results. |
{- "count": 0,
- "results": [
- {
- "id": 0,
- "name": "string",
- "brand": 0,
- "menu_position": 0
}
]
}
Create a new product line.
name required | string <= 100 characters |
brand required | integer Id for the brand. See |
menu_position | integer Position of the product line on the menu. |
{- "name": "string",
- "brand": 0,
- "menu_position": 0
}
{- "id": 0,
- "name": "string",
- "brand": 0,
- "menu_position": 0
}
Update an existing product line.
id required | integer The id for the product line. |
name | string <= 100 characters |
brand | integer Id for the brand. See |
menu_position | integer Position of the product line on the menu. |
{- "name": "string",
- "brand": 0,
- "menu_position": 0
}
{- "id": 0,
- "name": "string",
- "brand": 0,
- "menu_position": 0
}
List all strains.
id | number Filter by strain id |
name | string Filter by strain name |
company | number Filter by company ids, separated by commas |
company_slug | string Filter by company slug |
company__isnull | string Filter by company__isnull |
parents | number Filter by parent strain ids, separated by commas |
strain_classification | string Filter by strain classifications, separated by commas. |
limit | integer Number of results to return per page. |
offset | integer The initial index from which to return the results. |
{- "count": 0,
- "results": [
- {
- "id": 0,
- "name": "string",
- "parents": [
- 0
], - "company": 0,
- "strain_classification": "sativa"
}
]
}
Create a new strain.
name required | string |
parents | Array of integers Array of parent strain ids |
company | integer Id for the company that created the strain. |
strain_classification required | string Enum: "sativa" "indica" "hybrid" "na" "11-cbd" "high-cbd" "sativa-hybrid" "indica-hybrid" |
{- "name": "string",
- "parents": [
- 0
], - "company": 0,
- "strain_classification": "sativa"
}
{- "id": 0,
- "name": "string",
- "parents": [
- 0
], - "company": 0,
- "strain_classification": "sativa"
}
id | integer Unique id generated by LeafLink. |
owner | string Id for the company |
production_batch_number | string |
batch_date | string <date> |
thc | string <decimal> |
thca | string <decimal> |
total_thc | string <decimal> |
cbd | string <decimal> |
cbda | string <decimal> |
cbg | string <decimal> |
cbn | string <decimal> |
total_cannabinoids | string <decimal> |
Array of objects | |
cannabinoid_unit | string Unit for the test results. Acceptable values include |
testing_source | string Name of the source system for the test results |
is_from_api | boolean Describes whether this batch was created via an external system |
{- "id": 0,
- "owner": "string",
- "production_batch_number": "string",
- "batch_date": "2019-08-24",
- "thc": "string",
- "thca": "string",
- "total_thc": "string",
- "cbd": "string",
- "cbda": "string",
- "cbg": "string",
- "cbn": "string",
- "total_cannabinoids": "string",
- "documents": [
- {
- "id": 0,
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "summary": "string",
}
], - "cannabinoid_unit": "string",
- "testing_source": "string",
- "is_from_api": true
}
List all batches.
For legacy auth, retrieved per company with the owner query parameter or with the following path parameter, /companies/{company_id}/batches/
batch_date__lt | string Filter by batch_date__lt |
batch_date__lte | string Filter by batch_date__lte |
batch_date__gt | string Filter by batch_date__gt |
batch_date__gte | string Filter by batch_date__gte |
id | number Filter by one or multiple batch ids, separated by commas. |
owner | number Filter by one or multiple company ids, separated by commas. |
company_slug | string Filter by owner company slug. |
production_batch_number | string Filter by one or multiple production_batch_numbers, separated by commas. |
products | number Filter by one or multiple product ids, separated by commas. |
thc | string Filter by a range of THC percent. |
thca | string Filter by a range of THCa percent. |
total_thc | string Filter by a range of total THC percent. |
cbd | string Filter by a range of CBD percent. |
cbda | string Filter by a range of CBDa percent. |
cbg | string Filter by a range of CBG percent. |
cbn | string Filter by a range of CBN percent. |
total_cannabinoids | string Filter by a range of total cannabinoids percent. |
limit | integer Number of results to return per page. |
offset | integer The initial index from which to return the results. |
{- "count": 0,
- "results": [
- {
- "id": 0,
- "owner": "string",
- "production_batch_number": "string",
- "batch_date": "2019-08-24",
- "thc": "string",
- "thca": "string",
- "total_thc": "string",
- "cbd": "string",
- "cbda": "string",
- "cbg": "string",
- "cbn": "string",
- "total_cannabinoids": "string",
- "documents": [
- {
- "id": 0,
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "summary": "string",
}
], - "cannabinoid_unit": "string",
- "testing_source": "string",
- "is_from_api": true
}
]
}
Create a new batch.
owner required | string id for the company |
production_batch_number required | string <= 50 characters |
batch_date required | string <date> |
thc | string <decimal> |
thca | string <decimal> |
total_thc | string <decimal> |
cbd | string <decimal> |
cbda | string <decimal> |
cbg | string or null <decimal> |
cbn | string <decimal> |
total_cannabinoids | string <decimal> |
cannabinoid_unit | string Unit for the test results. Acceptable values include |
testing_source required | string Name of the source system for the test results |
{- "owner": "string",
- "production_batch_number": "string",
- "batch_date": "2019-08-24",
- "thc": "string",
- "thca": "string",
- "total_thc": "string",
- "cbd": "string",
- "cbda": "string",
- "cbg": "string",
- "cbn": "string",
- "total_cannabinoids": "string",
- "cannabinoid_unit": "string",
- "testing_source": "string"
}
{- "id": 0,
- "owner": "string",
- "production_batch_number": "string",
- "batch_date": "2019-08-24",
- "thc": "string",
- "thca": "string",
- "total_thc": "string",
- "cbd": "string",
- "cbda": "string",
- "cbg": "string",
- "cbn": "string",
- "total_cannabinoids": "string",
- "documents": [
- {
- "id": 0,
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "summary": "string",
}
], - "cannabinoid_unit": "string",
- "testing_source": "string",
- "is_from_api": true
}
Retrieve an individual batch.
id required | string The id for the batch. |
{- "id": 0,
- "owner": "string",
- "production_batch_number": "string",
- "batch_date": "2019-08-24",
- "thc": "string",
- "thca": "string",
- "total_thc": "string",
- "cbd": "string",
- "cbda": "string",
- "cbg": "string",
- "cbn": "string",
- "total_cannabinoids": "string",
- "documents": [
- {
- "id": 0,
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "summary": "string",
}
], - "cannabinoid_unit": "string",
- "testing_source": "string",
- "is_from_api": true
}
Update an existing batch.
id required | string The id for the batch. |
production_batch_number | string <= 50 characters |
batch_date | string <date> |
thc | string <decimal> |
thca | string <decimal> |
total_thc | string <decimal> |
cbd | string <decimal> |
cbda | string <decimal> |
cbg | string <decimal> |
cbn | string <decimal> |
total_cannabinoids | string <decimal> |
cannabinoid_unit | string Unit for the test results. Acceptable values include |
{- "production_batch_number": "string",
- "batch_date": "2019-08-24",
- "thc": "string",
- "thca": "string",
- "total_thc": "string",
- "cbd": "string",
- "cbda": "string",
- "cbg": "string",
- "cbn": "string",
- "total_cannabinoids": "string",
- "cannabinoid_unit": "string"
}
{- "id": 0,
- "owner": "string",
- "production_batch_number": "string",
- "batch_date": "2019-08-24",
- "thc": "string",
- "thca": "string",
- "total_thc": "string",
- "cbd": "string",
- "cbda": "string",
- "cbg": "string",
- "cbn": "string",
- "total_cannabinoids": "string",
- "documents": [
- {
- "id": 0,
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "summary": "string",
}
], - "cannabinoid_unit": "string",
- "testing_source": "string",
- "is_from_api": true
}
The product batch object assigns a batch to a product.
id | integer Unique id generated by LeafLink. |
product | string Id for the Product. See |
batch | integer Id for the batch. See |
{- "id": 0,
- "product": "string",
- "batch": 0
}
product required | string Id for the Product. See |
batch required | integer Id for the batch. See |
{- "product": "string",
- "batch": 0
}
{- "id": 0,
- "product": "string",
- "batch": 0
}
id | integer Unique id generated by LeafLink. |
batch | integer Id for the batch. See |
created_on | string <date-time> Date and time the document was uploaded. |
modified | string <date-time> Date and time the document was last modified. |
summary | string |
document | string <uri> uri for the document |
{- "id": 0,
- "batch": 0,
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "summary": "string",
}
{- "count": 0,
- "results": [
- {
- "id": 0,
- "batch": 0,
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "summary": "string",
}
]
}
Upload a new batch document.
document required | string <binary> uri for the file |
batch required | integer id for the Batch to attach this document to. |
summary | string <= 350 characters Additional information about the document. |
{- "id": 0,
- "batch": 0,
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "summary": "string",
}
Retrieve an individual batch document.
id required | integer The id for the batch document. |
{- "id": 0,
- "batch": 0,
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "summary": "string",
}
id | integer Unique id generated by LeafLink. |
facility | integer ID of the associated facility. |
inventory | integer ID of the associated inventory. |
product | integer ID of the associated product. |
quantity | number <decimal> Number of inventory items available. |
quantity_in_product_uom | string <decimal> Number of inventory items available in unit of measure. |
reserved_qty | string <decimal> Number of reserved inventory items. |
reserved_qty_in_product_uom | string <decimal> Number of reserved inventory items in unit of measure. |
batch | integer ID of the associated batch. |
is_archived | boolean Indicated whether the inventory item is active. |
{- "id": 0,
- "facility": 0,
- "inventory": 0,
- "product": 0,
- "quantity": 0,
- "quantity_in_product_uom": "string",
- "reserved_qty": "string",
- "reserved_qty_in_product_uom": "string",
- "batch": 0,
- "is_archived": true
}
The InventoryItem
model represents items of a particular inventory batch at a given facility.
List all inventory items. By default this returns non-archived items - you can query for archived items by including the "include_archived" query parameter.
⚠️ WARNING - BETA FEATURE: This API is in active development and is subject to change.
include_archived | boolean Filter by archived status |
product | string Filter by product ID |
{- "count": 0,
- "results": [
- {
- "id": 0,
- "facility": 0,
- "inventory": 0,
- "product": 0,
- "quantity": 0,
- "quantity_in_product_uom": "string",
- "reserved_qty": "string",
- "reserved_qty_in_product_uom": "string",
- "batch": 0,
- "is_archived": true
}
]
}
Create an inventory item.
NOTE: If a non-archived inventory item is found with the same product and facility but no batch, it will be marked as "archived" and a new inventory item will be created. As a result, subsequent GET requests will no longer return the old inventory item. As mentioned in the GET method description, you can query for archived items by including the "include_archived" query parameter.
⚠️ WARNING - BETA FEATURE: This API is in active development and is subject to change.
batch required | integer ID of the associated batch. |
is_archived required | boolean Indicated whether the inventory item is archived. |
facility required | integer ID of the associated facility. |
product required | integer ID of the associated product. |
quantity required | number <decimal> Number of inventory items available. |
{- "batch": 0,
- "is_archived": true,
- "facility": 0,
- "product": 0,
- "quantity": 0
}
{- "id": 0,
- "facility": 0,
- "inventory": 0,
- "product": 0,
- "quantity": 0,
- "quantity_in_product_uom": "string",
- "reserved_qty": "string",
- "reserved_qty_in_product_uom": "string",
- "batch": 0,
- "is_archived": true
}
Get inventory item by ID.
⚠️ WARNING - BETA FEATURE: This API is in active development and is subject to change.
id required | integer A unique integer value identifying this inventory item. |
include_archived | boolean Filter by the archived status. (False by default.) |
{- "id": 0,
- "facility": 0,
- "inventory": 0,
- "product": 0,
- "quantity": 0,
- "quantity_in_product_uom": "string",
- "reserved_qty": "string",
- "reserved_qty_in_product_uom": "string",
- "batch": 0,
- "is_archived": true
}
Update an existing inventory item by ID.
⚠️ WARNING - BETA FEATURE: This API is in active development and is subject to change.
id required | integer A unique integer value identifying this inventory item. |
include_archived | boolean Filter by the archived status. (False by default.) |
is_archived | boolean Indicated whether the inventory item is active. |
quantity | number <decimal> Number of inventory items available. |
{- "is_archived": true,
- "quantity": 0
}
{- "id": 0,
- "facility": 0,
- "inventory": 0,
- "product": 0,
- "quantity": 0,
- "quantity_in_product_uom": "string",
- "reserved_qty": "string",
- "reserved_qty_in_product_uom": "string",
- "batch": 0,
- "is_archived": true
}
id | integer Unique id generated by LeafLink. |
name | string Name of the facility. |
description | string Description of the facility. |
{- "id": 0,
- "name": "string",
- "description": "string"
}
Get facility by ID.
⚠️ WARNING - BETA FEATURE: This API is in active development and is subject to change.
id required | integer A unique integer value identifying this facility. |
{- "id": 0,
- "name": "string",
- "description": "string"
}
id | integer Unique id generated by LeafLink. |
state | string State abbreviation |
managers | Array of integers unique Ids for the sales reps assigned to this customer. |
created_on | string <date-time> Date and time the customer was created. |
modified | string <date-time> Date and time the customer was last modified. |
next_contact_date | string <date> Date for the next contact, YYYY-MM-DD |
nickname | string <= 200 characters Alternate name for the customer |
external_id | string <= 100 characters Id of the customer in a 3rd party system |
ext_acct_id | string Id of the customer in QuickBooks Online. |
license_number | string <= 100 characters License Number |
old_license_number | string or null <= 100 characters Old license number for the customer |
license_inactive | boolean Is the license inactive for this customer? |
business_identifier | string <= 100 characters Company identifier distinct from license numbers |
ein | string <= 100 characters Company's federal EIN number. For Customers linked to LeafLink Buyers (partner_id=Company.id), this field is read-only and inherited directly from the linked LeafLink Buyer Company. For Customers not linked to LeafLink Buyer Companies (partner_id=null), this field will return null. |
directions | string <= 3000 characters Directions to the customer's location |
delivery_preferences | string Customer delivery preferences. These will show up as footnotes on orders placed by the customer. |
currency | string non-empty Currency used by the customer. |
shipping_charge | string <decimal> Additional shipping charge |
brand | string <= 400 characters Brand name associated with the customer |
name | string <= 400 characters Customer name |
dba | string <= 400 characters DBA of customer |
business_license_name | string <= 400 characters Business License Name |
description | string <= 4000 characters Additional information about the customer |
website | string <uri> <= 400 characters Customer's website |
address | string <= 400 characters Customer's address |
unit_number | string Unit # for the address |
zipcode | string <= 6 characters Zipcode |
city | string <= 400 characters City |
county | string <= 400 characters County |
country | string <= 400 characters Country |
lat | string <decimal> Location latitude |
long | string <decimal> Location longitude |
phone | string <= 400 characters Phone Number |
phone_extension | string <= 400 characters Phone Extension |
string <email> <= 255 characters Email address | |
notes | string <= 3000 characters Other information about the customer |
leaflink_last_views | string <date-time> The last time this customer viewed your products. |
leaflink_source | boolean Was this customer added to your CRM by LeafLink? |
archived | boolean Is the customer record archived? |
delinquent | boolean Is this customer delinquent on billing? |
discount_percent | string <decimal> Discount percent for orders from this customer. |
owner | integer Id for the company that this customer record is for. |
partner | integer Id for the buyer company that this customer record represents. |
tier | integer Id for the customer's tier |
price_schedule | integer Id for the price schedule assigned to the customer |
service_zone | integer Customer's service zone |
license_type | integer (Business License Type) Customer's business license type |
payment_term | integer Customer's payment terms Deprecated field, please use payment_option instead |
payment_methods | Array of integers Customer's payment methods Deprecated field, please use payment_option instead |
available_payment_options | Array of any (Available payment options) Available payment options for a customer |
status | integer Id for the customer's status |
external_ids | object (ExternalIds) Set of key-value pairs for storing external system IDs. Key value can be up to 36 characters long. |
object (Address) | |
object (Address) |
{- "id": 0,
- "state": "string",
- "managers": [
- 0
], - "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "next_contact_date": "2019-08-24",
- "nickname": "string",
- "external_id": "string",
- "ext_acct_id": "string",
- "license_number": "string",
- "old_license_number": "string",
- "license_inactive": true,
- "business_identifier": "string",
- "ein": "string",
- "directions": "string",
- "delivery_preferences": "string",
- "currency": "string",
- "shipping_charge": "string",
- "brand": "string",
- "name": "string",
- "dba": "string",
- "business_license_name": "string",
- "description": "string",
- "address": "string",
- "unit_number": "string",
- "zipcode": "string",
- "city": "string",
- "county": "string",
- "country": "string",
- "lat": "string",
- "long": "string",
- "phone": "string",
- "phone_extension": "string",
- "email": "user@example.com",
- "notes": "string",
- "leaflink_last_views": "2019-08-24T14:15:22Z",
- "leaflink_source": true,
- "archived": true,
- "delinquent": true,
- "discount_percent": "string",
- "owner": 0,
- "partner": 0,
- "tier": 0,
- "price_schedule": 0,
- "service_zone": 0,
- "license_type": 0,
- "payment_term": 0,
- "payment_methods": [
- 0
], - "available_payment_options": [
- null
], - "status": 0,
- "external_ids": { },
- "corporate_address": {
- "address": "string",
- "unit_number": "string",
- "city": "string",
- "county": "string",
- "state": "string",
- "zipcode": "string"
}, - "delivery_address": {
- "address": "string",
- "unit_number": "string",
- "city": "string",
- "county": "string",
- "state": "string",
- "zipcode": "string"
}
}
The Customer model represents a business relationship between a buyer and seller on LeafLink.
List customers for all active companies where the user is a member of.
fields_include | string Include only specific fields in the response, separated by commas. |
fields_exclude | string Exclude specific fields in the response, separated by commas. |
include_children | string Include additional fields in the response. Available values include |
nickname | string Filter by the customer's nickname. |
nickname__in | string Filter by nickname__in |
nickname__startswith | string Filter by nickname__startswith |
phone | string Filter by the customer's business phone number. |
phone__in | string Filter by phone__in |
phone__startswith | string Filter by phone__startswith |
dba | string Filter by the customer's dba. |
dba__in | string Filter by dba__in |
dba__startswith | string Filter by dba__startswith |
owner__slug | string Filter by the slug of the Company that owns this Customer record. |
id__in | number Filter by id__in |
id | number Filter by id |
next_contact_date__lt | string Filter by next_contact_date__lt |
next_contact_date__lte | string Filter by next_contact_date__lte |
next_contact_date__gt | string Filter by next_contact_date__gt |
next_contact_date__gte | string Filter by next_contact_date__gte |
company_slug | string Filter by the slug of the Company that owns this Customer record. |
external_id | string Filter by the customer's external id. |
external_id__in | string Filter by external_id__in |
external_id__startswith | string Filter by external_id__startswith |
ein | string Filter by the customer's EIN. |
ein__in | string Filter by ein__in |
ein__startswith | string Filter by ein__startswith |
discount_percent__lt | number Filter by discount_percent__lt |
discount_percent__lte | number Filter by discount_percent__lte |
discount_percent__gt | number Filter by discount_percent__gt |
discount_percent__gte | number Filter by discount_percent__gte |
old_license_number | string Filter by the customer's previous license number. |
old_license_number__in | string Filter by old_license_number__in |
old_license_number__startswith | string Filter by old_license_number__startswith |
modified__lt | string Filter by the datetime the object was last modified, less than. |
modified__lte | string Filter by the datetime the object was last modified, less than or equal to. |
modified__gt | string Filter by the datetime the object was last modified, greater than. |
modified__gte | string Filter by the datetime the object was last modified, greater than or equal to. |
brand | string Filter by the customer's associated brand. |
brand__in | string Filter by brand__in |
brand__startswith | string Filter by brand__startswith |
created_on__lt | string Filter by created_on datetime, less than. |
created_on__lte | string Filter by created_on datetime, less than or equal to. |
created_on__gt | string Filter by created_on datetime, greater than. |
created_on__gte | string Filter by created_on datetime, greater than or equal to. |
address | string Filter by the customer's address. |
address__in | string Filter by address__in |
address__startswith | string Filter by address__startswith |
business_license_name | string Filter by the customer's business license name. |
business_license_name__in | string Filter by business_license_name__in |
business_license_name__startswith | string Filter by business_license_name__startswith |
name | string Filter by the customer's name. |
name__in | string Filter by name__in |
name__startswith | string Filter by name__startswith |
business_identifier | string Filter by the customer's business identifier. |
business_identifier__in | string Filter by business_identifier__in |
business_identifier__startswith | string Filter by business_identifier__startswith |
license_number | string Filter by the customer's license number. |
license_number__in | string Filter by license_number__in |
license_number__startswith | string Filter by license_number__startswith |
ext_acct_id | string Filter by the customer's external account id. |
ext_acct_id__in | string Filter by ext_acct_id__in |
ext_acct_id__startswith | string Filter by ext_acct_id__startswith |
ext_acct_id__isnull | string Filter by ext_acct_id__isnull |
string Filter by the customer's email. | |
email__in | string Filter by email__in |
email__startswith | string Filter by email__startswith |
website | string Filter by the customer's website. |
website__in | string Filter by website__in |
website__startswith | string Filter by website__startswith |
owner | number Filter by owner ID. |
partner | number Filter by partner ID. |
tier | number Filter by the ID of a customer's tier. |
price_schedule | number Filter by the ID of a customer's price schedule. |
service_zone | number Filter by the ID of a customer's service zone. |
license_type | number Filter by the ID of a customer's license type. |
license_inactive | string Filter by the whether a customer's license is active. |
payment_term | integer Filter by the customer's payment term |
payment_method | integer Filter by the customer's payment method |
status | number Filter by the ID of a customer's status. |
state | number Filter by the ID of a customer's state. |
leaflink_source | string Filter by whether the customer was added by LeafLink. |
archived | string Filter by whether the customer has been archived. |
delinquent | string Filter by whether the customer is delinquent. |
limit | integer Number of results to return per page. |
offset | integer The initial index from which to return the results. |
external_id_key | string Filter for orders that match external_ids key:values. Must be used with external_id_values. |
external_id_values | string Filter for orders that match external_ids key:values. Multiple values separated by a comma. Must be used with external_id_key. |
{- "count": 0,
- "results": [
- {
- "id": 0,
- "state": "string",
- "managers": [
- 0
], - "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "next_contact_date": "2019-08-24",
- "nickname": "string",
- "external_id": "string",
- "ext_acct_id": "string",
- "license_number": "string",
- "old_license_number": "string",
- "license_inactive": true,
- "business_identifier": "string",
- "ein": "string",
- "directions": "string",
- "delivery_preferences": "string",
- "currency": "string",
- "shipping_charge": "string",
- "brand": "string",
- "name": "string",
- "dba": "string",
- "business_license_name": "string",
- "description": "string",
- "address": "string",
- "unit_number": "string",
- "zipcode": "string",
- "city": "string",
- "county": "string",
- "country": "string",
- "lat": "string",
- "long": "string",
- "phone": "string",
- "phone_extension": "string",
- "email": "user@example.com",
- "notes": "string",
- "leaflink_last_views": "2019-08-24T14:15:22Z",
- "leaflink_source": true,
- "archived": true,
- "delinquent": true,
- "discount_percent": "string",
- "owner": 0,
- "partner": 0,
- "tier": 0,
- "price_schedule": 0,
- "service_zone": 0,
- "license_type": 0,
- "payment_term": 0,
- "payment_methods": [
- 0
], - "available_payment_options": [
- null
], - "status": 0,
- "external_ids": { },
- "corporate_address": {
- "address": "string",
- "unit_number": "string",
- "city": "string",
- "county": "string",
- "state": "string",
- "zipcode": "string"
}, - "delivery_address": {
- "address": "string",
- "unit_number": "string",
- "city": "string",
- "county": "string",
- "state": "string",
- "zipcode": "string"
}
}
]
}
Create a new customer.
state | string (State) State abbreviation |
managers | Array of integers unique Ids for the sales reps assigned to this customer. |
next_contact_date | string <date> (Next contact date) Date for the next contact, YYYY-MM-DD |
nickname | string (Nickname) <= 200 characters Alternate name for the customer |
external_id | string (External ID) <= 100 characters Id of the customer in a 3rd party system |
ext_acct_id | string (Accounting Service External ID) Id of the customer in QuickBooks Online. |
license_number | string (License Number) <= 100 characters License Number |
old_license_number | string or null <= 100 characters Old license number for the customer |
license_inactive | boolean (License Inactive) Is the license inactive for this customer? |
business_identifier | string (Business Identifier / UBI) <= 100 characters Company identifier distinct from license numbers |
ein | string (EIN Number) <= 100 characters Company's federal EIN number. DEPRECATED for writes. For Customers linked to LeafLink Buyers (partner_id=Company.id), this field is read-only and inherited directly from the linked LeafLink Buyer Company. For Customers not linked to LeafLink Buyer Companies (partner_id=null), this field will return null. |
directions | string (Directions) <= 3000 characters Directions to the customer's location |
delivery_preferences | string (Delivery Preferences) Customer delivery preferences. These will show up as footnotes on orders placed by the customer. |
shipping_charge | string <decimal> (Shipping charge) Additional shipping charge |
brand | string (Brand Name) <= 400 characters Brand name associated with the customer |
name required | string (Name) <= 400 characters Customer name |
dba | string (DBA) <= 400 characters DBA of customer |
business_license_name | string (Business License Name) <= 400 characters Business License Name |
description | string (Description) <= 4000 characters Additional information about the customer |
website | string <uri> (Website) <= 400 characters Customer's website |
address | string (Address) <= 400 characters Customer's address |
unit_number | string (Unit #) Unit # for the address |
zipcode | string (Zipcode) <= 6 characters Zipcode |
city | string (City) <= 400 characters City |
county | string (County) <= 400 characters County |
country | string (Country) <= 400 characters Country |
lat | string <decimal> (Lat) Location latitude |
long | string <decimal> (Long) Location longitude |
phone | string (Phone) <= 400 characters Phone Number |
phone_extension | string <= 400 characters Phone Extension |
string <email> <= 255 characters Email address | |
notes | string (Notes) <= 3000 characters Other information about the customer |
archived | boolean (Is Archived) Is the customer record archived? |
delinquent | boolean (Delinquent Customer) Is this customer delinquent on billing? |
discount_percent | string <decimal> (Discount Percent) Discount percent for orders from this customer. |
owner required | integer (Owner) Id for the company that this customer record is for. |
tier | integer (Tier) Id for the customer's tier |
price_schedule | integer Id for the price schedule assigned to the customer |
service_zone | integer (Service Zone) Customer's service zone |
license_type | integer (Business License Type) Customer's business license type |
payment_term | any (Payment Term) Deprecated field, please use payment_option instead |
payment_methods | any (Payment Methods) Deprecated field, please use payment_option instead |
available_payment_options | object (Customer Payment Option) Payment option available for customer |
status | integer (Customer Account Status) Id for the customer's status |
external_ids | object (ExternalIds) Set of key-value pairs for storing external system IDs. Key value can be up to 36 characters long. |
object (Address) | |
object (Address) |
{- "state": "string",
- "managers": [
- 0
], - "next_contact_date": "2019-08-24",
- "nickname": "string",
- "external_id": "string",
- "ext_acct_id": "string",
- "license_number": "string",
- "old_license_number": "string",
- "license_inactive": true,
- "business_identifier": "string",
- "ein": "string",
- "directions": "string",
- "delivery_preferences": "string",
- "shipping_charge": "string",
- "brand": "string",
- "name": "string",
- "dba": "string",
- "business_license_name": "string",
- "description": "string",
- "address": "string",
- "unit_number": "string",
- "zipcode": "string",
- "city": "string",
- "county": "string",
- "country": "string",
- "lat": "string",
- "long": "string",
- "phone": "string",
- "phone_extension": "string",
- "email": "user@example.com",
- "notes": "string",
- "archived": true,
- "delinquent": true,
- "discount_percent": "string",
- "owner": 0,
- "tier": 0,
- "price_schedule": 0,
- "service_zone": 0,
- "license_type": 0,
- "payment_term": null,
- "payment_methods": null,
- "available_payment_options": { },
- "status": 0,
- "external_ids": { },
- "corporate_address": {
- "address": "string",
- "unit_number": "string",
- "city": "string",
- "county": "string",
- "state": "string",
- "zipcode": "string"
}, - "delivery_address": {
- "address": "string",
- "unit_number": "string",
- "city": "string",
- "county": "string",
- "state": "string",
- "zipcode": "string"
}
}
{- "id": 0,
- "state": "string",
- "managers": [
- 0
], - "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "next_contact_date": "2019-08-24",
- "nickname": "string",
- "external_id": "string",
- "ext_acct_id": "string",
- "license_number": "string",
- "old_license_number": "string",
- "license_inactive": true,
- "business_identifier": "string",
- "ein": "string",
- "directions": "string",
- "delivery_preferences": "string",
- "currency": "string",
- "shipping_charge": "string",
- "brand": "string",
- "name": "string",
- "dba": "string",
- "business_license_name": "string",
- "description": "string",
- "address": "string",
- "unit_number": "string",
- "zipcode": "string",
- "city": "string",
- "county": "string",
- "country": "string",
- "lat": "string",
- "long": "string",
- "phone": "string",
- "phone_extension": "string",
- "email": "user@example.com",
- "notes": "string",
- "leaflink_last_views": "2019-08-24T14:15:22Z",
- "leaflink_source": true,
- "archived": true,
- "delinquent": true,
- "discount_percent": "string",
- "owner": 0,
- "partner": 0,
- "tier": 0,
- "price_schedule": 0,
- "service_zone": 0,
- "license_type": 0,
- "payment_term": 0,
- "payment_methods": [
- 0
], - "available_payment_options": [
- null
], - "status": 0,
- "external_ids": { },
- "corporate_address": {
- "address": "string",
- "unit_number": "string",
- "city": "string",
- "county": "string",
- "state": "string",
- "zipcode": "string"
}, - "delivery_address": {
- "address": "string",
- "unit_number": "string",
- "city": "string",
- "county": "string",
- "state": "string",
- "zipcode": "string"
}
}
Retrieve a customer by ID.
id required | integer A unique integer value identifying this company customer. |
fields_include | string Include only specific fields in the response, separated by commas. |
fields_exclude | string Exclude specific fields in the response, separated by commas. |
include_children | string Include additional fields in the response. Available values include |
{- "id": 0,
- "state": "string",
- "managers": [
- 0
], - "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "next_contact_date": "2019-08-24",
- "nickname": "string",
- "external_id": "string",
- "ext_acct_id": "string",
- "license_number": "string",
- "old_license_number": "string",
- "license_inactive": true,
- "business_identifier": "string",
- "ein": "string",
- "directions": "string",
- "delivery_preferences": "string",
- "currency": "string",
- "shipping_charge": "string",
- "brand": "string",
- "name": "string",
- "dba": "string",
- "business_license_name": "string",
- "description": "string",
- "address": "string",
- "unit_number": "string",
- "zipcode": "string",
- "city": "string",
- "county": "string",
- "country": "string",
- "lat": "string",
- "long": "string",
- "phone": "string",
- "phone_extension": "string",
- "email": "user@example.com",
- "notes": "string",
- "leaflink_last_views": "2019-08-24T14:15:22Z",
- "leaflink_source": true,
- "archived": true,
- "delinquent": true,
- "discount_percent": "string",
- "owner": 0,
- "partner": 0,
- "tier": 0,
- "price_schedule": 0,
- "service_zone": 0,
- "license_type": 0,
- "payment_term": 0,
- "payment_methods": [
- 0
], - "available_payment_options": [
- null
], - "status": 0,
- "external_ids": { },
- "corporate_address": {
- "address": "string",
- "unit_number": "string",
- "city": "string",
- "county": "string",
- "state": "string",
- "zipcode": "string"
}, - "delivery_address": {
- "address": "string",
- "unit_number": "string",
- "city": "string",
- "county": "string",
- "state": "string",
- "zipcode": "string"
}
}
Update a customer by ID.
id required | integer A unique integer value identifying this company customer. |
state | string (State) State abbreviation |
managers | Array of integers unique Ids for the sales reps assigned to this customer. |
next_contact_date | string <date> (Next contact date) Date for the next contact, YYYY-MM-DD |
nickname | string (Nickname) <= 200 characters Alternate name for the customer |
external_id | string (External ID) <= 100 characters Id of the customer in a 3rd party system |
ext_acct_id | string (Accounting Service External ID) Id of the customer in QuickBooks Online. |
license_number | string (License Number) <= 100 characters License Number |
old_license_number | string or null <= 100 characters Old license number for the customer |
license_inactive | boolean (License Inactive) Is the license inactive for this customer? |
business_identifier | string (Business Identifier / UBI) <= 100 characters Company identifier distinct from license numbers |
ein | string (EIN Number) <= 100 characters Company's federal EIN number. DEPRECATED for writes. For Customers linked to LeafLink Buyers (partner_id=Company.id), this field is read-only and inherited directly from the linked LeafLink Buyer Company. For Customers not linked to LeafLink Buyer Companies (partner_id=null), this field will return null. |
directions | string (Directions) <= 3000 characters Directions to the customer's location |
delivery_preferences | string (Delivery Preferences) Customer delivery preferences. These will show up as footnotes on orders placed by the customer. |
shipping_charge | string <decimal> (Shipping charge) Additional shipping charge |
brand | string (Brand Name) <= 400 characters Brand name associated with the customer |
name | string (Name) <= 400 characters Customer name |
dba | string (DBA) <= 400 characters DBA of customer |
business_license_name | string (Business License Name) <= 400 characters Business License Name |
description | string (Description) <= 4000 characters Additional information about the customer |
website | string <uri> (Website) <= 400 characters Customer's website |
address | string (Address) <= 400 characters Customer's address |
unit_number | string (Unit #) Unit # for the address |
zipcode | string (Zipcode) <= 6 characters Zipcode |
city | string (City) <= 400 characters City |
county | string (County) <= 400 characters County |
country | string (Country) <= 400 characters Country |
lat | string <decimal> (Lat) Location latitude |
long | string <decimal> (Long) Location longitude |
phone | string (Phone) <= 400 characters Phone Number |
phone_extension | string <= 400 characters Phone Extension |
string <email> <= 255 characters Email address | |
notes | string (Notes) <= 3000 characters Other information about the customer |
archived | boolean (Is Archived) Is the customer record archived? |
delinquent | boolean (Delinquent Customer) Is this customer delinquent on billing? |
discount_percent | string <decimal> (Discount Percent) Discount percent for orders from this customer. |
owner | integer (Owner) Id for the company that this customer record is for. |
tier | integer (Tier) Id for the customer's tier |
price_schedule | integer Id for the price schedule assigned to the customer |
service_zone | integer (Service Zone) Customer's service zone |
license_type | integer (Business License Type) Customer's business license type |
available_payment_options | object (Customer Payment Option) Payment option available for customer |
payment_term | any (Payment Term) Deprecated field, please use payment_option instead |
payment_methods | any (Payment Methods) Deprecated field, please use payment_option instead |
status | integer (Customer Account Status) Id for the customer's status |
external_ids | object (ExternalIds) Set of key-value pairs for storing external system IDs. Key value can be up to 36 characters long. |
object (Address) | |
object (Address) |
{- "state": "string",
- "managers": [
- 0
], - "next_contact_date": "2019-08-24",
- "nickname": "string",
- "external_id": "string",
- "ext_acct_id": "string",
- "license_number": "string",
- "old_license_number": "string",
- "license_inactive": true,
- "business_identifier": "string",
- "ein": "string",
- "directions": "string",
- "delivery_preferences": "string",
- "shipping_charge": "string",
- "brand": "string",
- "name": "string",
- "dba": "string",
- "business_license_name": "string",
- "description": "string",
- "address": "string",
- "unit_number": "string",
- "zipcode": "string",
- "city": "string",
- "county": "string",
- "country": "string",
- "lat": "string",
- "long": "string",
- "phone": "string",
- "phone_extension": "string",
- "email": "user@example.com",
- "notes": "string",
- "archived": true,
- "delinquent": true,
- "discount_percent": "string",
- "owner": 0,
- "tier": 0,
- "price_schedule": 0,
- "service_zone": 0,
- "license_type": 0,
- "available_payment_options": { },
- "payment_term": null,
- "payment_methods": null,
- "status": 0,
- "external_ids": { },
- "corporate_address": {
- "address": "string",
- "unit_number": "string",
- "city": "string",
- "county": "string",
- "state": "string",
- "zipcode": "string"
}, - "delivery_address": {
- "address": "string",
- "unit_number": "string",
- "city": "string",
- "county": "string",
- "state": "string",
- "zipcode": "string"
}
}
{- "id": 0,
- "state": "string",
- "managers": [
- 0
], - "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "next_contact_date": "2019-08-24",
- "nickname": "string",
- "external_id": "string",
- "ext_acct_id": "string",
- "license_number": "string",
- "old_license_number": "string",
- "license_inactive": true,
- "business_identifier": "string",
- "ein": "string",
- "directions": "string",
- "delivery_preferences": "string",
- "currency": "string",
- "shipping_charge": "string",
- "brand": "string",
- "name": "string",
- "dba": "string",
- "business_license_name": "string",
- "description": "string",
- "address": "string",
- "unit_number": "string",
- "zipcode": "string",
- "city": "string",
- "county": "string",
- "country": "string",
- "lat": "string",
- "long": "string",
- "phone": "string",
- "phone_extension": "string",
- "email": "user@example.com",
- "notes": "string",
- "leaflink_last_views": "2019-08-24T14:15:22Z",
- "leaflink_source": true,
- "archived": true,
- "delinquent": true,
- "discount_percent": "string",
- "owner": 0,
- "partner": 0,
- "tier": 0,
- "price_schedule": 0,
- "service_zone": 0,
- "license_type": 0,
- "payment_term": 0,
- "payment_methods": [
- 0
], - "available_payment_options": [
- null
], - "status": 0,
- "external_ids": { },
- "corporate_address": {
- "address": "string",
- "unit_number": "string",
- "city": "string",
- "county": "string",
- "state": "string",
- "zipcode": "string"
}, - "delivery_address": {
- "address": "string",
- "unit_number": "string",
- "city": "string",
- "county": "string",
- "state": "string",
- "zipcode": "string"
}
}
Archive a customer by ID.
id required | integer A unique integer value identifying this company customer. |
{- "id": 0,
- "state": "string",
- "managers": [
- 0
], - "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "next_contact_date": "2019-08-24",
- "nickname": "string",
- "external_id": "string",
- "ext_acct_id": "string",
- "license_number": "string",
- "old_license_number": "string",
- "license_inactive": true,
- "business_identifier": "string",
- "ein": "string",
- "directions": "string",
- "delivery_preferences": "string",
- "currency": "string",
- "shipping_charge": "string",
- "brand": "string",
- "name": "string",
- "dba": "string",
- "business_license_name": "string",
- "description": "string",
- "address": "string",
- "unit_number": "string",
- "zipcode": "string",
- "city": "string",
- "county": "string",
- "country": "string",
- "lat": "string",
- "long": "string",
- "phone": "string",
- "phone_extension": "string",
- "email": "user@example.com",
- "notes": "string",
- "leaflink_last_views": "2019-08-24T14:15:22Z",
- "leaflink_source": true,
- "archived": true,
- "delinquent": true,
- "discount_percent": "string",
- "owner": 0,
- "partner": 0,
- "tier": 0,
- "price_schedule": 0,
- "service_zone": 0,
- "license_type": 0,
- "payment_term": 0,
- "payment_methods": [
- 0
], - "available_payment_options": [
- null
], - "status": 0,
- "external_ids": { },
- "corporate_address": {
- "address": "string",
- "unit_number": "string",
- "city": "string",
- "county": "string",
- "state": "string",
- "zipcode": "string"
}, - "delivery_address": {
- "address": "string",
- "unit_number": "string",
- "city": "string",
- "county": "string",
- "state": "string",
- "zipcode": "string"
}
}
The Contact
model represents the contact information a user has stored as a company resource within LeafLink.
List all contacts for all active companies where the user has the MANAGE_CRM permission.
Can be filtered by id, creation date, last modified date, first name, and last name.
The contact's associated CompanyCustomer
s can be retrieved at /api/v2/contacts/{id}/customers/?
modified__lt | string Filter by modified__lt |
modified__lte | string Filter by modified__lte |
modified__gt | string Filter by modified__gt |
modified__gte | string Filter by modified__gte |
id | number Filter by the exact id of the contact |
last_name | string Filter by the last name of a contact. |
last_name__in | string Filter by last_name__in |
last_name__startswith | string Filter by last_name__startswith |
created_on__lt | string Filter by created_on datetime, less than. |
created_on__lte | string Filter by created_on datetime, less than or equal to. |
created_on__gt | string Filter by created_on datetime, greater than. |
created_on__gte | string Filter by created_on datetime, greater than or equal to. |
company_slug | string Filter by owner Company slug. |
first_name | string Filter by the first name of a contact. |
first_name__in | string Filter by first_name__in |
first_name__startswith | string Filter by first_name__startswith |
owner | number Filter by one or multiple company ids, separated by commas. |
delete | string Filter by contact deletion status |
limit | integer Number of results to return per page. |
offset | integer The initial index from which to return the results. |
{- "count": 0,
- "results": [
- {
- "id": 0,
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "owner": 0,
- "first_name": "string",
- "last_name": "string",
- "email": "user@example.com",
- "secondary_email": "user@example.com",
- "role": "string",
- "description": "string",
- "phone": "string",
- "phone_extension": "string",
- "secondary_phone": "string",
- "secondary_phone_extension": "string",
- "delete": true
}
]
}
Create a new contact.
owner required | integer (Owner) |
first_name required | string (First name) [ 1 .. 30 ] characters |
last_name | string (Last name) <= 30 characters |
string or null <email> (Email address) <= 255 characters | |
secondary_email | string or null <email> (Secondary email address) <= 255 characters |
role | string or null (Position) <= 400 characters Position or role at company |
description | string or null (Description) <= 1500 characters An overview of the contact |
phone | string or null (Phone) <= 400 characters Phone Number of Brand |
phone_extension | string or null (Phone Extension) <= 20 characters |
secondary_phone | string or null (Secondary Phone) <= 400 characters Secondary Phone Number of Brand |
secondary_phone_extension | string or null (Secondary Phone Extension) <= 20 characters |
delete | boolean (Contact deleted) Is this Contact marked as deleted? |
{- "owner": 0,
- "first_name": "string",
- "last_name": "string",
- "email": "user@example.com",
- "secondary_email": "user@example.com",
- "role": "string",
- "description": "string",
- "phone": "string",
- "phone_extension": "string",
- "secondary_phone": "string",
- "secondary_phone_extension": "string",
- "delete": true
}
{- "id": 0,
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "owner": 0,
- "first_name": "string",
- "last_name": "string",
- "email": "user@example.com",
- "secondary_email": "user@example.com",
- "role": "string",
- "description": "string",
- "phone": "string",
- "phone_extension": "string",
- "secondary_phone": "string",
- "secondary_phone_extension": "string",
- "delete": true
}
Retrieve an individual contact by ID.
id required | integer A unique integer value identifying this contact. |
{- "id": 0,
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "owner": 0,
- "first_name": "string",
- "last_name": "string",
- "email": "user@example.com",
- "secondary_email": "user@example.com",
- "role": "string",
- "description": "string",
- "phone": "string",
- "phone_extension": "string",
- "secondary_phone": "string",
- "secondary_phone_extension": "string",
- "delete": true
}
Update an existing contact by ID.
id required | integer A unique integer value identifying this contact. |
owner required | integer (Owner) |
first_name required | string (First name) [ 1 .. 30 ] characters |
last_name | string (Last name) <= 30 characters |
string or null <email> (Email address) <= 255 characters | |
secondary_email | string or null <email> (Secondary email address) <= 255 characters |
role | string or null (Position) <= 400 characters Position or role at company |
description | string or null (Description) <= 1500 characters An overview of the contact |
phone | string or null (Phone) <= 400 characters Phone Number of Brand |
phone_extension | string or null (Phone Extension) <= 20 characters |
secondary_phone | string or null (Secondary Phone) <= 400 characters Secondary Phone Number of Brand |
secondary_phone_extension | string or null (Secondary Phone Extension) <= 20 characters |
delete | boolean (Contact deleted) Is this Contact marked as deleted? |
{- "owner": 0,
- "first_name": "string",
- "last_name": "string",
- "email": "user@example.com",
- "secondary_email": "user@example.com",
- "role": "string",
- "description": "string",
- "phone": "string",
- "phone_extension": "string",
- "secondary_phone": "string",
- "secondary_phone_extension": "string",
- "delete": true
}
{- "id": 0,
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "owner": 0,
- "first_name": "string",
- "last_name": "string",
- "email": "user@example.com",
- "secondary_email": "user@example.com",
- "role": "string",
- "description": "string",
- "phone": "string",
- "phone_extension": "string",
- "secondary_phone": "string",
- "secondary_phone_extension": "string",
- "delete": true
}
The CompanyActivityEntry
model represents a CRM action taken by a staff member that relates to a customer, with an optional description.
List all CompanyActivityEntry
objects of companies the requester has
CRM management access for.
date__lt | string Filter by entered activity datetime, less than. |
date__lte | string Filter by entered activity datetime, less than or equal to. |
date__gt | string Filter by entered activity datetime, greater than. |
date__gte | string Filter by entered activity datetime, greater than or equal to. |
entry | string Filter by activity entry descriptions. |
entry__in | string Filter by entry__in |
entry__startswith | string Filter by entry__startswith |
modified__lt | string Filter by the datetime the object was last modified, less than. |
modified__lte | string Filter by the datetime the object was last modified, less than or equal to. |
modified__gt | string Filter by the datetime the object was last modified, greater than. |
modified__gte | string Filter by the datetime the object was last modified, greater than or equal to. |
id | number Filter by id |
created_on__lt | string Filter by created_on datetime, less than. |
created_on__lte | string Filter by created_on datetime, less than or equal to. |
created_on__gt | string Filter by created_on datetime, greater than. |
created_on__gte | string Filter by created_on datetime, greater than or equal to. |
owner | number Filter by owner ID. |
author | number Filter by author ID. |
company | number Filter by associated company ID. |
customer | number Filter by associated customer ID. |
staff | number Filter by associated staff ID. |
type | string Filter by activity type. |
brand | number Filter by associated brand ID. |
contact | number Filter by associated contact ID. |
company_slug | string Filter by Company slug |
delete | string Filter by deleted or non-deleted entries. |
limit | integer Number of results to return per page. |
offset | integer The initial index from which to return the results. |
{- "count": 0,
- "results": [
- {
- "id": 0,
- "type": "string",
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "date": "2019-08-24T14:15:22Z",
- "entry": "string",
- "delete": true,
- "owner": 0,
- "author": 0,
- "company": 0,
- "customer": 0,
- "staff": 0,
- "brand": 0,
- "contact": 0
}
]
}
Create a new CompanyActivityEntry
object for a company you have CRM
management access for.
type required | string (Type) |
date | string <date-time> (Date) |
entry required | string (Message) [ 1 .. 4000 ] characters Message |
delete | boolean (Activity deleted) Is this Activity marked as deleted? |
owner required | integer (Company that owns Entry) Company that owns activity entry |
author required | integer (Activity Entry Author) Author who entered Activity |
company | integer or null (Company entry is about) Company entry is about |
customer | integer or null (Customer Company entry is about) Company entry is about |
staff | integer or null (Staff entry is focused on) Staff entry is focused on |
brand | integer or null (Brand) |
contact | integer or null (Contact) |
{- "type": "string",
- "date": "2019-08-24T14:15:22Z",
- "entry": "string",
- "delete": true,
- "owner": 0,
- "author": 0,
- "company": 0,
- "customer": 0,
- "staff": 0,
- "brand": 0,
- "contact": 0
}
{- "id": 0,
- "type": "string",
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "date": "2019-08-24T14:15:22Z",
- "entry": "string",
- "delete": true,
- "owner": 0,
- "author": 0,
- "company": 0,
- "customer": 0,
- "staff": 0,
- "brand": 0,
- "contact": 0
}
Get a CompanyActivityEntry
by ID.
id required | integer A unique integer value identifying this company activity entry. |
{- "id": 0,
- "type": "string",
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "date": "2019-08-24T14:15:22Z",
- "entry": "string",
- "delete": true,
- "owner": 0,
- "author": 0,
- "company": 0,
- "customer": 0,
- "staff": 0,
- "brand": 0,
- "contact": 0
}
Update an individual CompanyActivityEntry
by ID.
id required | integer A unique integer value identifying this company activity entry. |
type required | string (Type) |
date | string <date-time> (Date) |
entry required | string (Message) [ 1 .. 4000 ] characters Message |
delete | boolean (Activity deleted) Is this Activity marked as deleted? |
owner required | integer (Company that owns Entry) Company that owns activity entry |
author required | integer (Activity Entry Author) Author who entered Activity |
company | integer or null (Company entry is about) Company entry is about |
customer | integer or null (Customer Company entry is about) Company entry is about |
staff | integer or null (Staff entry is focused on) Staff entry is focused on |
brand | integer or null (Brand) |
contact | integer or null (Contact) |
{- "type": "string",
- "date": "2019-08-24T14:15:22Z",
- "entry": "string",
- "delete": true,
- "owner": 0,
- "author": 0,
- "company": 0,
- "customer": 0,
- "staff": 0,
- "brand": 0,
- "contact": 0
}
{- "id": 0,
- "type": "string",
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "date": "2019-08-24T14:15:22Z",
- "entry": "string",
- "delete": true,
- "owner": 0,
- "author": 0,
- "company": 0,
- "customer": 0,
- "staff": 0,
- "brand": 0,
- "contact": 0
}
The CompanyCustomerStatus
represents a set of customizable states for customers in the sales funnel.
List all CompanyCustomerStatus
objects available for use.
limit | integer Number of results to return per page. |
offset | integer The initial index from which to return the results. |
{- "count": 0,
- "results": [
- {
- "id": 0,
- "state": "string",
- "order": 1,
- "description": "string",
- "owner": 0,
- "is_stock": true,
- "hex_color": "string"
}
]
}
Create a new customer status.
state required | string (Customer Status) [ 1 .. 40 ] characters Customer Status State |
order | integer (Sort Order) [ 1 .. 2147483647 ] Sort order, lower is first. |
description | string or null (Description) <= 1500 characters Description of status |
owner required | integer (Company) The Company that created the custom status. |
is_stock | boolean (Is a LeafLink Stock Status) Is this a stock LeafLink status? |
hex_color | string or null (Hex Color) <= 40 characters Hex color for customer status |
{- "state": "string",
- "order": 1,
- "description": "string",
- "owner": 0,
- "is_stock": true,
- "hex_color": "string"
}
{- "id": 0,
- "state": "string",
- "order": 1,
- "description": "string",
- "owner": 0,
- "is_stock": true,
- "hex_color": "string"
}
Retrieve a CompanyCustomerStatus
by ID.
id required | integer A unique integer value identifying this company customer status. |
{- "id": 0,
- "state": "string",
- "order": 1,
- "description": "string",
- "owner": 0,
- "is_stock": true,
- "hex_color": "string"
}
Update an existing customer status by ID.
id required | integer A unique integer value identifying this company customer status. |
state required | string (Customer Status) [ 1 .. 40 ] characters Customer Status State |
order | integer (Sort Order) [ 1 .. 2147483647 ] Sort order, lower is first. |
description | string or null (Description) <= 1500 characters Description of status |
owner required | integer (Company) The Company that created the custom status. |
is_stock | boolean (Is a LeafLink Stock Status) Is this a stock LeafLink status? |
hex_color | string or null (Hex Color) <= 40 characters Hex color for customer status |
{- "state": "string",
- "order": 1,
- "description": "string",
- "owner": 0,
- "is_stock": true,
- "hex_color": "string"
}
{- "id": 0,
- "state": "string",
- "order": 1,
- "description": "string",
- "owner": 0,
- "is_stock": true,
- "hex_color": "string"
}
The CompanyCustomerTier
represents a set of read only objects depicting a customer's tier in relationship to a company.
List all CompanyCustomerTier
objects available for use.
limit | integer Number of results to return per page. |
offset | integer The initial index from which to return the results. |
{- "count": 0,
- "results": [
- {
- "id": 0,
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "rank": "string",
- "sort": 2147483647
}
]
}
Retrieve a CompanyCustomerTier
by ID.
id required | integer A unique integer value identifying this company customer tier. |
{- "id": 0,
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "rank": "string",
- "sort": 2147483647
}
List companies the requesting user is a staff member of.
limit | integer Number of results to return per page. |
offset | integer The initial index from which to return the results. |
{- "count": 0,
- "results": [
- {
- "address": "string",
- "announcement": "string",
- "apply_ancillary_tax": true,
- "apply_arms_length_tax": true,
- "batch_enabled": true,
- "business_identifier": "string",
- "business_license_name": "string",
- "buyer": true,
- "seller": true,
- "city": "string",
- "dba": "string",
- "description": "string",
- "has_accting": true,
- "hide_attached_packages": true,
- "id": 0,
- "name": "string",
- "slug": "string",
- "state": "string",
- "sts_enabled": true,
- "zipcode": "string"
}
]
}
Retrieve an individual company.
id required | integer The id for the company. |
{- "address": "string",
- "announcement": "string",
- "apply_ancillary_tax": true,
- "apply_arms_length_tax": true,
- "batch_enabled": true,
- "business_identifier": "string",
- "business_license_name": "string",
- "buyer": true,
- "seller": true,
- "city": "string",
- "dba": "string",
- "description": "string",
- "has_accting": true,
- "hide_attached_packages": true,
- "id": 0,
- "name": "string",
- "slug": "string",
- "state": "string",
- "sts_enabled": true,
- "zipcode": "string"
}
List all staff members.
company | string Filter by company id |
is_admin | string Filter by admin status, |
is_active | string Filter by active status, |
company_slug | string Filter by company slug |
limit | integer Number of results to return per page. |
offset | integer The initial index from which to return the results. |
{- "count": 0,
- "results": [
- {
- "id": 0,
- "user": 0,
- "company": 0,
- "is_admin": true,
- "is_active": true,
- "is_poc": true,
- "email": "string",
- "phone": "string",
- "identification_number": "string",
- "display_name": "string",
- "username": "string"
}
]
}
Retrieve an individual staff member.
id required | integer The staff member id. |
{- "id": 0,
- "user": 0,
- "company": 0,
- "is_admin": true,
- "is_active": true,
- "is_poc": true,
- "email": "string",
- "phone": "string",
- "identification_number": "string",
- "display_name": "string",
- "username": "string"
}
List all licenses for a user's companies.
You can list the licenses associated with
a company's products at /companies/{company_id}/licenses
number__in | string Filter by number__in |
number | string Filter by number |
company_slug | string Filter by company_slug |
id | number Filter by id |
limit | integer Number of results to return per page. |
offset | integer The initial index from which to return the results. |
{- "count": 0,
- "results": [
- {
- "id": 0,
- "number": "string",
- "type": "string",
- "display_type": "string",
- "classification": "string"
}
]
}
Retrieve an individual license by ID.
id required | integer A unique integer value identifying this license. |
{- "id": 0,
- "number": "string",
- "type": "string",
- "display_type": "string",
- "classification": "string"
}
List all licenses types available on LeafLink.
You can list the license types associated with
a company's products at /companies/{company_id}/license-types
limit | integer Number of results to return per page. |
offset | integer The initial index from which to return the results. |
{- "count": 0,
- "results": [
- {
- "id": 0,
- "type": "string",
- "display_type": "string",
- "classification": "string",
- "state": 0,
- "require_ein": true,
- "has_medical_line_items": true,
- "active_for_registration": true,
- "description": "string",
- "pre_2018_CA": true,
- "post_2018_CA": true,
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "state_abbr": "string"
}
]
}
Retrieve an individual license type by ID.
id required | integer A unique integer value identifying this license type. |
{- "id": 0,
- "type": "string",
- "display_type": "string",
- "classification": "string",
- "state": 0,
- "require_ein": true,
- "has_medical_line_items": true,
- "active_for_registration": true,
- "description": "string",
- "pre_2018_CA": true,
- "post_2018_CA": true,
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z",
- "state_abbr": "string"
}
List all brands.
Retrieved per company with the company query parameter or with the following path parameter, /companies/{company_id}/brands/
company__in | string Filter by a list of company ids. |
company | string Filter by company id. |
company_slug | string Filter by a company slug. |
limit | integer Number of results to return per page. |
offset | integer The initial index from which to return the results. |
{- "count": 0,
- "results": [
- {
- "id": 0,
- "name": "string",
- "company": 0,
- "description": "string",
}
]
}
View all promotional codes associated with brands under the company access scope.
company_slug | string Filter by company_slug |
brand | string Filter by brand |
code | string Filter by code |
limit | integer Number of results to return per page. |
offset | integer The initial index from which to return the results. |
{- "count": 0,
- "results": [
- {
- "id": 0,
- "brand": 0,
- "code": "string",
- "discount_type": "%",
- "discount_amount": "string",
- "start_date": "2019-08-24T14:15:22Z",
- "end_date": "2019-08-24T14:15:22Z"
}
]
}
Create a new promotional code, unique to brand and code.
brand required | integer (Brand) |
code required | string (Code) [ 1 .. 100 ] characters |
discount_type | string (Discount Type) Value: "%" |
discount_amount | string <decimal> (Percent discount) Percent discount for Order |
start_date required | string <date-time> (Start date) |
end_date required | string <date-time> (End date) |
{- "brand": 0,
- "code": "string",
- "discount_type": "%",
- "discount_amount": "string",
- "start_date": "2019-08-24T14:15:22Z",
- "end_date": "2019-08-24T14:15:22Z"
}
{- "id": 0,
- "brand": 0,
- "code": "string",
- "discount_type": "%",
- "discount_amount": "string",
- "start_date": "2019-08-24T14:15:22Z",
- "end_date": "2019-08-24T14:15:22Z"
}
View a specific promotional code to which the current user has access.
id required | string |
{- "id": 0,
- "brand": 0,
- "code": "string",
- "discount_type": "%",
- "discount_amount": "string",
- "start_date": "2019-08-24T14:15:22Z",
- "end_date": "2019-08-24T14:15:22Z"
}
Update a promotional code's start date and end date fields.
id required | string |
brand required | integer (Brand) |
code required | string (Code) [ 1 .. 100 ] characters |
discount_type | string (Discount Type) Value: "%" |
discount_amount | string <decimal> (Percent discount) Percent discount for Order |
start_date required | string <date-time> (Start date) |
end_date required | string <date-time> (End date) |
{- "brand": 0,
- "code": "string",
- "discount_type": "%",
- "discount_amount": "string",
- "start_date": "2019-08-24T14:15:22Z",
- "end_date": "2019-08-24T14:15:22Z"
}
{- "id": 0,
- "brand": 0,
- "code": "string",
- "discount_type": "%",
- "discount_amount": "string",
- "start_date": "2019-08-24T14:15:22Z",
- "end_date": "2019-08-24T14:15:22Z"
}
List all reports generated under the company access scope. For legacy auth, only reports of types to which the user has permissions will be shown in the list.
company_slug | string Filter by company slug. |
limit | integer Number of results to return per page. |
offset | integer The initial index from which to return the results. |
{- "count": 0,
- "results": [
- {
- "number": "e3fa0eee-0f60-45ea-9b9d-9cab5dc9a86e",
- "user": 0,
- "status": "running",
- "report_type": "orders-assigned",
- "request_time": "2019-08-24T14:15:22Z",
- "complete_time": "2019-08-24T14:15:22Z",
- "company": 0,
- "query": { },
- "to_email": "string"
}
]
}
Report download viewset
report_type required | string (Report type) Enum: "orders-assigned" "orders-received" "orders-sent" "orders-report" "ordered-products" "accounts-receivable" "customer-value" "sales-rep-activity-feed" "brand-performance" "brand-owner-brand-performance" "brand-owner-inventory-overview" |
company required | integer (Company) Company orders export refers to |
query | object (Query) |
{- "report_type": "orders-assigned",
- "company": 0,
- "query": { }
}
{- "number": "e3fa0eee-0f60-45ea-9b9d-9cab5dc9a86e",
- "user": 0,
- "status": "running",
- "report_type": "orders-assigned",
- "request_time": "2019-08-24T14:15:22Z",
- "complete_time": "2019-08-24T14:15:22Z",
- "company": 0,
- "query": { },
- "to_email": "string"
}
Retrieve an individual report by ID
number required | string <uuid> |
{- "number": "e3fa0eee-0f60-45ea-9b9d-9cab5dc9a86e",
- "user": 0,
- "status": "running",
- "report_type": "orders-assigned",
- "request_time": "2019-08-24T14:15:22Z",
- "complete_time": "2019-08-24T14:15:22Z",
- "company": 0,
- "query": { },
- "to_email": "string"
}
id | string <uuid> Unique id generated by LeafLink |
short_id | string The Order No. displayed in the user interface |
status | string Enum: "Draft" "Submitted" "Accepted" "Backorder" "Fulfilled" "Shipped" "Complete" "Rejected" "Combined" "Cancelled" Order status |
type | string License type for the order |
object Company on the buy side of the order | |
object Company on the sell side of the order | |
source | string Describes whether this was a buyer or seller generated order |
object User who created the order. If BGO, full staff member details. If SGO, the staff member's name. | |
created_on | string <date-time> Date and time that the order was created |
last_edited_on | string <date-time> Date and time that the order was last edited |
currency | string Currency used in the order |
Array of objects | |
subtotal | number |
shipping_charge | number |
discount | number |
tax | number |
total | number |
object | |
payment_term | any (Payment Term) Deprecated field, please use payment_option instead |
payment_methods | any (Payment Methods) Deprecated field, please use payment_option instead |
payment_due_date | string <date> Date the payment is due |
ship_date | string <date-time> Date and time the order was shipped |
shipping_details | string Shipping notes added by the seller |
is_delivered | boolean |
delivered_date | string Date and time the order was delivered |
notes | string Additional notes added by the seller |
sales_reps | Array of strings Names of the sales reps assigned to the order |
object (Delivery Address) Read only delivery address as provided during order creation. |
{- "id": "d8240c79-7c90-4177-8c46-919b5577a4c0",
- "short_id": "5577a4c0",
- "status": "Shipped",
- "type": "Adult Use",
- "buyer": {
- "id": 4231,
- "name": "Green Fields",
- "address": "123 Yale St",
- "unit_number": null,
- "city": "Denver",
- "state": "CO",
- "zip": "80033",
- "phone": null,
- "licenses": [
- {
- "id": 4344,
- "number": "402R-00000",
- "type": "Recreational",
- "classification": "Store"
}
], - "email": "greenfields@gmail.com"
}, - "seller": {
- "id": 2499,
- "name": "Liquid Labs",
- "address": "8001 East Boulder Street, Suite A",
- "unit_number": null,
- "city": "Denver",
- "state": "CO",
- "zip": "80036",
- "phone": "123-456-7890",
- "licenses": [
- {
- "id": 2400,
- "number": "404R-00001",
- "type": "Recreational",
- "classification": "MIPS"
}, - {
- "id": 4949,
- "number": "404-00002",
- "type": "Medical",
- "classification": "MIPS"
}
]
}, - "source": "BGO",
- "created_by": {
- "id": 4265,
- "name": "John Doe",
- "username": "johngreenfields",
- "email": "john@greeenfields.com"
}, - "created_on": "2020-07-12T10:40:00.681487-06:00",
- "last_edited_on": "2020-07-14T14:13:53.753792-06:00",
- "currency": "USD",
- "line_items": [
- {
- "product": {
- "id": 237808,
- "sku": "3bb8021c3a214690f0e9",
- "name": "Cartridge - Blueberry",
- "brand": {
- "id": 312,
- "name": "Premium Cartridges"
}, - "unit_of_measure": "Unit",
- "unit_denomination": "One",
- "base_unit_of_measure": "Gram",
- "base_units_per_unit": null,
- "sold_in_multiples": true,
- "units_per_case": 10,
- "category": {
- "id": 1,
- "name": "Cartridges",
- "slug": "cartridge",
- "description": "Cartridge"
}, - "sub_category": {
- "id": 10,
- "name": "Disposable",
- "slug": "disposable",
- "description": "Disposable",
- "category": 1
}
}, - "quantity": 1,
- "sold_by": "Case",
- "price": 220,
- "total": 220
}, - {
- "product": {
- "id": 357811,
- "sku": "14632acc1f10568a0dec",
- "name": "Cartridge - Strawberry",
- "brand": {
- "id": 312,
- "name": "Premium Cartridges"
}, - "unit_of_measure": "Unit",
- "unit_denomination": "One",
- "base_unit_of_measure": "Gram",
- "base_units_per_unit": null,
- "sold_in_multiples": true,
- "units_per_case": 10,
- "category": {
- "id": 1,
- "name": "Cartridges",
- "slug": "cartridge",
- "description": "Cartridge"
}, - "sub_category": {
- "id": 10,
- "name": "Disposable",
- "slug": "disposable",
- "description": "Disposable",
- "category": 1
}
}, - "quantity": 2,
- "sold_by": "Case",
- "price": 200,
- "total": 400
}
], - "subtotal": 620,
- "shipping_charge": 0,
- "discount": 0,
- "tax": 0,
- "total": 620,
- "payable_to": {
- "name": "Labs Capital",
- "address": "321 Broad Street, Suite 12",
- "city": "Denver",
- "state": "CO",
- "zipcode": "80001"
}, - "payment_term": null,
- "payment_methods": [ ],
- "payment_due_date": null,
- "ship_date": null,
- "shipping_details": null,
- "is_delivered": false,
- "delivered_date": null,
- "notes": "",
- "sales_reps": [
- "Lauren Doe"
], - "delivery_address": {
- "address": "17034 Highway 17",
- "city": "Moffat",
- "state": "CO",
- "unit_number": "1A",
- "zipcode": "81143"
}
}
List orders sent
seller | string Filter results by seller id |
fields_include | string Include only specific fields in the response, separated by commas. |
fields_exclude | string Exclude specific fields in the response, separated by commas. |
fields_add | string Include additional fields in the response. Available values include |
include_children | string Include additional fields in the response. Available values include |
seller__slug__iexact | string Filter results the company slug on the seller side of the order. Case-insensitive exact match. |
modified__gte | string Filter by the modified date, greater than or equal to |
modified__lte | string Filter by the modified date, less than or equal to |
modified__gt | string Filter by the modified date, greater than |
modified__lt | string Filter by the modified date, less than |
external_id_seller | string Filter by the number assigned to the order by the seller company |
external_id_seller__icontains | string Filter by the number assigned to the order by the seller company. Case-insensitive containment match: returns orders that contain the string |
created_on__gte | string Filter by the created_on date, greater than or equal to |
created_on__lte | string Filter by the created_on date, less than or equal to |
created_on__gt | string Filter by the created_on date, greater than |
created_on__lt | string Filter by the created_on date, less than |
order_id | string Filter by the external_id_seller or the number |
number | string Filter by the unique order number generated by LeafLink. |
status | string Enum: "submitted" "accepted" "backorder" "fulfilled" "shipped" "complete" "rejected" "combined" "cancelled" Filter by status. |
brand | number Filter by brand id |
brand__in | number Filter by multiple brand ids, separated by commas |
paid | string Filter by paid status |
sales_rep | number Filter by the user id of the sales rep assigned to an order. This is the id field on the company-staff object. |
classification | string Filter by the classification of the license-type associated to the order |
user | string Filter by the username, first name, or last name of the last person who edited the order |
connected_to_metrc | string Filter by whether or not they have metrc packages associated with their line items |
manual | string Filter by whether or not orders were manually created by the company on the seller side of the order |
company_slug | string Filter by the slug of seller company |
service_zone | number Filter Orders by service zone of customers |
limit | integer Number of results to return per page. |
offset | integer The initial index from which to return the results. |
external_id_key | string Filter for orders that match external_ids key:values. Must be used with external_id_values. |
external_id_values | string Filter for orders that match external_ids key:values. Multiple values separated by a comma. Must be used with external_id_key. |
{- "count": 1,
- "next": null,
- "previous": null,
- "results": [
- {
- "id": "d8240c79-7c90-4177-8c46-919b5577a4c0",
- "short_id": "5577a4c0",
- "status": "Shipped",
- "type": "Adult Use",
- "buyer": {
- "id": 4231,
- "name": "Green Fields",
- "address": "123 Yale St",
- "unit_number": null,
- "city": "Denver",
- "state": "CO",
- "zip": "80033",
- "phone": null,
- "licenses": [
- {
- "id": 4344,
- "number": "402R-00000",
- "type": "Recreational",
- "classification": "Store"
}
], - "email": "greenfields@gmail.com"
}, - "seller": {
- "id": 2499,
- "name": "Liquid Labs",
- "address": "8001 East Boulder Street, Suite A",
- "unit_number": null,
- "city": "Denver",
- "state": "CO",
- "zip": "80036",
- "phone": "123-456-7890",
- "licenses": [
- {
- "id": 2400,
- "number": "404R-00001",
- "type": "Recreational",
- "classification": "MIPS"
}, - {
- "id": 4949,
- "number": "404-00002",
- "type": "Medical",
- "classification": "MIPS"
}
]
}, - "source": "BGO",
- "created_by": {
- "id": 4265,
- "name": "John Doe",
- "username": "johngreenfields",
- "email": "john@greeenfields.com"
}, - "created_on": "2020-07-12T10:40:00.681487-06:00",
- "last_edited_on": "2020-07-14T14:13:53.753792-06:00",
- "currency": "USD",
- "line_items": [
- {
- "product": {
- "id": 237808,
- "sku": "3bb8021c3a214690f0e9",
- "name": "Cartridge - Blueberry",
- "brand": {
- "id": 312,
- "name": "Premium Cartridges"
}, - "unit_of_measure": "Unit",
- "unit_denomination": "One",
- "base_unit_of_measure": "Gram",
- "base_units_per_unit": null,
- "sold_in_multiples": true,
- "units_per_case": 10,
- "category": {
- "name": "Cartridges",
- "slug": "cartridge",
- "description": "Cartridge"
}, - "sub_category": {
- "id": 10,
- "name": "Disposable",
- "slug": "disposable",
- "description": "Disposable",
- "category": 1
}
}, - "quantity": 1,
- "sold_by": "Case",
- "price": 220,
- "total": 220
}, - {
- "product": {
- "id": 357811,
- "sku": "14632acc1f10568a0dec",
- "name": "Cartridge - Strawberry",
- "brand": {
- "id": 312,
- "name": "Premium Cartridges"
}, - "unit_of_measure": "Unit",
- "unit_denomination": "One",
- "base_unit_of_measure": "Gram",
- "base_units_per_unit": null,
- "sold_in_multiples": true,
- "units_per_case": 10,
- "category": {
- "name": "Cartridges",
- "slug": "cartridge",
- "description": "Cartridge"
}, - "sub_category": {
- "id": 10,
- "name": "Disposable",
- "slug": "disposable",
- "description": "Disposable",
- "category": 1
}
}, - "quantity": 2,
- "sold_by": "Case",
- "price": 200,
- "total": 400
}
], - "subtotal": 620,
- "shipping_charge": 0,
- "discount": 0,
- "tax": 0,
- "total": 620,
- "payable_to": {
- "name": "Labs Capital",
- "address": "321 Broad Street, Suite 12",
- "city": "Denver",
- "state": "CO",
- "zipcode": "80001"
}, - "payment_term": null,
- "payment_methods": [ ],
- "payment_due_date": null,
- "ship_date": null,
- "shipping_details": null,
- "is_delivered": false,
- "delivered_date": null,
- "notes": "",
- "sales_reps": [
- "Lauren Doe"
], - "delivery_address": {
- "address": "17034 Highway 17",
- "city": "Moffat",
- "state": "CO",
- "unit_number": "1A",
- "zipcode": "81143"
}
}
]
}
List all products.
company | string Filter by company id. |
limit | integer Number of results to return per page. |
offset | integer The initial index from which to return the results. |
{- "count": 0,
- "results": [
- {
- "id": 0,
- "is_low": true,
- "source": "string",
- "name": "string",
- "sku": "string",
- "brand": "string",
- "quantity": 0,
- "company": 0,
- "unit_of_measure": "string",
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z"
}
]
}
Create a new product.
is_low required | boolean Indicates if the inventory level is low. |
source required | string [ 1 .. 400 ] characters Describes the source system providing the data. |
name required | string [ 1 .. 400 ] characters Product name |
sku required | string [ 1 .. 400 ] characters Product sku |
brand required | string [ 1 .. 400 ] characters Product brand |
quantity required | integer Product inventory level |
company required | integer Company id |
unit_of_measure required | string [ 1 .. 400 ] characters Product unit of measure |
{- "is_low": true,
- "source": "string",
- "name": "string",
- "sku": "string",
- "brand": "string",
- "quantity": 0,
- "company": 0,
- "unit_of_measure": "string"
}
{- "id": 0,
- "is_low": true,
- "source": "string",
- "name": "string",
- "sku": "string",
- "brand": "string",
- "quantity": 0,
- "company": 0,
- "unit_of_measure": "string",
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z"
}
Retrieve an individual product.
id required | integer The id for the product. |
{- "id": 0,
- "is_low": true,
- "source": "string",
- "name": "string",
- "sku": "string",
- "brand": "string",
- "quantity": 0,
- "company": 0,
- "unit_of_measure": "string",
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z"
}
Update an existing product.
id required | integer The id for the product. |
is_low | boolean Indicates if the inventory level is low. |
source | string [ 1 .. 400 ] characters Describes the source system providing the data. |
name | string [ 1 .. 400 ] characters Product name |
sku | string [ 1 .. 400 ] characters Product sku |
brand | string [ 1 .. 400 ] characters Product brand |
quantity | integer Product inventory level |
company | integer Company id |
unit_of_measure | string [ 1 .. 400 ] characters Product unit of measure |
{- "is_low": true,
- "source": "string",
- "name": "string",
- "sku": "string",
- "brand": "string",
- "quantity": 0,
- "company": 0,
- "unit_of_measure": "string"
}
{- "id": 0,
- "is_low": true,
- "source": "string",
- "name": "string",
- "sku": "string",
- "brand": "string",
- "quantity": 0,
- "company": 0,
- "unit_of_measure": "string",
- "created_on": "2019-08-24T14:15:22Z",
- "modified": "2019-08-24T14:15:22Z"
}