Download OpenAPI specification:Download
Sample API for Universal QR Codes
URL to get the hostname from a QR code label - potentially hosted on a different server. This endpoint should also provide the vendor for the label, in order to assist in developers matching their API tokens to the correct endpoints.
View a JSON schema of this inside the /wellknown/cannabis-api.schema.json The 'vendor' tag allows a developer to easily match their stored API keys to the endpoint.
If you would like additional endpoints to be stored in the cannabis-api.json file, you can specify them with fieldname-endpoint. For example 'distributor-endpoint' or 'pos-endpoint'. You should always have an endpoint entry, however.
{- "endpoint": "qr.example.com/uapi/v1/",
- "path-components": "qr.example.com/i/:id",
- "vendor": "nabis",
- "*-endpoint": "qr-poc.example.com/uapi/v1/"
}
write
) id required | string id of record to look up |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "updatedOn": "2019-08-24T14:15:22Z",
- "name": "Kush OG",
- "sku": "string",
- "upc": "string",
- "barcode": "string",
- "productLine": "string",
- "productType": "balm",
- "usage": "medical",
- "variety": "cbd",
- "strain": "string",
- "totalCannabinoids": {
- "name": "string",
- "value": "string",
- "unit": "g"
}, - "totalThc": {
- "name": "string",
- "value": "string",
- "unit": "g"
}, - "totalCbd": {
- "name": "string",
- "value": "string",
- "unit": "g"
}, - "thcCbdRatio": "5:1",
- "servings": 0,
- "servingSize": {
- "name": "string",
- "value": "string",
- "unit": "g"
}, - "packageSize": {
- "name": "string",
- "value": "string",
- "unit": "g"
}, - "description": "string",
- "testsDescription": "string",
- "testingMethodology": "string",
- "usageRecommendation": "string",
- "aboutIngredients": "string",
- "ingredients": [
- "string"
], - "specialDiet": "glutenFree",
- "images": {
- "thumbnail": {
- "name": "string",
- "url": "string",
- "mimeType": "string",
- "sizeBytes": 0,
- "updatedOn": "2019-08-24T14:15:22Z"
}, - "primary": {
- "name": "string",
- "url": "string",
- "mimeType": "string",
- "sizeBytes": 0,
- "updatedOn": "2019-08-24T14:15:22Z"
}
}
}
write
) id required | string id of record to look up |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "name": "string",
- "regulatoryEvents": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "parent": "42e2bc1b-6741-4e2e-b138-97b4a342c999",
- "kind": "batch"
}
], - "producedOn": "2019-08-24",
- "coaIds": [
- null
], - "updatedOn": "2019-08-24T14:15:22Z"
}
Case matching input id - a case comes from a manufacturer and is a collection of items that are all the same. It cannot contain different item types.
write
) id required | string id to look up |
excludedFields | Array of strings Example: excludedFields=product,batch comma separated list of fields to exclude in the request body |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "eaches": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "regulatorEvents": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "parent": "42e2bc1b-6741-4e2e-b138-97b4a342c999",
- "kind": "batch"
}
]
}
write
) id required | string id to look up |
Body for a put / post with regulator information
id required | string <uuid> (Id) Unique ID for an object. Format of uuid is platform dependent. Client implementations should expect that uuid values are always unique within a given implementation, but should not assume any particular format for the uuid itself other than string. Note that depending on platform implementation, it may be possible to convert the string to a valid UUID, however the specifics of such a conversion must be determined from the platform implementation. |
parent | string <uuid> (Id) Unique ID for an object. Format of uuid is platform dependent. Client implementations should expect that uuid values are always unique within a given implementation, but should not assume any particular format for the uuid itself other than string. Note that depending on platform implementation, it may be possible to convert the string to a valid UUID, however the specifics of such a conversion must be determined from the platform implementation. |
kind required | string Enum: "batch" "transfer" "manifest" |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "parent": "42e2bc1b-6741-4e2e-b138-97b4a342c999",
- "kind": "batch"
}
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "eaches": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "regulatorEvents": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "parent": "42e2bc1b-6741-4e2e-b138-97b4a342c999",
- "kind": "batch"
}
]
}
write
) id required | string id to look up |
excludedFields | Array of strings Example: excludedFields=product,batch comma separated list of fields to exclude in the request body |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113",
- "batchId": "5579c111-9c50-47e2-af92-f16d52e63189",
- "caseId": "af51d69f-996a-4891-a745-aadfcdec225a",
- "regulatorEvents": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "parent": "42e2bc1b-6741-4e2e-b138-97b4a342c999",
- "kind": "batch"
}
]
}
write
) id required | string id to look up |
Body for a put / post with regulator information
id required | string <uuid> (Id) Unique ID for an object. Format of uuid is platform dependent. Client implementations should expect that uuid values are always unique within a given implementation, but should not assume any particular format for the uuid itself other than string. Note that depending on platform implementation, it may be possible to convert the string to a valid UUID, however the specifics of such a conversion must be determined from the platform implementation. |
parent | string <uuid> (Id) Unique ID for an object. Format of uuid is platform dependent. Client implementations should expect that uuid values are always unique within a given implementation, but should not assume any particular format for the uuid itself other than string. Note that depending on platform implementation, it may be possible to convert the string to a valid UUID, however the specifics of such a conversion must be determined from the platform implementation. |
kind required | string Enum: "batch" "transfer" "manifest" |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "parent": "42e2bc1b-6741-4e2e-b138-97b4a342c999",
- "kind": "batch"
}
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113",
- "batchId": "5579c111-9c50-47e2-af92-f16d52e63189",
- "caseId": "af51d69f-996a-4891-a745-aadfcdec225a",
- "regulatorEvents": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "parent": "42e2bc1b-6741-4e2e-b138-97b4a342c999",
- "kind": "batch"
}
]
}
write
) id required | string id to look up |
{- "eaches": [
- [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
], - "cases": [
- [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
], - "regulatorEvents": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "parent": "42e2bc1b-6741-4e2e-b138-97b4a342c999",
- "kind": "batch"
}
]
}
write
) id required | string id to look up |
Body for a request to put a regulator id on multiple items
ids | Array of strings <uuid> (Id) |
{- "ids": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
}
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "parent": "42e2bc1b-6741-4e2e-b138-97b4a342c999",
- "kind": "batch"
}
Get details from an order (probably from a distributor), describing child package to QR code url mappings The contents field contains an array of QR codes that represent all scanned cases or items, allowing a lookup on a per-vendor basis of the data about those cases or items. In order to use the cases in your system, just perform a lookup on the case information endpoint and get the each IDs - then use those to identify the scanned out QR codes. The regulatorEvent entry represents the transfer ID (if applicable). Using the manifest endpoint, a retailer can scan a single barcode on a box and then use subsequent API calls using the standard (to multiple vendors) to get information about the associated regulator tags and product information.
write
) id required | string id to look up |
{- "regulatorEvent": {
- "id": "0003166342",
- "kind": "manifest"
}, - "contents": [
- "qr.example.com/i/1234",
- "qr-test.example.com/i/abcd"
]
}