Skip to content

Latest commit

 

History

History
178 lines (126 loc) · 8.35 KB

File metadata and controls

178 lines (126 loc) · 8.35 KB

t3api.ModifyPackagesApi

All URIs are relative to https://api.trackandtrace.tools

Method HTTP request Description
v2_packages_notes_post POST /v2/packages/notes Add notes to packages
v2_packages_unfinish_post POST /v2/packages/unfinish Unfinish packages

v2_packages_notes_post

V2ItemsDiscontinuePost200Response v2_packages_notes_post(license_number, v2_packages_notes_post_request_inner, submit=submit)

Add notes to packages

Example

  • 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.ModifyPackagesApi(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 ModifyPackagesApi->v2_packages_notes_post:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ModifyPackagesApi->v2_packages_notes_post: %s\n" % e)

Parameters

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]

Return type

V2ItemsDiscontinuePost200Response

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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]

v2_packages_unfinish_post

V2ItemsDiscontinuePost200Response v2_packages_unfinish_post(license_number, v2_packages_unfinish_post_request_inner, submit=submit)

Unfinish packages

Example

  • 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.ModifyPackagesApi(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 ModifyPackagesApi->v2_packages_unfinish_post:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ModifyPackagesApi->v2_packages_unfinish_post: %s\n" % e)

Parameters

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]

Return type

V2ItemsDiscontinuePost200Response

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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]