Sale

Create Retail Sales

Create sales under the retail capable license_number provided.

SecurityApiKeyAuth and CustomAuth
Request
path Parameters
state
required
string

Lower case ANSI standard 38:2009 USPS codes of the US state where licensee is operating.

Enum: "ca" "or" "nv" "mt" "co" "mi" "il" "ma" "ri" "nj" "md" "de" "va" "oh" "ky" "al" "ms" "mn" "la" "ok" "sd" "me"
query Parameters
purchase_limit_override
boolean

Optional query string parameter to include if a posted sale is failing purchase limit validation due to clerical error. Example, 100 mg edible lot has 40 Grams set as unit_weight.

Example: purchase_limit_override=true
header Parameters
x-api-key
required
string

Trace API key header

Example: b123x21wbHlkYXBpa2V5
Authorization
required
string

Company and user credentials authentication

Example: KMP-JSON token=dmVuZG9yLWFwaS1rZXk6dX12312sdfs2V5
Request Body schema: application/json
required
Array of objects

Array of individual sales objects.

Array
required
object
license_number
required
string

Reference (entity_ID) for the license. This is the business license number issued by the state.

customer_types
required
object

customer_type GET sales/customer_types for details on types.

external_id
string

An identifier tied to invoice number on receipts in metrc or for Trace persistence in states that do not support the field.

terminal
required
string

an identifier for a specific register or point of sale system where sale is made.

required
object
date
required
string

created time stamp in ISO 8601 UTC format.

local_time
required
string

sale date time without timezone representing the local time the sale was made.

out_of_state_sale
required
boolean

true if the customer is from out of state.

required
Array of objects
Array
types
required
object

customer_types id from GET sales/customer_types

id
required
string

value of the particular identification passed in.

birthday
string

customers birthday in ISO 8601 UTC format. Only needed with drivers license type identification.

required
object
id
required
string

Trace employee ID that registered the sale.

required
Array of objects
Array
lot
required
object

Trace lot id for the package / inventory to be sold.

discount
string

A string format decimal value representing the dollar amount discount applied to the lot at the time of sale. Cannot exceed the price of the lot.

quantity
required
string

A string format of the quantity of items sold. For each should be integer, for weight based can be a float.

unit_price
required
string

A string format of price per unit. We will not convert this number and will be passed through to track and trace systems as sent.

Array of objects
total
required
string

A string format of the total ((unit_price * quantity) - discount + taxes) for particular lot.

required
object

contains currency id used for the sale.

id
required
string

Trace currency id from GET sales/currency_types.

required
object

object containing information about total amount and quantity for the sale.

subtotal
required
string

the total amount for the sale after discount before taxes.

quantity
required
string

A string format of the value summing total quantities of all line items on the sale.

total
required
string

A string format of the total sale price including taxes and discounts. Must match the payment amount.

required
Array of objects

array of payment method(s) used in the sale

Array
id
string

optional parameter that can be used to store a payment id likely from a payment processing system.

amount
required
string

the amount paid with the particular payment type.

required
object

payment type from GET sales/payment_types

provider_name
string

Commonly used with the ACH payment type (optional).

Responses
200

OK

Response Schema: application/json
object
type
string
Value: "object"
object

Data regarding sale made in the post request.

object
license_number
string

Reference (entity_ID) for the license. This is the business license number issued by the state.

object

License type of the company/facility.

name
string

The display name of the license type.

characteristics
object

Specific information related to the license type. The presence of the characteristics' object depends on the use of the expand query parameter .

id
string

The Trace id assigned to the processed sale.

receipt_number
string

ID/Receipt number provided by the track and trace system.

customer_types
object

customer_type GET sales/customer_types for details on types.

external_id
string

invoice number or transaction identified passed through in states that support invoice number in the track and trace system.

terminal
string

an identifier for a specific register or point of sale system where sale is made.

object
date
string

created time stamp in ISO 8601 UTC format.

local_time
string

sale date time without timezone representing the local time the sale was made.

out_of_state_sale
boolean

true if the customer is from out of state.

Array of objects
Array
types
object

customer_types id from GET sales/customer_types

id
string

value of the particular identification passed in.

birthday
string

customers birthday in ISO 8601 UTC format. Only needed with drivers license type identification.

