{
  "openapi": "3.0.1",
  "info": {
    "title": "Chilexpress – Cotizar Envíos, Seguimiento y Coberturas",
    "description": "Chilexpress official developer APIs as clean JSON: coverage areas and regions (no key needed), offices and Pick Up points, shipping quotes between communes and tracking of your own transport orders, with your own free subscription keys. Not affiliated with Chilexpress.",
    "version": "0.1",
    "x-build-id": "QwdgZqRaRaLRM7V4s"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/better-llama~chilexpress-envios-chile/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-better-llama-chilexpress-envios-chile",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/better-llama~chilexpress-envios-chile/runs": {
      "post": {
        "operationId": "runs-sync-better-llama-chilexpress-envios-chile",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/better-llama~chilexpress-envios-chile/run-sync": {
      "post": {
        "operationId": "run-sync-better-llama-chilexpress-envios-chile",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "operation": {
            "title": "Operación / Operation",
            "enum": [
              "coberturas",
              "regiones",
              "oficinas",
              "cotizar",
              "seguimiento"
            ],
            "type": "string",
            "description": "regiones y coberturas: sin clave. oficinas: clave «Coberturas» recomendada. cotizar: clave «Cotizador». seguimiento: clave «Envíos».",
            "default": "coberturas"
          },
          "coberturasKey": {
            "title": "Clave «Coberturas» (opcional)",
            "type": "string",
            "description": "Clave de suscripción (Primary key) de tu cuenta gratuita en https://developers.wschilexpress.com, producto «Coberturas». Cifrada; nunca se registra en logs."
          },
          "cotizadorKey": {
            "title": "Clave «Cotizador»",
            "type": "string",
            "description": "Clave de suscripción (Primary key) de tu cuenta gratuita en https://developers.wschilexpress.com, producto «Cotizador». Cifrada; nunca se registra en logs."
          },
          "enviosKey": {
            "title": "Clave «Envíos»",
            "type": "string",
            "description": "Clave de suscripción (Primary key) de tu cuenta gratuita en https://developers.wschilexpress.com, producto «Envíos». Cifrada; nunca se registra en logs."
          },
          "environment": {
            "title": "Ambiente / Environment",
            "enum": [
              "produccion",
              "pruebas"
            ],
            "type": "string",
            "description": "Las claves de prueba solo funcionan en «pruebas».",
            "default": "produccion"
          },
          "regions": {
            "title": "Regiones / Regions",
            "type": "array",
            "description": "coberturas/oficinas: RM, R5…, número INE o nombre. Vacío = todo Chile.",
            "items": {
              "type": "string"
            }
          },
          "comunas": {
            "title": "Comunas / Communes",
            "type": "array",
            "description": "Filtra por comuna (sin tildes ni mayúsculas).",
            "items": {
              "type": "string"
            }
          },
          "coverageType": {
            "title": "Tipo de cobertura",
            "enum": [
              "comunas",
              "sectores",
              "todas"
            ],
            "type": "string",
            "description": "comunas = una fila por comuna; sectores = localidades dentro de comunas; todas = ambas.",
            "default": "comunas"
          },
          "officeType": {
            "title": "Tipo de oficina",
            "enum": [
              "todas",
              "sucursales",
              "pickup"
            ],
            "type": "string",
            "description": "Solo operation=oficinas.",
            "default": "todas"
          },
          "origin": {
            "title": "Origen / Origin",
            "type": "string",
            "description": "Comuna o código de cobertura (p. ej. «Santiago» o «STGO»)."
          },
          "destinations": {
            "title": "Destinos / Destinations",
            "type": "array",
            "description": "Una o más comunas o códigos (máx. 50).",
            "items": {
              "type": "string"
            }
          },
          "weightKg": {
            "title": "Peso (kg)",
            "type": "string",
            "description": "Por defecto 1."
          },
          "heightCm": {
            "title": "Alto (cm)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Por defecto 10."
          },
          "widthCm": {
            "title": "Ancho (cm)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Por defecto 10."
          },
          "lengthCm": {
            "title": "Largo (cm)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Por defecto 10."
          },
          "productType": {
            "title": "Producto",
            "enum": [
              "encomienda",
              "documento"
            ],
            "type": "string",
            "description": "Tipo de envío.",
            "default": "encomienda"
          },
          "declaredValue": {
            "title": "Valor declarado (CLP)",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Por defecto 10000."
          },
          "deliveryTime": {
            "title": "Servicios",
            "enum": [
              "todos",
              "prioritarios",
              "no_prioritarios"
            ],
            "type": "string",
            "description": "Qué servicios cotizar.",
            "default": "todos"
          },
          "trackingNumbers": {
            "title": "Números de OT / Tracking numbers",
            "type": "array",
            "description": "Órdenes de transporte a seguir (máx. 200).",
            "items": {
              "type": "string"
            }
          },
          "companyRut": {
            "title": "RUT de la empresa emisora",
            "type": "string",
            "description": "RUT de la empresa que generó las OT (con o sin dígito verificador). La API de Envíos solo permite seguir OT de tu propia empresa."
          },
          "reference": {
            "title": "Referencia (opcional)",
            "type": "string",
            "description": "Referencia del cliente asociada a la OT."
          },
          "showEvents": {
            "title": "Incluir todos los eventos",
            "type": "boolean",
            "description": "Si no, solo el estado actual.",
            "default": true
          },
          "includeRaw": {
            "title": "Incluir respuesta original / Include raw",
            "type": "boolean",
            "description": "Sin datos personales (receptor, dirección, encargado).",
            "default": false
          },
          "maxItems": {
            "title": "Máximo de resultados / Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Tope de filas entregadas y cobradas. Por defecto 1000.",
            "default": 1000
          },
          "requestIntervalMs": {
            "title": "Pausa entre solicitudes (ms)",
            "minimum": 200,
            "maximum": 10000,
            "type": "integer",
            "description": "Por defecto 500.",
            "default": 500
          },
          "maxRetries": {
            "title": "Reintentos / Retries",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Por defecto 4.",
            "default": 4
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}