Green Bits API V2
Authentication ¶
Get API Token ¶
Green Bits primarily uses token based authentication.
To retrieve your API token, send a GET request to /api/v2/me
using basic authentication and the email and password of any valid user in the API application’s database.
Limiting API Response Data to a Specific Location
If a user has access to multiple locations, you can constrain the API to a
specific location by setting the X-GB-CompanyId
in the header of all API
requests with the specific location’s ID.
Note that without the X-GB-CompanyId
header, API responses will
automatically constrain to the token owner’s first accessible location.
Authorization: Token token="{your_token}"
X-GB-CompanyId: {company_id}
View Your DetailsGET/me
Example URI
Headers
Authorization: Basic {basic_auth_token}
200
Headers
Content-Type: application/json
Body
{
"user": {
"id": "5d44d604-81b5-4b16-ade4-f204f3d494dc",
"username": "janedoe",
"email": "jane@example.com",
"first_name": "Jane",
"last_name": "Doe",
"name": "Jane Doe",
"token": "53MdJBaKnKMUWEfXDparpQ",
"budtender": false,
"created_at": "2015-07-10T10:59:26-07:00",
"company_id": "407fa200-0108-4b30-8fa1-7699442538b2"
"intercom_user_hash": "f90d3cd5dc746a2ea90309d61b6dc65ab4c57a7be74c3456dbaf17c5805fa196",
"pin": "1111",
"accessible_company_ids": [
"45c169be-6305-467f-a37d-e633607e45ca",
"36b82c08-4be5-4228-bd51-fec9bf525cba"
],
"email_settings": null,
"salesforce_id": null,
"license_number": null,
"state_credentials": [
"45c169be-6305-467f-a37d-e633607e45ca"
],
"role_id": "02df4175-3d26-4ece-98ff-e9473ae63fa3",
"account_id": "729d90ee-cd16-46cd-a675-54d35eeb6407",
"accessible_location_ids": [
"45c169be-6305-467f-a37d-e633607e45ca",
"36b82c08-4be5-4228-bd51-fec9bf525cba"
]
}
}
401
Headers
Content-Type: application/json
Body
{
"error": "Invalid email or password."
}
Authenticate with Token ¶
Now that you have your API token, you can test it out by retrieving your company’s details. Using
the company_id
from the previous request, fetch your company’s details with the following request.
View Company DetailsGET/companies/{company_id}
Example URI
- company_id
string
(required)ID of your company
Headers
Authorization: Token token="{your_token}"
200
Headers
Content-Type: application/json
Body
{
"company": {
"id": "407fa200-0108-4b30-8fa1-7699442538b2",
"name": "Jane's Pot Shop",
"street": "1234 Rad Street",
"city": "San Jose",
"state": "CA",
"zip_code": "95124"
}
}
Order ¶
- Attributes
- charged_on (string) - A UTC ISO 8601 date indicating when the sale was made
- order_type (integer) - See Enum Values for valid order type values
- payment_type (integer) - See Enum Values for valid payment type values
- shift_id: (string) - UUID of the shift to which this order belongs
- receipt_id: (string) - A human-friendly unique ID for the order. A valid receipt ID can be created by creating a UUID, then taking the last 12 characters, then converting the result to uppercase. Example:
A48DA081C931
- line_items (array)
- quantity (object)
- value (integer)
- unit (integer) - See Enum Values for valid weight unit values
- price (integer) - Price in cents
- inventory_item_id: (string) - UUID of inventory item for line item
- quantity (object)
- tendered_amount (integer) - Tendered amount in cents. Should equal sum of payments.
- payments (array)
- payment_method_id (string) - UUID of payment method for this payment
- total (integer) - Price in cents for this payment
Important: Don’t forget to include the X-GB-DeviceId
header specified in the Headers section.
Create Order ¶
Create OrderPOST/orders
Example URI
Headers
Content-Type: application/json
Authorization: Token token="{your_token}"
X-GB-DeviceId: {valid device identifier}
Body
{
"order": {
"charged_on": "2017-01-01T16:00:00",
"order_type": 0,
"payment_type": 0,
"shift_id": "a07838f3-d711-4560-946a-a5d0b9039732",
"receipt_id": "A48DA081C931",
"line_items": [
{
"quantity": {
"value": 1,
"unit": 0
},
"price": 800,
"inventory_item_id": "05d650b2-2e57-4900-91f8-d0d08d8fbba5"
}
],
"tendered_amount": 2000,
"payments": [
{
"payment_method_id": "a7e3e699-7137-4682-b76d-ce720a34fa78",
"total": 2000
}
]
}
}
200
Headers
Content-Type: application/json
Body
{
"order": {
"id": "6bfa824b-da03-4cf3-a85d-3cda74ed7f6f",
"charged_on": null,
"tendered_amount": 1000,
"payment_type": 0,
"order_type": 0,
"refund_reason": null,
"receipt_id": null,
"line_items": [
{
"id": "391d9bf6-6398-41fc-9d4d-dc2143989dd4",
"quantity": {
"value": "1.0",
"unit": 5
},
"price": 1000,
"sku": "1234567890123456",
"weight": null,
"unit_of_measure": 5,
"subtotal": 1000,
"loyalty_points": 0,
"tax_breakdowns": [],
"tax_exemptions": [],
"discounts": [],
"inventory_item_id": "05d650b2-2e57-4900-91f8-d0d08d8fbba5",
"related_line_item_id": null
}
],
"voided": false,
"discount_flat_amount": null,
"discount_percent": null,
"customer_id": null,
"original_order_id": null,
"person_id": null,
"device_id": "1f969a00-da41-4f1c-b26b-70c5b3dff8a7",
"employee_id": "8eaa4c82-5c6f-49be-9707-2db7442343ca",
"payments": [
{
"id": "f9f9de4d-404f-4988-84cd-9f5d0c34ad8e",
"total": 1000,
"payment_type": 0,
"payment_method_id": "a7e3e699-7137-4682-b76d-ce720a34fa78"
}
]
}
}
Customer ¶
- Attributes
- id (string)
- company_id (required, string) - The company to attach this customer to.
- first_name (optional, string)
- last_name (optional, string)
- email (required, string) - Either phone or email is required.
- phone (required, string) - Either phone or email is required. Must be a valid phone number, but don’t worry about formatting. The API will format the phone number in the response.
Customers Collection ¶
Customers CollectionGET/customers{?by_query}
Example URI
- by_query
string
(optional)Filters the customers by this query string. It returns any customers whose first name, last name, email, or phone contain the provided string.
Headers
Authorization: Token token="{your_token}"
200
Headers
Content-Type: application/json
Body
{
"customers": [
{
"id": "b78d62bd-dd78-4993-ab61-45330e307b17",
"first_name": "John",
"last_name": "Smith",
"email": "john@example.com",
"phone": "123-456-7890",
"birth_date": "1950-01-01",
"company_id": "45c169be-6305-467f-a37d-e633607e45ca",
"id_number": null,
"expiration_date": null,
"loyalty_points": 48,
"driver_license_number": null,
"driver_license_state": null,
"driver_license_zip_code": null,
"driver_license_expiration_date": null,
"location_id": "45c169be-6305-467f-a37d-e633607e45ca",
"account_id": "729d90ee-cd16-46cd-a675-54d35eeb6407",
"file_attachments": []
}
]
}
Create Customer ¶
Create CustomerPOST/customers
Example URI
Headers
Content-Type: application/json
Body
{
"customer": {
"first_name": "John",
"last_name": "Smith",
"email": "john@example.com",
"phone": "8885551111",
"birth_date": "1976-04-03T00:00:00.000Z",
"company_id": "a73e4ad0-d48b-4981-b764-1418e04d9ce4",
"location_id": "00fe463a-d960-43a7-8572-ac1fc9311e53"
}
}
200
Headers
Content-Type: application/json
Body
{
"customer": {
"id": "5ba1ca90-4087-46b9-bb7a-83798acf6200",
"first_name": "John",
"last_name": "Smith",
"email": "john@example.com",
"phone": "888-555-1111",
"birth_date": "1976-04-02",
"company_id": "00fe463a-d960-43a7-8572-ac1fc9311e53",
"id_number": null,
"expiration_date": null,
"loyalty_points": null,
"driver_license_number": null,
"driver_license_state": null,
"driver_license_zip_code": null,
"driver_license_expiration_date": null,
"location_id": "00fe463a-d960-43a7-8572-ac1fc9311e53",
"account_id": "c0b67828-0fe9-4208-8a95-e16d6012bfba",
"file_attachments": []
}
}
422
Headers
Content-Type: application/json
Body
{
"errors": {
"email": [
"is not a valid email"
],
"phone": [
"is not a valid phone number"
]
}
}
Inventory Item ¶
Use this endpoint if you need to modify the inventory item or use the inventory item metadata field.
- Attributes
- id (string) - The inventory item ID.
- product_id (string) - The ID of the product to which this item belongs.
- sku (string)
- lot_number (string)
- quantity (number) - Quantity left on hand.
- weight (string) - Weight in grams.
- sell_type (number) - An Enum indicating this item’s sell type. The valid options are:
- 0: Sellable
- 1: Unsellable
- 2: Locked - This means it was locked by Green Bits, either because it’s a sample jar or it has been transferred out.
- sample (boolean) - A boolean indicating whether this item is a sample.
- transferred_out (boolean) - A boolean indicating whether this item has been transferred out.
- received_at (timestamp) - A timestamp indicating the first time this item was received.
- test_results_thc (string) - THC percentage (10% being represented at 0.10) indicated by the latest test results.
- test_results_cbd (string) - CBD percentage (10% being represented at 0.10) indicated by the latest test results.
- test_results_thca (number) - Total THCA content as percentage.
- test_results_cbda (number) - Total CBDA content as percentage.
- test_results_cbc (number) - Total CBC content as percentage.
- test_results_cbg (number) - Total CBG content as percentage.
- test_results_thcv (number) - Total THCV content as percentage.
- test_results_total_thc (object) - Total THC content as object with value and unit.
- test_results_total_cbd (object) - Total CBD content as object with value and unit.
- test_results_total_thca (object) - Total THCA content as object with value and unit.
- test_results_total_cbda (object) - Total CBDA content as object with value and unit.
- test_results_total_cbc (object) - Total CBC content as object with value and unit.
- test_results_total_cbg (object) - Total CBG content as object with value and unit.
- test_results_total_thcv (object) - Total THCV content as object with value and unit.
- metadata (json) - A JSON field that you can use to store metadata about this item.
- packager_name (string) - The name of the entity that packaged this inventory.
- packager_license_number (string) - The license number of the entity that packaged this inventory.
Inventory Item ¶
View an Inventory Item's DetailGET/inventory_items/{inventory_item_id}
Example URI
- inventory_item_id
string
(required)ID of the inventory item
Headers
Authorization: Token token="{your_token}"
200
Headers
Content-Type: application/json
Body
{
"inventory_item": {
"id": "dc558fe9-7c1f-41c3-ba90-fe4d602e57ca",
"sku": "1234567890123459",
"quantity": {
"value": "5.0",
"unit": 0
},
"weight": null,
"purchase_price": 666,
"lot_number": "1234567890123459",
"sell_type": 3,
"sample": false,
"transferred_out": false,
"received_at": "2020-09-07T09:40:59.000Z",
"metadata": null,
"test_results_thc": "0.13",
"test_results_cbd": "0.04",
"medical": false,
"sample_type": 0,
"velocity": {
"value": "0.0",
"unit": 0
},
"producer_name": null,
"harvest_lot_number": null,
"harvest_date": null,
"test_lab_name": null,
"test_batch_number": null,
"test_analysis_dates": null,
"pesticides_text": null,
"ingredients_text": null,
"last_received_at": "2020-09-07T09:40:59.000Z",
"test_results_max_thc": null,
"test_results_max_cbd": null,
"strain": "AK-47",
"product_type_name": "Flower",
"flower_type": "Sativa",
"medical_subtype": null,
"cultivator_license_number": null,
"test_results_cbn": null,
"test_results_max_cbn": null,
"test_results_terpenoid_profile": {},
"expiration_date": null,
"packaged_date": null,
"process_disclosure": null,
"test_results_total_thc": null,
"test_results_total_cbd": null,
"traceable": true,
"traceable_amount": {
"value": "5.0",
"unit": 0
},
"status": 1,
"test_results_total_thca": null,
"test_results_total_cbda": null,
"test_results_thca": null,
"test_results_cbda": null,
"packager_name": null,
"packager_license_number": null,
"additional_cultivator_license_number": null,
"paid_excise_tax": null,
"test_results_cbc": null,
"test_results_cbg": null,
"test_results_thcv": null,
"test_results_max_cbc": null,
"test_results_max_cbg": null,
"test_results_max_thcv": null,
"test_results_total_cbc": null,
"test_results_total_cbg": null,
"test_results_total_thcv": null,
"pre_mixed_weight": null,
"sellable_quantity": {
"value": "0.0",
"unit": 0
},
"product": {
"id": "1ee050d1-d08f-4bea-840e-f3a3a01d994a",
"sku": null,
"name": "AK-47",
"sell_price": 1400,
"patient_sell_price": null,
"member_sell_price": null,
"quantity": {
"value": "87.0",
"unit": 0
},
"pricing_type": 0,
"active": true,
"status": 1,
"latest_sku": "1234567890123455",
"weight": null,
"tags": [],
"description": null,
"internal_notes": null,
"metadata": null,
"test_results_thc": "0.35",
"test_results_cbd": "0.005",
"flower_type": 1,
"concentrate_type": null,
"unit_of_measure": 0,
"price_at_register": false,
"base_price": null,
"velocity": {
"value": "0.0",
"unit": 0
},
"wholesale_value": 57942,
"par": null,
"discountable": true,
"patient_price_enabled": false,
"member_price_enabled": false,
"tier_price": 1400,
"quantities_by_place": [
{
"inventory_status": 0,
"name": "Sales Floor",
"quantity": {
"value": "37.0",
"unit": 0
}
},
{
"inventory_status": 1,
"name": "Back Stock",
"quantity": {
"value": "30.0",
"unit": 0
}
},
{
"inventory_status": 2,
"name": "Archived",
"quantity": {
"value": "15.0",
"unit": 0
}
},
{
"inventory_status": 3,
"name": "Quarantine",
"quantity": {
"value": "5.0",
"unit": 0
}
}
],
"category_id": "76f4b09d-a49a-4e83-bdc7-7424ffe6ee4f",
"brand_id": "774ef7ee-38ab-469a-9789-9b53aaeab229",
"strain_id": "abcdec1a-2020-42e8-adbe-621efb760000",
"product_type_id": "882d74f6-d0fa-4abb-a962-02c32f229fb0",
"vendor_id": "0db341f3-3eee-4715-bdb9-2d9e7192d414",
"tiered_pricing_model_id": null,
"images": [],
"inventory_item_places": [
{
"id": "78bc7afe-4d49-4273-a769-96200ec9f304",
"quantity": {
"value": "30.0",
"unit": 0
},
"sellable_quantity": {
"value": "30.0",
"unit": 0
},
"inventory_status": 0,
"place_id": "d4668dd4-ea5f-49b2-8acf-6b1defc4db6e",
"inventory_item_id": "fcb4ce8f-ba5c-4969-bfb5-30fb67f15d45"
},
{
"id": "17114e95-8589-4d51-8bc4-fd43c4a3655d",
"quantity": {
"value": "30.0",
"unit": 0
},
"sellable_quantity": {
"value": "0.0",
"unit": 0
},
"inventory_status": 1,
"place_id": "26f3b975-ac94-4810-9ad8-643a2b3aeb79",
"inventory_item_id": "31d0dd07-52e1-46bd-b538-b928b3f2198a"
},
{
"id": "82e3f8ce-8da7-434f-bcbd-f0139cdda084",
"quantity": {
"value": "15.0",
"unit": 0
},
"sellable_quantity": {
"value": "0.0",
"unit": 0
},
"inventory_status": 2,
"place_id": "59cf8b9c-78c2-499d-aff1-8d21c022d3e4",
"inventory_item_id": "e4bdee93-f82e-444f-9b02-ce2bc308f5b9"
},
{
"id": "45b10003-6137-4e6a-add5-9e5bc2e783a0",
"quantity": {
"value": "5.0",
"unit": 0
},
"sellable_quantity": {
"value": "0.0",
"unit": 0
},
"inventory_status": 3,
"place_id": "77755ba4-6437-4f75-a482-cbf7ee69b70a",
"inventory_item_id": "dc558fe9-7c1f-41c3-ba90-fe4d602e57ca"
},
{
"id": "021d3064-118f-42ef-91c5-57b9c89393b5",
"quantity": {
"value": "7.0",
"unit": 0
},
"sellable_quantity": {
"value": "7.0",
"unit": 0
},
"inventory_status": 0,
"place_id": "d4668dd4-ea5f-49b2-8acf-6b1defc4db6e",
"inventory_item_id": "71e0b194-647e-443c-98a5-dd2c01af116e"
}
]
},
"additional_materials": [],
"inventory_item_places": [
{
"id": "45b10003-6137-4e6a-add5-9e5bc2e783a0",
"quantity": {
"value": "5.0",
"unit": 0
},
"sellable_quantity": {
"value": "0.0",
"unit": 0
},
"inventory_status": 3,
"place_id": "77755ba4-6437-4f75-a482-cbf7ee69b70a",
"inventory_item_id": "dc558fe9-7c1f-41c3-ba90-fe4d602e57ca"
}
]
}
}
Update an Inventory ItemPUT/inventory_items/{inventory_item_id}
The request below only shows the fields that you are allowed to update.
Example URI
- inventory_item_id
string
(required)ID of the inventory item
{ “inventory_item”: { “sku”: “3156156207772758”, “metadata”: { “bin_id”: “R-23” } } }
Headers
Content-Type: application/json
Authorization: Token token="{your_token}"
204
Inventory Item Collection ¶
List All Inventory ItemsGET/inventory_items{?limit}{?offset}{?sellable}{?only_assigned}{?by_sku}{?by_lot_number}{?by_product_id}{?by_product_name}
Example URI
- limit
number
(optional) Example: 10The maximum number of inventory items to return.
- offset
number
(optional) Example: 0The number of inventory items to skip before returning inventory items.
- sellable
boolean
(optional) Example: trueOnly return sellable inventory items.
- only_assigned
boolean
(optional) Example: falseAlso include inventory items that haven’t been associated with products.
- by_sku
string
(optional) Example: 1234Filter results to only include items that match this SKU.
- by_lot_number
string
(optional) Example: 1234Filter results to only include items that match this lot number.
- by_product_id
string
(optional) Example: 4678c18a-5a5f-49a2-90ad-1908312e6235Filter results to only include items for this product.
- by_product_name
string
(optional) Example: BM: Bubba KushFilter results to only include items whose product name matches this string.
Headers
Authorization: Token token="{your_token}"
200
Headers
Content-Type: application/json
Body
{
"inventory_items": [
{
"id": "dc558fe9-7c1f-41c3-ba90-fe4d602e57ca",
"sku": "1234567890123459",
"quantity": {
"value": "5.0",
"unit": 0
},
"weight": null,
"purchase_price": 666,
"lot_number": "1234567890123459",
"sell_type": 3,
"sample": false,
"transferred_out": false,
"received_at": "2020-09-07T09:40:59.000Z",
"metadata": null,
"test_results_thc": "0.13",
"test_results_cbd": "0.04",
"medical": false,
"sample_type": 0,
"velocity": {
"value": "0.0",
"unit": 0
},
"producer_name": null,
"harvest_lot_number": null,
"harvest_date": null,
"test_lab_name": null,
"test_batch_number": null,
"test_analysis_dates": null,
"pesticides_text": null,
"ingredients_text": null,
"last_received_at": "2020-09-07T09:40:59.000Z",
"test_results_max_thc": null,
"test_results_max_cbd": null,
"strain": "AK-47",
"product_type_name": "Flower",
"flower_type": "Sativa",
"medical_subtype": null,
"cultivator_license_number": null,
"test_results_cbn": null,
"test_results_max_cbn": null,
"test_results_terpenoid_profile": {},
"expiration_date": null,
"packaged_date": null,
"process_disclosure": null,
"test_results_total_thc": null,
"test_results_total_cbd": null,
"traceable": true,
"traceable_amount": {
"value": "5.0",
"unit": 0
},
"status": 1,
"test_results_total_thca": null,
"test_results_total_cbda": null,
"test_results_thca": null,
"test_results_cbda": null,
"packager_name": null,
"packager_license_number": null,
"additional_cultivator_license_number": null,
"paid_excise_tax": null,
"test_results_cbc": null,
"test_results_cbg": null,
"test_results_thcv": null,
"test_results_max_cbc": null,
"test_results_max_cbg": null,
"test_results_max_thcv": null,
"test_results_total_cbc": null,
"test_results_total_cbg": null,
"test_results_total_thcv": null,
"pre_mixed_weight": null,
"sellable_quantity": {
"value": "0.0",
"unit": 0
},
"product": {
"id": "1ee050d1-d08f-4bea-840e-f3a3a01d994a",
"sku": null,
"name": "AK-47",
"sell_price": 1400,
"patient_sell_price": null,
"member_sell_price": null,
"quantity": {
"value": "87.0",
"unit": 0
},
"pricing_type": 0,
"active": true,
"status": 1,
"latest_sku": "1234567890123455",
"weight": null,
"tags": [],
"description": null,
"internal_notes": null,
"metadata": null,
"test_results_thc": "0.35",
"test_results_cbd": "0.005",
"flower_type": 1,
"concentrate_type": null,
"unit_of_measure": 0,
"price_at_register": false,
"base_price": null,
"velocity": {
"value": "0.0",
"unit": 0
},
"wholesale_value": 57942,
"par": null,
"discountable": true,
"patient_price_enabled": false,
"member_price_enabled": false,
"tier_price": 1400,
"quantities_by_place": [
{
"inventory_status": 0,
"name": "Sales Floor",
"quantity": {
"value": "37.0",
"unit": 0
}
},
{
"inventory_status": 1,
"name": "Back Stock",
"quantity": {
"value": "30.0",
"unit": 0
}
},
{
"inventory_status": 2,
"name": "Archived",
"quantity": {
"value": "15.0",
"unit": 0
}
},
{
"inventory_status": 3,
"name": "Quarantine",
"quantity": {
"value": "5.0",
"unit": 0
}
}
],
"category_id": "76f4b09d-a49a-4e83-bdc7-7424ffe6ee4f",
"brand_id": "774ef7ee-38ab-469a-9789-9b53aaeab229",
"strain_id": "abcdec1a-2020-42e8-adbe-621efb760000",
"product_type_id": "882d74f6-d0fa-4abb-a962-02c32f229fb0",
"vendor_id": "0db341f3-3eee-4715-bdb9-2d9e7192d414",
"tiered_pricing_model_id": null,
"images": [],
"inventory_item_places": [
{
"id": "78bc7afe-4d49-4273-a769-96200ec9f304",
"quantity": {
"value": "30.0",
"unit": 0
},
"sellable_quantity": {
"value": "30.0",
"unit": 0
},
"inventory_status": 0,
"place_id": "d4668dd4-ea5f-49b2-8acf-6b1defc4db6e",
"inventory_item_id": "fcb4ce8f-ba5c-4969-bfb5-30fb67f15d45"
},
{
"id": "17114e95-8589-4d51-8bc4-fd43c4a3655d",
"quantity": {
"value": "30.0",
"unit": 0
},
"sellable_quantity": {
"value": "0.0",
"unit": 0
},
"inventory_status": 1,
"place_id": "26f3b975-ac94-4810-9ad8-643a2b3aeb79",
"inventory_item_id": "31d0dd07-52e1-46bd-b538-b928b3f2198a"
},
{
"id": "82e3f8ce-8da7-434f-bcbd-f0139cdda084",
"quantity": {
"value": "15.0",
"unit": 0
},
"sellable_quantity": {
"value": "0.0",
"unit": 0
},
"inventory_status": 2,
"place_id": "59cf8b9c-78c2-499d-aff1-8d21c022d3e4",
"inventory_item_id": "e4bdee93-f82e-444f-9b02-ce2bc308f5b9"
},
{
"id": "45b10003-6137-4e6a-add5-9e5bc2e783a0",
"quantity": {
"value": "5.0",
"unit": 0
},
"sellable_quantity": {
"value": "0.0",
"unit": 0
},
"inventory_status": 3,
"place_id": "77755ba4-6437-4f75-a482-cbf7ee69b70a",
"inventory_item_id": "dc558fe9-7c1f-41c3-ba90-fe4d602e57ca"
},
{
"id": "021d3064-118f-42ef-91c5-57b9c89393b5",
"quantity": {
"value": "7.0",
"unit": 0
},
"sellable_quantity": {
"value": "7.0",
"unit": 0
},
"inventory_status": 0,
"place_id": "d4668dd4-ea5f-49b2-8acf-6b1defc4db6e",
"inventory_item_id": "71e0b194-647e-443c-98a5-dd2c01af116e"
}
]
},
"additional_materials": [],
"inventory_item_places": [
{
"id": "45b10003-6137-4e6a-add5-9e5bc2e783a0",
"quantity": {
"value": "5.0",
"unit": 0
},
"sellable_quantity": {
"value": "0.0",
"unit": 0
},
"inventory_status": 3,
"place_id": "77755ba4-6437-4f75-a482-cbf7ee69b70a",
"inventory_item_id": "dc558fe9-7c1f-41c3-ba90-fe4d602e57ca"
}
]
}
],
"meta": {
"total": 1
}
}
Place ¶
- Attributes
- id (string) - The place ID.
- name (string)
- description (string)
- products_count (number) - An Integer representing the products amount associated with the place.
- inventory_status (number) - An Enum indicating the place’s inventory status. The valid options are:
- 0: For Sale
- 1: Not For Sale
- 2: Locked
- 3: Quarantined
- 4: On Hold
Places Collection ¶
Places CollectionGET/places{?limit}{?offset}{?by_inventory_status}
Example URI
- limit
number
(optional) Example: 10The maximum number of places to return.
- offset
number
(optional) Example: 0The number of places to skip before returning places.
- by_inventory_status
number
(optional)(number) - An Enum indicating the place’s Inventory status to filter.
-
0: For Sale
-
1: Not For Sale
-
2: Locked
-
3: Quarantined
-
4: On Hold
-
Headers
Authorization: Token token="{your_token}"
200
Headers
Content-Type: application/json
Body
{
"places": [
{
"id": "d4668dd4-ea5f-49b2-8acf-6b1defc4db6e",
"name": "Sales Floor",
"description": "Inventory Items available for sale",
"inventory_status": 0,
"products_count": 6
}
]
}
Create PlacePOST/places
Example URI
Headers
Content-Type: application/json
Authorization: Token token="{your_token}"
Body
{
"place": {
"name": "Avitas",
"description": "Avitas Candies",
"inventory_status": 0
}
}
201
Headers
Content-Type: application/json
Body
{
"place": {
"id": "33739736-3b6d-48bc-9169-a97d445c66a7",
"name": "Avitas",
"description": "Avitas Candies",
"inventory_status": 0,
"products_count": 0
}
}
Place ¶
View a Place's DetailGET/places/{place_id}
Example URI
- place_id
string
(required)ID of the place
Headers
Authorization: Token token="{your_token}"
200
Headers
Content-Type: application/json
Body
{
"place": {
"id": "d4668dd4-ea5f-49b2-8acf-6b1defc4db6e",
"name": "Sales Floor",
"description": "Inventory Items available for sale",
"inventory_status": 0,
"products_count": 6
}
}
Update PlacePUT/places/{place_id}
Example URI
- place_id
string
(required)ID of the place
Headers
Content-Type: application/json
Authorization: Token token="{your_token}"
Body
{
"place": {
"id": "bbd87743-73df-42d9-80b2-df1b6a645a2d",
"name": "Avitas 2",
}
}
204
Product ¶
- Attributes
- id (string) - The product ID.
- name (string)
- sell_price (number) - An Integer representing the sell price in cents.
- patient_sell_price (number) - An Integer representing the patient sell price in cents, if applicable.
- member_sell_price (number) - An Integer representing the member sell price in cents, if applicable.
- quantity - value (string) and unit (integer) representing product quantity.
- pricing_type (number) - An Enum indicating how this product is priced. The valid options are:
- 0: Priced by unit
- 1: Priced by gram
- product_type_id (string)
- brand_id (string)
- strain_id (string)
- vendor_id (integer)
- active (boolean) - A boolean indicating whether this product is active.
- latest_sku (string) - A string representing the last sku attached to this product.
- category_id (string)
- tags (array)
- description (string) - A string description of the product.
- internal_notes (string) - A string for internal notes. This value is never displayed to the customer.
- metadata (json) - A JSON field that you can use to store metadata about the product.
- weight (weight) - The weight of the product, to be used for compliance validation and display.
- value (string)
- unit (number) - An Enum indicating the weight unit. The valid options are:
- 0: Gram
- 1: Ounce
- test_results_thc (string) - THC percentage (10% being represented at 0.10) of this product.
- test_results_cbd (string) - CBD percentage (10% being represented at 0.10) of this product.
- flower_type (number) - An Enum indicating the product’s flower type. The valid options are:
- 0: Indica
- 1: Sativa
- 2: Hybrid
- 3: Indica Hybrid
- 4: Sativa Hybrid
- concentrate_type (number) - An Enum indicating the product’s concentrate type. The valid options are:
- 0: Wax
- 1: Shatter
- 2: Live Resin
- 3: Rosin
- 4: Hash
- 5: Cartridges
- 6: Tankers
- 7: Kief
- 8: RSO
- 9: Oil
- 10: Distillate
- inventory_item_places (array)
- quantities_by_place (array)
Product ¶
View a Product's DetailGET/products/{product_id}
Example URI
- product_id
string
(required)ID of the product
Headers
Authorization: Token token="{your_token}"
200
Headers
Content-Type: application/json
Body
{
"product": {
"id": "27902a2d-b447-4730-b83e-465e2176acd6",
"sku": null,
"name": "Bic Lighter",
"sell_price": 100,
"patient_sell_price": null,
"member_sell_price": null,
"quantity": {
"value": "10.0",
"unit": 5
},
"pricing_type": 0,
"active": true,
"status": 1,
"latest_sku": "070330641235",
"weight": null,
"tags": [],
"description": null,
"internal_notes": null,
"metadata": null,
"test_results_thc": null,
"test_results_cbd": null,
"flower_type": null,
"concentrate_type": null,
"unit_of_measure": 5,
"price_at_register": false,
"base_price": null,
"velocity": {
"value": "0.0",
"unit": 5
},
"wholesale_value": 0,
"par": null,
"discountable": true,
"patient_price_enabled": false,
"member_price_enabled": false,
"tier_price": 100,
"quantities_by_place": [
{
"inventory_status": 0,
"name": "Sales Floor",
"quantity": {
"value": "10.0",
"unit": 5
}
}
],
"category_id": "624119e3-5f98-4d12-a252-c53fb07d7aa0",
"brand_id": "00000000-38ab-469a-9789-9b5300000002",
"strain_id": null,
"product_type_id": "96fa8028-cd3e-415a-927a-bc7c657c591f",
"vendor_id": null,
"tiered_pricing_model_id": null,
"images": [],
"inventory_item_places": [
{
"id": "87a48e41-f48a-4fd2-ac28-3d245b9d9736",
"quantity": {
"value": "10.0",
"unit": 5
},
"sellable_quantity": {
"value": "10.0",
"unit": 5
},
"inventory_status": 0,
"place_id": "d4668dd4-ea5f-49b2-8acf-6b1defc4db6e",
"inventory_item_id": "1eac44cb-adb5-4ae2-80c0-aa0533fcef46"
}
]
}
}
Products Collection ¶
List All ProductsGET/products{?limit}{?offset}{?active}{?by_active}{?mj}{?para}{?by_name}{?by_vendor}{?by_category}{?by_sku}{?by_lot_number}{?by_product_type}{?by_brand}{?by_strain}{?by_discountable}
Example URI
- limit
number
(optional) Example: 10The maximum number of products to return.
- offset
number
(optional) Example: 0The number of products to skip before returning products.
- active
boolean
(optional) Example: trueOnly return active products. DEPRECATED
- by_active
boolean
(optional) Example: trueReturns products in the provided active state.
- mj
boolean
(optional) Example: trueOnly return products that are reported with the state.
- para
boolean
(optional) Example: falseOnly return products that are not reported with the state.
- by_discountable
boolean
(optional) Example: trueReturns products that can or cannot be discounted.
- by_name
string
(optional) Example: Bubba Kush, 1gFilter results by products matching this name.
- by_vendor
string
(optional) Example: BMFFilter results by products matching this vendor name.
- by_category
string
(optional) Example: 077dd560-0619-4559-8615-bde755c5a0f5Filter results by products matching this category ID.
- by_sku
string
(optional) Example: 1234Filter results by products that contain inventory items matching this SKU.
- by_lot_number
string
(optional) Example: 1234123412341234Filter results by products that contain inventory items matching this lot number.
- by_product_type
string
(optional) Example: 98f1bf43-4422-4f61-9ba9-5796e7a62edfFilter results by products matching this product type ID.
- by_brand
string
(optional) Example: AfgooFilter results by products that matching this brand name.
- by_strain
string
(optional) Example: Jack HererFilter results by products that matching this strain name.
- sort_by[field]
string
(optional) Example: vendorSorts results by the field specified.
Choices:
name
product_type
quantity
sell_price
vendor
- sort_by[direction]
string
(optional) Default: asc Example: descTakes the sorted results and arranges them in the specified direction.
This is only applied when the
sort_by[field]
params is provided.Choices:
asc
desc
- by_quantity[quantity]
string
(optional) Example: 0Filter results by products matching this quantity.
There are three options for this value:
-
Single number:
0
Filter results by comparing to a single value. -
Range:
0,10
Filter results by quantity included in this range. You must use thebetween
comparator in theby_quantity[comparator]
parameter. -
List:
0,10,20
Filter results by quantity that matches a number in this list. You must use thein
comparator in theby_quantity[comparator]
parameter.
In any case, you are required to specify the comparator in the
by_quantity[comparator]
parameter.-
- by_quantity[comparator]
string
(optional) Example: <Specifies the comparator to use when filtering by quantity.
Choices:
<
<=
=
>=
>
between
in
- by_sell_price[sell_price]
string
(optional) Example: 2000Filter results by products matching this sell price.
There are three options for this value:
-
Single price:
1000
Filter results by comparing to a single price. -
Range:
1000,2000
Filter results by sell price included in this range. You must use thebetween
comparator in theby_sell_price[comparator]
parameter. -
List:
0,1000,2000
Filter results by sell price that matches a price in this list. You must use thein
comparator in theby_sell_price[comparator]
parameter.
In any case, you are required to specify the comparator in the
by_sell_price[comparator]
parameter.-
- by_sell_price[comparator]
string
(optional) Example: <Specifies the comparator to use when filtering by sell price.
Choices:
<
<=
=
>=
>
between
in
- by_test_results_thc[test_results_thc]
string
(optional) Example: 0.1Filter results by products matching this THC test result.
There are three options for this value:
-
Single price:
0.1
Filter results by comparing to a single percentage. -
Range:
0.1,0.2
Filter results by test results included in this range. You must use thebetween
comparator in theby_test_results_thc[comparator]
parameter. -
List:
0,0.1,0.2
Filter results by test results that matches a price in this list. You must use thein
comparator in theby_test_results_thc[comparator]
parameter.
In any case, you are required to specify the comparator in the
by_test_results_thc[comparator]
parameter.-
- by_test_results_thc[comparator]
string
(optional) Example: <Specifies the comparator to use when filtering by THC test results.
Choices:
<
<=
=
>=
>
between
in
- by_test_results_cbd[test_results_cbd]
string
(optional) Example: 0.1Filter results by products matching this CBD test result.
There are three options for this value:
-
Single price:
0.1
Filter results by comparing to a single percentage. -
Range:
0.1,0.2
Filter results by test results included in this range. You must use thebetween
comparator in theby_test_results_cbd[comparator]
parameter. -
List:
0,0.1,0.2
Filter results by test results that matches a price in this list. You must use thein
comparator in theby_test_results_cbd[comparator]
parameter.
In any case, you are required to specify the comparator in the
by_test_results_cbd[comparator]
parameter.-
- by_test_results_cbd[comparator]
string
(optional) Example: <Specifies the comparator to use when filtering by CBD test results.
Choices:
<
<=
=
>=
>
between
in
Headers
Authorization: Token token="{your_token}"
200
Headers
Content-Type: application/json
Body
{
"products": [
{
"id": "27902a2d-b447-4730-b83e-465e2176acd6",
"sku": null,
"name": "Bic Lighter",
"sell_price": 100,
"patient_sell_price": null,
"member_sell_price": null,
"quantity": {
"value": "10.0",
"unit": 5
},
"pricing_type": 0,
"active": true,
"status": 1,
"latest_sku": "070330641235",
"weight": null,
"tags": [],
"description": null,
"internal_notes": null,
"metadata": null,
"test_results_thc": null,
"test_results_cbd": null,
"flower_type": null,
"concentrate_type": null,
"unit_of_measure": 5,
"price_at_register": false,
"base_price": null,
"velocity": {
"value": "0.0",
"unit": 5
},
"wholesale_value": 0,
"par": null,
"discountable": true,
"patient_price_enabled": false,
"member_price_enabled": false,
"tier_price": 100,
"quantities_by_place": [
{
"inventory_status": 0,
"name": "Sales Floor",
"quantity": {
"value": "10.0",
"unit": 5
}
}
],
"category_id": "624119e3-5f98-4d12-a252-c53fb07d7aa0",
"brand_id": "00000000-38ab-469a-9789-9b5300000002",
"strain_id": null,
"product_type_id": "96fa8028-cd3e-415a-927a-bc7c657c591f",
"vendor_id": null,
"tiered_pricing_model_id": null,
"images": [],
"inventory_item_places": [
{
"id": "87a48e41-f48a-4fd2-ac28-3d245b9d9736",
"quantity": {
"value": "10.0",
"unit": 5
},
"sellable_quantity": {
"value": "10.0",
"unit": 5
},
"inventory_status": 0,
"place_id": "d4668dd4-ea5f-49b2-8acf-6b1defc4db6e",
"inventory_item_id": "1eac44cb-adb5-4ae2-80c0-aa0533fcef46"
}
]
},
{
"id": "8cce6c6d-20be-434c-8e6a-b6eddb211d88",
"sku": null,
"name": "Bubba Kush, 1g",
"sell_price": 1800,
"patient_sell_price": null,
"member_sell_price": null,
"quantity": {
"value": "50.0",
"unit": 0
},
"pricing_type": 0,
"active": true,
"status": 1,
"latest_sku": "1234567890123456",
"weight": {
"value": "1.0",
"unit": 0
},
"tags": [],
"description": null,
"internal_notes": null,
"metadata": null,
"test_results_thc": "0.2",
"test_results_cbd": "0.003",
"flower_type": 1,
"concentrate_type": null,
"unit_of_measure": 5,
"price_at_register": false,
"base_price": null,
"velocity": {
"value": "0.0",
"unit": 5
},
"wholesale_value": 0,
"par": null,
"discountable": true,
"patient_price_enabled": false,
"member_price_enabled": false,
"tier_price": 1800,
"quantities_by_place": [
{
"inventory_status": 0,
"name": "Sales Floor",
"quantity": {
"value": "50.0",
"unit": 0
}
}
],
"category_id": "76f4b09d-a49a-4e83-bdc7-7424ffe6ee4f",
"brand_id": "0cf19eeb-cfea-4123-b62d-60d4d6f9da4a",
"strain_id": "df05ec1a-2020-42e8-adbe-621efb762a1b",
"product_type_id": "882d74f6-d0fa-4abb-a962-02c32f229fb0",
"vendor_id": "0db341f3-3eee-4715-bdb9-2d9e7192d414",
"tiered_pricing_model_id": null,
"images": [],
"inventory_item_places": [
{
"id": "c423d074-ad40-453b-aa2e-08810fe4e89c",
"quantity": {
"value": "50.0",
"unit": 0
},
"sellable_quantity": {
"value": "50.0",
"unit": 0
},
"inventory_status": 0,
"place_id": "d4668dd4-ea5f-49b2-8acf-6b1defc4db6e",
"inventory_item_id": "43cc0d72-d8b2-4899-bb1f-a19654a6efa0"
}
]
}
],
"meta": {
"total": 5
}
}
Product Type ¶
- Attributes
- id (string)
- name (string)
- traceability_type (number) - An Enum indicating the corresponding traceability type. The valid options are:
- 0: Other
- 1: Usable Marijuana
- 2: Solid Marijuana Infused Edible
- 3: Liquid Marijuana Infused Edible
- 4: Marijuana Extract for Inhalation
- 5: Marijuana Infused Topicals
- 6: Sample
- can_edit_weight (boolean) - Whether or not to track weight for products of this type.
- can_edit_strain (boolean) - Whether or not to track strain for products of this type.
- can_edit_test_results (boolean) - Whether or not to track test results for products of this type.
- can_edit_flower_type (boolean) - Whether or not to track flower type for products of this type.
- can_edit_concentrate_type (boolean) - Whether or not to track concentrate type for products of this type.
- is_marijuana (boolean) - Whether or not this product type is marijuana.
- tax_item_ids (array) - The tax items that apply to this product type.
- test_results_unit (number) - An Enum indicating the corresponding test result unit type. The valid options are:
- 0: Percent
- 1: Milligrams
Product Types Collection ¶
Product Types CollectionGET/product_types
Example URI
Headers
Authorization: Token token="{your_token}"
200
Headers
Content-Type: application/json
Body
{
"product_types": [
{
"id": "cefadd3f-2d1a-4d99-bb94-d27bae6f0455",
"name": "Flower",
"traceability_type": 1,
"can_edit_weight": true,
"can_edit_strain": true,
"can_edit_test_results": true,
"can_edit_flower_type": true,
"can_edit_concentrate_type": false,
"is_marijuana": true,
"tax_item_ids": [
"d3b48c9a-03eb-4f5a-ad92-0f1889635799",
"348df55f-e1eb-476f-a6cc-3f9e4fd2b166"
],
"color": 0,
"test_results_unit": 0,
}
]
}
Brand ¶
- Attributes
- id (string)
- name (string)
- location_id (string)
Brands Collection ¶
Brands CollectionGET/brands{?limit}{?offset}{?by_name}
Example URI
- limit
number
(optional) Example: 10The maximum number of brands to return.
- offset
number
(optional) Example: 0The number of brands to skip before returning brands.
- by_name
string
(optional) Example: AfgooReturn Brands that contain this string in their name.
- sort_by[field]
string
(optional) Example: nameSorts results by the field specified.
Choices:
name
- sort_by[direction]
string
(optional) Default: asc Example: descTakes the sorted results and arranges them in the specified direction.
This is only applied when the
sort_by[field]
params is provided.Choices:
asc
desc
Headers
Authorization: Token token="{your_token}"
200
Headers
Content-Type: application/json
Body
{
"brands": [
{
"id": "0cf19eeb-cfea-4123-b62d-60d4d6f9da4a",
"name": "Weedies",
"location_id": "45c169be-6305-467f-a37d-e633607e45ca"
}
]
}
Create BrandPOST/brands
Example URI
Headers
Content-Type: application/json
Authorization: Token token="{your_token}"
Body
{
"brand": {
"id": "bbd87743-73df-42d9-80b2-df1b6a645a2c",
"name": "GloboChem",
}
}
201
Headers
Content-Type: application/json
Body
{
"brand": {
"id": "bbd87743-73df-42d9-80b2-df1b6a645a2c",
"name": "GloboChem",
"location_id": "45c169be-6305-467f-a37d-e633607e45ca"
}
}
Brand Item ¶
Show BrandGET/brands/{id}
Example URI
- id
string
(required) Example: bbd87743-73df-42d9-80b2-df1b6a645a2cThe ID of the brand to show.
Headers
Authorization: Token token="{your_token}"
200
Headers
Content-Type: application/json
Body
{
"brand": {
"id": "bbd87743-73df-42d9-80b2-df1b6a645a2c",
"name": "GloboChem",
"location_id": "45c169be-6305-467f-a37d-e633607e45ca"
}
}
Update BrandPUT/brands/{id}
Example URI
- id
string
(required) Example: bbd87743-73df-42d9-80b2-df1b6a645a2cThe ID of the brand to show.
Headers
Content-Type: application/json
Authorization: Token token="{your_token}"
Body
{
"brand": {
"id": "bbd87743-73df-42d9-80b2-df1b6a645a2d",
"name": "GloboChem2",
}
}
204
Patients ¶
Patients ¶
PatientsGET/patients
Example URI
Headers
Authorization: Basic {basic_auth_token}
200
Body
{
"patients": [
{
"id": "229C0E38-4F05-4CBD-A826-1CB13CD2C2F5",
"first_name": "John",
"last_name": "Smith",
"email": "john@example.com",
"phone": "123-456-7890",
"id_number": "12345",
"birth_date": "1948-02-08",
"expiration_date": "2017-02-26",
"caregiver_id_number": "",
"caregiver_first_name": null,
"caregiver_last_name": null,
"loyalty_points": 4112,
"carry_limit": {
"value": "4.0",
"unit": 1
},
"membership_date": "2017-02-15",
"plant_count": 5,
"driver_license_number": null,
"driver_license_state": null,
"driver_license_zip_code": null,
"driver_license_expiration_date": null,
"physician_name": null,
"location_id": "45c169be-6305-467f-a37d-e633607e45ca",
"account_id": "729d90ee-cd16-46cd-a675-54d35eeb6407",
"file_attachments": [
{
"id": "78381771-9687-4dde-899f-26cc571f14fd",
"file_file_name": "dl-test.png",
"file_content_type": "image/png"
}
]
}
]
}
Packages ¶
Packages ¶
PackagesGET/packages
Example URI
Headers
Authorization: Basic {basic_auth_token}
200
Body
{
"packages": [
{
"id": "df87bf1f-cd23-4bd0-8061-a7416fb7e172",
"status": 0,
"lot_number": "1234567890123456",
"previous_status": null,
"last_status_update_at": null,
"quantity": {
"value": "-8.0",
"unit": 5
},
"inventory_items": [
{
"id": "05d650b2-2e57-4900-91f8-d0d08d8fbba5",
"sku": "1234567890123456",
"quantity": {
"value": "-8.0",
"unit": 5
},
"weight": null,
"purchase_price": null,
"lot_number": "1234567890123456",
"sell_type": 0,
"sample": false,
"transferred_out": false,
"received_at": null,
"metadata": null,
"test_results_thc": null,
"test_results_cbd": null,
"medical": false,
"sample_type": 0,
"velocity": {
"value": "0.0",
"unit": 5
},
"producer_name": null,
"harvest_lot_number": null,
"harvest_date": null,
"test_lab_name": null,
"test_batch_number": null,
"test_analysis_dates": null,
"pesticides_text": null,
"ingredients_text": null,
"test_results_max_thc": null,
"test_results_max_cbd": null,
"strain": "Bubba Kush",
"product_type_name": "Flower",
"flower_type": "Sativa",
"medical_subtype": null,
"cultivator_license_number": null,
"test_results_cbn": null,
"test_results_max_cbn": null,
"test_results_terpenoid_profile": {},
"expiration_date": null,
"packaged_date": null,
"process_disclosure": null,
"test_results_total_thc": null,
"test_results_total_cbd": null,
"traceable": true,
"traceable_amount": {
"value": "1.0",
"unit": 5
},
"product": {
"id": "7fc758c5-9c0c-4b56-b824-29c9a57c45f1",
"name": "Bubba Kush, 1g",
"sell_price": 1800,
"patient_sell_price": null,
"member_sell_price": null,
"quantity": {
"value": "-8.0",
"unit": 5
},
"pricing_type": 0,
"active": true,
"latest_sku": "1234567890123456",
"weight": {
"value": "1.0",
"unit": 0
},
"tags": [],
"description": null,
"internal_notes": null,
"metadata": null,
"test_results_thc": "0.2",
"test_results_cbd": "0.003",
"flower_type": 1,
"concentrate_type": null,
"unit_of_measure": 5,
"price_at_register": false,
"base_price": null,
"velocity": {
"value": "0.0",
"unit": 5
},
"wholesale_value": 0,
"par": null,
"discountable": true,
"category_id": "68779e52-0636-4337-ad19-a6928ffeff70",
"brand_id": "0cf19eeb-cfea-4123-b62d-60d4d6f9da4a",
"strain_id": "df05ec1a-2020-42e8-adbe-621efb762a1b",
"product_type_id": "cefadd3f-2d1a-4d99-bb94-d27bae6f0455",
"vendor_id": "0db341f3-3eee-4715-bdb9-2d9e7192d414",
"tiered_pricing_model_id": null
}
}
]
}
]
}
Person Types ¶
- Attributes
- id (string)
- name (string)
- medical (boolean) - Whether or not this person type is medical.
- tax_item_ids (array) - The uuids for tax items that apply to this product type.
Person Groups ¶
Person GroupGET/person_groups
Example URI
Headers
Authorization: Basic {basic_auth_token}
200
Body
{
"person_group": [
{
"id": "bf87cf1r-cd23-4bd0-8161-j7416fb7e172",
"name": 'CA Patient',
"medical": 'true'
"tax_items": [
"d3b48c9a-03eb-4f5a-ad92-0f1889635799",
"348df55f-e1eb-476f-a6cc-3f9e4fd2b166"
]
}
]
}
Loyalty Programs ¶
Loyalty Programs ¶
Loyalty Programs CollectionGET/loyalty_programs
Example URI
Headers
Authorization: Basic {basic_auth_token}
200
Body
{
"loyalty_programs": [
{
"id": "84944175-3525-428b-ab58-d21d1fc43b0f",
"loyalty_program_type": 1,
"loyalty_points_per": 10
}
]
}
File Attachments ¶
File Attachments ¶
File Attachments CollectionGET/file_attachments
Example URI
Headers
Authorization: Basic {basic_auth_token}
200
Body
{
"file_attachments": [
{
"id": "c6d93346-d81c-45a7-b179-7206958de416",
"file_file_name": "enable-queue.png",
"file_content_type": "image/png"
},
{
"id": "78381771-9687-4dde-899f-26cc571f14fd",
"file_file_name": "dl-test.png",
"file_content_type": "image/png"
},
{
"id": "3299a47f-8c0f-4efb-aecc-6aa5e86af7ab",
"file_file_name": "Invoice INV-6273.pdf",
"file_content_type": "application/pdf"
}
]
}
Employee ¶
Employees ¶
Employees CollectionGET/employees
Example URI
Headers
Authorization: Basic {basic_auth_token}
200
Body
{
"employees": [
{
"id": "5cbfd3d3-4ae2-42c5-8a87-0575c0e08869",
"first_name": "Jason",
"last_name": "Swett",
"email": null,
"phone": null,
"id_number": "893578",
"birth_date": "1912-12-12",
"hire_date": "2016-01-01",
"loyalty_points": null,
"driver_license_number": null,
"driver_license_state": null,
"driver_license_zip_code": null,
"driver_license_expiration_date": null,
"location_id": "45c169be-6305-467f-a37d-e633607e45ca",
"account_id": "729d90ee-cd16-46cd-a675-54d35eeb6407",
"file_attachments": []
}
]
}
Shift ¶
Shifts ¶
Create ShiftPOST/shifts
Example URI
Headers
Authorization: Basic {basic_auth_token}
X-GB-DeviceId: {valid device identifier}
Body
{
"shift": {
"employee_id": "8eaa4c82-5c6f-49be-9707-2db7442343ca",
"open_amount": 0
}
}
200
Body
{
"shift": {
"id": "20538085-9026-42b3-96cb-ad756364f3bc",
"device_name": "Jason's iPad",
"opened_at": "2017-11-08T20:04:13.277Z",
"closed_at": null,
"locked": false,
"number_of_transactions": 0,
"employee_name": "GB Admin",
"note": null,
"open_amount": 0,
"close_drop_amount": null,
"close_drawer_amount": null,
"close_note": null,
"receipt_id": "279E1B3B181B",
"device_id": "1f969a00-da41-4f1c-b26b-70c5b3dff8a7",
"employee_id": "8eaa4c82-5c6f-49be-9707-2db7442343ca"
}
}
Push Notification ¶
Push Notifications Collection ¶
Push Notifications CollectionGET/push_notifications
Example URI
Headers
Authorization: Basic {basic_auth_token}
200
Headers
Content-Type: application/json
Body
{
"push_notifications": [
{
"id": "32c56140-8ff3-4538-8939-a53b36c1b2f3",
"event": "update",
"data": {
"model": "InventoryItem",
"id": "73732e5e-8bae-421b-ab5e-1d91de54387a",
"sequence_id": 15
}
},
{
"id": "ca3720aa-a983-451d-ac02-24aa294f3c7f",
"event": "update",
"data": {
"model": "InventoryItem",
"id": "73732e5e-8bae-421b-ab5e-1d91de54387a",
"sequence_id": 16
}
},
{
"id": "fdedd7b1-7045-4786-8c9f-ba9f70f5b20c",
"event": "update",
"data": {
"model": "InventoryItem",
"id": "73732e5e-8bae-421b-ab5e-1d91de54387a",
"sequence_id": 17
}
},
{
"id": "5263c7b9-482d-465e-9271-161ba1dce8e6",
"event": "update",
"data": {
"model": "InventoryItem",
"id": "73732e5e-8bae-421b-ab5e-1d91de54387a",
"sequence_id": 18
}
},
{
"id": "fca0ce94-89a2-490f-aec9-68f78eb363f9",
"event": "create",
"data": {
"model": "Brand",
"id": "bbd87743-73df-42d9-80b2-df1b6a645a2c",
"sequence_id": 19
}
},
{
"id": "c3143405-060e-40a5-8f68-e5288390c395",
"event": "update",
"data": {
"model": "Brand",
"id": "bbd87743-73df-42d9-80b2-df1b6a645a2d",
"sequence_id": 20
}
},
{
"id": "36defdec-52d8-4d10-a7e1-a8bff1079114",
"event": "create",
"data": {
"model": "Strain",
"id": "bbd87743-73df-42d9-80b2-df1b6a645a2c",
"sequence_id": 21
}
},
{
"id": "3d1e8d60-a7a9-4204-8f57-233e146e7bb4",
"event": "create",
"data": {
"model": "Order",
"id": "6bfa824b-da03-4cf3-a85d-3cda74ed7f6f",
"sequence_id": 22
}
},
{
"id": "d416607f-45c5-4438-ac09-761aec1785ff",
"event": "create",
"data": {
"model": "LineItem",
"id": "391d9bf6-6398-41fc-9d4d-dc2143989dd4",
"sequence_id": 23
}
},
{
"id": "99b516ef-a05c-476a-924f-e6b6aaf9c19a",
"event": "create",
"data": {
"model": "Order",
"id": "0b363912-0898-48e0-ba88-43b4be337154",
"sequence_id": 24
}
},
{
"id": "3225aeeb-44ae-438d-95cb-55f2a8b0ee8e",
"event": "create",
"data": {
"model": "LineItem",
"id": "92751511-82d2-4871-b89e-10ce39913e4d",
"sequence_id": 25
}
},
{
"id": "babe2526-251f-4759-b614-9e152d87babb",
"event": "create",
"data": {
"model": "Order",
"id": "eb19909f-c121-45b9-a413-616683ff22de",
"sequence_id": 26
}
},
{
"id": "d420f5f5-20b5-48d1-9ef9-8157fe29f65c",
"event": "create",
"data": {
"model": "LineItem",
"id": "525f5d5c-c422-43b7-b6d2-a59f1b5fbabe",
"sequence_id": 27
}
},
{
"id": "274a0ada-7302-407f-a437-0739c7a1ab9b",
"event": "create",
"data": {
"model": "Order",
"id": "68221345-9dc4-4968-8e7b-a9f1184dd89a",
"sequence_id": 28
}
},
{
"id": "754afbc4-bcaf-4e10-99e0-756f2a6b4053",
"event": "create",
"data": {
"model": "LineItem",
"id": "d052ca83-3e33-4cc9-ba45-e95e6c811dee",
"sequence_id": 29
}
},
{
"id": "8d808fe3-cc57-4c68-9049-44bfdeb57407",
"event": "create",
"data": {
"model": "Order",
"id": "b1e7697f-c572-4759-b6c5-03179b9d7e62",
"sequence_id": 30
}
},
{
"id": "d8fdb25e-4348-4bcf-a217-83901da55fec",
"event": "create",
"data": {
"model": "LineItem",
"id": "03607586-5842-4141-9638-85ad941481d0",
"sequence_id": 31
}
},
{
"id": "f3c40d68-7f47-4f00-97a5-612e285ab25c",
"event": "create",
"data": {
"model": "Order",
"id": "6e26ad81-d870-4cf8-b85c-bd8ca65327e0",
"sequence_id": 32
}
},
{
"id": "c4d96aaf-cfd0-4be7-aced-3129d40edf06",
"event": "create",
"data": {
"model": "LineItem",
"id": "67dca0a4-5baf-4dfc-8c07-7b5ad0a0a45b",
"sequence_id": 33
}
},
{
"id": "02c176d4-126d-46e4-8f7b-66500db4a44d",
"event": "create",
"data": {
"model": "Order",
"id": "a4f34c31-b195-424c-bc5b-daef58fddf4f",
"sequence_id": 34
}
},
{
"id": "13481b5a-44ac-4f2b-9e77-362c24fd8d31",
"event": "create",
"data": {
"model": "LineItem",
"id": "97e746bc-2128-4236-993c-fcf8c753243a",
"sequence_id": 35
}
}
]
}
Strain ¶
- Attributes
- id (string)
- name (string)
- location_id (string)
Strains Collection ¶
Strains CollectionGET/strains{?limit}{?offset}{?by_name}
Example URI
- limit
number
(optional) Example: 10The maximum number of strains to return.
- offset
number
(optional) Example: 0The number of strains to skip before returning strains.
- by_name
string
(optional) Example: Jack HererReturn Strains that contain this string in their name.
- sort_by[field]
string
(optional) Example: nameSorts results by the field specified.
Choices:
name
- sort_by[direction]
string
(optional) Default: asc Example: descTakes the sorted results and arranges them in the specified direction.
This is only applied when the
sort_by[field]
params is provided.Choices:
asc
desc
Headers
Authorization: Token token="{your_token}"
200
Headers
Content-Type: application/json
Body
{
"strains": [
{
"id": "df05ec1a-2020-42e8-adbe-621efb762a1b",
"name": "Bubba Kush",
"location_id": "45c169be-6305-467f-a37d-e633607e45ca"
}
]
}
Create StrainPOST/strains
Example URI
Headers
Content-Type: application/json
Authorization: Token token="{your_token}"
Body
{
"strain": {
"id": "bbd87743-73df-42d9-80b2-df1b6a645a2c",
"name": "Jack Herer"
}
}
201
Headers
Content-Type: application/json
Body
{
"strain": {
"id": "bbd87743-73df-42d9-80b2-df1b6a645a2c",
"name": "Jack Herer",
"location_id": "45c169be-6305-467f-a37d-e633607e45ca"
}
}
Strain Item ¶
Show StrainGET/strains/{id}
Example URI
- id
string
(required) Example: bbd87743-73df-42d9-80b2-df1b6a645a2cThe ID of the strain to show.
Headers
Authorization: Token token="{your_token}"
200
Headers
Content-Type: application/json
Body
{
"strain": {
"id": "bbd87743-73df-42d9-80b2-df1b6a645a2c",
"name": "Jack Herer",
"location_id": "45c169be-6305-467f-a37d-e633607e45ca"
}
}
Update StrainPUT/strains/{id}
Example URI
- id
string
(required) Example: bbd87743-73df-42d9-80b2-df1b6a645a2cThe ID of the strain to show.
Headers
Content-Type: application/json
Authorization: Token token="{your_token}"
Body
{
"strain": {
"id": "bbd87743-73df-42d9-80b2-df1b6a645a2c",
"name": "Afgoo"
}
}
204
Enum Values ¶
Weight
-
0: Gram
-
1: Ounce
-
2: Pound
-
3: Milligram
-
4: Kilogram
-
5: Unit
Order Type
-
0: Sale
-
1: Refund
-
2: Return
-
3: Void
Payment Type
-
0: Cash
-
1: Debit
-
2: Cashless ATM
-
3: Gift Card
-
4: Credit
Loyalty Program Type
-
0: Points per dollar
-
1: Points per order