---
title: "Validates user eligibility to partner app"
method: POST
path: "/partner_app/v1/validate"
tags: ["Api::PartnerApp"]
---

# Validates user eligibility to partner app

`POST /partner_app/v1/validate`

The TotalPass Partner App API enables partner applications to determine user eligibility for app access. By sending a POST request, the API validates user eligibility based on the provided employee document number. The request must include a JSON payload containing the "employee_document_number" parameter.
The API response will indicate whether the specified employee is eligible to use the partner app. Access is determined by the validation process, allowing the partner app to make informed decisions on user access privileges.
Obs: The "x-api-key" header is essential for authentication and authorization, ensuring secure communication between the partner app and the TotalPass API.

## Headers

- `x-api-key` string, required

## Request body

- object — Employee's document number
  - `employee_document_number` string, required

## Response `200`

When the http status is success, the API response will include detailed information about the employee and their access to the partner app. Employee data, such as name, email, date of birth, and phone number, will be provided on "employee_data" section. Additionally, the "app_data" section will contain information about the app, specifying the features or functionalities accessible to the user, allowing the partner app to determine the user's available options or restrictions within the application.

- object
  - `employee_data` object
    - `name` string
    - `email` string
    - `birthday` string
    - `phone` string
  - `app_data` object
    - `meal_plan` boolean
    - `appointment` boolean

## Other responses

- `401` — When the http status is unauthorized, the API response will include "error" field with "Unauthorized" text, indicating a lack of valid API key. The "message" field provides additional details, specifying that no valid API key was provided.
- `422` — In case of an error other than unauthorized access, the API will return a status code 422 along with detailed error information. The "errors" field within the response will contain a list of specific error messages explaining the nature of the issue. For instance, an error message such as "A empresa fornecida não pode acessar o recurso solicitado" (The provided company cannot access the requested resource) may be included. Developers can analyze the "errors" field to identify and address the specific issues that occurred during the API request.

---

[API](https://skmtc.net/totalpass/apis/token-use.md) · [All operations](https://skmtc.net/totalpass/apis/token-use/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/totalpass/token-use/revisions/bc65b4950c7e/schema)
