Skip to content
v0.3

customer.verify_otp

Verify a login code → the customer (created implicitly if new) + a fresh session token (once). Claims the guest orders this e-mail placed in this store.

  • Scope: public
  • System: no
  • Reachable from: POST /v1/customer/commands/customer.verify_otp — an ANONYMOUS face: x-forge-store is required, no credential is sent, and it is never on /v1/commands/*
  • Events: customer.registered, customer.updated
{
"properties": {
"code": {
"minLength": 1,
"type": "string"
},
"email": {
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"type": "string"
}
},
"required": [
"email",
"code"
],
"type": "object"
}
{
"additionalProperties": false,
"properties": {
"claimed_orders": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"customer_id": {
"type": "string"
},
"expires_at": {
"type": "string"
},
"token": {
"type": "string"
}
},
"required": [
"customer_id",
"token",
"expires_at",
"claimed_orders"
],
"type": "object"
}

validation_failed (400) · unauthorized (401) · forbidden (403) · conflict (409) · internal (500)