API v1 Documentation

Legacy eSIM activation endpoints. For new integrations use API v2.

Header required in all requests:

Authorization: Bearer <your_token>

eSIM Activation Endpoints

Prefix: /api/v1/activate/esim. Requires acceso_srcm permission.

POST /api/v1/activate/esim

Requests the activation of an eSIM using customer's data.

Body (JSON):

{
  "selected_plan": "string",
  "customer_name": "string",
  "customer_surname1": "string",
  "customer_surname2": "string",
  "customer_document_type_id": "string",
  "customer_document_number": "string",
  "customer_birthdate": "YYYY-MM-DD",
  "customer_sex": "H | M",
  "customer_nationality_id": "string"
}

Body fields:

FieldTypeDescription
selected_planstringPlan ID (required)
customer_namestringCustomer first name (required)
customer_surname1stringFirst surname (required)
customer_surname2stringSecond surname (optional, defaults to surname1)
customer_document_type_idstringDocument type ID (required)
customer_document_numberstringDocument number (required)
customer_birthdatestringBirth date YYYY-MM-DD (required)
customer_sexstring"H" (male) or "M" (female) (required)
customer_nationality_idstringNationality ID (required)

Response:

{
  "data": {
    "iccid": "8934071234123456789",
    "phone": "123456789",
    "activationCode": "C0D123456789B123AC1234567F123E4E",
    "qrCode": "LPA:1$sm-...",
    "confirmationCode": "123456",
    "plan_name": "Prepago Travel M",
    "selected_plan": "14",
    "amount": 15,
    "customer_name": "Juan",
    "customer_surname1": "Pérez",
    "customer_surname2": "García",
    "customer_document_type_id": "1",
    "customer_document_number": "12345678A",
    "customer_birthdate": "1990-05-15",
    "customer_sex": "M",
    "customer_nationality_id": "60"
  },
  "error": null,
  "message": "Request processed successfully."
}
GET /api/v1/activate/esim/get-avalible-countries

Gets the available countries for activation. Required for selecting the customer_nationality_id field.

Response:

{
  "data": [
    { "value": 60, "name": "España" }
  ],
  "error": null,
  "message": "Request processed successfully."
}
GET /api/v1/activate/esim/get-avalible-document-type

Lists the supported document types. Required for selecting the customer_document_type_id field.

Response:

{
  "data": [
    { "value": 1, "name": "NIF" }
  ],
  "error": null,
  "message": "Document types list retrieved successfully."
}
GET /api/v1/activate/esim/get-avalible-plans

Returns the available eSIM plans. Required for selecting the selected_plan field.

Response:

{
  "data": [
    { "id": 14, "name": "Prepago Travel M", "price": 15 }
  ],
  "error": null,
  "message": "Plan list retrieved successfully."
}
GET /api/v1/activate/esim/get-activation-history

Queries the activation history.

Query params:

NameTypeDescription
limitnumberBetween 1 and 100 (required)
offsetnumberMinimum 0 (optional)

Response:

{
  "data": [
    {
      "iccid": "8934071234123456789",
      "phone": "123456789",
      "activationCode": "C0D123456789B123AC1234567F123E4E",
      "qrCode": "LPA:1$sm-...",
      "confirmationCode": "123456",
      "plan_name": "Prepago Travel M",
      "selected_plan": "14",
      "amount": 15,
      "customer_name": "Juan",
      "customer_surname1": "Pérez",
      "customer_surname2": "García",
      "customer_document_type_id": "1",
      "customer_document_number": "12345678A",
      "customer_birthdate": "1990-05-15",
      "customer_sex": "M",
      "customer_nationality_id": "60",
      "createdAt": "2023-10-01T12:00:00Z"
    }
  ],
  "error": null,
  "message": "Activation history data retrieved successfully."
}