object
id
string

Trace employee ID that registered the sale.

object

Employee's name associated with the employee ID used to make the sale.

first_name
string

Employee's first name.

last_name
string

Employee's last name.

Array of objects
Array
object

Trace lot id for the package / inventory to be sold.

name
string

Name provided for the lot being sold.

discount
string

A string format decimal value representing the dollar amount discount applied to the lot at the time of sale. Cannot exceed the price of the lot.

quantity
string

A string format of the quantity of items sold. For each should be integer, for weight based can be a float.

unit_of_measure
string

the unit of measure associated to the lot.

unit_price
string

A string format of price per unit. We will not convert this number and will be passed through to track and trace systems as sent.

Array of objects
total
string

string format of subtotal for particular lot.

object

contains currency id used for the sale.

id
string

Trace currency id from GET sales/currency_types.

name
string

Name of the currency used for the sale.

object

object containing information about total amount and quantity for the sale.

subtotal
string

the total amount for the sale after discount before taxes.

quantity
string

A string format of the value summing total quantities of all line items on the sale.

Array of objects
Array
object
total
string

string value in decimal format to represent the total for the tax type on the lot.

total
string

string value in decimal format to represent the sum of all line items, discounts and taxes.

Array of objects

array of payment method(s) used in the sale

Array
id
string

optional parameter that can be used to store a payment id likely from a payment processing system.

amount
string

the amount paid with the particular payment type.

object

payment type from GET sales/payment_types

provider_name
string

Commonly used with the ACH payment type (optional).

Array of objects

list of state changes made to the entity. Entity states for sales [active,inactive,voided,refunded].

Array
state
string

state of the entity.

date
string

timestamp when the state was recorded ISO 8601 UTC format.

reason
string

additional information for the 'state' change.

actioned_by
string

username of the person who updated the state of the entity (if applicable).

Array of objects
Array
type
string
detail
string
400

Bad Request

post/{state}/v1/sales
Request samples
application/json
{
  • "sales": [
    ]
}
Response samples
application/json
{
  • "results": {
    },
  • "warnings": [
    ]
}

Retrieve all active sales

Retrieve sales details for all active sales records.

SecurityApiKeyAuth and CustomAuth
Request
path Parameters
state
required
string

Lower case ANSI standard 38:2009 USPS codes of the US state where licensee is operating.

Enum: "ca" "or" "nv" "mt" "co" "mi" "il" "ma" "ri" "nj" "md" "de" "va" "oh" "ky" "al" "ms" "mn" "la" "ok" "sd" "me"
query Parameters
license_number
required
string

Reference (entity_ID) for the license. This is the business license number issued by the state.

Example: license_number=ABC-1234
limit
number

Optional parameter that allows you to specify a number to limit the results in the response. Default limit is 100.

Example: limit=100
offset
number

Optional parameter that allows you to offset records if the max number for the filter exceeds the limit.

Example: offset=0
header Parameters
x-api-key
required
string

Trace API key header

Example: b123x21wbHlkYXBpa2V5
Authorization
required
string

Company and user credentials authentication

Example: KMP-JSON token=dmVuZG9yLWFwaS1rZXk6dX12312sdfs2V5
Responses
200

OK

Response Schema: application/json
object
type
string
Value: "array"
object
count
string

A string representing what records you are receiving out of the total for the filter criteria.

total
number

The total number of records returned based upon filter criteria.

previous
string or null

URL that when executed will return you to the last page set.

next
string or null

URL that when executed will take you to the next set of paginated records.

data
Array of arrays

Data regarding sale made in the post request.

Array of objects
Array
type
string
detail
string
400

Bad Request

get/{state}/v1/sales
Response samples
application/json
{
  • "results": {
    },
  • "warnings": [ ]
}

Retrieve sale by id

Retrieve sales details for one or more sales records.

SecurityApiKeyAuth and CustomAuth
Request
path Parameters
state
required
string

Lower case ANSI standard 38:2009 USPS codes of the US state where licensee is operating.

Enum: "ca" "or" "nv" "mt" "co" "mi" "il" "ma" "ri" "nj" "md" "de" "va" "oh" "ky" "al" "ms" "mn" "la" "ok" "sd" "me"
id
required
string

