ProcPilot ProcPilot ProcPilot · API Reference
Integration API v1.0

API de integración

…

v1.0 REST · JSON Planes Professional+

URL base

Base URL: https://{tu-tenant}.procpilot.com/api/integrations/v1

Autenticación

MétodoEjemplo
Header Authorization Authorization: Bearer ps_live_xxxxxxxx_…
Header X-Api-Key X-Api-Key: ps_live_xxxxxxxx_…

curl -H "Authorization: Bearer ps_live_abc12345_your-secret" \
  "https://your-tenant.procpilot.com/api/integrations/v1/processes"

Tipos de clave y scopes

Tipo Scopes Uso
processes:read, kpis:read
kpis:write

Canal consulta — Procesos

GET /processes processes:read

Query params

Parámetro Tipo Descripción
updatedSince datetime (ISO 8601)

Respuesta 200

[
  {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "name": "Purchase approval",
    "description": "…",
    "status": "Active",
    "catalogLevel": "Process",
    "organizationalUnitId": "…",
    "organizationalUnitName": "Finance",
    "currentVersionId": "…",
    "currentVersionNumber": 3,
    "updatedAt": "2026-06-01T12:00:00Z"
  }
]
GET /processes/{id} processes:read

Canal consulta — Versión vigente

GET /processes/{id}/current-version processes:read

{
  "versionId": "…",
  "versionNumber": 3,
  "status": "Approved",
  "sourceType": "Discovery",
  "summaryText": "…",
  "effectiveFrom": "2026-05-01T00:00:00Z",
  "createdAt": "2026-04-15T10:00:00Z",
  "toBeModel": {
    "id": "…",
    "bpmnDiagramXml": "<?xml …>",
    "processNarrative": "…",
    "steps": [{ "id": "…", "order": 1, "name": "…", "description": "…", "responsible": "…", "system": "…" }],
    "businessRules": [{ "id": "…", "code": "BR-01", "description": "…", "category": "…", "relatedStepId": "…" }],
    "raciMatrix": [{ "stepId": "…", "stepName": "…", "assignee": "…", "raciRole": "Responsible" }]
  }
}

Canal consulta — KPIs

GET /processes/{id}/kpis kpis:read

[
  {
    "id": "…",
    "processId": "…",
    "name": "Mean approval time",
    "description": "…",
    "unit": "h",
    "baseline": 48,
    "target": 24,
    "frequency": "Monthly",
    "externalKey": "APPROVAL_MT",
    "isActive": true,
    "updatedAt": "2026-06-01T08:00:00Z"
  }
]

Canal consulta — Mediciones

GET /kpis/{kpiId}/measurements kpis:read

Query params

Parámetro Tipo Descripción
fromdatetime
todatetime
[
  {
    "id": "…",
    "kpiId": "…",
    "value": 26.5,
    "measuredAt": "2026-06-30T12:00:00Z",
    "source": "Api",
    "externalId": "etl-2026-06",
    "notes": null,
    "createdAt": "2026-07-02T09:00:00Z"
  }
]

Canal ingesta — Mediciones KPI

POST /kpis/{kpiId}/measurements kpis:write

Body

{
  "value": 42.5,
  "measuredAt": "2026-06-30T12:00:00Z",
  "externalId": "etl-batch-2026-06",
  "notes": "Monthly load from BI"
}
Campo Tipo Requerido Descripción
valuenumberSí
measuredAtdatetimeSí
externalIdstringNo
notesstringNo

PUT /kpis/{kpiId}/measurements/by-external-id/{externalId} kpis:write

Modelos principales

Modelo Descripción
IntegrationProcessSummaryDto
IntegrationProcessDetailDto
IntegrationCurrentVersionDto
IntegrationKpiDto
IntegrationMeasurementDto
IntegrationIngestMeasurementRequest

Códigos de error

HTTP code Descripción
401missing_key
401invalid_key
401revoked_key
401expired_key
403insufficient_scope
403integration_api
404not_found / kpi_not_found
400kpi_inactive
400process_archived
400invalid_measured_at
429—

OpenAPI

GET /api/integrations/v1/openapi.json