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

Order (create)

TEST environment
https://{{BASE_DOMAIN}}/a2/test
TEST environment
https://{{BASE_DOMAIN}}/a2/test
POST
https://{{BASE_DOMAIN}}/a2/test
/dre/order-create
INFO for hash values
For normalization remove leading or trailing whitespaces, convert the text to lowercase, format phone numbers according to the E.164 standard ( https://en.wikipedia.org/wiki/E.164 ).
For hash use hex SHA256.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'https://dre2.yourdomain.com/a2/test/dre/order-create?id=' \
--header 'X-Dre-Access-Token;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "unique_id": "123456",
    "detail": {
        "products": [
            {
                "id": {
                    "product_id": "123456",
                    "parent_id": "parent-1234",
                    "product_sku": "abc",
                    "parent_sku": "parent-abc"
                },
                "name": "KHoUCy9l",
                "price": {
                    "base": 1001.99,
                    "current": 1001.99,
                    "tax_percent": 9,
                    "tax_included": false,
                    "currency": "USD"
                },
                "quantity": 1,
                "type": "subscription",
                "properties": null,
                "brands": [
                    {
                        "name": "BRAND_NAME",
                        "id": 88419192
                    },
                    {
                        "name": "BRAND_NAME",
                        "id": 58316430
                    },
                    {
                        "name": "BRAND_NAME",
                        "id": 76711368
                    }
                ],
                "categories": [
                    {
                        "name": "FIRST_CATEGORY",
                        "id": 7686233
                    }
                ],
                "coupons": [
                    {
                        "name": "PRODUCT_COUPON_NAME",
                        "value": 10.99,
                        "currency": "EUR",
                        "tax_percent": "proident sunt Lorem",
                        "tax_included": true,
                        "id": "deserunt in voluptate",
                        "type": "do"
                    },
                    {
                        "name": "PRODUCT_COUPON_NAME",
                        "value": 10.99,
                        "currency": "EUR",
                        "tax_percent": "ad Excepteur minim mollit ullamco",
                        "tax_included": false,
                        "id": 27709742,
                        "type": "nisi"
                    }
                ],
                "stock_status": "in stock"
            },
            {
                "id": {
                    "product_id": "123456",
                    "parent_id": "parent-1234",
                    "product_sku": "abc",
                    "parent_sku": "parent-abc"
                },
                "name": "3JyKGtRKT6S",
                "price": {
                    "base": 1001.99,
                    "current": 1001.99,
                    "tax_percent": 9,
                    "tax_included": true,
                    "currency": "EUR"
                },
                "quantity": 1,
                "type": "simple",
                "properties": [
                    {
                        "name": "Misty Corkery",
                        "value": "est et minim fugiat id"
                    },
                    {
                        "name": "Grace Klein",
                        "value": "ea anim minim nisi"
                    }
                ],
                "brands": [
                    {
                        "name": "BRAND_NAME",
                        "id": -73029135
                    },
                    {
                        "name": "BRAND_NAME",
                        "id": "Excepteur ut consequat fugiat"
                    }
                ],
                "categories": [
                    {
                        "name": "FIRST_CATEGORY",
                        "id": "officia ad pariatur"
                    },
                    {
                        "name": "SECOND_CATEGORY",
                        "id": 29140547
                    }
                ],
                "coupons": [
                    {
                        "name": "PRODUCT_COUPON_NAME",
                        "value": 10.99,
                        "currency": "EUR",
                        "tax_percent": "ut",
                        "tax_included": true,
                        "id": 44509324,
                        "type": "ut velit in ut"
                    },
                    {
                        "name": "PRODUCT_COUPON_NAME",
                        "value": 10.99,
                        "currency": "EUR",
                        "tax_percent": "labore sint nisi ut",
                        "tax_included": true,
                        "id": -40973976,
                        "type": "est"
                    }
                ],
                "stock_status": "true"
            }
        ],
        "customer": {
            "email": "test@example.com",
            "sha256_email": "973dfe463ec85785f5f95af5ba3906eedb2d931c24e69824a89ea65dba4e813b",
            "phone": "+40744123123",
            "sha256_phone": "2b60d5373fdea0a3e1d5deaa23607906fc30c3273732a1816857d23da5366d59",
            "billing_address": {
                "first_name": "Ion Ion",
                "sha256_first_name": "d63d71f407ad92113aa5b858936038d68e0fde0a7ed8b8a03a4fea2c2eab80d5",
                "last_name": "Double Doe",
                "sha256_last_name": "d63d71f407ad92113aa5b858936038d68e0fde0a7ed8b8a03a4fea2c2eab80d5",
                "country": "RO",
                "region": "=AEOF",
                "city": "London",
                "street": "/Khn ",
                "postal_code": "8456AB",
                "sha256_street": "2b60d5373fdea0a3e1d5deaa23607906fc30c3273732a1816857d23da5366d59",
                "sha256_postal_code": "2b60d5373fdea0a3e1d5deaa23607906fc30c3273732a1816857d23da5366d59"
            },
            "shipping_address": {
                "first_name": "Ana-Maria",
                "sha256_first_name": "d63d71f407ad92113aa5b858936038d68e0fde0a7ed8b8a03a4fea2c2eab80d5",
                "last_name": "Double Doe",
                "sha256_last_name": "d63d71f407ad92113aa5b858936038d68e0fde0a7ed8b8a03a4fea2c2eab80d5",
                "country": "Romania",
                "region": "Xp3S@J_;pj2",
                "city": "București",
                "street": "?X3;4o",
                "postal_code": "8456AB",
                "sha256_street": "2b60d5373fdea0a3e1d5deaa23607906fc30c3273732a1816857d23da5366d59",
                "sha256_postal_code": "2b60d5373fdea0a3e1d5deaa23607906fc30c3273732a1816857d23da5366d59"
            },
            "internal_id": "laboris est cillum reprehenderit",
            "customer_lifetime_value": "2025-04-28T18:06:35.138Z",
            "customer_lifetime_orders": "2025-04-29T10:52:00.143Z",
            "new_customer": true
        },
        "user_properties": null,
        "user_consent": {
            "ad_user_data": "GRANTED",
            "ad_personalization": "GRANTED"
        },
        "ip": "216.239.38.21",
        "browser_id": "XYJk_UAn2lRF",
        "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",
        "order_source": "website",
        "currency_code": "EUR",
        "total_value": 0.59,
        "total_tax": 1234.99,
        "shipping": [
            {
                "name": "PRODUCT_COUPON_NAME",
                "value": 10.99,
                "currency": "EUR",
                "tax_percent": "ullamco",
                "tax_included": false,
                "id": 43372040,
                "type": "adipisicing consequat in id reprehenderit"
            },
            {
                "name": "PRODUCT_COUPON_NAME",
                "value": 10.99,
                "currency": "EUR",
                "tax_percent": "in ipsum dolor",
                "tax_included": false,
                "id": "aliquip amet",
                "type": "dolor ipsum proident"
            }
        ],
        "shipping_method": "Courier Rapid",
        "payments": [
            {
                "name": "PRODUCT_COUPON_NAME",
                "value": 10.99,
                "currency": "EUR",
                "id": "in",
                "type": "anim Excepteur nisi consectetur"
            },
            {
                "name": "PRODUCT_COUPON_NAME",
                "value": 10.99,
                "currency": "EUR",
                "id": 25934685,
                "type": "exercitation"
            }
        ],
        "coupons": [
            {
                "name": "PRODUCT_COUPON_NAME",
                "value": 10.99,
                "currency": "EUR",
                "tax_percent": "eu reprehenderit",
                "tax_included": false,
                "id": "ut ea cupidatat Ut non",
                "type": "voluptate ullamco fugiat Lorem proident"
            },
            {
                "name": "PRODUCT_COUPON_NAME",
                "value": 10.99,
                "currency": "EUR",
                "tax_percent": "proident",
                "tax_included": false,
                "id": "exercitation deserunt labore sed",
                "type": "adipisicing ullamco cupidatat velit consequat"
            }
        ],
        "event_timestamp": null,
        "landing_page_url": "https://kaleidoscopic-steak.biz/",
        "referring_site_url": "https://cruel-heroine.us/"
    }
}'
Response Response Example
200 - Success
{
    "result": "ok",
    "unique_id": "unique_id",
    "detail": [
        "Received. This has been processed"
    ]
}

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}}
Body Params application/json
unique_id
string 
required
The unique identifier of a transaction.
>= 3 characters
Examples:
123456abcdef
Match pattern:
^[a-zA-Z0-9_-]{3,}$
detail
object 
required
Details of transaction
amounts
object (amounts) 
required
Details about the amounts related to the event.
products
array[object (product) {10}] 
required
List with products attached to event
shipping
array[object (delivery) {7}] 
required
Shipping value
payments
array[object (payment) {5}] 
required
customer
object (customer) 
optional
User data informations
user_properties
optional
user_consent
object (consent) 
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
order_source
enum<string> 
required
Order source
Allowed values:
appwebsiteadminphone
Default:
website
coupons
array[object (coupon) {7}] 
optional
Order scoped coupons
event_timestamp
integer 
required
A Unix timestamp (in milliseconds) for the time to associate with the event.
>= 1709810452000
landing_page_url
string 
required
referring_site_url
string 
required
Examples

Responses

🟢200Success
application/json
Body
result
string 
optional
unique_id
string 
optional
detail
array[string | null]
optional
🟠401Unauthorized
🟠405Bad Request
🟠422Parameter Error
Modified at 2025-04-29 13:28:40
Next
Order (cancel)
Built with