Endpoint años
Detalles a tener en cuenta
- Revisa la documentación de conceptos base para familiarizarte con los conceptos clave de la API de Idukay.
- Asegúrate de revisar la documentación de la API para conocer los endpoints disponibles en detalle y cómo utilizarlos correctamente.
GET Obtener años
Endpoint: /api/years
Descripción: Recupera la información de los años
- Curl
- Fetch
curl --request GET \
--url 'https://idukay.net/api/years?__page=1&__per_page=10&__sort%5B_id%5D=asc' \
--header 'Authorization: Bearer <token>'\
--header 'Content-Type: application/json' \
--header 'type: API'
const request = fetch("https://idukay.net/api/years?__page=1&__per_page=10&__sort%5B_id%5D=asc", {
method: "GET",
headers: {
Authorization: 'Bearer <token>',
Content-Type: 'application/json',
type: 'API'
},
});
const response = await request.json();
Headers▼
Query▼
Esquema respuesta▼
PUT Actualizar año
Endpoint: /api/years
Descripción: Actualiza la información de un año
- Curl
- Fetch
curl --request PUT \
--url 'https://idukay.net/api/years' \
--header 'Authorization: Bearer <token>'\
--header 'Content-Type: application/json' \
--header 'type: API' \
--data '
{
"country": "EC",
"passing_score": 7,
"base_score": 10,
"score_decimals": 2,
"weight_score": 10,
"round": false,
"calculate_by_equivalences": false,
"new_promotion_logic": false,
"enable_custom_year": false
}
'
const request = fetch("https://idukay.net/api/years", {
method: "PUT",
headers: {
Authorization: 'Bearer <token>',
Content-Type: 'application/json',
type: 'API'
},
body: JSON.stringify({
"country": "EC",
"passing_score": 7,
"base_score": 10,
"score_decimals": 2,
"weight_score": 10,
"round": false,
"calculate_by_equivalences": false,
"new_promotion_logic": false,
"enable_custom_year": false
})
});
const response = await request.json();
Headers▼
Body▼
Esquema respuesta▼
POST Crear año
Endpoint: /api/years
Descripción: Crea un nuevo año
- Curl
- Fetch
curl --request POST \
--url 'https://idukay.net/api/years' \
--header 'Authorization: Bearer <token>'\
--header 'Content-Type: application/json' \
--header 'type: API' \
--data '
{
"country": "EC",
"passing_score": 7,
"base_score": 10,
"score_decimals": 2,
"weight_score": 10,
"round": false,
"calculate_by_equivalences": false,
"new_promotion_logic": false,
"enable_custom_year": false
}
'
const request = fetch("https://idukay.net/api/years", {
method: "POST",
headers: {
Authorization: 'Bearer <token>',
Content-Type: 'application/json',
type: 'API'
},
body: JSON.stringify({
"country": "EC",
"passing_score": 7,
"base_score": 10,
"score_decimals": 2,
"weight_score": 10,
"round": false,
"calculate_by_equivalences": false,
"new_promotion_logic": false,
"enable_custom_year": false
})
});
const response = await request.json();
Headers▼
Body▼
Esquema respuesta▼