1. statistics
Treek-Public
  • Authentication
    • User login with email and password
      POST
  • Orders
    • Create Order
      POST
    • List Orders
      GET
    • Order Details
      GET
    • Update Order
      PUT
    • Cancel Order
      POST
    • Reset Order
      POST
    • Get Statuses
      GET
    • Verify Item
      POST
    • Verify Order
      POST
    • Order Price
      GET
  • Shipments
    • Create Shipment
      POST
    • Return Shipment
      POST
    • Print Invoice
      GET
  • Boxes
    • Create Box
      POST
    • Get Boxes
      GET
    • Box Details
      GET
    • Update Box
      PUT
  • Merchants
    • Merchants Details
      GET
  • Profile
    • User Details
      GET
    • Update User
      PUT
    • Change Password
      PUT
  • Utilities
    • Countries List
    • Cities List
    • Couriers List
  • Warehouses
    • Warehouses List
    • Create warehouse
    • warehouse Details
  • Price Calculator
    • Price Calculator
  • Packaging Type
    • Packaging Types List
    • Packaging Type Details
  • statistics
    • Statistics
      GET
  • Schemas
    • LoginRequest
    • CreateOrderRequest
    • UpdateOrderRequest
    • Price Calculator
    • VerifyItem
    • CreateWarehouseRequest
    • Shipment Package
    • Create Reverse Shipment
    • OrderPackages
    • OrderItem
    • Order
    • City
    • Country
    • User
    • OrderItem
    • CreateOrderItemRequest
    • CalculateRatesRequest
    • BoxDimensions
    • OrderShippingRate
    • RateCalculationParams
    • Warehouse
    • Box
    • CreateBoxRequest
    • UpdateBoxRequest
    • ValidationError
    • NotFoundError
    • UnauthorizedError
    • ForbiddenError
    • PaginationMeta
    • PaginationLinks
  1. statistics

Statistics

Developing
GET
https://app.gotreek.com/api/merchants/reports
Last modified:2025-12-25 15:15:42
Orders reporting endpoint providing summary stats and charts for the authenticated user.
💡
Authentication
Bearer token authentication is required.
Reports are limited to orders belonging to merchants or warehouses owned by the authenticated user.
💡
Behavior
Builds statistics over a date range: status counts (pending, shipping, on hold, delivered, returned, canceled, total), new and shipped orders, total sales, and COD total.
Also returns simple weekly and daily order charts, plus top destination cities and top shipping companies with their percentage of total orders.

Request

Authorization
OAuth 2.0
Client Credentials
Add the parameter
Authorization
to Headers
,whose value is to concatenate the Token after the Bearer.
Example:
Authorization: Bearer ********************
Token URL: https://app.gotreek.com/api/auth/login
or

Responses

🟢200Success
application/json
Body

Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://app.gotreek.com/api/merchants/reports' \
--header 'Authorization: Bearer <token>'
Response Response Example
{
    "success": true,
    "filters": {
        "start": "2025-11-22",
        "end": "2025-12-22",
        "period": null
    },
    "stats": {
        "pending_orders": 22,
        "refused": 1,
        "currently_shipping": 0,
        "on_hold": 0,
        "delivered": 3,
        "returned": 0,
        "canceled": 185,
        "total_orders": 211
    },
    "global_overview": {
        "new_orders": 4,
        "shipped_orders": 0,
        "total_sales": "6445902500",
        "cod_total": "6425895800"
    },
    "charts": {
        "weekly": [
            {
                "day": 1,
                "count": 72
            },
            {
                "day": 2,
                "count": 24
            },
            {
                "day": 3,
                "count": 1
            },
            {
                "day": 4,
                "count": 23
            },
            {
                "day": 5,
                "count": 24
            },
            {
                "day": 6,
                "count": 2
            },
            {
                "day": 7,
                "count": 65
            }
        ],
        "daily": [
            {
                "day": "2025-11-22",
                "count": 55
            },
            {
                "day": "2025-11-23",
                "count": 60
            },
            {
                "day": "2025-11-24",
                "count": 22
            },
            {
                "day": "2025-11-26",
                "count": 20
            },
            {
                "day": "2025-11-27",
                "count": 20
            },
            {
                "day": "2025-11-29",
                "count": 10
            },
            {
                "day": "2025-12-01",
                "count": 1
            },
            {
                "day": "2025-12-03",
                "count": 3
            },
            {
                "day": "2025-12-07",
                "count": 12
            },
            {
                "day": "2025-12-08",
                "count": 1
            },
            {
                "day": "2025-12-09",
                "count": 1
            },
            {
                "day": "2025-12-18",
                "count": 4
            },
            {
                "day": "2025-12-19",
                "count": 2
            }
        ]
    },
    "distributions": {
        "destinations": [
            {
                "city": "Jeddah",
                "count": 174,
                "percentage": 82.5
            },
            {
                "city": "Dubai",
                "count": 27,
                "percentage": 12.8
            },
            {
                "city": "Yuthma",
                "count": 4,
                "percentage": 1.9
            },
            {
                "city": "Riyadh",
                "count": 2,
                "percentage": 0.9
            },
            {
                "city": "ALMWAQQAR",
                "count": 1,
                "percentage": 0.5
            }
        ],
        "shipping_companies": [
            {
                "company": "translation.aramex",
                "percentage": 103.8
            },
            {
                "company": "translation.transcorp",
                "percentage": 29.9
            },
            {
                "company": "translation.deliverist",
                "percentage": 24.2
            },
            {
                "company": "translation.jt",
                "percentage": 22.3
            },
            {
                "company": "translation.artz",
                "percentage": 18.5
            }
        ]
    }
}
Modified at 2025-12-25 15:15:42
Previous
Packaging Type Details
Next
LoginRequest
Built with