Skip to main content

Order Tracking

This guide explains how to interact with the Order Tracking API endpoints in the Sumaya369 web application. These endpoints provide tracking and analytics data for various platforms.

Snap Pixel Details

Retrieve Snap Pixel tracking information for an order.

Endpoint

  • Method: GET
  • URL: /v1/customer/orders/{id}/snap-pixel-details

Request Headers

HeaderValueRequired
Content-Typeapplication/jsonYes
Acceptapplication/jsonYes
AuthorizationBearer tokenYes

Success Response

{
"success": true,
"message": "تم جلب البيانات بنجاح.",
"data": {
"currency": "SAR",
"items": [
{
"id": "051dd0b0-b082-11ef-a315-f1dd5149d0a2",
"name": "باقة القفزة"
}
],
"user_name": "Hamad Alshabanah",
"user_email": "developer@sumaya369.net",
"phone_number": "501968815",
"content_ids": "771a0ad0-c298-11ef-abb5-6ba38c7c7dbe",
"price": "0.00",
"content_type": "paytabs_credit_card",
"transaction_id": 2412194962
},
"status_code": 200
}

Tag Manager Details

Retrieve Google Tag Manager tracking information for an order.

Endpoint

  • Method: GET
  • URL: /v1/customer/orders/{id}/tag-manager-details

Request Headers

HeaderValueRequired
Content-Typeapplication/jsonYes
Acceptapplication/jsonYes
AuthorizationBearer tokenYes

Success Response

{
"success": true,
"message": "تم جلب البيانات بنجاح.",
"data": {
"currency": "SAR",
"items": [
{
"item_id": "051dd0b0-b082-11ef-a315-f1dd5149d0a2",
"item_name": "باقة القفزة",
"item_price": "0.00",
"item_type": "bundle"
}
],
"user_id": "9f2ecd22-5c07-48ec-9415-2979deec4493",
"user_name": "Hamad Alshabanah",
"gender": "انثى",
"country_name": "السعودية",
"user_email": "developer@sumaya369.net",
"phone_number": "501968815",
"content_ids": "771a0ad0-c298-11ef-abb5-6ba38c7c7dbe",
"price": "0.00",
"payment_method": "paytabs_credit_card",
"transaction_id": null
},
"status_code": 200
}

Criteo Details

Retrieve Criteo tracking information for an order.

Endpoint

  • Method: GET
  • URL: /v1/customer/orders/{id}/criteo-details

Request Headers

HeaderValueRequired
Content-Typeapplication/jsonYes
Acceptapplication/jsonYes
AuthorizationBearer tokenYes

Success Response

{
"success": true,
"message": "تم جلب البيانات بنجاح.",
"data": {
"id": "771a0ad0-c298-11ef-abb5-6ba38c7c7dbe",
"number": 2412194962,
"total_price": "0.00",
"quantity": 1
},
"status_code": 200
}

Implementation Flow

  1. After successful order completion:
    • Retrieve tracking details from respective endpoints
    • Send data to appropriate tracking platforms
    • Handle tracking pixel/script implementation

Key Considerations

  • Authentication is required for all tracking endpoints
  • Order must exist and belong to the authenticated customer
  • Currency values are in SAR (Saudi Riyal)
  • Implement proper error handling for failed tracking requests