Knowledge Base
HomeMain site
HomeMain site
General SetupWebsite SnippetsAPI Endpoints
General SetupWebsite SnippetsAPI Endpoints
  1. DRE Measurement Protocol
  • DRE Measurement Protocol
    • Order (create)
      POST
    • Order (cancel)
      POST
    • Lead (create)
      POST
    • Batch (create)
      POST
  • GA4 Measurement Protocol
    • Batch (create)
      POST
  • 4WP Measurement Protocol
    • Elementor Forms Lead (create)
      POST
  1. DRE Measurement Protocol

Lead (create)

TEST environment
https://{{BASE_DOMAIN}}/a2/test
TEST environment
https://{{BASE_DOMAIN}}/a2/test
POST
https://{{BASE_DOMAIN}}/a2/test
/dre/lead-create
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'https://dre2.yourdomain.com/a2/test/dre/lead-create?id=' \
--header 'X-Dre-Access-Token;'
Response Response Example
{
    "unique_id": "12345",
    "detail": {
        "user_data": {
            "email": "test@example.com",
            "sha256_email_address": "a8af8341993604f29cd4e0e5a5a4b5d48c575436c38b28abbfd7d481f345d5db",
            "phone_number": "+40744123123",
            "sha256_phone_number": "973dfe463ec85785f5f95af5ba3906eedb2d931c24e69824a89ea65dba4e813b",
            "address": {
                "first_name": "John",
                "sha256_first_name": "d63d71f407ad92113aa5b858936038d68e0fde0a7ed8b8a03a4fea2c2eab80d5",
                "last_name": "Doe",
                "sha256_last_name": "d63d71f407ad92113aa5b858936038d68e0fde0a7ed8b8a03a4fea2c2eab80d5",
                "country": "RO",
                "region": "string",
                "city": "Bucuresti",
                "street": "string",
                "postal_code": "700000"
            }
        },
        "user_properties": {
            "your_custom_user_props_1": "vip customer",
            "other_user_props_2": "string",
            "property1": "string",
            "property2": "string"
        },
        "user_consent": {
            "ad_user_data": "GRANTED",
            "ad_personalization": "GRANTED"
        },
        "ip": "216.239.38.21",
        "browser_id": "string",
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36",
        "lead_source": "website",
        "total_value": 0,
        "currency_code": "EUR",
        "event_timestamp": 1709810452000,
        "event_properties": {
            "your_custom_event_data": "form name"
        }
    }
}

Request

Query Params
id
string 
required
Your script ID. Will be provided by DATA Reshape Team
Default:
{{SCRIPT_ID}}
Match pattern:
^[A-Z0-9]{8}$
Header Params
Content-Type
string 
required
Default:
application/json
X-Dre-Access-Token
string 
required
Your secret access token. Will be provided by DATA Reshape Team
Default:
{{X_DRE_ACCESS_TOKEN}}

Responses

🟢200Success
application/json
Body
unique_id
string 
required
>= 3 characters
Examples:
12345abcdef
Match pattern:
^[a-zA-Z0-9_-]{3,}$
detail
object 
required
user_data
object 
required
user_properties
object 
optional
user_consent
object 
required
ip
string <ipv4,ipv6>
required
Customer IP address. Can be V4 or V6
Examples:
216.239.38.212001:0db8:85a3:0000:0000:8a2e:0370:7334
Match pattern:
\b(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}|(?:[A-F0-9]{1,4}:){7}[A-F0-9]{1,4})\b
browser_id
string 
required
Unique browser ID. Typicaly is the last 2 parts of _ga cookie value, separated by dot sign.
Match pattern:
^[a-zA-Z0-9._-]{6,}$
user_agent
string 
required
User-Agent string from a browser when the event occurs.
Example:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36
lead_source
enum<string> 
required
Lead source
Allowed values:
appwebsiteadminphone
Default:
website
total_value
number 
optional
Lead dynamic value
currency_code
string 
optional
Examples:
EURUSD
event_timestamp
integer 
required
A Unix timestamp (in milliseconds) for the time to associate with the event.
>= 1709810452000
event_properties
object 
optional
Custom event props
Modified at 2024-03-26 21:14:45
Previous
Order (cancel)
Next
Batch (create)
Built with