Email Capture on Activation #
Version note: Email capture on activation was introduced in v2.0.0.
What It Is #
The activate endpoints (POST /licenses/activate and POST /licenses/{id}/activate) now accept an optional customer_email parameter. When provided:
- The system checks whether the customer record associated with the license has an email on file
- If no email is on record, the provided email is stored on the customer record
- The API response includes an
email_noticefield informing the caller that the email was captured
Use Case #
Some store configurations allow anonymous purchases (guest checkout). In these cases, a license may be created without an email address on the customer record. When the customer later activates their license from your software, you can optionally pass their email to enrich the customer record.
How to Pass the Email #
Add customer_email to the activation request body:
POST /wp-json/dmsilm/v1/licenses/activate
{
"license_key": "DMSI-XXXX-XXXX-XXXX-XXXX",
"site_url": "https://customer-site.com",
"product_id": 42,
"customer_email": "user@example.com"
}The email_notice Response Field #
When an email is successfully captured and stored, the response includes:
{
"success": true,
"activation_id": 123,
"email_notice": "Customer email captured and stored. The customer may request removal."
}The email_notice field is only present when a new email was actually stored. In all other cases (email not provided, or customer already had an email on record), the field is absent.
What Callers Should Do With email_notice #
The email_notice is informational. Your software does not need to act on it. However, if you choose to surface it to customers, the message informs them that their email was stored and that they may request its removal (GDPR compliance).
