openapi: 3.0.3 info: title: Canix API x-logo: url: https://assets.website-files.com/5ee52a0f4be6ffc2aaeb52cd/5ee52a0f4be6ff20e7eb534f_canix-logo.svg backgroundColor: "#FFFFFF" altText: Canix logo description: >- # Introduction This API documentation describes the endpoints used by third-party developers to get Canix data for their account. # Authentication Canix API uses API Keys for authentication. You can generate an API key on our [API page](https://app.canix.com/company/api), and on your API requests use the `X-API-KEY` header with the API key value you generated. We strongly recommend using a secrets manager. Plain text files like dotenv lead to accidental costly leaks. Use [Doppler](https://doppler.com/) or similar options for a developer friendly experience. AWS and Google Cloud have native solutions as well. contact: name: Canix Support url: https://help.canix.com/ email: help@canix.com version: "1.3.10" servers: - url: https://api.canix.com/api/v1 variables: {} paths: /audited_actions: get: tags: - Audited Actions summary: GetAuditedActions description: Returns Package Adjustments, Package Splits, Package Combines, Location Changes for Plant Batches, Plants and Packages, Immatures Destroyed in Plant Batches, Submitted by Email, Submitted by Name, Approved by Email and Approved by Name operationId: GetAuditedActions parameters: - $ref: "#/components/parameters/limitParam" - $ref: "#/components/parameters/offsetParam" - $ref: "#/components/parameters/orderByParam" - $ref: "#/components/parameters/whereParam" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/AuditedAction" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /sales_orders: get: tags: - Sales Orders summary: GetSalesOrders description: Return Sales Orders operationId: GetSalesOrders parameters: - $ref: "#/components/parameters/limitParam" - $ref: "#/components/parameters/offsetParam" - $ref: "#/components/parameters/orderByParam" - $ref: "#/components/parameters/whereParam" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/SalesOrder" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" post: tags: - Sales Orders summary: CreateSalesOrder description: __CALLING THIS ENDPOINT WILL MODIFY YOUR DATA IRREVERSIBLY. ONLY CALL THIS ON SANDBOX DATA DURING DEVELOPMENT/CODING/TESTING.__ operationId: CreateSalesOrder requestBody: required: true description: Create a new Sales Order content: application/json: schema: $ref: "#/components/schemas/SalesOrderRequestBody" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/SalesOrder" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /sales_orders/{sales_order_id}: get: tags: - Sales Orders summary: GetSalesOrder description: Get Sales Order by ID operationId: GetSalesOrderById parameters: - name: sales_order_id in: path description: ID of Sales Order to return required: true schema: type: integer responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/SalesOrder" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" put: tags: - Sales Orders summary: UpdateSalesOrder description: __CALLING THIS ENDPOINT WILL MODIFY YOUR DATA IRREVERSIBLY. ONLY CALL THIS ON SANDBOX DATA DURING DEVELOPMENT/CODING/TESTING.__ operationId: UpdateSalesOrder parameters: - name: sales_order_id in: path description: ID of Sales Order to update required: true schema: type: integer requestBody: required: true description: Update an existing Sales Order content: application/json: schema: $ref: "#/components/schemas/SalesOrderRequestBody" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/SalesOrder" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /sales_orders/{sales_order_id}/contents: get: tags: - Sales Orders summary: GetSalesOrderContents description: Get Sales Order Contents by Sales Order ID operationId: GetSalesOrderContentsById parameters: - name: sales_order_id in: path description: Sales Order ID required: true schema: type: integer responses: "200": description: OK content: application/json: schema: type: array items: allOf: - $ref: "#/components/schemas/SalesOrderItem" - type: object properties: weight_unit_id: type: integer weight_unit_name: type: string "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /sales_orders/{sales_order_id}/payments: get: tags: - Sales Orders summary: GetSalesOrderPayments description: Get Sales Order Payments by Sales Order ID operationId: GetSalesOrderPayments parameters: - name: sales_order_id in: path description: Sales Order ID required: true schema: type: integer responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/SalesOrderPayment" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /sales_orders/{sales_order_id}/status/{status_name}: put: tags: - Sales Orders summary: UpdateSalesOrderStatus description: | Update the status of a Sales Order. Valid status values: created, approved, filled, shipped, accepted, archived, requested, canceled To cancel a sales order, use status_name = "canceled" Note: Cannot cancel orders that are shipped, accepted, returned, or archived. __CALLING THIS ENDPOINT WILL MODIFY YOUR DATA IRREVERSIBLY. ONLY CALL THIS ON SANDBOX DATA DURING DEVELOPMENT/CODING/TESTING.__ operationId: UpdateSalesOrderStatus parameters: - name: sales_order_id in: path description: ID of Sales Order to update status required: true schema: type: integer - name: status_name in: path description: New status for the Sales Order (created, approved, filled, shipped, accepted, archived, requested, canceled) required: true schema: type: string enum: - created - approved - filled - shipped - accepted - archived - requested - canceled responses: "200": description: OK content: application/json: schema: type: object properties: previous_status: type: string description: The previous status of the sales order new_status: type: string description: The new status of the sales order required: - previous_status - new_status "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /customers: get: tags: - Customers summary: GetCustomers description: Return active Customers operationId: GetCustomers parameters: - $ref: "#/components/parameters/limitParam" - $ref: "#/components/parameters/offsetParam" - $ref: "#/components/parameters/orderByParam" - $ref: "#/components/parameters/whereParam" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/CustomerExtended" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /customers/{customer_id}: get: tags: - Customers summary: GetCustomer description: Get Customer by ID operationId: GetCustomerById parameters: - name: customer_id in: path description: Customer ID required: true schema: type: integer responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Customer" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /customers/{customer_id}/credits: post: tags: - Customers summary: AdjustCustomerCredit description: >- Adjust the customer's credit balance. A negative amount reduces the balance. The balance can be applied to sales orders after taxes via the `credits` and `pull_credit_from_customer` fields on sales order create/update. operationId: AdjustCustomerCredit parameters: - name: customer_id in: path description: Customer ID required: true schema: type: integer requestBody: content: application/json: schema: type: object required: - amount properties: amount: type: number description: Amount to add to the customer's credit balance (negative to reduce) example: 1000.0 responses: "200": description: OK content: application/json: schema: type: object properties: customer_id: type: integer credit: type: number description: The customer's new credit balance example: customer_id: 345 credit: 1000.0 "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /facilities: get: tags: - Facilities summary: GetFacilities description: Return Facilities operationId: GetFacilities parameters: - name: facility_id in: query description: Facility ID (optional) example: 123 required: false schema: type: integer - $ref: "#/components/parameters/limitParam" - $ref: "#/components/parameters/offsetParam" - $ref: "#/components/parameters/orderByParam" - $ref: "#/components/parameters/whereParam" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/Facility" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /facilities/{facility_id}: get: tags: - Facilities summary: GetFacility description: Get Facility by ID operationId: GetFacilityById parameters: - name: facility_id in: path description: Facility ID required: true schema: type: integer responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Facility" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /items: get: tags: - Items summary: GetItems description: Return items operationId: GetItems parameters: - name: facility_id in: query description: Facility ID (optional) example: 123 required: false schema: type: integer - $ref: "#/components/parameters/limitParam" - $ref: "#/components/parameters/offsetParam" - $ref: "#/components/parameters/orderByParam" - $ref: "#/components/parameters/whereParam" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/Item" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" post: tags: - Items summary: CreateItem description: __CALLING THIS ENDPOINT WILL MODIFY YOUR DATA IRREVERSIBLY. ONLY CALL THIS ON SANDBOX DATA DURING DEVELOPMENT/CODING/TESTING.__ operationId: CreateItem requestBody: required: true description: Create a new Item content: application/json: schema: $ref: "#/components/schemas/CreateItemRequestBody" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Item" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /items/{item_id}: get: tags: - Items summary: GetItem description: Get Item by ID operationId: GetItemById parameters: - name: item_id in: path description: Item ID required: true schema: type: integer responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Item" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" put: tags: - Items summary: UpdateItem description: __CALLING THIS ENDPOINT WILL MODIFY YOUR DATA IRREVERSIBLY. ONLY CALL THIS ON SANDBOX DATA DURING DEVELOPMENT/CODING/TESTING.__ operationId: UpdateItem parameters: - name: item_id in: path description: ID of Item to update required: true schema: type: integer requestBody: required: true description: Update an existing Item content: application/json: schema: $ref: "#/components/schemas/UpdateItemRequestBody" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Item" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" delete: tags: - Items summary: Delete Item description: __CALLING THIS ENDPOINT WILL MODIFY YOUR DATA IRREVERSIBLY. ONLY CALL THIS ON SANDBOX DATA DURING DEVELOPMENT/CODING/TESTING.__ operationId: DeleteItem parameters: - name: item_id in: path required: true schema: type: integer responses: "204": description: No Content "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /items/{item_id}/standard_cost: post: tags: - Items summary: AddItemStandardCost description: __CALLING THIS ENDPOINT WILL MODIFY YOUR DATA IRREVERSIBLY. ONLY CALL THIS ON SANDBOX DATA DURING DEVELOPMENT/CODING/TESTING.__ operationId: AddItemStandardCost parameters: - name: item_id in: path description: ID of Item to add standard cost required: true schema: type: integer requestBody: required: true description: Add standard cost to an Item content: application/json: schema: $ref: "#/components/schemas/ItemStandardCostRequestBody" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/ItemStandardCost" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /items/photos: post: tags: - Items summary: Create METRC Item Photos description: Create METRC Item Photos operationId: CreateMETRCItemPhotos requestBody: required: true description: Create METRC Item Photos content: application/json: schema: $ref: "#/components/schemas/CreateMETRCItemPhotosRequestBody" responses: "201": description: CREATED content: application/json: schema: properties: photo_ids: type: array description: IDs of the photos that were created items: type: integer "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "500": $ref: "#/components/responses/500ServerError" /items/files: post: tags: - Items summary: Create METRC Item Files description: Create METRC Item Files operationId: CreateMETRCItemFiles requestBody: required: true description: Create METRC Item Files content: application/json: schema: $ref: "#/components/schemas/CreateMETRCItemFilesRequestBody" responses: "201": description: CREATED content: application/json: schema: properties: file_ids: type: array description: IDs of the files that were created items: type: integer "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "500": $ref: "#/components/responses/500ServerError" /item_types: get: tags: - Item Types summary: GetItemTypes description: Return item types operationId: GetItemTypes parameters: - name: facility_id in: query description: Facility ID (optional) example: 123 required: false schema: type: integer - $ref: "#/components/parameters/limitParam" - $ref: "#/components/parameters/offsetParam" - $ref: "#/components/parameters/orderByParam" - $ref: "#/components/parameters/whereParam" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/ItemType" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /item_sub_types: get: tags: - Item Sub-Types summary: GetItemTypes description: Return item sub-types operationId: GetItemSubTypes parameters: - name: facility_id in: query description: Facility ID (optional) example: 123 required: false schema: type: integer - $ref: "#/components/parameters/limitParam" - $ref: "#/components/parameters/offsetParam" - $ref: "#/components/parameters/orderByParam" - $ref: "#/components/parameters/whereParam" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/ItemSubType" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /brands: get: tags: - Brands summary: GetBrands description: Return brands for the user's company operationId: GetBrands parameters: - $ref: "#/components/parameters/limitParam" - $ref: "#/components/parameters/offsetParam" - $ref: "#/components/parameters/orderByParam" - $ref: "#/components/parameters/whereParam" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/Brand" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /strains: get: tags: - Strains summary: GetStrains description: Return active Strains operationId: GetStrains parameters: - name: facility_id in: query description: Facility ID (optional) example: 123 required: false schema: type: integer - $ref: "#/components/parameters/limitParam" - $ref: "#/components/parameters/offsetParam" - $ref: "#/components/parameters/orderByParam" - $ref: "#/components/parameters/whereParam" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/Strain" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" post: tags: - Strains summary: CreateStrain description: __CALLING THIS ENDPOINT WILL MODIFY YOUR DATA IRREVERSIBLY. ONLY CALL THIS ON SANDBOX DATA DURING DEVELOPMENT/CODING/TESTING.__ operationId: CreateStrain requestBody: required: true description: Create a new Strain content: application/json: schema: $ref: "#/components/schemas/CreateStrainRequestBody" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Strain" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /strains/{strain_id}: get: tags: - Strains summary: GetStrain description: Get Strain by ID operationId: GetStrainById parameters: - name: strain_id in: path description: Strain ID required: true schema: type: integer responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Strain" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" put: tags: - Strains summary: UpdateStrain description: __CALLING THIS ENDPOINT WILL MODIFY YOUR DATA IRREVERSIBLY. ONLY CALL THIS ON SANDBOX DATA DURING DEVELOPMENT/CODING/TESTING.__ operationId: UpdateStrain parameters: - name: strain_id in: path description: ID of Strain to update required: true schema: type: integer requestBody: required: true description: Update an existing Strain content: application/json: schema: $ref: "#/components/schemas/StrainRequestBody" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Strain" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /locations: get: tags: - Locations summary: GetLocations description: Return active Locations operationId: GetLocations parameters: - name: facility_id in: query description: Facility ID (optional) example: 123 required: false schema: type: integer - $ref: "#/components/parameters/limitParam" - $ref: "#/components/parameters/offsetParam" - $ref: "#/components/parameters/orderByParam" - $ref: "#/components/parameters/whereParam" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/Location" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /locations/count: get: tags: - Locations summary: GetLocationsCount description: Return total number of active Locations operationId: GetLocationsCount parameters: - name: facility_id in: query description: Facility ID (optional) example: 123 required: false schema: type: integer - $ref: "#/components/parameters/whereParam" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/RecordCount" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /locations/{location_id}: get: tags: - Locations summary: GetLocation description: Get Location by ID operationId: GetLocationById parameters: - name: location_id in: path description: Location ID required: true schema: type: integer responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Location" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /purchase_orders: get: tags: - Purchase Orders summary: GetPurchaseOrders description: Return Purchase Orders operationId: GetPurchaseOrders parameters: - $ref: "#/components/parameters/limitParam" - $ref: "#/components/parameters/offsetParam" - $ref: "#/components/parameters/orderByParam" - $ref: "#/components/parameters/whereParam" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/PurchaseOrder" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" post: tags: - Purchase Orders summary: PostPurchaseOrder description: __CALLING THIS ENDPOINT WILL MODIFY YOUR DATA IRREVERSIBLY. ONLY CALL THIS ON SANDBOX DATA DURING DEVELOPMENT/CODING/TESTING.__ operationId: PostPurchaseOrder requestBody: required: true description: Create a new Purchase Order content: application/json: schema: $ref: "#/components/schemas/CreatePurchaseOrderRequestBody" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/PurchaseOrder" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /purchase_orders/{purchase_order_id}: get: tags: - Purchase Orders summary: GetPurchaseOrder description: Get Purchase Order by ID operationId: GetPurchaseOrderById parameters: - name: purchase_order_id in: path description: ID of Purchase Order to return required: true schema: type: integer responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/PurchaseOrder" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /purchase_orders/{purchase_order_id}/contents: get: tags: - Purchase Orders summary: GetPurchaseOrderContents description: Get Purchase Order Contents by Purchase Order ID operationId: GetPurchaseOrderContentsById parameters: - name: purchase_order_id in: path description: Purchase Order ID required: true schema: type: integer responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/PurchaseOrderItem" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /purchase_orders/{purchase_order_id}/payments: get: tags: - Purchase Orders summary: GetPurchaseOrderPayments description: Get Purchase Order Payments by Purchase Order ID operationId: GetpurchaseOrderPayments parameters: - name: purchase_order_id in: path description: Purchase Order ID required: true schema: type: integer responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/PurchaseOrderPayment" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /vendors: get: tags: - Vendors summary: GetVendors description: Return active Vendors for your company operationId: GetVendors parameters: - $ref: "#/components/parameters/limitParam" - $ref: "#/components/parameters/offsetParam" - $ref: "#/components/parameters/orderByParam" - $ref: "#/components/parameters/whereParam" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/Vendor" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" post: tags: - Vendors summary: CreateVendor description: __CALLING THIS ENDPOINT WILL MODIFY YOUR DATA IRREVERSIBLY. ONLY CALL THIS ON SANDBOX DATA DURING DEVELOPMENT/CODING/TESTING.__ operationId: CreateVendor requestBody: required: true description: Create a new Vendor content: application/json: schema: $ref: "#/components/schemas/VendorRequestBody" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Vendor" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /vendors/{vendor_id}: get: tags: - Vendors summary: GetVendor description: Get Vendor by ID operationId: GetVendorById parameters: - name: vendor_id in: path description: Vendor ID required: true schema: type: integer responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Vendor" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" put: tags: - Vendors summary: UpdateVendor description: __CALLING THIS ENDPOINT WILL MODIFY YOUR DATA IRREVERSIBLY. ONLY CALL THIS ON SANDBOX DATA DURING DEVELOPMENT/CODING/TESTING.__ operationId: UpdateVendor parameters: - name: vendor_id in: path description: ID of Vendor to update required: true schema: type: integer requestBody: required: true description: Update an existing Vendor content: application/json: schema: $ref: "#/components/schemas/VendorRequestBody" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Vendor" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" delete: tags: - Vendors summary: DeleteVendor description: __CALLING THIS ENDPOINT WILL MODIFY YOUR DATA IRREVERSIBLY. ONLY CALL THIS ON SANDBOX DATA DURING DEVELOPMENT/CODING/TESTING.__ operationId: DeleteVendor parameters: - name: vendor_id in: path description: ID of Vendor to delete required: true schema: type: integer responses: "204": description: No Content "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /packages: get: tags: - Packages summary: GetPackages description: Return all submitted Packages of all statuses operationId: GetPackages parameters: - $ref: "#/components/parameters/limitParam" - $ref: "#/components/parameters/offsetParam" - $ref: "#/components/parameters/orderByParam" - $ref: "#/components/parameters/whereParam" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/Package" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /packages/{package_id}: get: tags: - Packages summary: GetPackage description: Get Package by ID operationId: GetPackageById parameters: - name: package_id in: path description: Package ID required: true schema: type: integer responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Package" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /non_cannabis_products: get: tags: - Non-Cannabis Products summary: GetNonCannabisProducts description: Return all Non-Cannabis Products for the user's company operationId: GetNonCannabisProducts parameters: - name: facility_ids in: query description: Facility IDs (optional) example: [123] required: false schema: type: array items: type: integer - $ref: "#/components/parameters/limitParam" - $ref: "#/components/parameters/offsetParam" - $ref: "#/components/parameters/orderByParam" - $ref: "#/components/parameters/whereParam" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/NonCannabisProduct" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" post: tags: - Non-Cannabis Products summary: PostNonCannabisProduct description: __CALLING THIS ENDPOINT WILL MODIFY YOUR DATA IRREVERSIBLY. ONLY CALL THIS ON SANDBOX DATA DURING DEVELOPMENT/CODING/TESTING.__ Each request creates the product in a single facility (facility_id). To share a product across additional facilities, contact support or use the app. operationId: PostNonCannabisProduct requestBody: required: true description: Create a new Non-Cannabis Product content: application/json: schema: $ref: "#/components/schemas/CreateNonCannabisProductRequestBody" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/NonCannabisProduct" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "422": description: Metrc submission failed content: application/json: schema: type: object properties: error: type: string example: "Metrc submission failed: ..." "500": $ref: "#/components/responses/500ServerError" /non_cannabis_products/{non_cannabis_product_id}: get: tags: - Non-Cannabis Products summary: GetNonCannabisProduct description: Get Non-Cannabis Product by ID operationId: GetNonCannabisProductById parameters: - name: non_cannabis_product_id in: path description: Non-Cannabis Product ID required: true schema: type: integer responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/NonCannabisProduct" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /non_cannabis_products/{non_cannabis_product_id}/boms: get: tags: - Non-Cannabis Products summary: GetNonCannabisProductBOMs description: Get Bills of Materials associated with a Non-Cannabis Product operationId: GetNonCannabisProductBOMs parameters: - name: non_cannabis_product_id in: path description: Non-Cannabis Product ID required: true schema: type: integer responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/BillOfMaterials" example: - id: 12 name: Bulk - Dark Chocolate Peaks - 10mg active_date: "2023-01-01" expiration_date: "2023-12-31" proportion_type: single_instance last_updated_at: "2023-01-15T10:30:00.000Z" source_non_cannabis_products: - name: 1/8th Jar non_cannabis_product_id: 24 quantity: 1 weight_unit: Each application_setting: proportional source_cannabis_items: - quantity: 100 weight_unit: Grams item: id: 242 name: Hammer Bud item_category: null item_sub_category: null output_items: - item_id: 370 name: Jarred Flower quantity: 50 weight_unit: Grams item_category: null item_sub_category: null "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /plant_batches: get: tags: - Plant Batches summary: GetPlantBatches description: Return active Plant Batches operationId: GetPlantBatches parameters: - $ref: "#/components/parameters/limitParam" - $ref: "#/components/parameters/offsetParam" - $ref: "#/components/parameters/orderByParam" - $ref: "#/components/parameters/whereParam" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/PlantBatch" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /plant_batches/{plant_batch_id}: get: tags: - Plant Batches summary: GetPlantBatch description: Get Plant Batch by ID operationId: GetPlantBatchById parameters: - name: plant_batch_id in: path description: Plant Batch ID required: true schema: type: integer responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/PlantBatch" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /plants: get: tags: - Plants summary: GetPlants description: Return active Plants operationId: GetPlants parameters: - $ref: "#/components/parameters/limitParam" - $ref: "#/components/parameters/offsetParam" - $ref: "#/components/parameters/orderByParam" - $ref: "#/components/parameters/whereParam" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/Plant" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /plants/count: get: tags: - Plants summary: GetPlantsCount description: Return total count of active Plants operationId: GetPlantsCount parameters: - $ref: "#/components/parameters/whereParam" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/RecordCount" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /plants/{plant_id}: get: tags: - Plants summary: GetPlant description: Get Plant by ID operationId: GetPlantById parameters: - name: plant_id in: path description: Plant ID required: true schema: type: integer responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Plant" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /payments: get: tags: - Sales Orders summary: GetPayments description: | Return sales order payments across all of the company's facilities, newest first. Filter by received date with the `where` parameter, e.g. `where=payment_date >= '2026-01-01'`. operationId: GetPayments parameters: - name: facility_id in: query description: Facility ID (optional) example: 123 required: false schema: type: integer - $ref: "#/components/parameters/limitParam" - $ref: "#/components/parameters/offsetParam" - $ref: "#/components/parameters/orderByParam" - $ref: "#/components/parameters/whereParam" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/SalesOrderPayment" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /payments/{payment_id}: get: tags: - Sales Orders summary: GetPayment description: Get a sales order payment by ID operationId: GetPaymentById parameters: - name: payment_id in: path description: Payment ID required: true schema: type: integer responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/SalesOrderPayment" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /products: get: tags: - Products summary: GetProducts description: Return products operationId: GetProducts parameters: - name: facility_id in: query description: Facility ID (optional) example: 123 required: false schema: type: integer - $ref: "#/components/parameters/limitParam" - $ref: "#/components/parameters/offsetParam" - $ref: "#/components/parameters/orderByParam" - $ref: "#/components/parameters/whereParam" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/Product" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /products/{product_id}: get: tags: - Products summary: GetProduct description: Get Product by ID operationId: GetProductById parameters: - name: product_id in: path description: Product ID required: true schema: type: integer responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Product" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /harvests: get: tags: - Harvests summary: GetHarvests description: Return active Harvests operationId: GetHarvests parameters: - $ref: "#/components/parameters/limitParam" - $ref: "#/components/parameters/offsetParam" - $ref: "#/components/parameters/orderByParam" - $ref: "#/components/parameters/whereParam" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/Harvest" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /harvests/{harvest_id}: get: tags: - Harvests summary: GetHarvest description: Get Harvest by ID operationId: GetHarvestById parameters: - name: harvest_id in: path description: Harvest ID required: true schema: type: integer responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Harvest" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /transfers: get: tags: - Transfers summary: GetTransfers description: Return active Transfers operationId: GetTransfers parameters: - $ref: "#/components/parameters/limitParam" - $ref: "#/components/parameters/offsetParam" - $ref: "#/components/parameters/orderByParam" - $ref: "#/components/parameters/whereParam" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/Transfer" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /transfers/{transfer_id}: get: tags: - Transfers summary: GetTransfer description: Get Transfer by ID operationId: GetTransferById parameters: - name: transfer_id in: path description: Transfer ID required: true schema: type: integer responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Transfer" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /transfer_destinations: get: tags: - Transfer Destinations summary: GetTransferDestinations description: Return Transfer Destinations operationId: GetTransferDestinations parameters: - $ref: "#/components/parameters/limitParam" - $ref: "#/components/parameters/offsetParam" - $ref: "#/components/parameters/orderByParam" - $ref: "#/components/parameters/whereParam" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/TransferDestination" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /transfer_destinations/{transfer_destination_id}: get: tags: - Transfer Destinations summary: GetTransferDestination description: Get Transfer Destination by ID operationId: GetTransferDestinationById parameters: - name: transfer_destination_id in: path description: Transfer Destination ID required: true schema: type: integer responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/TransferDestination" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /bills_of_materials: get: tags: - Bill of Materials summary: GetBillsOfMaterials description: Get all Bills of Materials operationId: GetBillOfMaterialsById responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/BillOfMaterials" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /bills_of_materials/{bill_of_materials_id}: get: tags: - Bill of Materials summary: GetBillOfMaterials description: Get Bill of Materials by ID operationId: GetBillOfMaterialsById parameters: - name: bill_of_materials_id in: path description: ID of Bill of Materials to return required: true schema: type: integer responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/BillOfMaterials" example: id: 12 name: Bulk - Dark Chocolate Peaks - 5mg active_date: "2023-01-01" expiration_date: "2023-12-31" proportion_type: single_instance source_non_cannabis_products: - name: 1/8th Jar non_cannabis_product_id: 24 quantity: 1 weight_unit: Each application_setting: proportional - name: Gloves - Large non_cannabis_product_id: 56 quantity: 2 weight_unit: Each application_setting: fixed source_cannabis_items: - name: Hammer Bud item_id: 242 item_category_id: null item_sub_category_id: null quantity: 20 weight_unit: Grams - name: B Buds item_id: null item_category_id: 98 item_sub_category_id: null quantity: 25 weight_unit: Grams output_items: - name: Jarred Flower item_id: 370 quantity: 50 weight_unit: Grams item_category: null item_sub_category: null - name: null item_id: 371 quantity: 25 weight_unit: Grams item_category: id: 98 name: B Buds item_sub_category: null "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /manu_batches: get: tags: - Manufacturing Batch summary: GetManuBatches description: Get All Manufacturing Batches operationId: GetManuBatches responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/ManuBatch" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /manu_batches/{manu_batch_id}: get: tags: - Manufacturing Batch summary: GetManuBatch description: Get Manufacturing Batch by ID operationId: GetManuBatchById parameters: - name: manu_batch_id in: path description: ID of Manufacturing Batch to return required: true schema: type: integer responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/ManuBatch" example: id: 2 status: Run 3 of 3 current_location: processing room start_date: "2022-05-01" end_date: "2022-05-30" created_at: "2022-04-15T12:33:00.000Z" updated_at: "2022-05-22T07:21:00.000Z" notes: notes about this batch manufacturing_run_ids: [8, 9, 10] "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /manu_batch_runs: get: tags: - Manufacturing Run summary: GetManuBatchRuns description: Get All Manufacturing Runs operationId: GetManuBatchRuns responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/ManuBatchRun" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /manu_batch_runs/{manu_batch_run_id}: get: tags: - Manufacturing Run summary: GetManuBatchRun description: Get Manufacturing Run by ID operationId: GetManuBatchRunById parameters: - name: manu_batch_run_id in: path description: ID of Manufacturing Run to return required: true schema: type: integer responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/ManuBatchRun" example: id: 10 facility_id: 14 name: Stage 2 status: OPEN start_date: "2022-05-24" end_date: "2022-05-30" created_at: "2022-05-22T19:58:00.000Z" updated_at: "2021-05-23T05:12:01.000Z" location_id: 2 bill_of_materials_id: 12 manufacturing_batch_id: 9 order: 2 notes: "" total_cannabis_costs: 14.30 total_nci_costs: 2.50 total_labor_costs: 9.05 yield: 75.0 machine_info: temperature: 20.1 temperature_unit: Celcius solvent_id: 150 solvent_quantity: 10.5 solvent_weight_unit: Grams time_in_solvent_ms: 2400 time_in_solvent_display_units: Second cannabis_inputs: - package_id: 3501 package_tag: 1A4FF0000000022000000719 quantity: 2.54 weight_unit: Grams psi: 600.0 cost: 14.30 non_cannabis_inputs: - non_cannabis_product_name: Fertilizer non_cannabis_product_id: 145 lot: DL21309 lot_id: 253 quantity: 100.5 weight_unit: Grams cost: 2.50 cannabis_outputs: - package_id: 5200 package_tag: 1A4FF0000000022000001419 quantity: 500 weight_unit: Grams labors: - employee_name: Jane Doe hours_worked: 0.5 cost: 10 - employee_name: John Doe hours_worked: 1 cost: 20 wastes: - package_id: 4601 package_tag: 1A4FF0000000022000004423 quantity: 50 weight_unit: Grams reason: Waste Destruction date: "2022-05-24" notes: waste from production "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /companies/{company_id}: get: tags: - Company summary: GetCompany description: Get Company by ID operationId: GetCompanyById parameters: - name: company_id in: path description: Company ID required: true schema: type: integer responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Company" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /weight_units: get: tags: - WeightUnits summary: GetWeightUnits description: Return all Weight Units operationId: GetWeightUnits parameters: - $ref: "#/components/parameters/limitParam" - $ref: "#/components/parameters/offsetParam" - $ref: "#/components/parameters/orderByParam" - $ref: "#/components/parameters/whereParam" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/WeightUnit" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /standard_costs/{standard_cost_id}: get: tags: - Standard Costs summary: GetStandardCost description: Get details of a specific Standard Cost operationId: GetStandardCost parameters: - name: standard_cost_id in: path description: ID of Standard Cost to retrieve required: true schema: type: integer responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/ItemStandardCost" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" put: tags: - Standard Costs summary: UpdateStandardCost description: __CALLING THIS ENDPOINT WILL MODIFY YOUR DATA IRREVERSIBLY. ONLY CALL THIS ON SANDBOX DATA DURING DEVELOPMENT/CODING/TESTING.__ operationId: UpdateStandardCost parameters: - name: standard_cost_id in: path description: ID of Standard Cost to update required: true schema: type: integer requestBody: required: true description: Update an existing Standard Cost content: application/json: schema: type: object required: - cost - start_date properties: cost: type: number format: float example: 10.50 description: The standard cost amount start_date: type: string format: date example: "2024-02-03" description: Start date for the standard cost end_date: type: string format: date example: "2024-03-03" description: Optional end date for the standard cost responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/ItemStandardCost" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" delete: tags: - Standard Costs summary: DeleteStandardCost description: | __CALLING THIS ENDPOINT WILL MODIFY YOUR DATA IRREVERSIBLY. ONLY CALL THIS ON SANDBOX DATA DURING DEVELOPMENT/CODING/TESTING.__ Delete a specific Standard Cost operationId: DeleteStandardCost parameters: - name: standard_cost_id in: path description: ID of Standard Cost to delete required: true schema: type: integer responses: "200": description: Standard Cost successfully deleted "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "500": $ref: "#/components/responses/500ServerError" /submissions/{submission_id}: get: tags: - Submissions summary: GetSubmission description: | Get Submission by ID. A submission represents an asynchronous action (such as creating a package, adjusting inventory, submitting a transfer, etc.) that may be pending, successful, failed, or require approval. Use this endpoint to poll the status of a submission after initiating an action. operationId: GetSubmissionById parameters: - name: submission_id in: path description: Submission UUID required: true schema: type: string example: "U3VibWlzc2lvbjo0NTY3ODk=" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Submission" examples: success: summary: Successful submission value: uuid: "U3VibWlzc2lvbjo0NTY3ODk=" status: "SUCCESS" readable_name: "Create Package" description: "Package created from harvest\nTag: 1A40000000000000001" error_message: "" result: package_id: 12345 tag: "1A40000000000000001" created_at: "2024-01-15T10:30:00.000Z" last_run_at: "2024-01-15T10:30:05.000Z" pending: summary: Pending submission value: uuid: "U3VibWlzc2lvbjo0NTY3OTA=" status: "PENDING" readable_name: "Adjust Package" description: "Adjusting package weight" error_message: "" result: null created_at: "2024-01-15T10:30:00.000Z" last_run_at: null failed: summary: Failed submission value: uuid: "U3VibWlzc2lvbjo0NTY3OTE=" status: "FAILED" readable_name: "Create Transfer" description: "Transfer to ABC Dispensary" error_message: "Invalid destination license number" result: null created_at: "2024-01-15T10:30:00.000Z" last_run_at: "2024-01-15T10:30:10.000Z" "400": $ref: "#/components/responses/400BadRequest" "401": $ref: "#/components/responses/401NotAuthenticated" "403": $ref: "#/components/responses/403AccessDenied" "404": $ref: "#/components/responses/404NotFound" "422": description: Unable to fetch submission data content: application/json: schema: type: object properties: error: type: string example: "Unable to fetch submission data" "500": $ref: "#/components/responses/500ServerError" components: schemas: AuditedAction: title: Audited Action type: object properties: facility_id: type: integer object_id: type: integer object_type: type: string object_tag: type: string context: type: array items: type: string description: type: string submitted_date: type: string example: 2018-11-06T08:00:00.000Z approval_date: type: string example: 2018-11-06T08:00:00.000Z created_at: type: string example: 2018-11-06T08:00:00.000Z updated_at: type: string example: 2018-11-06T08:00:00.000Z SalesOrder: title: Sales Order required: - id - facility_id - name - status - delivery_date - other_tax_rate - local_tax_rate - state_tax_rate type: object properties: id: type: integer facility_id: type: integer description: Facility ID (fk) name: type: string external_identifier: type: string description: External Sales Order ID (from partner system, not unique) status: type: string description: >- status, can be one of 'created', 'approved', 'filled', 'shipped', 'rejected', 'accepted', 'archived', 'requested' created_at: type: string description: Timestamp that the record was created in Canix customer: $ref: "#/components/schemas/Customer" delivery_date: type: string delivery_fee: type: number payment_date: type: string description: Payment due date payment_terms: type: string local_tax_rate: type: number state_tax_rate: type: number other_tax_rate: type: number subtotal: type: number description: Subtotal of all items total_cultivation_tax: type: number total_price: type: number description: Total price (with taxes) total_paid: type: number credits: type: number description: >- Customer credit applied to this order, as a positive number. Credits are applied after taxes, so they do not reduce the taxable subtotal. Writable on create/update via the `credits` request field. discount: type: number description: >- Order-level discount amount (from `sales_order_credit`), as a positive number. Discounts are applied before taxes and reduce the taxable subtotal. remaining_balance: type: number internal_notes: type: string payments: description: Payments collected for this order type: array items: $ref: "#/components/schemas/SalesOrderPayment" sales_order_credit: $ref: "#/components/schemas/Discount" display_status: type: string description: The display status of the order. This is the custom status name if set, otherwise the standard status value. contents: description: Contents of the order (i.e. line items) type: array items: allOf: - $ref: "#/components/schemas/SalesOrderItem" - type: object properties: weight_unit_id: type: integer weight_unit_name: type: string sales_representative: schema: $ref: "#/components/schemas/User" invoice_url: type: string description: URL to the latest invoice if it exists example: https://www.app.canix.com/sales/invoice/view/123456 updated_at: type: string example: 2018-11-06T08:00:00.000Z example: id: 84 name: 0000002062 external_identifier: "SAP-ORDER-12345" facility_id: 14 status: created customer: id: 345 contact_name: John Smith company_name: Zen Ltd facility_license_number: 2020124 license_type: 3 customer_number: 247123 updated_at: 2020-04-24T02:18:42.703Z license_expiration_date: 2020-04-24 phone: 1222312 email: john.doe@twww.com", territory: abc address: street: 123 Cumberland St street2: West city: DL county: LN state: OK postal_code: 111001 notes: great customer! outstanding_balance: 0 delivery_date: "2021-05-24T19:58:00.000Z" delivery_fee: 2000 payment_date: "2021-05-24T19:58:00.000Z" payment_terms: NET-14 local_tax_rate: 0 state_tax_rate: 0.27 other_tax_rate: 0 subtotal: 2124.22 total_cultivation_tax: 0 total_price: 2697.76 total_paid: 100.00 credits: 0 discount: 0 internal_notes: "" remaining_balance: 2597.76 contents: - id: 100 weight: 20 weight_unit: Each unit_price: 20 total_price: 400 item: id: 7036 name: Blue Dream - Trim sku: "22657" package_ids: - 123 - 456 discount: type: "fixed" amount: 10.0 reason: "10$ off" updated_at: "2021-05-24T19:58:00.000Z" order: 1 payments: - date: "2021-05-24T19:58:00.000Z" amount: 100 sales_representative: id: 123, name: "John Doe" email: "j@d.com" sales_order_credit: type: "percentage" amount: 25.0 reason: "25% off" display_status: "Pending Review" invoice_url: https://www.app.canix.com/sales/invoice/view/123456 updated_at: "2021-05-24T19:58:00.000Z" SalesOrderItem: title: Sales Order Item required: - id - sales_order_id type: object properties: id: type: integer weight: type: number weight_unit: oneOf: - type: string description: Unit name or abbreviation - type: integer description: Unit id unit_price: type: number total_price: type: number description: Total price (unit * weight) item: $ref: "#/components/schemas/Sales_order_item" brand: allOf: - $ref: "#/components/schemas/IdName" nullable: true description: Brand of the sold item, product, or non-cannabis product (null if none) product_id: type: integer nullable: true description: ID of the linked cannabis Product, if any product_brand: allOf: - $ref: "#/components/schemas/IdName" nullable: true description: Brand of the linked cannabis Product, if any is_sample: type: boolean description: Whether the line item is a trade sample package_ids: type: array items: type: integer updated_at: type: string example: 2018-11-06T08:00:00.000Z order: type: integer description: Position of the item in the order discount: $ref: "#/components/schemas/Discount" example: id: 100 weight: 20 weight_unit: Each unit_price: 20 total_price: 400 item: id: 7036 name: Blue Dream - Trim sku: "22657" brand: id: 12 name: Sunshine Co product_id: 4500 product_brand: id: 12 name: Sunshine Co is_sample: false package_ids: - 123 - 456 discount: type: "percentage" amount: 25.0 reason: "25% off" updated_at: "2021-05-24T19:58:00.000Z" order: 1 Discount: title: Discount type: object properties: type: type: string enum: ["fixed", "percentage"] amount: type: number reason: type: string example: type: "fixed" amount: 10.0 reason: "Black Friday Sale" SalesOrderPayment: title: Sales Order Payment required: - amount - date type: object properties: id: type: integer sales_order_id: type: integer description: ID of the sales order this payment was applied to amount: type: number date: type: integer reference_number: type: string nullable: true description: Payment reference number external_transaction_name: type: string nullable: true description: Readable name of the linked external (e.g. accounting) transaction updated_at: type: string example: 2018-11-06T08:00:00.000Z example: id: 9001 sales_order_id: 584857 amount: 10000 date: "2021-05-24T19:58:00.000Z" reference_number: "CHK-1042" external_transaction_name: "QBO Payment #55" updated_at: "2021-05-24T19:58:00.000Z" Submission: title: Submission description: | A submission represents an asynchronous action (such as creating a package, adjusting inventory, submitting a transfer, etc.) that may be pending, successful, failed, or require approval. type: object required: - uuid - status - created_at properties: uuid: type: string description: The unique identifier for the submission example: "U3VibWlzc2lvbjo0NTY3ODk=" status: $ref: "#/components/schemas/SubmissionStatus" readable_name: type: string nullable: true description: Human-readable name describing the submission action example: "Create Package" description: type: string description: Detailed description of the submission, may include multiple lines example: "Package created from harvest\nTag: 1A40000000000000001" error_message: type: string description: Error message if the submission failed, empty string otherwise example: "" result: type: object nullable: true description: Result data from a successful submission (e.g., created record IDs) additionalProperties: true example: package_id: 12345 tag: "1A40000000000000001" created_at: type: string format: date-time description: When the submission was created example: "2024-01-15T10:30:00.000Z" last_run_at: type: string format: date-time nullable: true description: When the submission was last executed (null if not yet run) example: "2024-01-15T10:30:05.000Z" example: uuid: "U3VibWlzc2lvbjo0NTY3ODk=" status: "SUCCESS" readable_name: "Create Package" description: "Package created from harvest\nTag: 1A40000000000000001" error_message: "" result: package_id: 12345 tag: "1A40000000000000001" created_at: "2024-01-15T10:30:00.000Z" last_run_at: "2024-01-15T10:30:05.000Z" SubmissionStatus: title: Submission Status type: string description: | The current status of the submission: - **CREATED**: Transaction queued for processing - **PENDING_APPROVAL**: Transaction awaiting admin approval - **PENDING**: Transaction pending response from compliance system - **RETRYING**: Transaction failed but will be automatically retried - **FAILED**: Transaction failed permanently - **SUCCESS**: Transaction completed successfully - **DENIED**: Transaction was reviewed by an admin and denied - **ABORTED**: Transaction has been aborted - **PARTIAL_FAILURE**: Some steps succeeded but others failed enum: - CREATED - PENDING_APPROVAL - PENDING - RETRYING - FAILED - SUCCESS - DENIED - ABORTED - PARTIAL_FAILURE example: "SUCCESS" CreatePurchaseOrderRequestBody: title: Purchase Order Request Body required: - facility_id - vendor_id - status - requested_delivery_date - payment_terms type: object properties: facility_id: type: integer example: 1 description: Facility ID (fk) name: type: string example: PO 00001 description: Optional name for the purchase order status: type: string enum: ["CREATED", "RELEASED", "REQUESTED", "PARTIALLY_RECEIVED", "RECEIVED", "PAID", "ARCHIVED"] description: Status of the purchase order vendor_id: type: integer example: 123 description: Vendor ID (fk) requested_delivery_date: type: string format: date example: "2021-06-07" description: Expected delivery date for the purchase order internal_notes: type: string example: Follow up description: Optional internal notes for the purchase order payment_terms: type: string pattern: "^(NET|COD|CONSIGNMENT|PREPAYMENT)" example: NET15 description: Payment terms - must start with one of 'NET', 'COD', 'CONSIGNMENT', 'PREPAYMENT' payment_date: type: string format: date example: "2021-06-22" description: Date when the Purchase Order was paid. Required if payment_terms is PREPAYMENT delivery_fee: type: number format: float minimum: 0 example: 1.50 description: Optional delivery fee amount local_tax_rate: type: number format: float minimum: 0 maximum: 1 example: 0.01 description: Input 0.01 to represent 1% tax rate. Will enable excise_tax if greater than 0 state_tax_rate: type: number format: float minimum: 0 maximum: 1 example: 0.01 description: Input 0.01 to represent 1% tax rate. Will enable excise_tax if greater than 0 other_tax_rate: type: number format: float minimum: 0 maximum: 1 example: 0.01 description: Input 0.01 to represent 1% tax rate purchase_order_items_attributes: description: Contents of the order (i.e. line items) type: array items: $ref: "#/components/schemas/PurchaseOrderItemRequestBody" PurchaseOrder: title: Purchase Order required: - id - facility_id - name - status - requested_delivery_date - other_tax_rate - local_tax_rate - state_tax_rate type: object properties: id: type: integer example: 350 facility_id: type: integer example: 1 description: Facility ID (fk) name: type: string example: PO 00001 status: type: string description: >- status, can be one of: 'CREATED', 'RELEASED', 'REQUESTED', 'PARTIALLY_RECEIVED', 'RECEIVED', 'PAID', 'ARCHIVED' vendor: $ref: "#/components/schemas/Vendor" requested_delivery_date: type: string example: "2021-06-07T07:00:00.000Z" internal_notes: type: string example: Follow up payment_terms: type: string example: NET15 description: Has to start with one of 'NET', 'COD', 'CONSIGNMENT', 'PREPAYMENT' payment_date: type: string example: "2021-06-22" description: Date when the Purchase Order was paid. (Required if payment_terms is PREPAYMENT) delivery_fee: type: number example: 1.50 local_tax_rate: type: number example: 0.01 description: Input 0.01 to represent 1% tax rate state_tax_rate: type: number example: 0.01 description: Input 0.01 to represent 1% tax rate other_tax_rate: type: number example: 0.01 description: Input 0.01 to represent 1% tax rate subtotal: type: number description: Subtotal of all items # total_cultivation_tax: # not ready yet # type: number total_price: type: number description: Total price (with taxes) total_paid: type: number payments: description: Payments for this order type: array items: $ref: "#/components/schemas/PurchaseOrderPayment" contents: description: Contents of the order (i.e. line items) type: array items: $ref: "#/components/schemas/PurchaseOrderItem" created_at: type: string description: Timestamp that the record was created in Canix updated_at: type: string example: 2018-11-06T08:00:00.000Z PurchaseOrderItemRequestBody: title: Purchase Order Item Request Body required: - weight - weight_unit_id - price type: object properties: item_id: type: integer example: 7036 description: Item ID (fk). Mutually exclusive with non_cannabis_product_id - exactly one of the two is required per line item. non_cannabis_product_id: type: integer example: 145 description: Non-Cannabis Product ID (fk). Mutually exclusive with item_id - exactly one of the two is required per line item. weight: type: number example: 200 weight_unit_id: type: integer example: 15 description: Weight Unit ID (fk) price: type: number example: 10.25 description: Total price for that item weight notes: type: string example: my notes for this order item description: Note to describe the order item PurchaseOrderItem: title: Purchase Order Item required: - id - purchase_order_id type: object properties: id: type: integer example: 13 weight: type: number example: 200 weight_unit: type: string example: Grams total_price: type: number example: 10.25 description: Total price for that item weight item: $ref: "#/components/schemas/Item" description: Purchased cannabis item (if `non_cannabis_product` is unset) non_cannabis_product: $ref: "#/components/schemas/NonCannabisProduct" description: Purchased non-cannabis item (if `item` is unset) Package: title: Package required: - id type: object properties: id: type: integer tag: type: string is_active: type: boolean is_testing_package: type: boolean description: Whether the package is flagged as a testing (lab sample) package. status: type: string item: $ref: "#/components/schemas/Item" weight: type: number original_weight: type: number weight_unit: type: string packaged_date: type: string production_batch_date: type: string format: date nullable: true description: The production batch date for the package. expiration_date: type: string received_date: type: string location: $ref: "#/components/schemas/Location" production_batch: type: string lot_id: type: string cultivation_tax: type: number available_for_sale: type: boolean cannabis_cogs: type: number non_cannabis_inventory_cogs: type: number source_packages: type: array items: $ref: "#/components/schemas/SourcePackage" destination_packages: type: array items: $ref: "#/components/schemas/DestinationPackage" source_facility: type: string description: Originating facility license number source_facility_name: type: string description: Originating facility name source_harvests: type: string notes: type: string brand: $ref: "#/components/schemas/Brand" lab_test_url: type: string description: URL to the latest lab test if it exists example: https://www.lab.com/lab-test/123456 coa_url: type: string nullable: true description: URL to the Certificate of Analysis (COA) document. Returns either a direct URL or a presigned S3 URL (valid for 24 hours) if available. example: https://s3.amazonaws.com/bucket/coa/abc123.pdf?X-Amz-Signature=... test_results: $ref: "#/components/schemas/TestResults" cogs: type: object example: { labor: 10.0, non_cannabis: 120.0, cannabis: 30.0, total: 160.0 } original_cogs: type: object description: COGS values at the time the package was created (before any later adjustments). example: { labor: 10.0, non_cannabis: 120.0, cannabis: 30.0, total: 160.0 } manufacturing_run: type: object nullable: true description: Only returned by the show endpoint (GET /packages/{id}). Populated when the package is an output of a manufacturing run; null otherwise. properties: id: type: integer name: type: string status: type: string start_date: type: string format: date nullable: true end_date: type: string format: date nullable: true facility_id: type: integer updated_at: type: string example: 2018-11-06T08:00:00.000Z tested_package_tag: type: string description: Tag identifying the package that has been tested test_status: type: string description: Status of the test (e.g., passed, failed, pending) test_date: type: string format: date description: Date when the test was conducted lab_test_info: $ref: "#/components/schemas/LabTestInfo" PackageAdjustmentRequestBody: title: Package Adjustment Request Body type: object required: - adjusted_weight - reason_id - adjusted_at properties: adjusted_weight: type: number description: The new weight value for the package example: 10.5 reason_id: type: integer description: The ID of the adjustment reason example: 1 adjusted_at: type: string format: date-time description: The timestamp when the adjustment occurred example: "2025-02-04T23:14:02Z" note: type: string description: Optional note about the adjustment example: "Adjustment due to scale calibration" SourcePackage: title: Source Package required: - id type: object properties: id: type: integer tag: type: string weight: type: number weight_unit: type: string item: $ref: "#/components/schemas/IdName" DestinationPackage: title: Destination Package required: - id type: object properties: id: type: integer tag: type: string weight: type: number weight_unit: type: string item: $ref: "#/components/schemas/IdName" Customer: title: Customer type: object properties: id: type: integer contact_name: type: string company_name: type: string facility_license_number: type: string license_type: type: string customer_number: type: string license_expiration_date: type: string phone: type: string email: type: string territory: type: string address: $ref: "#/components/schemas/Address" notes: type: string outstanding_balance: type: number credit: type: number description: Current credit balance available to this customer dba: type: string example: Doing Business As is_active: type: boolean created_at: type: string example: 2018-11-06T08:00:00.000Z updated_at: type: string example: 2018-11-06T08:00:00.000Z CustomerExtended: title: Customer Extended allOf: - $ref: "#/components/schemas/Customer" - type: object properties: outstanding_balance: type: number Vendor: title: Vendor required: - id - name properties: id: type: integer example: 123 name: type: string example: Canna Cones is_active: type: boolean contact_name: type: string example: John Smith email: type: string example: john@cannacones.com phone: type: string example: +16501109234 license_number: type: string example: X-000012 license_expiration_date: type: string example: 2022-03-16T07:00:00Z address: type: string example: 63 Bluxome St. address2: type: string example: Suite A city: type: string example: San Francisco postal_code: type: string example: 94107 state: type: string example: CA country: type: string example: US website_url: type: string example: cannacones.com notes: type: string example: Best vendor min_lead_time: type: object example: { value: 2, unit: "week" } updated_at: type: string example: 2018-11-06T08:00:00.000Z Sales_order_item: title: Item type: object properties: id: type: integer name: type: string sku: type: string example: id: 7036 name: Blue Dream - Trim sku: "22657" Item: title: Item required: - id - name - facility_id type: object properties: id: type: integer name: type: string is_active: type: boolean item_type: type: string brand: $ref: "#/components/schemas/IdName" product_id: type: integer description: ID of the active Product this item belongs to, if any product_brand: $ref: "#/components/schemas/IdName" quantity_type: type: string sku: type: string current_standard_cost: $ref: "#/components/schemas/ItemStandardCost" accounting_inventory_type: type: string notes: type: string facility_id: type: integer strain: $ref: "#/components/schemas/Strain" type: $ref: "#/components/schemas/ItemType" sub_type: $ref: "#/components/schemas/ItemSubType" weight_unit: type: string unit_weight: type: number unit_weight_unit: type: string case_quantity: type: string case_quantity_unit: type: string unit_cbd_weight: type: number unit_cbd_weight_unit: type: string unit_thc_weight: type: number unit_thc_weight_unit: type: string unit_cbd_percent: type: number unit_thc_percent: type: number description: type: string serving_size: type: number number_of_doses: type: number public_ingredients: type: string supply_duration_days: type: number administration_method: type: string allergens: type: string transfer_source_license: type: string description: "Facility license number of the originating facility. Non-editable." bills_of_materials: type: array items: type: object properties: url: type: string name: type: string package_weight: type: number unit: type: string sage_item: type: object properties: external_id: type: string name: type: string leaflink_item: type: object properties: external_id: type: string name: type: string dutchie_product: type: object properties: external_id: type: string name: type: string phenotype: type: string total_for_sale: type: number description: Total quantity marked as available to sell ordered: type: number description: Total quantity ordered from in-progress sales orders backordered: type: number description: Total quantity backordered from in-progress sales orders unordered: type: number description: Quantity available to sell minus ordered quantity (minimum 0) updated_at: type: string example: 2018-11-06T08:00:00.000Z example: id: 7036 name: Blue Dream - Trim sku: "22657" current_standard_costing: id: type: integer example: 123 standard_cost_amount: type: number example: 12.1111 standard_cost_currency: type: string example: USD start_date: type: string example: "2023-04-19" end_date: type: string example: "2023-05-19" is_active: true facility_id: 14 type: id: 884 name: "Clone - Cutting" quantity_type: "CountBased" product_category: "Plants" sub_type: null brand: null product_id: 512 product_brand: null quantity_type: "CountBased" notes: "" accounting_inventory_type: "raw_materials" strain: null weight_unit: "Each" unit_weight: 10 unit_weight_unit: "Grams" case_quantity: 100 case_unit: "Each" description: "Clone" allergens: "Can s 2" transfer_source_license: "1234567890" bills_of_materials: - url: "https://www.app.canix.com/inventory/non-cannabis/bill-of-materials/123" name: "Bill of Materials" package_weight: 10 unit: "g" sage_item: external_id: "1234567890" name: "Sage Item" leaflink_item: null dutchie_product: null phenotype: "Indica" total_for_sale: 100 ordered: 25 backordered: 10 unordered: 75 updated_at: "2021-03-16T23:49:03.175Z" ItemStandardCost: title: ItemStandardCost required: - id - standard_cost_amount - standard_cost_currency - start_date properties: id: type: integer example: 123 standard_cost_amount: type: number example: 12.1111 standard_cost_currency: type: string example: USD start_date: type: string example: "2023-04-19" end_date: type: string example: "2023-05-19" CreateMETRCItemPhotosRequestBody: title: CreateMETRCItemPhotosRequestBody required: - facility_id - photos properties: facility_id: type: integer photos: type: array items: type: object properties: attachment_type: enum: ["product", "label", "packaging"] description: "The type of attachment intended for the item. Must be one of the following: product, label, packaging" filename: type: string encoded_image_base64: type: string description: A Base64 string containing the encoded image CreateMETRCItemFilesRequestBody: title: CreateMETRCItemFileRequestBody required: - facility_id - files properties: facility_id: type: integer files: type: array items: type: object properties: filename: type: string encoded_file_base64: type: string description: A Base64 string containing the encoded file ItemType: title: ItemType required: - id - name - facility_id type: object properties: id: type: integer name: type: string quantity_type: type: string requires_strain: type: boolean requires_unit_volume: type: boolean requires_unit_weight: type: boolean requires_unit_thc_weight: type: boolean requires_unit_cbd_weight: type: boolean requires_unit_cbd_percent: type: boolean requires_unit_thc_percent: type: boolean requires_public_ingredients: type: boolean requires_administration_method: type: boolean requires_serving_size: type: boolean requires_supply_duration_days: type: boolean requires_number_of_doses: type: boolean updated_at: type: string example: 2018-11-06T08:00:00.000Z ItemSubType: title: ItemSubType required: - id - name - weight_unit - item_category type: object properties: id: type: integer name: type: string weight_unit: type: string category: $ref: "#/components/schemas/ItemType" updated_at: type: string example: 2018-11-06T08:00:00.000Z Brand: title: Brand required: - id - name type: object properties: id: type: integer name: type: string updated_at: type: string example: 2018-11-06T08:00:00.000Z Product: title: Product required: - id - name - facility_id type: object properties: id: type: integer name: type: string sku: type: string description: Products do not have SKUs; always null. Present to match the Item structure. is_active: type: boolean facility_id: type: integer type: $ref: "#/components/schemas/ItemType" sub_type: $ref: "#/components/schemas/ItemSubType" brand: $ref: "#/components/schemas/IdName" strain: $ref: "#/components/schemas/Strain" sale_unit: type: string total_for_sale: type: number description: Total quantity marked as available to sell ordered: type: number description: Total quantity ordered from in-progress sales orders backordered: type: number description: Total quantity backordered from in-progress sales orders unordered: type: number description: Quantity available to sell minus ordered quantity (minimum 0) updated_at: type: string example: 2018-11-06T08:00:00.000Z example: id: 512 name: Blue Dream - 3.5g Jar sku: null is_active: true facility_id: 14 type: id: 884 name: "Flower" quantity_type: "CountBased" product_category: "Buds/Flower" sub_type: null brand: id: 42 name: "Acme Brand" strain: null sale_unit: "Each" total_for_sale: 100 ordered: 25 backordered: 10 unordered: 75 updated_at: "2021-03-16T23:49:03.175Z" CrossStrain: title: Cross Strain required: - id - name properties: id: type: integer name: type: string example: Lemon Skunk description: Strain name notes: type: string example: Terpenes .63% description: Notes sku: type: string example: BIOJJ description: SKU testing_status: type: string example: InHouse description: "Testing status: InHouse, ThirdParty, None, NA" indica_percent: type: number example: 45.0 description: "Indica Percentage" sativa_percent: type: number example: 55.0 description: "Sativa Percentage" Strain: title: Strain required: - id - name properties: id: type: integer name: type: string example: Lemon Skunk description: Strain name notes: type: string example: Terpenes .63% description: Notes sku: type: string example: BIOJJ description: SKU testing_status: type: string example: InHouse description: "Testing status: InHouse, ThirdParty, None, NA" indica_percent: type: number example: 45.0 description: "Indica Percentage" sativa_percent: type: number example: 55.0 description: "Sativa Percentage" cross_strains: type: array description: "Cross strains" items: $ref: "#/components/schemas/CrossStrain" ParentLocation: title: Parent Location required: - id - name properties: id: type: integer example: 123 name: type: string example: Pro System sqft: type: number example: 14.4 num_lights: type: integer example: 42 updated_at: type: string example: 2018-11-06T08:00:00.000Z is_active: type: boolean example: true Location: title: Location required: - id - name properties: id: type: integer example: 123 name: type: string example: Pro System sqft: type: number example: 14.4 num_lights: type: integer example: 42 parent_location: $ref: "#/components/schemas/ParentLocation" updated_at: type: string example: 2018-11-06T08:00:00.000Z is_active: type: boolean example: true CreateNonCannabisProductRequestBody: title: Create Non Cannabis Product Request Body type: object required: - name - weight_unit_id - facility_id properties: name: type: string example: Pro System description: The name of the non-cannabis product weight_unit_id: type: integer example: 15 description: Weight Unit ID (fk) facility_id: type: integer example: 1 description: Facility ID (fk) sku: type: string example: 0.5EC notes: type: string example: This product requires special handling description: Optional notes for the product par: type: number example: 100 allow_partial_unit_deduction: type: boolean example: false description: Whether partial units of this product can be deducted from inventory non_cannabis_product_category_id: type: integer example: 12 description: Non-Cannabis Product Category ID (fk) location_id: type: integer example: 42 description: Location ID (fk) brand_id: type: integer example: 5 description: Brand ID (fk) standard_cost: type: number example: 4.5 description: Standard cost for the product; requires standard_cost_start_date standard_cost_start_date: type: string format: date example: "2024-01-01" description: Required when standard_cost is provided standard_cost_end_date: type: string format: date example: "2024-12-31" description: Optional end date for the standard cost submits_to_metrc: type: boolean description: This field is only applicable to products that are submitted to METRC additive_type: type: string enum: ["fertilizer", "herbicide", "pesticide", "grow_materials", "other", "ro_water"] example: fertilizer description: This field is only applicable to products that are submitted to METRC product_trade_name: type: string description: This field is only applicable to products that are submitted to METRC epa_registration_name: type: string description: This field is only applicable to products that are submitted to METRC product_supplier: type: string description: This field is only applicable to products that are submitted to METRC application_device: type: string description: This field is only applicable to products that are submitted to METRC active_ingredients: type: array items: type: object properties: name: type: string percentage: type: number example: name: Fertilizer weight_unit_id: 15 facility_id: 1 sku: FERT-01 notes: Store away from direct sunlight par: 100 allow_partial_unit_deduction: true non_cannabis_product_category_id: 12 location_id: 42 brand_id: 5 standard_cost: 4.5 standard_cost_start_date: "2024-01-01" submits_to_metrc: true additive_type: fertilizer product_trade_name: Pro Grow Fertilizer epa_registration_name: EPA-12345-1 product_supplier: AgroSupply Co application_device: Foliar sprayer active_ingredients: - name: Nitrogen percentage: 10.0 - name: Phosphorus percentage: 5.0 NonCannabisProduct: title: Non Cannabis Product required: - id - name properties: id: type: integer example: 123 name: type: string example: Pro System is_active: type: boolean facilities: $ref: "#/components/schemas/Facility" description: All facilities that the product is available in category: $ref: "#/components/schemas/NonCannabisProductCategory" location: $ref: "#/components/schemas/Location" sku: type: string example: 0.5EC notes: type: string description: Optional notes for the product example: This product requires special handling available_quantity: type: number example: 196 weight_unit: type: string example: Each par: type: number example: 100 updated_at: type: string example: 2018-11-06T08:00:00.000Z current_standard_costing: $ref: "#/components/schemas/NonCannabisProductStandardCosting" submits_to_metrc: type: boolean description: This field is only applicable to products that are submitted to METRC additive_type: type: string example: fertilizer description: This field is only applicable to products that are submitted to METRC product_trade_name: type: string description: This field is only applicable to products that are submitted to METRC epa_registration_name: type: string description: This field is only applicable to products that are submitted to METRC product_supplier: type: string description: This field is only applicable to products that are submitted to METRC application_device: type: string description: This field is only applicable to products that are submitted to METRC active_ingredients: type: array items: type: object properties: name: type: string percentage: type: number NonCannabisProductStandardCosting: title: NonCannabisProductStandardCosting required: - id - standard_cost_amount - standard_cost_currency - start_date properties: id: type: integer example: 123 standard_cost_amount: type: number example: 12.1111 standard_cost_currency: type: string example: USD start_date: type: string example: "2023-04-19" end_date: type: string example: "2023-05-19" NonCannabisProductCategory: title: Non Cannabis Product Category required: - id - name properties: id: type: integer example: 123 name: type: string example: Preroll Materials updated_at: type: string example: 2018-11-06T08:00:00.000Z PlantBatch: title: Plant Batch required: - id - name properties: id: type: integer example: 123 name: type: string example: 1A4FF0000000022000000719 mature_count: type: integer example: 21 immature_count: type: integer example: 2 vegetative_count: type: integer example: 23 flowering_count: type: integer example: 25 source: type: string example: Clone planted_date: type: string example: 2018-11-06T08:00:00.000Z destroyed_count: type: integer example: 5 notes: type: string example: nice batch! strain: $ref: "#/components/schemas/Strain" location: $ref: "#/components/schemas/Location" lot_id: type: string updated_at: type: string example: 2018-11-06T08:00:00.000Z Plant: title: Plant required: - id - name properties: id: type: integer example: 123 tag: type: string example: 1A4FF0000000022000000719 plant_batch: $ref: "#/components/schemas/PlantBatch" weight: type: integer example: 2 weight_unit: type: string example: Grams growth_phase: type: string example: Flowering state: type: string example: Tracked strain: $ref: "#/components/schemas/Strain" location: $ref: "#/components/schemas/Location" planted_date: type: string example: 2018-11-06T08:00:00.000Z vegetative_date: type: string example: 2015-12-23T07:00:00.000Z flowering_date: type: string example: 2016-04-18T06:00:00.000Z harvested_date: type: string example: 2018-04-18T06:00:00.000Z destroyed_date: type: string example: 2019-04-18T06:00:00.000Z notes: type: string example: nice plant! age_in_days: type: number example: 2039 harvest: $ref: "#/components/schemas/Harvest" lot_id: type: string updated_at: type: string example: 2018-11-06T08:00:00.000Z Harvest: title: Harvest required: - id - name properties: id: type: integer example: 123 name: type: string example: Offline Manicure strain: $ref: "#/components/schemas/Strain" drying_location: $ref: "#/components/schemas/Location" harvest_date: type: string example: 2018-11-06T08:00:00.000Z plant_count: type: number example: 3 average_plant_weight: type: number example: 107.7 notes: type: string example: nice harvest! waste_weight: type: number example: 100 total_wet_weight: type: number example: 100 total_packaged_weight: type: number example: 100 finished_date: type: string example: 2018-11-06T08:00:00.000Z package_count: type: integer example: 100 lot_id: type: string updated_at: type: string example: 2018-11-06T08:00:00.000Z Transfer: title: Transfer required: - id properties: id: type: integer example: 123 name: type: string example: Transfer manifest_number: type: string example: 0000000028 is_active: type: boolean destinations: type: array items: $ref: "#/components/schemas/TransferDestination" sales_order: $ref: "#/components/schemas/SalesOrder" updated_at: type: string example: 2018-11-06T08:00:00.000Z TransferDestination: title: Transfer Destination required: - id properties: id: type: integer example: 123 destination_facility: type: string example: 401-N0909 transfer_type: type: string example: Affilliated route: type: string example: 55 departure_time: type: string example: 2018-11-06T08:00:00.000Z contents: type: array items: $ref: "#/components/schemas/PackageTransfer" updated_at: type: string example: 2018-11-06T08:00:00.000Z PackageTransfer: title: Package Transfer required: - id - facility_id properties: package: $ref: "#/components/schemas/Package" status: type: string sale_price: type: number example: 12.34 shipped_weight: type: number example: 10.00 shipped_weight_unit: type: string example: Grams received_weight: type: number example: 10.00 received_weight_unit: type: string example: Grams updated_at: type: string example: 2018-11-06T08:00:00.000Z Company: title: Company required: - id properties: id: type: integer example: 123 name: type: string example: Test Company created_at: type: string example: 2018-11-04T08:00:00.000Z updated_at: type: string example: 2018-11-06T08:00:00.000Z Facility: title: Facility required: - id properties: id: type: integer example: 123 name: type: string example: Test Facility license_number: type: string example: 4a-x123 is_active: type: boolean example: true address: $ref: "#/components/schemas/Address" Address: title: Address type: object properties: street: type: string example: 123 Cumberland St street2: type: string example: West city: type: string example: Somerset county: type: string example: KY state: type: string example: CO country: type: string example: USA postal_code: type: string example: 42504 User: title: User type: object properties: id: type: integer example: 123 name: type: string example: John Doe email: type: string example: j@d.com IdName: title: IdName type: object properties: id: type: number name: type: string RecordCount: title: Record Count required: - Count properties: count: type: integer example: 123 JobStatus: title: JobStatus properties: complete: type: boolean example: true bid: type: string example: bc7f822afbb40747 total: type: integer example: 1 description: type: string failures: type: integer example: 0 created_at: type: number example: 1367700200.1111438 fail_info: type: array items: type: string TestResultValue: title: TestResultValue type: object properties: value: type: number format: double # Useful if precision is needed for small or large values example: 0.17501406232422 measure: type: string enum: ["mg", "mg/g", "mg/serving", "percent"] # Enumeration of possible measure types example: "mg/g" TestResults: title: TestResults type: object properties: thc: type: array items: $ref: "#/components/schemas/TestResultValue" example: - value: 12.345 measure: percent - value: 0.12345 measure: mg/g - value: 5.6789 measure: mg cbd: type: array items: $ref: "#/components/schemas/TestResultValue" example: - value: 34.567 measure: percent - value: 2.3456 measure: mg/g - value: 9.1234 measure: mg cbn: type: array items: $ref: "#/components/schemas/TestResultValue" cbg: type: array items: $ref: "#/components/schemas/TestResultValue" cbga: type: array items: $ref: "#/components/schemas/TestResultValue" cbc: type: array items: $ref: "#/components/schemas/TestResultValue" cbca: type: array items: $ref: "#/components/schemas/TestResultValue" cbda: type: array items: $ref: "#/components/schemas/TestResultValue" thca: type: array items: $ref: "#/components/schemas/TestResultValue" delta_8_thc: type: array items: $ref: "#/components/schemas/TestResultValue" delta_9_thc: type: array items: $ref: "#/components/schemas/TestResultValue" delta_9_thca: type: array items: $ref: "#/components/schemas/TestResultValue" delta_8_thca: type: array items: $ref: "#/components/schemas/TestResultValue" thcv: type: array items: $ref: "#/components/schemas/TestResultValue" thcva: type: array items: $ref: "#/components/schemas/TestResultValue" total_cbd: type: array items: $ref: "#/components/schemas/TestResultValue" total_cbg: type: array items: $ref: "#/components/schemas/TestResultValue" total_delta_9_thc: type: array items: $ref: "#/components/schemas/TestResultValue" total_thc: type: array items: $ref: "#/components/schemas/TestResultValue" total_cannabinoid: type: array items: $ref: "#/components/schemas/TestResultValue" test_status: type: string description: Status of the test (e.g., passed, failed, pending) tested_package_tag: type: string description: Tag identifying the package that has been tested test_date: type: string format: date description: Date when the test was conducted terpenes: type: object properties: measure: type: string example: percent top_three: type: string example: { "beta_myrcene": "0.05104502943", "delta_limonene": "0.04842733428", "linalool": "0.01920111092" } values: type: string example: { "nerol": "0.0", "cedrol": "0.0", "guaiol": "0.0", "borneol": "0.00097078668", "camphor": "0.0", "menthol": "0.0060455321", "3_carene": "0.0", "camphene": "0.0014924041", "geraniol": "0.00146493673", "linalool": "0.01920111092", "pulegone": "0.0", "sabinene": "0.0", "farnesene": "0.0", "valencene": "0.0", "eucalyptol": "0.0", "isoborneol": "0.0", "isopulegol": "0.0", "l_fenchone": "0.00107440035", "beta_pinene": "0.00758444019", "cis_ocimene": "0.0", "terpinolene": "0.0008523121", "alpha_pinene": "0.00507601301", "beta_myrcene": "0.05104502943", "alpha_cedrene": "0.0", "cis_nerolidol": "0.0", "trans_ocimene": "0.0", "alpha_humulene": "0.00563652811", "delta_limonene": "0.04842733428", "alpha_bisabolol": "0.00210912557", "alpha_terpineol": "0.0", "gamma_terpinene": "0.0", "gamma_terpineol": "0.0", "geranyl_acetate": "0.0", "trans_nerolidol": "0.0", "sabinene_hydrate": "0.0", "alpha_phellandrene": "0.0", "beta_caryophyllene": "0.01474344681", "caryophyllene_oxide": "0.00080207704", "endo_fenchyl_alcohol": "0.00415234658", } LabTestInfo: type: object properties: testing_facility_name: type: string description: Name of the facility where the testing was conducted.F testing_facility_license: type: string description: License number of the testing facility. required: - testing_facility_name - testing_facility_license ManuBatchRun: title: Manufacturing Run required: - id - facility_id - name - status - order - manufacturing_batch_id type: object properties: id: type: integer facility_id: type: integer description: Facility ID (fk) name: type: string status: type: string description: >- status, can be one of 'OPEN', 'SUBMITTED', 'SUBMITTED_FOR_APPROVAL', 'ERRORED' start_date: type: string end_date: type: string created_at: type: string description: Timestamp that the record was created in Canix updated_at: type: string description: Timestamp that the record was last updated in Canix location_id: type: integer bill_of_materials_id: type: integer manufacturing_batch_id: type: integer order: type: integer notes: type: string total_cannabis_costs: type: number total_labor_costs: type: number total_nci_costs: type: number machine_info: $ref: "#/components/schemas/Machine" cannabis_inputs: type: array items: $ref: "#/components/schemas/ManuBatchRunCannabisInput" non_cannabis_inputs: type: array items: $ref: "#/components/schemas/ManuBatchRunNonCannabisInput" cannabis_outputs: type: array items: $ref: "#/components/schemas/ManuBatchRunCannabisOutput" labors: type: array items: $ref: "#/components/schemas/Labor" wastes: type: array items: $ref: "#/components/schemas/Waste" example: id: 10 facility_id: 14 name: 0000002062 status: OPEN start_date: "2022-05-24" end_date: "2022-05-30" created_at: "2022-05-22T19:58:00.000Z" updated_at: "2021-05-23T05:12:01.000Z" location_id: 2 bill_of_materials_id: 12 manufacturing_batch_id: 9 order: 2 notes: "" total_cannabis_costs: 14.30 total_nci_costs: 2.50 total_labor_costs: 9.05 yield: 75.0 machine_info: temperature: 20.1 temperature_unit: Celcius solvent_id: 150 solvent_quantity: 10.5 solvent_weight_unit: Grams time_in_solvent_ms: 2400 time_in_solvent_display_units: Second cannabis_inputs: - package_id: 3501 package_tag: 1A4FF0000000022000000719 quantity: 2.54 weight_unit: Grams psi: 600.0 cost: 14.30 non_cannabis_inputs: - non_cannabis_product_name: Fertilizer non_cannabis_product_id: 145 lot: DL21309 lot_id: 253 quantity: 100.5 weight_unit: Grams cost: 2.50 cannabis_outputs: - package_id: 5200 package_tag: 1A4FF0000000022000001419 quantity: 500 weight_unit: Grams labors: - employee_name: Jane Doe hours_worked: 0.5 cost: 10 - employee_name: John Doe hours_worked: 1 cost: 20 wastes: - package_id: 4601 package_tag: 1A4FF0000000022000004423 quantity: 50 weight_unit: Grams reason: Waste Destruction date: "2022-05-24" notes: waste from production Machine: title: Machine Info type: object properties: temperature: type: number temperature_unit: type: string description: "Options are 'Celcius' and 'Fahrenheit'" solvent_id: type: integer solvent_quantity: type: number solvent_weight_unit: type: string time_in_solvent_ms: type: integer time_in_solvent_display_units: type: string description: "Options are 'Week', 'Day', 'Hour', 'Minute' and 'Second'" example: temperature: 20.1 temperature_unit: Celcius solvent_id: 150 solvent_quantity: 10.5 solvent_weight_unit: Grams time_in_solvent_ms: 2400 time_in_solvent_display_units: Second ManuBatchRunCannabisInput: title: Cannabis Input type: object required: - quantity - weight_unit properties: package_id: type: integer package_tag: type: string quantity: type: number weight_unit: type: string psi: type: number cost: type: number example: package_id: 3501 package_tag: 1A4FF0000000022000000719 quantity: 2.54 weight_unit: Grams psi: 600.0 cost: 14.30 ManuBatchRunNonCannabisInput: title: Non Cannabis Input type: object required: - non_cannabis_product_name - non_cannabis_product_id - quantity - weight_unit properties: non_cannabis_product_name: type: string non_cannabis_product_id: type: integer lot: type: string lot_id: type: integer quantity: type: number weight_unit: type: string cost: type: number example: non_cannabis_product_name: Fertilizer non_cannabis_product_id: 145 lot: DL21309 lot_id: 253 quantity: 100.5 weight_unit: Grams cost: 2.50 ManuBatchRunCannabisOutput: title: Cannabis Output type: object required: - quantity - weight_unit properties: package_id: type: integer package_tag: type: string quantity: type: number weight_unit: type: string example: package_id: 5200 package_tag: 1A4FF0000000022000001419 quantity: 500 weight_unit: Grams Labor: title: Labor Info type: object required: - hours_worked properties: employee_name: type: string hours_worked: type: number cost: type: number example: employee_name: Jane Doe hours_worked: 0.5 cost: 10 Waste: title: Waste Info type: object required: - package_id - package_tag - quantity - weight_unit properties: package_id: type: integer package_tag: type: string quantity: type: number weight_unit: type: string reason: type: string date: type: string notes: type: string example: package_id: 4601 package_tag: 1A4FF0000000022000004423 quantity: 50 weight_unit: Grams reason: Waste Destruction date: "2022-05-24" notes: waste from production ManuBatch: title: Manufacturing Batch Info type: object required: - id - created_at - updated_at properties: id: type: integer name: type: string description: Name of the manufacturing batch template_name: type: string description: Name of the template used to create this batch status: type: string current_location: type: string start_date: type: string end_date: type: string created_at: type: string description: Timestamp that the record was created in Canix updated_at: type: string description: Timestamp that the record was last updated in Canix notes: type: string manufacturing_run_ids: type: array items: type: integer example: id: 2 name: "Batch 2023-001" template_name: "Standard Process Template" status: Run 3 of 3 current_location: processing room start_date: "2022-05-01" end_date: "2022-05-30" created_at: "2022-04-15T12:33:00.000Z" updated_at: "2022-05-22T07:21:00.000Z" notes: notes about this batch manufacturing_run_ids: [8, 9, 10] BillOfMaterials: title: Bill of Materials Info type: object required: - id - name - proportion_type properties: id: type: integer name: type: string active_date: type: string format: date expiration_date: type: string format: date proportion_type: type: string description: single_instance means materials are applied to each output independently; all_instances means materials are applied across all output item quantities last_updated_at: type: string format: date-time description: Last updated timestamp source_non_cannabis_products: type: array items: $ref: "#/components/schemas/BillOfMaterialsSourceNonCannabisProduct" source_cannabis_items: type: array items: $ref: "#/components/schemas/BillOfMaterialsSourceCannabisItem" output_items: type: array items: $ref: "#/components/schemas/BillOfMaterialsOutputItem" example: id: 12 name: Bulk - Dark Chocolate Peaks - 10mg active_date: "2023-01-01" expiration_date: "2023-12-31" proportion_type: single_instance source_non_cannabis_products: - name: 1/8th Jar non_cannabis_product_id: 24 quantity: 1 weight_unit: Each application_setting: proportional - name: Gloves - Large non_cannabis_product_id: 56 quantity: 2 weight_unit: Each application_setting: fixed source_cannabis_items: - quantity: 20 weight_unit: Grams item: id: 242 name: Hammer Bud item_category: null item_sub_category: null - quantity: 25 weight_unit: Grams item: null item_category: id: 98 name: B Buds item_sub_category: null output_items: - name: Jarred Flower item_id: 370 quantity: 50 weight_unit: Grams item_category: null item_sub_category: null - name: null item_id: 371 quantity: 25 weight_unit: Grams item_category: id: 98 name: B Buds item_sub_category: null BillOfMaterialsSourceNonCannabisProduct: title: Source Non Cannabis Product Info type: object required: - non_cannabis_product_id - name - quantity - weight_unit - application_setting properties: non_cannabis_product_id: type: integer name: type: string quantity: type: number weight_unit: type: string application_setting: type: string example: name: 1/8th Jar non_cannabis_product_id: 24 quantity: 1 weight_unit: Each application_setting: proportional BillOfMaterialsSourceCannabisItem: title: Source Cannabis Item Info type: object required: - quantity - weight_unit properties: quantity: type: number weight_unit: type: string item: type: object nullable: true properties: id: type: integer name: type: string item_category: type: object nullable: true properties: id: type: integer name: type: string item_sub_category: type: object nullable: true properties: id: type: integer name: type: string example: quantity: 100 weight_unit: Grams item: id: 242 name: Hammer Bud item_category: null item_sub_category: null BillOfMaterialsOutputItem: title: Output Item Info type: object required: - name - item_id - quantity - weight_unit properties: name: type: string nullable: true description: Name of the output item. Null when the output targets an item category or sub-category instead of a concrete item; item_category / item_sub_category identify the output in that case. item_id: type: integer quantity: type: number weight_unit: type: string item_category: type: object nullable: true properties: id: type: integer name: type: string item_sub_category: type: object nullable: true properties: id: type: integer name: type: string example: name: Jarred Flower item_id: 370 quantity: 50 weight_unit: Grams item_category: null item_sub_category: null WeightUnit: title: Weight Unit type: object properties: id: type: integer example: 1 description: ID of the Weight Unit record name: type: string example: Grams abbreviation: type: string example: g CreateItemRequestBody: title: Item Request Body type: object required: - name - item_type_id - weight_unit properties: name: type: string example: "Blue Dream" description: "Name of the item" is_active: type: boolean example: true description: "Whether the item is active. Defaults to true if not provided" strain_id: type: integer example: 1 description: "ID of the associated strain" item_type_id: type: integer example: 1 description: "ID of the item category" item_sub_type_id: type: integer example: 2 description: "ID of the item sub-category" weight_unit: type: string example: "g" description: "Weight unit for the item" unit_weight_unit: type: string example: "mg" description: "Weight unit for individual units" unit_weight: type: number format: float example: 1.5 description: "Weight of individual units" sku: type: string example: "BD001" description: "Stock keeping unit identifier" notes: type: string example: "Special handling required" brand_id: type: integer example: 3 description: "ID of the associated brand" description: type: string example: "High quality strain" serving_size: type: string example: "1 capsule" number_of_doses: type: integer example: 30 description: "Number of doses in the item" unit_cbd_weight: type: number format: float example: 10.5 description: "CBD weight per unit" unit_thc_weight: type: number format: float example: 5.0 description: "THC weight per unit" unit_cbd_percent: type: number format: float example: 15.5 description: "CBD percentage" unit_thc_percent: type: number format: float example: 20.0 description: "THC percentage" public_ingredients: type: string example: "Cannabis extract, MCT oil" supply_duration_days: type: integer example: 30 description: "Duration of supply in days" administration_method: type: string example: "oral" unit_cbd_weight_unit: type: string example: "mg" description: "Weight unit for CBD content" unit_thc_weight_unit: type: string example: "mg" description: "Weight unit for THC content" accounting_inventory_type: type: string example: "finished_good" description: "Type of inventory for accounting purposes" photo_ids: type: array items: type: integer example: [1, 2, 3] description: "IDs of photos to associate with the item" metrc_item_brand: type: string example: "Brand #1" description: "Item Brand for METRC" UpdateItemRequestBody: title: Item Update Request Body type: object properties: name: type: string example: "Blue Dream" description: "The name of the item" is_active: type: boolean example: true description: "Whether the item is active" item_category_id: type: integer example: 1 description: "ID of the item category" item_sub_category_id: type: integer example: 2 description: "ID of the item sub category" brand_id: type: integer example: 3 description: "ID of the brand" description: type: string example: "High quality strain" description: "Description of the item" notes: type: string example: "Internal notes about the item" sku: type: string example: "BD-001" description: "Stock keeping unit identifier" serving_size: type: string example: "1g" description: "Size of a single serving" number_of_doses: type: integer example: 10 description: "Number of doses in the item" unit_thc_weight: type: number format: float example: 10.5 description: "THC weight per unit" unit_cbd_weight: type: number format: float example: 5.2 description: "CBD weight per unit" unit_thc_percent: type: number example: 18.5 description: "THC percentage" unit_cbd_percent: type: number example: 2.5 description: "CBD percentage" public_ingredients: type: string example: "Cannabis" description: "Public list of ingredients" supply_duration_days: type: integer example: 30 description: "Duration of supply in days" administration_method: type: string example: "Oral" description: "Method of administration" photo_ids: type: array items: type: integer example: [1, 2, 3] description: "IDs of photos to associate with the item" metrc_item_brand: type: string example: "Brand #1" description: "Item Brand for METRC" ItemStandardCostRequestBody: title: Item Standard Cost Request Body type: object required: - cost - start_date properties: cost: type: number format: float description: The standard cost value to be set example: 10.50 start_date: type: string format: date-time description: When this standard cost becomes effective example: "2024-02-03T00:00:00Z" end_date: type: string format: date-time description: Optional. When this standard cost expires example: "2024-12-31T23:59:59Z" JobRequestBody: title: Job Request Body type: object required: - job_type - facility_id properties: job_type: type: string example: "harvest" facility_id: type: integer example: 1 parameters: type: object example: { "harvest_id": 123 } SalesOrderRequestBody: title: Sales Order Request Body type: object required: - customer_id - name - status - delivery_date - other_tax_rate - local_tax_rate - state_tax_rate properties: customer_id: description: The customer company id type: integer example: 2 name: type: string example: "Order #123" external_identifier: type: string example: "SAP-ORDER-12345" description: External Sales Order ID (from partner system, not unique) status: type: string example: "pending" delivery_fee: type: number format: float example: 15.99 delivery_date: type: string format: date-time example: "2025-02-04T14:00:00Z" payment_date: type: string format: date-time example: "2025-02-04T14:00:00Z" sales_order_credit: $ref: "#/components/schemas/Discount" description: >- Order-level discount. Despite the name, this behaves as a discount, not a credit: it is applied before taxes and reduces the taxable subtotal. To apply a post-tax customer credit, use `credits` instead. example: type: "percentage" amount: 25.0 reason: "25% off" credits: type: number description: >- Post-tax customer credit to apply to the order, as a positive number. Unlike `sales_order_credit`, this does not reduce the taxable subtotal; taxes are calculated on the full subtotal and the credit is subtracted from the total afterwards. Omit the field to leave an existing credit unchanged on update. example: 1000.0 pull_credit_from_customer: type: boolean description: >- Only used together with `credits`. When true, the credit is deducted from the customer's credit balance (see POST /customers/{customer_id}/credits) and the request fails if the balance is insufficient. Defaults to false, which applies the credit without affecting the customer's balance. example: false contents: type: array items: type: object required: - total_price - weight - weight_unit properties: item_id: type: integer example: 123 non_cannabis_product_id: type: integer example: 456 total_price: type: number format: float example: 25.99 weight: type: number format: float example: 1.5 weight_unit: type: string example: "grams" notes: type: string example: "Special handling required" package_ids: type: array items: type: integer example: [1, 2, 3] discount: $ref: "#/components/schemas/Discount" example: type: "fixed" amount: 10.0 reason: "10$ off" payments: type: array items: type: object properties: amount: type: number format: float example: 100.00 date: type: string format: date example: "2025-02-04" reference_number: type: string example: "PAY-123" other_tax_rate: type: number format: float example: 5.0 local_tax_rate: type: number format: float example: 2.5 state_tax_rate: type: number format: float example: 7.0 internal_notes: type: string example: "Handle with care" payment_terms: type: string example: "Net 30" payment_notes: type: string example: "Payment due by end of month" terms_and_conditions: type: string example: "Standard terms apply" return_policy: type: string example: "30-day return policy" sales_rep_email: type: string example: "john.doe@example.com" description: "Email of the sales representative" StandardCostRequestBody: title: Standard Cost Request Body type: object required: - standard_cost_amount - effective_at properties: standard_cost_amount: type: number format: float example: 10.50 effective_at: type: string format: date-time example: "2024-02-03T00:00:00Z" notes: type: string example: "Updated standard cost for Q1 2024" CreateStrainRequestBody: title: Strain Request Body type: object required: - name properties: facility_id: type: integer description: "ID of the facility where the strain will be created. Must be a facility with standalone, CA METRC standalone, or METRC standalone integration" example: 123 name: type: string example: "Blue Dream" description: type: string example: "A sativa-dominant hybrid" genetics: type: string example: "Blueberry x Haze" active: type: boolean example: true cross_strain_ids: type: array description: "Array of strain IDs that are crossed with this strain. All cross strains must belong to the same facility." items: type: integer example: [456, 789] sku: type: string example: "BD-001" notes: type: string example: "High-yield strain with excellent terpene profile" cbd_level: type: number format: float description: "CBD percentage level" example: 0.5 thc_level: type: number format: float description: "THC percentage level" example: 18.5 indica_percent: type: number format: float description: "Percentage of indica genetics" example: 40.0 sativa_percent: type: number format: float description: "Percentage of sativa genetics" example: 60.0 testing_status: type: string description: "Current testing status of the strain" example: "Tested" StrainRequestBody: title: Strain Request Body type: object required: - name properties: name: type: string example: "Blue Dream" description: type: string example: "A sativa-dominant hybrid" genetics: type: string example: "Blueberry x Haze" active: type: boolean example: true VendorRequestBody: title: Create Vendor Request Body type: object required: - name properties: name: type: string description: The name of the vendor contact_name: type: string description: The name of the contact person email: type: string format: email description: The vendor's email address phone: type: string description: The vendor's phone number license_number: type: string description: The vendor's license number license_expiration_date: type: string format: date description: The expiration date of the vendor's license address: type: string description: The vendor's street address address2: type: string description: Additional address information city: type: string description: The vendor's city postal_code: type: string description: The vendor's postal/zip code state: type: string description: The vendor's state/province country: type: string description: The vendor's country website_url: type: string format: uri description: The vendor's website URL notes: type: string description: Additional notes about the vendor min_lead_time: type: object properties: value: type: integer description: The numeric value of the minimum lead time unit: type: string description: The unit of time measurement (e.g. DAY, WEEK, MONTH) PackageAdjustment: title: Package Adjustment type: object required: - id - reason - previous_weight - adjusted_weight - weight_unit - adjusted_at properties: id: type: integer description: The unique identifier of the adjustment reason: $ref: "#/components/schemas/PackageAdjustReason" previous_weight: type: number description: The weight before adjustment adjusted_weight: type: number description: The weight after adjustment weight_unit: type: string description: The unit of measurement for the weights adjusted_at: type: string format: date-time description: When the adjustment was made note: type: string description: Optional note about the adjustment package: $ref: "#/components/schemas/Package" PackageAdjustReason: title: Package Adjust Reason type: object required: - id - name properties: id: type: integer description: The unique identifier of the reason name: type: string description: The name of the reason PurchaseOrderPayment: title: Purchase Order Payment type: object required: - amount - date properties: amount: type: number format: float example: 100.00 date: type: string format: date example: "2025-02-04" parameters: limitParam: name: limit in: query description: "Max number of records to return (optional). Cannot exceed 2000" required: false #default style: form # default schema: type: integer default: 2000 example: 100 offsetParam: name: offset in: query description: "Offset for the returned records (optional)" schema: type: integer default: 0 example: 20 orderByParam: name: order_by in: query description: "Order-by clause, in SQL format (optional)" schema: type: string example: id desc whereParam: name: where in: query description: | Filter results using SQL-like WHERE clause syntax (optional). **Supported operators**: =, >, <, >=, <=, BETWEEN, IN, LIKE, AND, OR **Supported patterns**: - Equality: `status='Active'` - Comparison: `updated_at >= '2024-01-01'` - Range: `id BETWEEN 1 AND 10000` - List: `status IN ('Active', 'Pending')` - Pattern: `sku LIKE 'ABC%'` - Compound: `facility_id=123 AND is_active=true` schema: type: string example: status='Active' AND updated_at >= '2024-01-01' responses: 200Ok: description: OK 400BadRequest: description: Bad request 401NotAuthenticated: description: Not authenticated 403AccessDenied: description: Access denied 404NotFound: description: The specified resource was not found 500ServerError: description: Server error securitySchemes: ApiKeyAuth: type: apiKey in: header # can be "header", "query" or "cookie" name: X-API-KEY security: - ApiKeyAuth: [] tags: - name: Canix API description: "Canix REST API"