> For the complete documentation index, see [llms.txt](https://docs.thewalletcrew.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thewalletcrew.io/api-reference/forms/customer.md).

# Customer

## Get the holder account

> Data from the customer token, completed with stored data when the tenant identifies holders. Always includes a reusable \`authenticationToken\`.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Customer"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"security":[{"neo-customer":[]}],"components":{"securitySchemes":{"neo-customer":{"type":"http","description":"a JWT token describing the customer","scheme":"bearer"}},"schemas":{"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/{tenantId}/customer":{"get":{"tags":["Customer"],"summary":"Get the holder account","description":"Data from the customer token, completed with stored data when the tenant identifies holders. Always includes a reusable `authenticationToken`.","parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The holder's account.","content":{"text/plain":{"schema":{"type":"object","additionalProperties":{},"description":"A holder's account as the enrolment pages exchange it: a flat JSON object whose properties are the\ntenant's enrolment form fields, plus the well-known keys below."}},"application/json":{"schema":{"type":"object","additionalProperties":{},"description":"A holder's account as the enrolment pages exchange it: a flat JSON object whose properties are the\ntenant's enrolment form fields, plus the well-known keys below."}},"text/json":{"schema":{"type":"object","additionalProperties":{},"description":"A holder's account as the enrolment pages exchange it: a flat JSON object whose properties are the\ntenant's enrolment form fields, plus the well-known keys below."}}}},"401":{"description":"No customer token (`Authorization: neo-customer ...`), or it identifies no holder.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"Endpoint disabled for the tenant."},"429":{"description":"Too many requests; see `Retry-After`."}}}}}}
```

## Submit an enrolment

> Validates the data against the tenant's rules, identifies the holder, and with a \`flow\` creates or updates the holder. What happens depends on the caller:\
> \<list type="bullet">\<item>Back-office user or API key with \`tenant.customer:write\`: the account is completed with stored data. Without \`flow\`, returns 202 with \`userExists\` and the account under \`challenge.account\`. With \`flow\`, \`neo.createNew\` = \`true\` creates a new holder even if one matches.\</item>\<item>Holder with a customer token: the token must identify the holder (401 otherwise).\</item>\<item>Anyone else: the tenant may require identity confirmation first; returns 202 and sends a verification message.\</item>\</list>\
> A 202 body carries a \`challenge\`; for email verification it is \`{ "email": ... }\` and a continue link is mailed.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Customer"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"paths":{"/api/{tenantId}/customer":{"post":{"tags":["Customer"],"summary":"Submit an enrolment","description":"Validates the data against the tenant's rules, identifies the holder, and with a `flow` creates or updates the holder. What happens depends on the caller:\n<list type=\"bullet\"><item>Back-office user or API key with `tenant.customer:write`: the account is completed with stored data. Without `flow`, returns 202 with `userExists` and the account under `challenge.account`. With `flow`, `neo.createNew` = `true` creates a new holder even if one matches.</item><item>Holder with a customer token: the token must identify the holder (401 otherwise).</item><item>Anyone else: the tenant may require identity confirmation first; returns 202 and sends a verification message.</item></list>\nA 202 body carries a `challenge`; for email verification it is `{ \"email\": ... }` and a continue link is mailed.","parameters":[{"name":"flow","in":"query","description":"Customer registration flow. Omitted, data is only validated and completed, nothing is saved. Set, the flow creates or updates the holder (typically issuing the pass) and the response carries `neo.redirect` = `complete`.","schema":{"type":"string"}},{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Holder data, as a JSON object of form fields.","content":{"application/json":{"schema":{"type":"object","additionalProperties":{},"description":"A holder's account as the enrolment pages exchange it: a flat JSON object whose properties are the\ntenant's enrolment form fields, plus the well-known keys below."}},"text/json":{"schema":{"type":"object","additionalProperties":{},"description":"A holder's account as the enrolment pages exchange it: a flat JSON object whose properties are the\ntenant's enrolment form fields, plus the well-known keys below."}},"application/*+json":{"schema":{"type":"object","additionalProperties":{},"description":"A holder's account as the enrolment pages exchange it: a flat JSON object whose properties are the\ntenant's enrolment form fields, plus the well-known keys below."}}}},"responses":{"200":{"description":"Validated, and created or updated when a flow was named.","content":{"text/plain":{"schema":{"type":"object","additionalProperties":{},"description":"A holder's account as the enrolment pages exchange it: a flat JSON object whose properties are the\ntenant's enrolment form fields, plus the well-known keys below."}},"application/json":{"schema":{"type":"object","additionalProperties":{},"description":"A holder's account as the enrolment pages exchange it: a flat JSON object whose properties are the\ntenant's enrolment form fields, plus the well-known keys below."}},"text/json":{"schema":{"type":"object","additionalProperties":{},"description":"A holder's account as the enrolment pages exchange it: a flat JSON object whose properties are the\ntenant's enrolment form fields, plus the well-known keys below."}}}},"202":{"description":"Verification required, or the lookup result (back-office caller without flow)."},"400":{"description":"Invalid data (`errors` keyed by field, empty key for the whole account), unknown flow, or account identifiers sent without a customer token.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"401":{"description":"Customer token identifies no holder.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"Endpoint disabled for the tenant."},"429":{"description":"Too many requests; see `Retry-After`."}}}}},"components":{"schemas":{"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}}}
```

## Get a customer token

> Exchanges a sign-in provider's proof for a token valid 24 hours. Send it on customer endpoints as \`Authorization: neo-customer \<token>\`.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Customer"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"paths":{"/api/{tenantId}/customer/authenticate":{"post":{"tags":["Customer"],"summary":"Get a customer token","description":"Exchanges a sign-in provider's proof for a token valid 24 hours. Send it on customer endpoints as `Authorization: neo-customer <token>`.","parameters":[{"name":"provider","in":"query","description":"Sign-in provider enabled for the tenant, e.g. `otp`, `apple`, `google` or `facebook`.","schema":{"type":"string"}},{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Provider-specific proof, e.g. a one-time password or ID token.","content":{"application/json":{"schema":{}},"text/json":{"schema":{}},"application/*+json":{"schema":{}}}},"responses":{"200":{"description":"Token, as a JSON string.","content":{"text/plain":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"string"}},"text/json":{"schema":{"type":"string"}}}},"400":{"description":"No `provider`, body not JSON, or data rejected (problem `invalid-credentials`).","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"429":{"description":"Too many requests; see `Retry-After`."}}}}},"components":{"schemas":{"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.thewalletcrew.io/api-reference/forms/customer.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
