Context
Several teams run nightly jobs that validate PEC addresses and push the results into their CRM (HubSpot, Salesforce, custom). The current SDK makes the API call straightforward but the surrounding ETL glue is always written from scratch.
Typical integration code
$client = new Client($token);
foreach ($contacts as $contact) {
$raw = $client->get('https://pec.openapi.com/check', [
'pec' => $contact['email']
]);
$result = json_decode($raw, true);
if ($result['valid'] === true) {
$crm->updateContact($contact['id'], ['pec_verified' => true]);
}
}
What's missing
- No structured response object — consumers always
json_decode manually.
- No event/hook to plug into after each item is processed.
- No dry-run mode for testing the pipeline without hitting the API.
Open questions
- Would a response DTO or a
ResponseInterface be welcome, or is raw JSON preferred to keep the SDK agnostic?
- Should the SDK ship with a
PipelineRunner helper, or is that out of scope?
Context
Several teams run nightly jobs that validate PEC addresses and push the results into their CRM (HubSpot, Salesforce, custom). The current SDK makes the API call straightforward but the surrounding ETL glue is always written from scratch.
Typical integration code
What's missing
json_decodemanually.Open questions
ResponseInterfacebe welcome, or is raw JSON preferred to keep the SDK agnostic?PipelineRunnerhelper, or is that out of scope?