Trace sale id.

Example: 11il9b62fe1c47e4970c55ec6c7ff8jj
query Parameters
license_number
required
string

Reference (entity_ID) for the license. This is the business license number issued by the state.

Example: license_number=ABC-1234
header Parameters
x-api-key
required
string

Trace API key header

Example: b123x21wbHlkYXBpa2V5
Authorization
required
string

Company and user credentials authentication

Example: KMP-JSON token=dmVuZG9yLWFwaS1rZXk6dX12312sdfs2V5
Responses
200

OK

Response Schema: application/json
object
type
string
Value: "object"
object

Data regarding sale made in the post request.

object
license_number
string

Reference (entity_ID) for the license. This is the business license number issued by the state.

object

License type of the company/facility.

name
string

The display name of the license type.

characteristics
object

Specific information related to the license type. The presence of the characteristics' object depends on the use of the expand query parameter .

id
string

The Trace id assigned to the processed sale.

receipt_number
string

ID/Receipt number provided by the track and trace system.

customer_types
object

customer_type GET sales/customer_types for details on types.

external_id
string

invoice number or transaction identified passed through in states that support invoice number in the track and trace system.

terminal
string

an identifier for a specific register or point of sale system where sale is made.

object
date
string

created time stamp in ISO 8601 UTC format.

local_time
string

sale date time without timezone representing the local time the sale was made.

out_of_state_sale
boolean

true if the customer is from out of state.

Array of objects
Array
types
object

customer_types id from GET sales/customer_types

id
string

value of the particular identification passed in.

birthday
string

customers birthday in ISO 8601 UTC format. Only needed with drivers license type identification.

object
id
string

Trace employee ID that registered the sale.

object

Employee's name associated with the employee ID used to make the sale.

first_name
string

Employee's first name.

last_name
string

Employee's last name.

Array of objects
Array
object

Trace lot id for the package / inventory to be sold.

name
string

Name provided for the lot being sold.

discount
string

A string format decimal value representing the dollar amount discount applied to the lot at the time of sale. Cannot exceed the price of the lot.

quantity
string

A string format of the quantity of items sold. For each should be integer, for weight based can be a float.

unit_of_measure
string

the unit of measure associated to the lot.

unit_price
string

A string format of price per unit. We will not convert this number and will be passed through to track and trace systems as sent.

Array of objects
total
string

string format of subtotal for particular lot.

object

contains currency id used for the sale.

id
string

Trace currency id from GET sales/currency_types.

name
string

Name of the currency used for the sale.

object

object containing information about total amount and quantity for the sale.

subtotal
string

the total amount for the sale after discount before taxes.

quantity
string

A string format of the value summing total quantities of all line items on the sale.

Array of objects
Array
object
total
string

string value in decimal format to represent the total for the tax type on the lot.

total
string

string value in decimal format to represent the sum of all line items, discounts and taxes.

Array of objects

array of payment method(s) used in the sale

Array
id
string

optional parameter that can be used to store a payment id likely from a payment processing system.

amount
string

the amount paid with the particular payment type.

object

payment type from GET sales/payment_types

provider_name
string

Commonly used with the ACH payment type (optional).

Array of objects

list of state changes made to the entity. Entity states for sales [active,inactive,voided,refunded].

Array
state
string

state of the entity.

date
string

timestamp when the state was recorded ISO 8601 UTC format.

reason
string

additional information for the 'state' change.

actioned_by
string

username of the person who updated the state of the entity (if applicable).

Array of objects
Array
type
string
detail
string
400

Bad Request

get/{state}/v1/sales/{id}
Response samples
application/json
{
  • "results": {
    },
  • "warnings": [
    ]
}

Update Sale

Update the product registered under the license_number provided.

SecurityApiKeyAuth and CustomAuth
Request
path Parameters
id
required
string

Reference (entity_ID) for the sale you are updating.

Example: 80d15c7713a74feeb4c1c5f533697644
state
required
string

Lower case ANSI standard 38:2009 USPS codes of the US state where licensee is operating.

Enum: "ca" "or" "nv" "mt" "co" "mi" "il" "ma" "ri" "nj" "md" "de" "va" "oh" "ky" "al" "ms" "mn" "la" "ok" "sd" "me"
header Parameters
x-api-key
required
string

