# Create CRB Create a new CRB and associate with service provider. There are two supported onboarding workflows: 1. Provide POS Credentials Up Front (pos_info) - Use when the CRB has already provided their POS credentials. - Include the pos_info object in your request. - Inviting users is optional. 2. Invite the CRB for In-App Onboarding - Use when you don't have the CRB's POS credentials yet. - Do NOT include pos_info. - MUST include at least one user in the users array to send an invite. Note: You MUST provide either pos_info OR users with at least one entry. You may also provide both. ------------------------- Validation Rules ------------------------- If pos_info is provided: - Org business_type must match pos_type (e.g. wholesale org must use a wholesale POS like "Dutchie Wholesale"). - Credentials must be valid; a test POS call is made. - If the POS requires a location_id, it must be valid. - If missing or invalid, a validation error is returned with valid options. - The org must not already be connected to your account. If pos_info is NOT provided: - At least one user must be included in the users array. ------------------------- Testing Scenarios (Sandbox Only) ------------------------- 1. Provide pos_info with a wholesale POS, but business_type = "retail" → Expect validation error. 2. Provide pos_info with: - pos_type = "Greenbits" - username = "testing" - password = "invalid_testing" → Simulates invalid credentials - password = "testing" → Simulates valid credentials 3. Leave location_id empty → Simulates missing required location, returns available options. 4. Set location_id = "invalidLocation" → Simulates invalid location, returns available options. 5. Set location_id = "testing" → Simulates successful connection (no actual POS connection made). Endpoint: POST /service-providers/{sp_id}/crbs Version: 1.0.0 Security: access_auth ## Path parameters: - `sp_id` (string, required) Service Provider Id ## Request fields (application/json): - `org` (object, required) - `org.business_type` (string, required) Enum: "retail", "wholesale" - `org.state` (string, required) Enumeration of all of the United States Enum: "AL", "AK", "AZ", "AR", "AS", "CA", "CO", "CT", "DE", "DC", "FM", "FL", "GA", "GU", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MH", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "MP", "OH", "OK", "OR", "PW", "PA", "PR", "RI", "SC", "SD", "TN", "TX", "UM", "UT", "VT", "VA", "VI", "WA", "WV", "WI", "WY", "AA", "AE", "AP" - `org.name` (string, required) - `org.monthlyCustomers` (integer) - `org.monthlySales` (integer) - `org.dba` (string) DBA (Doing Business As) - `org.entityType` (string) Enum: "sole", "partnership", "corporation", "llc" - `org.ptEmployees` (integer) - `org.ftEmployees` (integer) - `org.established_date` (string) - `org.website` (string) Website - `org.phone_number` (string) Phone Number - (###) ####-#### - `org.ein` (string) EIN (Employer Identification Number) - ##-####### - `org.mailing_postal_code` (string) Postal Code - `org.mailing_state` (string) Enumeration of all of the United States Enum: "AL", "AK", "AZ", "AR", "AS", "CA", "CO", "CT", "DE", "DC", "FM", "FL", "GA", "GU", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MH", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "MP", "OH", "OK", "OR", "PW", "PA", "PR", "RI", "SC", "SD", "TN", "TX", "UM", "UT", "VT", "VA", "VI", "WA", "WV", "WI", "WY", "AA", "AE", "AP" - `org.mailing_city` (string) City - `org.mailing_street_address` (string) Mailing Street Address - `org.country` (string) Enumeration of all of the countries on Earth Enum: "Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antigua & Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas, The", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia & Herzegovina", "Botswana", "Brazil", "British Virgin Is.", "Brunei", "Bulgaria", "Burkina Faso", "Burma", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Rep.", "Chad", "Chile", "China", "Colombia", "Comoros", "Congo, Dem. Rep.", "Congo, Repub. of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Faroe Islands", "Fiji", "Finland", "France", "French Guiana", "French Polynesia", "Gabon", "Gambia, The", "Gaza Strip", "Georgia", "Germany", "Ghana", "Gibraltar", "Greece", "Greenland", "Grenada", "Guadeloupe", "Guam", "Guatemala", "Guernsey", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Honduras", "Hong Kong", "Hungary", "Iceland", "India", "Indonesia", "Iran", "Iraq", "Ireland", "Isle of Man", "Israel", "Italy", "Jamaica", "Japan", "Jersey", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea, North", "Korea, South", "Kuwait", "Kyrgyzstan", "Laos", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg", "Macau", "Macedonia", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Martinique", "Mauritania", "Mauritius", "Mayotte", "Mexico", "Micronesia, Fed. St.", "Moldova", "Monaco", "Mongolia", "Montserrat", "Morocco", "Mozambique", "Namibia", "Nauru", "Nepal", "Netherlands", "Netherlands Antilles", "New Caledonia", "New Zealand", "Nicaragua", "Niger", "Nigeria", "N. Mariana Islands", "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Poland", "Portugal", "Puerto Rico", "Qatar", "Reunion", "Romania", "Russia", "Rwanda", "Saint Helena", "Saint Kitts & Nevis", "Saint Lucia", "St Pierre & Miquelon", "Saint Vincent and the Grenadines", "Samoa", "San Marino", "Sao Tome & Principe", "Saudi Arabia", "Senegal", "Serbia", "Seychelles", "Sierra Leone", "Singapore", "Slovakia", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "Spain", "Sri Lanka", "Sudan", "Suriname", "Swaziland", "Sweden", "Switzerland", "Syria", "Taiwan", "Tajikistan", "Tanzania", "Thailand", "Togo", "Tonga", "Trinidad & Tobago", "Tunisia", "Turkey", "Turkmenistan", "Turks & Caicos Is", "Tuvalu", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "Uruguay", "Uzbekistan", "Vanuatu", "Venezuela", "Vietnam", "Virgin Islands", "Wallis and Futuna", "West Bank", "Western Sahara", "Yemen", "Zambia", "Zimbabwe" - `org.postal_code` (string) Postal Code - `org.city` (string) City - `org.street_address_2` (string) Street Address 2 - `org.street_address` (string) Street Address - `org.primary_contact_email` (string) Primary contact email of the CRB to help facilitate notification emails. If not provided, default to support - `org.template_id` (string) - `org.timezone` (string) Enum: "America/New_York", "America/Detroit", "America/Kentucky/Louisville", "America/Kentucky/Monticello", "America/Indiana/Indianapolis", "America/Indiana/Vincennes", "America/Indiana/Winamac", "America/Indiana/Marengo", "America/Indiana/Petersburg", "America/Indiana/Vevay", "America/Chicago", "America/Indiana/Tell_City", "America/Indiana/Knox", "America/Menominee", "America/North_Dakota/Center", "America/North_Dakota/New_Salem", "America/North_Dakota/Beulah", "America/Denver", "America/Boise", "America/Phoenix", "America/Los_Angeles", "America/Anchorage", "America/Juneau", "America/Puerto_Rico", "America/Sitka", "America/St_Thomas", "America/Metlakatla", "America/Yakutat", "America/Nome", "America/Adak", "Pacific/Honolulu", "Pacific/Guam", "Pacific/Kosrae", "Pacific/Midway", "Pacific/Pago_Pago", "Pacific/Palau", "Pacific/Kwajalein", "Pacific/Saipan" - `pos_info` (object) - `pos_info.pos_credentials` (any, required) - `pos_info.pos_type` (string, required) Enum: "Alleaves", "BioTrack", "BioTrack Wholesale", "Blaze", "Canix", "Dutchie", "Dutchie Wholesale", "Flourish Wholesale", "Flowhub", "Greenbits", "GrowFlow", "IndicaOnline", "Meadow", "POSaBIT", "Proteus420", "Sage Intacct", "Treez", "Weave" - `pos_info.location_id` (any) Location ID to specify which specific location within the POS is related to this CRB. Optional. If not provided and the selected POS requires location ID, we will return an error message with available locations so that you can provide one and call again - `users` (array) CRB users to invite - `users.email` (string, required) - `users.lastName` (string, required) - `users.firstName` (string, required) - `users.phone` (string) - `options` (object) - `options.onboarding_required` (boolean) True to leave this CRB in pending state. Requires users to be present so that we can invite them to complete onboarding on-app. Defaults to false and CRBs are auto-approved. ## Response 200 fields (application/json): - `id` (string, required) - `name` (string, required) Organization name - `street_address` (string, required) Street Address - `street_address_2` (string,null, required) Street Address 2 - `city` (string,null, required) City - `ein` (string,null, required) Employer Identification Number - `phone_number` (string,null, required) Phone Number - `postal_code` (string,null, required) Postal Code - `country` (string,null, required) Country - `state` (string, required) Enumeration of all of the United States Enum: "AL", "AK", "AZ", "AR", "AS", "CA", "CO", "CT", "DE", "DC", "FM", "FL", "GA", "GU", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MH", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "MP", "OH", "OK", "OR", "PW", "PA", "PR", "RI", "SC", "SD", "TN", "TX", "UM", "UT", "VT", "VA", "VI", "WA", "WV", "WI", "WY", "AA", "AE", "AP" - `website` (string,null, required) Website - `timezone` (string, required) Enum: "America/New_York", "America/Detroit", "America/Kentucky/Louisville", "America/Kentucky/Monticello", "America/Indiana/Indianapolis", "America/Indiana/Vincennes", "America/Indiana/Winamac", "America/Indiana/Marengo", "America/Indiana/Petersburg", "America/Indiana/Vevay", "America/Chicago", "America/Indiana/Tell_City", "America/Indiana/Knox", "America/Menominee", "America/North_Dakota/Center", "America/North_Dakota/New_Salem", "America/North_Dakota/Beulah", "America/Denver", "America/Boise", "America/Phoenix", "America/Los_Angeles", "America/Anchorage", "America/Juneau", "America/Puerto_Rico", "America/Sitka", "America/St_Thomas", "America/Metlakatla", "America/Yakutat", "America/Nome", "America/Adak", "Pacific/Honolulu", "Pacific/Guam", "Pacific/Kosrae", "Pacific/Midway", "Pacific/Pago_Pago", "Pacific/Palau", "Pacific/Kwajalein", "Pacific/Saipan" - `mailing_street_address` (string,null, required) Mailing Street Address - `mailing_city` (string,null, required) Mailing City - `mailing_state` (string,null, required) Mailing State Enum: "AL", "AK", "AZ", "AR", "AS", "CA", "CO", "CT", "DE", "DC", "FM", "FL", "GA", "GU", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MH", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "MP", "OH", "OK", "OR", "PW", "PA", "PR", "RI", "SC", "SD", "TN", "TX", "UM", "UT", "VT", "VA", "VI", "WA", "WV", "WI", "WY", "AA", "AE", "AP" - `mailing_postal_code` (string,null, required) Mailing Postal Code - `established_date` (string,null, required) Date the dispensary was established - `ftEmployees` (integer,null, required) - `ptEmployees` (integer,null, required) - `entityType` (string,null, required) Type of business entity Enum: "sole", "partnership", "corporation", "llc" - `dba` (string,null, required) Doing Business As - `monthlySales` (string,null, required) Estimated amouunt of monthly sales - `monthlyCustomers` (integer,null, required) ## Response 401 fields (application/json): - `name` (string, required) - `message` (string, required) - `status` (number, required) - `stack` (string) - `data` (any) ## Response 403 fields (application/json): - `name` (string, required) - `message` (string, required) - `status` (number, required) - `stack` (string) - `data` (any) ## Response 404 fields (application/json): - `name` (string, required) - `message` (string, required) - `status` (number, required) - `stack` (string) - `data` (any) ## Response 409 fields (application/json): - `name` (string, required) - `message` (string, required) - `status` (number, required) - `stack` (string) - `data` (any) ## Response 422 fields (application/json): - `name` (string, required) - `message` (string, required) - `status` (number, required) - `fields` (object, required) - `stack` (string) - `data` (any)