Skip to main content
POST
/
partner
/
register
Create Partner
curl --request POST \
  --url https://api.example.com/partner/register \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "<string>",
  "name": "<string>",
  "email": "<string>",
  "phoneNumber": "<string>",
  "cedula": 123
}
'
{
  "message": "<string>"
}

Overview

This endpoint allows you to register a new partner in the system. The user must be authenticated with a valid JWT token in the access_token cookie.

Request Body

id
string
required
Unique identifier for the partnerExample: "P001"
name
string
required
Full name of the partnerExample: "Carlos Rodríguez"
email
string
required
Email address of the partner (must be a valid email format)Example: "[email protected]"
phoneNumber
string
required
Contact phone numberExample: "3215667890"
cedula
number
required
Identification number (must be a positive number)Example: 1234567890

Response

message
string
Success message confirming partner registrationExample: "Socio Registrado Exitosamente"

Example Request

curl -X POST https://api.example.com/partner/register \
  -H "Content-Type: application/json" \
  -b "access_token=YOUR_JWT_TOKEN" \
  -d '{
    "id": "P001",
    "name": "Carlos Rodríguez",
    "email": "[email protected]",
    "phoneNumber": "3215667890",
    "cedula": 1234567890
  }'

Example Response

200 Success
{
  "message": "Socio Registrado Exitosamente"
}
400 Bad Request
{
  "message": "Validation error or duplicate data"
}
401 Unauthorized
{
  "message": "Token no enviado o inválido"
}
500 Internal Server Error
{
  "message": "Error interno del servidor"
}

Build docs developers (and LLMs) love