Trace API key header

Example: b123x21wbHlkYXBpa2V5
Authorization
required
string

Company and user credentials authentication

Example: KMP-JSON token=dmVuZG9yLWFwaS1rZXk6dX12312sdfs2V5
Request Body schema: application/json
required
object
license_number
required
string

Reference (entity_ID) for the license. This is the business license number issued by the state.

actions
required
object

Specific action id from sales/actions for the update request. Note: different put requests require different structures.

price_change_date
required
string

time stamp in ISO 8601 UTC format representing the time the price change was made.

required
object

Trace currency id retrieved from sales/currency_types. Must match original sale currency.

id
required
string

Trace currency id retrieved from sales/currency_types.

required
Array of objects

Array of one or more lots in which you are attempting to update the price on for a particular sale.

Array
required
object
id
required
string

Trace Lot ID for the item on the sale

amount
required
string

A string format of the price value for the lot on the sale.

Responses
200

OK

Response Schema: application/json
object
type
string
Value: "object"
object

Data regarding sale made in the post request.

object
license_number
string

Reference (entity_ID) for the license. This is the business license number issued by the state.

object

License type of the company/facility.

name
string

The display name of the license type.

characteristics
object

Specific information related to the license type. The presence of the characteristics' object depends on the use of the expand query parameter .

id
string

The Trace id assigned to the processed sale.

receipt_number
string

ID/Receipt number provided by the track and trace system.

customer_types
object

customer_type GET sales/customer_types for details on types.

terminal
string

an identifier for a specific register or point of sale system where sale is made.

object
date
string

created time stamp in ISO 8601 UTC format.

local_time
string

sale date time without timezone representing the local time the sale was made.

out_of_state_sale
boolean

true if the customer is from out of state.

Array of objects
Array
types
object

customer_types id from GET sales/customer_types

id
string

value of the particular identification passed in.

birthday
string

customers birthday in ISO 8601 UTC format. Only needed with drivers license type identification.

object
id
string

Trace employee ID that registered the sale.

object

Employee's name associated with the employee ID used to make the sale.

first_name
string

Employee's first name.

last_name
string

Employee's last name.

Array of objects
Array
object

Trace lot id for the package / inventory to be sold.

name
string

Name provided for the lot being sold.

barcode
string

Tag used with/provided by the track and trace system for the lot being sold.

unit_of_measure
string

the unit of measure associated to the lot.

quantity
string

A string format of the quantity of items sold. For each should be integer, for weight based can be a float.

unit_price
string

A string format of price per unit. We will not convert this number and will be passed through to track and trace systems as sent.

subtotal
string

string format of subtotal for particular lot.

object

contains currency id used for the sale.

id
string

Trace currency id from GET sales/currency_types.

name
string

Name of the currency used for the sale.

Array of objects
Array
type
string

customer supplied name for the tax type represented within the object.

rate
string

customer supplied rate typically in decimal or percent format for the tax type represented within the object.

subtotal
string

customer supplied subtotal for the tax type represented within the object.

object

object containing information about total amount and quantity for the sale.

amount
string

the total amount for the sale summing up subtotals across lots and any applicable taxes.

quantity
string

A string format of the value summing total quantities of all line items on the sale.

Array of objects

array of payment method(s) used in the sale

Array
id
string

optional parameter that can be used to store a payment id likely from a payment processing system.

amount
string

the amount paid with the particular payment type.

object

payment type from GET sales/payment_types

provider_name
string

Commonly used with the ACH payment type (optional).

Array of objects

list of state changes made to the entity. Entity states for sales [active,inactive,voided,refunded].

Array
state
string

state of the entity.

date
string

timestamp when the state was recorded ISO 8601 UTC format.

reason
string

additional information for the 'state' change.

actioned_by
string

username of the person who updated the state of the entity (if applicable).

Array of objects
Array
type
string
detail
string
400

Bad Request

put/{state}/v1/sales/{id}
Request samples
application/json
{
  • "license": {
    },
  • "actions": {
    },
  • "price_change_date": "2021-05-21T20:29:19Z",
  • "currency": {
    },
  • "line_items": [
    ]
}
Response samples
application/json
{
  • "results": {
    },
  • "warnings": [ ]
}