Check a purchase code's status
const url = 'https://dev-api.tsp.cl/firma_digital/dev/api/partners/v1/status?p_code=example';const options = {method: 'GET', headers: {'x-gw': '<x-gw>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://dev-api.tsp.cl/firma_digital/dev/api/partners/v1/status?p_code=example' \ --header 'x-gw: <x-gw>'A simplified status, without exposing internal fields — meant for a partner integrated via the widget to poll how far along a user is, without relying on listening to widget events in real time.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters”Responses
Section titled “ Responses ”OK
object
object
In precedence order (the first one that applies wins): CANCELLED (voided, wins even over an already-issued certificate) > EXPIRED (issued but has since expired) > EMITTED (certificate delivered) > LOCKED (blocked before it got issued) > IN_ONBOARDING (midway through the widget flow) > VALIDATED (identity verified, certificate_claim still pending, B2C only) > ACTIVE (exists, nobody has redeemed it) > NOT_FOUND (doesn’t exist). VALIDATED and IN_ONBOARDING aren’t yet part of the purchase_codes.status enum in the unified data model this is migrating toward.
Example
{ "success": true, "data": { "status": "NOT_FOUND" }}Missing p_code parameter.
Invalid or missing API Key.