Skip to main content

Server-side Events

Send tracking events directly from your server.

Supported events

These events can be sent from the backend:

EventUse case
orderTrack completed orders
order_cancelCancel an order
subscribeSubscribe/unsubscribe users

Order event

No duplicates

Orders are automatically deduplicated based on order_id. If the same order was already sent (e.g., from frontend tracking), the duplicate will be ignored. You can safely send orders from both frontend and backend without worrying about duplicates.

curl -X POST https://api.edrone.me/trace \
-d "app_id=YOUR_APP_ID" \
-d "sender_type=server" \
-d "action_type=order" \
-d "email=john@example.com" \
-d "first_name=John" \
-d "last_name=Doe" \
-d "order_id=ORD-12345" \
-d "country=US" \
-d "city=New York" \
-d "base_currency=USD" \
-d "order_currency=USD" \
-d "base_payment_value=99.99" \
-d "order_payment_value=99.99" \
-d "product_ids=123" \
-d "product_titles=Product Name" \
-d "product_images=https://store.com/img.jpg" \
-d "product_urls=https://store.com/product" \
-d "product_counts=1" \
-d "product_category_ids=1~2" \
-d "product_category_names=Category~Subcategory"

Order statuses

You can optionally include order_status field to specify the current state of the order:

StatusDescription
placedOrder placed, awaiting payment
paidPayment confirmed
deliveredOrder delivered
cancelledOrder cancelled
curl -X POST https://api.edrone.me/trace \
-d "app_id=YOUR_APP_ID" \
-d "sender_type=server" \
-d "action_type=order" \
-d "order_id=ORD-12345" \
-d "order_status=paid" \
# ... other fields

Order cancel event

Cancel a previously submitted order:

curl -X POST https://api.edrone.me/trace \
-d "app_id=YOUR_APP_ID" \
-d "sender_type=server" \
-d "action_type=order_cancel" \
-d "order_id=ORD-12345"

Response

Successful requests return HTTP 200 with headers including x-edrone-event-id.