Console API
Guest
5 endpoints.
/api/v1/admin/businesses/{business_id}/guestWhether the business is held by a guest
Authentication
Authorization: Bearer <token>.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
business_idrequired | path | string (uuid) |
Responses
200Successful Responseapplication/jsonSuccessResponse_GuestStatus_| Field | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request_idrequired | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
success | true | default true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
datarequired | GuestStatus | GuestStatus fields
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
metadata | ResponseMetadata | null | ResponseMetadata fields
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
meta | ResponseMeta | null | ResponseMeta fields
|
400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.
/api/v1/admin/businesses/{business_id}/guest/claim/codeSign up from the guest: send the visitor a code
The signed-in guest gives their email, and Heimdal emails a code. When an account has that email already, the code is its sign-in code (`existing`). An email on the guest domain is 409 `EMAIL_EXISTS`; another code too soon, or past the hourly limit, is 429 `CODE_COOLDOWN` with `retry_in_seconds`.
Authentication
Authorization: Bearer <token>.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
business_idrequired | path | string (uuid) |
Request bodyrequired
application/jsonGuestClaimCodeBody| Field | Type | Description |
|---|---|---|
emailrequired | string (email) |
Responses
200Successful Responseapplication/jsonSuccessResponse_GuestClaimCodeResponse_| Field | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
request_idrequired | string | |||||||
success | true | default true | ||||||
datarequired | GuestClaimCodeResponse | GuestClaimCodeResponse fields
| ||||||
metadata | ResponseMetadata | null | ResponseMetadata fieldsResponseMetadata, expanded above. | ||||||
meta | ResponseMeta | null | ResponseMeta fieldsResponseMeta, expanded above. |
400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.
/api/v1/admin/businesses/{business_id}/guest/claim/detailsSign up from the guest: their name, their business, and a phone and password if they want
After the code. A website that isn't one is 400 `INVALID_WEBSITE_URL`. Businesses on Keystone already with the same website or Google listing are 409 `BUSINESS_MATCHES` (`details.businesses`, by name) unless `create_anyway`. A phone another account has proven is 409 `PHONE_EXISTS`.
Authentication
Authorization: Bearer <token>.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
business_idrequired | path | string (uuid) |
Request bodyrequired
application/jsonGuestClaimDetailsBody| Field | Type | Description |
|---|---|---|
first_namerequired | string | min length 1 · max length 100 |
last_namerequired | string | min length 1 · max length 100 |
business_namerequired | string | min length 1 · max length 255 |
website | string | null | The business's website, if it has one |
place_id | string | null | Its Google listing's place id (ChIJ…), if it has one |
create_anyway | boolean | Keep it though businesses on Keystone already share its website or Google listing default false |
password | string | null | Optional. Heimdal's rules: 8 or more, with an uppercase letter, a lowercase letter, a digit and a symbol |
phone | string | null | Optional. Their mobile, unproven until they sign in with it |
Responses
200Successful Responseapplication/jsonSuccessResponse_GuestStatus_| Field | Type | Description |
|---|---|---|
request_idrequired | string | |
success | true | default true |
datarequired | GuestStatus | GuestStatus fieldsGuestStatus, expanded above. |
metadata | ResponseMetadata | null | ResponseMetadata fieldsResponseMetadata, expanded above. |
meta | ResponseMeta | null | ResponseMeta fieldsResponseMeta, expanded above. |
400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.
/api/v1/admin/businesses/{business_id}/guest/claim/verifySign up from the guest: the code makes the account the visitor's
The code from the email, with the same email. Right, the account and business are the visitor's from then on, with a session for it; for an account they had already (`existing`), that account is signed in, the business and everything the guest did in it are its, and the guest is deleted. Wrong is 400 `INVALID_CODE`, and too many wrong codes 429 `TOO_MANY_CODE_ATTEMPTS`.
Authentication
Authorization: Bearer <token>.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
business_idrequired | path | string (uuid) |
Request bodyrequired
application/jsonGuestClaimVerifyBody| Field | Type | Description |
|---|---|---|
emailrequired | string (email) | |
coderequired | string | min length 4 · max length 12 |
Responses
200Successful Responseapplication/jsonSuccessResponse_GuestClaimVerifyResponse_| Field | Type | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request_idrequired | string | ||||||||||||||||||||||
success | true | default true | |||||||||||||||||||||
datarequired | GuestClaimVerifyResponse | GuestClaimVerifyResponse fields
| |||||||||||||||||||||
metadata | ResponseMetadata | null | ResponseMetadata fieldsResponseMetadata, expanded above. | |||||||||||||||||||||
meta | ResponseMeta | null | ResponseMeta fieldsResponseMeta, expanded above. |
400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.
/api/v1/admin/guestsThe guests nobody has signed up from yet
Authentication
Authorization: Bearer <token>.
Responses
200Successful Responseapplication/jsonSuccessResponse_list_GuestSummary__| Field | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request_idrequired | string | |||||||||||||
success | true | default true | ||||||||||||
datarequired | GuestSummary[] | GuestSummary[] fields
| ||||||||||||
metadata | ResponseMetadata | null | ResponseMetadata fieldsResponseMetadata, expanded above. | ||||||||||||
meta | ResponseMeta | null | ResponseMeta fieldsResponseMeta, expanded above. |
400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.