openapi: 3.0.0
info:
title: LeafLink Marketplace V2 API
description: '# Introduction
## HTTP Request Notes
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](https://developer.leaflink.com/brands/api/authorization/#sandbox-environments)
Request paths must end in a slash character (''/''). Those that do not will return a 400 (Bad Request) response.
## Dynamic Responses
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.
'
termsOfService: https://leaflink.com/terms-and-conditions/
contact:
email: support@leaflink.com
version: ''
security:
- Token: []
paths:
/activity-entries/:
get:
operationId: activity-entries_list
summary: List
description: "List all `CompanyActivityEntry` objects of companies the requester has\n CRM management access for."
parameters:
- name: date__lt
in: query
description: Filter by entered activity datetime, less than.
required: false
schema:
type: string
- name: date__lte
in: query
description: Filter by entered activity datetime, less than or equal to.
required: false
schema:
type: string
- name: date__gt
in: query
description: Filter by entered activity datetime, greater than.
required: false
schema:
type: string
- name: date__gte
in: query
description: Filter by entered activity datetime, greater than or equal to.
required: false
schema:
type: string
- name: entry
in: query
description: Filter by activity entry descriptions.
required: false
schema:
type: string
- name: entry__in
in: query
description: Filter by entry__in
required: false
schema:
type: string
- name: entry__startswith
in: query
description: Filter by entry__startswith
required: false
schema:
type: string
- name: modified__lt
in: query
description: Filter by the datetime the object was last modified, less than.
required: false
schema:
type: string
- name: modified__lte
in: query
description: Filter by the datetime the object was last modified, less than or equal to.
required: false
schema:
type: string
- name: modified__gt
in: query
description: Filter by the datetime the object was last modified, greater than.
required: false
schema:
type: string
- name: modified__gte
in: query
description: Filter by the datetime the object was last modified, greater than or equal to.
required: false
schema:
type: string
- name: id
in: query
description: Filter by id
required: false
schema:
type: number
- name: created_on__lt
in: query
description: Filter by created_on datetime, less than.
required: false
schema:
type: string
- name: created_on__lte
in: query
description: Filter by created_on datetime, less than or equal to.
required: false
schema:
type: string
- name: created_on__gt
in: query
description: Filter by created_on datetime, greater than.
required: false
schema:
type: string
- name: created_on__gte
in: query
description: Filter by created_on datetime, greater than or equal to.
required: false
schema:
type: string
- name: owner
in: query
description: Filter by owner ID (supports multiple values, comma-separated).
required: false
schema:
type: string
- name: owner_id
in: query
description: Filter by owner ID (supports multiple values, comma-separated).
required: false
schema:
type: string
- name: author
in: query
description: Filter by author ID (supports multiple values, comma-separated).
required: false
schema:
type: string
- name: author_id
in: query
description: Filter by author ID (supports multiple values, comma-separated).
required: false
schema:
type: string
- name: company
in: query
description: Filter by associated company ID (supports multiple values, comma-separated).
required: false
schema:
type: string
- name: company_id
in: query
description: Filter by associated company ID (supports multiple values, comma-separated).
required: false
schema:
type: string
- name: customer
in: query
description: Filter by associated customer ID (supports multiple values, comma-separated).
required: false
schema:
type: string
- name: customer_id
in: query
description: Filter by associated customer ID (supports multiple values, comma-separated).
required: false
schema:
type: string
- name: staff
in: query
description: Filter by associated staff ID (supports multiple values, comma-separated).
required: false
schema:
type: string
- name: staff_id
in: query
description: Filter by associated staff ID (supports multiple values, comma-separated).
required: false
schema:
type: string
- name: type
in: query
description: Filter by activity type (supports multiple values, comma-separated).
required: false
schema:
type: string
- name: brand
in: query
description: Filter by associated brand ID (supports multiple values, comma-separated).
required: false
schema:
type: string
- name: brand_id
in: query
description: Filter by associated brand ID (supports multiple values, comma-separated).
required: false
schema:
type: string
- name: contact
in: query
description: Filter by associated contact ID (supports multiple values, comma-separated).
required: false
schema:
type: string
- name: contact_id
in: query
description: Filter by associated contact ID (supports multiple values, comma-separated).
required: false
schema:
type: string
- name: company_slug
in: query
description: Filter by Company slug
required: false
schema:
type: string
- name: delete
in: query
description: Filter by deleted or non-deleted entries.
required: false
schema:
type: boolean
- name: is_deleted
in: query
description: Filter by deleted or non-deleted entries (alternative to delete parameter).
required: false
schema:
type: boolean
- name: fields_include
in: query
description: Include only specific fields in the response, separated by commas.
required: false
schema:
type: string
- name: fields_exclude
in: query
description: Exclude specific fields in the response, separated by commas.
required: false
schema:
type: string
- name: fields_add
in: query
description: Include additional fields in the response. Available values include `created_by` and `last_changed_by`
required: false
schema:
type: string
- name: search
in: query
description: Search by entry field
required: false
schema:
type: string
- name: ordering
in: query
description: 'Order results by field (prefix with ''-'' for descending). Available fields: customer__nickname, customer__name'
required: false
schema:
type: string
- name: limit
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
- name: offset
in: query
description: The initial index from which to return the results.
required: false
schema:
type: integer
responses:
'200':
description: ''
content:
application/json:
schema:
required:
- count
- results
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/CompanyActivityEntry'
tags:
- activity-entries
post:
operationId: activity-entries_create
summary: Create
description: "Create a new `CompanyActivityEntry` object for a company you have CRM\n management access for."
requestBody:
$ref: '#/components/requestBodies/CompanyActivityEntry'
responses:
'201':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/CompanyActivityEntry'
tags:
- activity-entries
parameters: []
/activity-entries/{id}/:
get:
operationId: activity-entries_read
summary: Read
description: Get a `CompanyActivityEntry` by ID.
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/CompanyActivityEntry'
tags:
- activity-entries
patch:
operationId: activity-entries_partial_update
summary: Update
description: Update an individual `CompanyActivityEntry` by ID.
requestBody:
$ref: '#/components/requestBodies/CompanyActivityEntry'
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/CompanyActivityEntry'
tags:
- activity-entries
delete:
operationId: activity-entries_delete
summary: Delete
description: "Set the `delete` flag on a `CompanyActivityEntry` to true. These can\n be filtered out in list requests."
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/CompanyActivityEntry'
tags:
- activity-entries
parameters:
- name: id
in: path
description: A unique integer value identifying this company activity entry.
required: true
schema:
type: integer
/batch-documents/:
get:
operationID: batch-documents_list
summary: List batch documents
description: List all batch documents.
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/BatchDocumentNew'
tags:
- batch-documents
post:
operationID: batch-documents_create
summary: Upload a batch document
description: Upload a new batch document.
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
document:
description: uri for the file
type: string
format: binary
batch:
description: id for the Batch to attach this document to.
type: integer
summary:
description: Additional information about the document.
type: string
maxLength: 350
required:
- document
- batch
required: true
responses:
'201':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BatchDocumentNew'
tags:
- batch-documents
/batch-documents/{id}/:
get:
operationId: batch-documents_read
summary: Retrieve a batch document
description: Retrieve an individual batch document.
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BatchDocumentNew'
tags:
- batch-documents
delete:
operationId: batch-documents_delete
summary: Delete a batch document
description: Delete a batch document.
responses:
'204':
description: ''
tags:
- batch-documents
parameters:
- name: id
in: path
description: The id for the batch document.
required: true
schema:
type: integer
/batches/:
get:
operationId: batches_list
summary: List batches
description: List all batches.
For legacy auth, retrieved per company with the owner query parameter or
with the following path parameter, /companies/{company_id}/batches/
parameters:
- name: batch_date__lt
in: query
description: Filter by batch_date__lt
required: false
schema:
type: string
- name: batch_date__lte
in: query
description: Filter by batch_date__lte
required: false
schema:
type: string
- name: batch_date__gt
in: query
description: Filter by batch_date__gt
required: false
schema:
type: string
- name: batch_date__gte
in: query
description: Filter by batch_date__gte
required: false
schema:
type: string
- name: id
in: query
description: Filter by one or multiple batch ids, separated by commas.
required: false
schema:
type: number
- name: owner
in: query
description: Filter by one or multiple company ids, separated by commas.
required: false
schema:
type: number
- name: company_slug
in: query
description: Filter by owner company slug.
required: false
schema:
type: string
- name: production_batch_number
in: query
description: Filter by one or multiple production_batch_numbers, separated by commas.
required: false
schema:
type: string
- name: products
in: query
description: Filter by one or multiple product ids, separated by commas.
required: false
schema:
type: number
- name: thc
in: query
description: Filter by a range of THC percent.
required: false
schema:
type: string
- name: thca
in: query
description: Filter by a range of THCa percent.
required: false
schema:
type: string
- name: total_thc
in: query
description: Filter by a range of total THC percent.
required: false
schema:
type: string
- name: cbd
in: query
description: Filter by a range of CBD percent.
required: false
schema:
type: string
- name: cbda
in: query
description: Filter by a range of CBDa percent.
required: false
schema:
type: string
- name: cbg
in: query
description: Filter by a range of CBG percent.
required: false
schema:
type: string
- name: cbn
in: query
description: Filter by a range of CBN percent.
required: false
schema:
type: string
- name: total_cannabinoids
in: query
description: Filter by a range of total cannabinoids percent.
required: false
schema:
type: string
- name: limit
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
- name: offset
in: query
description: The initial index from which to return the results.
required: false
schema:
type: integer
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/BatchResponse'
tags:
- batches
post:
operationId: batches_create
summary: Create a batch
description: Create a new batch.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/BatchCreate'
required: true
responses:
'201':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BatchResponse'
tags:
- batches
parameters: []
/batches/{id}/:
get:
operationId: batches__read
summary: Retrieve a batch
description: Retrieve an individual batch.
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BatchResponse'
tags:
- batches
patch:
operationId: batches__partial_update
summary: Update a batch
description: Update an existing batch.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/BatchUpdate'
required: true
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BatchResponse'
tags:
- batches
delete:
operationId: batches__delete
summary: Delete a batch
description: Delete a batch.
responses:
'204':
description: ''
tags:
- batches
parameters:
- name: id
description: The id for the batch.
in: path
required: true
schema:
type: string
/inventory/items/:
get:
operationId: inventory-items_list
summary: List
description: "List all inventory items. By default this returns non-archived items - you can query for archived items\
\ by \nincluding the \"include_archived\" query parameter.\n\n__⚠️ WARNING - BETA FEATURE:__ This API is in active\
\ development and is subject to change.\n"
parameters:
- name: include_archived
in: query
description: Filter by archived status
required: false
schema:
type: boolean
- name: product
in: query
description: Filter by product ID
required: false
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/InventoryItem'
tags:
- inventory-items
post:
operationId: inventory-items_create
summary: Create
description: '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.
'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/InventoryItemCreate'
required: true
responses:
'201':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InventoryItem'
tags:
- inventory-items
parameters: []
/inventory/items/{id}/:
get:
operationId: inventory-items_read
summary: Read
description: 'Get inventory item by ID.
__⚠️ WARNING - BETA FEATURE:__ This API is in active development and is subject to change.
'
parameters:
- name: id
in: path
description: A unique integer value identifying this inventory item.
required: true
schema:
type: integer
- name: include_archived
in: query
description: Filter by the archived status. (False by default.)
required: false
schema:
type: boolean
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InventoryItem'
tags:
- inventory-items
patch:
operationId: inventory-items_partial_update
summary: Update
description: 'Update an existing inventory item by ID.
__⚠️ WARNING - BETA FEATURE:__ This API is in active development and is subject to change.
'
parameters:
- name: id
in: path
description: A unique integer value identifying this inventory item.
required: true
schema:
type: integer
- name: include_archived
in: query
description: Filter by the archived status. (False by default.)
required: false
schema:
type: boolean
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/InventoryItemUpdate'
required: true
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InventoryItem'
tags:
- inventory-items
/inventory/facilities/:
get:
operationId: facilities_list
summary: List
description: 'List all facilities.
__⚠️ WARNING - BETA FEATURE:__ This API is in active development and is subject to change.
'
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/Facility'
tags:
- facilities
/inventory/facilities/{id}/:
get:
operationId: facilities_read
summary: Read
description: 'Get facility by ID.
__⚠️ WARNING - BETA FEATURE:__ This API is in active development and is subject to change.
'
parameters:
- name: id
in: path
description: A unique integer value identifying this facility.
required: true
schema:
type: integer
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Facility'
tags:
- facilities
/brands/:
get:
operationId: brands_list
summary: List brands
description: List all brands.
Retrieved per company with the company query parameter or with the following
path parameter, /companies/{company_id}/brands/
parameters:
- name: company__in
in: query
description: Filter by a list of company ids.
required: false
schema:
type: string
- name: company
in: query
description: Filter by company id.
required: false
schema:
type: string
- name: company_slug
in: query
description: Filter by a company slug.
required: false
schema:
type: string
- name: limit
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
- name: offset
in: query
description: The initial index from which to return the results.
required: false
schema:
type: integer
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/BrandResponse'
tags:
- brands
parameters: []
/brands/{id}/:
get:
operationId: brands_read
summary: Retrieve a brand
description: Retrieve an individual brand.
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BrandResponse'
tags:
- brands
parameters:
- name: id
in: path
description: The id for the brand.
required: true
schema:
type: integer
/companies/:
get:
operationId: companies_list
summary: List companies
description: List companies the requesting user is a staff member of.
parameters:
- name: limit
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
- name: offset
in: query
description: The initial index from which to return the results.
required: false
schema:
type: integer
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/CompanyResponse'
tags:
- companies
parameters: []
/companies/{id}/:
get:
operationId: companies_read
summary: Retrieve a company
description: Retrieve an individual company.
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/CompanyResponse'
tags:
- companies
parameters:
- name: id
in: path
description: The id for the company.
required: true
schema:
type: integer
/company-staff/:
get:
operationId: company-staff_list
summary: List staff members
description: List all staff members.
parameters:
- name: company
in: query
description: Filter by company id
required: false
schema:
type: string
- name: is_admin
in: query
description: Filter by admin status, `true` or `false`
required: false
schema:
type: string
- name: is_active
in: query
description: Filter by active status, `true` or `false`
required: false
schema:
type: string
- name: company_slug
in: query
description: Filter by company slug
required: false
schema:
type: string
- name: limit
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
- name: offset
in: query
description: The initial index from which to return the results.
required: false
schema:
type: integer
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/CompanyStaffResponse'
tags:
- company-staff
parameters: []
/company-staff/{id}/:
get:
operationId: company-staff_read
summary: Retrieve a staff member
description: Retrieve an individual staff member.
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/CompanyStaffResponse'
tags:
- company-staff
parameters:
- name: id
in: path
description: The staff member id.
required: true
schema:
type: integer
/contacts/:
get:
operationId: contacts_list
summary: List
description: '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/?`'
parameters:
- name: modified__lt
in: query
description: Filter by modified__lt
required: false
schema:
type: string
- name: modified__lte
in: query
description: Filter by modified__lte
required: false
schema:
type: string
- name: modified__gt
in: query
description: Filter by modified__gt
required: false
schema:
type: string
- name: modified__gte
in: query
description: Filter by modified__gte
required: false
schema:
type: string
- name: id
in: query
description: Filter by the exact id of the contact
required: false
schema:
type: number
- name: last_name
in: query
description: Filter by the last name of a contact.
required: false
schema:
type: string
- name: last_name__in
in: query
description: Filter by last_name__in
required: false
schema:
type: string
- name: last_name__startswith
in: query
description: Filter by last_name__startswith
required: false
schema:
type: string
- name: created_on__lt
in: query
description: Filter by created_on datetime, less than.
required: false
schema:
type: string
- name: created_on__lte
in: query
description: Filter by created_on datetime, less than or equal to.
required: false
schema:
type: string
- name: created_on__gt
in: query
description: Filter by created_on datetime, greater than.
required: false
schema:
type: string
- name: created_on__gte
in: query
description: Filter by created_on datetime, greater than or equal to.
required: false
schema:
type: string
- name: company_slug
in: query
description: Filter by owner Company slug.
required: false
schema:
type: string
- name: first_name
in: query
description: Filter by the first name of a contact.
required: false
schema:
type: string
- name: first_name__in
in: query
description: Filter by first_name__in
required: false
schema:
type: string
- name: first_name__startswith
in: query
description: Filter by first_name__startswith
required: false
schema:
type: string
- name: owner
in: query
description: Filter by one or multiple company ids, separated by commas.
required: false
schema:
type: number
- name: delete
in: query
description: Filter by contact deletion status
required: false
schema:
type: string
- name: limit
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
- name: offset
in: query
description: The initial index from which to return the results.
required: false
schema:
type: integer
responses:
'200':
description: ''
content:
application/json:
schema:
required:
- count
- results
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/Contact'
tags:
- contacts
post:
operationId: contacts_create
summary: Create
description: Create a new contact.
requestBody:
$ref: '#/components/requestBodies/Contact'
responses:
'201':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Contact'
tags:
- contacts
parameters: []
/contacts/{id}/:
get:
operationId: contacts_read
summary: Read
description: Retrieve an individual contact by ID.
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Contact'
tags:
- contacts
patch:
operationId: contacts_partial_update
summary: Update
description: Update an existing contact by ID.
requestBody:
$ref: '#/components/requestBodies/Contact'
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Contact'
tags:
- contacts
delete:
operationId: contacts_delete
summary: Delete
description: Set the `delete` flag to True on a contact by ID. Deleted objects can be filtered out in lists with query
parameters.
responses:
'204':
description: ''
tags:
- contacts
parameters:
- name: id
in: path
description: A unique integer value identifying this contact.
required: true
schema:
type: integer
/customer-statuses/:
get:
operationId: customer-statuses_list
summary: List
description: List all `CompanyCustomerStatus` objects available for use.
parameters:
- name: limit
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
- name: offset
in: query
description: The initial index from which to return the results.
required: false
schema:
type: integer
- name: fields_include
in: query
description: Include only specific fields in the response, separated by commas.
required: false
schema:
type: string
- name: fields_exclude
in: query
description: Exclude specific fields in the response, separated by commas.
required: false
schema:
type: string
- name: fields_add
in: query
description: Include additional fields in the response. Available values include `created_by` and `last_changed_by`
required: false
schema:
type: string
- name: id
in: query
description: Filter by id
required: false
schema:
type: integer
- name: state
in: query
description: Filter by state (case-insensitive contains match)
required: false
schema:
type: string
- name: order
in: query
description: Filter by order
required: false
schema:
type: integer
- name: description
in: query
description: Filter by description
required: false
schema:
type: string
- name: owner
in: query
description: Filter by owner ID
required: false
schema:
type: integer
- name: is_stock
in: query
description: Filter by is_stock
required: false
schema:
type: boolean
- name: hex_color
in: query
description: Filter by hex_color
required: false
schema:
type: string
- name: company_slug
in: query
description: Filter by Company slug
required: false
schema:
type: string
- name: search
in: query
description: Search by state or description
required: false
schema:
type: string
- name: ordering
in: query
description: Order results by field (prefix with '-' for descending)
required: false
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
required:
- count
- results
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/CompanyCustomerStatus'
tags:
- customer-statuses
post:
operationId: customer-statuses_create
summary: Create
description: Create a new customer status.
requestBody:
$ref: '#/components/requestBodies/CompanyCustomerStatus'
responses:
'201':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/CompanyCustomerStatus'
tags:
- customer-statuses
parameters: []
/customer-statuses/{id}/:
get:
operationId: customer-statuses__read
summary: Read
description: Retrieve a `CompanyCustomerStatus` by ID.
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/CompanyCustomerStatus'
tags:
- customer-statuses
parameters:
- name: id
in: path
description: A unique integer value identifying this company customer status.
required: true
schema:
type: integer
patch:
operationId: customer-statuses_partial_update
summary: Update
description: Update an existing customer status by ID.
requestBody:
$ref: '#/components/requestBodies/CompanyCustomerStatus'
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/CompanyCustomerStatus'
tags:
- customer-statuses
delete:
operationId: customer-statuses_delete
summary: Delete
description: Delete a customer status by ID.
responses:
'204':
description: ''
tags:
- customer-statuses
/customer-tiers/:
get:
operationId: customer-tiers_list
summary: List
description: List all `CompanyCustomerTier` objects available for use.
parameters:
- name: limit
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
- name: offset
in: query
description: The initial index from which to return the results.
required: false
schema:
type: integer
responses:
'200':
description: ''
content:
application/json:
schema:
required:
- count
- results
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/CompanyCustomerTier'
tags:
- customer-tiers
parameters: []
/customer-tiers/{id}/:
get:
operationId: customer-tiers__read
summary: Read
description: Retrieve a `CompanyCustomerTier` by ID.
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/CompanyCustomerTier'
tags:
- customer-tiers
parameters:
- name: id
in: path
description: A unique integer value identifying this company customer tier.
required: true
schema:
type: integer
/credits/:
get:
operationId: credits_list
summary: List
description: 'List all credits for companies the requester has CRM management access for.
Requires Token or Application authentication. Staff users need CAN_MANAGE_CRM permission;
Application auth requires CAN_READ_CRM role. Read-only (GET only).'
parameters:
- name: limit
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
- name: offset
in: query
description: The initial index from which to return the results.
required: false
schema:
type: integer
- name: ordering
in: query
description: Order results by field (prefix with '-' for descending). Supports id.
required: false
schema:
type: string
- name: status
in: query
description: Filter by status (active, used, cancelled). Supports multiple comma-separated values.
required: false
schema:
type: string
- name: reason
in: query
description: Filter by reason (leaflink_return, promo_new_customer, promo_existing_customer, etc.).
required: false
schema:
type: string
- name: brand
in: query
description: Filter by brand ID(s).
required: false
schema:
type: string
- name: customer
in: query
description: Filter by customer/CompanyCustomer ID(s).
required: false
schema:
type: string
- name: credit_date_after
in: query
description: Filter by credit date on or after this date (YYYY-MM-DD).
required: false
schema:
type: string
format: date
- name: credit_date_before
in: query
description: Filter by credit date on or before this date (YYYY-MM-DD).
required: false
schema:
type: string
format: date
- name: amount_min
in: query
description: Filter by minimum credit amount.
required: false
schema:
type: number
- name: amount_max
in: query
description: Filter by maximum credit amount.
required: false
schema:
type: number
- name: order
in: query
description: Filter by order UUID.
required: false
schema:
type: string
- name: company_slug
in: query
description: Filter by company slug.
required: false
schema:
type: string
- name: archived
in: query
description: Filter by archived status.
required: false
schema:
type: boolean
responses:
'200':
description: ''
content:
application/json:
schema:
required:
- count
- results
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/Credit'
tags:
- credits
parameters: []
/credits/{id}/:
get:
operationId: credits_read
summary: Read
description: 'Retrieve a single credit by ID. Requires Token or Application authentication.
Staff users need CAN_MANAGE_CRM permission; Application auth requires CAN_READ_CRM role.'
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Credit'
tags:
- credits
parameters:
- name: id
in: path
description: A unique integer value identifying this credit.
required: true
schema:
type: integer
/customers/:
get:
operationId: customers_list
summary: List customers
description: List customers for all active companies where the user is a member of.
parameters:
- name: fields_include
in: query
description: Include only specific fields in the response, separated by commas.
schema:
type: string
- name: fields_exclude
in: query
description: Exclude specific fields in the response, separated by commas.
schema:
type: string
- name: include_children
in: query
description: Include additional fields in the response. Available values include `tags`, `service_zone`, `managers`,
`contacts`, and `license_type`
schema:
type: string
- name: nickname
in: query
description: Filter by the customer's nickname.
required: false
schema:
type: string
- name: nickname__in
in: query
description: Filter by nickname__in
required: false
schema:
type: string
- name: nickname__startswith
in: query
description: Filter by nickname__startswith
required: false
schema:
type: string
- name: phone
in: query
description: Filter by the customer's business phone number.
required: false
schema:
type: string
- name: phone__in
in: query
description: Filter by phone__in
required: false
schema:
type: string
- name: phone__startswith
in: query
description: Filter by phone__startswith
required: false
schema:
type: string
- name: dba
in: query
description: Filter by the customer's dba.
required: false
schema:
type: string
- name: dba__in
in: query
description: Filter by dba__in
required: false
schema:
type: string
- name: dba__startswith
in: query
description: Filter by dba__startswith
required: false
schema:
type: string
- name: owner__slug
in: query
description: Filter by the slug of the Company that owns this Customer record.
required: false
schema:
type: string
- name: id__in
in: query
description: Filter by id__in
required: false
schema:
type: number
- name: id
in: query
description: Filter by id
required: false
schema:
type: number
- name: next_contact_date__lt
in: query
description: Filter by next_contact_date__lt
required: false
schema:
type: string
- name: next_contact_date__lte
in: query
description: Filter by next_contact_date__lte
required: false
schema:
type: string
- name: next_contact_date__gt
in: query
description: Filter by next_contact_date__gt
required: false
schema:
type: string
- name: next_contact_date__gte
in: query
description: Filter by next_contact_date__gte
required: false
schema:
type: string
- name: company_slug
in: query
description: Filter by the slug of the Company that owns this Customer record.
required: false
schema:
type: string
- name: external_id
in: query
description: Filter by the customer's external id.
required: false
schema:
type: string
- name: external_id__in
in: query
description: Filter by external_id__in
required: false
schema:
type: string
- name: external_id__startswith
in: query
description: Filter by external_id__startswith
required: false
schema:
type: string
- name: ein
in: query
description: Filter by the customer's EIN.
required: false
schema:
type: string
- name: ein__in
in: query
description: Filter by ein__in
required: false
schema:
type: string
- name: ein__startswith
in: query
description: Filter by ein__startswith
required: false
schema:
type: string
- name: discount_percent__lt
in: query
description: Filter by discount_percent__lt
required: false
schema:
type: number
- name: discount_percent__lte
in: query
description: Filter by discount_percent__lte
required: false
schema:
type: number
- name: discount_percent__gt
in: query
description: Filter by discount_percent__gt
required: false
schema:
type: number
- name: discount_percent__gte
in: query
description: Filter by discount_percent__gte
required: false
schema:
type: number
- name: old_license_number
in: query
description: Filter by the customer's previous license number.
required: false
schema:
type: string
- name: old_license_number__in
in: query
description: Filter by old_license_number__in
required: false
schema:
type: string
- name: old_license_number__startswith
in: query
description: Filter by old_license_number__startswith
required: false
schema:
type: string
- name: modified__lt
in: query
description: Filter by the datetime the object was last modified, less than.
required: false
schema:
type: string
- name: modified__lte
in: query
description: Filter by the datetime the object was last modified, less than or equal to.
required: false
schema:
type: string
- name: modified__gt
in: query
description: Filter by the datetime the object was last modified, greater than.
required: false
schema:
type: string
- name: modified__gte
in: query
description: Filter by the datetime the object was last modified, greater than or equal to.
required: false
schema:
type: string
- name: brand
in: query
description: Filter by the customer's associated brand.
required: false
schema:
type: string
- name: brand__in
in: query
description: Filter by brand__in
required: false
schema:
type: string
- name: brand__startswith
in: query
description: Filter by brand__startswith
required: false
schema:
type: string
- name: created_on__lt
in: query
description: Filter by created_on datetime, less than.
required: false
schema:
type: string
- name: created_on__lte
in: query
description: Filter by created_on datetime, less than or equal to.
required: false
schema:
type: string
- name: created_on__gt
in: query
description: Filter by created_on datetime, greater than.
required: false
schema:
type: string
- name: created_on__gte
in: query
description: Filter by created_on datetime, greater than or equal to.
required: false
schema:
type: string
- name: address
in: query
description: Filter by the customer's address.
required: false
schema:
type: string
- name: address__in
in: query
description: Filter by address__in
required: false
schema:
type: string
- name: address__startswith
in: query
description: Filter by address__startswith
required: false
schema:
type: string
- name: business_license_name
in: query
description: Filter by the customer's business license name.
required: false
schema:
type: string
- name: business_license_name__in
in: query
description: Filter by business_license_name__in
required: false
schema:
type: string
- name: business_license_name__startswith
in: query
description: Filter by business_license_name__startswith
required: false
schema:
type: string
- name: name
in: query
description: Filter by the customer's name.
required: false
schema:
type: string
- name: name__in
in: query
description: Filter by name__in
required: false
schema:
type: string
- name: name__startswith
in: query
description: Filter by name__startswith
required: false
schema:
type: string
- name: business_identifier
in: query
description: Filter by the customer's business identifier.
required: false
schema:
type: string
- name: business_identifier__in
in: query
description: Filter by business_identifier__in
required: false
schema:
type: string
- name: business_identifier__startswith
in: query
description: Filter by business_identifier__startswith
required: false
schema:
type: string
- name: license_number
in: query
description: Filter by the customer's license number.
required: false
schema:
type: string
- name: license_number__in
in: query
description: Filter by license_number__in
required: false
schema:
type: string
- name: license_number__startswith
in: query
description: Filter by license_number__startswith
required: false
schema:
type: string
- name: ext_acct_id
in: query
description: Filter by the customer's external account id.
required: false
schema:
type: string
- name: ext_acct_id__in
in: query
description: Filter by ext_acct_id__in
required: false
schema:
type: string
- name: ext_acct_id__startswith
in: query
description: Filter by ext_acct_id__startswith
required: false
schema:
type: string
- name: ext_acct_id__isnull
in: query
description: Filter by ext_acct_id__isnull
required: false
schema:
type: string
- name: email
in: query
description: Filter by the customer's email.
required: false
schema:
type: string
- name: email__in
in: query
description: Filter by email__in
required: false
schema:
type: string
- name: email__startswith
in: query
description: Filter by email__startswith
required: false
schema:
type: string
- name: website
in: query
description: Filter by the customer's website.
required: false
schema:
type: string
- name: website__in
in: query
description: Filter by website__in
required: false
schema:
type: string
- name: website__startswith
in: query
description: Filter by website__startswith
required: false
schema:
type: string
- name: owner
in: query
description: Filter by owner ID (supports multiple values, comma-separated).
required: false
schema:
type: string
- name: partner
in: query
description: Filter by partner ID (supports multiple values, comma-separated).
required: false
schema:
type: string
- name: tier
in: query
description: Filter by the ID of a customer's tier (supports multiple values, comma-separated).
required: false
schema:
type: string
- name: price_schedule
in: query
description: Filter by the ID of a customer's price schedule (supports multiple values, comma-separated).
required: false
schema:
type: string
- name: service_zone
in: query
description: Filter by the ID of a customer's service zone (supports multiple values, comma-separated).
required: false
schema:
type: string
- name: license_type
in: query
description: Filter by the ID of a customer's license type.
required: false
schema:
type: number
- name: license_inactive
in: query
description: Filter by the whether a customer's license is active.
required: false
schema:
type: boolean
- $ref: '#/components/parameters/PaymentTermFilter'
- $ref: '#/components/parameters/PaymentMethodFilter'
- name: status
in: query
description: Filter by the ID of a customer's status (supports multiple values, comma-separated).
required: false
schema:
type: string
- name: state
in: query
description: Filter by the ID of a customer's state (supports multiple values, comma-separated).
required: false
schema:
type: string
- name: leaflink_source
in: query
description: Filter by whether the customer was added by LeafLink.
required: false
schema:
type: boolean
- name: archived
in: query
description: Filter by whether the customer has been archived.
required: false
schema:
type: boolean
- name: is_archived
in: query
description: Filter by whether the customer has been archived (alternative to archived parameter).
required: false
schema:
type: boolean
- name: delinquent
in: query
description: Filter by whether the customer is delinquent.
required: false
schema:
type: boolean
- name: limit
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
- name: offset
in: query
description: The initial index from which to return the results.
required: false
schema:
type: integer
- name: external_id_key
in: query
description: Filter for orders that match external_ids key:values. Must be used with external_id_values.
schema:
type: string
- name: external_id_values
in: query
description: Filter for orders that match external_ids key:values. Multiple values separated by a comma. Must be
used with external_id_key.
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/CustomerResponse'
tags:
- customers
post:
operationId: customers_create
summary: Create a customer
description: Create a new customer.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerCreate'
required: true
responses:
'201':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerResponse'
tags:
- customers
parameters: []
/customers/{id}/:
get:
operationId: customers_read
summary: Retrieve a customer
description: Retrieve a customer by ID.
parameters:
- name: fields_include
in: query
description: Include only specific fields in the response, separated by commas.
schema:
type: string
- name: fields_exclude
in: query
description: Exclude specific fields in the response, separated by commas.
schema:
type: string
- name: include_children
in: query
description: Include additional fields in the response. Available values include `tags`, `service_zone`, `managers`,
`contacts`, and `license_type`
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerResponse'
tags:
- customers
patch:
operationId: customers_partial_update
summary: Update a customer
description: Update a customer by ID.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerUpdate'
required: true
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerResponse'
tags:
- customers
delete:
operationId: customers_delete
summary: Archive a customer
description: Archive a customer by ID.
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerResponse'
tags:
- customers
parameters:
- name: id
in: path
description: A unique integer value identifying this company customer.
required: true
schema:
type: integer
/license-types/:
get:
operationId: license-types_list
summary: List
description: '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'
parameters:
- name: limit
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
- name: offset
in: query
description: The initial index from which to return the results.
required: false
schema:
type: integer
responses:
'200':
description: ''
content:
application/json:
schema:
required:
- count
- results
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/LicenseType'
tags:
- license-types
parameters: []
/license-types/{id}/:
get:
operationId: license-types_read
summary: Read
description: Retrieve an individual license type by ID.
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/LicenseType'
tags:
- license-types
parameters:
- name: id
in: path
description: A unique integer value identifying this license type.
required: true
schema:
type: integer
/licenses/:
get:
operationId: licenses_list
summary: List
description: 'List all licenses for a user''s companies.
You can list the licenses associated with
a company''s products at /companies/{company_id}/licenses'
parameters:
- name: number__in
in: query
description: Filter by number__in
required: false
schema:
type: string
- name: number
in: query
description: Filter by number
required: false
schema:
type: string
- name: company_slug
in: query
description: Filter by company_slug
required: false
schema:
type: string
- name: id
in: query
description: Filter by id
required: false
schema:
type: number
- name: limit
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
- name: offset
in: query
description: The initial index from which to return the results.
required: false
schema:
type: integer
responses:
'200':
description: ''
content:
application/json:
schema:
required:
- count
- results
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/ComplianceLicense'
tags:
- licenses
parameters: []
/licenses/{id}/:
get:
operationId: licenses_read
summary: Read
description: Retrieve an individual license by ID.
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ComplianceLicense'
tags:
- licenses
parameters:
- name: id
in: path
description: A unique integer value identifying this license.
required: true
schema:
type: integer
/line-items/:
get:
operationId: line-items_list
summary: List line items
description: "List line items for all active companies where the user has the Manage Orders Received permission.\n \
\
\n
Line items can also be retrieved by order via /orders-received/{order_number}/line-items\n\
\
or by company via /companies/{company_id}/line-items/"
parameters:
- name: expand
in: query
description: Expand an id field into its full object. Supported values include `product`.
required: false
schema:
type: string
- name: id
in: query
description: Filter by id
required: false
schema:
type: number
- name: product__name
in: query
description: Filter by product name.
required: false
schema:
type: string
- name: product_id
in: query
description: Filter by product id.
required: false
schema:
type: string
- name: order
in: query
description: Filter by order number or external_id_seller. Multiple values may be separated by commas.
required: false
schema:
type: string
- name: is_sample
in: query
description: Filter by sample status.
required: false
schema:
type: string
- name: order__created_on__gte
in: query
description: Filter by Order created_on, greater than or equal to
required: false
schema:
type: string
- name: order__created_on__lte
in: query
description: Filter by Order created_on, less than or equal to
required: false
schema:
type: string
- name: order__ship_date__gte
in: query
description: Filter by Order ship_date, greater than or equal to
required: false
schema:
type: string
- name: order__ship_date__lte
in: query
description: Filter by Order ship_date, less than or equal to
required: false
schema:
type: string
- name: order__modified__gte
in: query
description: Filter by Order modified, greater than or equal to
required: false
schema:
type: string
- name: order__modified__lte
in: query
description: Filter by Order modified, less than or equal to
required: false
schema:
type: string
- name: order__customer__cities
in: query
description: Filter by Order Customer cities, separated by commas.
required: false
schema:
type: string
- name: order__customer__managers
in: query
description: Filter by Order Customer managers, separated by commas.
required: false
schema:
type: string
- name: order__customers
in: query
description: Filter by Order Customer, separated by commas.
required: false
schema:
type: string
- name: company_slug
in: query
description: Filter by seller company slug
required: false
schema:
type: string
- name: order__service_zone
in: query
description: Filter by order__service_zone
required: false
schema:
type: number
- name: limit
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
- name: offset
in: query
description: The initial index from which to return the results.
required: false
schema:
type: integer
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/LineItemResponse'
tags:
- line-items
post:
operationId: line-items_create
summary: Create line item
description: "Create a line item for an existing order.\n\n > ⚠️ **WARNING - BETA FEATURE**\n >\n > This API is in active\
\ development and is subject to change.\n"
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/LineItemCreate'
example:
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
x-s2o-overloaded: true
responses:
'201':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/LineItemResponse'
tags:
- line-items
x-s2o-warning: Operation line-items_create has multiple requestBodies
/line-items/{id}/:
get:
operationId: line-items_read
summary: Retrieve a line item
description: Retrieve an individual line item
parameters:
- name: expand
in: query
description: Expand an id field into its full object. Supported values include `product`.
required: false
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/LineItemResponse'
tags:
- line-items
patch:
operationId: line-items_partial_update
summary: Update a line item
description: Update an existing line item
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/LineItemUpdate'
required: true
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/LineItemResponse'
tags:
- line-items
delete:
operationId: line-items_delete
summary: Delete a line item
description: Delete a line item
responses:
'204':
description: ''
tags:
- line-items
parameters:
- name: id
in: path
description: A unique integer value identifying this ordered product.
required: true
schema:
type: integer
/order-event-logs/:
get:
operationId: order-event-logs_list
summary: List
description: List all order event logs.
parameters:
- name: id
in: query
description: Filter by id
required: false
schema:
type: number
- name: by
in: query
description: Filter Event Logs by the username, first name, or last name of the person whose event created it.
required: false
schema:
type: string
- name: order
in: query
description: Filter Event Logs by their associated order number.
required: false
schema:
type: string
- name: limit
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
- name: offset
in: query
description: The initial index from which to return the results.
required: false
schema:
type: integer
responses:
'200':
description: ''
content:
application/json:
schema:
required:
- count
- results
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/OrderEventLog'
tags:
- order-event-logs
parameters: []
/order-event-logs/{id}/:
get:
operationId: order-event-logs_read
summary: Read
description: Retrieve an individual order event log by id.
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/OrderEventLog'
tags:
- order-event-logs
parameters:
- name: id
in: path
description: A unique integer value identifying this order event log.
required: true
schema:
type: integer
/order-payments/:
get:
operationId: order-payments_list
summary: List payments
description: List payments for all active companies where the user has the Manage Orders Received permission.
Filter by order with /orders-received/{order_number}/payments/
parameters:
- name: limit
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
- name: offset
in: query
description: The initial index from which to return the results.
required: false
schema:
type: integer
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/OrderPaymentResponse'
tags:
- order-payments
post:
operationId: order-payments_create
summary: Create a payment
description: Create a new payment
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OrderPaymentCreate'
required: true
responses:
'201':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/OrderPaymentResponse'
tags:
- order-payments
parameters: []
/order-payments/{id}/:
get:
operationId: order-payments_read
summary: Retrieve a payment
description: Retrieve a payment by id.
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/OrderPaymentResponse'
tags:
- order-payments
parameters:
- name: id
in: path
description: A unique integer value identifying the order payment.
required: true
schema:
type: integer
/order-sales-reps/:
get:
operationId: order-sales-reps_list
summary: List
description: List all OrderSalesReps under the company access scope. For legacy auth, includes companies where the
user has the `Can Manage Orders Received` permission.
parameters:
- name: limit
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
- name: offset
in: query
description: The initial index from which to return the results.
required: false
schema:
type: integer
responses:
'200':
description: ''
content:
application/json:
schema:
required:
- count
- results
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/OrderSalesRepSerialzer'
tags:
- order-sales-reps
post:
operationId: order-sales-reps_create
summary: Create
description: Create a new OrderSalesRep.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OrderSalesRepSerialzer'
required: true
responses:
'201':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/OrderSalesRepSerialzer'
tags:
- order-sales-reps
parameters: []
/order-sales-reps/{id}/:
get:
operationId: order-sales-reps_read
summary: Read
description: Retrieve an individual OrderSalesRep by ID.
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/OrderSalesRepSerialzer'
tags:
- order-sales-reps
delete:
operationId: order-sales-reps_delete
summary: Delete
description: Remove OrderSalesRep object by ID.
responses:
'204':
description: ''
tags:
- order-sales-reps
parameters:
- name: id
in: path
description: A unique integer value identifying this order sales rep.
required: true
schema:
type: integer
/buyer/orders/:
get:
operationId: buyer-orders_list
summary: List orders
description: List orders sent
parameters:
- name: seller
in: query
description: Filter results by seller id
schema:
type: string
- name: fields_include
in: query
description: Include only specific fields in the response, separated by commas.
schema:
type: string
- name: fields_exclude
in: query
description: Exclude specific fields in the response, separated by commas.
schema:
type: string
- name: fields_add
in: query
description: Include additional fields in the response. Available values include `created_by` and `last_changed_by`
schema:
type: string
- name: include_children
in: query
description: Include additional fields in the response. Available values include `line_items`, `customer`, and `sales_reps`
schema:
type: string
- name: seller__slug__iexact
in: query
description: Filter results the company slug on the seller side of the order. Case-insensitive exact match.
required: false
schema:
type: string
- name: modified__gte
in: query
description: Filter by the modified date, greater than or equal to
required: false
schema:
type: string
- name: modified__lte
in: query
description: Filter by the modified date, less than or equal to
required: false
schema:
type: string
- name: modified__gt
in: query
description: Filter by the modified date, greater than
required: false
schema:
type: string
- name: modified__lt
in: query
description: Filter by the modified date, less than
required: false
schema:
type: string
- name: external_id_seller
in: query
description: Filter by the number assigned to the order by the seller company
required: false
schema:
type: string
- name: external_id_seller__icontains
in: query
description: 'Filter by the number assigned to the order by the seller company. Case-insensitive containment match:
returns orders that contain the string'
required: false
schema:
type: string
- name: created_on__gte
in: query
description: Filter by the created_on date, greater than or equal to
required: false
schema:
type: string
- name: created_on__lte
in: query
description: Filter by the created_on date, less than or equal to
required: false
schema:
type: string
- name: created_on__gt
in: query
description: Filter by the created_on date, greater than
required: false
schema:
type: string
- name: created_on__lt
in: query
description: Filter by the created_on date, less than
required: false
schema:
type: string
- name: order_id
in: query
description: Filter by the external_id_seller or the number
required: false
schema:
type: string
- name: number
in: query
description: Filter by the unique order number generated by LeafLink.
required: false
schema:
type: string
- name: status
in: query
description: Filter by status.
required: false
schema:
type: string
enum:
- submitted
- accepted
- backorder
- fulfilled
- shipped
- complete
- rejected
- combined
- cancelled
- name: brand
in: query
description: Filter by brand id
required: false
schema:
type: number
- name: brand__in
in: query
description: Filter by multiple brand ids, separated by commas
required: false
schema:
type: number
- name: paid
in: query
description: Filter by paid status
required: false
schema:
type: string
- name: sales_rep
in: query
description: Filter by the user id of the sales rep assigned to an order. This is the id field on the company-staff
object.
required: false
schema:
type: number
- name: classification
in: query
description: Filter by the classification of the license-type associated to the order
required: false
schema:
type: string
- name: user
in: query
description: Filter by the username, first name, or last name of the last person who edited the order
required: false
schema:
type: string
- name: connected_to_metrc
in: query
description: Filter by whether or not they have metrc packages associated with their line items
required: false
schema:
type: string
- name: manual
in: query
description: Filter by whether or not orders were manually created by the company on the seller side of the order
required: false
schema:
type: string
- name: company_slug
in: query
description: Filter by the slug of seller company
required: false
schema:
type: string
- name: service_zone
in: query
description: Filter Orders by service zone of customers
required: false
schema:
type: number
- name: limit
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
- name: offset
in: query
description: The initial index from which to return the results.
required: false
schema:
type: integer
- name: external_id_key
in: query
description: Filter for orders that match external_ids key:values. Must be used with external_id_values.
schema:
type: string
- name: external_id_values
in: query
description: Filter for orders that match external_ids key:values. Multiple values separated by a comma. Must be
used with external_id_key.
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
count:
type: integer
next:
type: string
format: uri
previous:
type: string
format: uri
results:
type: array
items:
$ref: '#/components/schemas/BuyerOrderResponse'
example:
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'
tags:
- buyer-orders
/orders-received/:
get:
operationId: orders-received_list
summary: List orders
description: List received orders for all active companies where the user has the Manage Orders Received permission.
Per company via /companies/{company_id}/orders-received/
parameters:
- name: fields_include
in: query
description: Include only specific fields in the response, separated by commas.
schema:
type: string
- name: fields_exclude
in: query
description: Exclude specific fields in the response, separated by commas.
schema:
type: string
- name: fields_add
in: query
description: Include additional fields in the response. Available values include `created_by` and `last_changed_by`
schema:
type: string
- name: include_children
in: query
description: Include additional fields in the response. Available values include `line_items`, `customer`, and `sales_reps`
schema:
type: string
- name: seller__slug__iexact
in: query
description: Filter results the company slug on the seller side of the order. Case-insensitive exact match.
required: false
schema:
type: string
- name: modified__gte
in: query
description: Filter by the modified date, greater than or equal to
required: false
schema:
type: string
- name: modified__lte
in: query
description: Filter by the modified date, less than or equal to
required: false
schema:
type: string
- name: modified__gt
in: query
description: Filter by the modified date, greater than
required: false
schema:
type: string
- name: modified__lt
in: query
description: Filter by the modified date, less than
required: false
schema:
type: string
- name: external_id_seller
in: query
description: Filter by the number assigned to the order by the seller company
required: false
schema:
type: string
- name: external_id_seller__icontains
in: query
description: 'Filter by the number assigned to the order by the seller company. Case-insensitive containment match:
returns orders that contain the string'
required: false
schema:
type: string
- name: created_on__gte
in: query
description: Filter by the created_on date, greater than or equal to
required: false
schema:
type: string
- name: created_on__lte
in: query
description: Filter by the created_on date, less than or equal to
required: false
schema:
type: string
- name: created_on__gt
in: query
description: Filter by the created_on date, greater than
required: false
schema:
type: string
- name: created_on__lt
in: query
description: Filter by the created_on date, less than
required: false
schema:
type: string
- name: order_id
in: query
description: Filter by the external_id_seller or the number
required: false
schema:
type: string
- name: number
in: query
description: Filter by the unique order number generated by LeafLink.
required: false
schema:
type: string
- name: status
in: query
description: Filter by status. Multiple statuses can be submitted as comma-separated list. Case Insensitive.
required: false
schema:
type: string
enum:
- draft
- submitted
- accepted
- backorder
- fulfilled
- shipped
- complete
- rejected
- combined
- cancelled
- name: status__not
in: query
description: Exclude by order status. Multiple statuses can be submitted as a comma-separated list. Case Insensitive.
required: false
schema:
type: string
enum:
- draft
- submitted
- accepted
- backorder
- fulfilled
- shipped
- complete
- rejected
- combined
- cancelled
- name: brand
in: query
description: Filter by brand id
required: false
schema:
type: number
- name: brand__in
in: query
description: Filter by multiple brand ids, separated by commas
required: false
schema:
type: number
- name: buyer
in: query
description: Filter by the id of the company on the buyer side of the order
required: false
schema:
type: string
- name: paid
in: query
description: Filter by paid status
required: false
schema:
type: string
- name: customer
in: query
description: Filter by the customer name or nickname for the company on the buyer side of the order
required: false
schema:
type: string
- name: sales_rep
in: query
description: Filter by the user id of the sales rep assigned to an order. This is the id field on the company-staff
object.
required: false
schema:
type: number
- name: classification
in: query
description: Filter by the classification of the license-type associated to the order
required: false
schema:
type: string
- name: user
in: query
description: Filter by the username, first name, or last name of the last person who edited the order
required: false
schema:
type: string
- name: connected_to_metrc
in: query
description: Filter by whether or not they have metrc packages associated with their line items
required: false
schema:
type: string
- name: manual
in: query
description: Filter by whether or not orders were manually created by the company on the seller side of the order
required: false
schema:
type: string
- name: company_slug
in: query
description: Filter by the slug of seller company
required: false
schema:
type: string
- name: service_zone
in: query
description: Filter Orders by service zone of customers
required: false
schema:
type: number
- name: limit
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
- name: offset
in: query
description: The initial index from which to return the results.
required: false
schema:
type: integer
- name: external_id_key
in: query
description: Filter for orders that match external_ids key:values. Must be used with external_id_values.
schema:
type: string
- name: external_id_values
in: query
description: Filter for orders that match external_ids key:values. Multiple values separated by a comma. Must be
used with external_id_key.
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/OrderResponse'
example:
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'
tags:
- orders-received
post:
operationId: orders-received_create
summary: Create an order
description: '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.
'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OrderCreate'
example:
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
responses:
'201':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/OrderResponse'
tags:
- orders-received
/orders-received/{number}/:
get:
operationId: orders-received_read
summary: Retrieve an order
description: Retrieve an individual order.
parameters:
- name: fields_include
in: query
description: Include only specific fields in the response, separated by commas.
schema:
type: string
- name: fields_exclude
in: query
description: Exclude specific fields in the response, separated by commas.
schema:
type: string
- name: fields_add
in: query
description: Include additional fields in the response. Available values include `created_by` and `last_changed_by`
schema:
type: string
- name: include_children
in: query
description: Include additional fields in the response. Available values include `line_items`, `customer`, and `sales_reps`
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/OrderResponse'
tags:
- orders-received
patch:
operationId: orders-received_partial_update
summary: Update an order
description: Update an Order. May update child LineItem objects in the same request.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OrderUpdate'
example:
discount: 15
discount_type: $
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/OrderResponse'
tags:
- orders-received
delete:
operationId: orders-received_delete
summary: Delete a draft order
description: Delete a draft order. This operation is only available for draft orders.
responses:
'204':
description: ''
tags:
- orders-received
parameters:
- name: number
in: path
required: true
description: Order number
schema:
type: string
format: uuid
/orders-received/{number}/transition/{action}/:
post:
operationId: orders-received_transition_create
summary: Transition an order
description: Perform an order transition action.
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/OrderResponse'
tags:
- orders-received
parameters:
- name: number
in: path
description: Order number
required: true
schema:
type: string
- name: action
in: path
required: true
description: Order transition action. Available values include `submit`, `accept`, `fulfill`, `cancel`, `reject`, `ship`,
and `complete`
schema:
type: string
/orders-received/{number}/line-items/:
get:
operationId: orders-received-line-items_list
summary: List line items
description: List line items for an order.
responses:
'200':
description: ''
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/LineItemResponse'
tags:
- line-items
parameters:
- name: number
in: path
description: Order number
required: true
schema:
type: string
/orders-received/{number}/payments/:
get:
operationId: orders-received-payments_list
summary: List payments
description: List payments for an order.
responses:
'200':
description: ''
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OrderPaymentResponse'
tags:
- order-payments
parameters:
- name: number
in: path
description: Order number
required: true
schema:
type: string
/orders-received/{number}/comments/:
get:
operationId: orders-received-comments_list
summary: List comments
description: List comments for an order.
responses:
'200':
description: ''
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OrderComment'
tags:
- order-comments
parameters:
- name: number
in: path
description: Order number
required: true
schema:
type: string
/orders/{order_number}/delivery-information/:
get:
operationId: orders-received-delivery-information_read
summary: Retrieve delivery information
description: Retrieve an order and associated delivery information.
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/OrderDeliveryInformation'
tags:
- orders-received
parameters:
- name: order_number
in: path
description: Order number
required: true
schema:
type: string
/product-batches/:
get:
operationId: product-batches_list
summary: List assignments
parameters:
- name: limit
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
- name: offset
in: query
description: The initial index from which to return the results.
required: false
schema:
type: integer
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/ProductBatchResponse'
tags:
- product-batches
post:
operationId: product-batches_create
summary: Create an assignment
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ProductBatchCreate'
required: true
responses:
'201':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ProductBatchResponse'
tags:
- product-batches
parameters: []
/product-batches/{id}/:
get:
operationId: product-batches__read
summary: Retrieve an assignment
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ProductBatchResponse'
tags:
- product-batches
delete:
operationId: product-batches__delete
summary: Delete an assignment
responses:
'204':
description: ''
tags:
- product-batches
parameters:
- name: id
in: path
description: The id for the assignment.
required: true
schema:
type: string
/product-categories/:
get:
operationId: product-categories_list
summary: List categories
description: List all categories.
parameters:
- name: limit
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
- name: offset
in: query
description: The initial index from which to return the results.
required: false
schema:
type: integer
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/ProductCategoryResponse'
tags:
- product-categories
parameters: []
/product-categories/{id}/:
get:
operationId: product-categories_read
summary: Retrieve a category
description: Retrieve an individual category.
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ProductCategoryResponse'
tags:
- product-categories
parameters:
- name: id
in: path
description: The id for the category.
required: true
schema:
type: integer
/product-images/:
get:
operationId: product-images_list
summary: List images
description: 'List all all images.
Retrieved per product via the product query parameter or with the following path parameter, /products/{product_id}/images'
parameters:
- name: product
in: query
description: Filter by product id.
required: false
schema:
type: number
- name: id
in: query
description: Filter by image id.
required: false
schema:
type: number
- name: company_slug
in: query
description: Filter by company slug.
required: false
schema:
type: string
- name: limit
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
- name: offset
in: query
description: The initial index from which to return the results.
required: false
schema:
type: integer
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/ProductImageResponse'
tags:
- product-images
post:
operationId: product-images_create
summary: Upload an image
description: Upload a new product image. This request requires multipart form data.
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
image:
description: The uploaded file, sent via multipart form data. Retrieved as a url link.
type: string
format: binary
product:
description: The id for the product that the image will be assigned to.
type: integer
position:
description: The position of the image.
type: integer
minimum: 1
maximum: 5
x-nullable: true
required:
- image
- product
- position
required: true
responses:
'201':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ProductImageResponse'
tags:
- product-images
parameters: []
/product-images/{id}/:
get:
operationId: product-images_read
summary: Retrieve an image
description: Retrieve an individual image.
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ProductImageResponse'
tags:
- product-images
delete:
operationId: product-images_delete
summary: Delete an image
description: Delete an image.
responses:
'204':
description: ''
tags:
- product-images
parameters:
- name: id
in: path
description: The id for the image.
required: true
schema:
type: integer
/product-lines/:
get:
operationId: product-lines_list
summary: List product lines
description: 'List all product lines.
Retrieved per company with the company query parameter or with the following path parameter, /companies/{company_id}/product-lines/'
parameters:
- name: brand
in: query
description: Filter by brand
required: false
schema:
type: string
- name: id
in: query
description: Filter by id
required: false
schema:
type: number
- name: company
in: query
description: Filter by company
required: false
schema:
type: number
- name: company_slug
in: query
description: Filter by owner company slug.
required: false
schema:
type: string
- name: limit
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
- name: offset
in: query
description: The initial index from which to return the results.
required: false
schema:
type: integer
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/ProductLineResponse'
tags:
- product-lines
post:
operationId: product-lines_create
summary: Create a product line
description: Create a new product line.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ProductLineCreate'
required: true
responses:
'201':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ProductLineResponse'
tags:
- product-lines
parameters: []
/product-lines/{id}/:
get:
operationId: product-lines_read
summary: Retrieve a product line
description: Retrieve an individual product line.
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ProductLineResponse'
tags:
- product-lines
patch:
operationId: product-lines_partial_update
summary: Update a product line
description: Update an existing product line.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ProductLineUpdate'
required: true
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ProductLineResponse'
tags:
- product-lines
parameters:
- name: id
in: path
description: The id for the product line.
required: true
schema:
type: integer
/product-subcategories/:
get:
operationId: product-subcategories_list
summary: List subcategories
description: List all subcategories.
parameters:
- name: limit
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
- name: offset
in: query
description: The initial index from which to return the results.
required: false
schema:
type: integer
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/ProductSubcategoryResponse'
tags:
- product-subcategories
parameters: []
/product-subcategories/{id}/:
get:
operationId: product-subcategories_read
summary: Retrieve a subcategory
description: Retrieve an individual subcategory.
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ProductSubcategoryResponse'
tags:
- product-subcategories
parameters:
- name: id
in: path
description: The id for the product subcategory.
required: true
schema:
type: integer
/products/:
get:
operationId: products_list
summary: List products
description: 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/
parameters:
- name: sku
in: query
description: Filter by one or more sku, separated by commas.
schema:
type: string
- name: fields_include
in: query
description: Include only specific fields in the response, separated by commas.
schema:
type: string
- name: fields_exclude
in: query
description: Exclude specific fields in the response, separated by commas.
schema:
type: string
- name: include_children
in: query
description: Include additional fields in the response. Available values include `images`, `volume_discounts`, and
`strains`
schema:
type: string
- name: modified__lt
in: query
description: Filter by the modified date, less than
required: false
schema:
type: string
- name: modified__lte
in: query
description: Filter by the modified date, less than or equal to
required: false
schema:
type: string
- name: modified__gt
in: query
description: Filter by the modified on date, greater than
required: false
schema:
type: string
- name: modified__gte
in: query
description: Filter by the modified date, greater than or equal to
required: false
schema:
type: string
- name: last_edit__lt
in: query
description: Filter by last edit date, less than
required: false
schema:
type: string
- name: last_edit__lte
in: query
description: Filter by last edit date, less than or equal to
required: false
schema:
type: string
- name: last_edit__gt
in: query
description: Filter by last edit date, greater than
required: false
schema:
type: string
- name: last_edit__gte
in: query
description: Filter by last edit date, greater than or equal to
required: false
schema:
type: string
- name: created_on__lt
in: query
description: Filter by created on date, less than
required: false
schema:
type: string
- name: created_on__lte
in: query
description: Filter by created on date, less than or equal to
required: false
schema:
type: string
- name: created_on__gt
in: query
description: Filter by created on date, greater than
required: false
schema:
type: string
- name: created_on__gte
in: query
description: Filter by created on date, greater than or equal to
required: false
schema:
type: string
- name: id
in: query
description: Filter by product id
required: false
schema:
type: number
- name: name
in: query
description: Filter by name, case insensitive
required: false
schema:
type: string
- name: search
in: query
description: Filter by a search term
required: false
schema:
type: string
- name: display_name
in: query
description: Filter by display name, case insensitive
required: false
schema:
type: string
- name: brand
in: query
description: Filter by brand. Multiple values separated by commas.
required: false
schema:
type: number
- name: company
in: query
description: Filter by company id. Multiple values separated by commas.
required: false
schema:
type: number
- name: has_children
in: query
description: Filter by whether or not products have children
required: false
schema:
type: string
- name: parent
in: query
description: Filter by parent product id. Multiple values separated by commas.
required: false
schema:
type: number
- name: parent__isnull
in: query
description: Filter by whether or not products are parent products. A null value for parent indicated a parent product.
required: false
schema:
type: string
- name: sub_category__isnull
in: query
description: Filter by whether or not products have sub-categories assigned. Values can be `true` or `false`
required: false
schema:
type: string
- name: product_line
in: query
description: Filter by product line id. Multiple values separated by commas.
required: false
schema:
type: number
- name: strains
in: query
description: Filter by strain id. Values available at the /strains/ endpoint. Multiple values separated by commas.
required: false
schema:
type: number
- name: category
in: query
description: Filter by category id. Values available at the /product-categories/ endpoint. Multiple values separated
by commas.
required: false
schema:
type: number
- name: sub_category
in: query
description: Filter by sub_category id. Values available at the /product-subcategories/ endpoint. Multiple values
separated by commas.
required: false
schema:
type: number
- name: license
in: query
description: Filter by license id. Values available at the /licenses/ endpoint. Multiple values separated by commas.
required: false
schema:
type: number
- name: license__isnull
in: query
description: Filter by license__isnull
required: false
schema:
type: string
- name: license__type
in: query
description: Filter by license type display name. Values available at /license-types/ endpoint. Multiple values
separated by commas.
required: false
schema:
type: number
- name: listing_state
in: query
description: Filter by listing state id. Values available at /listing-states/ endpoint. Multiple values separated
by commas.
required: false
schema:
type: string
- name: archived
in: query
description: Filter by whether or not the product is archived
required: false
schema:
type: string
- name: buyer
in: query
description: Filter by id for a specific buyer, view the products available to this buyer and the unique price_schedule_price
if applicable
required: false
schema:
type: number
- name: s2s_connected
in: query
description: Filter by s2s_connected
required: false
schema:
type: string
- name: company_slug
in: query
description: Filter by the seller company slug
required: false
schema:
type: string
- name: seller_internal_id
in: query
description: Filter by internal product ID
required: false
schema:
type: string
- name: limit
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
- name: offset
in: query
description: The initial index from which to return the results.
required: false
schema:
type: integer
- name: external_id_key
in: query
description: Filter for orders that match external_ids key:values. Must be used with external_id_values.
schema:
type: string
- name: external_id_values
in: query
description: Filter for orders that match external_ids key:values. Multiple values separated by a comma. Must be
used with external_id_key.
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/ProductResponse'
example:
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:
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.
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 seller_internal_id: PROD-001 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:Our Great Heights chocolate bars are delicious. The milk chocolate contains 100mg THC.
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 seller_internal_id: PROD-002 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: [] tags: - products post: operationId: products_create summary: Create a product description: Create a new product. requestBody: content: application/json: schema: $ref: '#/components/schemas/ProductCreate' responses: '201': description: '' content: application/json: schema: $ref: '#/components/schemas/ProductResponse' tags: - products parameters: [] /products/{id}/: get: operationId: products_read summary: Retrieve a product description: Retrieve an individual product. parameters: - name: fields_include in: query description: Include only specific fields in the response, separated by commas. schema: type: string - name: fields_exclude in: query description: Exclude specific fields in the response, separated by commas. schema: type: string - name: include_children in: query description: Include additional fields in the response. Available values include `images`, `volume_discounts`, and `strains` schema: type: string responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/ProductResponse' tags: - products patch: operationId: products_partial_update summary: Update a product description: Update an existing product. requestBody: content: application/json: schema: $ref: '#/components/schemas/ProductUpdate' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/ProductUpdateResponse' tags: - products delete: operationId: products_delete summary: Archive a product description: Archive a product. responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/ProductArchiveResponse' tags: - products parameters: - name: id in: path description: The id for the product. required: true schema: type: integer /promocodes/: get: operationId: promocodes_list summary: List description: View all promotional codes associated with brands under the company access scope. parameters: - name: company_slug in: query description: Filter by company_slug required: false schema: type: string - name: brand in: query description: Filter by brand required: false schema: type: string - name: code in: query description: Filter by code required: false schema: type: string - name: limit in: query description: Number of results to return per page. required: false schema: type: integer - name: offset in: query description: The initial index from which to return the results. required: false schema: type: integer responses: '200': description: '' content: application/json: schema: required: - count - results type: object properties: count: type: integer next: type: string format: uri nullable: true previous: type: string format: uri nullable: true results: type: array items: $ref: '#/components/schemas/PromoCode' tags: - promocodes post: operationId: promocodes_create summary: Create description: Create a new promotional code, unique to brand and code. requestBody: $ref: '#/components/requestBodies/PromoCode' responses: '201': description: '' content: application/json: schema: $ref: '#/components/schemas/PromoCode' tags: - promocodes parameters: [] /promocodes/{id}/: get: operationId: promocodes__read summary: Read description: "View a specific promotional code to which the current user\n has access." responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/PromoCode' tags: - promocodes patch: operationId: promocodes__partial_update summary: Update description: Update a promotional code's start date and end date fields. requestBody: $ref: '#/components/requestBodies/PromoCode' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/PromoCode' tags: - promocodes delete: operationId: promocodes__delete summary: Delete description: Remove a promotional code entirely. responses: '204': description: '' tags: - promocodes parameters: - name: id in: path required: true schema: type: string /reports/: get: operationId: reports_list summary: List description: '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.' parameters: - name: company_slug in: query description: Filter by company slug. required: false schema: type: string - name: limit in: query description: Number of results to return per page. required: false schema: type: integer - name: offset in: query description: The initial index from which to return the results. required: false schema: type: integer responses: '200': description: '' content: application/json: schema: required: - count - results type: object properties: count: type: integer next: type: string format: uri nullable: true previous: type: string format: uri nullable: true results: type: array items: $ref: '#/components/schemas/ReportDownload' tags: - reports post: operationId: reports_create summary: Create description: Report download viewset requestBody: content: application/json: schema: $ref: '#/components/schemas/ReportDownload' required: true responses: '201': description: '' content: application/json: schema: $ref: '#/components/schemas/ReportDownload' tags: - reports parameters: [] /reports/{number}/: get: operationId: reports__read summary: Read description: Retrieve an individual report by ID responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/ReportDownload' tags: - reports parameters: - name: number in: path required: true schema: type: string format: uuid /strains/: get: operationId: strains_list summary: List strains description: List all strains. parameters: - name: id in: query description: Filter by strain id required: false schema: type: number - name: name in: query description: Filter by strain name required: false schema: type: string - name: company in: query description: Filter by company ids, separated by commas required: false schema: type: number - name: company_slug in: query description: Filter by company slug required: false schema: type: string - name: company__isnull in: query description: Filter by company__isnull required: false schema: type: string - name: parents in: query description: Filter by parent strain ids, separated by commas required: false schema: type: number - name: strain_classification in: query description: Filter by strain classifications, separated by commas. required: false schema: type: string - name: limit in: query description: Number of results to return per page. required: false schema: type: integer - name: offset in: query description: The initial index from which to return the results. required: false schema: type: integer responses: '200': description: '' content: application/json: schema: type: object properties: count: type: integer next: type: string format: uri nullable: true previous: type: string format: uri nullable: true results: type: array items: $ref: '#/components/schemas/StrainResponse' tags: - strains post: operationId: strains_create summary: Create a strain description: Create a new strain. requestBody: content: application/json: schema: $ref: '#/components/schemas/StrainCreate' required: true responses: '201': description: '' content: application/json: schema: $ref: '#/components/schemas/StrainResponse' tags: - strains parameters: [] /strains/{id}/: get: operationId: strains_read summary: Retrieve a strain description: Retrieve an individual Strain. responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/StrainResponse' tags: - strains /retailer-inventory/: get: operationId: retailer-inventory_list summary: List products description: List all products. parameters: - name: company in: query description: Filter by company id. required: false schema: type: string - name: limit in: query description: Number of results to return per page. required: false schema: type: integer - name: offset in: query description: The initial index from which to return the results. required: false schema: type: integer responses: '200': description: '' content: application/json: schema: type: object properties: count: type: integer next: type: string format: uri nullable: true previous: type: string format: uri nullable: true results: type: array items: $ref: '#/components/schemas/RetailerInventoryResponse' tags: - retailer-inventory post: operationId: retailer-inventory_create summary: Create a product description: Create a new product. requestBody: content: application/json: schema: $ref: '#/components/schemas/RetailerInventoryCreate' required: true responses: '201': description: '' content: application/json: schema: $ref: '#/components/schemas/RetailerInventoryResponse' tags: - retailer-inventory parameters: [] /retailer-inventory/{id}/: get: operationId: retailer-inventory_read summary: Retrieve a product description: Retrieve an individual product. responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/RetailerInventoryResponse' tags: - retailer-inventory patch: operationId: retailer-inventory_partial_update summary: Update a product description: Update an existing product. requestBody: content: application/json: schema: $ref: '#/components/schemas/RetailerInventoryUpdate' required: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/RetailerInventoryResponse' tags: - retailer-inventory delete: operationId: retailer-inventory_delete summary: Delete a product description: Delete a product. responses: '204': description: '' tags: - retailer-inventory parameters: - name: id in: path description: The id for the product. required: true schema: type: integer tags: - name: brands - name: company-staff - description: The `CompanyActivityEntry` model represents a CRM action taken by a staff member that relates to a customer, with an optional description. name: activity-entries - description: The Customer model represents a business relationship between a buyer and seller on LeafLink. name: customers - name: customer-object x-displayName: The customer object description: '"llf" "cod" "net3" "net7"
"net10" "net14" "net15" "net20"
"net30" "net60" "net90" "prepay" "consign""cash" "check" "wire" "ach"'
schema:
type: array
items:
type: string
PaymentMethod:
name: payment_method
tile: Payment Method
Description: Payment method chosen for payment option
schema:
type: string
AvailablePaymentOptionsCustomer:
name: available_payment_options
title: Customer Payment Option
required:
- payment_term_id
- payment_method_id
description: Payment option available for customer
schema:
type: array
items:
properties:
id:
title: Id test for Customer
description: id for payment option
type: integer
readOnly: true
is_default:
title: Is that payment option a deafult one
type: bool
default: false
payment_method:
$ref: '#/components/parameters/PaymentMethod'
payment_method_id:
title: Payment method id for payment option
type: integer
payment_program:
title: Payment program for payment option
type: object
payment_strategy:
title: Payment strategy for payment option
type: object
payment_term:
$ref: '#/components/parameters/PaymentTerm'
payment_term_id:
title: Payment term id for payment option
type: integer
AvailablePaymentOptions:
name: available_payment_options
title: Customer Payment Option
required:
- payment_term_id
- payment_method_id
description: Payment option available for customer
schema:
type: array
items:
properties:
id:
title: Id
description: id for payment option
type: integer
readOnly: true
is_default:
title: Is that payment option a deafult one
type: bool
default: false
payment_method:
$ref: '#/components/parameters/PaymentMethod'
payment_method_id:
title: Payment method id for payment option
type: integer
payment_program:
title: Payment program for payment option
type: object
payment_strategy:
title: Payment strategy for payment option
type: object
payment_term:
$ref: '#/components/parameters/PaymentTerm'
payment_term_id:
title: Payment term id for payment option
type: integer
SelectedPaymentOption:
name: selected_payment_option
title: Order Payment Option
description: Payment option selected for an order
properties:
id:
title: Id
description: id for payment option
type: integer
readOnly: true
is_default:
title: Is that payment option a deafult one
type: bool
schema:
type: object
PaymentTermFilter:
name: payment_term
in: query
description: Filter by the customer's payment term
required: false
schema:
type: integer
PaymentMethodFilter:
name: payment_method
in: query
description: Filter by the customer's payment method
required: false
schema:
type: integer
requestBodies:
Contact:
content:
application/json:
schema:
$ref: '#/components/schemas/Contact'
required: true
PromoCode:
content:
application/json:
schema:
$ref: '#/components/schemas/PromoCode'
required: true
CompanyCustomerStatus:
content:
application/json:
schema:
$ref: '#/components/schemas/CompanyCustomerStatus'
required: true
CompanyActivityEntry:
content:
application/json:
schema:
$ref: '#/components/schemas/CompanyActivityEntry'
required: true
securitySchemes:
Token:
description: 'You must authenticate your requests by including your API key in each request header as described below.
Requests should include a header named `Authorization`, with the value `App {MY_API_KEY}`. Note the single space in
the header value.
Example: `Authorization: App MY_API_KEY`
[Learn more about generating your key](https://developer.leaflink.com/brands/api/getting-started/)
**Legacy API keys:** If you are not using an Application API key, your authorization header should include the string
`Token` and access will be scoped to all companies under which the user exists as a companystaff.
Example: `Authorization: Token MY_API_KEY`
'
in: header
name: Authorization
type: apiKey
schemas:
RetailerInventory:
required:
- is_low
- source
- name
- sku
- brand
- quantity
- company
- unit_of_measure
type: object
properties:
id:
title: ID
type: integer
readOnly: true
is_low:
title: Product is low
description: Is the inventory for this product running low?
type: boolean
source:
title: POS Source Name
description: POS Source Name
type: string
maxLength: 400
minLength: 1
name:
title: POS Product Name
description: POS Product Name
type: string
maxLength: 400
minLength: 1
sku:
title: POS Product SKU
description: POS Product SKU
type: string
maxLength: 400
minLength: 1
brand:
title: POS Product Brand Name
description: POS Product Brand Name
type: string
maxLength: 400
minLength: 1
quantity:
title: Available for sale
description: This amount of units you have in stock for this product
type: integer
maximum: 2147483647
minimum: 0
company:
title: Company
description: The Company associated with this retailer inventory.
type: integer
unit_of_measure:
title: POS Product Unit of Measure
description: POS Product Unit of Measure
type: string
maxLength: 400
minLength: 1
created_on:
title: Created on
type: string
format: date-time
readOnly: true
modified:
title: Modified
type: string
format: date-time
readOnly: true
RetailerInventoryResponse:
type: object
properties:
id:
type: integer
description: Unique id generated by LeafLink.
is_low:
description: Indicates if the inventory level is low.
type: boolean
source:
description: Describes the source system providing the data.
type: string
maxLength: 400
minLength: 1
name:
description: Product name
type: string
maxLength: 400
minLength: 1
sku:
type: string
description: Product sku
maxLength: 400
minLength: 1
brand:
type: string
description: Product brand
maxLength: 400
minLength: 1
quantity:
description: Product inventory level
type: integer
company:
description: Company id
type: integer
unit_of_measure:
description: Product unit of measure
type: string
maxLength: 400
minLength: 1
created_on:
type: string
format: date-time
readOnly: true
description: Date and time the product was created.
modified:
title: Modified
type: string
format: date-time
readOnly: true
description: Date and time the product was last modified.
RetailerInventoryCreate:
required:
- is_low
- source
- name
- sku
- brand
- quantity
- company
- unit_of_measure
type: object
properties:
is_low:
description: Indicates if the inventory level is low.
type: boolean
source:
description: Describes the source system providing the data.
type: string
maxLength: 400
minLength: 1
name:
description: Product name
type: string
maxLength: 400
minLength: 1
sku:
type: string
description: Product sku
maxLength: 400
minLength: 1
brand:
type: string
description: Product brand
maxLength: 400
minLength: 1
quantity:
description: Product inventory level
type: integer
company:
description: Company id
type: integer
unit_of_measure:
description: Product unit of measure
type: string
maxLength: 400
minLength: 1
RetailerInventoryUpdate:
type: object
properties:
is_low:
description: Indicates if the inventory level is low.
type: boolean
source:
description: Describes the source system providing the data.
type: string
maxLength: 400
minLength: 1
name:
description: Product name
type: string
maxLength: 400
minLength: 1
sku:
type: string
description: Product sku
maxLength: 400
minLength: 1
brand:
type: string
description: Product brand
maxLength: 400
minLength: 1
quantity:
description: Product inventory level
type: integer
company:
description: Company id
type: integer
unit_of_measure:
description: Product unit of measure
type: string
maxLength: 400
minLength: 1
CompanyActivityEntry:
required:
- type
- entry
- owner
- author
type: object
properties:
id:
title: ID
type: integer
readOnly: true
type:
title: Type
type: string
created_on:
title: Created on
type: string
format: date-time
readOnly: true
modified:
title: Modified
type: string
format: date-time
readOnly: true
date:
title: Date
type: string
format: date-time
entry:
title: Message
description: Message
type: string
maxLength: 4000
minLength: 1
delete:
title: Activity deleted
description: Is this Activity marked as deleted?
type: boolean
owner:
title: Company that owns Entry
description: Company that owns activity entry
type: integer
author:
title: Activity Entry Author
description: Author who entered Activity
type: integer
company:
title: Company entry is about
description: Company entry is about
type: integer
nullable: true
customer:
title: Customer Company entry is about
description: Company entry is about
type: integer
nullable: true
staff:
title: Staff entry is focused on
description: Staff entry is focused on
type: integer
nullable: true
brand:
title: Brand
type: integer
nullable: true
contact:
title: Contact
type: integer
nullable: true
BatchDocumentNew:
type: object
properties:
id:
type: integer
description: Unique id generated by LeafLink.
batch:
type: integer
description: Id for the batch. See `id` in the batch object.
created_on:
type: string
format: date-time
readOnly: true
description: Date and time the document was uploaded.
modified:
type: string
format: date-time
readOnly: true
description: Date and time the document was last modified.
summary:
type: string
document:
description: uri for the document
type: string
readOnly: true
format: uri
BatchCreate:
required:
- owner
- production_batch_number
- batch_date
- testing_source
type: object
properties:
owner:
description: id for the company
type: string
production_batch_number:
type: string
maxLength: 50
batch_date:
type: string
format: date
thc:
type: string
format: decimal
thca:
type: string
format: decimal
total_thc:
type: string
format: decimal
cbd:
type: string
format: decimal
cbda:
type: string
format: decimal
cbg:
type: string
format: decimal
nullable: true
cbn:
type: string
format: decimal
total_cannabinoids:
type: string
format: decimal
cannabinoid_unit:
type: string
description: Unit for the test results. Acceptable values include `%`, `MG/ML`, `MG/G`
testing_source:
type: string
description: Name of the source system for the test results
BatchUpdate:
type: object
properties:
production_batch_number:
type: string
maxLength: 50
batch_date:
type: string
format: date
thc:
type: string
format: decimal
thca:
type: string
format: decimal
total_thc:
type: string
format: decimal
cbd:
type: string
format: decimal
cbda:
type: string
format: decimal
cbg:
type: string
format: decimal
cbn:
type: string
format: decimal
total_cannabinoids:
type: string
format: decimal
cannabinoid_unit:
type: string
description: Unit for the test results. Acceptable values include `%`, `MG/ML`, `MG/G`
BatchResponse:
type: object
properties:
id:
type: integer
description: Unique id generated by LeafLink.
owner:
description: Id for the company
type: string
production_batch_number:
type: string
batch_date:
type: string
format: date
thc:
type: string
format: decimal
thca:
type: string
format: decimal
total_thc:
type: string
format: decimal
cbd:
type: string
format: decimal
cbda:
type: string
format: decimal
cbg:
type: string
format: decimal
cbn:
type: string
format: decimal
total_cannabinoids:
type: string
format: decimal
documents:
type: array
items:
type: object
properties:
id:
type: integer
description: Unique id generated by LeafLink.
created_on:
type: string
format: date-time
description: Date and time the document was uploaded.
modified:
type: string
format: date-time
description: Date and time the document was last modified.
summary:
type: string
document:
description: uri for the document
type: string
format: uri
cannabinoid_unit:
type: string
description: Unit for the test results. Acceptable values include `%`, `MG/ML`, `MG/G`
testing_source:
type: string
description: Name of the source system for the test results
is_from_api:
type: boolean
description: Describes whether this batch was created via an external system
InventoryItemCreate:
required:
- batch
- is_archived
- facility
- product
- quantity
type: object
properties:
batch:
type: integer
description: ID of the associated batch.
is_archived:
type: boolean
description: Indicated whether the inventory item is archived.
facility:
type: integer
description: ID of the associated facility.
product:
type: integer
description: ID of the associated product.
quantity:
type: number
format: decimal
description: Number of inventory items available.
InventoryItemUpdate:
type: object
properties:
is_archived:
type: boolean
description: Indicated whether the inventory item is active.
quantity:
type: number
format: decimal
description: Number of inventory items available.
InventoryItem:
type: object
properties:
id:
type: integer
description: Unique id generated by LeafLink.
facility:
type: integer
description: ID of the associated facility.
inventory:
type: integer
description: ID of the associated inventory.
product:
type: integer
description: ID of the associated product.
quantity:
type: number
format: decimal
description: Number of inventory items available.
quantity_in_product_uom:
type: string
format: decimal
description: Number of inventory items available in unit of measure.
reserved_qty:
type: string
format: decimal
description: Number of reserved inventory items.
reserved_qty_in_product_uom:
type: string
format: decimal
description: Number of reserved inventory items in unit of measure.
batch:
type: integer
description: ID of the associated batch.
is_archived:
type: boolean
description: Indicated whether the inventory item is active.
Facility:
type: object
properties:
id:
type: integer
description: Unique id generated by LeafLink.
name:
type: string
description: Name of the facility.
description:
type: string
description: Description of the facility.
LightCompanyCustomer:
title: Customer
description: Seller's customer record for the company on the buyer side of the order
required:
- id
- delinquent
type: object
properties:
id:
title: Id
description: id for the customer
type: integer
display_name:
title: Display name
description: Customer nickname if one exists, else the customer name
type: string
readOnly: true
ext_acct_id:
title: Accounting Service External ID
description: ID of Customer in 3rd party accouting software
type: string
maxLength: 255
nullable: true
delinquent:
title: Delinquent
description: Is this account marked delinquent?
type: boolean
LightCompanyCustomerId:
title: Customer
description: Seller's customer record for the company on the buyer side of the order
required:
- id
type: object
properties:
id:
title: Id
description: id for the customer
type: integer
LineItem:
required:
- ordered_unit_price
- quantity
- sale_price
type: object
properties:
id:
title: Id
description: id of the line item
type: integer
ordered_unit_price:
description: Price at the time the order was placed
required:
- amount
- currency
type: object
properties:
amount:
title: Amount
type: string
format: decimal
currency:
title: Currency
type: string
minLength: 1
quantity:
title: Quantity
description: Number of units ordered
type: string
format: decimal
order:
title: Order
description: The number of the order this line item is attached to. `number` or `order_number` on the order object.
type: string
format: uuid
nullable: true
product:
title: Product
description: id for the product
type: string
notes:
title: Notes
description: Notes for this specific ordered product
type: string
nullable: true
is_sample:
title: Is sample
description: Is this line item a sample?
type: boolean
sale_price:
description: Alternative sale price
required:
- amount
- currency
type: object
properties:
amount:
title: Amount
type: string
format: decimal
currency:
title: Currency
type: string
minLength: 1
unit_multiplier:
title: Unit multiplier
description: How many individual units are sold when compared to the assigned unit of measure
type: integer
is_medical_line_item:
title: Is medical line item
description: Is this a medical line item?
type: boolean
is_packed:
title: Is packed
description: Is the line-item packed?
type: boolean
packed_at:
title: Packed at
description: Date and time this line-item was packed
type: string
format: date-time
nullable: true
packed_by:
title: CompanyStaff user
description: The CompanyStaff user that packed this product
type: integer
nullable: true
unit_of_measure:
title: Unit of measure
description: Units this product is measured in
type: string
readOnly: true
position:
title: Position
description: Position for this line item in the displayed list of line items on the order
type: integer
nullable: true
bulk_units:
title: Bulk units
description: The number of units of bulk available. quantity / unit_multiplier
type: integer
on_sale:
title: On sale
description: Is this line item on sale?
type: boolean
is_backorder:
title: Is backorder
description: Is this line item backordered?
type: boolean
nullable: true
order_id:
title: Order id
type: string
readOnly: true
batch:
title: Batch
description: Batch that should be displayed in invoice.
type: integer
nullable: true
package_tags:
title: Package tags
description: Tags associated to line items via attached packages.
type: string
readOnly: true
frozen_data:
title: Frozen data
type: object
wholesale_price:
title: Wholesale price
description: Wholesale Price
type: string
format: decimal
nullable: true
LineItemCreate:
required:
- ordered_unit_price
- quantity
- sale_price
- product
type: object
title: Line Item
properties:
ordered_unit_price:
description: Price at the time the order was placed
required:
- amount
- currency
type: object
properties:
amount:
title: Amount
type: string
format: decimal
currency:
title: Currency
type: string
minLength: 1
sale_price:
description: Sale price for this order
required:
- amount
- currency
type: object
properties:
amount:
title: Amount
type: string
format: decimal
currency:
title: Currency
type: string
minLength: 1
quantity:
title: Quantity
description: Number of units ordered
type: string
format: decimal
product:
title: Product
description: id for the product
type: string
order:
title: Order
description: The number of the order this line item is attached to. Optional for line items embedded in an order
object.
type: string
format: uuid
nullable: true
notes:
title: Notes
description: Notes for this specific ordered product
type: string
nullable: true
is_sample:
title: Is sample
description: Is this line item a sample?
type: boolean
unit_multiplier:
title: Unit multiplier
description: How many individual units are sold when compared to the assigned unit of measure
type: integer
is_medical_line_item:
title: Is medical line item
description: Is this a medical line item?
type: boolean
is_packed:
title: Is packed
description: Is the line-item packed?
type: boolean
packed_at:
title: Packed at
description: Date and time this line-item was packed
type: string
format: date-time
nullable: true
packed_by:
title: CompanyStaff user
description: The CompanyStaff user that packed this product
type: integer
nullable: true
unit_of_measure:
title: Unit of measure
description: Units this product is measured in
type: string
readOnly: true
position:
title: Position
description: Position for this line item in the displayed list of line items on the order
type: integer
nullable: true
batch:
title: Batch
description: Batch that should be displayed in invoice.
type: integer
nullable: true
package_tags:
title: Package tags
description: Tags associated to line items via attached packages.
type: string
readOnly: true
wholesale_price:
title: Wholesale price
description: Wholesale Price
type: string
format: decimal
nullable: true
LineItemResponse:
type: object
properties:
id:
title: Id
description: id of the line item
type: integer
ordered_unit_price:
description: Price at the time the order was placed
required:
- amount
- currency
type: object
properties:
amount:
title: Amount
type: string
format: decimal
currency:
title: Currency
type: string
minLength: 1
quantity:
title: Quantity
description: Number of units ordered
type: string
format: decimal
order:
title: Order
description: The number of the order this line item is attached to. `number` or `order_number` on the order object.
type: string
format: uuid
nullable: true
product:
title: Product
description: id for the product
type: string
notes:
title: Notes
description: Notes for this specific ordered product
type: string
nullable: true
is_sample:
title: Is sample
description: Is this line item a sample?
type: boolean
sale_price:
description: Alternative sale price
required:
- amount
- currency
type: object
properties:
amount:
title: Amount
type: string
format: decimal
currency:
title: Currency
type: string
minLength: 1
unit_multiplier:
title: Unit multiplier
description: How many individual units are sold when compared to the assigned unit of measure
type: integer
is_medical_line_item:
title: Is medical line item
description: Is this a medical line item?
type: boolean
is_packed:
title: Is packed
description: Is the line-item packed?
type: boolean
packed_at:
title: Packed at
description: Date and time this line-item was packed
type: string
format: date-time
nullable: true
packed_by:
title: CompanyStaff user
description: The CompanyStaff user that packed this product
type: integer
nullable: true
unit_of_measure:
title: Unit of measure
description: Units this product is measured in
type: string
readOnly: true
position:
title: Position
description: Position for this line item in the displayed list of line items on the order
type: integer
nullable: true
bulk_units:
title: Bulk units
description: The number of units of bulk available. quantity / unit_multiplier
type: integer
on_sale:
title: On sale
description: Is this line item on sale?
type: boolean
is_backorder:
title: Is backorder
description: Is this line item backordered?
type: boolean
nullable: true
order_id:
title: Order id
type: string
readOnly: true
batch:
title: Batch
description: Batch that should be displayed in invoice.
type: integer
nullable: true
package_tags:
title: Package tags
description: Tags associated to line items via attached packages.
type: string
readOnly: true
frozen_data:
title: Frozen data
type: object
wholesale_price:
title: Wholesale price
description: Wholesale Price
type: string
format: decimal
nullable: true
LineItemUpdate:
type: object
properties:
ordered_unit_price:
description: Price at the time the order was placed
required:
- amount
- currency
type: object
properties:
amount:
title: Amount
type: string
format: decimal
currency:
title: Currency
type: string
minLength: 1
quantity:
title: Quantity
description: Number of units ordered
type: string
format: decimal
notes:
title: Notes
description: Notes for this specific ordered product
type: string
nullable: true
is_sample:
title: Is sample
description: Is this line item a sample?
type: boolean
sale_price:
description: Alternative sale price
required:
- amount
- currency
type: object
properties:
amount:
title: Amount
type: string
format: decimal
currency:
title: Currency
type: string
minLength: 1
is_packed:
title: Is packed
description: Is the line-item packed?
type: boolean
packed_at:
title: Packed at
description: Date and time this line-item was packed
type: string
format: date-time
nullable: true
packed_by:
title: CompanyStaff user
description: The CompanyStaff user that packed this product
type: integer
nullable: true
position:
title: Position
description: Position for this line item in the displayed list of line items on the order
type: integer
nullable: true
batch:
title: Batch
description: Batch that should be displayed in invoice.
type: integer
nullable: true
LightCompanyStaffId:
description: Sales representatives associated with the order.
type: object
title: CompanyStaff
properties:
id:
title: Id
description: id for the company staff user assigned to this order
type: integer
LightCompanyStaff:
description: Sales representatives associated with the order.
type: object
properties:
id:
title: Id
description: id for the company staff user assigned to this order
type: integer
readOnly: true
user:
title: User
description: Concatenated string that contains the first name + last name of the company staff user
type: string
readOnly: true
LightOrderTax:
description: Details about the taxes applied to the order
required:
- order
- tax
type: object
properties:
id:
title: Id
description: id for the tax type
type: integer
readOnly: true
order:
title: Order
type: integer
tax:
title: Tax
type: integer
name:
title: Name
type: string
readOnly: true
rate:
title: Rate
type: string
readOnly: true
state:
title: State
type: string
readOnly: true
auto_apply:
title: Auto apply
type: string
readOnly: true
BrandOwnerOrderInternal:
required:
- seller
- discount_amount
- line_items
type: object
properties:
number:
title: Number
type: string
format: uuid
readOnly: true
external_id_seller:
title: External id seller
description: Seller's external order ID.
type: string
maxLength: 100
nullable: true
external_id_buyer:
title: External id buyer
description: Buyer's external order ID.
type: string
maxLength: 100
nullable: true
ext_acct_id:
title: Accounting Service ID
description: Accounting Service ID
type: string
maxLength: 255
nullable: true
created_on:
title: Created on
type: string
format: date-time
readOnly: true
user:
title: User
description: User (staff) who made the order
type: integer
readOnly: true
buyer:
title: Buyer
description: Company on the buy side of the order.
type: integer
nullable: true
seller:
title: Seller
description: Company on the sell side of the order.
type: integer
customer:
$ref: '#/components/schemas/LightCompanyCustomer'
brand:
title: Brand of Order
type: integer
nullable: true
status:
title: Status
description: Order status
type: string
enum:
- Draft
- Submitted
- Accepted
- Backorder
- Fulfilled
- Shipped
- Complete
- Rejected
- Combined
- Cancelled
manual:
title: Manually Added
description: True if Manually Added by Seller
type: boolean
discount_amount:
title: Discount amount
description: Discount amount applied to the order
type: number
format: decimal
discount_type:
title: Discount Type
type: string
enum:
- '%'
- $
tax_amount:
title: Tax amount
description: Tax amount applied to the order
type: number
format: decimal
tax_type:
title: Tax Type
type: string
enum:
- '%'
total:
title: Total
description: Total order value, excluding products not owned by brand owner brands
type: string
readOnly: true
ship_date:
title: Ship Date
description: Date the Order is shipped
type: string
format: date-time
nullable: true
notes:
title: Order Notes
description: Additional notes for an Order
type: string
maxLength: 2000
nullable: true
internal_notes:
title: Order Notes
description: Internal notes for an Order
type: string
maxLength: 2000
nullable: true
delivery_preferences:
title: Delivery Preferences
description: Customer Delivery Preferences
type: string
nullable: true
line_items:
type: array
items:
$ref: '#/components/schemas/LineItem'
sales_reps:
description: Sales representatives associated with the order.
type: array
items:
$ref: '#/components/schemas/LightCompanyStaff'
readOnly: true
classification:
title: Classification
type: string
maxLength: 50
nullable: true
modified:
title: Modified
type: string
format: date-time
readOnly: true
has_special_requests:
title: Has special requests
type: string
readOnly: true
order_taxes:
description: Details about the taxes applied to the order
type: array
items:
$ref: '#/components/schemas/LightOrderTax'
seller_transaction_licenses:
title: Seller transaction licenses
type: string
readOnly: true
buyer_transaction_license:
title: Buyer transaction license
type: string
readOnly: true
is_combination:
title: Is combination
type: string
readOnly: true
order_number:
title: Order number
description: Read only alias of number.
type: string
readOnly: true
minLength: 1
order_seller_number:
title: Order seller number
description: Read only alias of external_id_seller.If external_id_seller is missing, short_id will be provided.
type: string
readOnly: true
order_buyer_number:
title: Order buyer number
description: Read only alias of external_id_buyer. If external_id_buyer is missing, short_id will be provided.
type: string
readOnly: true
order_short_number:
title: Order short number
description: Read only alias of short_id.
type: string
readOnly: true
minLength: 1
submitted_by:
title: Submitted By
description: The Brand Owner Company which created the order.
type: integer
readOnly: true
BrandResponse:
type: object
properties:
id:
type: integer
description: Unique id generated by LeafLink.
name:
type: string
company:
description: Id for the company
type: integer
description:
type: string
image:
description: Logo for the brand
type: string
format: uri
banner:
description: Banner image for the brand
type: string
format: uri
ProductImageResponse:
description: Images for the product
type: object
properties:
id:
type: integer
readOnly: true
image:
description: Url link to the image
type: string
format: uri
product:
description: Id for the associated product
type: integer
position:
description: Image position
type: integer
maximum: 5
minimum: 1
UnitDenomination:
required:
- value
- name
- label
type: object
properties:
id:
description: id for the unit denomination.
type: integer
value:
type: string
name:
type: string
label:
description: '"1", "1/2", "1/4", "1/8", "3/4", "2", "3 1/2", "7", "14", "6", "28", "5 1/4", "4", "2 1/2", "8", "3
3/4", "1/10", "6/5", "3/2", "2/10", "1/5", "1/3", "1/6", "3/10", or "4/10"'
type: string
CompanyResponse:
type: object
properties:
address:
type: string
announcement:
type: string
apply_ancillary_tax:
type: boolean
apply_arms_length_tax:
type: boolean
batch_enabled:
title: Batch enabled
type: boolean
description: Is the batches feature enabled?
business_identifier:
description: Business identifier (Only applicable to WA)
type: string
business_license_name:
type: string
buyer:
description: Does the company buy on the LeafLink marketplace?
type: boolean
seller:
description: Does the company sell on the LeafLink marketplace?
type: boolean
city:
type: string
dba:
type: string
description:
type: string
has_accting:
description: Is the QuickBooks Online integration enabled?
type: boolean
hide_attached_packages:
description: Metrc integration setting
type: boolean
id:
description: Unique id generated by LeafLink.
type: integer
image:
type: string
format: uri
name:
type: string
slug:
type: string
format: slug
state:
type: string
sts_enabled:
description: Is the Metrc integration enabled?
type: boolean
zipcode:
type: string
CompanyReportSchedule:
required:
- company
- report_type
type: object
properties:
id:
title: ID
type: integer
readOnly: true
company:
title: Company
description: Company to which this schedule belongs
type: integer
report_type:
title: Report type
type: string
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
ReportDownload:
required:
- report_type
- company
type: object
properties:
number:
title: Number
type: string
format: uuid
readOnly: true
user:
title: User
description: User (staff) who exported orders
type: integer
readOnly: true
status:
title: Status of orders export download
description: Status of orders export download
type: string
enum:
- running
- failed
- completed
readOnly: true
report_type:
title: Report type
type: string
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
request_time:
title: Orders export request date
description: Date of requesting orders export
type: string
format: date-time
readOnly: true
complete_time:
title: Orders export completed date
description: Date of sending email with exported orders
type: string
format: date-time
readOnly: true
company:
title: Company
description: Company orders export refers to
type: integer
export:
title: Report Export
description: The Document that was exported
type: string
readOnly: true
format: uri
query:
title: Query
type: object
to_email:
title: User's email
description: Email orders export has been send to
type: string
readOnly: true
minLength: 1
CompanyStaffResponse:
type: object
properties:
id:
type: integer
description: Unique id generated by LeafLink.
user:
description: Id for the staff member's LeafLink user account.
type: integer
company:
description: Id for the company
type: integer
is_admin:
description: Is the staff member an admin?
type: boolean
is_active:
description: Is this an active staff member account?
type: boolean
is_poc:
description: Is the staff member the point of contact for the company?
type: boolean
email:
type: string
phone:
type: string
identification_number:
description: Identification number for the staff member.
type: string
display_name:
type: string
description: First and last name registered with the staff member's LeafLink user account.
username:
type: string
description: Username registered with the staff member's LeafLink user account.
Contact:
required:
- owner
- first_name
type: object
properties:
id:
title: ID
type: integer
readOnly: true
created_on:
title: Created on
type: string
format: date-time
readOnly: true
modified:
title: Modified
type: string
format: date-time
readOnly: true
owner:
title: Owner
type: integer
first_name:
title: First name
type: string
maxLength: 30
minLength: 1
last_name:
title: Last name
type: string
maxLength: 30
email:
title: Email address
type: string
format: email
maxLength: 255
nullable: true
secondary_email:
title: Secondary email address
type: string
format: email
maxLength: 255
nullable: true
role:
title: Position
description: Position or role at company
type: string
maxLength: 400
nullable: true
description:
title: Description
description: An overview of the contact
type: string
maxLength: 1500
nullable: true
phone:
title: Phone
description: Phone Number of Brand
type: string
maxLength: 400
nullable: true
phone_extension:
title: Phone Extension
type: string
maxLength: 20
nullable: true
secondary_phone:
title: Secondary Phone
description: Secondary Phone Number of Brand
type: string
maxLength: 400
nullable: true
secondary_phone_extension:
title: Secondary Phone Extension
type: string
maxLength: 20
nullable: true
delete:
title: Contact deleted
description: Is this Contact marked as deleted?
type: boolean
CompanyCustomerContact:
required:
- contact
- company
type: object
properties:
id:
title: ID
type: integer
readOnly: true
created_on:
title: Created on
type: string
format: date-time
readOnly: true
modified:
title: Modified
type: string
format: date-time
readOnly: true
contact:
title: Contact
type: integer
company:
title: Company
type: integer
is_primary:
title: Is primary
type: boolean
CompanyCustomerStatus:
required:
- state
- owner
type: object
properties:
id:
title: ID
type: integer
readOnly: true
state:
title: Customer Status
description: Customer Status State
type: string
maxLength: 40
minLength: 1
order:
title: Sort Order
description: Sort order, lower is first.
type: integer
maximum: 2147483647
minimum: 1
description:
title: Description
description: Description of status
type: string
maxLength: 1500
nullable: true
owner:
title: Company
description: The Company that created the custom status.
type: integer
is_stock:
title: Is a LeafLink Stock Status
description: Is this a stock LeafLink status?
type: boolean
hex_color:
title: Hex Color
description: Hex color for customer status
type: string
maxLength: 40
nullable: true
CompanyCustomerTag:
required:
- name
- owner
type: object
properties:
id:
title: ID
type: integer
readOnly: true
name:
title: Name
description: Name of Tag
type: string
maxLength: 400
minLength: 1
owner:
title: Company that owns this tag
type: integer
CompanyCustomerTier:
required:
- rank
- sort
type: object
properties:
id:
title: ID
type: integer
readOnly: true
created_on:
title: Created on
type: string
format: date-time
readOnly: true
modified:
title: Modified
type: string
format: date-time
readOnly: true
rank:
title: Classification
description: Company Classification
type: string
maxLength: 40
minLength: 1
sort:
title: Sort Order
description: Sort order, lower is first.
type: integer
maximum: 2147483647
minimum: 0
Credit:
type: object
readOnly: true
description: Credit granted by a seller company to a customer for use in future purchases. Read-only.
properties:
id:
type: integer
description: Unique identifier for the credit
readOnly: true
company:
type: integer
description: ID of the seller company that granted the credit
readOnly: true
customer:
$ref: '#/components/schemas/LightCompanyCustomer'
amount:
type: object
required:
- amount
- currency
properties:
amount:
type: number
description: Credit amount
currency:
type: string
description: Currency code (e.g., USD)
readOnly: true
credit_date:
type: string
format: date
description: Date the credit was granted
readOnly: true
status:
type: string
enum:
- active
- used
- cancelled
readOnly: true
status_display:
type: string
description: Human-readable status
readOnly: true
reason:
type: string
enum:
- leaflink_return
- promo_new_customer
- promo_existing_customer
- return_defective
- return_expired
- return_packaging
- return_order_issue
- return_other
- other
readOnly: true
reason_display:
type: string
description: Human-readable reason
readOnly: true
brand:
type: integer
description: Brand ID if credit is brand-specific
readOnly: true
nullable: true
order:
type: string
format: uuid
description: Order UUID the credit is associated with
readOnly: true
nullable: true
order_display:
type: string
description: Seller's order reference (e.g., GDF - 8396)
readOnly: true
notes:
type: string
maxLength: 500
readOnly: true
applied_to:
type: string
format: uuid
description: Order UUID this credit was applied to (if used)
readOnly: true
nullable: true
applied_to_display:
type: string
description: Seller's order reference for applied order
readOnly: true
read_only:
type: boolean
description: True if credit is used and cannot be modified
readOnly: true
archived:
type: boolean
description: Whether the credit has been soft-deleted
readOnly: true
CustomerCreate:
required:
- owner
- name
type: object
properties:
state:
title: State
type: string
description: State abbreviation
managers:
type: array
items:
type: integer
uniqueItems: true
description: Ids for the sales reps assigned to this customer.
next_contact_date:
title: Next contact date
type: string
format: date
description: Date for the next contact, YYYY-MM-DD
nickname:
title: Nickname
type: string
maxLength: 200
description: Alternate name for the customer
external_id:
title: External ID
description: Id of the customer in a 3rd party system
type: string
maxLength: 100
ext_acct_id:
title: Accounting Service External ID
description: Id of the customer in QuickBooks Online.
type: string
license_number:
title: License Number
description: License Number
type: string
maxLength: 100
old_license_number:
description: Old license number for the customer
type: string
maxLength: 100
nullable: true
license_inactive:
title: License Inactive
description: Is the license inactive for this customer?
type: boolean
business_identifier:
title: Business Identifier / UBI
description: Company identifier distinct from license numbers
type: string
maxLength: 100
ein:
title: EIN Number
description: 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.
type: string
maxLength: 100
directions:
title: Directions
description: Directions to the customer's location
type: string
maxLength: 3000
delivery_preferences:
title: Delivery Preferences
description: Customer delivery preferences. These will show up as footnotes on orders placed by the customer.
type: string
shipping_charge:
title: Shipping charge
description: Additional shipping charge
type: string
format: decimal
brand:
title: Brand Name
description: Brand name associated with the customer
type: string
maxLength: 400
name:
title: Name
description: Customer name
type: string
maxLength: 400
dba:
title: DBA
description: DBA of customer
type: string
maxLength: 400
business_license_name:
title: Business License Name
description: Business License Name
type: string
maxLength: 400
description:
title: Description
description: Additional information about the customer
type: string
maxLength: 4000
website:
title: Website
description: Customer's website
type: string
format: uri
maxLength: 400
address:
title: Address
description: Customer's address
type: string
maxLength: 400
unit_number:
title: 'Unit #'
description: 'Unit # for the address'
type: string
zipcode:
title: Zipcode
description: Zipcode
type: string
maxLength: 6
city:
title: City
description: City
type: string
maxLength: 400
county:
title: County
description: County
type: string
maxLength: 400
country:
title: Country
description: Country
type: string
maxLength: 400
lat:
title: Lat
description: Location latitude
type: string
format: decimal
long:
title: Long
description: Location longitude
type: string
format: decimal
phone:
title: Phone
description: Phone Number
type: string
maxLength: 400
phone_extension:
description: Phone Extension
type: string
maxLength: 400
email:
description: Email address
type: string
format: email
maxLength: 255
notes:
title: Notes
description: Other information about the customer
type: string
maxLength: 3000
leaflink_last_views:
title: Last shop time
description: The last time this customer viewed your products on LeafLink
type: string
format: date-time
readOnly: true
leaflink_source:
title: Added by LeafLink
description: Was this customer added to your CRM by LeafLink
type: boolean
readOnly: true
archived:
title: Is Archived
description: Is the customer record archived?
type: boolean
delinquent:
title: Delinquent Customer
description: Is this customer delinquent on billing?
type: boolean
discount_percent:
title: Discount Percent
description: Discount percent for orders from this customer.
type: string
format: decimal
owner:
title: Owner
type: integer
description: Id for the company that this customer record is for.
tier:
title: Tier
type: integer
description: Id for the customer's tier
price_schedule:
description: Id for the price schedule assigned to the customer
type: integer
service_zone:
title: Service Zone
description: Customer's service zone
type: integer
license_type:
title: Business License Type
description: Customer's business license type
type: integer
payment_term:
$ref: '#/components/parameters/PaymentTerm'
payment_methods:
$ref: '#/components/parameters/PaymentMethods'
available_payment_options:
$ref: '#/components/parameters/AvailablePaymentOptionsCustomer'
status:
title: Customer Account Status
description: Id for the customer's status
type: integer
external_ids:
$ref: '#/components/schemas/ExternalIds'
corporate_address:
$ref: '#/components/schemas/Address'
delivery_address:
$ref: '#/components/schemas/Address'
CustomerUpdate:
type: object
properties:
state:
title: State
type: string
description: State abbreviation
managers:
type: array
items:
type: integer
uniqueItems: true
description: Ids for the sales reps assigned to this customer.
next_contact_date:
title: Next contact date
type: string
format: date
description: Date for the next contact, YYYY-MM-DD
nickname:
title: Nickname
type: string
maxLength: 200
description: Alternate name for the customer
external_id:
title: External ID
description: Id of the customer in a 3rd party system
type: string
maxLength: 100
ext_acct_id:
title: Accounting Service External ID
description: Id of the customer in QuickBooks Online.
type: string
license_number:
title: License Number
description: License Number
type: string
maxLength: 100
old_license_number:
description: Old license number for the customer
type: string
maxLength: 100
nullable: true
license_inactive:
title: License Inactive
description: Is the license inactive for this customer?
type: boolean
business_identifier:
title: Business Identifier / UBI
description: Company identifier distinct from license numbers
type: string
maxLength: 100
ein:
title: EIN Number
description: 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.
type: string
maxLength: 100
directions:
title: Directions
description: Directions to the customer's location
type: string
maxLength: 3000
delivery_preferences:
title: Delivery Preferences
description: Customer delivery preferences. These will show up as footnotes on orders placed by the customer.
type: string
shipping_charge:
title: Shipping charge
description: Additional shipping charge
type: string
format: decimal
brand:
title: Brand Name
description: Brand name associated with the customer
type: string
maxLength: 400
name:
title: Name
description: Customer name
type: string
maxLength: 400
dba:
title: DBA
description: DBA of customer
type: string
maxLength: 400
business_license_name:
title: Business License Name
description: Business License Name
type: string
maxLength: 400
description:
title: Description
description: Additional information about the customer
type: string
maxLength: 4000
website:
title: Website
description: Customer's website
type: string
format: uri
maxLength: 400
address:
title: Address
description: Customer's address
type: string
maxLength: 400
unit_number:
title: 'Unit #'
description: 'Unit # for the address'
type: string
zipcode:
title: Zipcode
description: Zipcode
type: string
maxLength: 6
city:
title: City
description: City
type: string
maxLength: 400
county:
title: County
description: County
type: string
maxLength: 400
country:
title: Country
description: Country
type: string
maxLength: 400
lat:
title: Lat
description: Location latitude
type: string
format: decimal
long:
title: Long
description: Location longitude
type: string
format: decimal
phone:
title: Phone
description: Phone Number
type: string
maxLength: 400
phone_extension:
description: Phone Extension
type: string
maxLength: 400
email:
description: Email address
type: string
format: email
maxLength: 255
notes:
title: Notes
description: Other information about the customer
type: string
maxLength: 3000
leaflink_last_views:
title: Last shop time
description: The last time this customer viewed your products.
type: string
format: date-time
readOnly: true
archived:
title: Is Archived
description: Is the customer record archived?
type: boolean
delinquent:
title: Delinquent Customer
description: Is this customer delinquent on billing?
type: boolean
discount_percent:
title: Discount Percent
description: Discount percent for orders from this customer.
type: string
format: decimal
owner:
title: Owner
type: integer
description: Id for the company that this customer record is for.
tier:
title: Tier
type: integer
description: Id for the customer's tier
price_schedule:
description: Id for the price schedule assigned to the customer
type: integer
service_zone:
title: Service Zone
description: Customer's service zone
type: integer
license_type:
title: Business License Type
description: Customer's business license type
type: integer
available_payment_options:
$ref: '#/components/parameters/AvailablePaymentOptionsCustomer'
payment_term:
$ref: '#/components/parameters/PaymentTerm'
payment_methods:
$ref: '#/components/parameters/PaymentMethods'
status:
title: Customer Account Status
description: Id for the customer's status
type: integer
external_ids:
$ref: '#/components/schemas/ExternalIds'
corporate_address:
$ref: '#/components/schemas/Address'
delivery_address:
$ref: '#/components/schemas/Address'
CustomerResponse:
type: object
properties:
id:
type: integer
readOnly: true
description: Unique id generated by LeafLink.
state:
type: string
description: State abbreviation
managers:
type: array
items:
type: integer
uniqueItems: true
description: Ids for the sales reps assigned to this customer.
created_on:
type: string
format: date-time
readOnly: true
description: Date and time the customer was created.
modified:
type: string
format: date-time
readOnly: true
description: Date and time the customer was last modified.
next_contact_date:
type: string
format: date
description: Date for the next contact, YYYY-MM-DD
nickname:
type: string
maxLength: 200
description: Alternate name for the customer
external_id:
description: Id of the customer in a 3rd party system
type: string
maxLength: 100
ext_acct_id:
description: Id of the customer in QuickBooks Online.
type: string
license_number:
description: License Number
type: string
maxLength: 100
old_license_number:
description: Old license number for the customer
type: string
maxLength: 100
nullable: true
license_inactive:
description: Is the license inactive for this customer?
type: boolean
business_identifier:
description: Company identifier distinct from license numbers
type: string
maxLength: 100
ein:
description: 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.
type: string
maxLength: 100
directions:
description: Directions to the customer's location
type: string
maxLength: 3000
delivery_preferences:
description: Customer delivery preferences. These will show up as footnotes on orders placed by the customer.
type: string
currency:
type: string
readOnly: true
minLength: 1
description: Currency used by the customer.
shipping_charge:
description: Additional shipping charge
type: string
format: decimal
brand:
description: Brand name associated with the customer
type: string
maxLength: 400
name:
description: Customer name
type: string
maxLength: 400
dba:
description: DBA of customer
type: string
maxLength: 400
business_license_name:
description: Business License Name
type: string
maxLength: 400
description:
description: Additional information about the customer
type: string
maxLength: 4000
website:
description: Customer's website
type: string
format: uri
maxLength: 400
address:
description: Customer's address
type: string
maxLength: 400
unit_number:
description: 'Unit # for the address'
type: string
zipcode:
description: Zipcode
type: string
maxLength: 6
city:
description: City
type: string
maxLength: 400
county:
description: County
type: string
maxLength: 400
country:
description: Country
type: string
maxLength: 400
lat:
description: Location latitude
type: string
format: decimal
long:
description: Location longitude
type: string
format: decimal
phone:
description: Phone Number
type: string
maxLength: 400
phone_extension:
description: Phone Extension
type: string
maxLength: 400
email:
description: Email address
type: string
format: email
maxLength: 255
notes:
description: Other information about the customer
type: string
maxLength: 3000
leaflink_last_views:
description: The last time this customer viewed your products.
type: string
format: date-time
readOnly: true
leaflink_source:
description: Was this customer added to your CRM by LeafLink?
type: boolean
readOnly: true
archived:
description: Is the customer record archived?
type: boolean
delinquent:
description: Is this customer delinquent on billing?
type: boolean
discount_percent:
description: Discount percent for orders from this customer.
type: string
format: decimal
owner:
type: integer
description: Id for the company that this customer record is for.
partner:
type: integer
description: Id for the buyer company that this customer record represents.
readOnly: true
tier:
type: integer
description: Id for the customer's tier
price_schedule:
description: Id for the price schedule assigned to the customer
type: integer
service_zone:
description: Customer's service zone
type: integer
license_type:
title: Business License Type
description: Customer's business license type
type: integer
payment_term:
description: Customer's payment terms Deprecated field, please use payment_option instead
type: integer
payment_methods:
description: Customer's payment methods Deprecated field, please use payment_option instead
type: array
items:
type: integer
available_payment_options:
title: Available payment options
description: Available payment options for a customer
type: array
required:
- payment_term_id
- payment_method_id
properties:
id:
title: Id
description: id for payment option
type: integer
readOnly: true
payment_method_id:
title: Payment method id for payment option
type: integer
payment_term_id:
title: Payment term id for payment option
type: integer
payment_program:
title: Payment program for payment option
type: string
payment_strategy:
title: Payment strategy for payment option
type: string
items: {}
status:
description: Id for the customer's status
type: integer
external_ids:
$ref: '#/components/schemas/ExternalIds'
corporate_address:
$ref: '#/components/schemas/Address'
delivery_address:
$ref: '#/components/schemas/Address'
DeliveryProviderOrderInformation:
title: Delivery info
type: object
properties:
acquire_date:
title: Acquire date
description: Date the Trusted Delivery Provider will either `Pick Up` or get `Drop Off` the order. Must be `null`
for `In Storage` type.
type: string
format: date-time
nullable: true
acquire_type:
title: Acquire type
description: 1 = Drop Off; 2 = Pick Up; 3 = In Storage. 4 = Will Call
type: integer
enum:
- 1
- 2
- 3
- 4
nullable: true
get_acquire_type_display:
title: Get acquire type display
type: string
readOnly: true
manifest_number:
title: Manifest number
description: An identifier for the order's manifest document.
type: string
maxLength: 50
nullable: true
LicenseType:
required:
- type
- display_type
- classification
- state
type: object
properties:
id:
title: ID
type: integer
readOnly: true
type:
title: Type
description: License Type
type: string
maxLength: 100
minLength: 1
display_type:
title: Display Type
description: Type for display in the LeafLink frontend
type: string
maxLength: 100
minLength: 1
classification:
title: License Classification Type
description: License Classification Type
type: string
maxLength: 100
minLength: 1
state:
title: State
description: 'id for the state [1: "AL", 2: "AK", 3: "AZ", 4: "AR", 5: "CA", 6: "CO", 7: "CT", 8: "DE", 9: "FL",
10: "GA", 11: "HI", 12: "ID", 13: "IL", 14: "IN", 15: "IA", 16: "KS", 17: "KY", 18: "LA", 19: "ME", 20: "MD",
21: "MA", 22: "MI", 23: "MN", 24: "MS", 25: "MO", 26: "MT", 27: "NE", 28: "NV", 29: "NH", 30: "NJ", 31: "NM",
32: "NY", 33: "NC", 34: "ND", 35: "OH", 36: "OK", 37: "OR", 38: "PA", 39: "RI", 40: "SC", 41: "SD", 42: "TN",
43: "TX", 44: "UT", 45: "VT", 46: "VA", 47: "WA", 48: "WV", 49: "WI", 50: "WY", 51: "PR", 52: "DC", 53: "SK",
54: "ON", 55: "QC", 56: "BC", 57: "AB", 58: "MB", 59: "NS", 60: "NB", 61: "NL", 62: "PE", 63: "NT", 64: "NU",
65: "YT"]'
type: integer
require_ein:
title: Require ein
description: EIN is required to register under this license type.
type: boolean
has_medical_line_items:
title: Has medical line items
description: This license type can sell medical line items.
type: boolean
active_for_registration:
title: Active for registration
description: This license type is available for current registrations.
type: boolean
description:
title: Description
description: Description or Notes
type: string
maxLength: 5000
nullable: true
pre_2018_CA:
title: Pre 2018 CA
description: pre-2018 CA license.
type: boolean
post_2018_CA:
title: Post 2018 CA
description: post-2018 CA license.
type: boolean
created_on:
title: Created on
type: string
format: date-time
readOnly: true
modified:
title: Modified
type: string
format: date-time
readOnly: true
state_abbr:
type: string
description: Two letter abbreviation for the state associated with this license type.
ComplianceLicense:
required:
- number
type: object
properties:
id:
title: Id
description: id for license
type: integer
readOnly: true
number:
title: License Number
description: License Number
type: string
maxLength: 100
minLength: 1
type:
title: Type
description: Type
type: string
readOnly: true
display_type:
title: Display type
description: Display type
type: string
readOnly: true
classification:
title: Classification
description: Classification
type: string
readOnly: true
OrderComment:
required:
- order
- author
- message
type: object
properties:
id:
title: ID
type: integer
readOnly: true
order:
title: Order
type: string
format: uuid
author:
title: Author of comment
description: The author of the comment
type: integer
author_name:
title: Author name
type: string
readOnly: true
message:
title: Message
description: Message associated with comment
type: string
minLength: 1
created_on:
title: Created on
type: string
format: date-time
readOnly: true
modified:
title: Modified
type: string
format: date-time
readOnly: true
OrderEventLog:
required:
- event_type
type: object
properties:
id:
title: ID
type: integer
readOnly: true
order:
title: Order
type: string
format: uuid
readOnly: true
author_name:
title: Author name
type: string
readOnly: true
by:
title: By
type: string
pattern: ^[\w.@+-]+$
readOnly: true
event_type:
title: Event type
type: string
enum:
- accepted
- backordered
- cancelled
- completed
- created
- edited
- fulfilled
- rejected
- combined
- rep_edited
- shipped
- shipping_edited
- submitted
- unaccepted
description:
title: Description
type: string
maxLength: 255
nullable: true
created_on:
title: Created on
type: string
format: date-time
readOnly: true
modified:
title: Modified
type: string
format: date-time
readOnly: true
timestamp:
title: Timestamp
type: string
format: date-time
readOnly: true
changed_fields:
title: Changed fields
type: object
readOnly: true
source:
title: Event Source
description: Where the change to the Order was made
type: string
enum:
- app
- api
- other
source_detail:
title: Event Source Desc.
description: Where the change to the Order was made.
type: string
maxLength: 200
OrderPaymentCreate:
required:
- order
- recorded_by
- total
- payment_date
type: object
properties:
order:
description: Number of the order this payment applies to. See `number` on the order object.
type: string
recorded_by:
description: Id of the user recording this payment. See `id` on the company staff object.
type: integer
total:
required:
- amount
- currency
type: object
properties:
amount:
type: string
format: decimal
currency:
type: string
minLength: 1
payment_date:
description: Date and time the payment was submitted on.
type: string
format: date-time
reason:
description: Description for this payment.
type: string
payment_type:
description: Type of payment
type: string
enum:
- other
- cash
- check
- credit
- trade
- ach
- wire
- cashier
OrderPaymentResponse:
type: object
properties:
id:
description: Unique id generated by LeafLink.
type: integer
created_on:
description: Date and time the payment was created.
type: string
format: date-time
modified:
description: Date and time the payment was last modified.
type: string
format: date-time
order:
description: Number of the order this payment applies to. See `number` on the order object.
type: string
recorded_by:
description: Id of the user who recorded this payment. See `id` on the company staff object.
type: integer
recorder_name:
description: Name of the user who recorded this payment. See `display_name` on the company staff object.
type: string
readOnly: true
total:
type: object
properties:
amount:
type: string
format: decimal
currency:
type: string
minLength: 1
payment_date:
description: Date and time the payment was submitted on.
type: string
format: date-time
reason:
description: Description for this payment.
type: string
payment_type:
description: Type of payment
type: string
enum:
- other
- cash
- check
- credit
- trade
- ach
- wire
- cashier
OrderDeliveryInformation:
type: object
description: Order delivery information payload.
additionalProperties: true
OrderSalesRepSerialzer:
required:
- order
- rep
type: object
properties:
id:
title: ID
type: integer
readOnly: true
order:
title: Order
type: string
format: uuid
rep:
title: Rep
type: integer
created_on:
title: Created on
type: string
format: date-time
readOnly: true
ProductBatchResponse:
type: object
properties:
id:
description: Unique id generated by LeafLink.
type: integer
product:
description: Id for the Product. See `id` in the product object.
type: string
batch:
description: Id for the batch. See `id` in the batch object.
type: integer
ProductBatchCreate:
required:
- product
- batch
type: object
properties:
product:
description: Id for the Product. See `id` in the product object.
type: string
batch:
description: Id for the batch. See `id` in the batch object.
type: integer
ProductCategoryResponse:
type: object
properties:
id:
type: integer
description: Unique id generated by LeafLink.
name:
type: string
slug:
type: string
description:
type: string
ProductLineResponse:
type: object
properties:
id:
type: integer
description: Unique id generated by LeafLink.
name:
type: string
brand:
type: integer
description: Id for the brand. See `id` in the brands response.
menu_position:
description: Position of the product line on the menu.
type: integer
ProductLineCreate:
required:
- name
- brand
type: object
properties:
name:
type: string
maxLength: 100
brand:
type: integer
description: Id for the brand. See `id` in the brands response.
menu_position:
description: Position of the product line on the menu.
type: integer
ProductLineUpdate:
type: object
properties:
name:
type: string
maxLength: 100
brand:
type: integer
description: Id for the brand. See `id` in the brands response.
menu_position:
description: Position of the product line on the menu.
type: integer
ParentProduct:
title: Parent
description: 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).
required:
- id
type: object
properties:
id:
title: Id
description: id of the product
type: integer
ProductCreate:
required:
- name
- description
- retail_price
- wholesale_price
- sale_price
- minimum_order
- maximum_order
- listing_state
- inventory_management
- unit_of_measure
- unit_denomination
- category
- sub_category
- seller
- brand
- manufacturer
- strain_classification
- sku
- license
type: object
properties:
drop_date:
description: 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.
type: string
format: date-time
name:
type: string
sku:
description: A company's unique identifier for a product. Commas are not supported.
type: string
maxLength: 255
description:
description: Populate with product name if no additional description is available in source system.
type: string
quantity:
description: Inventory level. Required if seller is managing inventory
type: string
unit_multiplier:
description: 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".
default: 1
type: integer
retail_price:
description: Manufacturer's Suggested Retail Price (MSRP). Use "0.00" if no retail price is stored in the source
system.
required:
- amount
- currency
type: object
properties:
amount:
title: Amount
type: string
format: decimal
currency:
title: Currency
type: string
minLength: 1
wholesale_price:
description: Wholesale price displayed to buyers in the LeafLink marketplace.
required:
- amount
- currency
type: object
properties:
amount:
title: Amount
type: string
format: decimal
currency:
title: Currency
type: string
minLength: 1
sale_price:
description: Sale price displayed to buyers in the LeafLink marketplace. Use "0.00" if no sale price is stored in
the source system.
required:
- amount
- currency
type: object
properties:
amount:
title: Amount
type: string
format: decimal
currency:
title: Currency
type: string
minLength: 1
minimum_order:
description: Minimum units required for an order. Use "0.01" if no minimum order quantity is stored in the source
system.
type: string
maximum_order:
description: Maximum units allowed for an order. Use "100000" if no maximum order quantity is stored in the source
system.
type: string
AVAILABLE_FOR_SAMPLES:
description: 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.
type: boolean
extern_acct_id:
description: Id of the product in QuickBooks Online.
type: string
extern_income_acct_id:
description: The id for the QuickBooks Online income account.
type: string
featured:
description: Is the product a featured product? Set to "false" if value is not available in source system.
type: boolean
tagline:
description: One-liner that displayed when the product is featured
type: string
allow_fractional_quantities:
description: Does this product allow fractional quantities to be ordered? Recommended if Flower category product
is sold in bulk.
type: boolean
parent:
$ref: '#/components/schemas/ParentProduct'
listing_state:
description: 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.
type: string
enum:
- Available
- Archived
- Sample
- Backorder
- Internal
- Unavailable
display_listing_state:
description: The listing state string displayed in the marketplace.
type: string
inventory_management:
description: '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.'
type: string
unit_of_measure:
description: 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.
type: string
enum:
- Milligram
- Gram
- Kilogram
- Ounce
- Pound
- Unit
- Liter
- Milliliter
sell_in_unit_of_measure:
description: 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.
type: string
enum:
- Case
unit_denomination:
description: '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.'
type: integer
category:
description: Id for the category. See `id` in the product-categories response. Ids may differ per environment.
type: integer
sub_category:
description: Id for the subcategory. See `id` in the product-subcategories response. Ids may differ per environment.
type: integer
grow_type:
description: If a flower product, the id for the type of grow operation.
type: integer
seller:
description: Id for the company listing the product. See `id` in the companies response.
type: integer
seller_internal_id:
description: Internal Product ID
type: string
brand:
description: Id for the brand. See `id` in the brands response.
type: integer
product_line:
description: Id for the product line. See `id` in the product-lines response. Using product lines provides a better
experience for buyers to be able to navigate the seller's menu. For the seller, it provides better in platform
reporting and analytics.
type: integer
manufacturer:
description: Id for the company that manufactured the product. See `id` in the companies response. Typically set
to the same id as the seller field.
type: integer
strain_classification:
description: If not applicable to the product, use `na`.
type: string
enum:
- sativa
- indica
- hybrid
- na
- 11-cbd
- high-cbd
- sativa-hybrid
- indica-hybrid
license:
type: integer
description: Id for the license. See `id` in the licenses response. Required for product to appear on menu for
buyer visibility and for compliance. Use "N/A" for ancillary products.
strains:
description: The strains associated with the product. This field is required for products with the `Flower` category.
type: array
items:
description: Id for the strains associated with the product. See `id` in the strains response.
type: integer
uniqueItems: true
extern_sts_ids:
description: Id used by the Metrc add on.
type: array
items:
type: string
base_units_per_unit:
description: Required if using Unit as base unit of measure. If the product `unit_of_measure` is `Unit`, this describes
the number of base units in each unit of the product. The base unit is defined by the product category.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.
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 seller_internal_id: PROD-001 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 ProductUpdate: type: object properties: drop_date: description: Date and time the product is scheduled to transition to Available, if applicable. type: string format: date-time name: type: string sku: type: string maxLength: 255 description: type: string quantity: description: Inventory level type: string available_inventory: description: Inventory available for sale (quantity - reserved_qty). type: string unit_multiplier: description: If sold in multiples, the number of units sold per case default: 1 type: integer retail_price: description: Manufacturer's Suggested Retail Price (MSRP) required: - amount - currency type: object properties: amount: title: Amount type: string format: decimal currency: title: Currency type: string minLength: 1 wholesale_price: description: Wholesale price displayed to buyers in the LeafLink marketplace required: - amount - currency type: object properties: amount: title: Amount type: string format: decimal currency: title: Currency type: string minLength: 1 sale_price: description: Sale price displayed to buyers in the LeafLink marketplace required: - amount - currency type: object properties: amount: title: Amount type: string format: decimal currency: title: Currency type: string minLength: 1 minimum_order: description: Minimum units required for an order type: string maximum_order: description: Maximum units allowed for an order type: string AVAILABLE_FOR_SAMPLES: description: Is this product available for samples? type: boolean extern_acct_id: description: Id of the product in QuickBooks Online. type: string extern_income_acct_id: description: The id for the QuickBooks Online income account. type: string featured: description: Is the product a featured product? type: boolean tagline: description: One-liner that displayed when the product is featured type: string allow_fractional_quantities: description: Does this product allow fractional quantities to be ordered? type: boolean parent: $ref: '#/components/schemas/ParentProduct' listing_state: type: string enum: - Available - Archived - Sample - Backorder - Internal - Unavailable display_listing_state: description: The listing state string displayed in the marketplace. type: string inventory_management: description: 'id for the inventory setting [1: "Managed", 2: "Unlimited", 3: "Inherited"]' type: string unit_of_measure: type: string enum: - Milligram - Gram - Kilogram - Ounce - Pound - Unit - Liter - Milliliter sell_in_unit_of_measure: description: If selling the product in cases as opposed to individual units, set this field to Case. type: string enum: - Case unit_denomination: description: '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"]' type: integer category: description: Id for the category. See `id` in the product-categories response. type: integer sub_category: description: Id for the subcategory. See `id` in the product-subcategories response. type: integer grow_type: description: If a flower product, the id for the type of grow operation. type: integer seller: description: Id for the company listing the product. See `id` in the companies response. type: integer seller_internal_id: description: Internal Product ID type: string brand: description: Id for the brand. See `id` in the brands response. type: integer product_line: description: Id for the product line. See `id` in the product-lines response. type: integer manufacturer: description: Id for the company that manufactured the product. See `id` in the companies response. Can be the same id as the seller field. type: integer strain_classification: description: If not applicable to the product, use `na`. type: string enum: - sativa - indica - hybrid - na - 11-cbd - high-cbd - sativa-hybrid - indica-hybrid license: $ref: '#/components/schemas/ComplianceLicense' strains: description: The strains associated with the product. This field is required for products with the `Flower` category. type: array items: description: Id for the strains associated with the product. See `id` in the strains response. type: integer uniqueItems: true extern_sts_ids: description: Id used by the Metrc add on. type: array items: type: string base_units_per_unit: description: If the product `unit_of_measure` is `Unit`, this describes the number of base units in each unit of the product. The base unit is defined by the product category.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.
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 seller_internal_id: PROD-001 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 ProductArchiveResponse: type: object properties: id: description: Unique id generated by LeafLink. type: integer created_on: description: Date and time the product was created type: string format: date-time last_edit: description: Date and time the product was last edited by a user type: string format: date-time drop_date: description: Date and time the product is scheduled to transition to Available, if applicable. type: string format: date-time dropped: description: Date and time the product transitioned to Available. type: string format: date-time name: type: string sku: type: string maxLength: 255 description: type: string quantity: description: Inventory level type: string reserved_qty: description: Inventory reserved by orders in the `Submitted` or `Accepted` states type: string available_inventory: description: Inventory available for sale (quantity - reserved_qty). type: string display_name: description: If the product is a variety, the parent product name + the product name type: string unit_multiplier: description: If sold in multiples, the number of units sold per case default: 1 type: integer retail_price: description: Manufacturer's Suggested Retail Price (MSRP) required: - amount - currency type: object properties: amount: title: Amount type: string format: decimal currency: title: Currency type: string minLength: 1 wholesale_price: description: Wholesale price displayed to buyers in the LeafLink marketplace required: - amount - currency type: object properties: amount: title: Amount type: string format: decimal currency: title: Currency type: string minLength: 1 sale_price: description: Sale price displayed to buyers in the LeafLink marketplace required: - amount - currency type: object properties: amount: title: Amount type: string format: decimal currency: title: Currency type: string minLength: 1 minimum_order: description: Minimum units required for an order type: string maximum_order: description: Maximum units allowed for an order type: string is_medical_line_item: description: Is the product a medical product? type: boolean AVAILABLE_FOR_SAMPLES: description: Is this product available for samples? type: boolean extern_acct_id: description: Id of the product in QuickBooks Online. type: string extern_income_acct_id: description: The id for the QuickBooks Online income account. type: string featured: description: Is the product a featured product? type: boolean tagline: description: One-liner that displayed when the product is featured type: string featured_on_deals: description: Is this product featured on the LeafLink deals page? type: boolean allow_fractional_quantities: description: Does this product allow fractional quantities to be ordered? type: boolean parent: $ref: '#/components/schemas/ParentProduct' listing_state: type: string enum: - Available - Archived - Sample - Backorder - Internal - Unavailable display_listing_state: description: The listing state string displayed in the marketplace. type: string inventory_management: description: 'id for the inventory setting [1: "Managed", 2: "Unlimited", 3: "Inherited"]' type: string unit_of_measure: type: string enum: - Milligram - Gram - Kilogram - Ounce - Pound - Unit - Liter - Milliliter sell_in_unit_of_measure: description: If selling the product in cases as opposed to individual units, set this field to Case. type: string enum: - Case unit_denomination: $ref: '#/components/schemas/UnitDenomination' category: description: Id for the category. See `id` in the product-categories response. type: integer sub_category: description: Id for the subcategory. See `id` in the product-subcategories response. type: integer grow_type: description: If a flower product, the id for the type of grow operation. type: integer seller: description: Id for the company listing the product. See `id` in the companies response. type: integer seller_internal_id: description: Internal Product ID type: string brand: description: Id for the brand. See `id` in the brands response. type: integer product_line: description: Id for the product line. See `id` in the product-lines response. type: integer manufacturer: description: Id for the company that manufactured the product. See `id` in the companies response. Can be the same id as the seller field. type: integer strain_classification: description: If not applicable to the product, use `na`. type: string enum: - sativa - indica - hybrid - na - 11-cbd - high-cbd - sativa-hybrid - indica-hybrid license: $ref: '#/components/schemas/ComplianceLicense' children_count: description: Number of varieties of this product type: string strains: description: The strains associated with the product. This field is required for products with the `Flower` category. type: array items: description: Id for the strains associated with the product. See `id` in the strains response. type: integer uniqueItems: true price_schedule_price: description: If using the buyer query parameter, the special price set for that customer with the price schedule feature. Otherwise, same as wholesale price. type: string image_count: description: The number of product images type: string is_ancillary: description: Is the product an ancillary product? type: boolean s2s_conversion_amount: type: string format: decimal description: Conversion value used by the Metrc add on. extern_sts_ids: description: Id used by the Metrc add on. type: array items: type: string strain_classification_display: title: Strain classification display type: string readOnly: true modified: title: Modified description: Date and time the product data was last modified. type: string has_deals_eligible_children: description: Does the product have varieties that are eligible for LeafLink deals?' type: string discount_percent: description: Discount applied to a product, calculated by comparing the wholesale and sale price. type: integer base_units_per_unit: description: If the product `unit_of_measure` is `Unit`, this describes the number of base units in each unit of the product. The base unit is defined by the product category.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.
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 seller_internal_id: PROD-001 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 ProductResponse: type: object properties: id: description: Unique id generated by LeafLink. type: integer created_on: description: Date and time the product was created type: string format: date-time last_edit: description: Date and time the product was last edited by a user type: string format: date-time drop_date: description: Date and time the product is scheduled to transition to Available, if applicable. type: string format: date-time dropped: description: Date and time the product transitioned to Available. type: string format: date-time name: type: string sku: type: string maxLength: 255 description: type: string quantity: description: Inventory level type: string reserved_qty: description: Inventory reserved by orders in the `Submitted` or `Accepted` states type: string available_inventory: description: Inventory available for sale (quantity - reserved_qty). type: string display_name: description: If the product is a variety, the parent product name + the product name type: string unit_multiplier: description: If sold in multiples, the number of units sold per case default: 1 type: integer retail_price: description: Manufacturer's Suggested Retail Price (MSRP) required: - amount - currency type: object properties: amount: title: Amount type: string format: decimal currency: title: Currency type: string minLength: 1 wholesale_price: description: Wholesale price displayed to buyers in the LeafLink marketplace required: - amount - currency type: object properties: amount: title: Amount type: string format: decimal currency: title: Currency type: string minLength: 1 sale_price: description: Sale price displayed to buyers in the LeafLink marketplace required: - amount - currency type: object properties: amount: title: Amount type: string format: decimal currency: title: Currency type: string minLength: 1 minimum_order: description: Minimum units required for an order type: string maximum_order: description: Maximum units allowed for an order type: string is_medical_line_item: description: Is the product a medical product? type: boolean AVAILABLE_FOR_SAMPLES: description: Is this product available for samples? type: boolean extern_acct_id: description: Id of the product in QuickBooks Online. type: string extern_income_acct_id: description: The id for the QuickBooks Online income account. type: string featured: description: Is the product a featured product? type: boolean tagline: description: One-liner that displayed when the product is featured type: string featured_on_deals: description: Is this product featured on the LeafLink deals page? type: boolean allow_fractional_quantities: description: Does this product allow fractional quantities to be ordered? type: boolean parent: $ref: '#/components/schemas/ParentProduct' listing_state: type: string enum: - Available - Archived - Sample - Backorder - Internal - Unavailable display_listing_state: description: The listing state string displayed in the marketplace. type: string inventory_management: description: 'id for the inventory setting [1: "Managed", 2: "Unlimited", 3: "Inherited"]' type: string unit_of_measure: type: string enum: - Milligram - Gram - Kilogram - Ounce - Pound - Unit - Liter - Milliliter sell_in_unit_of_measure: description: If selling the product in cases as opposed to individual units, set this field to Case. type: string enum: - Case unit_denomination: $ref: '#/components/schemas/UnitDenomination' category: description: Id for the category. See `id` in the product-categories response. type: integer sub_category: description: Id for the subcategory. See `id` in the product-subcategories response. type: integer grow_type: description: If a flower product, the id for the type of grow operation. type: integer seller: description: Id for the company listing the product. See `id` in the companies response. type: integer seller_internal_id: description: Internal Product ID type: string brand: description: Id for the brand. See `id` in the brands response. type: integer product_line: description: Id for the product line. See `id` in the product-lines response. type: integer manufacturer: description: Id for the company that manufactured the product. See `id` in the companies response. Can be the same id as the seller field. type: integer strain_classification: description: If not applicable to the product, use `na`. type: string enum: - sativa - indica - hybrid - na - 11-cbd - high-cbd - sativa-hybrid - indica-hybrid license: $ref: '#/components/schemas/ComplianceLicense' children_count: description: Number of varieties of this product type: string strains: description: The strains associated with the product. This field is required for products with the `Flower` category. type: array items: description: Id for the strains associated with the product. See `id` in the strains response. type: integer uniqueItems: true price_schedule_price: description: If using the buyer query parameter, the special price set for that customer with the price schedule feature. Otherwise, same as wholesale price. type: string image_count: description: The number of product images type: string is_ancillary: description: Is the product an ancillary product? type: boolean s2s_conversion_amount: type: string format: decimal description: Conversion value used by the Metrc add on. extern_sts_ids: description: Id used by the Metrc add on. type: array items: type: string strain_classification_display: title: Strain classification display type: string readOnly: true modified: title: Modified description: Date and time the product data was last modified. type: string has_deals_eligible_children: description: Does the product have varieties that are eligible for LeafLink deals?' type: string discount_percent: description: Discount applied to a product, calculated by comparing the wholesale and sale price. type: integer base_units_per_unit: description: If the product `unit_of_measure` is `Unit`, this describes the number of base units in each unit of the product. The base unit is defined by the product category.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.
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 seller_internal_id: PROD-001 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' PromoCode: required: - brand - code - start_date - end_date type: object properties: id: title: ID type: integer readOnly: true brand: title: Brand type: integer code: title: Code type: string maxLength: 100 minLength: 1 discount_type: title: Discount Type type: string enum: - '%' discount_amount: title: Percent discount description: Percent discount for Order type: string format: decimal start_date: title: Start date type: string format: date-time end_date: title: End date type: string format: date-time StrainResponse: type: object properties: id: type: integer description: Unique id generated by LeafLink. name: type: string parents: type: array description: Array of parent strain ids items: type: integer company: description: Id for the company that created the strain. type: integer strain_classification: type: string enum: - sativa - indica - hybrid - na - 11-cbd - high-cbd - sativa-hybrid - indica-hybrid StrainCreate: required: - name - strain_classification type: object properties: name: type: string parents: type: array description: Array of parent strain ids items: type: integer company: description: Id for the company that created the strain. type: integer strain_classification: type: string enum: - sativa - indica - hybrid - na - 11-cbd - high-cbd - sativa-hybrid - indica-hybrid StrainUpdate: type: object properties: name: type: string parents: type: array description: Array of parent strain ids items: type: integer company: description: Id for the company that created the strain. type: integer strain_classification: type: string enum: - sativa - indica - hybrid - na - 11-cbd - high-cbd - sativa-hybrid - indica-hybrid Order: required: - seller - discount_amount - line_items type: object properties: number: title: Number description: