### Get Templates V2 Source: https://developer.weetrust.mx/reference/obtener-plantillas-copy Use this endpoint to retrieve a list of available templates. Requires token, user-id, and Authorization header. ```curl curl --location 'https://api.weetrust.mx/templates/v2' \ --header 'token: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..J3YAqmpR2TcZ--CW15av--42eXzaBjChF7DFLXa775rT-wlaEJbD1uzaLMwD7RQ415vCukixV8PNw_z-KiliDYWaI_QAQ1fE_ybu98PrA' \ --header 'user-id: YY0mSXZX3WUPmvHvolHfcLTGvba2' \ --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..J3YAqmpR2TcZ-' ``` -------------------------------- ### GET /templates/v2 Source: https://developer.weetrust.mx/reference/obtener-plantillas-copy This endpoint retrieves templates using version 2 of the API. It requires authentication via token and user ID. ```APIDOC ## GET /templates/v2 ### Description Retrieves templates using version 2 of the API. Requires authentication. ### Method GET ### Endpoint https://api.weetrust.mx/templates/v2 ### Headers - **token** (string) - Required - Authentication token. - **user-id** (string) - Required - The ID of the user. - **Authorization** (string) - Required - Bearer token for authentication. ### Request Example ```curl curl --location 'https://api.weetrust.mx/templates/v2' \ --header 'token: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..J3YAqmpR2TcZ--CW15av--42eXzaBjChF7DFLXa775rT-wlaEJbD1uzaLMwD7RQ415vCukixV8PNw_z-KiliDYWaI_QAQ1fE_ybu98PrA' \ --header 'user-id: YY0mSXZX3WUPmvHvolHfcLTGvba2' \ --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..J3YAqmpR2TcZ-' ``` ### Response #### Success Response (200) - **[Response fields will be detailed here based on API specification]** #### Response Example ```json { "example": "[Success response body]" } ``` ``` -------------------------------- ### GET /webhooks Source: https://developer.weetrust.mx/reference/obtener-webhook-registrados Retrieves a list of all webhooks currently registered for the authenticated user. ```APIDOC ## GET /webhooks ### Description Retrieves a list of registered webhooks for the user. ### Method GET ### Endpoint https://api-sandbox.weetrust.com.mx/webhooks ### Parameters #### Header Parameters - **user-id** (string) - Required - Identificador del usuario - **token** (string) - Required - Token de acceso para el recurso ### Response #### Success Response (200) - **object** - Returns an empty object or list of webhooks. #### Response Example { "{}" } #### Error Response (400) - **responseData** (object) - Null - **message** (string) - Error description - **success** (boolean) - Status of the request - **responseCode** (integer) - 400 ``` -------------------------------- ### GET /documents Source: https://developer.weetrust.mx/reference/get-documents Retrieves document information including signatory details and signing URLs. ```APIDOC ## GET /documents ### Description Fetches document details, including a list of signatories with their signing status and URLs. ### Method GET ### Endpoint /documents ### Response #### Success Response (200) - **message** (string) - Status message indicating success. - **responseCode** (string) - The HTTP response code. - **items** (array) - List of document items. - **emailID** (string) - Email identifier. - **name** (string) - Name of the signatory. - **isSigned** (string) - Signing status. - **signatoryID** (string) - Unique identifier for the signatory. - **signing** (object) - Signing metadata. - **url** (string) - URL for the signing process. - **expiry** (string) - Expiry timestamp for the signing URL. #### Response Example { "message": "Document fetched successfully", "responseCode": "200", "items": [ { "emailID": "string", "name": "string", "isSigned": "string", "signatoryID": "string", "signing": { "url": "string", "expiry": "string" } } ] } ``` -------------------------------- ### Get Biometric Results Source: https://developer.weetrust.mx/reference/get-verification-results This endpoint retrieves the results of a biometric verification process. It supports various response codes, including success (200) and bad request (400) scenarios. ```APIDOC ## GET /websites/developer_weetrust_mx_reference/biometric/results ### Description Retrieves the results of a biometric verification. ### Method GET ### Endpoint /websites/developer_weetrust_mx_reference/biometric/results ### Query Parameters - **transactionId** (string) - Required - The unique identifier for the transaction. - **templateName** (string) - Required - The name of the template used for the biometric verification. ### Response #### Success Response (200) - **responseData** (object) - Contains the biometric verification results. - **message** (string) - A message indicating the status of the request. - **success** (boolean) - True if the request was successful, false otherwise. - **responseCode** (string) - The HTTP status code. #### Response Example (200) ```json { "responseData": { "example": "string" }, "message": "Get the results of biometric", "responseCode": "200" } ``` #### Error Response (400) - **responseData** (object) - Null if an error occurred. - **message** (string) - A message describing the error. - **success** (boolean) - False, indicating an error. - **responseCode** (integer) - The HTTP status code (400). #### Response Example (400) ```json { "responseData": null, "message": "string", "success": false, "responseCode": 400 } ``` ``` -------------------------------- ### Create Document by Template V2 via cURL Source: https://developer.weetrust.mx/reference/enviar-plantilla-copy Use this cURL command to trigger document creation. Ensure the Authorization header contains a valid Bearer token and the required user-id and token headers are provided. ```curl curl --location 'https://api.weetrust.mx/templates/createDocumentByTemplateV2' \ --header 'token: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9' \ --header 'user-id: YY0mSXZX3WUPmvHvolHfcLTGbbga2' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer eyJhdWQiOiJodHRwczovL2lkZW50aXR5dG9vbGtpdC5nb29nbGVhcGlzLmNvbS9nb29nbGUuaWRlbnRpdHkuaWRlbnRpdHl0b29sa2l0LnYxLklkZW50aXR5VG9vbGtpdCIsImlhdCI6MTcxMjA4MTYxOSwiZXhwIjoxNzEyMDg1MjE5LCJpc3MiOiJmaXJlYmFzZS1hZG1pbnNkay14N2szbEB3ZWVzaWduLXByb2QuaWFtLmdzZXJ2aWNlYWNjb3VudC5jb20iLCJzdWIiOiJmaXJlYmFzZS1hZG1pbnNkay14N2szbEB3ZWVzaWduLXByb2QuaWFtLmdzZXJ2aWNlYWNjb3VudC5jb20iLCJ1aWQiOiJZWTBtU1haWDNXVVBtdkh2b2xIZmNMVEd2YmEyIn0.V0RBio9FX5-IqF3EjHZC5uF4aQ6h9aXE8qfVDinVmB1XxH_UTh6jb4gZHxAeDJIc2Dx9OgcAd5DDrW2uUb8t6MpVXHV6UIMUEjpSR9MKtMy8CuynYJCg7XVwZBqX7prWIycoxLDxTAzyZubVRpSoW1ZpRSOqyXh83cJzgz8cLDGeVztPBY8ZDWIbx7fQH7DW1m75g0myKjecPKRfyrh1oaeVqztAuIOnzmQORLF1SiuByOBLmJKqybhrjM2zhG55mWwB6RuVJvvoPI1tXA252Rs2nUCNkPKVjuQO8F0orsJh30mtq-vP2lWlEpovNq1VXWO6_ehSFj1TCyHHED07Hg' \ --data-raw '{ "templateID": "6515c125e74729525b045ddf", "country": "México", "inputs": { "nombre": "EXAMPLE NAME", "cliente": "RFCEXAPLE" }, "signatories": [ { "email": "example@example.com", "name": "Example Name" } ] }' ``` -------------------------------- ### Create Document by Template V2 Source: https://developer.weetrust.mx/reference/enviar-plantilla-copy This endpoint allows you to create a new document by utilizing a pre-defined template. You need to provide the template ID, country, input data for the template, and signatory information. ```APIDOC ## POST /templates/createDocumentByTemplateV2 ### Description Creates a new document using a specified template with provided inputs and signatory details. ### Method POST ### Endpoint https://api.weetrust.mx/templates/createDocumentByTemplateV2 ### Parameters #### Request Body - **templateID** (string) - Required - The ID of the template to use. - **country** (string) - Required - The country associated with the document. - **inputs** (object) - Required - Key-value pairs for template input fields. - **nombre** (string) - Required - Example input field for name. - **cliente** (string) - Required - Example input field for client RFC. - **signatories** (array) - Required - List of signatories for the document. - **email** (string) - Required - Email address of the signatory. - **name** (string) - Required - Name of the signatory. ### Request Example ```json { "templateID": "6515c125e74729525b045ddf", "country": "México", "inputs": { "nombre": "EXAMPLE NAME", "cliente": "RFCEXAPLE" }, "signatories": [ { "email": "example@example.com", "name": "Example Name" } ] } ``` ### Response #### Success Response (200) - **documentId** (string) - The ID of the newly created document. - **status** (string) - The status of the document creation process. #### Response Example ```json { "documentId": "doc_12345abc", "status": "created" } ``` ``` -------------------------------- ### Execute cURL Request for Authentication Source: https://developer.weetrust.mx/reference Use this cURL command to request an access token from the Weetrust sandbox environment. ```Shell curl --request POST \ ``` ```Shell --url https://api-sandbox.weetrust.com.mx/access/toke \ ``` ```Shell --header 'accept: application/json' ``` -------------------------------- ### Webhook Registration Response Source: https://developer.weetrust.mx/reference/verification-requests Confirmation response returned after successfully registering a webhook. ```json { "responseData": { "name": "WebhooksiteIdentity", "type": "VERIFICATION_REQUEST_FINISHED", "webHookID": "c7fb8b51b9f68045a4b0344ae4286da22fe456456a", "webHookUrl": "https://webhook.site/b2346f1e-c5ce-49ef-bfc2-0f144b4f22ed", "options": [] }, "message": "OK", "success": true, "responseCode": 200 } ``` -------------------------------- ### Background Check API Source: https://developer.weetrust.mx/reference/get-session-results This section details the structure and parameters for initiating a background check. ```APIDOC ## POST /api/background_checks ### Description Initiates a background check with specified parameters. ### Method POST ### Endpoint /api/background_checks ### Parameters #### Request Body - **content** (object) - Required - Contains the details for the background check. - **id** (integer) - Optional - Unique identifier for the check, defaults to 0. - **ref** (string) - Required - Reference string for the check. - **searcher_id** (integer) - Optional - ID of the user performing the search, defaults to 0. - **assignee_id** (integer) - Optional - ID of the user assigned to the check, defaults to 0. - **match_status** (string) - Optional - The current status of the match. - **risk_level** (string) - Optional - The risk level associated with the check. - **search_term** (string) - Optional - The term used for the search. - **total_hits** (integer) - Optional - Total number of hits found, defaults to 0. - **total_matches** (integer) - Optional - Total number of matches found, defaults to 0. - **updated_at** (string) - Optional - Timestamp of the last update. - **created_at** (string) - Optional - Timestamp of creation. - **search_profile** (object) - Optional - Information about the search profile. - **name** (string) - Optional - Name of the search profile. - **slug** (string) - Optional - Slug of the search profile. - **filters** (object) - Optional - Filters applied to the search. - **entity_type** (string) - Optional - Type of entity to filter by. - **types** (array of strings) - Optional - Array of specific types to filter by. - **birth_year** (string) - Optional - Filter by birth year. - **passport** (string) - Optional - Filter by passport number. - **exact_match** (boolean) - Optional - Whether to enforce an exact match. ``` -------------------------------- ### POST /access/toke Source: https://developer.weetrust.mx/reference/authentication-1 This endpoint is used for authentication and obtaining access tokens. ```APIDOC ## POST /access/toke ### Description Authenticates a user and returns an access token. ### Method POST ### Endpoint /access/toke ### Request Body This endpoint does not specify a request body in the provided OpenAPI definition. ### Response #### Success Response (200) - **(object)** - An empty object is returned upon successful authentication. #### Response Example ```json {} ``` #### Error Response (400) - **(object)** - An empty object is returned for bad requests. #### Response Example ```json {} ``` ``` -------------------------------- ### POST /websites/developer_weetrust_mx_reference Source: https://developer.weetrust.mx/reference/get-session-results This endpoint is used to process reference data within the Weetrust MX system. It accepts a request body containing user and document details and returns a session result. ```APIDOC ## POST /websites/developer_weetrust_mx_reference ### Description Processes reference data and returns session results. ### Method POST ### Endpoint /websites/developer_weetrust_mx_reference ### Request Body - **session** (object) - Required - Session details including user and document information. - **user** (object) - Required - User-specific data. - **id** (string) - Required - The unique identifier for the user. - **name** (string) - Required - The user's first name. - **paternal_surname** (string) - Required - The user's paternal surname. - **mothers_maiden_name** (string) - Required - The user's mother's maiden name. - **nationality** (string) - Required - The user's nationality. - **renapo_valid** (boolean) - Optional - Indicates if the user is validated by RENAPO (default: true). - **names** (string) - Required - Full name of the user. - **birthdate** (string) - Required - User's date of birth (YYYY-MM-DD). - **entity_birth** (string) - Required - Entity of birth. - **probation_document** (string) - Required - Probationary document identifier. - **documents** (object) - Required - Document URLs. - **documentUrl** (string) - Required - URL of the primary document. - **pscUrl** (string) - Optional - URL for PSC verification. - **blockchainUrl** (string) - Optional - URL for blockchain verification. ### Request Example ```json { "session": { "user": { "id": "string", "name": "string", "paternal_surname": "string", "mothers_maiden_name": "string", "nationality": "string", "renapo_valid": true, "names": "string", "birthdate": "string", "entity_birth": "string", "probation_document": "string" }, "documents": { "documentUrl": "string", "pscUrl": "string", "blockchainUrl": "string" } } } ``` ### Response #### Success Response (200) - **session** (object) - Session details including user and document information. - **user** (object) - User-specific data. - **id** (string) - The unique identifier for the user. - **name** (string) - The user's first name. - **paternal_surname** (string) - The user's paternal surname. - **mothers_maiden_name** (string) - The user's mother's maiden name. - **nationality** (string) - The user's nationality. - **renapo_valid** (boolean) - Indicates if the user is validated by RENAPO. - **names** (string) - Full name of the user. - **birthdate** (string) - User's date of birth. - **entity_birth** (string) - Entity of birth. - **probation_document** (string) - Probationary document identifier. - **documents** (object) - Document URLs. - **documentUrl** (string) - URL of the primary document. - **pscUrl** (string) - URL for PSC verification. - **blockchainUrl** (string) - URL for blockchain verification. - **message** (string) - A message indicating the success of the operation. - **responseCode** (string) - The HTTP response code. #### Response Example ```json { "session": { "user": { "id": "string", "name": "string", "paternal_surname": "string", "mothers_maiden_name": "string", "nationality": "string", "renapo_valid": true, "names": "string", "birthdate": "string", "entity_birth": "string", "probation_document": "string" }, "documents": { "documentUrl": "string", "pscUrl": "string", "blockchainUrl": "string" } }, "message": "Obtained session reuslts successfully", "responseCode": "200" } ``` #### Error Response (400) - **Description**: Indicates a bad request. - **Response Example**: `{}` ``` -------------------------------- ### POST /webhooks/verify Source: https://developer.weetrust.mx/reference/verification-requests Register a URL to receive notifications when an identity verification request is processed. ```APIDOC ## POST /webhooks/verify ### Description Register a URL to receive notifications when an identity verification request is processed. ### Method POST ### Endpoint https://api-sandbox.weetrust.com.mx/webhooks/verify ### Parameters #### Headers - **user-id** (string) - Required - The ID of the user. - **token** (string) - Required - The authentication token. #### Request Body - **name** (string) - Required - The name of the webhook. - **type** (string) - Required - The type of webhook event (e.g., "VERIFICATION_REQUEST_FINISHED"). - **url** (string) - Required - The URL to receive webhook notifications. ### Request Example ```json { "name": "Verification request identity", "type": "VERIFICATION_REQUEST_FINISHED", "url": "https://webhook.site/b2346f1e-c5ce-49ef-bfc2-0f144b4f22ed" } ``` ### Response #### Success Response (200) - **responseData** (object) - Contains details of the registered webhook. - **name** (string) - The name of the webhook. - **type** (string) - The type of webhook event. - **webHookID** (string) - The unique identifier for the webhook. - **webHookUrl** (string) - The registered URL for webhook notifications. - **options** (array) - Additional options for the webhook. - **message** (string) - A message indicating the success of the operation. - **success** (boolean) - True if the operation was successful, false otherwise. - **responseCode** (integer) - The HTTP status code. #### Response Example ```json { "responseData": { "name": "WebhooksiteIdentity", "type": "VERIFICATION_REQUEST_FINISHED", "webHookID": "c7fb8b51b9f68045a4b0344ae4286da22fe456456a", "webHookUrl": "https://webhook.site/b2346f1e-c5ce-49ef-bfc2-0f144b4f22ed", "options": [] }, "message": "OK", "success": true, "responseCode": 200 } ``` ``` -------------------------------- ### POST /access/toke Source: https://developer.weetrust.mx/reference/authentication This endpoint is used for authenticating with the Weetrust API. It allows users to obtain an access token. ```APIDOC ## POST /access/toke ### Description Authenticates a user and returns an access token. ### Method POST ### Endpoint /access/toke ### Request Body This endpoint does not explicitly define a request body in the provided OpenAPI definition. Please refer to the specific API documentation for expected request parameters. ### Response #### Success Response (200) - **Result** (object) - An empty object is indicated in the example, suggesting a successful authentication. #### Response Example ```json {} ``` #### Error Response (400) - **Result** (object) - An empty object is indicated in the example, suggesting a bad request. #### Response Example ```json {} ``` ``` -------------------------------- ### Reference API Endpoint Source: https://developer.weetrust.mx/reference/get-session-results This section details the structure of responses from the Weetrust MX reference API, focusing on the 'requestRenapoResponse' object. ```APIDOC ## GET /websites/developer_weetrust_mx_reference ### Description Retrieves reference data, potentially related to RENAPO. ### Method GET ### Endpoint /websites/developer_weetrust_mx_reference ### Parameters #### Query Parameters - **search** (string) - Optional - The search query to filter results. ### Response #### Success Response (200) - **status** (string) - The status of the request (e.g., "success"). - **requestRenapoResponse** (object) - An object containing RENAPO-related information. - **curp** (string) - The CURP (Clave Única de Registro de Población). - **sex** (string) - The sex of the individual. #### Response Example ```json { "status": "success", "requestRenapoResponse": { "curp": "string", "sex": "string" } } ``` ``` -------------------------------- ### Register Webhook Request Source: https://developer.weetrust.mx/reference/verification-requests Registers a URL to receive notifications upon completion of an identity verification request. ```shell curl --location 'https://api-sandbox.weetrust.com.mx/webhooks/verify' \ --header 'user-id: {{USER_ID}}' \ --header 'token: {{TOKEN}}' \ --header 'Content-Type: application/json' \ --data '{ "name": "Verification request identity", "type": "VERIFICATION_REQUEST_FINISHED", "url": "https://webhook.site/b2346f1e-c5ce-49ef-bfc2-0f144b4f22ed" }' ``` -------------------------------- ### POST /fixed-signatory Source: https://developer.weetrust.mx/reference/fixed-signatory-of-document Endpoint to configure or update the fixed signatory settings. ```APIDOC ## POST /fixed-signatory ### Description Sets the fixed signatory configuration. ### Method POST ### Endpoint /fixed-signatory ### Request Body - **color** (string) - Optional - Color del fija firma. ### Response #### Success Response (200) - **responseData** (object) - Empty object. - **message** (string) - Fixed signatory successfully. - **responseCode** (string) - 200. #### Response Example { "responseData": {}, "message": "Fixed signatory successfully", "responseCode": "200" } #### Error Response (400) - **responseData** (null) - Null value. - **message** (string) - Error message. - **success** (boolean) - False. - **responseCode** (integer) - 400. ``` -------------------------------- ### Search API Source: https://developer.weetrust.mx/reference/get-session-results This section details the search endpoint, which allows users to query for entities within the Weetrust database. It supports various parameters for refining search results. ```APIDOC ## GET /search ### Description Searches for entities based on provided criteria. ### Method GET ### Endpoint /search ### Query Parameters - **query** (string) - Required - The search term. - **limit** (integer) - Optional - The maximum number of results to return. - **offset** (integer) - Optional - The number of results to skip. - **filter** (object) - Optional - An object to filter search results. Properties include: - **entity_type** (string) - Optional - Filters by entity type. - **fuzziness** (integer) - Optional - Sets the fuzziness level for the search. ### Response #### Success Response (200) - **total** (integer) - The total number of matching results. - **limit** (integer) - The limit applied to the results. - **offset** (integer) - The offset applied to the results. - **hits** (array) - An array of search result objects. - **doc** (object) - Represents a single search result. - **id** (string) - The unique identifier of the entity. - **entity_type** (string) - The type of the entity. - **name** (string) - The primary name of the entity. - **first_name** (string) - The first name of the person. - **last_name** (string) - The last name of the person. - **last_updated_utc** (string) - The timestamp of the last update in UTC. - **middle_names** (string) - The middle names of the person. - **source** (array of strings) - Sources of the entity's information. - **types** (array of strings) - Categories or types associated with the entity. - **aka** (array of objects) - Aliases or alternative names. - **name** (string) - An alias name. - **associates** (array of objects) - Associated entities. - **name** (string) - The name of the associated entity. - **association** (string) - The type of association. #### Response Example ```json { "total": 100, "limit": 10, "offset": 0, "hits": [ { "doc": { "id": "string", "entity_type": "string", "name": "string", "first_name": "string", "last_name": "string", "last_updated_utc": "string", "middle_names": "string", "source": [ "string" ], "types": [ "string" ], "aka": [ { "name": "string" } ], "associates": [ { "name": "string", "association": "string" } ] } } ] } ``` ``` -------------------------------- ### Document Fetching API Source: https://developer.weetrust.mx/reference/get-one-document This API endpoint allows for fetching documents with specific parameters. ```APIDOC ## GET /websites/developer_weetrust_mx_reference ### Description Fetches a document based on provided parameters. ### Method GET ### Endpoint /websites/developer_weetrust_mx_reference ### Query Parameters - **documentId** (string) - Required - The ID of the document to fetch. - **documentType** (string) - Required - The type of the document. ### Response #### Success Response (200) - **responseData** (object) - Contains the fetched document details. - **document** (object) - The main document object. - **id** (string) - The unique identifier for the document. - **name** (string) - The name of the document. - **description** (string) - A description of the document. - **creationDate** (string) - The date the document was created. - **expiry** (string) - The expiry date of the document. - **message** (string) - A success message. - **responseCode** (string) - The HTTP response code. #### Response Example ```json { "responseData": { "document": { "id": "string", "name": "string", "description": "string", "creationDate": "string", "expiry": "string" } }, "message": "Document fetched successfully", "responseCode": "200" } ``` #### Error Response (400) - **responseData** (object) - Null if an error occurs. - **message** (string) - An error message describing the issue. - **success** (boolean) - False, indicating an error. - **responseCode** (integer) - The HTTP error code. #### Response Example ```json { "responseData": null, "message": "string", "success": false, "responseCode": 400 } ``` ``` -------------------------------- ### User Authentication API Source: https://developer.weetrust.mx/reference/agregar-webhook-de-verificaci%C3%B3n This API handles user authentication and authorization for accessing Weetrust services. ```APIDOC ## POST /api/auth/login ### Description Authenticates a user and returns an access token. ### Method POST ### Endpoint /api/auth/login ### Parameters #### Request Body - **username** (string) - Required - The user's username. - **password** (string) - Required - The user's password. ### Request Example ```json { "username": "testuser", "password": "password123" } ``` ### Response #### Success Response (200) - **token** (string) - The authentication token. - **expires_in** (integer) - The token's expiration time in seconds. #### Response Example ```json { "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "expires_in": 3600 } ``` ``` -------------------------------- ### User Profile API Source: https://developer.weetrust.mx/reference/agregar-webhook-de-verificaci%C3%B3n This API allows retrieval and update of user profile information. ```APIDOC ## GET /api/users/me ### Description Retrieves the profile information for the currently authenticated user. ### Method GET ### Endpoint /api/users/me ### Response #### Success Response (200) - **id** (string) - The user's unique identifier. - **username** (string) - The user's username. - **email** (string) - The user's email address. #### Response Example ```json { "id": "user-12345", "username": "testuser", "email": "testuser@example.com" } ``` ## PUT /api/users/me ### Description Updates the profile information for the currently authenticated user. ### Method PUT ### Endpoint /api/users/me ### Parameters #### Request Body - **email** (string) - Optional - The user's new email address. ### Request Example ```json { "email": "newemail@example.com" } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message. #### Response Example ```json { "message": "Profile updated successfully." } ``` ``` -------------------------------- ### Document Verification Data Model Source: https://developer.weetrust.mx/reference/get-verification-results Describes the structure of the document verification response object. ```APIDOC ## Document Verification Object ### Description This object represents the result of a document verification process, including detailed check statistics and metadata. ### Response Fields - **documentVerifications** (object) - Details of the verification process including name, category, result, output, and input fields. - **totalChecks** (integer) - Total number of checks performed. - **successChecks** (integer) - Number of successful checks. - **warningChecks** (integer) - Number of checks that returned warnings. - **failedChecks** (integer) - Number of failed checks. - **expertUsed** (integer) - Indicator if an expert was involved in the verification. - **checkTime** (string) - Timestamp of the check. - **sourceType** (string) - The type of source used for verification. - **status** (string) - Current status of the verification. - **userName** (string) - Name of the user associated with the verification. - **startDateUtc** (string) - Start date of the process in UTC. - **endDateUtc** (string) - End date of the process in UTC. - **securityLevel** (string) - Assigned security level. - **globalResult** (string) - Overall result of the verification. - **globalResultDescription** (string) - Description of the global result. - **securityLevelDescription** (string) - Description of the security level. - **language** (string) - Language code of the document. - **documentType** (string) - Type of the document verified. - **countryCode** (string) - Country code associated with the document. ``` -------------------------------- ### Error Handling Source: https://developer.weetrust.mx/reference/get-documents Standard error response format for API requests. ```APIDOC ## Error Response (400) ### Description Standard error response returned when a request fails validation or processing. ### Response - **responseData** (object) - Null value. - **message** (string) - Error description. - **success** (boolean) - Indicates if the request was successful (false). - **responseCode** (integer) - The HTTP error code (400). ### Response Example { "responseData": null, "message": "string", "success": false, "responseCode": 400 } ``` -------------------------------- ### Add Document Source: https://developer.weetrust.mx/reference/add-document This endpoint allows you to add a new document. It accepts a document object with various properties such as title, country, document sign type, and signatory information. The response includes a success message and response code. ```APIDOC ## POST /websites/developer_weetrust_mx_reference/documents ### Description Adds a new document with specified details. ### Method POST ### Endpoint /websites/developer_weetrust_mx_reference/documents ### Request Body - **title** (string) - Required - The title of the document. - **country** (string) - Required - The country associated with the document. - **documentSignType** (string) - Required - The type of signature for the document. - **addedOn** (integer) - Optional - The timestamp when the document was added. Defaults to 0. - **documentFileObj** (object) - Required - An object containing the document file URL and size. - **url** (string) - Required - The URL of the document file. - **size** (string) - Required - The size of the document file. - **signatory** (array) - Required - An array of signatory objects. - **emailID** (string) - Required - The email address of the signatory. - **name** (string) - Required - The name of the signatory. - **isSigned** (string) - Required - Indicates if the signatory has signed. - **signatoryID** (string) - Required - The unique identifier for the signatory. - **signing** (object) - Optional - Information about the signing process. - **url** (string) - Required - The URL for signing. - **expiry** (string) - Required - The expiry date/time for signing. ### Request Example ```json { "title": "string", "country": "string", "documentSignType": "string", "addedOn": 0, "documentFileObj": { "url": "string", "size": "string" }, "signatory": [ { "emailID": "string", "name": "string", "isSigned": "string", "signatoryID": "string", "signing": { "url": "string", "expiry": "string" } } ] } ``` ### Response #### Success Response (200) - **responseData** ({}) - Description of the response data (structure not fully defined in source). - **message** (string) - A message indicating the success of the operation. Example: "Document added successfully". - **responseCode** (string) - The HTTP response code. Example: "200". #### Response Example ```json { "responseData": {}, "message": "Document added successfully", "responseCode": "200" } ``` #### Error Response (400) - **responseData** ({}) - Null if an error occurs. - **message** (string) - An error message describing the issue. Example: "string". - **success** (boolean) - Indicates if the operation was successful. Defaults to true. - **responseCode** (integer) - The HTTP response code for the error. Example: 400. #### Error Response Example ```json { "responseData": null, "message": "string", "success": false, "responseCode": 400 } ``` ``` -------------------------------- ### OpenAPI Definition for Authentication Source: https://developer.weetrust.mx/reference/authentication This OpenAPI 3.1.0 definition specifies the authentication endpoint for the Weetrust API, including server URL and path details. ```json { "openapi": "3.1.0", "info": { "title": "rest-apis", "version": "1.0" }, "servers": [ { "url": "https://api-sandbox.weetrust.com.mx" } ], "security": [ {} ], "paths": { "/access/toke": { "post": { "summary": "Authentication", "description": "", "operationId": "authentication", "responses": { "200": { "description": "200", "content": { "application/json": { "examples": { "Result": { "value": "{}" } }, "schema": { "type": "object", "properties": {} } } } }, "400": { "description": "400", "content": { "application/json": { "examples": { "Result": { "value": "{}" } }, "schema": { "type": "object", "properties": {} } } } } }, "deprecated": false } } }, "x-readme": { "headers": [], "explorer-enabled": true, "proxy-enabled": true }, "x-readme-fauxas": true } ``` -------------------------------- ### Error Response (400) Source: https://developer.weetrust.mx/reference/enviar-plantilla Standard error response structure for bad requests. ```APIDOC ## Error Response (400) ### Description Returned when the request is malformed or invalid. ### Response #### Error Response (400) - **responseData** (object) - Null value. - **message** (string) - Error description. - **success** (boolean) - Indicates failure (false). - **responseCode** (integer) - The error code (400). #### Response Example { "responseData": null, "message": "string", "success": false, "responseCode": 400 } ``` -------------------------------- ### PUT /signatory Source: https://developer.weetrust.mx/reference/request-signature Updates the signatory information and returns a success message. ```APIDOC ## PUT /signatory ### Description Updates the signatory information in the system. ### Method PUT ### Endpoint /signatory ### Response #### Success Response (200) - **message** (string) - Signatory Updated successfully - **responseCode** (string) - 200 #### Response Example { "message": "Signatory Updated successfully", "responseCode": "200" } ### Error Handling #### Error Response (400) - **responseData** (object) - null - **message** (string) - Error message description - **success** (boolean) - false - **responseCode** (integer) - 400 ``` -------------------------------- ### Website Data API Source: https://developer.weetrust.mx/reference/agregar-webhook-de-verificaci%C3%B3n Endpoints for retrieving and managing website-related data. ```APIDOC ## GET /websites/{websiteId}/data ### Description Retrieves data associated with a specific website. ### Method GET ### Endpoint /websites/{websiteId}/data ### Parameters #### Path Parameters - **websiteId** (string) - Required - The unique identifier of the website. ### Response #### Success Response (200) - **data** (object) - Contains various data points related to the website. - **success** (boolean) - Indicates if the operation was successful. - **responseCode** (integer) - The response code of the operation. #### Response Example ```json { "data": { "success": false, "responseCode": 400 } } ``` ``` -------------------------------- ### Successful Document Fetch Response Source: https://developer.weetrust.mx/reference/get-one-document This JSON structure represents a successful response when a document is fetched. It includes a success message and a 200 response code. ```json { "responseData": { "document": { "id": "string", "name": "string", "type": "string", "content": "string", "createdAt": "string", "updatedAt": "string", "metadata": { "tags": [ "string" ], "customFields": { "additionalProperties": { "type": "string" } } }, "owner": { "id": "string", "name": "string" }, "permissions": [ { "userId": "string", "level": "string" } ], "expiry": { "type": "string", "example": "string" } } }, "message": "Document fetched successfully", "responseCode": 200 } ``` -------------------------------- ### API Response Structure Source: https://developer.weetrust.mx/reference/obtener-webhook-de-verificaci%C3%B3n Defines the standard response format for API operations, including success status and response codes. ```APIDOC ## API Response Structure ### Description This structure defines the standard fields returned in API responses to indicate the outcome of a request. ### Response Fields - **success** (boolean) - Indicates if the request was successful. Default is true. - **responseCode** (integer) - The specific status code returned by the operation. Default is 0. ``` -------------------------------- ### Document Update Response Source: https://developer.weetrust.mx/reference/edit-document Details the structure of a successful document update response and the error handling format for 400 Bad Request scenarios. ```APIDOC ## Document Update Response ### Description Returns the status of a document update operation, including signatory details such as email, name, signing status, and signing URLs. ### Response #### Success Response (200) - **message** (string) - Status message (e.g., "Document Updated successfully") - **responseCode** (string) - Status code - **signatory** (array) - List of signatories - **emailID** (string) - Signatory email - **name** (string) - Signatory name - **isSigned** (string) - Signing status - **signatoryID** (string) - Unique ID for the signatory - **signing** (object) - Signing details - **url** (string) - Signing URL - **expiry** (string) - Expiry timestamp #### Error Response (400) - **responseData** (object) - Null value - **message** (string) - Error description - **success** (boolean) - Operation success status - **responseCode** (integer) - Error code 400 ### Response Example { "message": "Document Updated successfully", "responseCode": "200" } ```