All URIs are relative to https://api.trackandtrace.tools
| Method | HTTP request | Description |
|---|---|---|
| v2_files_labels_content_data_packages_active_post | POST /v2/files/labels/content-data/packages/active | For a given list of active packages, returns the needed ContentDataList to render the labels. |
| v2_files_labels_content_data_packages_intransit_post | POST /v2/files/labels/content-data/packages/intransit | For a given list of in transit packages, returns the needed ContentDataList to render the labels. |
| v2_harvests_packages_get | GET /v2/harvests/packages | List of harvest package objects for a single harvest. |
| v2_packages_active_get | GET /v2/packages/active | List of active packages |
| v2_packages_active_report_get | GET /v2/packages/active/report | Generate a report of all active packages |
| v2_packages_active_super_get | GET /v2/packages/active/super | List of active superpackages. Additional metadata can be added using the `include` param. |
| v2_packages_create_inputs_get | GET /v2/packages/create/inputs | Input data used for creating new packages |
| v2_packages_create_post | POST /v2/packages/create | Create one or more packages from existing active packages |
| v2_packages_create_source_items_get | GET /v2/packages/create/source-items | List of items eligible to be used in creating new packages |
| v2_packages_create_source_packages_get | GET /v2/packages/create/source-packages | List of packages eligible to be used in creating new packages |
| v2_packages_history_get | GET /v2/packages/history | List of package history objects for a single package |
| v2_packages_inactive_get | GET /v2/packages/inactive | List of inactive packages |
| v2_packages_intransit_get | GET /v2/packages/intransit | List of in transit packages |
| v2_packages_intransit_report_get | GET /v2/packages/intransit/report | Generate a report of all in-transit packages |
| v2_packages_intransit_super_get | GET /v2/packages/intransit/super | List of intransit superpackages. Additional metadata can be added using the `include` param. |
| v2_packages_labresult_batches_get | GET /v2/packages/labresult-batches | List of package lab result batch objects for a single package |
| v2_packages_labresults_document_get | GET /v2/packages/labresults/document | Get the COA PDF for a lab result. |
| v2_packages_labresults_get | GET /v2/packages/labresults | List of package lab result objects for a single package |
| v2_packages_notes_post | POST /v2/packages/notes | Add notes to packages |
| v2_packages_onhold_get | GET /v2/packages/onhold | List of on hold packages |
| v2_packages_source_harvests_get | GET /v2/packages/source-harvests | List of package source harvest objects for a single package |
| v2_packages_transferred_get | GET /v2/packages/transferred | List of transferred packages |
| v2_packages_transferred_report_get | GET /v2/packages/transferred/report | Generate a report of all transferred packages |
| v2_packages_unfinish_post | POST /v2/packages/unfinish | Unfinish packages |
| v2_transfers_create_destinations_get | GET /v2/transfers/create/destinations | List of destination facilities eligible to be used in creating new transfers |
| v2_transfers_create_packages_get | GET /v2/transfers/create/packages | List of packages eligible to be used in creating new transfers |
| v2_transfers_create_transporters_get | GET /v2/transfers/create/transporters | List of transporter facilities eligible to be used in creating new transfers |
V2FilesLabelsContentDataPackagesActivePost200Response v2_files_labels_content_data_packages_active_post(v2_files_labels_content_data_packages_active_post_request)
For a given list of active packages, returns the needed ContentDataList to render the labels.
Layout IDs can be found by querying the label template layout and label content layout endpoints.
- Bearer (JWT) Authentication (BearerAuth):
import t3api
from t3api.models.v2_files_labels_content_data_packages_active_post200_response import V2FilesLabelsContentDataPackagesActivePost200Response
from t3api.models.v2_files_labels_content_data_packages_active_post_request import V2FilesLabelsContentDataPackagesActivePostRequest
from t3api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trackandtrace.tools
# See configuration.py for a list of all supported configuration parameters.
configuration = t3api.Configuration(
host = "https://api.trackandtrace.tools"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = t3api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with t3api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = t3api.PackagesApi(api_client)
v2_files_labels_content_data_packages_active_post_request = t3api.V2FilesLabelsContentDataPackagesActivePostRequest() # V2FilesLabelsContentDataPackagesActivePostRequest |
try:
# For a given list of active packages, returns the needed ContentDataList to render the labels.
api_response = api_instance.v2_files_labels_content_data_packages_active_post(v2_files_labels_content_data_packages_active_post_request)
print("The response of PackagesApi->v2_files_labels_content_data_packages_active_post:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PackagesApi->v2_files_labels_content_data_packages_active_post: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| v2_files_labels_content_data_packages_active_post_request | V2FilesLabelsContentDataPackagesActivePostRequest |
V2FilesLabelsContentDataPackagesActivePost200Response
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List of LabelContentData objects compiled from the packages and template | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V2FilesLabelsContentDataPackagesActivePost200Response v2_files_labels_content_data_packages_intransit_post(v2_files_labels_content_data_packages_active_post_request)
For a given list of in transit packages, returns the needed ContentDataList to render the labels.
Layout IDs can be found by querying the label template layout and label content layout endpoints.
- Bearer (JWT) Authentication (BearerAuth):
import t3api
from t3api.models.v2_files_labels_content_data_packages_active_post200_response import V2FilesLabelsContentDataPackagesActivePost200Response
from t3api.models.v2_files_labels_content_data_packages_active_post_request import V2FilesLabelsContentDataPackagesActivePostRequest
from t3api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trackandtrace.tools
# See configuration.py for a list of all supported configuration parameters.
configuration = t3api.Configuration(
host = "https://api.trackandtrace.tools"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = t3api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with t3api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = t3api.PackagesApi(api_client)
v2_files_labels_content_data_packages_active_post_request = t3api.V2FilesLabelsContentDataPackagesActivePostRequest() # V2FilesLabelsContentDataPackagesActivePostRequest |
try:
# For a given list of in transit packages, returns the needed ContentDataList to render the labels.
api_response = api_instance.v2_files_labels_content_data_packages_intransit_post(v2_files_labels_content_data_packages_active_post_request)
print("The response of PackagesApi->v2_files_labels_content_data_packages_intransit_post:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PackagesApi->v2_files_labels_content_data_packages_intransit_post: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| v2_files_labels_content_data_packages_active_post_request | V2FilesLabelsContentDataPackagesActivePostRequest |
V2FilesLabelsContentDataPackagesActivePost200Response
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List of LabelContentData objects compiled from the packages and template | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V2HarvestsPlantsGet200Response v2_harvests_packages_get(license_number, package_id, page=page, page_size=page_size, strict_pagination=strict_pagination, sort=sort, filter_logic=filter_logic, filter=filter)
List of harvest package objects for a single harvest.
NOTE: only supports INACTIVE harvests
- Bearer (JWT) Authentication (BearerAuth):
import t3api
from t3api.models.v2_harvests_plants_get200_response import V2HarvestsPlantsGet200Response
from t3api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trackandtrace.tools
# See configuration.py for a list of all supported configuration parameters.
configuration = t3api.Configuration(
host = "https://api.trackandtrace.tools"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = t3api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with t3api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = t3api.PackagesApi(api_client)
license_number = 'LIC-00001' # str | The unique identifier for the license associated with this request.
package_id = 123 # float | ID of the target harvest
page = 1 # int | The index of the page to be returned. (optional) (default to 1)
page_size = 100 # int | The number of objects per page to be returned. (optional) (default to 100)
strict_pagination = False # bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. (optional) (default to False)
sort = 'label:asc' # str | Defines the collection sort order. (optional)
filter_logic = and # str | Describes how the filters, if any, should be applied (optional) (default to and)
filter = ['label__endswith:0003'] # List[str] | One or more collection filters. (optional)
try:
# List of harvest package objects for a single harvest.
api_response = api_instance.v2_harvests_packages_get(license_number, package_id, page=page, page_size=page_size, strict_pagination=strict_pagination, sort=sort, filter_logic=filter_logic, filter=filter)
print("The response of PackagesApi->v2_harvests_packages_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PackagesApi->v2_harvests_packages_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| license_number | str | The unique identifier for the license associated with this request. | |
| package_id | float | ID of the target harvest | |
| page | int | The index of the page to be returned. | [optional] [default to 1] |
| page_size | int | The number of objects per page to be returned. | [optional] [default to 100] |
| strict_pagination | bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. | [optional] [default to False] |
| sort | str | Defines the collection sort order. | [optional] |
| filter_logic | str | Describes how the filters, if any, should be applied | [optional] [default to and] |
| filter | List[str] | One or more collection filters. | [optional] |
V2HarvestsPlantsGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A list of harvest package objects for the specified harvest. | - |
| 401 | The harvest with id={harvestId} was not found in the specified license, or you do not have access to view this harvest's packages | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V2PackagesActiveGet200Response v2_packages_active_get(license_number, page=page, page_size=page_size, sort=sort, filter=filter, filter_logic=filter_logic, strict_pagination=strict_pagination)
List of active packages
- Bearer (JWT) Authentication (BearerAuth):
import t3api
from t3api.models.v2_packages_active_get200_response import V2PackagesActiveGet200Response
from t3api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trackandtrace.tools
# See configuration.py for a list of all supported configuration parameters.
configuration = t3api.Configuration(
host = "https://api.trackandtrace.tools"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = t3api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with t3api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = t3api.PackagesApi(api_client)
license_number = 'LIC-00001' # str | The unique identifier for the license associated with this request.
page = 1 # int | The index of the page to be returned. (optional) (default to 1)
page_size = 100 # int | The number of objects per page to be returned. (optional) (default to 100)
sort = 'label:asc' # str | Defines the collection sort order. (optional)
filter = ['label__endswith:0003'] # List[str] | One or more collection filters. (optional)
filter_logic = and # str | Describes how the filters, if any, should be applied (optional) (default to and)
strict_pagination = False # bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. (optional) (default to False)
try:
# List of active packages
api_response = api_instance.v2_packages_active_get(license_number, page=page, page_size=page_size, sort=sort, filter=filter, filter_logic=filter_logic, strict_pagination=strict_pagination)
print("The response of PackagesApi->v2_packages_active_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PackagesApi->v2_packages_active_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| license_number | str | The unique identifier for the license associated with this request. | |
| page | int | The index of the page to be returned. | [optional] [default to 1] |
| page_size | int | The number of objects per page to be returned. | [optional] [default to 100] |
| sort | str | Defines the collection sort order. | [optional] |
| filter | List[str] | One or more collection filters. | [optional] |
| filter_logic | str | Describes how the filters, if any, should be applied | [optional] [default to and] |
| strict_pagination | bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. | [optional] [default to False] |
V2PackagesActiveGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A list of active packages for this license | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V2PackagesActiveReportGet200Response v2_packages_active_report_get(license_number, secret_key=secret_key, filter_logic=filter_logic, content_type=content_type, prepend_csv_metadata=prepend_csv_metadata, sort=sort, filter=filter, fieldnames=fieldnames)
Generate a report of all active packages
Note: this endpoint supports secret key authentication.
- Bearer (JWT) Authentication (BearerAuth):
import t3api
from t3api.models.v2_packages_active_report_get200_response import V2PackagesActiveReportGet200Response
from t3api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trackandtrace.tools
# See configuration.py for a list of all supported configuration parameters.
configuration = t3api.Configuration(
host = "https://api.trackandtrace.tools"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = t3api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with t3api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = t3api.PackagesApi(api_client)
license_number = 'LIC-00001' # str | The unique identifier for the license associated with this request.
secret_key = '2616ec56-fa2a-4c5b-86c0-acacf23c9ef7' # str | Your secret key, if you wish to authenticate via query params. Secret keys can be manually generated [here](/v2/pages/secret-key). (optional)
filter_logic = and # str | Describes how the filters, if any, should be applied (optional) (default to and)
content_type = json # str | Specifies how the report should be formatted. Can be returned as json or csv. *This can also be defined in the Content-Type header* (optional) (default to json)
prepend_csv_metadata = true # str | Controls if the CSV header metadata should be included in the output. When set to false, only the column headers and data will be returned. (optional) (default to true)
sort = 'label:asc' # str | Defines the collection sort order. (optional)
filter = ['label__endswith:0003'] # List[str] | One or more collection filters. (optional)
fieldnames = 'label,locationName,item.name,quantity,unitOfMeasureAbbreviation' # str | Defines which package fields should appear in the report data. (optional) (default to 'label,locationName,item.name,quantity,unitOfMeasureAbbreviation')
try:
# Generate a report of all active packages
api_response = api_instance.v2_packages_active_report_get(license_number, secret_key=secret_key, filter_logic=filter_logic, content_type=content_type, prepend_csv_metadata=prepend_csv_metadata, sort=sort, filter=filter, fieldnames=fieldnames)
print("The response of PackagesApi->v2_packages_active_report_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PackagesApi->v2_packages_active_report_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| license_number | str | The unique identifier for the license associated with this request. | |
| secret_key | str | Your secret key, if you wish to authenticate via query params. Secret keys can be manually generated here. | [optional] |
| filter_logic | str | Describes how the filters, if any, should be applied | [optional] [default to and] |
| content_type | str | Specifies how the report should be formatted. Can be returned as json or csv. This can also be defined in the Content-Type header | [optional] [default to json] |
| prepend_csv_metadata | str | Controls if the CSV header metadata should be included in the output. When set to false, only the column headers and data will be returned. | [optional] [default to true] |
| sort | str | Defines the collection sort order. | [optional] |
| filter | List[str] | One or more collection filters. | [optional] |
| fieldnames | str | Defines which package fields should appear in the report data. | [optional] [default to 'label,locationName,item.name,quantity,unitOfMeasureAbbreviation'] |
V2PackagesActiveReportGet200Response
- Content-Type: Not defined
- Accept: application/json, text/csv
| Status code | Description | Response headers |
|---|---|---|
| 200 | A list of active packages for this license | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V2PackagesActiveSuperGet200Response v2_packages_active_super_get(license_number, page=page, page_size=page_size, sort=sort, filter=filter, filter_logic=filter_logic, strict_pagination=strict_pagination, include=include)
List of active superpackages. Additional metadata can be added using the include param.
- Bearer (JWT) Authentication (BearerAuth):
import t3api
from t3api.models.v2_packages_active_super_get200_response import V2PackagesActiveSuperGet200Response
from t3api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trackandtrace.tools
# See configuration.py for a list of all supported configuration parameters.
configuration = t3api.Configuration(
host = "https://api.trackandtrace.tools"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = t3api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with t3api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = t3api.PackagesApi(api_client)
license_number = 'LIC-00001' # str | The unique identifier for the license associated with this request.
page = 1 # int | The index of the page to be returned. (optional) (default to 1)
page_size = 100 # int | The number of objects per page to be returned. (optional) (default to 100)
sort = 'label:asc' # str | Defines the collection sort order. (optional)
filter = ['label__endswith:0003'] # List[str] | One or more collection filters. (optional)
filter_logic = and # str | Describes how the filters, if any, should be applied (optional) (default to and)
strict_pagination = False # bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. (optional) (default to False)
include = ['sourceHarvests'] # List[str] | One or more superpackage mixins. Each mixin will include the raw data from Metrc, but also will populate the extracted metadata. - labResults Extracted metadata: - extractedLabResults - testSamplePackageLabels - labResultBatches Extracted metadata: - extractedLabResults - testSamplePackageLabels - sourceHarvests Extracted metadata: - harvestDates - history Extracted metadata: - initialQuantity - coaFiles (not yet supported) Extracted metadata: - extractedLabResults (optional)
try:
# List of active superpackages. Additional metadata can be added using the `include` param.
api_response = api_instance.v2_packages_active_super_get(license_number, page=page, page_size=page_size, sort=sort, filter=filter, filter_logic=filter_logic, strict_pagination=strict_pagination, include=include)
print("The response of PackagesApi->v2_packages_active_super_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PackagesApi->v2_packages_active_super_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| license_number | str | The unique identifier for the license associated with this request. | |
| page | int | The index of the page to be returned. | [optional] [default to 1] |
| page_size | int | The number of objects per page to be returned. | [optional] [default to 100] |
| sort | str | Defines the collection sort order. | [optional] |
| filter | List[str] | One or more collection filters. | [optional] |
| filter_logic | str | Describes how the filters, if any, should be applied | [optional] [default to and] |
| strict_pagination | bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. | [optional] [default to False] |
| include | List[str] | One or more superpackage mixins. Each mixin will include the raw data from Metrc, but also will populate the extracted metadata. - labResults Extracted metadata: - extractedLabResults - testSamplePackageLabels - labResultBatches Extracted metadata: - extractedLabResults - testSamplePackageLabels - sourceHarvests Extracted metadata: - harvestDates - history Extracted metadata: - initialQuantity - coaFiles (not yet supported) Extracted metadata: - extractedLabResults | [optional] |
V2PackagesActiveSuperGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A list of active superpackages for this license | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V2PackagesCreateInputsGet200Response v2_packages_create_inputs_get(license_number)
Input data used for creating new packages
- Bearer (JWT) Authentication (BearerAuth):
import t3api
from t3api.models.v2_packages_create_inputs_get200_response import V2PackagesCreateInputsGet200Response
from t3api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trackandtrace.tools
# See configuration.py for a list of all supported configuration parameters.
configuration = t3api.Configuration(
host = "https://api.trackandtrace.tools"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = t3api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with t3api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = t3api.PackagesApi(api_client)
license_number = 'LIC-00001' # str | The unique identifier for the license associated with this request.
try:
# Input data used for creating new packages
api_response = api_instance.v2_packages_create_inputs_get(license_number)
print("The response of PackagesApi->v2_packages_create_inputs_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PackagesApi->v2_packages_create_inputs_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| license_number | str | The unique identifier for the license associated with this request. |
V2PackagesCreateInputsGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A dictionary of data used for creating new packages | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V2ItemsDiscontinuePost200Response v2_packages_create_post(license_number, v2_packages_create_post_request_inner, submit=submit)
Create one or more packages from existing active packages
Refer to the request body schema for details on formatting your request
- Bearer (JWT) Authentication (BearerAuth):
import t3api
from t3api.models.v2_items_discontinue_post200_response import V2ItemsDiscontinuePost200Response
from t3api.models.v2_packages_create_post_request_inner import V2PackagesCreatePostRequestInner
from t3api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trackandtrace.tools
# See configuration.py for a list of all supported configuration parameters.
configuration = t3api.Configuration(
host = "https://api.trackandtrace.tools"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = t3api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with t3api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = t3api.PackagesApi(api_client)
license_number = 'LIC-00001' # str | The unique identifier for the license associated with this request.
v2_packages_create_post_request_inner = [t3api.V2PackagesCreatePostRequestInner()] # List[V2PackagesCreatePostRequestInner] |
submit = 'true' # str | Controls whether this request should be forwarded to Metrc. - **If present and set to 'true'**: The request will be validated and forwarded to Metrc if validation passes. - **If omitted or set to any value other than 'true'**: The request will only be validated. Examples: - \"true\": Forward the request to Metrc - \"false\": Execute a dry run (optional)
try:
# Create one or more packages from existing active packages
api_response = api_instance.v2_packages_create_post(license_number, v2_packages_create_post_request_inner, submit=submit)
print("The response of PackagesApi->v2_packages_create_post:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PackagesApi->v2_packages_create_post: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| license_number | str | The unique identifier for the license associated with this request. | |
| v2_packages_create_post_request_inner | List[V2PackagesCreatePostRequestInner] | ||
| submit | str | Controls whether this request should be forwarded to Metrc. - If present and set to 'true': The request will be validated and forwarded to Metrc if validation passes. - If omitted or set to any value other than 'true': The request will only be validated. Examples: - "true": Forward the request to Metrc - "false": Execute a dry run | [optional] |
V2ItemsDiscontinuePost200Response
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | The operation completed successfully. | - |
| 400 | An error response indicating the request was invalid. Refer to the response body for details. | - |
| 500 | An error response indicating the server experienced an unexpected error. | - |
| 503 | An error response indicating the Metrc servers are experiencing downtime. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V2ItemsGet200Response v2_packages_create_source_items_get(license_number, page=page, page_size=page_size, strict_pagination=strict_pagination, sort=sort, filter_logic=filter_logic, filter=filter)
List of items eligible to be used in creating new packages
- Bearer (JWT) Authentication (BearerAuth):
import t3api
from t3api.models.v2_items_get200_response import V2ItemsGet200Response
from t3api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trackandtrace.tools
# See configuration.py for a list of all supported configuration parameters.
configuration = t3api.Configuration(
host = "https://api.trackandtrace.tools"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = t3api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with t3api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = t3api.PackagesApi(api_client)
license_number = 'LIC-00001' # str | The unique identifier for the license associated with this request.
page = 1 # int | The index of the page to be returned. (optional) (default to 1)
page_size = 100 # int | The number of objects per page to be returned. (optional) (default to 100)
strict_pagination = False # bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. (optional) (default to False)
sort = 'label:asc' # str | Defines the collection sort order. (optional)
filter_logic = and # str | Describes how the filters, if any, should be applied (optional) (default to and)
filter = ['label__endswith:0003'] # List[str] | One or more collection filters. (optional)
try:
# List of items eligible to be used in creating new packages
api_response = api_instance.v2_packages_create_source_items_get(license_number, page=page, page_size=page_size, strict_pagination=strict_pagination, sort=sort, filter_logic=filter_logic, filter=filter)
print("The response of PackagesApi->v2_packages_create_source_items_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PackagesApi->v2_packages_create_source_items_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| license_number | str | The unique identifier for the license associated with this request. | |
| page | int | The index of the page to be returned. | [optional] [default to 1] |
| page_size | int | The number of objects per page to be returned. | [optional] [default to 100] |
| strict_pagination | bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. | [optional] [default to False] |
| sort | str | Defines the collection sort order. | [optional] |
| filter_logic | str | Describes how the filters, if any, should be applied | [optional] [default to and] |
| filter | List[str] | One or more collection filters. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A list of eligible items for this license | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V2PackagesActiveGet200Response v2_packages_create_source_packages_get(license_number, page=page, page_size=page_size, strict_pagination=strict_pagination, sort=sort, filter_logic=filter_logic, filter=filter)
List of packages eligible to be used in creating new packages
- Bearer (JWT) Authentication (BearerAuth):
import t3api
from t3api.models.v2_packages_active_get200_response import V2PackagesActiveGet200Response
from t3api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trackandtrace.tools
# See configuration.py for a list of all supported configuration parameters.
configuration = t3api.Configuration(
host = "https://api.trackandtrace.tools"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = t3api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with t3api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = t3api.PackagesApi(api_client)
license_number = 'LIC-00001' # str | The unique identifier for the license associated with this request.
page = 1 # int | The index of the page to be returned. (optional) (default to 1)
page_size = 100 # int | The number of objects per page to be returned. (optional) (default to 100)
strict_pagination = False # bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. (optional) (default to False)
sort = 'label:asc' # str | Defines the collection sort order. (optional)
filter_logic = and # str | Describes how the filters, if any, should be applied (optional) (default to and)
filter = ['label__endswith:0003'] # List[str] | One or more collection filters. (optional)
try:
# List of packages eligible to be used in creating new packages
api_response = api_instance.v2_packages_create_source_packages_get(license_number, page=page, page_size=page_size, strict_pagination=strict_pagination, sort=sort, filter_logic=filter_logic, filter=filter)
print("The response of PackagesApi->v2_packages_create_source_packages_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PackagesApi->v2_packages_create_source_packages_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| license_number | str | The unique identifier for the license associated with this request. | |
| page | int | The index of the page to be returned. | [optional] [default to 1] |
| page_size | int | The number of objects per page to be returned. | [optional] [default to 100] |
| strict_pagination | bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. | [optional] [default to False] |
| sort | str | Defines the collection sort order. | [optional] |
| filter_logic | str | Describes how the filters, if any, should be applied | [optional] [default to and] |
| filter | List[str] | One or more collection filters. | [optional] |
V2PackagesActiveGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A list of eligible packages for this license | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V2ItemsHistoryGet200Response v2_packages_history_get(license_number, package_id, page=page, page_size=page_size, strict_pagination=strict_pagination, sort=sort, filter_logic=filter_logic, filter=filter)
List of package history objects for a single package
- Bearer (JWT) Authentication (BearerAuth):
import t3api
from t3api.models.v2_items_history_get200_response import V2ItemsHistoryGet200Response
from t3api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trackandtrace.tools
# See configuration.py for a list of all supported configuration parameters.
configuration = t3api.Configuration(
host = "https://api.trackandtrace.tools"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = t3api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with t3api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = t3api.PackagesApi(api_client)
license_number = 'LIC-00001' # str | The unique identifier for the license associated with this request.
package_id = 123 # float | ID of the target package
page = 1 # int | The index of the page to be returned. (optional) (default to 1)
page_size = 100 # int | The number of objects per page to be returned. (optional) (default to 100)
strict_pagination = False # bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. (optional) (default to False)
sort = 'label:asc' # str | Defines the collection sort order. (optional)
filter_logic = and # str | Describes how the filters, if any, should be applied (optional) (default to and)
filter = ['label__endswith:0003'] # List[str] | One or more collection filters. (optional)
try:
# List of package history objects for a single package
api_response = api_instance.v2_packages_history_get(license_number, package_id, page=page, page_size=page_size, strict_pagination=strict_pagination, sort=sort, filter_logic=filter_logic, filter=filter)
print("The response of PackagesApi->v2_packages_history_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PackagesApi->v2_packages_history_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| license_number | str | The unique identifier for the license associated with this request. | |
| package_id | float | ID of the target package | |
| page | int | The index of the page to be returned. | [optional] [default to 1] |
| page_size | int | The number of objects per page to be returned. | [optional] [default to 100] |
| strict_pagination | bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. | [optional] [default to False] |
| sort | str | Defines the collection sort order. | [optional] |
| filter_logic | str | Describes how the filters, if any, should be applied | [optional] [default to and] |
| filter | List[str] | One or more collection filters. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A list of history objects for the specified package. | - |
| 404 | The package with id={packageId} was not found in the specified license | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V2PackagesActiveGet200Response v2_packages_inactive_get(license_number, page=page, page_size=page_size, strict_pagination=strict_pagination, sort=sort, filter_logic=filter_logic, filter=filter)
List of inactive packages
- Bearer (JWT) Authentication (BearerAuth):
import t3api
from t3api.models.v2_packages_active_get200_response import V2PackagesActiveGet200Response
from t3api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trackandtrace.tools
# See configuration.py for a list of all supported configuration parameters.
configuration = t3api.Configuration(
host = "https://api.trackandtrace.tools"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = t3api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with t3api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = t3api.PackagesApi(api_client)
license_number = 'LIC-00001' # str | The unique identifier for the license associated with this request.
page = 1 # int | The index of the page to be returned. (optional) (default to 1)
page_size = 100 # int | The number of objects per page to be returned. (optional) (default to 100)
strict_pagination = False # bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. (optional) (default to False)
sort = 'label:asc' # str | Defines the collection sort order. (optional)
filter_logic = and # str | Describes how the filters, if any, should be applied (optional) (default to and)
filter = ['label__endswith:0003'] # List[str] | One or more collection filters. (optional)
try:
# List of inactive packages
api_response = api_instance.v2_packages_inactive_get(license_number, page=page, page_size=page_size, strict_pagination=strict_pagination, sort=sort, filter_logic=filter_logic, filter=filter)
print("The response of PackagesApi->v2_packages_inactive_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PackagesApi->v2_packages_inactive_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| license_number | str | The unique identifier for the license associated with this request. | |
| page | int | The index of the page to be returned. | [optional] [default to 1] |
| page_size | int | The number of objects per page to be returned. | [optional] [default to 100] |
| strict_pagination | bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. | [optional] [default to False] |
| sort | str | Defines the collection sort order. | [optional] |
| filter_logic | str | Describes how the filters, if any, should be applied | [optional] [default to and] |
| filter | List[str] | One or more collection filters. | [optional] |
V2PackagesActiveGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A list of inactive packages for this license | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V2PackagesActiveGet200Response v2_packages_intransit_get(license_number, page=page, page_size=page_size, strict_pagination=strict_pagination, sort=sort, filter_logic=filter_logic, filter=filter)
List of in transit packages
- Bearer (JWT) Authentication (BearerAuth):
import t3api
from t3api.models.v2_packages_active_get200_response import V2PackagesActiveGet200Response
from t3api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trackandtrace.tools
# See configuration.py for a list of all supported configuration parameters.
configuration = t3api.Configuration(
host = "https://api.trackandtrace.tools"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = t3api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with t3api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = t3api.PackagesApi(api_client)
license_number = 'LIC-00001' # str | The unique identifier for the license associated with this request.
page = 1 # int | The index of the page to be returned. (optional) (default to 1)
page_size = 100 # int | The number of objects per page to be returned. (optional) (default to 100)
strict_pagination = False # bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. (optional) (default to False)
sort = 'label:asc' # str | Defines the collection sort order. (optional)
filter_logic = and # str | Describes how the filters, if any, should be applied (optional) (default to and)
filter = ['label__endswith:0003'] # List[str] | One or more collection filters. (optional)
try:
# List of in transit packages
api_response = api_instance.v2_packages_intransit_get(license_number, page=page, page_size=page_size, strict_pagination=strict_pagination, sort=sort, filter_logic=filter_logic, filter=filter)
print("The response of PackagesApi->v2_packages_intransit_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PackagesApi->v2_packages_intransit_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| license_number | str | The unique identifier for the license associated with this request. | |
| page | int | The index of the page to be returned. | [optional] [default to 1] |
| page_size | int | The number of objects per page to be returned. | [optional] [default to 100] |
| strict_pagination | bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. | [optional] [default to False] |
| sort | str | Defines the collection sort order. | [optional] |
| filter_logic | str | Describes how the filters, if any, should be applied | [optional] [default to and] |
| filter | List[str] | One or more collection filters. | [optional] |
V2PackagesActiveGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A list of in transit packages for this license | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V2PackagesActiveReportGet200Response v2_packages_intransit_report_get(license_number, secret_key=secret_key, sort=sort, filter_logic=filter_logic, filter=filter, content_type=content_type, prepend_csv_metadata=prepend_csv_metadata, fieldnames=fieldnames)
Generate a report of all in-transit packages
Note: this endpoint supports secret key authentication.
- Bearer (JWT) Authentication (BearerAuth):
import t3api
from t3api.models.v2_packages_active_report_get200_response import V2PackagesActiveReportGet200Response
from t3api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trackandtrace.tools
# See configuration.py for a list of all supported configuration parameters.
configuration = t3api.Configuration(
host = "https://api.trackandtrace.tools"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = t3api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with t3api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = t3api.PackagesApi(api_client)
license_number = 'LIC-00001' # str | The unique identifier for the license associated with this request.
secret_key = '2616ec56-fa2a-4c5b-86c0-acacf23c9ef7' # str | Your secret key, if you wish to authenticate via query params. Secret keys can be manually generated [here](/v2/pages/secret-key). (optional)
sort = 'label:asc' # str | Defines the collection sort order. (optional)
filter_logic = and # str | Describes how the filters, if any, should be applied (optional) (default to and)
filter = ['label__endswith:0003'] # List[str] | One or more collection filters. (optional)
content_type = json # str | Specifies how the report should be formatted. Can be returned as json or csv. *This can also be defined in the Content-Type header* (optional) (default to json)
prepend_csv_metadata = true # str | Controls if the CSV header metadata should be included in the output. When set to false, only the column headers and data will be returned. (optional) (default to true)
fieldnames = 'label,locationName,item.name,quantity,unitOfMeasureAbbreviation' # str | Defines which package fields should appear in the report data. (optional) (default to 'label,locationName,item.name,quantity,unitOfMeasureAbbreviation')
try:
# Generate a report of all in-transit packages
api_response = api_instance.v2_packages_intransit_report_get(license_number, secret_key=secret_key, sort=sort, filter_logic=filter_logic, filter=filter, content_type=content_type, prepend_csv_metadata=prepend_csv_metadata, fieldnames=fieldnames)
print("The response of PackagesApi->v2_packages_intransit_report_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PackagesApi->v2_packages_intransit_report_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| license_number | str | The unique identifier for the license associated with this request. | |
| secret_key | str | Your secret key, if you wish to authenticate via query params. Secret keys can be manually generated here. | [optional] |
| sort | str | Defines the collection sort order. | [optional] |
| filter_logic | str | Describes how the filters, if any, should be applied | [optional] [default to and] |
| filter | List[str] | One or more collection filters. | [optional] |
| content_type | str | Specifies how the report should be formatted. Can be returned as json or csv. This can also be defined in the Content-Type header | [optional] [default to json] |
| prepend_csv_metadata | str | Controls if the CSV header metadata should be included in the output. When set to false, only the column headers and data will be returned. | [optional] [default to true] |
| fieldnames | str | Defines which package fields should appear in the report data. | [optional] [default to 'label,locationName,item.name,quantity,unitOfMeasureAbbreviation'] |
V2PackagesActiveReportGet200Response
- Content-Type: Not defined
- Accept: application/json, text/csv
| Status code | Description | Response headers |
|---|---|---|
| 200 | A list of in-transit packages for this license | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V2PackagesActiveSuperGet200Response v2_packages_intransit_super_get(license_number, page=page, page_size=page_size, sort=sort, filter=filter, filter_logic=filter_logic, strict_pagination=strict_pagination, include=include)
List of intransit superpackages. Additional metadata can be added using the include param.
- Bearer (JWT) Authentication (BearerAuth):
import t3api
from t3api.models.v2_packages_active_super_get200_response import V2PackagesActiveSuperGet200Response
from t3api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trackandtrace.tools
# See configuration.py for a list of all supported configuration parameters.
configuration = t3api.Configuration(
host = "https://api.trackandtrace.tools"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = t3api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with t3api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = t3api.PackagesApi(api_client)
license_number = 'LIC-00001' # str | The unique identifier for the license associated with this request.
page = 1 # int | The index of the page to be returned. (optional) (default to 1)
page_size = 100 # int | The number of objects per page to be returned. (optional) (default to 100)
sort = 'label:asc' # str | Defines the collection sort order. (optional)
filter = ['label__endswith:0003'] # List[str] | One or more collection filters. (optional)
filter_logic = and # str | Describes how the filters, if any, should be applied (optional) (default to and)
strict_pagination = False # bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. (optional) (default to False)
include = ['sourceHarvests'] # List[str] | One or more superpackage mixins. Each mixin will include the raw data from Metrc, but also will populate the extracted metadata. - labResults Extracted metadata: - extractedLabResults - testSamplePackageLabels - labResultBatches Extracted metadata: - extractedLabResults - testSamplePackageLabels - sourceHarvests Extracted metadata: - harvestDates - history Extracted metadata: - initialQuantity - coaFiles (not yet supported) Extracted metadata: - extractedLabResults (optional)
try:
# List of intransit superpackages. Additional metadata can be added using the `include` param.
api_response = api_instance.v2_packages_intransit_super_get(license_number, page=page, page_size=page_size, sort=sort, filter=filter, filter_logic=filter_logic, strict_pagination=strict_pagination, include=include)
print("The response of PackagesApi->v2_packages_intransit_super_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PackagesApi->v2_packages_intransit_super_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| license_number | str | The unique identifier for the license associated with this request. | |
| page | int | The index of the page to be returned. | [optional] [default to 1] |
| page_size | int | The number of objects per page to be returned. | [optional] [default to 100] |
| sort | str | Defines the collection sort order. | [optional] |
| filter | List[str] | One or more collection filters. | [optional] |
| filter_logic | str | Describes how the filters, if any, should be applied | [optional] [default to and] |
| strict_pagination | bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. | [optional] [default to False] |
| include | List[str] | One or more superpackage mixins. Each mixin will include the raw data from Metrc, but also will populate the extracted metadata. - labResults Extracted metadata: - extractedLabResults - testSamplePackageLabels - labResultBatches Extracted metadata: - extractedLabResults - testSamplePackageLabels - sourceHarvests Extracted metadata: - harvestDates - history Extracted metadata: - initialQuantity - coaFiles (not yet supported) Extracted metadata: - extractedLabResults | [optional] |
V2PackagesActiveSuperGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A list of intransit superpackages for this license | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V2PackagesLabresultBatchesGet200Response v2_packages_labresult_batches_get(license_number, package_id, page=page, page_size=page_size, strict_pagination=strict_pagination, sort=sort, filter_logic=filter_logic, filter=filter)
List of package lab result batch objects for a single package
- Bearer (JWT) Authentication (BearerAuth):
import t3api
from t3api.models.v2_packages_labresult_batches_get200_response import V2PackagesLabresultBatchesGet200Response
from t3api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trackandtrace.tools
# See configuration.py for a list of all supported configuration parameters.
configuration = t3api.Configuration(
host = "https://api.trackandtrace.tools"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = t3api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with t3api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = t3api.PackagesApi(api_client)
license_number = 'LIC-00001' # str | The unique identifier for the license associated with this request.
package_id = 123 # float | ID of the target package
page = 1 # int | The index of the page to be returned. (optional) (default to 1)
page_size = 100 # int | The number of objects per page to be returned. (optional) (default to 100)
strict_pagination = False # bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. (optional) (default to False)
sort = 'label:asc' # str | Defines the collection sort order. (optional)
filter_logic = and # str | Describes how the filters, if any, should be applied (optional) (default to and)
filter = ['label__endswith:0003'] # List[str] | One or more collection filters. (optional)
try:
# List of package lab result batch objects for a single package
api_response = api_instance.v2_packages_labresult_batches_get(license_number, package_id, page=page, page_size=page_size, strict_pagination=strict_pagination, sort=sort, filter_logic=filter_logic, filter=filter)
print("The response of PackagesApi->v2_packages_labresult_batches_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PackagesApi->v2_packages_labresult_batches_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| license_number | str | The unique identifier for the license associated with this request. | |
| package_id | float | ID of the target package | |
| page | int | The index of the page to be returned. | [optional] [default to 1] |
| page_size | int | The number of objects per page to be returned. | [optional] [default to 100] |
| strict_pagination | bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. | [optional] [default to False] |
| sort | str | Defines the collection sort order. | [optional] |
| filter_logic | str | Describes how the filters, if any, should be applied | [optional] [default to and] |
| filter | List[str] | One or more collection filters. | [optional] |
V2PackagesLabresultBatchesGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A list of package lab result batch objects for the specified package. | - |
| 404 | The package with id={packageId} was not found in the specified license | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bytearray v2_packages_labresults_document_get(license_number, package_id, lab_test_result_document_file_id)
Get the COA PDF for a lab result.
NOTE: A single package might have hundreds of lab results, but most will share just one or two lab test result document IDs.
- Bearer (JWT) Authentication (BearerAuth):
import t3api
from t3api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trackandtrace.tools
# See configuration.py for a list of all supported configuration parameters.
configuration = t3api.Configuration(
host = "https://api.trackandtrace.tools"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = t3api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with t3api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = t3api.PackagesApi(api_client)
license_number = 'LIC-00001' # str | The unique identifier for the license associated with this request.
package_id = 123 # float | ID of the target package
lab_test_result_document_file_id = 123 # float | ID of the target lab result
try:
# Get the COA PDF for a lab result.
api_response = api_instance.v2_packages_labresults_document_get(license_number, package_id, lab_test_result_document_file_id)
print("The response of PackagesApi->v2_packages_labresults_document_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PackagesApi->v2_packages_labresults_document_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| license_number | str | The unique identifier for the license associated with this request. | |
| package_id | float | ID of the target package | |
| lab_test_result_document_file_id | float | ID of the target lab result |
bytearray
- Content-Type: Not defined
- Accept: application/pdf
| Status code | Description | Response headers |
|---|---|---|
| 200 | PDF of the lab result COA | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V2PackagesLabresultsGet200Response v2_packages_labresults_get(license_number, package_id, page=page, page_size=page_size, strict_pagination=strict_pagination, sort=sort, filter_logic=filter_logic, filter=filter)
List of package lab result objects for a single package
- Bearer (JWT) Authentication (BearerAuth):
import t3api
from t3api.models.v2_packages_labresults_get200_response import V2PackagesLabresultsGet200Response
from t3api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trackandtrace.tools
# See configuration.py for a list of all supported configuration parameters.
configuration = t3api.Configuration(
host = "https://api.trackandtrace.tools"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = t3api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with t3api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = t3api.PackagesApi(api_client)
license_number = 'LIC-00001' # str | The unique identifier for the license associated with this request.
package_id = 123 # float | ID of the target package
page = 1 # int | The index of the page to be returned. (optional) (default to 1)
page_size = 100 # int | The number of objects per page to be returned. (optional) (default to 100)
strict_pagination = False # bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. (optional) (default to False)
sort = 'label:asc' # str | Defines the collection sort order. (optional)
filter_logic = and # str | Describes how the filters, if any, should be applied (optional) (default to and)
filter = ['label__endswith:0003'] # List[str] | One or more collection filters. (optional)
try:
# List of package lab result objects for a single package
api_response = api_instance.v2_packages_labresults_get(license_number, package_id, page=page, page_size=page_size, strict_pagination=strict_pagination, sort=sort, filter_logic=filter_logic, filter=filter)
print("The response of PackagesApi->v2_packages_labresults_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PackagesApi->v2_packages_labresults_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| license_number | str | The unique identifier for the license associated with this request. | |
| package_id | float | ID of the target package | |
| page | int | The index of the page to be returned. | [optional] [default to 1] |
| page_size | int | The number of objects per page to be returned. | [optional] [default to 100] |
| strict_pagination | bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. | [optional] [default to False] |
| sort | str | Defines the collection sort order. | [optional] |
| filter_logic | str | Describes how the filters, if any, should be applied | [optional] [default to and] |
| filter | List[str] | One or more collection filters. | [optional] |
V2PackagesLabresultsGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A list of package lab result objects for the specified package. | - |
| 404 | The package with id={packageId} was not found in the specified license | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V2ItemsDiscontinuePost200Response v2_packages_notes_post(license_number, v2_packages_notes_post_request_inner, submit=submit)
Add notes to packages
- Bearer (JWT) Authentication (BearerAuth):
import t3api
from t3api.models.v2_items_discontinue_post200_response import V2ItemsDiscontinuePost200Response
from t3api.models.v2_packages_notes_post_request_inner import V2PackagesNotesPostRequestInner
from t3api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trackandtrace.tools
# See configuration.py for a list of all supported configuration parameters.
configuration = t3api.Configuration(
host = "https://api.trackandtrace.tools"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = t3api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with t3api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = t3api.PackagesApi(api_client)
license_number = 'LIC-00001' # str | The unique identifier for the license associated with this request.
v2_packages_notes_post_request_inner = [t3api.V2PackagesNotesPostRequestInner()] # List[V2PackagesNotesPostRequestInner] |
submit = 'true' # str | Controls whether this request should be forwarded to Metrc. - **If present and set to 'true'**: The request will be validated and forwarded to Metrc if validation passes. - **If omitted or set to any value other than 'true'**: The request will only be validated. Examples: - \"true\": Forward the request to Metrc - \"false\": Execute a dry run (optional)
try:
# Add notes to packages
api_response = api_instance.v2_packages_notes_post(license_number, v2_packages_notes_post_request_inner, submit=submit)
print("The response of PackagesApi->v2_packages_notes_post:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PackagesApi->v2_packages_notes_post: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| license_number | str | The unique identifier for the license associated with this request. | |
| v2_packages_notes_post_request_inner | List[V2PackagesNotesPostRequestInner] | ||
| submit | str | Controls whether this request should be forwarded to Metrc. - If present and set to 'true': The request will be validated and forwarded to Metrc if validation passes. - If omitted or set to any value other than 'true': The request will only be validated. Examples: - "true": Forward the request to Metrc - "false": Execute a dry run | [optional] |
V2ItemsDiscontinuePost200Response
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | The operation completed successfully. | - |
| 400 | An error response indicating the request was invalid. Refer to the response body for details. | - |
| 500 | An error response indicating the server experienced an unexpected error. | - |
| 503 | An error response indicating the Metrc servers are experiencing downtime. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V2PackagesActiveGet200Response v2_packages_onhold_get(license_number, page=page, page_size=page_size, strict_pagination=strict_pagination, sort=sort, filter_logic=filter_logic, filter=filter)
List of on hold packages
- Bearer (JWT) Authentication (BearerAuth):
import t3api
from t3api.models.v2_packages_active_get200_response import V2PackagesActiveGet200Response
from t3api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trackandtrace.tools
# See configuration.py for a list of all supported configuration parameters.
configuration = t3api.Configuration(
host = "https://api.trackandtrace.tools"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = t3api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with t3api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = t3api.PackagesApi(api_client)
license_number = 'LIC-00001' # str | The unique identifier for the license associated with this request.
page = 1 # int | The index of the page to be returned. (optional) (default to 1)
page_size = 100 # int | The number of objects per page to be returned. (optional) (default to 100)
strict_pagination = False # bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. (optional) (default to False)
sort = 'label:asc' # str | Defines the collection sort order. (optional)
filter_logic = and # str | Describes how the filters, if any, should be applied (optional) (default to and)
filter = ['label__endswith:0003'] # List[str] | One or more collection filters. (optional)
try:
# List of on hold packages
api_response = api_instance.v2_packages_onhold_get(license_number, page=page, page_size=page_size, strict_pagination=strict_pagination, sort=sort, filter_logic=filter_logic, filter=filter)
print("The response of PackagesApi->v2_packages_onhold_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PackagesApi->v2_packages_onhold_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| license_number | str | The unique identifier for the license associated with this request. | |
| page | int | The index of the page to be returned. | [optional] [default to 1] |
| page_size | int | The number of objects per page to be returned. | [optional] [default to 100] |
| strict_pagination | bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. | [optional] [default to False] |
| sort | str | Defines the collection sort order. | [optional] |
| filter_logic | str | Describes how the filters, if any, should be applied | [optional] [default to and] |
| filter | List[str] | One or more collection filters. | [optional] |
V2PackagesActiveGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A list of on hold packages for this license | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V2PackagesSourceHarvestsGet200Response v2_packages_source_harvests_get(license_number, package_id, page=page, page_size=page_size, strict_pagination=strict_pagination, sort=sort, filter_logic=filter_logic, filter=filter)
List of package source harvest objects for a single package
- Bearer (JWT) Authentication (BearerAuth):
import t3api
from t3api.models.v2_packages_source_harvests_get200_response import V2PackagesSourceHarvestsGet200Response
from t3api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trackandtrace.tools
# See configuration.py for a list of all supported configuration parameters.
configuration = t3api.Configuration(
host = "https://api.trackandtrace.tools"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = t3api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with t3api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = t3api.PackagesApi(api_client)
license_number = 'LIC-00001' # str | The unique identifier for the license associated with this request.
package_id = 123 # float | ID of the target package
page = 1 # int | The index of the page to be returned. (optional) (default to 1)
page_size = 100 # int | The number of objects per page to be returned. (optional) (default to 100)
strict_pagination = False # bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. (optional) (default to False)
sort = 'label:asc' # str | Defines the collection sort order. (optional)
filter_logic = and # str | Describes how the filters, if any, should be applied (optional) (default to and)
filter = ['label__endswith:0003'] # List[str] | One or more collection filters. (optional)
try:
# List of package source harvest objects for a single package
api_response = api_instance.v2_packages_source_harvests_get(license_number, package_id, page=page, page_size=page_size, strict_pagination=strict_pagination, sort=sort, filter_logic=filter_logic, filter=filter)
print("The response of PackagesApi->v2_packages_source_harvests_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PackagesApi->v2_packages_source_harvests_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| license_number | str | The unique identifier for the license associated with this request. | |
| package_id | float | ID of the target package | |
| page | int | The index of the page to be returned. | [optional] [default to 1] |
| page_size | int | The number of objects per page to be returned. | [optional] [default to 100] |
| strict_pagination | bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. | [optional] [default to False] |
| sort | str | Defines the collection sort order. | [optional] |
| filter_logic | str | Describes how the filters, if any, should be applied | [optional] [default to and] |
| filter | List[str] | One or more collection filters. | [optional] |
V2PackagesSourceHarvestsGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A list of source harvest objects for the specified package. | - |
| 404 | The package with id={packageId} was not found in the specified license | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V2PackagesTransferredGet200Response v2_packages_transferred_get(license_number, page=page, page_size=page_size, strict_pagination=strict_pagination, sort=sort, filter_logic=filter_logic, filter=filter)
List of transferred packages
Note: this return type is different from the other package endpoints
- Bearer (JWT) Authentication (BearerAuth):
import t3api
from t3api.models.v2_packages_transferred_get200_response import V2PackagesTransferredGet200Response
from t3api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trackandtrace.tools
# See configuration.py for a list of all supported configuration parameters.
configuration = t3api.Configuration(
host = "https://api.trackandtrace.tools"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = t3api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with t3api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = t3api.PackagesApi(api_client)
license_number = 'LIC-00001' # str | The unique identifier for the license associated with this request.
page = 1 # int | The index of the page to be returned. (optional) (default to 1)
page_size = 100 # int | The number of objects per page to be returned. (optional) (default to 100)
strict_pagination = False # bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. (optional) (default to False)
sort = 'label:asc' # str | Defines the collection sort order. (optional)
filter_logic = and # str | Describes how the filters, if any, should be applied (optional) (default to and)
filter = ['label__endswith:0003'] # List[str] | One or more collection filters. (optional)
try:
# List of transferred packages
api_response = api_instance.v2_packages_transferred_get(license_number, page=page, page_size=page_size, strict_pagination=strict_pagination, sort=sort, filter_logic=filter_logic, filter=filter)
print("The response of PackagesApi->v2_packages_transferred_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PackagesApi->v2_packages_transferred_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| license_number | str | The unique identifier for the license associated with this request. | |
| page | int | The index of the page to be returned. | [optional] [default to 1] |
| page_size | int | The number of objects per page to be returned. | [optional] [default to 100] |
| strict_pagination | bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. | [optional] [default to False] |
| sort | str | Defines the collection sort order. | [optional] |
| filter_logic | str | Describes how the filters, if any, should be applied | [optional] [default to and] |
| filter | List[str] | One or more collection filters. | [optional] |
V2PackagesTransferredGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A list of transferred packages for this license | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V2PackagesTransferredReportGet200Response v2_packages_transferred_report_get(license_number, secret_key=secret_key, sort=sort, filter_logic=filter_logic, filter=filter, content_type=content_type, prepend_csv_metadata=prepend_csv_metadata, fieldnames=fieldnames)
Generate a report of all transferred packages
Note: this endpoint supports secret key authentication.
- Bearer (JWT) Authentication (BearerAuth):
import t3api
from t3api.models.v2_packages_transferred_report_get200_response import V2PackagesTransferredReportGet200Response
from t3api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trackandtrace.tools
# See configuration.py for a list of all supported configuration parameters.
configuration = t3api.Configuration(
host = "https://api.trackandtrace.tools"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = t3api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with t3api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = t3api.PackagesApi(api_client)
license_number = 'LIC-00001' # str | The unique identifier for the license associated with this request.
secret_key = '2616ec56-fa2a-4c5b-86c0-acacf23c9ef7' # str | Your secret key, if you wish to authenticate via query params. Secret keys can be manually generated [here](/v2/pages/secret-key). (optional)
sort = 'label:asc' # str | Defines the collection sort order. (optional)
filter_logic = and # str | Describes how the filters, if any, should be applied (optional) (default to and)
filter = ['label__endswith:0003'] # List[str] | One or more collection filters. (optional)
content_type = json # str | Specifies how the report should be formatted. Can be returned as json or csv. *This can also be defined in the Content-Type header* (optional) (default to json)
prepend_csv_metadata = true # str | Controls if the CSV header metadata should be included in the output. When set to false, only the column headers and data will be returned. (optional) (default to true)
fieldnames = 'manifestNumber,packageLabel,productName,shippedQuantity,shippedUnitOfMeasureAbbreviation,shipperWholesalePrice' # str | Defines which package fields should appear in the report data. (optional) (default to 'manifestNumber,packageLabel,productName,shippedQuantity,shippedUnitOfMeasureAbbreviation,shipperWholesalePrice')
try:
# Generate a report of all transferred packages
api_response = api_instance.v2_packages_transferred_report_get(license_number, secret_key=secret_key, sort=sort, filter_logic=filter_logic, filter=filter, content_type=content_type, prepend_csv_metadata=prepend_csv_metadata, fieldnames=fieldnames)
print("The response of PackagesApi->v2_packages_transferred_report_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PackagesApi->v2_packages_transferred_report_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| license_number | str | The unique identifier for the license associated with this request. | |
| secret_key | str | Your secret key, if you wish to authenticate via query params. Secret keys can be manually generated here. | [optional] |
| sort | str | Defines the collection sort order. | [optional] |
| filter_logic | str | Describes how the filters, if any, should be applied | [optional] [default to and] |
| filter | List[str] | One or more collection filters. | [optional] |
| content_type | str | Specifies how the report should be formatted. Can be returned as json or csv. This can also be defined in the Content-Type header | [optional] [default to json] |
| prepend_csv_metadata | str | Controls if the CSV header metadata should be included in the output. When set to false, only the column headers and data will be returned. | [optional] [default to true] |
| fieldnames | str | Defines which package fields should appear in the report data. | [optional] [default to 'manifestNumber,packageLabel,productName,shippedQuantity,shippedUnitOfMeasureAbbreviation,shipperWholesalePrice'] |
V2PackagesTransferredReportGet200Response
- Content-Type: Not defined
- Accept: application/json, text/csv
| Status code | Description | Response headers |
|---|---|---|
| 200 | A list of transferred packages for this license | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V2ItemsDiscontinuePost200Response v2_packages_unfinish_post(license_number, v2_packages_unfinish_post_request_inner, submit=submit)
Unfinish packages
- Bearer (JWT) Authentication (BearerAuth):
import t3api
from t3api.models.v2_items_discontinue_post200_response import V2ItemsDiscontinuePost200Response
from t3api.models.v2_packages_unfinish_post_request_inner import V2PackagesUnfinishPostRequestInner
from t3api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trackandtrace.tools
# See configuration.py for a list of all supported configuration parameters.
configuration = t3api.Configuration(
host = "https://api.trackandtrace.tools"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = t3api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with t3api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = t3api.PackagesApi(api_client)
license_number = 'LIC-00001' # str | The unique identifier for the license associated with this request.
v2_packages_unfinish_post_request_inner = [t3api.V2PackagesUnfinishPostRequestInner()] # List[V2PackagesUnfinishPostRequestInner] |
submit = 'true' # str | Controls whether this request should be forwarded to Metrc. - **If present and set to 'true'**: The request will be validated and forwarded to Metrc if validation passes. - **If omitted or set to any value other than 'true'**: The request will only be validated. Examples: - \"true\": Forward the request to Metrc - \"false\": Execute a dry run (optional)
try:
# Unfinish packages
api_response = api_instance.v2_packages_unfinish_post(license_number, v2_packages_unfinish_post_request_inner, submit=submit)
print("The response of PackagesApi->v2_packages_unfinish_post:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PackagesApi->v2_packages_unfinish_post: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| license_number | str | The unique identifier for the license associated with this request. | |
| v2_packages_unfinish_post_request_inner | List[V2PackagesUnfinishPostRequestInner] | ||
| submit | str | Controls whether this request should be forwarded to Metrc. - If present and set to 'true': The request will be validated and forwarded to Metrc if validation passes. - If omitted or set to any value other than 'true': The request will only be validated. Examples: - "true": Forward the request to Metrc - "false": Execute a dry run | [optional] |
V2ItemsDiscontinuePost200Response
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | The operation completed successfully. | - |
| 400 | An error response indicating the request was invalid. Refer to the response body for details. | - |
| 500 | An error response indicating the server experienced an unexpected error. | - |
| 503 | An error response indicating the Metrc servers are experiencing downtime. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V2TransfersCreateDestinationsGet200Response v2_transfers_create_destinations_get(license_number, page=page, page_size=page_size, strict_pagination=strict_pagination, sort=sort, filter_logic=filter_logic, filter=filter)
List of destination facilities eligible to be used in creating new transfers
- Bearer (JWT) Authentication (BearerAuth):
import t3api
from t3api.models.v2_transfers_create_destinations_get200_response import V2TransfersCreateDestinationsGet200Response
from t3api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trackandtrace.tools
# See configuration.py for a list of all supported configuration parameters.
configuration = t3api.Configuration(
host = "https://api.trackandtrace.tools"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = t3api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with t3api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = t3api.PackagesApi(api_client)
license_number = 'LIC-00001' # str | The unique identifier for the license associated with this request.
page = 1 # int | The index of the page to be returned. (optional) (default to 1)
page_size = 100 # int | The number of objects per page to be returned. (optional) (default to 100)
strict_pagination = False # bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. (optional) (default to False)
sort = 'label:asc' # str | Defines the collection sort order. (optional)
filter_logic = and # str | Describes how the filters, if any, should be applied (optional) (default to and)
filter = ['label__endswith:0003'] # List[str] | One or more collection filters. (optional)
try:
# List of destination facilities eligible to be used in creating new transfers
api_response = api_instance.v2_transfers_create_destinations_get(license_number, page=page, page_size=page_size, strict_pagination=strict_pagination, sort=sort, filter_logic=filter_logic, filter=filter)
print("The response of PackagesApi->v2_transfers_create_destinations_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PackagesApi->v2_transfers_create_destinations_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| license_number | str | The unique identifier for the license associated with this request. | |
| page | int | The index of the page to be returned. | [optional] [default to 1] |
| page_size | int | The number of objects per page to be returned. | [optional] [default to 100] |
| strict_pagination | bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. | [optional] [default to False] |
| sort | str | Defines the collection sort order. | [optional] |
| filter_logic | str | Describes how the filters, if any, should be applied | [optional] [default to and] |
| filter | List[str] | One or more collection filters. | [optional] |
V2TransfersCreateDestinationsGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A list of eligible facilities for this license | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V2PackagesActiveGet200Response v2_transfers_create_packages_get(license_number, page=page, page_size=page_size, strict_pagination=strict_pagination, sort=sort, filter_logic=filter_logic, filter=filter)
List of packages eligible to be used in creating new transfers
- Bearer (JWT) Authentication (BearerAuth):
import t3api
from t3api.models.v2_packages_active_get200_response import V2PackagesActiveGet200Response
from t3api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trackandtrace.tools
# See configuration.py for a list of all supported configuration parameters.
configuration = t3api.Configuration(
host = "https://api.trackandtrace.tools"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = t3api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with t3api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = t3api.PackagesApi(api_client)
license_number = 'LIC-00001' # str | The unique identifier for the license associated with this request.
page = 1 # int | The index of the page to be returned. (optional) (default to 1)
page_size = 100 # int | The number of objects per page to be returned. (optional) (default to 100)
strict_pagination = False # bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. (optional) (default to False)
sort = 'label:asc' # str | Defines the collection sort order. (optional)
filter_logic = and # str | Describes how the filters, if any, should be applied (optional) (default to and)
filter = ['label__endswith:0003'] # List[str] | One or more collection filters. (optional)
try:
# List of packages eligible to be used in creating new transfers
api_response = api_instance.v2_transfers_create_packages_get(license_number, page=page, page_size=page_size, strict_pagination=strict_pagination, sort=sort, filter_logic=filter_logic, filter=filter)
print("The response of PackagesApi->v2_transfers_create_packages_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PackagesApi->v2_transfers_create_packages_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| license_number | str | The unique identifier for the license associated with this request. | |
| page | int | The index of the page to be returned. | [optional] [default to 1] |
| page_size | int | The number of objects per page to be returned. | [optional] [default to 100] |
| strict_pagination | bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. | [optional] [default to False] |
| sort | str | Defines the collection sort order. | [optional] |
| filter_logic | str | Describes how the filters, if any, should be applied | [optional] [default to and] |
| filter | List[str] | One or more collection filters. | [optional] |
V2PackagesActiveGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A list of eligible packages for this license | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V2TransfersCreateDestinationsGet200Response v2_transfers_create_transporters_get(license_number, page=page, page_size=page_size, strict_pagination=strict_pagination, sort=sort, filter_logic=filter_logic, filter=filter)
List of transporter facilities eligible to be used in creating new transfers
- Bearer (JWT) Authentication (BearerAuth):
import t3api
from t3api.models.v2_transfers_create_destinations_get200_response import V2TransfersCreateDestinationsGet200Response
from t3api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trackandtrace.tools
# See configuration.py for a list of all supported configuration parameters.
configuration = t3api.Configuration(
host = "https://api.trackandtrace.tools"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = t3api.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with t3api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = t3api.PackagesApi(api_client)
license_number = 'LIC-00001' # str | The unique identifier for the license associated with this request.
page = 1 # int | The index of the page to be returned. (optional) (default to 1)
page_size = 100 # int | The number of objects per page to be returned. (optional) (default to 100)
strict_pagination = False # bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. (optional) (default to False)
sort = 'label:asc' # str | Defines the collection sort order. (optional)
filter_logic = and # str | Describes how the filters, if any, should be applied (optional) (default to and)
filter = ['label__endswith:0003'] # List[str] | One or more collection filters. (optional)
try:
# List of transporter facilities eligible to be used in creating new transfers
api_response = api_instance.v2_transfers_create_transporters_get(license_number, page=page, page_size=page_size, strict_pagination=strict_pagination, sort=sort, filter_logic=filter_logic, filter=filter)
print("The response of PackagesApi->v2_transfers_create_transporters_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PackagesApi->v2_transfers_create_transporters_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| license_number | str | The unique identifier for the license associated with this request. | |
| page | int | The index of the page to be returned. | [optional] [default to 1] |
| page_size | int | The number of objects per page to be returned. | [optional] [default to 100] |
| strict_pagination | bool | Toggles strict pagination. Defaults to `false` (disabled) - If enabled, requesting an out of bounds page will throw a 400. - If disabled, requesting an out of bounds page will return a 200 and an empty page. | [optional] [default to False] |
| sort | str | Defines the collection sort order. | [optional] |
| filter_logic | str | Describes how the filters, if any, should be applied | [optional] [default to and] |
| filter | List[str] | One or more collection filters. | [optional] |
V2TransfersCreateDestinationsGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A list of eligible facilities for this license | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]