GET /api/v1/cadences/{cadenceId}/enrollments
Lista os leads matriculados por cursor. status aceita a situação da matrícula (active, paused e outras) ou o resultado (won, lost). day, step e at filtram uma posição da régua: at=reached inclui quem passou por ela; at=ended, quem terminou exatamente nela.
Exemplos A URL usa o servidor de produção. Defina PIPEFACIL_API_KEY e as variáveis de caminho (como SEQ ou ID) com os identificadores reais. Ajuste o corpo antes de executar: requisições de escrita alteram dados do workspace.
cURL curl --request GET \
--url "https://pipefacil-server.matchsales.com.br/api/v1/cadences/ $CADENCEID /enrollments" \
--header "Authorization: Bearer $PIPEFACIL_API_KEY " JavaScript const response = await fetch ( `https://pipefacil-server.matchsales.com.br/api/v1/cadences/${ process . env . CADENCEID }/enrollments` , {
method: "GET" ,
headers: {
Authorization: `Bearer ${ process . env . PIPEFACIL_API_KEY }` ,
},
});
if ( ! response.ok) throw new Error ( `HTTP ${ response . status }: ${ await response . text () }` );
const text = await response. text ();
const data = text ? JSON . parse (text) : null ; Python import os
import json
import requests
response = requests.request(
"GET" ,
f "https://pipefacil-server.matchsales.com.br/api/v1/cadences/ { os.environ[ 'CADENCEID' ] } /enrollments" ,
headers = { "Authorization" : f "Bearer { os.environ[ 'PIPEFACIL_API_KEY' ] } " },
)
response.raise_for_status()
data = response.json() if response.content else None Parâmetros Nome Local Tipo Obrigatório Descrição cadenceIdpathstringSim Identificador da cadência. statusquerystringNão — dayqueryintegerNão — stepqueryintegerNão — atquerystringNão — cursorquerystringNão — limitqueryintegerNão —
Respostas 200 Sucesso Campo Tipo Descrição dataobject— data.itemsarray— data.items[].enrollmentIdstring— data.items[].dealIdstring— data.items[].dealSeqintegerObsoleto. Identifique o negócio por dealId. data.items[].dealNamestring— data.items[].responsibleUserIdstring— data.items[].responsibleNamestringAceita null. data.items[].trackTypestringValores: entry, stage_playbook, none. data.items[].stageIdstringAceita null. data.items[].statusstringactive | paused | completed | stopped_dnc | stopped_stage_end data.items[].startedAtstringFormato: date-time. data.items[].outcomestringResultado da rotina. Nulo indica que ainda está em andamento ou terminou sem uma regra correspondente. Permite distinguir o resultado dos estados completed, stopped_dnc e stopped_stage_end. Aceita null. data.items[].outcomeLabelstringEtapa do negócio quando a matrícula foi encerrada, não sua etapa atual. Aceita null. data.nextCursorstringAceita null. data.hasMoreboolean— messagestringAceita null.
Esquema OpenAPI {
"type" : "object" ,
"properties" : {
"data" : {
"type" : "object" ,
"properties" : {
"items" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/CadenceEnrollmentItem"
}
},
"nextCursor" : {
"type" : "string" ,
"nullable" : true
},
"hasMore" : {
"type" : "boolean"
}
}
},
"message" : {
"type" : "string" ,
"nullable" : true
}
}
} 400 Falha de validação dos campos; `fieldErrors` contém os erros. Campo Tipo Descrição errorstring— codestringValores: BAD_REQUEST, VALIDATION_ERROR, UNAUTHORIZED, FORBIDDEN, FEATURE_DISABLED, NOT_FOUND, CONFLICT, QUOTA_EXCEEDED, UNPROCESSABLE_ENTITY, INTERNAL_ERROR, SERVICE_UNAVAILABLE. requestIdstring— detailsstringAceita null. fieldErrorsarrayAceita null. fieldErrors[].fieldstring— fieldErrors[].messagestring—
Esquema OpenAPI {
"type" : "object" ,
"description" : "Formato padrão de erro. `details` e `fieldErrors` são omitidos quando ausentes." ,
"properties" : {
"error" : {
"type" : "string"
},
"code" : {
"type" : "string" ,
"enum" : [
"BAD_REQUEST" ,
"VALIDATION_ERROR" ,
"UNAUTHORIZED" ,
"FORBIDDEN" ,
"FEATURE_DISABLED" ,
"NOT_FOUND" ,
"CONFLICT" ,
"QUOTA_EXCEEDED" ,
"UNPROCESSABLE_ENTITY" ,
"INTERNAL_ERROR" ,
"SERVICE_UNAVAILABLE"
]
},
"requestId" : {
"type" : "string"
},
"details" : {
"type" : "string" ,
"nullable" : true
},
"fieldErrors" : {
"type" : "array" ,
"nullable" : true ,
"items" : {
"type" : "object" ,
"properties" : {
"field" : {
"type" : "string"
},
"message" : {
"type" : "string"
}
}
}
}
},
"required" : [
"error" ,
"code" ,
"requestId"
]
} 401 Chave ausente, malformada, desconhecida, revogada ou expirada, ou membro emissor inativo. Campo Tipo Descrição errorstring— codestringValores: BAD_REQUEST, VALIDATION_ERROR, UNAUTHORIZED, FORBIDDEN, FEATURE_DISABLED, NOT_FOUND, CONFLICT, QUOTA_EXCEEDED, UNPROCESSABLE_ENTITY, INTERNAL_ERROR, SERVICE_UNAVAILABLE. requestIdstring— detailsstringAceita null. fieldErrorsarrayAceita null. fieldErrors[].fieldstring— fieldErrors[].messagestring—
Esquema OpenAPI {
"type" : "object" ,
"description" : "Formato padrão de erro. `details` e `fieldErrors` são omitidos quando ausentes." ,
"properties" : {
"error" : {
"type" : "string"
},
"code" : {
"type" : "string" ,
"enum" : [
"BAD_REQUEST" ,
"VALIDATION_ERROR" ,
"UNAUTHORIZED" ,
"FORBIDDEN" ,
"FEATURE_DISABLED" ,
"NOT_FOUND" ,
"CONFLICT" ,
"QUOTA_EXCEEDED" ,
"UNPROCESSABLE_ENTITY" ,
"INTERNAL_ERROR" ,
"SERVICE_UNAVAILABLE"
]
},
"requestId" : {
"type" : "string"
},
"details" : {
"type" : "string" ,
"nullable" : true
},
"fieldErrors" : {
"type" : "array" ,
"nullable" : true ,
"items" : {
"type" : "object" ,
"properties" : {
"field" : {
"type" : "string"
},
"message" : {
"type" : "string"
}
}
}
}
},
"required" : [
"error" ,
"code" ,
"requestId"
]
} 403 Autenticado, mas sem acesso: falta de permissão (`FORBIDDEN`), recurso desligado no workspace (`FEATURE_DISABLED`) ou tentativa de acessar uma agenda não permitida. Campo Tipo Descrição errorstring— codestringValores: BAD_REQUEST, VALIDATION_ERROR, UNAUTHORIZED, FORBIDDEN, FEATURE_DISABLED, NOT_FOUND, CONFLICT, QUOTA_EXCEEDED, UNPROCESSABLE_ENTITY, INTERNAL_ERROR, SERVICE_UNAVAILABLE. requestIdstring— detailsstringAceita null. fieldErrorsarrayAceita null. fieldErrors[].fieldstring— fieldErrors[].messagestring—
Esquema OpenAPI {
"type" : "object" ,
"description" : "Formato padrão de erro. `details` e `fieldErrors` são omitidos quando ausentes." ,
"properties" : {
"error" : {
"type" : "string"
},
"code" : {
"type" : "string" ,
"enum" : [
"BAD_REQUEST" ,
"VALIDATION_ERROR" ,
"UNAUTHORIZED" ,
"FORBIDDEN" ,
"FEATURE_DISABLED" ,
"NOT_FOUND" ,
"CONFLICT" ,
"QUOTA_EXCEEDED" ,
"UNPROCESSABLE_ENTITY" ,
"INTERNAL_ERROR" ,
"SERVICE_UNAVAILABLE"
]
},
"requestId" : {
"type" : "string"
},
"details" : {
"type" : "string" ,
"nullable" : true
},
"fieldErrors" : {
"type" : "array" ,
"nullable" : true ,
"items" : {
"type" : "object" ,
"properties" : {
"field" : {
"type" : "string"
},
"message" : {
"type" : "string"
}
}
}
}
},
"required" : [
"error" ,
"code" ,
"requestId"
]
} 404 Recurso não encontrado ou fora da visibilidade do membro. Campo Tipo Descrição errorstring— codestringValores: BAD_REQUEST, VALIDATION_ERROR, UNAUTHORIZED, FORBIDDEN, FEATURE_DISABLED, NOT_FOUND, CONFLICT, QUOTA_EXCEEDED, UNPROCESSABLE_ENTITY, INTERNAL_ERROR, SERVICE_UNAVAILABLE. requestIdstring— detailsstringAceita null. fieldErrorsarrayAceita null. fieldErrors[].fieldstring— fieldErrors[].messagestring—
Esquema OpenAPI {
"type" : "object" ,
"description" : "Formato padrão de erro. `details` e `fieldErrors` são omitidos quando ausentes." ,
"properties" : {
"error" : {
"type" : "string"
},
"code" : {
"type" : "string" ,
"enum" : [
"BAD_REQUEST" ,
"VALIDATION_ERROR" ,
"UNAUTHORIZED" ,
"FORBIDDEN" ,
"FEATURE_DISABLED" ,
"NOT_FOUND" ,
"CONFLICT" ,
"QUOTA_EXCEEDED" ,
"UNPROCESSABLE_ENTITY" ,
"INTERNAL_ERROR" ,
"SERVICE_UNAVAILABLE"
]
},
"requestId" : {
"type" : "string"
},
"details" : {
"type" : "string" ,
"nullable" : true
},
"fieldErrors" : {
"type" : "array" ,
"nullable" : true ,
"items" : {
"type" : "object" ,
"properties" : {
"field" : {
"type" : "string"
},
"message" : {
"type" : "string"
}
}
}
}
},
"required" : [
"error" ,
"code" ,
"requestId"
]
} 429 Limite de requisições excedido por workspace ou IP. Campo Tipo Descrição errorstring— codestringValores: BAD_REQUEST, VALIDATION_ERROR, UNAUTHORIZED, FORBIDDEN, FEATURE_DISABLED, NOT_FOUND, CONFLICT, QUOTA_EXCEEDED, UNPROCESSABLE_ENTITY, INTERNAL_ERROR, SERVICE_UNAVAILABLE. requestIdstring— detailsstringAceita null. fieldErrorsarrayAceita null. fieldErrors[].fieldstring— fieldErrors[].messagestring—
Esquema OpenAPI {
"type" : "object" ,
"description" : "Formato padrão de erro. `details` e `fieldErrors` são omitidos quando ausentes." ,
"properties" : {
"error" : {
"type" : "string"
},
"code" : {
"type" : "string" ,
"enum" : [
"BAD_REQUEST" ,
"VALIDATION_ERROR" ,
"UNAUTHORIZED" ,
"FORBIDDEN" ,
"FEATURE_DISABLED" ,
"NOT_FOUND" ,
"CONFLICT" ,
"QUOTA_EXCEEDED" ,
"UNPROCESSABLE_ENTITY" ,
"INTERNAL_ERROR" ,
"SERVICE_UNAVAILABLE"
]
},
"requestId" : {
"type" : "string"
},
"details" : {
"type" : "string" ,
"nullable" : true
},
"fieldErrors" : {
"type" : "array" ,
"nullable" : true ,
"items" : {
"type" : "object" ,
"properties" : {
"field" : {
"type" : "string"
},
"message" : {
"type" : "string"
}
}
}
}
},
"required" : [
"error" ,
"code" ,
"requestId"
]
}