Contenido
Revendedor
Cuentas de clientes de una organización revendedora y su consumo.
Los ejemplos marcados como generados se construyen a partir del esquema con valores sintéticos.
- GETListar clientes
/api/v2/reseller/customers - POSTCrear un cliente
/api/v2/reseller/customers - GETObtener un cliente
/api/v2/reseller/customers/{customer_id} - GETConsumo de un cliente
/api/v2/reseller/customers/{customer_id}/usage
/api/v2/reseller/customersListar clientes
Devuelve las cuentas de clientes de tu organización revendedora.
- Autenticación
- Token de API o sesión del portal
- Permiso necesario
tenant.customers_read
Parámetros
| Nombre | En | Tipo | Obligatorio | Reglas |
|---|---|---|---|---|
| limit | Consulta | integer | No |
|
| cursor | Consulta | string | No |
|
Respuestas
200Correctoapplication/json
Campos (13)
Respuestas listCustomers 200 Campo Tipo Obligatorio Reglas data array<object> Sí data[].id string Sí data[].type string Sí - Uno de: platform, reseller, customer
data[].name string Sí data[].status string Sí data[].default_locale string Sí - Uno de: en, es
data[].timezone string Sí data[].accounting_ref string Sí - Puede ser null
data[].created_at string Sí - Formato: date-time
data[].updated_at string Sí - Formato: date-time
pagination object Sí pagination.next_cursor string Sí - Puede ser null
pagination.has_more boolean Sí Ejemplo (generado a partir del esquema) { "data": [ { "id": "id_example", "type": "platform", "name": "Example", "status": "string", "default_locale": "en", "timezone": "UTC", "accounting_ref": "string", "created_at": "2026-01-15T10:00:00Z", "updated_at": "2026-01-15T10:00:00Z" } ], "pagination": { "next_cursor": "string", "has_more": false } }400Petición incorrectaapplication/problem+json
Códigos de error:
Cuerpo de detalles de problema
Ejemplo { "type": "https://www.cdnify.lat/docs/errors/malformed_request", "title": "Solicitud mal formada", "status": 400, "code": "malformed_request", "request_id": "req_01EXAMPLE00000000000000000" }401No autenticadoapplication/problem+json
Cabeceras: WWW-Authenticate
Códigos de error:
Cuerpo de detalles de problema
Ejemplo { "type": "https://www.cdnify.lat/docs/errors/unauthenticated", "title": "Autenticación requerida", "status": 401, "code": "unauthenticated", "request_id": "req_01EXAMPLE00000000000000000" }403Prohibidoapplication/problem+json
Códigos de error:
Cuerpo de detalles de problema
Ejemplo { "type": "https://www.cdnify.lat/docs/errors/insufficient_scope", "title": "Permisos insuficientes", "status": 403, "code": "insufficient_scope", "request_id": "req_01EXAMPLE00000000000000000" }
curl 'https://api.cdnify.lat/api/v2/reseller/customers' \
-H "Authorization: Bearer $CDNIFY_API_TOKEN"/api/v2/reseller/customersCrear un cliente
Crea una cuenta de cliente en tu organización revendedora.
- Autenticación
- Token de API o sesión del portal
- Permiso necesario
tenant.customers_manage
Parámetros
| Nombre | En | Tipo | Obligatorio | Reglas |
|---|---|---|---|---|
| Idempotency-Key | Cabecera | string | No |
|
Cuerpo de la petición
Tipos de contenido: application/json
| Campo | Tipo | Obligatorio | Reglas |
|---|---|---|---|
| name | string | Sí |
|
| default_locale | string | No |
|
| timezone | string | No | |
| accounting_ref | string | No |
|
{
"name": "Example",
"default_locale": "en",
"timezone": "Europe/Madrid",
"accounting_ref": "string"
}Respuestas
201Creadoapplication/json
Cabeceras: Location
Campos (9)
Respuestas createCustomer 201 Campo Tipo Obligatorio Reglas id string Sí type string Sí - Uno de: platform, reseller, customer
name string Sí status string Sí default_locale string Sí - Uno de: en, es
timezone string Sí accounting_ref string Sí - Puede ser null
created_at string Sí - Formato: date-time
updated_at string Sí - Formato: date-time
Ejemplo (generado a partir del esquema) { "id": "id_example", "type": "platform", "name": "Example", "status": "string", "default_locale": "en", "timezone": "UTC", "accounting_ref": "string", "created_at": "2026-01-15T10:00:00Z", "updated_at": "2026-01-15T10:00:00Z" }401No autenticadoapplication/problem+json
Cabeceras: WWW-Authenticate
Códigos de error:
Cuerpo de detalles de problema
Ejemplo { "type": "https://www.cdnify.lat/docs/errors/unauthenticated", "title": "Autenticación requerida", "status": 401, "code": "unauthenticated", "request_id": "req_01EXAMPLE00000000000000000" }403Prohibidoapplication/problem+json
Códigos de error:
Cuerpo de detalles de problema
Ejemplo { "type": "https://www.cdnify.lat/docs/errors/insufficient_scope", "title": "Permisos insuficientes", "status": 403, "code": "insufficient_scope", "request_id": "req_01EXAMPLE00000000000000000" }409Conflictoapplication/problem+json
Códigos de error:
Cuerpo de detalles de problema
Ejemplo { "type": "https://www.cdnify.lat/docs/errors/alias_in_use", "title": "Nombre de sitio en uso", "status": 409, "code": "alias_in_use", "request_id": "req_01EXAMPLE00000000000000000" }422Contenido no procesableapplication/problem+json
Códigos de error:
Cuerpo de detalles de problema
Ejemplo { "type": "https://www.cdnify.lat/docs/errors/validation_failed", "title": "Error de validación", "status": 422, "code": "validation_failed", "request_id": "req_01EXAMPLE00000000000000000" }
curl -X POST 'https://api.cdnify.lat/api/v2/reseller/customers' \
-H "Authorization: Bearer $CDNIFY_API_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"name":"Example","default_locale":"en","timezone":"Europe/Madrid","accounting_ref":"string"}'/api/v2/reseller/customers/{customer_id}Obtener un cliente
Devuelve una cuenta de cliente de tu organización revendedora.
- Autenticación
- Token de API o sesión del portal
- Permiso necesario
tenant.customers_read
Parámetros
| Nombre | En | Tipo | Obligatorio | Reglas |
|---|---|---|---|---|
| customer_id | Ruta | string | Sí |
Respuestas
200Correctoapplication/json
Campos (9)
Respuestas getCustomer 200 Campo Tipo Obligatorio Reglas id string Sí type string Sí - Uno de: platform, reseller, customer
name string Sí status string Sí default_locale string Sí - Uno de: en, es
timezone string Sí accounting_ref string Sí - Puede ser null
created_at string Sí - Formato: date-time
updated_at string Sí - Formato: date-time
Ejemplo (generado a partir del esquema) { "id": "id_example", "type": "platform", "name": "Example", "status": "string", "default_locale": "en", "timezone": "UTC", "accounting_ref": "string", "created_at": "2026-01-15T10:00:00Z", "updated_at": "2026-01-15T10:00:00Z" }401No autenticadoapplication/problem+json
Cabeceras: WWW-Authenticate
Códigos de error:
Cuerpo de detalles de problema
Ejemplo { "type": "https://www.cdnify.lat/docs/errors/unauthenticated", "title": "Autenticación requerida", "status": 401, "code": "unauthenticated", "request_id": "req_01EXAMPLE00000000000000000" }404No encontradoapplication/problem+json
Códigos de error:
Cuerpo de detalles de problema
Ejemplo { "type": "https://www.cdnify.lat/docs/errors/not_found", "title": "No encontrado", "status": 404, "code": "not_found", "request_id": "req_01EXAMPLE00000000000000000" }
curl 'https://api.cdnify.lat/api/v2/reseller/customers/customer_example' \
-H "Authorization: Bearer $CDNIFY_API_TOKEN"/api/v2/reseller/customers/{customer_id}/usageConsumo de un cliente
Devuelve el periodo de consumo abierto de uno de tus clientes.
- Autenticación
- Token de API o sesión del portal
- Permiso necesario
tenant.customers_read
Parámetros
| Nombre | En | Tipo | Obligatorio | Reglas |
|---|---|---|---|---|
| customer_id | Ruta | string | Sí |
Respuestas
200Correctoapplication/json
Campos (13)
Respuestas getCustomerUsage 200 Campo Tipo Obligatorio Reglas period_number integer Sí starts_at string Sí - Formato: date-time
ends_at string Sí - Formato: date-time
- Puede ser null
bytes_used integer Sí - Formato: int64
bytes_limit integer Sí - Formato: int64
- Puede ser null
requests_used integer Sí - Formato: int64
metering_policy string Sí - Uno de: actual_bytes, uncached_multiplier, legacy_x4
metered_until string Sí - Formato: date-time
- Puede ser null
blocks array<object> Sí blocks[].kind string Sí blocks[].bytes_limit integer Sí - Formato: int64
blocks[].bytes_used integer Sí - Formato: int64
blocks[].expires_at string Sí - Formato: date-time
Ejemplo (generado a partir del esquema) { "period_number": 1, "starts_at": "2026-01-15T10:00:00Z", "ends_at": "2026-01-15T10:00:00Z", "bytes_used": 1, "bytes_limit": 1, "requests_used": 1, "metering_policy": "actual_bytes", "metered_until": "2026-01-15T10:00:00Z", "blocks": [ { "kind": "string", "bytes_limit": 1, "bytes_used": 1, "expires_at": "2026-01-15T10:00:00Z" } ] }401No autenticadoapplication/problem+json
Cabeceras: WWW-Authenticate
Códigos de error:
Cuerpo de detalles de problema
Ejemplo { "type": "https://www.cdnify.lat/docs/errors/unauthenticated", "title": "Autenticación requerida", "status": 401, "code": "unauthenticated", "request_id": "req_01EXAMPLE00000000000000000" }403Prohibidoapplication/problem+json
Códigos de error:
Cuerpo de detalles de problema
Ejemplo { "type": "https://www.cdnify.lat/docs/errors/insufficient_scope", "title": "Permisos insuficientes", "status": 403, "code": "insufficient_scope", "request_id": "req_01EXAMPLE00000000000000000" }404No encontradoapplication/problem+json
Códigos de error:
Cuerpo de detalles de problema
Ejemplo { "type": "https://www.cdnify.lat/docs/errors/not_found", "title": "No encontrado", "status": 404, "code": "not_found", "request_id": "req_01EXAMPLE00000000000000000" }
curl 'https://api.cdnify.lat/api/v2/reseller/customers/customer_example/usage' \
-H "Authorization: Bearer $CDNIFY_API_TOKEN"