Created
April 2, 2020 00:09
-
-
Save nkelner/af100f3f59a7b37b632b59d92e50d46e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openapi": "3.0.0", | |
"info": { | |
"title": "LeafLink API", | |
"description": "# Introduction\nWelcome to the LeafLink API. This API is documented in [OpenAPI format](https://swagger.io/docs/specification/about/) and generated with [Redoc](https://github.com/Redocly/redoc).\n\n\n# HTTP Request Notes\nAll endpoints covered in this document are preceded with https://leaflink.com/api/v2 unless otherwise noted.\n\nRequest paths must end in a slash character ('/'). Those that do not will return a 400 (Bad Request) response.\n\n# Dynamic Responses\nSome of our API endpoints support dynamic responses. These\nare responses that vary in content and/or object level payload size\naccording to request path or query parameters.\n\nAvailable parameters are listed beneath endpoint definitions.\n\n# Authentication\n\n<!-- ReDoc-Inject: <security-definitions> -->", | |
"termsOfService": "https://leaflink.com/terms-and-conditions/", | |
"contact": { | |
"email": "[email protected]" | |
}, | |
"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.", | |
"required": false, | |
"schema": { | |
"type": "number" | |
} | |
}, | |
{ | |
"name": "author", | |
"in": "query", | |
"description": "Filter by author ID.", | |
"required": false, | |
"schema": { | |
"type": "number" | |
} | |
}, | |
{ | |
"name": "company", | |
"in": "query", | |
"description": "Filter by associated company ID.", | |
"required": false, | |
"schema": { | |
"type": "number" | |
} | |
}, | |
{ | |
"name": "customer", | |
"in": "query", | |
"description": "Filter by associated customer ID.", | |
"required": false, | |
"schema": { | |
"type": "number" | |
} | |
}, | |
{ | |
"name": "staff", | |
"in": "query", | |
"description": "Filter by associated staff ID.", | |
"required": false, | |
"schema": { | |
"type": "number" | |
} | |
}, | |
{ | |
"name": "type", | |
"in": "query", | |
"description": "Filter by activity type.", | |
"required": false, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "brand", | |
"in": "query", | |
"description": "Filter by associated brand ID.", | |
"required": false, | |
"schema": { | |
"type": "number" | |
} | |
}, | |
{ | |
"name": "contact", | |
"in": "query", | |
"description": "Filter by associated contact ID.", | |
"required": false, | |
"schema": { | |
"type": "number" | |
} | |
}, | |
{ | |
"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": "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": { | |
"204": { | |
"description": "" | |
} | |
}, | |
"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" | |
] | |
} | |
} | |
} | |
}, | |
"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. <br /> <br /> 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" | |
} | |
} | |
] | |
}, | |
"/brands/": { | |
"get": { | |
"operationId": "brands_list", | |
"summary": "List brands", | |
"description": "List all brands. <br /> <br /> 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.\nCan be filtered by id, creation date, last modified date, first name, and last name.\nThe 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-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" | |
} | |
} | |
] | |
}, | |
"/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.", | |
"required": false, | |
"schema": { | |
"type": "number" | |
} | |
}, | |
{ | |
"name": "partner", | |
"in": "query", | |
"description": "Filter by partner ID.", | |
"required": false, | |
"schema": { | |
"type": "number" | |
} | |
}, | |
{ | |
"name": "tier", | |
"in": "query", | |
"description": "Filter by the ID of a customer's tier.", | |
"required": false, | |
"schema": { | |
"type": "number" | |
} | |
}, | |
{ | |
"name": "price_schedule", | |
"in": "query", | |
"description": "Filter by the ID of a customer's price schedule.", | |
"required": false, | |
"schema": { | |
"type": "number" | |
} | |
}, | |
{ | |
"name": "service_zone", | |
"in": "query", | |
"description": "Filter by the ID of a customer's service zone.", | |
"required": false, | |
"schema": { | |
"type": "number" | |
} | |
}, | |
{ | |
"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": "string" | |
} | |
}, | |
{ | |
"name": "payment_term", | |
"in": "query", | |
"description": "Filter by the ID of a customer's payment term.", | |
"required": false, | |
"schema": { | |
"type": "number" | |
} | |
}, | |
{ | |
"name": "status", | |
"in": "query", | |
"description": "Filter by the ID of a customer's status.", | |
"required": false, | |
"schema": { | |
"type": "number" | |
} | |
}, | |
{ | |
"name": "state", | |
"in": "query", | |
"description": "Filter by the ID of a customer's state.", | |
"required": false, | |
"schema": { | |
"type": "number" | |
} | |
}, | |
{ | |
"name": "leaflink_source", | |
"in": "query", | |
"description": "Filter by whether the customer was added by LeafLink.", | |
"required": false, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "archived", | |
"in": "query", | |
"description": "Filter by whether the customer has been archived.", | |
"required": false, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "delinquent", | |
"in": "query", | |
"description": "Filter by whether the customer is delinquent.", | |
"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/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": { | |
"201": { | |
"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.\n<br />You can list the license types associated with\na company's products at <b>/companies/{company_id}/license-types</b>", | |
"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.\n<br />You can list the licenses associated with\na company's products at <b>/companies/{company_id}/licenses</b>", | |
"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 <br />\n <br />Line items can also be retrieved by order via <b>/orders-received/{order_number}/line-items</b>\n <br />or by company via <b>/companies/{company_id}/line-items/</b>", | |
"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__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" | |
] | |
}, | |
"parameters": [] | |
}, | |
"/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" | |
} | |
} | |
] | |
}, | |
"/listing-states/": { | |
"get": { | |
"operationId": "listing-states_list", | |
"summary": "List listing states", | |
"description": "List all listing states.", | |
"responses": { | |
"200": { | |
"description": "", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"value": { | |
"type": "string" | |
}, | |
"display_value": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"tags": [ | |
"listing-states" | |
] | |
}, | |
"parameters": [] | |
}, | |
"/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. <br /> <br />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 for all active 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" | |
} | |
} | |
] | |
}, | |
"/order-statuses/": { | |
"get": { | |
"operationId": "order-statuses_list", | |
"summary": "List statuses", | |
"description": "List all statuses", | |
"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/OrderStatusResponse" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"tags": [ | |
"order-statuses" | |
] | |
}, | |
"parameters": [] | |
}, | |
"/order-statuses/{id}/": { | |
"get": { | |
"operationId": "order-statuses_read", | |
"summary": "Retrieve a status", | |
"description": "Retrieve an individual status by id.", | |
"responses": { | |
"200": { | |
"description": "", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/OrderStatusResponse" | |
} | |
} | |
} | |
} | |
}, | |
"tags": [ | |
"order-statuses" | |
] | |
}, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "A unique integer value identifying an order status.", | |
"required": true, | |
"schema": { | |
"type": "integer" | |
} | |
} | |
] | |
}, | |
"/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. <br /> <br />Per company via <b>/companies/{company_id}/orders-received/</b>", | |
"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: accepted, backorder, fulfilled, shipped, complete, rejected, cancelled.Multiple statuses can be submitted as comma-separated list. Case Insensitive.", | |
"required": false, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "status__not", | |
"in": "query", | |
"description": "Exclude by order status: draft, submitted, accepted, backorder, fulfilled, shipped, complete, rejected, cancelled. Multiple statuses can be submitted as a comma-separated list. Case Insensitive.", | |
"required": false, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"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" | |
} | |
} | |
], | |
"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" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"tags": [ | |
"orders-received" | |
] | |
}, | |
"parameters": [] | |
}, | |
"/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" | |
} | |
} | |
}, | |
"required": true | |
}, | |
"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 <b>only available for draft orders</b>.", | |
"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" | |
} | |
} | |
] | |
}, | |
"/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.\n<br />\n<br />\nRetrieved 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" | |
] | |
} | |
} | |
} | |
}, | |
"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.\n\n<br />\nRetrieved 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. <br /> <br />Products can also be retrieved by company via <b>/companies/{company_id}/products/</b> <br />or by parent product via <b>/products/{parent_product_id}/products/</b>", | |
"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`, `product_data_items`, `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": "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/ProductResponse" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"tags": [ | |
"products" | |
] | |
}, | |
"post": { | |
"operationId": "products_create", | |
"summary": "Create a product", | |
"description": "Create a new product.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/ProductCreate" | |
} | |
} | |
}, | |
"required": true | |
}, | |
"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`, `product_data_items`, `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" | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/ProductResponse" | |
} | |
} | |
} | |
} | |
}, | |
"tags": [ | |
"products" | |
] | |
}, | |
"delete": { | |
"operationId": "products_delete", | |
"summary": "Archive a product", | |
"description": "Archive a product.", | |
"responses": { | |
"200": { | |
"description": "", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/ProductResponse" | |
} | |
} | |
} | |
} | |
}, | |
"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 to which\n the current user has access.", | |
"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 for companies to which the current user\n has access. Only reports of types to which the user has permissions will be\n 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" | |
] | |
}, | |
"patch": { | |
"operationId": "strains_partial_update", | |
"summary": "Update a strain", | |
"description": "Update an existing strain.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StrainUpdate" | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/StrainResponse" | |
} | |
} | |
} | |
} | |
}, | |
"tags": [ | |
"strains" | |
] | |
}, | |
"delete": { | |
"operationId": "strains_delete", | |
"summary": "Delete a strain", | |
"description": "Delete a strain.", | |
"responses": { | |
"204": { | |
"description": "" | |
} | |
}, | |
"tags": [ | |
"strains" | |
] | |
}, | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "The id for the strain.", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
] | |
}, | |
"/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": "<SchemaDefinition schemaRef=\"#/components/schemas/CustomerResponse\" />\n" | |
}, | |
{ | |
"description": "The `CompanyCustomerTier` represents a set of read only objects depicting a customer's tier in relationship to a company.", | |
"name": "customer-tiers" | |
}, | |
{ | |
"description": "The License model represents a single state-issued license held by a Company.", | |
"name": "licenses" | |
}, | |
{ | |
"description": "Access the order object", | |
"name": "orders-received" | |
}, | |
{ | |
"name": "order-object", | |
"x-displayName": "The order object", | |
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/OrderResponse\" />\n" | |
}, | |
{ | |
"description": "The LineItem model represents a single entry in an itemized purchase order.", | |
"name": "line-items" | |
}, | |
{ | |
"name": "line-item-object", | |
"x-displayName": "The line item object", | |
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/LineItemResponse\" />\n" | |
}, | |
{ | |
"name": "order-payments" | |
}, | |
{ | |
"description": "The Product model represents a physical product offered for sale by a Company.", | |
"name": "products" | |
}, | |
{ | |
"name": "product-object", | |
"x-displayName": "The product object", | |
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ProductResponse\" />\n" | |
}, | |
{ | |
"name": "product-categories" | |
}, | |
{ | |
"name": "product-subcategories" | |
}, | |
{ | |
"name": "product-lines" | |
}, | |
{ | |
"description": "Product images for display in the marketplace. Each product may have up to 5 images.", | |
"name": "product-images" | |
}, | |
{ | |
"description": "Product information for a retailer company.", | |
"name": "retailer-inventory" | |
}, | |
{ | |
"name": "listing-states" | |
}, | |
{ | |
"description": "The LicenseType model represents a category of state-issued licenses.", | |
"name": "license-types" | |
}, | |
{ | |
"name": "strains" | |
}, | |
{ | |
"description": "The `Contact` model represents the contact information a user has stored as a company resource within Leaflink.", | |
"name": "contacts" | |
}, | |
{ | |
"name": "batches" | |
}, | |
{ | |
"name": "batch-object", | |
"x-displayName": "The batch object", | |
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/BatchResponse\" />\n" | |
}, | |
{ | |
"name": "product-batches", | |
"description": "Manage assignments." | |
}, | |
{ | |
"name": "product-batch-object", | |
"x-displayName": "The product batch object", | |
"description": "The product batch object assigns a batch to a product.\n<SchemaDefinition schemaRef=\"#/components/schemas/ProductBatchResponse\" /> \n" | |
}, | |
{ | |
"name": "batch-document-object", | |
"x-displayName": "The batch document object", | |
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/BatchDocumentNew\" />\n" | |
}, | |
{ | |
"description": "The Report model represents a report download initiated by a User", | |
"name": "reports" | |
}, | |
{ | |
"description": "The Promocode model represents a promotional discount code for a specific Brand.", | |
"name": "promocodes" | |
}, | |
{ | |
"name": "order-statuses" | |
} | |
], | |
"x-tagGroups": [ | |
{ | |
"name": "Orders", | |
"tags": [ | |
"order-object", | |
"orders-received", | |
"order-statuses", | |
"order-payments", | |
"order-sales-reps", | |
"order-event-logs", | |
"line-item-object", | |
"line-items" | |
] | |
}, | |
{ | |
"name": "Products", | |
"tags": [ | |
"product-object", | |
"products", | |
"product-categories", | |
"product-subcategories", | |
"listing-states", | |
"product-images", | |
"product-lines", | |
"strains" | |
] | |
}, | |
{ | |
"name": "Batches", | |
"tags": [ | |
"batch-object", | |
"batches", | |
"product-batch-object", | |
"product-batches", | |
"batch-document-object", | |
"batch-documents" | |
] | |
}, | |
{ | |
"name": "Customers", | |
"tags": [ | |
"customer-object", | |
"customers", | |
"contacts", | |
"activity-entries", | |
"customer-tiers", | |
"customer-tags" | |
] | |
}, | |
{ | |
"name": "Company Information", | |
"tags": [ | |
"companies", | |
"company-staff", | |
"licenses", | |
"license-types", | |
"brands", | |
"promocodes", | |
"reports" | |
] | |
}, | |
{ | |
"name": "Retailer Inventory", | |
"tags": [ | |
"retailer-inventory" | |
] | |
} | |
], | |
"servers": [ | |
{ | |
"url": "https://leaflink.com/api/v2" | |
} | |
], | |
"components": { | |
"requestBodies": { | |
"Contact": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Contact" | |
} | |
} | |
}, | |
"required": true | |
}, | |
"PromoCode": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/PromoCode" | |
} | |
} | |
}, | |
"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.\n\nRequests should include a header named `Authorization`, with the value `Token {MY_API_KEY}`. Note the single space in the header value.\n\nExample: `Authorization: Token MY_API_KEY`\n\nFor more info about generating your token, please visit http://developer.leaflink.com/api/getting-started/\n", | |
"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 | |
} | |
} | |
}, | |
"QBAccountPreference": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"title": "ID", | |
"type": "integer", | |
"readOnly": true | |
}, | |
"inv_id": { | |
"title": "Inventory Account ID", | |
"description": "Inventory Account ID", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"expense_id": { | |
"title": "Expense Account ID", | |
"description": "Expense Account ID", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"income_id": { | |
"title": "Income Account ID", | |
"description": "Income Account ID", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"discount_account_id": { | |
"title": "Discount Account ID", | |
"description": "Discount Account ID", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"class_mapping": { | |
"title": "QuickBooks class mapping", | |
"type": "string", | |
"enum": [ | |
"", | |
"category", | |
"license_type", | |
"license_name" | |
], | |
"nullable": true | |
}, | |
"invoice_date": { | |
"title": "Which order date should push to QuickBooks?", | |
"description": "Order date to push to QuickBooks.", | |
"type": "string", | |
"enum": [ | |
"created_on", | |
"ship_date" | |
] | |
}, | |
"push_custom_invoice_number": { | |
"title": "Push custom invoice number", | |
"description": "Push order number from LeafLink to QuickBooks invoice", | |
"type": "boolean" | |
}, | |
"service": { | |
"title": "Service", | |
"type": "integer", | |
"readOnly": true | |
} | |
} | |
}, | |
"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" | |
} | |
} | |
}, | |
"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" | |
} | |
} | |
}, | |
"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 | |
} | |
} | |
}, | |
"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_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 | |
}, | |
"position": { | |
"title": "Position", | |
"description": "Position for this line item in the displayed list of line items on the order", | |
"type": "integer", | |
"nullable": true | |
}, | |
"is_backorder": { | |
"title": "Is backorder", | |
"description": "Is this line item backordered?", | |
"type": "boolean", | |
"nullable": true | |
}, | |
"batch": { | |
"title": "Batch", | |
"description": "Batch that should be displayed in invoice.", | |
"type": "integer", | |
"nullable": true | |
} | |
} | |
}, | |
"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: Draft, Submitted, Accepted, Backorder, Fulfilled, Shipped, Completed, Rejected, Cancelled", | |
"type": "string" | |
}, | |
"manual": { | |
"title": "Manually Added", | |
"description": "True if Manually Added by Buyer", | |
"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 | |
} | |
} | |
}, | |
"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", | |
"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": { | |
"title": "Payment Term", | |
"description": "Customer's payment terms", | |
"type": "integer" | |
}, | |
"status": { | |
"title": "Customer Account Status", | |
"description": "Id for the customer's status", | |
"type": "integer" | |
} | |
} | |
}, | |
"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", | |
"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" | |
}, | |
"payment_term": { | |
"title": "Payment Term", | |
"description": "Customer's payment terms", | |
"type": "integer" | |
}, | |
"status": { | |
"title": "Customer Account Status", | |
"description": "Id for the customer's status", | |
"type": "integer" | |
} | |
} | |
}, | |
"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", | |
"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", | |
"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", | |
"type": "integer" | |
}, | |
"status": { | |
"description": "Id for the customer's status", | |
"type": "integer" | |
} | |
} | |
}, | |
"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", | |
"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 | |
} | |
} | |
}, | |
"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", | |
"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" | |
] | |
} | |
} | |
}, | |
"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 | |
} | |
} | |
}, | |
"OrderStatusResponse": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"description": "Unique id generated by LeafLink.", | |
"type": "integer", | |
"readOnly": true | |
}, | |
"status": { | |
"description": "Order status name", | |
"type": "string" | |
}, | |
"order": { | |
"description": "Position in the order lifecycle", | |
"type": "integer" | |
} | |
} | |
}, | |
"LineItemInternal": { | |
"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 | |
}, | |
"marked_for_deletion": { | |
"title": "Marked for deletion", | |
"description": "On PATCH requests, set this flag to true if you wish to delete the LineItem", | |
"type": "boolean" | |
}, | |
"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 | |
} | |
} | |
}, | |
"OrderInternal": { | |
"required": [ | |
"seller", | |
"discount_amount", | |
"line_items" | |
], | |
"type": "object", | |
"properties": { | |
"number": { | |
"title": "Number", | |
"description": "<uuid> Order number generated by LeafLink", | |
"type": "string", | |
"readOnly": true, | |
"minLength": 1 | |
}, | |
"external_id_seller": { | |
"title": "External id seller", | |
"description": "Number assigned to the order by the seller company", | |
"type": "string", | |
"minLength": 1, | |
"nullable": true | |
}, | |
"external_id_buyer": { | |
"title": "External id buyer", | |
"description": "Number assigned to the order by the buyer company", | |
"type": "string", | |
"minLength": 1, | |
"nullable": true | |
}, | |
"ext_acct_id": { | |
"title": "Accounting Service ID", | |
"description": "Accounting Service ID", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"created_on": { | |
"title": "Created on", | |
"description": "Date and time the order was created", | |
"type": "string", | |
"format": "date-time" | |
}, | |
"user": { | |
"title": "User", | |
"description": "username of the user who last edited the order", | |
"type": "string", | |
"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: Draft, Submitted, Accepted, Backorder, Fulfilled, Shipped, Completed, Rejected, Cancelled", | |
"type": "string" | |
}, | |
"manual": { | |
"title": "Manual", | |
"description": "Was the order manually created by the seller company?", | |
"type": "boolean" | |
}, | |
"discount_amount": { | |
"title": "Discount amount", | |
"description": "Discount amount applied to the order", | |
"type": "number", | |
"format": "decimal" | |
}, | |
"discount_type": { | |
"title": "Discount type", | |
"description": "Type of discount: % or $", | |
"type": "string", | |
"minLength": 1 | |
}, | |
"tax_amount": { | |
"title": "Tax amount", | |
"description": "Tax amount applied to the order", | |
"type": "number", | |
"format": "decimal" | |
}, | |
"tax_type": { | |
"title": "Tax type", | |
"description": "Type of tax: % or $", | |
"type": "string", | |
"minLength": 1 | |
}, | |
"shipping_charge": { | |
"required": [ | |
"amount", | |
"currency" | |
], | |
"type": "object", | |
"properties": { | |
"amount": { | |
"title": "Amount", | |
"type": "string", | |
"format": "decimal" | |
}, | |
"currency": { | |
"title": "Currency", | |
"type": "string", | |
"minLength": 1 | |
} | |
} | |
}, | |
"total": { | |
"required": [ | |
"amount", | |
"currency" | |
], | |
"type": "object", | |
"properties": { | |
"amount": { | |
"title": "Amount", | |
"type": "string", | |
"format": "decimal" | |
}, | |
"currency": { | |
"title": "Currency", | |
"type": "string", | |
"minLength": 1 | |
} | |
} | |
}, | |
"payment_term": { | |
"title": "Payment term", | |
"description": "Payment term for the order", | |
"type": "string", | |
"readOnly": true, | |
"nullable": true | |
}, | |
"payment_due_date": { | |
"title": "Payment Due Date", | |
"description": "Date that the Payment is due", | |
"type": "string", | |
"format": "date-time", | |
"nullable": true | |
}, | |
"paid": { | |
"title": "Is paid?", | |
"description": "If this order has been paid for", | |
"type": "boolean" | |
}, | |
"paid_date": { | |
"title": "Paid date", | |
"description": "Date the order was paid", | |
"type": "string", | |
"format": "date", | |
"nullable": true | |
}, | |
"ship_date": { | |
"title": "Ship date", | |
"description": "Date and time the order was shipped", | |
"type": "string", | |
"format": "date-time", | |
"nullable": true | |
}, | |
"shipping_details": { | |
"title": "Shipping details", | |
"description": "Shipping details included on an order", | |
"type": "string", | |
"minLength": 1, | |
"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/LineItemInternal" | |
} | |
}, | |
"sales_reps": { | |
"description": "Sales representatives associated with the order.", | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/LightCompanyStaff" | |
}, | |
"readOnly": true | |
}, | |
"classification": { | |
"title": "Classification", | |
"description": "Classification of the license-type associated to the order", | |
"type": "string", | |
"minLength": 1 | |
}, | |
"payment_balance": { | |
"title": "Payment balance", | |
"description": "The outstanding balance on the order", | |
"type": "string", | |
"readOnly": true | |
}, | |
"available_transitions": { | |
"title": "Available transitions", | |
"description": "States that the order can transition to", | |
"type": "string", | |
"readOnly": true | |
}, | |
"modified": { | |
"title": "Modified", | |
"description": "Date and time that the order was last modified", | |
"type": "string", | |
"format": "date-time" | |
}, | |
"has_special_requests": { | |
"title": "Has special requests", | |
"description": "Does the order have special requests?", | |
"type": "boolean" | |
}, | |
"delivery_provider": { | |
"title": "Delivery provider", | |
"description": "The company delivering this order.", | |
"type": "integer", | |
"nullable": true | |
}, | |
"order_taxes": { | |
"description": "Details about the taxes applied to the order", | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/LightOrderTax" | |
} | |
}, | |
"delivery_info": { | |
"$ref": "#/components/schemas/DeliveryProviderOrderInformation" | |
}, | |
"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 | |
}, | |
"distributor": { | |
"title": "Distributor", | |
"description": "id of he distributor delivering this order", | |
"type": "string", | |
"readOnly": true | |
} | |
} | |
}, | |
"PriceScheduleItem": { | |
"required": [ | |
"price_schedule", | |
"product" | |
], | |
"type": "object", | |
"properties": { | |
"id": { | |
"title": "ID", | |
"type": "integer", | |
"readOnly": true | |
}, | |
"price_schedule": { | |
"title": "Price Schedule", | |
"description": "Price Schedule", | |
"type": "integer" | |
}, | |
"product": { | |
"title": "Price Scheule Item Product", | |
"description": "The Product of a Price Schedule Item", | |
"type": "integer" | |
}, | |
"price": { | |
"title": "Price", | |
"description": "Custom Price of a Product", | |
"type": "string", | |
"format": "decimal" | |
} | |
} | |
}, | |
"PriceSchedule": { | |
"required": [ | |
"owner" | |
], | |
"type": "object", | |
"properties": { | |
"id": { | |
"title": "ID", | |
"type": "integer", | |
"readOnly": true | |
}, | |
"owner": { | |
"title": "Price Schedule Owner", | |
"description": "The Price Schedules of a Vendor", | |
"type": "integer" | |
}, | |
"name": { | |
"title": "Price Schedule Name", | |
"description": "Price Schedule Name", | |
"type": "string", | |
"maxLength": 300, | |
"nullable": true | |
}, | |
"description": { | |
"title": "Description", | |
"description": "An overview of the Price Schedule", | |
"type": "string", | |
"maxLength": 1500, | |
"nullable": true | |
}, | |
"exclusive_buyers": { | |
"title": "Exclusive products", | |
"description": "Products are exclusive to included buyers", | |
"type": "boolean" | |
}, | |
"active": { | |
"title": "Price Schedule is Active", | |
"description": "Is this price schedule active?", | |
"type": "boolean" | |
}, | |
"modified": { | |
"title": "Modified", | |
"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": [ | |
"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", | |
"seller", | |
"brand", | |
"manufacturer", | |
"strain_classification", | |
"sku" | |
], | |
"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" | |
}, | |
"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" | |
}, | |
"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", | |
"Case" | |
] | |
}, | |
"sell_in_unit_of_measure": { | |
"description": "If selling in multiples, the unit for the collection of products.", | |
"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" | |
}, | |
"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. If not applicable to the product, use `[]`.", | |
"type": "array", | |
"items": { | |
"description": "Id for the strains associated with the product. See `id` in the strains response.", | |
"type": "integer" | |
}, | |
"uniqueItems": true | |
}, | |
"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" | |
} | |
} | |
} | |
}, | |
"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" | |
}, | |
"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", | |
"Case" | |
] | |
}, | |
"sell_in_unit_of_measure": { | |
"description": "If selling in multiples, the unit for the collection of products.", | |
"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" | |
}, | |
"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. If not applicable to the product, use `[]`.", | |
"type": "array", | |
"items": { | |
"description": "Id for the strains associated with the product. See `id` in the strains response.", | |
"type": "integer" | |
}, | |
"uniqueItems": true | |
}, | |
"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" | |
} | |
} | |
} | |
}, | |
"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", | |
"Case" | |
] | |
}, | |
"sell_in_unit_of_measure": { | |
"description": "If selling in multiples, the unit for the collection of products.", | |
"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" | |
}, | |
"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. If not applicable to the product, use `[]`.", | |
"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" | |
} | |
} | |
}, | |
"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" | |
} | |
} | |
}, | |
"S2SCredential": { | |
"required": [ | |
"s2s_user_api_key", | |
"company", | |
"permitted_staff", | |
"s2s_licenses" | |
], | |
"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 | |
}, | |
"s2s_user_api_key": { | |
"title": "Seed To Sale User API Key", | |
"description": "User API Key for the seed to sale system.", | |
"type": "string", | |
"maxLength": 200 | |
}, | |
"company": { | |
"title": "Company associated with S2S credential", | |
"description": "Company associated with S2S credential", | |
"type": "integer" | |
}, | |
"permitted_staff": { | |
"description": "Staff members allowed to push data under this key", | |
"type": "array", | |
"items": { | |
"title": "Permitted Staff", | |
"description": "Staff members allowed to push data under this key", | |
"type": "integer" | |
}, | |
"uniqueItems": true | |
}, | |
"s2s_licenses": { | |
"description": "Licenses associated with seed to sale API Key", | |
"type": "array", | |
"items": { | |
"title": "Seed to Sale Licenses", | |
"description": "Licenses associated with seed to sale API Key", | |
"type": "integer" | |
}, | |
"uniqueItems": true | |
} | |
} | |
}, | |
"ServiceZone": { | |
"required": [ | |
"name", | |
"company" | |
], | |
"type": "object", | |
"properties": { | |
"id": { | |
"title": "ID", | |
"type": "integer", | |
"readOnly": true | |
}, | |
"name": { | |
"title": "Service Zone Name", | |
"description": "Service Zone Name", | |
"type": "string", | |
"maxLength": 300, | |
"minLength": 1 | |
}, | |
"description": { | |
"title": "Description", | |
"description": "Detailed description of the service zone.", | |
"type": "string", | |
"maxLength": 1500, | |
"nullable": true | |
}, | |
"company": { | |
"title": "Company", | |
"type": "integer" | |
} | |
} | |
}, | |
"PricingStateTax": { | |
"required": [ | |
"tax", | |
"state" | |
], | |
"type": "object", | |
"properties": { | |
"id": { | |
"title": "ID", | |
"type": "integer", | |
"readOnly": true | |
}, | |
"tax": { | |
"title": "Tax", | |
"description": "The tax associated with a state(region).", | |
"type": "integer" | |
}, | |
"state": { | |
"title": "State", | |
"description": "The state(region) associated with a tax.", | |
"type": "integer" | |
}, | |
"auto_apply": { | |
"title": "Auto apply", | |
"description": "Automatically apply this tax to relevant orders", | |
"type": "boolean" | |
}, | |
"tax_rate_pct": { | |
"title": "Tax Rate", | |
"description": "Tax rate set by state", | |
"type": "string", | |
"format": "decimal", | |
"nullable": true | |
}, | |
"tax_wholesale": { | |
"title": "Tax wholesale", | |
"description": "Should the tax be applied based on the wholesale price?", | |
"type": "boolean" | |
}, | |
"tax_ancillary": { | |
"title": "Tax ancillary", | |
"description": "Does the tax apply to ancillary items?", | |
"type": "boolean" | |
}, | |
"name": { | |
"title": "Name", | |
"type": "string", | |
"readOnly": true | |
} | |
} | |
}, | |
"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": "<uuid> Order number generated by LeafLink", | |
"type": "string", | |
"readOnly": true, | |
"minLength": 1 | |
}, | |
"external_id_seller": { | |
"title": "External id seller", | |
"description": "Number assigned to the order by the seller company", | |
"type": "string", | |
"minLength": 1, | |
"nullable": true | |
}, | |
"external_id_buyer": { | |
"title": "External id buyer", | |
"description": "Number assigned to the order by the buyer company", | |
"type": "string", | |
"minLength": 1, | |
"nullable": true | |
}, | |
"ext_acct_id": { | |
"title": "Accounting Service ID", | |
"description": "Accounting Service ID", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"created_on": { | |
"title": "Created on", | |
"description": "Date and time the order was created", | |
"type": "string", | |
"format": "date-time" | |
}, | |
"user": { | |
"title": "User", | |
"description": "username of the user who last edited the order", | |
"type": "string", | |
"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: Draft, Submitted, Accepted, Backorder, Fulfilled, Shipped, Completed, Rejected, Cancelled", | |
"type": "string" | |
}, | |
"manual": { | |
"title": "Manual", | |
"description": "Was the order manually created by the seller company?", | |
"type": "boolean" | |
}, | |
"discount_amount": { | |
"title": "Discount amount", | |
"description": "Discount amount applied to the order", | |
"type": "number", | |
"format": "decimal" | |
}, | |
"discount_type": { | |
"title": "Discount type", | |
"description": "Type of discount: % or $", | |
"type": "string", | |
"minLength": 1 | |
}, | |
"tax_amount": { | |
"title": "Tax amount", | |
"description": "Tax amount applied to the order", | |
"type": "number", | |
"format": "decimal" | |
}, | |
"tax_type": { | |
"title": "Tax type", | |
"description": "Type of tax: % or $", | |
"type": "string", | |
"minLength": 1 | |
}, | |
"shipping_charge": { | |
"required": [ | |
"amount", | |
"currency" | |
], | |
"type": "object", | |
"properties": { | |
"amount": { | |
"title": "Amount", | |
"type": "string", | |
"format": "decimal" | |
}, | |
"currency": { | |
"title": "Currency", | |
"type": "string", | |
"minLength": 1 | |
} | |
} | |
}, | |
"total": { | |
"required": [ | |
"amount", | |
"currency" | |
], | |
"type": "object", | |
"properties": { | |
"amount": { | |
"title": "Amount", | |
"type": "string", | |
"format": "decimal" | |
}, | |
"currency": { | |
"title": "Currency", | |
"type": "string", | |
"minLength": 1 | |
} | |
} | |
}, | |
"payment_term": { | |
"title": "Payment term", | |
"description": "Payment term for the order", | |
"type": "string", | |
"readOnly": true, | |
"nullable": true | |
}, | |
"payment_due_date": { | |
"title": "Payment Due Date", | |
"description": "Date that the Payment is due", | |
"type": "string", | |
"format": "date-time", | |
"nullable": true | |
}, | |
"paid": { | |
"title": "Is paid?", | |
"description": "If this order has been paid for", | |
"type": "boolean" | |
}, | |
"paid_date": { | |
"title": "Paid date", | |
"description": "Date the order was paid", | |
"type": "string", | |
"format": "date", | |
"nullable": true | |
}, | |
"ship_date": { | |
"title": "Ship date", | |
"description": "Date and time the order was shipped", | |
"type": "string", | |
"format": "date-time", | |
"nullable": true | |
}, | |
"shipping_details": { | |
"title": "Shipping details", | |
"description": "Shipping details included on an order", | |
"type": "string", | |
"minLength": 1, | |
"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", | |
"description": "Classification of the license-type associated to the order", | |
"type": "string", | |
"minLength": 1 | |
}, | |
"payment_balance": { | |
"title": "Payment balance", | |
"description": "The outstanding balance on the order", | |
"type": "string", | |
"readOnly": true | |
}, | |
"available_transitions": { | |
"title": "Available transitions", | |
"description": "States that the order can transition to", | |
"type": "string", | |
"readOnly": true | |
}, | |
"modified": { | |
"title": "Modified", | |
"description": "Date and time that the order was last modified", | |
"type": "string", | |
"format": "date-time" | |
}, | |
"has_special_requests": { | |
"title": "Has special requests", | |
"description": "Does the order have special requests?", | |
"type": "boolean" | |
}, | |
"delivery_provider": { | |
"title": "Delivery provider", | |
"description": "The company delivering this order.", | |
"type": "integer", | |
"nullable": true | |
}, | |
"order_taxes": { | |
"description": "Details about the taxes applied to the order", | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/LightOrderTax" | |
} | |
}, | |
"delivery_info": { | |
"$ref": "#/components/schemas/DeliveryProviderOrderInformation" | |
}, | |
"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 | |
}, | |
"distributor": { | |
"title": "Distributor", | |
"description": "id of he distributor delivering this order", | |
"type": "string", | |
"readOnly": true | |
} | |
} | |
}, | |
"OrderResponse": { | |
"type": "object", | |
"properties": { | |
"number": { | |
"title": "Number", | |
"description": "<uuid> Order number generated by LeafLink", | |
"type": "string", | |
"readOnly": true, | |
"minLength": 1 | |
}, | |
"external_id_seller": { | |
"title": "External id seller", | |
"description": "Number assigned to the order by the seller company", | |
"type": "string", | |
"minLength": 1, | |
"nullable": true | |
}, | |
"external_id_buyer": { | |
"title": "External id buyer", | |
"description": "Number assigned to the order by the buyer company", | |
"type": "string", | |
"minLength": 1, | |
"nullable": true | |
}, | |
"ext_acct_id": { | |
"title": "Accounting Service ID", | |
"description": "Accounting Service ID", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"created_on": { | |
"title": "Created on", | |
"description": "Date and time the order was created", | |
"type": "string", | |
"format": "date-time" | |
}, | |
"user": { | |
"title": "User", | |
"description": "username of the user who last edited the order", | |
"type": "string", | |
"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", | |
"description": "id of the brand for this order. Only applicable if the seller has the \"Separate Orders by Brand\" setting enabled.", | |
"type": "integer", | |
"nullable": true | |
}, | |
"status": { | |
"title": "Status", | |
"description": "Order status: Draft, Submitted, Accepted, Backorder, Fulfilled, Shipped, Completed, Rejected, Cancelled", | |
"type": "string" | |
}, | |
"manual": { | |
"title": "Manual", | |
"description": "Was the order manually created by the seller company?", | |
"type": "boolean" | |
}, | |
"discount_amount": { | |
"description": "To be removed on 2020-07-01. Please use `discount`.", | |
"type": "number", | |
"format": "decimal", | |
"deprecated": true | |
}, | |
"discount": { | |
"description": "Discount value applied to the order", | |
"type": "number", | |
"format": "decimal" | |
}, | |
"discount_type": { | |
"description": "Type of discount: % or $", | |
"type": "string", | |
"minLength": 1 | |
}, | |
"tax_amount": { | |
"title": "Tax amount", | |
"description": "Tax amount applied to the order", | |
"type": "number", | |
"format": "decimal" | |
}, | |
"tax_type": { | |
"title": "Tax type", | |
"description": "Type of tax: % or $", | |
"type": "string", | |
"minLength": 1 | |
}, | |
"shipping_charge": { | |
"required": [ | |
"amount", | |
"currency" | |
], | |
"type": "object", | |
"properties": { | |
"amount": { | |
"title": "Amount", | |
"type": "string", | |
"format": "decimal" | |
}, | |
"currency": { | |
"title": "Currency", | |
"type": "string", | |
"minLength": 1 | |
} | |
} | |
}, | |
"total": { | |
"required": [ | |
"amount", | |
"currency" | |
], | |
"type": "object", | |
"properties": { | |
"amount": { | |
"title": "Amount", | |
"type": "string", | |
"format": "decimal" | |
}, | |
"currency": { | |
"title": "Currency", | |
"type": "string", | |
"minLength": 1 | |
} | |
} | |
}, | |
"payment_term": { | |
"title": "Payment term", | |
"description": "Payment term for the order", | |
"type": "string", | |
"readOnly": true, | |
"nullable": true | |
}, | |
"payment_due_date": { | |
"title": "Payment Due Date", | |
"description": "Date that the Payment is due", | |
"type": "string", | |
"format": "date-time", | |
"nullable": true | |
}, | |
"paid": { | |
"title": "Is paid?", | |
"description": "If this order has been paid for", | |
"type": "boolean" | |
}, | |
"paid_date": { | |
"title": "Paid date", | |
"description": "Date the order was paid", | |
"type": "string", | |
"format": "date", | |
"nullable": true | |
}, | |
"ship_date": { | |
"title": "Ship date", | |
"description": "Date and time the order was shipped", | |
"type": "string", | |
"format": "date-time", | |
"nullable": true | |
}, | |
"shipping_details": { | |
"title": "Shipping details", | |
"description": "Shipping details included on an order", | |
"type": "string", | |
"minLength": 1, | |
"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 | |
}, | |
"sales_reps": { | |
"description": "Sales representatives associated with the order.", | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/LightCompanyStaff" | |
}, | |
"readOnly": true | |
}, | |
"classification": { | |
"title": "Classification", | |
"description": "Classification of the license-type associated to the order", | |
"type": "string", | |
"minLength": 1 | |
}, | |
"payment_balance": { | |
"title": "Payment balance", | |
"description": "The outstanding balance on the order", | |
"type": "string", | |
"readOnly": true | |
}, | |
"available_transitions": { | |
"title": "Available transitions", | |
"description": "States that the order can transition to", | |
"type": "string", | |
"readOnly": true | |
}, | |
"modified": { | |
"title": "Modified", | |
"description": "Date and time that the order was last modified", | |
"type": "string", | |
"format": "date-time" | |
}, | |
"has_special_requests": { | |
"title": "Has special requests", | |
"description": "Does the order have special requests?", | |
"type": "boolean" | |
}, | |
"delivery_provider": { | |
"title": "Delivery provider", | |
"description": "The company delivering this order.", | |
"type": "integer", | |
"nullable": true | |
}, | |
"order_taxes": { | |
"description": "Details about the taxes applied to the order", | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/LightOrderTax" | |
} | |
}, | |
"delivery_info": { | |
"$ref": "#/components/schemas/DeliveryProviderOrderInformation" | |
}, | |
"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 | |
}, | |
"distributor": { | |
"title": "Distributor", | |
"description": "id of the distributor delivering this order", | |
"type": "string", | |
"readOnly": true | |
} | |
} | |
}, | |
"OrderUpdate": { | |
"type": "object", | |
"properties": { | |
"number": { | |
"title": "Number", | |
"description": "<uuid> Order number generated by LeafLink", | |
"type": "string", | |
"readOnly": true, | |
"minLength": 1 | |
}, | |
"external_id_seller": { | |
"title": "External id seller", | |
"description": "Number assigned to the order by the seller company", | |
"type": "string", | |
"minLength": 1, | |
"nullable": true | |
}, | |
"external_id_buyer": { | |
"title": "External id buyer", | |
"description": "Number assigned to the order by the buyer company", | |
"type": "string", | |
"minLength": 1, | |
"nullable": true | |
}, | |
"user": { | |
"title": "User", | |
"description": "username of the user who last edited the order", | |
"type": "string", | |
"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": { | |
"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" | |
} | |
} | |
}, | |
"brand": { | |
"title": "Brand of Order", | |
"description": "id of the brand for this order. Only applicable if the seller has the \"Separate Orders by Brand\" setting enabled.", | |
"type": "integer", | |
"nullable": true | |
}, | |
"discount_amount": { | |
"description": "To be removed on 2020-07-01. Please use `discount`.", | |
"type": "number", | |
"format": "decimal", | |
"deprecated": true | |
}, | |
"discount": { | |
"description": "Discount value applied to the order", | |
"type": "number", | |
"format": "decimal" | |
}, | |
"discount_type": { | |
"title": "Discount type", | |
"description": "Type of discount: % or $", | |
"type": "string", | |
"minLength": 1 | |
}, | |
"tax_amount": { | |
"title": "Tax amount", | |
"description": "Tax amount applied to the order", | |
"type": "number", | |
"format": "decimal" | |
}, | |
"tax_type": { | |
"title": "Tax type", | |
"description": "Type of tax: % or $", | |
"type": "string", | |
"minLength": 1 | |
}, | |
"shipping_charge": { | |
"required": [ | |
"amount", | |
"currency" | |
], | |
"type": "object", | |
"properties": { | |
"amount": { | |
"title": "Amount", | |
"type": "string", | |
"format": "decimal" | |
}, | |
"currency": { | |
"title": "Currency", | |
"type": "string", | |
"minLength": 1 | |
} | |
} | |
}, | |
"payment_term": { | |
"title": "Payment term", | |
"description": "Payment term for the order", | |
"type": "string", | |
"readOnly": true, | |
"nullable": true | |
}, | |
"payment_due_date": { | |
"title": "Payment Due Date", | |
"description": "Date that the Payment is due", | |
"type": "string", | |
"format": "date-time", | |
"nullable": true | |
}, | |
"paid": { | |
"title": "Is paid?", | |
"description": "If this order has been paid for", | |
"type": "boolean" | |
}, | |
"paid_date": { | |
"title": "Paid date", | |
"description": "Date the order was paid", | |
"type": "string", | |
"format": "date", | |
"nullable": true | |
}, | |
"ship_date": { | |
"title": "Ship date", | |
"description": "Date and time the order was shipped", | |
"type": "string", | |
"format": "date-time", | |
"nullable": true | |
}, | |
"shipping_details": { | |
"title": "Shipping details", | |
"description": "Shipping details included on an order", | |
"type": "string", | |
"minLength": 1, | |
"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 | |
}, | |
"sales_reps": { | |
"description": "Sales representatives associated with the order.", | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/LightCompanyStaff" | |
}, | |
"readOnly": true | |
}, | |
"classification": { | |
"title": "Classification", | |
"description": "Classification of the license-type associated to the order", | |
"type": "string", | |
"minLength": 1 | |
}, | |
"payment_balance": { | |
"title": "Payment balance", | |
"description": "The outstanding balance on the order", | |
"type": "string", | |
"readOnly": true | |
}, | |
"available_transitions": { | |
"title": "Available transitions", | |
"description": "States that the order can transition to", | |
"type": "string", | |
"readOnly": true | |
}, | |
"delivery_provider": { | |
"title": "Delivery provider", | |
"description": "The company delivering this order.", | |
"type": "integer", | |
"nullable": true | |
}, | |
"delivery_info": { | |
"$ref": "#/components/schemas/DeliveryProviderOrderInformation" | |
}, | |
"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 | |
}, | |
"distributor": { | |
"title": "Distributor", | |
"description": "id of the distributor delivering this order", | |
"type": "string", | |
"readOnly": true | |
} | |
} | |
}, | |
"MenuDownload": { | |
"required": [ | |
"company", | |
"brand" | |
], | |
"type": "object", | |
"properties": { | |
"number": { | |
"title": "Number", | |
"type": "string", | |
"format": "uuid", | |
"readOnly": true | |
}, | |
"user": { | |
"title": "User", | |
"description": "User (staff) who exported PDF menu", | |
"type": "integer", | |
"readOnly": true | |
}, | |
"status": { | |
"title": "Status of menu export download", | |
"description": "Status of menu export download", | |
"type": "string", | |
"enum": [ | |
"running", | |
"failed", | |
"completed" | |
], | |
"readOnly": true | |
}, | |
"request_time": { | |
"title": "Menu export request date", | |
"description": "Date of requesting menu export", | |
"type": "string", | |
"format": "date-time", | |
"readOnly": true | |
}, | |
"complete_time": { | |
"title": "Menu export completed date", | |
"description": "Date of sending email with exported menu", | |
"type": "string", | |
"format": "date-time", | |
"readOnly": true | |
}, | |
"export": { | |
"title": "Menu Export", | |
"description": "The Document that was exported", | |
"type": "string", | |
"readOnly": true, | |
"format": "uri" | |
}, | |
"to_email": { | |
"title": "User's email", | |
"description": "Email menu export has been send to", | |
"type": "string", | |
"format": "email", | |
"readOnly": true, | |
"minLength": 1 | |
}, | |
"company": { | |
"title": "Company", | |
"description": "Company on behalf which user requested menu export", | |
"type": "integer" | |
}, | |
"brand": { | |
"title": "Brand", | |
"description": "Brand menu export refers to", | |
"type": "integer" | |
}, | |
"license_type": { | |
"title": "License Type", | |
"description": "License Type for which the menu is generated", | |
"type": "integer", | |
"nullable": true | |
} | |
} | |
}, | |
"ProductSubcategoryResponse": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"description": "Unique id generated by LeafLink." | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"slug": { | |
"type": "string" | |
}, | |
"description": { | |
"type": "string" | |
}, | |
"category": { | |
"type": "integer", | |
"description": "The id for the category this subcategory belongs to. See `id` in the product-categories response." | |
} | |
} | |
}, | |
"S2SAdjustmentReason": { | |
"required": [ | |
"name", | |
"state" | |
], | |
"type": "object", | |
"properties": { | |
"id": { | |
"title": "ID", | |
"type": "integer", | |
"readOnly": true | |
}, | |
"last_queried": { | |
"title": "Last queried", | |
"type": "string", | |
"format": "date-time" | |
}, | |
"original_object": { | |
"title": "Original object", | |
"type": "object" | |
}, | |
"created_in_leaflink": { | |
"title": "Created in leaflink", | |
"type": "boolean" | |
}, | |
"created_on": { | |
"title": "Created on", | |
"type": "string", | |
"format": "date-time", | |
"readOnly": true | |
}, | |
"modified": { | |
"title": "Modified", | |
"type": "string", | |
"format": "date-time", | |
"readOnly": true | |
}, | |
"name": { | |
"title": "Adjustment reason name", | |
"description": "Name of the adjustment reason", | |
"type": "string", | |
"maxLength": 255, | |
"minLength": 1 | |
}, | |
"requires_note": { | |
"title": "Requires note", | |
"type": "boolean", | |
"nullable": true | |
}, | |
"state": { | |
"title": "State of adjustment reason", | |
"description": "State associated with adjustment reason", | |
"type": "string", | |
"maxLength": 100 | |
} | |
} | |
}, | |
"S2SAvailableTagImport": { | |
"required": [ | |
"license_number" | |
], | |
"type": "object", | |
"properties": { | |
"id": { | |
"title": "ID", | |
"type": "integer", | |
"readOnly": true | |
}, | |
"tags_file": { | |
"title": "CSV to import", | |
"description": "CSV to import", | |
"type": "string", | |
"readOnly": true, | |
"format": "uri" | |
}, | |
"attempted": { | |
"title": "Attempted", | |
"type": "boolean", | |
"readOnly": true | |
}, | |
"success": { | |
"title": "Success", | |
"description": "Was this import successful?", | |
"type": "boolean", | |
"readOnly": true | |
}, | |
"license_number": { | |
"title": "License number to associate with import", | |
"description": "License number to associate with import", | |
"type": "string", | |
"maxLength": 100, | |
"minLength": 1 | |
}, | |
"created_on": { | |
"title": "Created on", | |
"type": "string", | |
"format": "date-time", | |
"readOnly": true | |
}, | |
"modified": { | |
"title": "Modified", | |
"type": "string", | |
"format": "date-time", | |
"readOnly": true | |
} | |
} | |
}, | |
"S2SAvailableTag": { | |
"required": [ | |
"tag", | |
"license_number" | |
], | |
"type": "object", | |
"properties": { | |
"id": { | |
"title": "ID", | |
"type": "integer", | |
"readOnly": true | |
}, | |
"tag": { | |
"title": "Tag Number", | |
"description": "The tag number provided by METRC", | |
"type": "string", | |
"maxLength": 255, | |
"minLength": 1 | |
}, | |
"tag_type": { | |
"title": "Type of Tag", | |
"description": "Type of Tag", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"available": { | |
"title": "Available", | |
"type": "boolean" | |
}, | |
"license_number": { | |
"title": "License Number of Available Tag", | |
"description": "License number associated with available tag", | |
"type": "string", | |
"maxLength": 100 | |
}, | |
"commissioned_date": { | |
"title": "Commissioned date", | |
"description": "Date this tag was commissioned by METRC.", | |
"type": "string", | |
"format": "date-time", | |
"nullable": true | |
}, | |
"status": { | |
"title": "Status", | |
"description": "Status", | |
"type": "string", | |
"maxLength": 100, | |
"nullable": true | |
}, | |
"created_on": { | |
"title": "Created on", | |
"type": "string", | |
"format": "date-time", | |
"readOnly": true | |
}, | |
"modified": { | |
"title": "Modified", | |
"type": "string", | |
"format": "date-time", | |
"readOnly": true | |
} | |
} | |
}, | |
"S2SCategory": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"title": "ID", | |
"type": "integer", | |
"readOnly": true | |
}, | |
"last_queried": { | |
"title": "Last queried", | |
"type": "string", | |
"format": "date-time" | |
}, | |
"original_object": { | |
"title": "Original object", | |
"type": "object" | |
}, | |
"created_in_leaflink": { | |
"title": "Created in leaflink", | |
"type": "boolean" | |
}, | |
"created_on": { | |
"title": "Created on", | |
"type": "string", | |
"format": "date-time", | |
"readOnly": true | |
}, | |
"modified": { | |
"title": "Modified", | |
"type": "string", | |
"format": "date-time", | |
"readOnly": true | |
}, | |
"external_id": { | |
"title": "External id", | |
"description": "ID in External S2S System", | |
"type": "integer", | |
"maximum": 2147483647, | |
"minimum": -2147483648, | |
"nullable": true | |
}, | |
"name": { | |
"title": "Category Name", | |
"description": "Name of the category", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"type": { | |
"title": "Category Type", | |
"description": "Category type", | |
"type": "string", | |
"maxLength": 100, | |
"nullable": true | |
}, | |
"quantity_type": { | |
"title": "Quantity Type", | |
"description": "Type of quantity", | |
"type": "string", | |
"maxLength": 100, | |
"nullable": true | |
}, | |
"default_lab_testing_state": { | |
"title": "Default lab testing state", | |
"description": "Default lab testing state", | |
"type": "string", | |
"maxLength": 50, | |
"nullable": true | |
}, | |
"requires_approval": { | |
"title": "Requires approval", | |
"type": "boolean", | |
"nullable": true | |
}, | |
"requires_administration_method": { | |
"title": "Requires administration method", | |
"type": "boolean", | |
"nullable": true | |
}, | |
"requires_strain": { | |
"title": "Requires strain", | |
"type": "boolean", | |
"nullable": true | |
}, | |
"requires_unit_cbd_percent": { | |
"title": "Requires unit cbd percent", | |
"type": "boolean", | |
"nullable": true | |
}, | |
"requires_unit_cbd_content": { | |
"title": "Requires unit cbd content", | |
"type": "boolean", | |
"nullable": true | |
}, | |
"requires_unit_thc_content": { | |
"title": "Requires unit thc content", | |
"type": "boolean", | |
"nullable": true | |
}, | |
"requires_unit_thc_percent": { | |
"title": "Requires unit thc percent", | |
"type": "boolean", | |
"nullable": true | |
}, | |
"requires_unit_volume": { | |
"title": "Requires unit volume", | |
"type": "boolean", | |
"nullable": true | |
}, | |
"requires_unit_weight": { | |
"title": "Requires unit weight", | |
"type": "boolean", | |
"nullable": true | |
}, | |
"requires_serving_size": { | |
"title": "Requires serving size", | |
"type": "boolean", | |
"nullable": true | |
}, | |
"requires_supply_duration_days": { | |
"title": "Requires supply duration days", | |
"type": "boolean", | |
"nullable": true | |
}, | |
"unit_quantity_multiplier": { | |
"title": "Unit quantity multiplier", | |
"type": "string", | |
"format": "decimal", | |
"nullable": true | |
}, | |
"unit_quantity_unit_of_measure_name": { | |
"title": "Unit quantity of unit of measure", | |
"description": "Unit quantity of unit of measure", | |
"type": "string", | |
"maxLength": 50, | |
"nullable": true | |
}, | |
"requires_ingredients": { | |
"title": "Requires ingredients", | |
"type": "boolean", | |
"nullable": true | |
}, | |
"requires_product_photo": { | |
"title": "Requires product photo", | |
"type": "boolean", | |
"nullable": true | |
}, | |
"can_contain_seed": { | |
"title": "Can contain seed", | |
"type": "boolean", | |
"nullable": true | |
}, | |
"can_be_remediated": { | |
"title": "Can be remediated", | |
"type": "boolean", | |
"nullable": true | |
}, | |
"license_number": { | |
"title": "Category license number", | |
"description": "Category license number", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
} | |
} | |
}, | |
"S2SDelivery": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"title": "ID", | |
"type": "integer", | |
"readOnly": true | |
}, | |
"last_queried": { | |
"title": "Last queried", | |
"type": "string", | |
"format": "date-time" | |
}, | |
"original_object": { | |
"title": "Original object", | |
"type": "object" | |
}, | |
"created_in_leaflink": { | |
"title": "Created in leaflink", | |
"type": "boolean" | |
}, | |
"created_on": { | |
"title": "Created on", | |
"type": "string", | |
"format": "date-time", | |
"readOnly": true | |
}, | |
"modified": { | |
"title": "Modified", | |
"type": "string", | |
"format": "date-time", | |
"readOnly": true | |
}, | |
"external_id": { | |
"title": "External id", | |
"description": "Delivery ID in S2S System", | |
"type": "integer", | |
"maximum": 2147483647, | |
"minimum": -2147483648, | |
"nullable": true | |
}, | |
"recipient_facility_license_number": { | |
"title": "Recipient facility license number", | |
"description": "License number of the recipient facility.", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"recipient_facility_name": { | |
"title": "Recipient facility name", | |
"description": "Name of the recipient facility.", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"shipment_type_name": { | |
"title": "Shipment type name", | |
"description": "Shipment Type.", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"estimated_departure_date_time": { | |
"title": "Estimated departure date time", | |
"description": "An estimated date and time for departure of the delivery.", | |
"type": "string", | |
"format": "date-time", | |
"nullable": true | |
}, | |
"actual_departure_date_time": { | |
"title": "Actual departure date time", | |
"description": "The actual date and time for departure of the delivery.", | |
"type": "string", | |
"format": "date-time", | |
"nullable": true | |
}, | |
"estimated_arrival_date_time": { | |
"title": "Estimated arrival date time", | |
"description": "An estimated date and time for arrival of the delivery.", | |
"type": "string", | |
"format": "date-time", | |
"nullable": true | |
}, | |
"actual_arrival_date_time": { | |
"title": "Actual arrival date time", | |
"description": "The actual date and time for arrival of the delivery.", | |
"type": "string", | |
"format": "date-time", | |
"nullable": true | |
}, | |
"planned_route": { | |
"title": "Planned route", | |
"description": "A description of the planned routed for transportation of the delivery.", | |
"type": "string", | |
"nullable": true | |
}, | |
"delivery_package_count": { | |
"title": "Delivery package count", | |
"description": "Count of packages on delivery.", | |
"type": "integer", | |
"maximum": 2147483647, | |
"minimum": -2147483648, | |
"nullable": true | |
}, | |
"delivery_received_package_count": { | |
"title": "Delivery received package count", | |
"description": "Count of packages on delivery when received.", | |
"type": "integer", | |
"maximum": 2147483647, | |
"minimum": -2147483648, | |
"nullable": true | |
}, | |
"received_date_time": { | |
"title": "Received date time", | |
"description": "Date and time the delivery was received.", | |
"type": "string", | |
"format": "date-time", | |
"nullable": true | |
}, | |
"transfer": { | |
"title": "Transfer", | |
"type": "integer", | |
"nullable": true | |
} | |
} | |
}, | |
"S2SItem": { | |
"required": [ | |
"license_number" | |
], | |
"type": "object", | |
"properties": { | |
"id": { | |
"title": "ID", | |
"type": "integer", | |
"readOnly": true | |
}, | |
"external_id": { | |
"title": "External id", | |
"description": "External ID in S2S System", | |
"type": "integer", | |
"maximum": 2147483647, | |
"minimum": -2147483648, | |
"nullable": true | |
}, | |
"name": { | |
"title": "Name of the item", | |
"description": "Name of the item", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"category": { | |
"title": "Category", | |
"type": "integer", | |
"nullable": true | |
}, | |
"type": { | |
"title": "Type of s2s item", | |
"description": "Type of s2s item", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"license_number": { | |
"title": "License number", | |
"description": "Item license number.", | |
"type": "string", | |
"minLength": 1 | |
}, | |
"quantity_type": { | |
"title": "Item quantity type", | |
"description": "Item quantity type", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"unit_of_measure": { | |
"title": "Unit of measure", | |
"type": "integer", | |
"nullable": true | |
}, | |
"strain": { | |
"title": "Strain", | |
"type": "integer", | |
"nullable": true | |
}, | |
"approval_status": { | |
"title": "Item quantity type", | |
"description": "Item quantity type", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"administration_method": { | |
"title": "Item quantity type", | |
"description": "Item quantity type", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"default_lab_testing_state": { | |
"title": "Default Lab Testing State", | |
"description": "Testing state of the Item", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"unit_cbd_percent": { | |
"title": "Unit cbd percent", | |
"type": "string", | |
"format": "decimal", | |
"nullable": true | |
}, | |
"unit_cbd_content": { | |
"title": "Unit cbd content", | |
"type": "string", | |
"format": "decimal", | |
"nullable": true | |
}, | |
"unit_cbd_content_unit_of_measure_name": { | |
"title": "Unit CBD Content unit of measure name", | |
"description": "Unit CBD Content unit of measure name", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"unit_thc_percent": { | |
"title": "Unit thc percent", | |
"type": "string", | |
"format": "decimal", | |
"nullable": true | |
}, | |
"unit_thc_content": { | |
"title": "Unit thc content", | |
"type": "string", | |
"format": "decimal", | |
"nullable": true | |
}, | |
"unit_thc_content_unit_of_measure_name": { | |
"title": "Unit THC Content unit of measure name", | |
"description": "Unit THC Content unit of measure name", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"unit_volume": { | |
"title": "Unit volume", | |
"type": "string", | |
"format": "decimal", | |
"nullable": true | |
}, | |
"unit_volume_unit_of_measure_name": { | |
"title": "Unit Volume of measure name", | |
"description": "Unit Volume unit of measure name", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"unit_weight": { | |
"title": "Unit weight", | |
"type": "string", | |
"format": "decimal", | |
"nullable": true | |
}, | |
"unit_weight_unit_of_measure_name": { | |
"title": "Unit weight of measure name", | |
"description": "Unit weight of measure name", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"serving_size": { | |
"title": "Item serving size", | |
"description": "Item serving size", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"supply_duration_days": { | |
"title": "Supply duration days", | |
"description": "Supply duration days", | |
"type": "integer", | |
"maximum": 2147483647, | |
"minimum": -2147483648, | |
"nullable": true | |
}, | |
"last_queried": { | |
"title": "Last queried", | |
"type": "string", | |
"format": "date-time" | |
}, | |
"created_on": { | |
"title": "Created on", | |
"type": "string", | |
"format": "date-time", | |
"readOnly": true | |
}, | |
"modified": { | |
"title": "Modified", | |
"type": "string", | |
"format": "date-time", | |
"readOnly": true | |
}, | |
"package_count": { | |
"title": "Package count", | |
"description": "How many packages are associated with this item?", | |
"type": "string", | |
"readOnly": true | |
}, | |
"unit_of_measure_name": { | |
"title": "Item quantity type", | |
"description": "Item quantity type", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"total_package_quantity": { | |
"title": "Total package quantity", | |
"description": "Quantity of active packages associated with this item.", | |
"type": "string", | |
"readOnly": true | |
}, | |
"category_name": { | |
"title": "Name of the item category", | |
"description": "Name of the item category", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"active": { | |
"title": "Active", | |
"description": "If item is active in metrc", | |
"type": "boolean" | |
}, | |
"imported_from_package": { | |
"title": "Imported from package", | |
"description": "Was this item imported from a package refresh?", | |
"type": "boolean" | |
} | |
} | |
}, | |
"Ingredients": { | |
"required": [ | |
"label", | |
"quantity", | |
"unit_of_measure" | |
], | |
"type": "object", | |
"properties": { | |
"label": { | |
"title": "Label", | |
"type": "string", | |
"minLength": 1 | |
}, | |
"quantity": { | |
"title": "Quantity", | |
"type": "string", | |
"minLength": 1 | |
}, | |
"unit_of_measure": { | |
"title": "Unit of measure", | |
"type": "string", | |
"minLength": 1 | |
} | |
} | |
}, | |
"S2SPackage": { | |
"required": [ | |
"quantity", | |
"product_name", | |
"label" | |
], | |
"type": "object", | |
"properties": { | |
"id": { | |
"title": "ID", | |
"type": "integer", | |
"readOnly": true | |
}, | |
"quantity": { | |
"title": "Quantity", | |
"type": "number" | |
}, | |
"ingredients": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Ingredients" | |
} | |
}, | |
"item": { | |
"title": "Item", | |
"type": "integer" | |
}, | |
"product_name": { | |
"title": "Product name", | |
"type": "string", | |
"minLength": 1 | |
}, | |
"sts_item": { | |
"title": "Sts item", | |
"type": "integer", | |
"readOnly": true | |
}, | |
"sts_unit_of_measure": { | |
"title": "Sts unit of measure", | |
"type": "integer", | |
"readOnly": true | |
}, | |
"sts_delivery": { | |
"title": "Sts delivery", | |
"type": "integer", | |
"readOnly": true | |
}, | |
"last_queried": { | |
"title": "Last queried", | |
"type": "string", | |
"format": "date-time" | |
}, | |
"original_object": { | |
"title": "Original object", | |
"type": "object" | |
}, | |
"created_in_leaflink": { | |
"title": "Created in leaflink", | |
"type": "boolean" | |
}, | |
"created_on": { | |
"title": "Created on", | |
"type": "string", | |
"format": "date-time", | |
"readOnly": true | |
}, | |
"modified": { | |
"title": "Modified", | |
"type": "string", | |
"format": "date-time", | |
"readOnly": true | |
}, | |
"external_id": { | |
"title": "External id", | |
"description": "Package ID in S2S System", | |
"type": "integer", | |
"maximum": 2147483647, | |
"minimum": -2147483648, | |
"nullable": true | |
}, | |
"label": { | |
"title": "Package Label", | |
"description": "The tag for a seed to sale package", | |
"type": "string", | |
"maxLength": 255, | |
"minLength": 1 | |
}, | |
"unit_of_measure": { | |
"title": "Unit of Measure", | |
"description": "Unit of Measure for package", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"last_modified_date": { | |
"title": "Last modified date", | |
"type": "string", | |
"format": "date-time", | |
"nullable": true | |
}, | |
"packaged_date": { | |
"title": "Packaged date", | |
"type": "string", | |
"format": "date", | |
"nullable": true | |
}, | |
"finished_date": { | |
"title": "Finished date", | |
"description": "Date package was finished.", | |
"type": "string", | |
"format": "date", | |
"nullable": true | |
}, | |
"license_number": { | |
"title": "License Number of Package", | |
"description": "License number associated with package", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"active": { | |
"title": "Active", | |
"type": "boolean" | |
}, | |
"package_type": { | |
"title": "Package type", | |
"description": "The type of contents of the package.", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"room_id": { | |
"title": "Room id", | |
"description": "Unique ID of the room this package is located in.", | |
"type": "integer", | |
"maximum": 2147483647, | |
"minimum": -2147483648, | |
"nullable": true | |
}, | |
"room_name": { | |
"title": "Room name", | |
"description": "The name of the room this package is located in.", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"unit_of_measure_abbreviation": { | |
"title": "Unit of measure abbreviation", | |
"description": "An abbreviation for the Unit of Measure.", | |
"type": "string", | |
"maxLength": 10, | |
"nullable": true | |
}, | |
"patient_license_number": { | |
"title": "Patient license number", | |
"description": "License number of the patient.", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"product_id": { | |
"title": "Product id", | |
"description": "The ID of the Metrc product associated with this package. This is not the ID of the associated LeafLink product.", | |
"type": "integer", | |
"maximum": 2147483647, | |
"minimum": -2147483648, | |
"nullable": true | |
}, | |
"product_category_name": { | |
"title": "Product category name", | |
"description": "The name of the Metrc Product Category associated with this package.", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"initial_lab_testing_state": { | |
"title": "Initial lab testing state", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"lab_testing_state": { | |
"title": "Lab testing state", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"lab_testing_state_date": { | |
"title": "Lab testing state date", | |
"description": "Date lab test was done.", | |
"type": "string", | |
"format": "date-time", | |
"nullable": true | |
}, | |
"is_production_batch": { | |
"title": "Is production batch", | |
"description": "If package product is production batch or not.", | |
"type": "boolean", | |
"nullable": true | |
}, | |
"production_batch_number": { | |
"title": "Production batch number", | |
"description": "Batch number for the production.", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"is_testing_sample": { | |
"title": "Is testing sample", | |
"description": "Test sample or not.", | |
"type": "boolean", | |
"nullable": true | |
}, | |
"is_process_validation_testing_sample": { | |
"title": "Is process validation testing sample", | |
"description": "Validation sample or not.", | |
"type": "boolean", | |
"nullable": true | |
}, | |
"product_remediation": { | |
"title": "Product remediation", | |
"type": "boolean", | |
"nullable": true | |
}, | |
"contains_remediated_product": { | |
"title": "Contains remediated product", | |
"type": "boolean", | |
"nullable": true | |
}, | |
"remediation_date": { | |
"title": "Remediation date", | |
"description": "Date of remediation.", | |
"type": "string", | |
"format": "date-time", | |
"nullable": true | |
}, | |
"received_from_manifest_number": { | |
"title": "Received from manifest number", | |
"description": "Manifest number of received.", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"received_from_facility_license_number": { | |
"title": "Received from facility license number", | |
"description": "License number of facility received from.", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"received_from_facility_name": { | |
"title": "Received from facility name", | |
"description": "Name of facility recieved from.", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"received_date_time": { | |
"title": "Received date time", | |
"description": "Date received.", | |
"type": "string", | |
"format": "date-time", | |
"nullable": true | |
}, | |
"is_on_hold": { | |
"title": "Is on hold", | |
"description": "Package is on hold or not.", | |
"type": "boolean", | |
"nullable": true | |
}, | |
"archived_date": { | |
"title": "Archived date", | |
"description": "Date package was archived.", | |
"type": "string", | |
"format": "date-time", | |
"nullable": true | |
}, | |
"shipment_package_state": { | |
"title": "Shipment package state", | |
"description": "Gross unit of weight name", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"shipped_quantity": { | |
"title": "Shipped quantity", | |
"type": "string", | |
"format": "decimal", | |
"nullable": true | |
}, | |
"gross_unit_of_weight_name": { | |
"title": "Gross unit of weight name", | |
"description": "Gross unit of weight name", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"received_quantity": { | |
"title": "Received quantity", | |
"type": "string", | |
"format": "decimal", | |
"nullable": true | |
}, | |
"received_unit_of_measure_name": { | |
"title": "Received unit of measure name", | |
"description": "received_unit_of_measure_name", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"shipped_unit_of_measure": { | |
"title": "Shipped unit of measure", | |
"description": "received_unit_of_measure_name", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"s2s_item": { | |
"title": "S2s item", | |
"type": "integer", | |
"nullable": true | |
}, | |
"s2s_unit_of_measure": { | |
"title": "S2s unit of measure", | |
"type": "integer", | |
"nullable": true | |
}, | |
"s2s_delivery": { | |
"title": "S2s delivery", | |
"type": "integer", | |
"nullable": true | |
} | |
} | |
}, | |
"RefreshRequest": { | |
"required": [ | |
"modifier", | |
"resource", | |
"start_date_time", | |
"end_date_time", | |
"refresh_type" | |
], | |
"type": "object", | |
"properties": { | |
"number": { | |
"title": "Number", | |
"description": "Identifier for refresh request.", | |
"type": "string", | |
"format": "uuid", | |
"readOnly": true | |
}, | |
"modifier": { | |
"title": "Modifier", | |
"description": "The name of the resource we're refreshing", | |
"type": "string", | |
"maxLength": 100, | |
"minLength": 1 | |
}, | |
"resource": { | |
"title": "Resource", | |
"description": "Which Seed to Sale model needs to be refreshed.", | |
"type": "string", | |
"minLength": 1 | |
}, | |
"start_date_time": { | |
"title": "Start date time", | |
"type": "string", | |
"format": "date" | |
}, | |
"end_date_time": { | |
"title": "End date time", | |
"type": "string", | |
"format": "date" | |
}, | |
"manual": { | |
"title": "Manual", | |
"description": "Was this request submitted by a LeafLink customer.", | |
"type": "boolean" | |
}, | |
"success": { | |
"title": "Success", | |
"description": "Was this request successful?", | |
"type": "boolean", | |
"readOnly": true | |
}, | |
"attempts": { | |
"title": "Attempts", | |
"description": "How many times have we attempted to process this request?", | |
"type": "integer", | |
"readOnly": true | |
}, | |
"license_numbers": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
}, | |
"default": [], | |
"nullable": true | |
}, | |
"retry": { | |
"title": "Retry", | |
"type": "boolean", | |
"readOnly": true | |
}, | |
"parent": { | |
"title": "Parent", | |
"type": "string", | |
"format": "uuid", | |
"readOnly": true | |
}, | |
"created_on": { | |
"title": "Created on", | |
"type": "string", | |
"format": "date-time", | |
"readOnly": true | |
}, | |
"modified": { | |
"title": "Modified", | |
"type": "string", | |
"format": "date-time", | |
"readOnly": true | |
}, | |
"company": { | |
"title": "Company making refresh request.", | |
"description": "Company making refresh request", | |
"type": "integer", | |
"nullable": true | |
}, | |
"refresh_type": { | |
"title": "Refresh type", | |
"description": "Which kind of refresh category is this.", | |
"type": "string", | |
"enum": [ | |
"standard", | |
"manual", | |
"inventory", | |
"transfer", | |
"config" | |
] | |
}, | |
"status": { | |
"title": "Refresh Status", | |
"description": "Refresh Status", | |
"type": "string", | |
"enum": [ | |
"pending", | |
"success", | |
"failed" | |
], | |
"readOnly": true | |
} | |
} | |
}, | |
"S2SStrain": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"title": "ID", | |
"type": "integer", | |
"readOnly": true | |
}, | |
"last_queried": { | |
"title": "Last queried", | |
"type": "string", | |
"format": "date-time" | |
}, | |
"original_object": { | |
"title": "Original object", | |
"type": "object" | |
}, | |
"created_in_leaflink": { | |
"title": "Created in leaflink", | |
"type": "boolean" | |
}, | |
"created_on": { | |
"title": "Created on", | |
"type": "string", | |
"format": "date-time", | |
"readOnly": true | |
}, | |
"modified": { | |
"title": "Modified", | |
"type": "string", | |
"format": "date-time", | |
"readOnly": true | |
}, | |
"external_id": { | |
"title": "External id", | |
"description": "External ID in S2S System", | |
"type": "integer", | |
"maximum": 2147483647, | |
"minimum": -2147483648, | |
"nullable": true | |
}, | |
"name": { | |
"title": "Name of the strain", | |
"description": "Name of the Strain", | |
"type": "string", | |
"maxLength": 400, | |
"nullable": true | |
}, | |
"testing_status": { | |
"title": "Testing Status of the strain", | |
"description": "Testing Status of the Strain", | |
"type": "string", | |
"maxLength": 100, | |
"nullable": true | |
}, | |
"thc_level": { | |
"title": "Thc level", | |
"type": "string", | |
"format": "decimal", | |
"nullable": true | |
}, | |
"cbd_level": { | |
"title": "Cbd level", | |
"type": "string", | |
"format": "decimal", | |
"nullable": true | |
}, | |
"indica_percentage": { | |
"title": "Indica percentage", | |
"type": "string", | |
"format": "decimal", | |
"nullable": true | |
}, | |
"sativa_percentage": { | |
"title": "Sativa percentage", | |
"type": "string", | |
"format": "decimal", | |
"nullable": true | |
}, | |
"license_number": { | |
"title": "License Number of Strain", | |
"description": "License number associated with strain", | |
"type": "string", | |
"maxLength": 100, | |
"nullable": true | |
}, | |
"genetics": { | |
"title": "Genetics of the strain", | |
"description": "Genetics of the strain", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
} | |
} | |
}, | |
"S2STransfer": { | |
"required": [ | |
"number" | |
], | |
"type": "object", | |
"properties": { | |
"id": { | |
"title": "ID", | |
"type": "integer", | |
"readOnly": true | |
}, | |
"last_queried": { | |
"title": "Last queried", | |
"type": "string", | |
"format": "date-time" | |
}, | |
"original_object": { | |
"title": "Original object", | |
"type": "object" | |
}, | |
"created_in_leaflink": { | |
"title": "Created in leaflink", | |
"type": "boolean" | |
}, | |
"external_id": { | |
"title": "External id", | |
"description": "Transfer ID in S2S System", | |
"type": "integer", | |
"maximum": 2147483647, | |
"minimum": -2147483648, | |
"nullable": true | |
}, | |
"number": { | |
"title": "Transfer Number", | |
"description": "The number for a transfer", | |
"type": "string", | |
"maxLength": 255, | |
"minLength": 1 | |
}, | |
"license_number": { | |
"title": "License Number", | |
"description": "License Number", | |
"type": "string", | |
"maxLength": 100, | |
"nullable": true | |
}, | |
"name": { | |
"title": "Name of the transfer", | |
"description": "Name of the transfer", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"shipper_license_number": { | |
"title": "License Number of Shipping Company", | |
"description": "License number associated with shipping company", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"shipper_name": { | |
"title": "Name of shipper facility", | |
"description": "Name of facility that shipped the package", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"transporter_license_number": { | |
"title": "License Number of transfer transporting facility.", | |
"description": "License number associated with facility that transported transfer.", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"transporter_name": { | |
"title": "Name of transporter", | |
"description": "Name of transfer transporter", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"driver_name": { | |
"title": "Name of transfer driver", | |
"description": "Name of person who drove the transferred product.", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"driver_occupational_license_number": { | |
"title": "License Number transfer driver", | |
"description": "License number of company of driver who drove the transferred product.", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"driver_vehicle_license_number": { | |
"title": "License Number transfer driver", | |
"description": "License number of company of driver who drove the transferred product.", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"delivery_count": { | |
"title": "Delivery count", | |
"description": "Intended number of packages in transfer.", | |
"type": "integer", | |
"maximum": 2147483647, | |
"minimum": -2147483648, | |
"nullable": true | |
}, | |
"received_delivery_count": { | |
"title": "Received delivery count", | |
"description": "Number of packages received in transfer.", | |
"type": "integer", | |
"maximum": 2147483647, | |
"minimum": -2147483648, | |
"nullable": true | |
}, | |
"package_count": { | |
"title": "Package count", | |
"description": "Number of packages associated with the Transfer", | |
"type": "integer", | |
"maximum": 2147483647, | |
"minimum": -2147483648, | |
"nullable": true | |
}, | |
"received_package_count": { | |
"title": "Received package count", | |
"description": "Number of packages received in transfer.", | |
"type": "integer", | |
"maximum": 2147483647, | |
"minimum": -2147483648, | |
"nullable": true | |
}, | |
"contains_plant_package": { | |
"title": "Contains plant package", | |
"description": "Does transfer contain plant package.", | |
"type": "boolean" | |
}, | |
"contains_product_package": { | |
"title": "Contains product package", | |
"description": "Does transfer contain product package.", | |
"type": "boolean" | |
}, | |
"contains_testing_sample": { | |
"title": "Contains testing sample", | |
"description": "Does transfer contain a testing sample.", | |
"type": "boolean" | |
}, | |
"contains_product_requires_remediation": { | |
"title": "Contains product requires remediation", | |
"description": "Does transfer contain a product that requires remediation.", | |
"type": "boolean" | |
}, | |
"contains_remediated_product_package": { | |
"title": "Contains remediated product package", | |
"description": "Does transfer contain any packages with a remediated product.", | |
"type": "boolean" | |
}, | |
"username": { | |
"title": "Username", | |
"description": "Username of user who created transfer", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"last_modified_date": { | |
"title": "Last modified date", | |
"type": "string", | |
"format": "date-time", | |
"nullable": true | |
}, | |
"created_date_time": { | |
"title": "Created date time", | |
"type": "string", | |
"format": "date-time", | |
"nullable": true | |
}, | |
"delivery_id": { | |
"title": "Delivery id", | |
"description": "ID of delivery associated with Transfer", | |
"type": "integer", | |
"maximum": 2147483647, | |
"minimum": -2147483648, | |
"nullable": true | |
}, | |
"recipient_license_number": { | |
"title": "Recipient Company License Number", | |
"description": "License number associated with recipient company", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"recipient_name": { | |
"title": "Name of Recipient Company", | |
"description": "Name of facility that received package", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"shipment_type_name": { | |
"title": "Shipment Type", | |
"description": "Name of transfer shipment type", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"shipment_transaction_type": { | |
"title": "Shipment Transaction Type", | |
"description": "Transaction Type of Shipment", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
}, | |
"estimated_departure_date_time": { | |
"title": "Estimated departure date time", | |
"type": "string", | |
"format": "date-time", | |
"nullable": true | |
}, | |
"departure_date_time": { | |
"title": "Departure date time", | |
"type": "string", | |
"format": "date-time", | |
"nullable": true | |
}, | |
"estimated_arrival_date_time": { | |
"title": "Estimated arrival date time", | |
"type": "string", | |
"format": "date-time", | |
"nullable": true | |
}, | |
"arrival_date": { | |
"title": "Arrival date", | |
"type": "string", | |
"format": "date-time", | |
"nullable": true | |
}, | |
"delivery_package_count": { | |
"title": "Delivery package count", | |
"description": "Number of packages sent with transfer", | |
"type": "integer", | |
"maximum": 2147483647, | |
"minimum": -2147483648, | |
"nullable": true | |
}, | |
"received_delivery_package_count": { | |
"title": "Received delivery package count", | |
"description": "Number of packages received from transfer.", | |
"type": "integer", | |
"maximum": 2147483647, | |
"minimum": -2147483648, | |
"nullable": true | |
}, | |
"received_date": { | |
"title": "Received date", | |
"type": "string", | |
"format": "date-time", | |
"nullable": true | |
}, | |
"rejected": { | |
"title": "Rejected", | |
"description": "Was this transfer rejected?", | |
"type": "boolean" | |
} | |
} | |
}, | |
"S2SUnitOfMeasure": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"title": "ID", | |
"type": "integer", | |
"readOnly": true | |
}, | |
"last_queried": { | |
"title": "Last queried", | |
"type": "string", | |
"format": "date-time" | |
}, | |
"original_object": { | |
"title": "Original object", | |
"type": "object" | |
}, | |
"created_in_leaflink": { | |
"title": "Created in leaflink", | |
"type": "boolean" | |
}, | |
"created_on": { | |
"title": "Created on", | |
"type": "string", | |
"format": "date-time", | |
"readOnly": true | |
}, | |
"modified": { | |
"title": "Modified", | |
"type": "string", | |
"format": "date-time", | |
"readOnly": true | |
}, | |
"external_id": { | |
"title": "External id", | |
"description": "External ID in S2S System", | |
"type": "integer", | |
"maximum": 2147483647, | |
"minimum": -2147483648, | |
"nullable": true | |
}, | |
"name": { | |
"title": "Unit of Measure Name", | |
"description": "Name of the unit of measure", | |
"type": "string", | |
"maxLength": 50, | |
"nullable": true | |
}, | |
"quantity_type": { | |
"title": "Quantity Type", | |
"description": "Quantity Type", | |
"type": "string", | |
"maxLength": 50, | |
"nullable": true | |
}, | |
"abbreviation": { | |
"title": "Unit of Measure Abbreviation", | |
"description": "Unit of Measure Abbreviation", | |
"type": "string", | |
"maxLength": 50, | |
"nullable": true | |
}, | |
"license_number": { | |
"title": "Unit of measure license number", | |
"description": "Unit of measure license number", | |
"type": "string", | |
"maxLength": 255, | |
"nullable": true | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment