### Sandbox API Source: https://api-or.metrc.com/Documentation Endpoints for sandbox integration setup. ```APIDOC ## POST /sandbox/v2/integrator/setup ### Description Sets up the integrator in the sandbox environment. ### Method POST ### Endpoint /sandbox/v2/integrator/setup ### Parameters #### Request Body - **setupDetails** (object) - Required - Details for setting up the integrator. ### Request Example ```json { "setupDetails": { "apiKey": "sandbox_key_123", "environment": "test" } } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message. #### Response Example ```json { "message": "Sandbox integrator setup complete." } ``` ``` -------------------------------- ### Postman Setup for OrMetrc API Source: https://api-or.metrc.com/Documentation Instructions on how to import and configure a Postman collection for testing the OrMetrc API. ```APIDOC ## Postman Setup for OrMetrc API ### Description Postman is a great tool for quickly testing out requests to an API. Below you will find a collection you can import into Postman to start making requests right away. ### Import Collection Import the following collection: [Postman JSON](link_to_postman_json) ### Environment Preparation 1. **Edit the collection's root folder:** * On the **Authorization** tab, ensure **Basic Auth** is selected. 2. **Update the Variables tab:** * Set the **host** to your OrMetrc API URL. * Set **username** to your software API key. * Set **password** to your user API key. * Set **licenseNumber** to your facility license number. With these changes, you should be able to make requests. The default data in the POST and PUT examples may need to be modified for a successful response. ``` -------------------------------- ### Dates and Times Source: https://api-or.metrc.com/Documentation Details on the expected ISO 8601 date and date/time formats for API requests and responses, including specific formatting rules and examples. ```APIDOC ## Dates and Times ### Description All date and date/time fields submitted to or returned by the Metrc API must adhere to the ISO 8601 format. The API specifically supports the `YYYY-MM-DD` format for dates. For date/time values, various formats are accepted, including those with UTC ('Z') or numerical time zone offsets. The API automatically converts all provided time zone offsets to UTC for storage. ### Supported Date Format - **YYYY-MM-DD** ### Supported Date/Time Formats (Examples) - `2015-08-04T22:04:50Z` (UTC) - `2015-08-04T22:04:50+00:00` (UTC offset) - `2015-10-03T16:30:40.345+00:00` (with milliseconds and UTC offset) - `2016-02-04T22:20:30.456-06:00` (with milliseconds and non-UTC offset) ### Time Zone Conversion - The API accepts any specified time zone offset and converts it to UTC for internal storage. ``` -------------------------------- ### Example API Error Response Source: https://api-or.metrc.com/Documentation This JSON structure represents a typical error response from the API, indicating the row number and a description of the error encountered. ```json [ { "row": 0, "message": "-- error description --" }, { "row": 1, "message": "-- error description --" } ] ``` -------------------------------- ### Facilities API (v2) Source: https://api-or.metrc.com/Documentation Retrieve information about facilities. ```APIDOC ## Facilities API (v2) ### Description Retrieve information about facilities. ### Method GET ### Endpoint /facilities/v2/ ``` -------------------------------- ### Retail Id API (v2) Source: https://api-or.metrc.com/Documentation Endpoints for managing retail IDs, including retrieving all allotments, associating IDs, generating new IDs, merging IDs, and retrieving package information or receiving data via label or QR code. ```APIDOC ## Retail Id API (v2) ### Description Endpoints for managing retail IDs, including retrieving all allotments, associating IDs, generating new IDs, merging IDs, and retrieving package information or receiving data via label or QR code. ### Method GET ### Endpoint /retailid/v2/allotment ### Method POST ### Endpoint /retailid/v2/associate ### Method POST ### Endpoint /retailid/v2/generate ### Method POST ### Endpoint /retailid/v2/merge ### Method POST ### Endpoint /retailid/v2/packages/info ### Method GET ### Endpoint /retailid/v2/receive/{label} ### Method GET ### Endpoint /retailid/v2/receive/qr/{shortCode} ``` -------------------------------- ### Plants API (v2) Source: https://api-or.metrc.com/Documentation Endpoints for managing plants, including retrieval by ID, label, status, growth phases, waste reasons, and performing operations like adjustments, adding additives, creating packages, and updating plant details. ```APIDOC ## Plants API (v2) ### Description Endpoints for managing plants, including retrieval by ID, label, status, growth phases, waste reasons, and performing operations like adjustments, adding additives, creating packages, and updating plant details. ### Method GET ### Endpoint /plants/v2/additives/types ### Method GET ### Endpoint /plants/v2/{id} ### Method GET ### Endpoint /plants/v2/{label} ### Method GET ### Endpoint /plants/v2/vegetative ### Method GET ### Endpoint /plants/v2/flowering ### Method GET ### Endpoint /plants/v2/onhold ### Method GET ### Endpoint /plants/v2/inactive ### Method GET ### Endpoint /plants/v2/mother ### Method GET ### Endpoint /plants/v2/mother/inactive ### Method GET ### Endpoint /plants/v2/mother/onhold ### Method GET ### Endpoint /plants/v2/additives ### Method GET ### Endpoint /plants/v2/growthphases ### Method GET ### Endpoint /plants/v2/waste/reasons ### Method PUT ### Endpoint /plants/v2/adjust ### Method POST ### Endpoint /plants/v2/additives ### Method POST ### Endpoint /plants/v2/additives/usingtemplate ### Method POST ### Endpoint /plants/v2/additives/bylocation ### Method POST ### Endpoint /plants/v2/additives/bylocation/usingtemplate ### Method POST ### Endpoint /plants/v2/plantings ### Method POST ### Endpoint /plants/v2/plantbatch/packages ### Method POST ### Endpoint /plants/v2/manicure ### Method PUT ### Endpoint /plants/v2/location ### Method PUT ### Endpoint /plants/v2/growthphase ### Method PUT ### Endpoint /plants/v2/tag ### Method PUT ### Endpoint /plants/v2/strain ### Method PUT ### Endpoint /plants/v2/harvest ### Method PUT ### Endpoint /plants/v2/merge ### Method DELETE ### Endpoint /plants/v2/ ### Method POST ### Endpoint /plants/v2/waste ### Method GET ### Endpoint /plants/v2/waste/methods/all ### Method PUT ### Endpoint /plants/v2/split ### Method GET ### Endpoint /plants/v2/waste ### Method GET ### Endpoint /plants/v2/waste/{id}/plant ### Method GET ### Endpoint /plants/v2/waste/{id}/package ``` -------------------------------- ### Packages API (v2) Source: https://api-or.metrc.com/Documentation Comprehensive endpoints for managing packages, including retrieval by ID, label, status, source harvests, lab samples, types, and performing various operations like adjustments, testing, donations, and more. ```APIDOC ## Packages API (v2) ### Description Comprehensive endpoints for managing packages, including retrieval by ID, label, status, source harvests, lab samples, types, and performing various operations like adjustments, testing, donations, and more. ### Method GET ### Endpoint /packages/v2/{id} ### Method GET ### Endpoint /packages/v2/adjustments ### Method GET ### Endpoint /packages/v2/{id}/source/harvests ### Method GET ### Endpoint /packages/v2/{label} ### Method GET ### Endpoint /packages/v2/active ### Method GET ### Endpoint /packages/v2/onhold ### Method GET ### Endpoint /packages/v2/inactive ### Method GET ### Endpoint /packages/v2/intransit ### Method GET ### Endpoint /packages/v2/labsamples ### Method GET ### Endpoint /packages/v2/types ### Method GET ### Endpoint /packages/v2/adjust/reasons ### Method POST ### Endpoint /packages/v2/ ### Method POST ### Endpoint /packages/v2/testing ### Method POST ### Endpoint /packages/v2/plantings ### Method PUT ### Endpoint /packages/v2/donation/flag ### Method PUT ### Endpoint /packages/v2/donation/unflag ### Method PUT ### Endpoint /packages/v2/usebydate ### Method PUT ### Endpoint /packages/v2/item ### Method PUT ### Endpoint /packages/v2/note ### Method PUT ### Endpoint /packages/v2/location ### Method PUT ### Endpoint /packages/v2/labtests/required ### Method PUT ### Endpoint /packages/v2/externalid ### Method PUT ### Endpoint /packages/v2/tradesample/flag ### Method PUT ### Endpoint /packages/v2/tradesample/unflag ### Method PUT ### Endpoint /packages/v2/adjust ### Method POST ### Endpoint /packages/v2/adjust ### Method PUT ### Endpoint /packages/v2/remediate ### Method PUT ### Endpoint /packages/v2/pretreat ### Method PUT ### Endpoint /packages/v2/finish ### Method PUT ### Endpoint /packages/v2/unfinish ### Method DELETE ### Endpoint /packages/v2/{id} ### Method PUT ### Endpoint /packages/v2/decontaminate ### Method PUT ### Endpoint /packages/v2/finishedgood/flag ### Method PUT ### Endpoint /packages/v2/finishedgood/unflag ### Method GET ### Endpoint /packages/v2/transferred ``` -------------------------------- ### Plant Batches API (v2) Source: https://api-or.metrc.com/Documentation Endpoints for managing plant batches, including retrieval by ID, status, types, waste reasons, and performing operations like waste management, adjustments, adding additives, creating packages, and updating batch details. ```APIDOC ## Plant Batches API (v2) ### Description Endpoints for managing plant batches, including retrieval by ID, status, types, waste reasons, and performing operations like waste management, adjustments, adding additives, creating packages, and updating batch details. ### Method GET ### Endpoint /plantbatches/v2/{id} ### Method GET ### Endpoint /plantbatches/v2/active ### Method GET ### Endpoint /plantbatches/v2/inactive ### Method GET ### Endpoint /plantbatches/v2/types ### Method DELETE ### Endpoint /plantbatches/v2/ ### Method GET ### Endpoint /plantbatches/v2/waste/reasons ### Method POST ### Endpoint /plantbatches/v2/waste ### Method POST ### Endpoint /plantbatches/v2/adjust ### Method POST ### Endpoint /plantbatches/v2/additives ### Method POST ### Endpoint /plantbatches/v2/additives/usingtemplate ### Method POST ### Endpoint /plantbatches/v2/plantings ### Method POST ### Endpoint /plantbatches/v2/packages ### Method POST ### Endpoint /plantbatches/v2/packages/frommotherplant ### Method POST ### Endpoint /plantbatches/v2/split ### Method POST ### Endpoint /plantbatches/v2/growthphase ### Method PUT ### Endpoint /plantbatches/v2/name ### Method PUT ### Endpoint /plantbatches/v2/tag ### Method PUT ### Endpoint /plantbatches/v2/strain ### Method PUT ### Endpoint /plantbatches/v2/location ### Method GET ### Endpoint /plantbatches/v2/waste ``` -------------------------------- ### API General Guidelines Source: https://api-or.metrc.com/Documentation This section outlines the fundamental requirements for interacting with the Metrc API, including the use of HTTPS, JSON data format, and content type headers. ```APIDOC ## API General Guidelines ### Description The Metrc API exclusively uses the HTTPS protocol for secure communication. All data exchange with the API must be in JSON format. For POST and PUT requests, the `Content-Type` header must be set to `application/json`. ### Communication Protocol - **HTTPS**: All API endpoints are accessible only via HTTPS. ### Data Format - **JSON**: The API expects and returns data in JSON format. ### Request Headers - **Content-Type**: For `POST` and `PUT` requests, this header must be `application/json`. ``` -------------------------------- ### Additives Templates API (v2) Source: https://api-or.metrc.com/Documentation Endpoints for managing additive templates, including retrieving specific templates, active/inactive templates, and creating or updating templates. ```APIDOC ## Additives Templates API (v2) ### Description Endpoints for managing additive templates, including retrieving specific templates, active/inactive templates, and creating or updating templates. ### Method GET ### Endpoint /additivestemplates/v2/{id} ### Method GET ### Endpoint /additivestemplates/v2/active ### Method GET ### Endpoint /additivestemplates/v2/inactive ### Method POST ### Endpoint /additivestemplates/v2/ ### Method PUT ### Endpoint /additivestemplates/v2/ ``` -------------------------------- ### Facilities API Source: https://api-or.metrc.com/Documentation Provides endpoints for managing facility data. ```APIDOC ## GET /facilities/v1/ ### Description Retrieves a list of facilities. ### Method GET ### Endpoint /facilities/v1/ ``` -------------------------------- ### Making Calls with Timestamps (URL Encoding) Source: https://api-or.metrc.com/Documentation Explains the necessity of URL encoding for timestamps, particularly when using plus signs (+) in time zone offsets within query strings. ```APIDOC ## Making Calls with Timestamps ### Description When including date/time values in query strings (e.g., for GET requests), proper URL encoding is crucial. Specifically, any plus signs (+) in time zone offsets must be encoded as `%2B` to ensure the date/time is correctly interpreted by the API. ### Example of Incorrect vs. Correct Encoding **Incorrect Call:** `GET /packages/v2/active?licenseNumber=123-ABC&lastModifiedStart=2023-11-01T08:00:00+02:00` **Correct Call (with encoded '+'):** `GET /packages/v2/active?licenseNumber=123-ABC&lastModifiedStart=2023-11-01T08:00:00%2B02:00` ``` -------------------------------- ### Record Matching Source: https://api-or.metrc.com/Documentation Information on how Metrc allows referencing resources by either their unique ID or their name, with case-insensitive comparison for names. ```APIDOC ## Record Matching ### Description Certain Metrc API endpoints allow resources such as Harvests and Plant Batches to be referenced by either their unique ID or their name. When using the name for referencing, the comparison is performed in a case-insensitive manner. ``` -------------------------------- ### Packages API Source: https://api-or.metrc.com/Documentation Endpoints for managing package data, including retrieval, creation, updates, and status changes. ```APIDOC ## Packages API ### Description Manages package data, including retrieving packages by ID or label, filtering by status, accessing package types and adjustment reasons, and performing create, update, and status-related operations. ### Methods and Endpoints - **GET /packages/v1/{id}**: Retrieves a specific package by its ID. - **GET /packages/v1/{label}**: Retrieves a specific package by its label. - **GET /packages/v1/active**: Retrieves all active packages. - **GET /packages/v1/onhold**: Retrieves all packages on hold. - **GET /packages/v1/inactive**: Retrieves all inactive packages. - **GET /packages/v1/types**: Retrieves package types. - **GET /packages/v1/adjust/reasons**: Retrieves reasons for package adjustments. - **POST /packages/v1/create**: Creates a new package. - **POST /packages/v1/create/testing**: Creates a testing package. - **POST /packages/v1/create/plantings**: Creates packages from plantings. - **POST /packages/v1/change/item**: Changes the item associated with a package. - **PUT /packages/v1/change/note**: Changes the note for a package. - **POST /packages/v1/change/locations**: Changes the location of a package. - **POST /packages/v1/adjust**: Adjusts a package. - **POST /packages/v1/finish**: Finishes a package. - **POST /packages/v1/unfinish**: Unfinishes a package. - **POST /packages/v1/remediate**: Remediates a package. ``` -------------------------------- ### Employees API (v2) Source: https://api-or.metrc.com/Documentation Endpoints for retrieving employee information and their permissions. ```APIDOC ## Employees API (v2) ### Description Endpoints for retrieving employee information and their permissions. ### Method GET ### Endpoint /employees/v2/ ### Method GET ### Endpoint /employees/v2/permissions ``` -------------------------------- ### Items API (v2) Source: https://api-or.metrc.com/Documentation Endpoints for managing items, including retrieval by ID, status, categories, brands, photos, files, and performing create, update, and delete operations. ```APIDOC ## Items API (v2) ### Description Endpoints for managing items, including retrieval by ID, status, categories, brands, photos, files, and performing create, update, and delete operations. ### Method GET ### Endpoint /items/v2/{id} ### Method GET ### Endpoint /items/v2/active ### Method GET ### Endpoint /items/v2/inactive ### Method GET ### Endpoint /items/v2/categories ### Method GET ### Endpoint /items/v2/brands ### Method GET ### Endpoint /items/v2/photo/{id} ### Method GET ### Endpoint /items/v2/file/{id} ### Method POST ### Endpoint /items/v2/ ### Method PUT ### Endpoint /items/v2/ ### Method POST ### Endpoint /items/v2/photo ### Method POST ### Endpoint /items/v2/file ### Method DELETE ### Endpoint /items/v2/{id} ### Method DELETE ### Endpoint /items/v2/brand/{id} ### Method POST ### Endpoint /items/v2/brand ### Method PUT ### Endpoint /items/v2/brand ``` -------------------------------- ### Harvests API (v2) Source: https://api-or.metrc.com/Documentation Endpoints for managing harvests, including retrieving harvests by ID, status, waste information, and performing actions like creating packages, updating locations, and finishing harvests. ```APIDOC ## Harvests API (v2) ### Description Endpoints for managing harvests, including retrieving harvests by ID, status, waste information, and performing actions like creating packages, updating locations, and finishing harvests. ### Method GET ### Endpoint /harvests/v2/{id} ### Method GET ### Endpoint /harvests/v2/active ### Method GET ### Endpoint /harvests/v2/onhold ### Method GET ### Endpoint /harvests/v2/inactive ### Method GET ### Endpoint /harvests/v2/waste ### Method GET ### Endpoint /harvests/v2/waste/types ### Method POST ### Endpoint /harvests/v2/packages/testing ### Method POST ### Endpoint /harvests/v2/packages ### Method PUT ### Endpoint /harvests/v2/location ### Method POST ### Endpoint /harvests/v2/waste ### Method PUT ### Endpoint /harvests/v2/rename ### Method PUT ### Endpoint /harvests/v2/finish ### Method PUT ### Endpoint /harvests/v2/unfinish ### Method PUT ### Endpoint /harvests/v2/restore/harvestedplants ### Method DELETE ### Endpoint /harvests/v2/waste/{id} ``` -------------------------------- ### Plant Batches API Source: https://api-or.metrc.com/Documentation Endpoints for managing plant batch data, including retrieval, creation, updates, and various batch operations. ```APIDOC ## Plant Batches API ### Description Manages plant batch data, including retrieving batches by ID, filtering by status, accessing batch types, and performing operations like adjustments, package creation, splitting, and waste management. ### Methods and Endpoints - **GET /plantbatches/v1/{id}**: Retrieves a specific plant batch by its ID. - **GET /plantbatches/v1/active**: Retrieves all active plant batches. - **GET /plantbatches/v1/inactive**: Retrieves all inactive plant batches. - **GET /plantbatches/v1/types**: Retrieves plant batch types. - **POST /plantbatches/v1/adjust**: Adjusts a plant batch. - **POST /plantbatches/v1/createplantings**: Creates plantings for a plant batch. - **POST /plantbatches/v1/createpackages**: Creates packages for a plant batch. - **POST /plantbatches/v1/split**: Splits a plant batch. - **POST /plantbatches/v1/create/packages/frommotherplant**: Creates packages from a mother plant batch. - **POST /plantbatches/v1/changegrowthphase**: Changes the growth phase of a plant batch. - **PUT /plantbatches/v1/moveplantbatches**: Moves plant batches. - **POST /plantbatches/v1/additives**: Adds additives to a plant batch. - **POST /plantbatches/v1/waste**: Records waste for a plant batch. - **DELETE /plantbatches/v1/**: Deletes a plant batch. - **GET /plantbatches/v1/waste/reasons**: Retrieves reasons for plant batch waste. ``` -------------------------------- ### Processing Jobs API (v2) Source: https://api-or.metrc.com/Documentation Endpoints for managing processing jobs, including retrieval by ID, status, job types, and performing operations like creating packages, starting/finishing jobs, and updating job types. ```APIDOC ## Processing Jobs API (v2) ### Description Endpoints for managing processing jobs, including retrieval by ID, status, job types, and performing operations like creating packages, starting/finishing jobs, and updating job types. ### Method GET ### Endpoint /processing/v2/{id} ### Method GET ### Endpoint /processing/v2/active ### Method GET ### Endpoint /processing/v2/inactive ### Method GET ### Endpoint /processing/v2/jobtypes/active ### Method GET ### Endpoint /processing/v2/jobtypes/inactive ### Method GET ### Endpoint /processing/v2/jobtypes/attributes ### Method GET ### Endpoint /processing/v2/jobtypes/categories ### Method POST ### Endpoint /processing/v2/createpackages ### Method POST ### Endpoint /processing/v2/start ### Method POST ### Endpoint /processing/v2/adjust ### Method POST ### Endpoint /processing/v2/jobtypes ### Method PUT ### Endpoint /processing/v2/finish ### Method PUT ### Endpoint /processing/v2/unfinish ### Method PUT ### Endpoint /processing/v2/jobtypes ### Method DELETE ### Endpoint /processing/v2/jobtypes/{id} ### Method DELETE ### Endpoint /processing/v2/{id} ``` -------------------------------- ### Items API Source: https://api-or.metrc.com/Documentation Endpoints for managing item data, including retrieval, creation, updates, and photos. ```APIDOC ## Items API ### Description Manages item data, including retrieving items by ID, filtering by status, accessing categories, brands, and photos, and performing create, update, and delete operations. ### Methods and Endpoints - **GET /items/v1/{id}**: Retrieves a specific item by its ID. - **GET /items/v1/active**: Retrieves all active items. - **GET /items/v1/inactive**: Retrieves all inactive items. - **GET /items/v1/categories**: Retrieves item categories. - **GET /items/v1/brands**: Retrieves item brands. - **GET /items/v1/photo/{id}**: Retrieves the photo for a specific item. - **POST /items/v1/create**: Creates a new item. - **POST /items/v1/update**: Updates an existing item. - **POST /items/v1/photo**: Uploads a photo for an item. - **DELETE /items/v1/{id}**: Deletes a specific item by its ID. ``` -------------------------------- ### Patients API (v2) Source: https://api-or.metrc.com/Documentation Endpoints for managing patients, including retrieval by ID, status, and performing create, update, and delete operations. ```APIDOC ## Patients API (v2) ### Description Endpoints for managing patients, including retrieval by ID, status, and performing create, update, and delete operations. ### Method GET ### Endpoint /patients/v2/{id} ### Method GET ### Endpoint /patients/v2/active ### Method POST ### Endpoint /patients/v2/ ### Method PUT ### Endpoint /patients/v2/ ### Method DELETE ### Endpoint /patients/v2/{id} ``` -------------------------------- ### Employees API Source: https://api-or.metrc.com/Documentation Provides endpoints for managing employee data. ```APIDOC ## GET /employees/v1/ ### Description Retrieves a list of employees. ### Method GET ### Endpoint /employees/v1/ ``` -------------------------------- ### Plants API Source: https://api-or.metrc.com/Documentation Endpoints for managing individual plant data, including retrieval, status filtering, and various plant operations. ```APIDOC ## Plants API ### Description Manages individual plant data, including retrieving plants by ID or label, filtering by growth stage or status, accessing additives and growth phases, and performing operations like moving, changing growth phases, and waste management. ### Methods and Endpoints - **GET /plants/v1/{id}**: Retrieves a specific plant by its ID. - **GET /plants/v1/{label}**: Retrieves a specific plant by its label. - **GET /plants/v1/vegetative**: Retrieves plants in the vegetative stage. - **GET /plants/v1/flowering**: Retrieves plants in the flowering stage. - **GET /plants/v1/onhold**: Retrieves plants on hold. - **GET /plants/v1/inactive**: Retrieves inactive plants. - **GET /plants/v1/additives**: Retrieves additives for plants. - **GET /plants/v1/growthphases**: Retrieves growth phases for plants. - **GET /plants/v1/additives/types**: Retrieves types of additives for plants. - **GET /plants/v1/waste/methods/all**: Retrieves all waste methods for plants. - **GET /plants/v1/waste/reasons**: Retrieves reasons for plant waste. - **POST /plants/v1/moveplants**: Moves plants. - **POST /plants/v1/changegrowthphases**: Changes the growth phases of plants. - **DELETE /plants/v1/**: Deletes a plant. - **POST /plants/v1/additives**: Adds additives to plants. - **POST /plants/v1/waste**: Records waste for plants. - **POST /plants/v1/additives/bylocation**: Adds additives to plants by location. - **POST /plants/v1/create/plantings**: Creates plantings for plants. - **POST /plants/v1/create/plantbatch/packages**: Creates plant batch packages from plants. - **POST /plants/v1/manicureplants**: Manicures plants. - **POST /plants/v1/harvestplants**: Harvests plants. ``` -------------------------------- ### Strains API Source: https://api-or.metrc.com/Documentation Endpoints for managing strains. ```APIDOC ## GET /strains/v2/{id} ### Description Retrieves details for a specific strain by its ID. ### Method GET ### Endpoint /strains/v2/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the strain to retrieve. ### Request Example ### Response #### Success Response (200) - **strain** (object) - The strain details. #### Response Example ```json { "strain": { "id": "strain1", "name": "Indica Blend" } } ``` ``` ```APIDOC ## GET /strains/v2/active ### Description Retrieves a list of active strains. ### Method GET ### Endpoint /strains/v2/active ### Parameters ### Request Example ### Response #### Success Response (200) - **strains** (array) - A list of active strains. #### Response Example ```json { "strains": [ { "id": "strain1", "name": "Indica Blend" } ] } ``` ``` ```AP ``` -------------------------------- ### Locations API (v2) Source: https://api-or.metrc.com/Documentation Endpoints for managing locations, including retrieval by ID, status, types, and performing create, update, and delete operations. ```APIDOC ## Locations API (v2) ### Description Endpoints for managing locations, including retrieval by ID, status, types, and performing create, update, and delete operations. ### Method GET ### Endpoint /locations/v2/{id} ### Method GET ### Endpoint /locations/v2/active ### Method GET ### Endpoint /locations/v2/inactive ### Method GET ### Endpoint /locations/v2/types ### Method POST ### Endpoint /locations/v2/ ### Method PUT ### Endpoint /locations/v2/ ### Method DELETE ### Endpoint /locations/v2/{id} ``` -------------------------------- ### Templates API Source: https://api-or.metrc.com/Documentation Endpoints for managing transfer templates, including their deliveries, transporters, and packages. ```APIDOC ## GET /transfers/v1/templates ### Description Retrieves a list of all transfer templates. ### Method GET ### Endpoint /transfers/v1/templates ### Parameters #### Query Parameters None ### Response #### Success Response (200) - **templates** (array) - List of transfer templates. #### Response Example ```json { "templates": [ { "id": "string", "name": "string", "description": "string" } ] } ``` ``` ```APIDOC ## GET /transfers/v1/templates/{id}/deliveries ### Description Retrieves deliveries associated with a specific transfer template. ### Method GET ### Endpoint /transfers/v1/templates/{id}/deliveries ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the transfer template. ### Response #### Success Response (200) - **deliveries** (array) - List of deliveries for the template. #### Response Example ```json { "deliveries": [ { "id": "string", "destinationFacility": "string", "packageCount": "integer" } ] } ``` ``` ```APIDOC ## GET /transfers/v1/templates/deliveries/{id}/transporters ### Description Retrieves transporters associated with a specific delivery within a template. ### Method GET ### Endpoint /transfers/v1/templates/deliveries/{id}/transporters ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the delivery. ### Response #### Success Response (200) - **transporters** (array) - List of transporters. #### Response Example ```json { "transporters": [ { "id": "string", "name": "string" } ] } ``` ``` ```APIDOC ## GET /transfers/v1/templates/deliveries/{id}/transporters/details ### Description Retrieves detailed information about transporters for a specific delivery within a template. ### Method GET ### Endpoint /transfers/v1/templates/deliveries/{id}/transporters/details ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the delivery. ### Response #### Success Response (200) - **transporterDetails** (array) - Detailed transporter information. #### Response Example ```json { "transporterDetails": [ { "transporterId": "string", "driverName": "string", "driverLicenseNumber": "string", "vehicleLicensePlate": "string" } ] } ``` ``` ```APIDOC ## GET /transfers/v1/templates/deliveries/{id}/packages ### Description Retrieves packages associated with a specific delivery within a template. ### Method GET ### Endpoint /transfers/v1/templates/deliveries/{id}/packages ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the delivery. ### Response #### Success Response (200) - **packages** (array) - List of packages. #### Response Example ```json { "packages": [ { "id": "string", "tag": "string", "type": "string", "quantity": "number" } ] } ``` ``` ```APIDOC ## POST /transfers/v1/templates ### Description Creates a new transfer template. ### Method POST ### Endpoint /transfers/v1/templates ### Parameters #### Request Body - **template** (object) - Required - Details of the new template. - **name** (string) - Required - The name of the template. - **description** (string) - Optional - A description for the template. - **deliveries** (array) - Optional - Deliveries to include in the template. ### Request Example ```json { "template": { "name": "Standard Delivery Template", "description": "A template for standard interfacility deliveries.", "deliveries": [ { "destinationFacility": "Dispensary A", "packageCount": 5, "transporters": [ { "name": "Driver One", "licenseNumber": "DL12345" } ], "packages": [ { "tag": "1A4FF0000000002", "type": "Edible", "quantity": 20 } ] } ] } } ``` ### Response #### Success Response (200) - **templateId** (string) - The ID of the created template. #### Response Example ```json { "templateId": "temp_abc123" } ``` ``` ```APIDOC ## PUT /transfers/v1/templates ### Description Updates an existing transfer template. ### Method PUT ### Endpoint /transfers/v1/templates ### Parameters #### Request Body - **template** (object) - Required - Details of the template to update. - **id** (string) - Required - The ID of the template to update. - **name** (string) - Required - The name of the template. - **description** (string) - Optional - A description for the template. - **deliveries** (array) - Optional - Deliveries to include in the template. ### Request Example ```json { "template": { "id": "temp_abc123", "name": "Updated Standard Delivery Template", "description": "An updated template for standard interfacility deliveries.", "deliveries": [ { "destinationFacility": "Dispensary B", "packageCount": 7, "transporters": [ { "name": "Driver Two", "licenseNumber": "DL67890" } ], "packages": [ { "tag": "1A4FF0000000003", "type": "Concentrate", "quantity": 5 } ] } ] } } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the update was successful. #### Response Example ```json { "success": true } ``` ``` ```APIDOC ## DELETE /transfers/v1/templates/{id} ### Description Deletes a transfer template. ### Method DELETE ### Endpoint /transfers/v1/templates/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the template to delete. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the deletion was successful. #### Response Example ```json { "success": true } ``` ``` -------------------------------- ### Lab Tests API (v2) Source: https://api-or.metrc.com/Documentation Endpoints for retrieving lab test states, batches, types, results, and for recording and updating lab test data. ```APIDOC ## Lab Tests API (v2) ### Description Endpoints for retrieving lab test states, batches, types, results, and for recording and updating lab test data. ### Method GET ### Endpoint /labtests/v2/states ### Method GET ### Endpoint /labtests/v2/batches ### Method GET ### Endpoint /labtests/v2/types ### Method GET ### Endpoint /labtests/v2/results ### Method POST ### Endpoint /labtests/v2/record ### Method PUT ### Endpoint /labtests/v2/labtestdocument ### Method PUT ### Endpoint /labtests/v2/results/release ### Method GET ### Endpoint /labtests/v2/labtestdocument/{id} ``` -------------------------------- ### Patient Check Ins API (v2) Source: https://api-or.metrc.com/Documentation Endpoints for managing patient check-ins, including retrieving check-ins by location and performing create, update, and delete operations. ```APIDOC ## Patient Check Ins API (v2) ### Description Endpoints for managing patient check-ins, including retrieving check-ins by location and performing create, update, and delete operations. ### Method GET ### Endpoint /patient-checkins/v2/locations ### Method GET ### Endpoint /patient-checkins/v2/ ### Method POST ### Endpoint /patient-checkins/v2/ ### Method PUT ### Endpoint /patient-checkins/v2/ ### Method DELETE ### Endpoint /patient-checkins/v2/{id} ``` -------------------------------- ### Server Responses Source: https://api-or.metrc.com/Documentation A summary of common HTTP status codes returned by the Metrc API, including their meanings. ```APIDOC ## Server Responses ### Description This section lists common HTTP status codes returned by the Metrc API and their corresponding meanings. ### Success Response - **200 OK**: The server successfully processed the request. ### Error Responses - **400 Bad Request**: The request was malformed or missing required parameters. Please review the input and resubmit. ``` -------------------------------- ### Sales API Source: https://api-or.metrc.com/Documentation Endpoints for managing sales data, including customer types, deliveries, receipts, and transactions. ```APIDOC ## Sales API ### Description Manages sales data, including retrieving customer types, delivery information, payment types, receipts, and transaction details. It also supports operations for managing deliveries, including creation, updates, and status changes. ### Methods and Endpoints - **GET /sales/v1/customertypes**: Retrieves customer types. - **GET /sales/v1/patientregistration/locations**: Retrieves patient registration locations. - **GET /sales/v1/deliveries/active**: Retrieves active deliveries. - **GET /sales/v1/deliveries/inactive**: Retrieves inactive deliveries. - **GET /sales/v1/deliveries/{id}**: Retrieves a specific delivery by its ID. - **GET /sales/v1/deliveries/returnreasons**: Retrieves reasons for delivery returns. - **POST /sales/v1/deliveries**: Creates a new delivery. - **PUT /sales/v1/deliveries**: Updates an existing delivery. - **PUT /sales/v1/deliveries/hub**: Updates hub delivery information. - **PUT /sales/v1/deliveries/hub/accept**: Accepts a hub delivery. - **PUT /sales/v1/deliveries/complete**: Completes a delivery. - **PUT /sales/v1/deliveries/hub/depart**: Marks a hub delivery as departed. - **PUT /sales/v1/deliveries/hub/verifyID**: Verifies the ID for a hub delivery. - **DELETE /sales/v1/deliveries/{id}**: Deletes a specific delivery by its ID. - **GET /sales/v1/counties**: Retrieves counties. - **GET /sales/v1/paymenttypes**: Retrieves payment types. - **GET /sales/v1/receipts/active**: Retrieves active receipts. - **GET /sales/v1/receipts/inactive**: Retrieves inactive receipts. - **GET /sales/v1/receipts/{id}**: Retrieves a specific receipt by its ID. - **POST /sales/v1/receipts**: Creates a new receipt. - **PUT /sales/v1/receipts**: Updates an existing receipt. - **DELETE /sales/v1/receipts/{id}**: Deletes a specific receipt by its ID. - **GET /sales/v1/transactions**: Retrieves transactions. - **GET /sales/v1/transactions/{salesDateStart}/{salesDateEnd}**: Retrieves transactions within a date range. - **POST /sales/v1/transactions/{date}**: Creates a transaction for a specific date. - **PUT /sales/v1/transactions/{date}**: Updates a transaction for a specific date. - **GET /sales/v1/deliveries/retailer/active**: Retrieves active retailer deliveries. - **GET /sales/v1/deliveries/retailer/inactive**: Retrieves inactive retailer deliveries. - **GET /sales/v1/deliveries/retailer/{id}**: Retrieves a specific retailer delivery by its ID. - **POST /sales/v1/deliveries/retailer**: Creates a new retailer delivery. - **PUT /sales/v1/deliveries/retailer**: Updates an existing retailer delivery. - **DELETE /sales/v1/deliveries/retailer/{id}**: Deletes a specific retailer delivery by its ID. - **POST /sales/v1/deliveries/retailer/depart**: Marks a retailer delivery as departed. - **POST /sales/v1/deliveries/retailer/restock**: Restocks a retailer delivery. - **POST /sales/v1/deliveries/retailer/sale**: Records a sale for a retailer delivery. - **POST /sales/v1/deliveries/retailer/end**: Ends a retailer delivery. ``` -------------------------------- ### Units of Measure API Source: https://api-or.metrc.com/Documentation Endpoint for retrieving active units of measure. ```APIDOC ## GET /unitsofmeasure/v1/active ### Description Retrieves a list of all active units of measure. ### Method GET ### Endpoint /unitsofmeasure/v1/active ### Parameters #### Query Parameters None ### Response #### Success Response (200) - **unitsOfMeasure** (array) - List of active units of measure. #### Response Example ```json { "unitsOfMeasure": [ { "id": "string", "name": "string", "abbreviation": "string" } ] } ``` ``` -------------------------------- ### Harvests API Source: https://api-or.metrc.com/Documentation Endpoints for managing harvests, including retrieval, creation, and updates. ```APIDOC ## Harvests API ### Description Manages harvest data, including retrieving harvests by ID, filtering by status, and performing actions like creating packages, moving, renaming, finishing, and unfinishing harvests. ### Methods and Endpoints - **GET /harvests/v1/{id}**: Retrieves a specific harvest by its ID. - **GET /harvests/v1/active**: Retrieves all active harvests. - **GET /harvests/v1/onhold**: Retrieves all harvests on hold. - **GET /harvests/v1/inactive**: Retrieves all inactive harvests. - **GET /harvests/v1/waste/types**: Retrieves waste types for harvests. - **POST /harvests/v1/create/packages**: Creates packages for a harvest. - **POST /harvests/v1/create/packages/testing**: Creates testing packages for a harvest. - **PUT /harvests/v1/move**: Moves a harvest. - **POST /harvests/v1/removewaste**: Removes waste from a harvest. - **PUT /harvests/v1/rename**: Renames a harvest. - **POST /harvests/v1/finish**: Finishes a harvest. - **POST /harvests/v1/unfinish**: Unfinishes a harvest. ``` -------------------------------- ### Transfers API Source: https://api-or.metrc.com/Documentation Provides endpoints for managing transfers. ```APIDOC ## Transfers API ### Description Provides endpoints for managing transfers. Specific details about the available methods and endpoints are not provided in the input text. ### Method (Details not provided) ### Endpoint (Details not provided) ```