YOUR APPLICATIONRelationships & metrics
- customer_id
- plan
- orders
- events
Use a stable customer ID in your application and call Piipe only when an approved workflow needs direct identity. Your joins, transactions and analytics stay useful without carrying another full customer profile.
YOUR APPLICATIONRelationships & metrics
PIIPEProtected identity
Query business data first. Retrieve only the approved fields for the final result set.
Keep business relationships and non-identifying facts in your application. Store direct identity in Piipe under the same application-owned customer reference.
Keep application credentials out of browser code, use finite timeouts and request only the identity fields each workflow needs.
Use a non-identifying value for application joins and Piipe requests.
Send the direct identifiers your application no longer needs to hold.
Request only the approved fields at the moment an authorised workflow needs them.
Your application profile binds one organisation, application and purpose to a protected session key. Keep the complete profile in your server-side secret manager and let the Piipe SDK create and verify every request envelope.
import os
from piipe import EnvelopeHttpsTransport, PiipeApplicationClient, PiipeConfig
key = bytes.fromhex(os.environ["PIIPE_SESSION_KEY_HEX"])
epoch = int(os.environ["PIIPE_BOOT_EPOCH"], 0)
transport = EnvelopeHttpsTransport(
"api.piipe.io", session_key=key, boot_epoch=epoch
)
client = PiipeApplicationClient.from_transport(
transport,
PiipeConfig(
tenant_id=int(os.environ["PIIPE_TENANT_SLOT"]),
application_id=int(os.environ["PIIPE_APP_ID"]),
purpose_code=int(os.environ["PIIPE_PURPOSE_CODE"]),
session_id=int(os.environ["PIIPE_SESSION_ID"], 0),
boot_epoch=epoch,
packet_auth_key=key,
initial_request_id=int(os.environ["PIIPE_REQUEST_ID"], 0),
initial_sequence=int(os.environ["PIIPE_SEQUENCE"], 0),
),
)Load it only inside the trusted server process that needs PII access.
The SDK seals requests for Piipe and verifies every response before returning it.
Prefer email,phone over retrieving a complete identity collection.
Preserve the issued counters and reconcile uncertain mutations before retrying.
| SDK operation | Purpose |
|---|---|
search_subject | Find an exact customer reference without returning identity fields. |
write_subject_field_record | Store named identity fields for a customer reference. |
read_subject_fields | Retrieve only the explicitly requested fields. |
update_field_record | Replace named field values as one logical change. |
delete_subject_record | Remove the live identity record from normal access. |
ping | Verify an authenticated service exchange without moving PII. |
saved = client.write_subject_field_record(
"customer_12345",
{
"name": "Example Person",
"email": "person@example.com",
},
subject_type="customer_id",
)identity = client.read_subject_fields(
"customer_12345",
["name", "email"],
subject_type="customer_id",
)nameemailphoneaddressdobdocumentTreat one customer’s named fields as a logical identity collection. Design request sizes around the limits published for your plan and application.
Bound every request and treat a timeout as an unknown outcome until reconciled.
Keep credentials, sessions and identity fields out of application logs and error trackers.
Do not blindly repeat a timed-out store, update or delete request. Check the customer reference and request outcome first.
Keep application credentials and Piipe sessions out of browser code, mobile applications, source repositories and analytics events.
The OpenAPI 3.1 document defines the fixed authenticated-envelope exchange used by the Piipe v2 SDK.