API ActivationSIM – Serdistrimo

Header required in all requests:

Authorization: Bearer <your_token>

eSIM Activation Endpoints

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", /* (H for male, M for female) */
	"customer_nationality_id": "string"
}

Response:

{
	"data": {
		"iccid": "8934071234123456789",
		"phone": "123456789",
		"activationCode": "C0D123456789B123AC1234567F123E4E",
		"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:

Name Type Description / Restrictions
limit number Between 1 and 100 (required)
offset number Minimum 0 (optional)

Response:

{
	"data": [
		{
			"iccid": "8934071234123456789",
			"phone": "123456789",
			"activationCode": "C0D123456789B123AC1234567F123E4E",
			"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."
}