Authorizations
API key for your store
Body
application/json
Commerce Engine is now in beta. We're working hard to make it better for you.
curl --request POST \
--url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/pos/auth/verify-otp \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '{
"otp": "<string>",
"otp_token": "<string>",
"otp_action": "login"
}'
{
"message": "<string>",
"success": true,
"content": {
"user": {
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"phone": "<string>",
"email": "jsmith@example.com",
"channel": {
"id": "<string>",
"name": "<string>"
},
"device": {
"id": "<string>",
"name": "<string>"
},
"location": {
"id": "<string>",
"name": "<string>"
},
"roles": [
{
"location_id": "<string>",
"location_name": "<string>",
"role_id": "<string>",
"role_name": "<string>"
}
]
},
"access_token": "<string>",
"refresh_token": "<string>"
}
}
Verify POS login otp. Login to POS device using phone. The endpoint requires authentication with an API key that has the scope set to โstorefrontโ for a particular store.
curl --request POST \
--url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/pos/auth/verify-otp \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '{
"otp": "<string>",
"otp_token": "<string>",
"otp_action": "login"
}'
{
"message": "<string>",
"success": true,
"content": {
"user": {
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"phone": "<string>",
"email": "jsmith@example.com",
"channel": {
"id": "<string>",
"name": "<string>"
},
"device": {
"id": "<string>",
"name": "<string>"
},
"location": {
"id": "<string>",
"name": "<string>"
},
"roles": [
{
"location_id": "<string>",
"location_name": "<string>",
"role_id": "<string>",
"role_name": "<string>"
}
]
},
"access_token": "<string>",
"refresh_token": "<string>"
}
}
API key for your store
Was this page helpful?