---
title: "Endpoints de la API: documentación de CheckoutOS | Chargezen"
description: "Referencia completa de los endpoints de CheckoutOS. De la sección “Referencia de la API” de la documentación de Chargezen CheckoutOS."
url: "https://chargezen.com/es/docs/checkoutos/api/endpoints"
lang: "es"
updated: "2025-01-16"
---

Canonical URL: https://chargezen.com/es/docs/checkoutos/api/endpoints

# Endpoints de la API

Referencia completa de los endpoints de CheckoutOS

Última actualización: 2025-01-16

Esta referencia documenta todos los endpoints disponibles de CheckoutOS. Todos requieren autenticación y devuelven respuestas JSON.

URL base

Producción: `https://api.chargezen.com/v1`  
Pruebas: `https://sandbox.api.chargezen.com/v1`

## Ventas adicionales

### Listar ofertas de venta adicional

GET /upsells

```bash
curl -X GET "https://api.chargezen.com/v1/upsells" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Response
{
  "data": [
    {
      "id": "upsell_123",
      "name": "Premium Add-On",
      "status": "active",
      "product_id": "prod_abc",
      "discount_type": "percentage",
      "discount_value": 15,
      "created_at": "2025-01-15T10:00:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 20,
    "total": 45
  }
}
```

### Crear una oferta de venta adicional

POST /upsells

```bash
curl -X POST "https://api.chargezen.com/v1/upsells" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Premium Add-On",
    "product_id": "prod_abc",
    "trigger_products": ["prod_xyz"],
    "discount": {
      "type": "percentage",
      "value": 15
    },
    "placement": "post_purchase",
    "status": "active"
  }'
```

### Obtener una oferta

GET /upsells/:id

```bash
curl -X GET "https://api.chargezen.com/v1/upsells/upsell_123" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### Actualizar una oferta

PUT /upsells/:id

```bash
curl -X PUT "https://api.chargezen.com/v1/upsells/upsell_123" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "discount": {
      "type": "percentage",
      "value": 20
    }
  }'
```

### Eliminar una oferta

DELETE /upsells/:id

```bash
curl -X DELETE "https://api.chargezen.com/v1/upsells/upsell_123" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Paquetes

### Listar paquetes

GET /bundles

```bash
curl -X GET "https://api.chargezen.com/v1/bundles" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Query parameters:
# ?type=fixed|mix_match|build_a_box
# ?status=active|draft|archived
# ?page=1&per_page=20
```

### Crear un paquete

POST /bundles

```bash
curl -X POST "https://api.chargezen.com/v1/bundles" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Skincare Starter Kit",
    "type": "fixed",
    "products": [
      { "product_id": "prod_cleanser", "quantity": 1 },
      { "product_id": "prod_toner", "quantity": 1 },
      { "product_id": "prod_moisturizer", "quantity": 1 }
    ],
    "pricing": {
      "type": "percentage_off",
      "value": 20
    }
  }'
```

## Análisis

### Obtener métricas

GET /analytics/metrics

```bash
curl -X GET "https://api.chargezen.com/v1/analytics/metrics?start_date=2025-01-01&end_date=2025-01-31" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Response
{
  "data": {
    "total_revenue": 127450.00,
    "checkoutos_revenue": 28190.00,
    "average_order_value": 94.50,
    "upsell_acceptance_rate": 0.184,
    "orders_with_upsells": 782,
    "total_orders": 4250
  },
  "period": {
    "start": "2025-01-01",
    "end": "2025-01-31"
  }
}
```

### Obtener un informe

GET /analytics/reports/:type

```bash
curl -X GET "https://api.chargezen.com/v1/analytics/reports/upsell_performance?start_date=2025-01-01&end_date=2025-01-31" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Available report types:
# - upsell_performance
# - bundle_performance
# - revenue_attribution
# - conversion_funnel
```

## Experimentos

### Listar experimentos

GET /experiments

```bash
curl -X GET "https://api.chargezen.com/v1/experiments" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Query parameters:
# ?status=running|completed|draft
# ?page=1&per_page=20
```

### Obtener resultados de un experimento

GET /experiments/:id/results

```bash
curl -X GET "https://api.chargezen.com/v1/experiments/exp_123/results" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Response
{
  "experiment_id": "exp_123",
  "status": "significant",
  "winner": "variant_a",
  "variants": [
    {
      "name": "control",
      "visitors": 5000,
      "conversions": 250,
      "conversion_rate": 0.05
    },
    {
      "name": "variant_a",
      "visitors": 5000,
      "conversions": 325,
      "conversion_rate": 0.065,
      "lift": 0.30,
      "p_value": 0.001
    }
  ]
}
```

## Pedidos

### Obtener un pedido

GET /orders/:id

```bash
curl -X GET "https://api.chargezen.com/v1/orders/order_123" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Response includes CheckoutOS-specific data:
{
  "order_id": "order_123",
  "shopify_order_id": "5678901234",
  "checkoutos_data": {
    "upsells_accepted": ["upsell_abc"],
    "bundles_purchased": [],
    "checkoutos_revenue": 24.99,
    "experiment_variant": "variant_a"
  }
}
```

## Configuración

### Obtener configuración

GET /settings

```bash
curl -X GET "https://api.chargezen.com/v1/settings" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### Actualizar configuración

PATCH /settings

```bash
curl -X PATCH "https://api.chargezen.com/v1/settings" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "upsells": {
      "default_placement": "post_purchase",
      "max_offers_per_checkout": 2
    }
  }'
```

## Respuestas de error

Formato de error

```json
{
  "error": {
    "code": "invalid_request",
    "message": "The request was invalid",
    "details": [
      {
        "field": "discount.value",
        "message": "must be between 1 and 100"
      }
    ]
  }
}
```

#### Códigos de error comunes

*   400 Bad Request — Parámetros no válidos
*   401 Unauthorized — Falta la clave de API o no es válida
*   403 Forbidden — Permisos insuficientes
*   404 Not Found — No se encuentra el recurso
*   429 Too Many Requests — Límite de solicitudes alcanzado
*   500 Internal Server Error — Error del servidor

## Temas relacionados

[

### Autenticación

Gestión de claves de API

Más información



](https://chargezen.com/es/docs/checkoutos/api/authentication)[

### Webhooks

Notificaciones de eventos en tiempo real

Más información



](https://chargezen.com/es/docs/checkoutos/api/webhooks)

¿Te resultó útil esta página?

¿Necesitas más ayuda? [Contactar con soporte](https://chargezen.com/es/docs/checkoutos/troubleshooting/support)
