openapi: 3.2.0 info: title: Green Check Access CRB Info API version: 1.0.0 description: Green Check Access contact: {} servers: - url: https://sandbox-api.greencheckverified.com description: Sandbox server - url: https://prod-api.greencheckverified.com description: Production server tags: - name: CRB Info paths: /service-providers/{sp_id}/crbs/{crb_id}: get: operationId: get-crb-info responses: '200': description: Ok content: application/json: schema: $ref: '#/components/schemas/ServiceProviderCRB' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedError' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/NotFoundError' '422': description: Validation Failed content: application/json: schema: $ref: '#/components/schemas/ValidateError' summary: Get Service Provider CRB tags: - CRB Info security: - access_auth: - service-provider:read - admin parameters: - description: Service Provider Id in: path name: sp_id required: true schema: type: string pattern: ^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$ - description: CRB Id in: path name: crb_id required: true schema: type: string pattern: ^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$ put: operationId: update-crb-info responses: '200': description: Ok content: application/json: schema: $ref: '#/components/schemas/ServiceProviderCRB' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedError' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/NotFoundError' '422': description: Validation Failed content: application/json: schema: $ref: '#/components/schemas/ValidateError' summary: Update business details of a CRB tags: - CRB Info security: - access_auth: - service-provider:read - admin parameters: - description: Service Provider Id in: path name: sp_id required: true schema: type: string pattern: ^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$ - description: CRB Id in: path name: crb_id required: true schema: type: string pattern: ^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$ requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateCrbInput' /service-providers/{sp_id}/crbs/{crb_id}/access: post: operationId: generate-crb-access-creds responses: '200': description: Ok content: application/json: schema: title: GenerateCrbApiCredentialsResponse properties: secret: type: string client_id: type: string required: - secret - client_id type: object '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedError' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/NotFoundError' '422': description: Validation Failed content: application/json: schema: $ref: '#/components/schemas/ValidateError' description: 'Generates GCV Access credentials on behalf of the CRB, allowing the Service Provider to operate their document management API calls.' summary: Generate GCV Access credentials on behalf of a CRB. tags: - CRB Info security: - access_auth: - admin - create-crb-api-key:write parameters: - description: Service Provider Id in: path name: sp_id required: true schema: type: string pattern: ^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$ - description: CRB Id in: path name: crb_id required: true schema: type: string pattern: ^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$ components: schemas: PosConnectionStatus: type: string enum: - Connected - Not Connected - Needs Attention - Pending IANATimezones: 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 type: string EntityType: enum: - sole - partnership - corporation - llc type: string PositiveInteger: type: integer format: int32 minimum: 0 ShortDate: type: string pattern: ^[2][0][0-9]{2}[-]([0][0-9]|[1][0-2])[-]([0-2][0-9]|[3][0-1]) Countries: type: string 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 description: Enumeration of all of the countries on Earth OrganizationType: enum: - bank - dispensary - gcv - transport_vendor - muo - data_integrator_client type: string ValidateError: properties: name: type: string default: Validation Failed message: type: string stack: type: string status: type: number format: double default: 422 fields: $ref: '#/components/schemas/FieldErrors' data: {} required: - name - message - status - fields type: object additionalProperties: false NotFoundError: properties: name: type: string default: Not Found message: type: string stack: type: string status: type: number format: double default: 404 data: {} required: - name - message - status type: object additionalProperties: false DueDiligenceStatus: enum: - bank_disconnected - bank_approved - bank_review_in_progress - bank_awaiting_review - bank_in_progress - bank_pending - gcv_approved - gcv_awaiting_review - gcv_in_progress - gcv_pending - update_required type: string EIN: type: string description: 'EIN (Employer Identification Number) - ##-#######' pattern: ^\d{2}-\d{7}$ UnauthorizedError: properties: name: type: string default: Unauthorized message: type: string stack: type: string status: type: number format: double default: 401 data: {} required: - name - message - status type: object additionalProperties: false UpdateCrbInput: properties: timezone: $ref: '#/components/schemas/IANATimezones' description: Defaults to default for state street_address: type: string description: Street Address street_address_2: type: string description: Street Address 2 city: $ref: '#/components/schemas/City' description: City postal_code: $ref: '#/components/schemas/PostalCode' description: Postal Cod country: $ref: '#/components/schemas/Countries' description: Country mailing_street_address: type: string description: Mailing Street Address mailing_city: $ref: '#/components/schemas/City' description: Mailing City mailing_state: $ref: '#/components/schemas/USStates' description: Mailing State mailing_postal_code: $ref: '#/components/schemas/PostalCode' description: Mailing Postal Code ein: $ref: '#/components/schemas/EIN' description: 'EIN (Employer Identification Number) - ##-#######' phone_number: $ref: '#/components/schemas/PhoneNumber' description: 'Phone Number - (###) ####-####' website: $ref: '#/components/schemas/Website' description: Website established_date: $ref: '#/components/schemas/ShortDate' description: Established Date ftEmployees: $ref: '#/components/schemas/PositiveInteger' description: Full-time Employees ptEmployees: $ref: '#/components/schemas/PositiveInteger' description: Part-time Employees entityType: $ref: '#/components/schemas/EntityType' description: Entity Type dba: type: string description: DBA (Doing Business As) monthlySales: $ref: '#/components/schemas/PositiveInteger' description: Monthly Sales monthlyCustomers: $ref: '#/components/schemas/PositiveInteger' description: Monthly Customers type: object additionalProperties: false City: type: string description: City pattern: ^[a-zA-Z\s.-]+$ PostalCode: type: string description: Postal Code pattern: ^\d{5}(?:[-\s]?\d{4})?$ PhoneNumber: type: string description: 'Phone Number - (###) ####-####' pattern: ^\(\d{3}\)\s\d{3}-\d{4}$ FieldErrors: properties: {} type: object additionalProperties: properties: value: {} message: type: string required: - message type: object Website: type: string description: Website pattern: ^(https?:\/\/)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&=]*) UUID: type: string format: uuid pattern: ^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$ DispensaryBusinessType: type: string enum: - retail - wholesale USStates: description: 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 type: string ForbiddenError: properties: name: type: string default: Forbidden message: type: string stack: type: string status: type: number format: double default: 403 data: {} required: - name - message - status type: object additionalProperties: false UtcDateTime: type: string format: date-time ServiceProviderCRB: properties: id: $ref: '#/components/schemas/UUID' description: ID name: type: string description: Organization name street_address: type: string description: Street Address street_address_2: type: - string - 'null' description: Street Address 2 city: allOf: - $ref: '#/components/schemas/City' description: City type: - string - 'null' ein: allOf: - $ref: '#/components/schemas/EIN' description: Employer Identification Number type: - string - 'null' phone_number: allOf: - $ref: '#/components/schemas/PhoneNumber' description: Phone Number type: - string - 'null' postal_code: allOf: - $ref: '#/components/schemas/PostalCode' description: Postal Code type: - string - 'null' country: type: - string - 'null' description: Country state: $ref: '#/components/schemas/USStates' description: State website: allOf: - $ref: '#/components/schemas/Website' description: Website type: - string - 'null' timezone: $ref: '#/components/schemas/IANATimezones' description: Timezone mailing_street_address: type: - string - 'null' description: Mailing Street Address mailing_city: allOf: - $ref: '#/components/schemas/City' description: Mailing City type: - string - 'null' mailing_state: allOf: - $ref: '#/components/schemas/USStates' description: Mailing State type: - string - 'null' mailing_postal_code: allOf: - $ref: '#/components/schemas/PostalCode' description: Mailing Postal Code type: - string - 'null' established_date: allOf: - $ref: '#/components/schemas/ShortDate' description: Date the dispensary was established type: - string - 'null' ftEmployees: $ref: '#/components/schemas/NullablePositiveInteger' description: Number of full time employees ptEmployees: $ref: '#/components/schemas/NullablePositiveInteger' description: Number of part time employees entityType: allOf: - $ref: '#/components/schemas/EntityType' description: Type of business entity type: - string - 'null' dba: type: - string - 'null' description: Doing Business As monthlySales: type: - string - 'null' description: Estimated amouunt of monthly sales monthlyCustomers: $ref: '#/components/schemas/NullablePositiveInteger' description: Estimated amount of monthly customers org_type: $ref: '#/components/schemas/OrganizationType' description: 'Org Type dispensary = standalone dispensary. MUO stands for Multi-Unit Organization, where the "muo" org is the parent and it''s child orgs have org type dispesary' business_type: allOf: - $ref: '#/components/schemas/DispensaryBusinessType' type: - string - 'null' template_id: $ref: '#/components/schemas/UUID' template_result_id: $ref: '#/components/schemas/UUID' status: $ref: '#/components/schemas/DueDiligenceStatus' pos_configs: items: $ref: '#/components/schemas/AccessPosConfig' type: array required: - id - name - street_address - street_address_2 - city - ein - phone_number - postal_code - country - state - website - timezone - mailing_street_address - mailing_city - mailing_state - mailing_postal_code - established_date - ftEmployees - ptEmployees - entityType - dba - monthlySales - monthlyCustomers - org_type - business_type - template_id - template_result_id - status - pos_configs type: object additionalProperties: false AccessPosConfig: properties: name: $ref: '#/components/schemas/FriendlyPosName' status: $ref: '#/components/schemas/PosConnectionStatus' updated_date: $ref: '#/components/schemas/UtcDateTime' type: string format: date-time required: - name - updated_date type: object additionalProperties: false FriendlyPosName: type: string enum: - Alleaves - Dutchie - Dutchie Wholesale - Cova - Meadow - MJ Freeway - MJ Freeway Wholesale - Greenbits - GrowFlow - GrowFlow Wholesale - Portal42 - Metrc S2S - Metrc S2S Wholesale - Flourish - Flourish Wholesale - Flowhub - BioTrack - BioTrack Wholesale - Treez - Blaze - Quickbooks - Sage Intacct - Canix - Brytemap - POSaBIT - Proteus420 - IndicaOnline - Sweed - Weave - Jane - Manual Upload Wholesale - Cova Test Account - Leaf Logix Test Account - BioTrack Test Account - Mj Freeway Test Account - Treez IO Test Account - Green Bits Test Account - Manual Upload Retail - Not Configured - Unsupported - CRBMonitor - Plaid NullablePositiveInteger: type: - integer - 'null' format: int32 minimum: 0 securitySchemes: access_auth: type: apiKey name: Authorization in: header x-amazon-apigateway-authtype: custom x-amazon-apigateway-authorizer: type: request identitySource: method.request.header.Authorization authorizerUri: Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${AccessAuthorizerLambda.Arn}/invocations authorizerCredentials: Fn::Sub: ${AccessApiGatewayRole.Arn} authorizerResultTtlInSeconds: 60 x-amazon-apigateway-request-validators: all: validateRequestBody: true validateRequestParameters: true params: validateRequestBody: true validateRequestParameters: true body: validateRequestBody: true validateRequestParameters: false x-amazon-apigateway-api-key-source: AUTHORIZER x-tagGroups: - name: '' tags: - Authentication - name: Service Provider tags: - Service Provider - CRB Info - CRB Customers - CRB Documents - CRB Inventory - CRB Inventory Locations - CRB Products - CRB Sales - CRB Templates - name: CRB tags: - CRB - Customers - Documents - Inventory - Inventory Locations - Products - Sales x-amazon-apigateway-gateway-responses: ACCESS_DENIED: statusCode: '403' responseTemplates: application/json: '{"message":"$context.authorizer.context.messageString"}' EXPIRED_TOKEN: statusCode: '403' responseTemplates: application/json: '{"message":"$context.error.message", "details":"EXPIRED_TOKEN"}' INVALID_API_KEY: statusCode: '403' responseTemplates: application/json: '{"message":"$context.error.message", "details":"INVALID_API_KEY"}' INVALID_SIGNATURE: statusCode: '403' responseTemplates: application/json: '{"message":"$context.error.message", "details":"INVALID_SIGNATURE"}' MISSING_AUTHENTICATION_TOKEN: statusCode: '403' responseTemplates: application/json: '{"message":"Missing Authentication Header", "details":"MISSING_AUTHENTICATION_TOKEN"}' QUOTA_EXCEEDED: statusCode: '429' responseTemplates: application/json: '{"message":"$context.error.message", "details":"QUOTA_EXCEEDED"}' REQUEST_TOO_LARGE: statusCode: '413' responseTemplates: application/json: '{"message":"$context.error.message", "details":"REQUEST_TOO_LARGE"}' RESOURCE_NOT_FOUND: statusCode: '404' responseTemplates: application/json: '{"message":"$context.error.message", "details":"RESOURCE_NOT_FOUND"}' THROTTLED: statusCode: '429' responseTemplates: application/json: '{"message":"$context.error.message", "details":"THROTTLED"}' UNAUTHORIZED: statusCode: '401' responseTemplates: application/json: '{"message":"$context.error.message", "details":"UNAUTHORIZED"}' UNSUPPORTED_MEDIA_TYPE: statusCode: '415' responseTemplates: application/json: '{"message":"$context.error.message", "details":"UNSUPPORTED_MEDIA_TYPE"}' DEFAULT_4XX: statusCode: '404' responseTemplates: application/json: '{"message":"The requested URL is invalid"}' INTEGRATION_FAILURE: statusCode: '404' responseTemplates: application/json: '{"message":"Request too long. Ensure any request body or file you are sending is less than 5MB"}' WAF_FILTERED: statusCode: '403' responseTemplates: application/json: '{"message":"$context.error.message", "details":"FORBIDDEN"}'