1. Orders
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
    • Get Pickup id
      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
  • Automation
  • 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. Orders

Order Price

Developing
GET
https://api.gotreek.com/api/orders/{id}/order-price
Last modified:2026-07-06 09:49:25
Retrieve the calculated shipping price for a specific order, taking into account whether the order is COD or prepaid. This endpoint returns the current pricing result for the given order.
💡
Authentication
Bearer token authentication is required.
Only orders owned or accessible by the authenticated user should be used to retrieve pricing information.
💡
Behavior
Looks up the order by its ID. If the order is not found or not accessible, a 404 error is returned.
If the order’s payment_method is cod, calculates the rates with COD included.
For non‑COD orders, calculates the rates with COD charges ignored.
Returns the order ID and the computed price/rates object in the response body.
Each shipping company includes an available field:
true indicates that the shipping company supports both the shipper's city and the receiver's city.
false indicates that the shipping company does not serve one or both of the required cities.
Each shipping company includes a can_create_shipment field:
true indicates that a shipment can be created with this shipping company because no shipment restrictions apply.
false indicates that shipment creation is blocked due to one or more restrictions listed in shipment_restrictions.
Each shipping company includes a shipment_restrictions array containing all restrictions that prevent shipment creation for the current order. When can_create_shipment is true, this array is empty. Each restriction contains:
code: A machine-readable identifier for the restriction.
title: A short, localized title describing the restriction.
message: A detailed, localized explanation of why the shipment cannot be created.

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
Path Params

Header Params

Responses

🟢200
application/json
Bodyapplication/json

🟠404
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api.gotreek.com/api/orders//order-price' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'
Response Response Example
200 - Success
{
    "success": true,
    "data": {
        "order_id": 179938,
        "price": [
            {
                "service_id": 16,
                "courier_name": "لوجستيك",
                "service_name": "شحن سريع",
                "identifier": "logistiq",
                "available": true,
                "can_create_shipment": true,
                "shipment_restrictions": [],
                "price_cents": 2000,
                "price_sar": 20,
                "delivery_time": "من 1 إلى 3 أيام عمل",
                "logo": "https://api.gotreek.com/images/Shipping_partners/logistiq.png",
                "pickup_label": "الاستلام عن طريق شركة الشحن",
                "delivery_label": "التوصيل إلى العميل",
                "expected_delivery_time_label": "يومين و 22 ساعة",
                "expected_delivery_accuracy_label": "99%",
                "expected_delivery_badge_tone": "green",
                "total_calculated_weight_grams": 4000
            },
            {
                "service_id": 21,
                "courier_name": "ناقل (محلي)",
                "service_name": "الشحن الاعتيادي",
                "identifier": "naqel_local",
                "available": true,
                "can_create_shipment": true,
                "shipment_restrictions": [],
                "price_cents": 2400,
                "price_sar": 24,
                "delivery_time": "من 2 إلى 4 أيام",
                "logo": "https://api.gotreek.com/images/Shipping_partners/naqel.png",
                "pickup_label": "الاستلام عن طريق شركة الشحن",
                "delivery_label": "التوصيل إلى العميل",
                "expected_delivery_time_label": "يومين و 10 ساعات",
                "expected_delivery_accuracy_label": "99%",
                "expected_delivery_badge_tone": "green",
                "total_calculated_weight_grams": 4000
            },
            {
                "service_id": 1,
                "courier_name": "أرامكس",
                "service_name": "الشحن الإعتيادي",
                "identifier": "aramex",
                "available": true,
                "can_create_shipment": true,
                "shipment_restrictions": [],
                "price_cents": 2500,
                "price_sar": 25,
                "delivery_time": "من 2 إلى 4 أيام عمل",
                "logo": "https://api.gotreek.com/images/Shipping_partners/aramex.png",
                "pickup_label": "الاستلام عن طريق شركة الشحن",
                "delivery_label": "التوصيل إلى العميل",
                "expected_delivery_time_label": "3 أيام و 10 ساعات",
                "expected_delivery_accuracy_label": "99%",
                "expected_delivery_badge_tone": "green",
                "total_calculated_weight_grams": 4000
            },
            {
                "service_id": 11,
                "courier_name": "سمسا",
                "service_name": "الشحن الإعتيادي",
                "identifier": "smsa",
                "available": true,
                "can_create_shipment": false,
                "shipment_restrictions": [
                    {
                        "code": "packages_count_restriction",
                        "title": "قيد عدد الصناديق",
                        "message": "يسمح سمسا بحد أقصى 3 صناديق لكل شحنة"
                    }
                ],
                "price_cents": 2600,
                "price_sar": 26,
                "delivery_time": "من 2 إلى 4 أيام عمل",
                "logo": "https://api.gotreek.com/images/Shipping_partners/smsa.png",
                "pickup_label": "الاستلام عن طريق شركة الشحن",
                "delivery_label": "التوصيل إلى العميل",
                "expected_delivery_time_label": "يومين و 16 ساعة",
                "expected_delivery_accuracy_label": "98%",
                "expected_delivery_badge_tone": "green",
                "total_calculated_weight_grams": 4000
            },
            {
                "service_id": 18,
                "courier_name": "يو بي إس (محلي)",
                "service_name": "شحن سريع",
                "identifier": "ups_local",
                "available": true,
                "can_create_shipment": false,
                "shipment_restrictions": [
                    {
                        "code": "receiver_district_required_restriction",
                        "title": "حي المستلم مطلوب",
                        "message": "حي المستلم مطلوب في يو بي إس (محلي)."
                    }
                ],
                "price_cents": 2900,
                "price_sar": 29,
                "delivery_time": "من 1 إلى 5 أيام عمل (حسب حيوية المنطقة)",
                "logo": "https://api.gotreek.com/images/Shipping_partners/ups.png",
                "pickup_label": "الاستلام عن طريق شركة الشحن",
                "delivery_label": "التوصيل إلى العميل",
                "expected_delivery_time_label": "يومين و 5 ساعات",
                "expected_delivery_accuracy_label": "90%",
                "expected_delivery_badge_tone": "green",
                "total_calculated_weight_grams": 4000
            },
            {
                "service_id": 5,
                "courier_name": "جي ان تي",
                "service_name": "شحن سريع",
                "identifier": "jt",
                "available": true,
                "can_create_shipment": false,
                "shipment_restrictions": [
                    {
                        "code": "packages_count_restriction",
                        "title": "قيد عدد الطرود",
                        "message": "يسمح جي إن تي بطرد واحد فقط لكل شحنة."
                    }
                ],
                "price_cents": 3549,
                "price_sar": 35.49,
                "delivery_time": "من 1 إلى 3 أيام عمل",
                "logo": "https://api.gotreek.com/images/Shipping_partners/jt.png",
                "pickup_label": "الاستلام عن طريق شركة الشحن",
                "delivery_label": "التوصيل إلى العميل",
                "expected_delivery_time_label": "3 أيام و 3 ساعات",
                "expected_delivery_accuracy_label": "99%",
                "expected_delivery_badge_tone": "yellow",
                "total_calculated_weight_grams": 4000
            },
            {
                "service_id": 23,
                "courier_name": "ريدبوكس (نقاط الإستلام)",
                "service_name": "شحن سريع",
                "identifier": "redbox_point_pickup",
                "available": true,
                "can_create_shipment": false,
                "shipment_restrictions": [
                    {
                        "code": "packages_count_restriction",
                        "title": "قيد عدد الطرود",
                        "message": "يسمح ريدبوكس (استلام من نقطة) بطرد واحد فقط لكل شحنة."
                    }
                ],
                "price_cents": 4100,
                "price_sar": 41,
                "delivery_time": "خلال 10 ساعات",
                "logo": "https://api.gotreek.com/images/Shipping_partners/redbox.png",
                "pickup_label": "الاستلام عن طريق شركة الشحن",
                "delivery_label": "التسليم إلى خزائن ريدبوكس الذكية",
                "expected_delivery_time_label": "4 أيام و 5 ساعات",
                "expected_delivery_accuracy_label": "99%",
                "expected_delivery_badge_tone": "red",
                "total_calculated_weight_grams": 4000
            },
            {
                "service_id": 8,
                "courier_name": "أر تي زاد",
                "service_name": "الشحن المبرد والمثلج",
                "identifier": "artz",
                "available": true,
                "can_create_shipment": true,
                "shipment_restrictions": [],
                "price_cents": 6100,
                "price_sar": 61,
                "delivery_time": "من ١ الى ٣ ايام",
                "logo": "https://api.gotreek.com/images/Shipping_partners/artz.png",
                "pickup_label": "الاستلام عن طريق شركة الشحن",
                "delivery_label": "التوصيل إلى العميل",
                "expected_delivery_time_label": "يومين و 9 ساعات",
                "expected_delivery_accuracy_label": "95%",
                "expected_delivery_badge_tone": "green",
                "total_calculated_weight_grams": 4000
            },
            {
                "service_id": 3,
                "courier_name": "ترانسكورب",
                "service_name": "الشحن المبرد و المثلج",
                "identifier": "transcorp",
                "available": true,
                "can_create_shipment": true,
                "shipment_restrictions": [],
                "price_cents": 6500,
                "price_sar": 65,
                "delivery_time": "من 1 إلى 3 أيام عمل",
                "logo": "https://api.gotreek.com/images/Shipping_partners/transcorp.png",
                "pickup_label": "الاستلام عن طريق شركة الشحن",
                "delivery_label": "التوصيل إلى العميل",
                "expected_delivery_time_label": "3 أيام و 22 ساعة",
                "expected_delivery_accuracy_label": "99%",
                "expected_delivery_badge_tone": "yellow",
                "total_calculated_weight_grams": 4000
            }
        ]
    }
}
Modified at 2026-07-06 09:49:25
Previous
Verify Order
Next
Create Shipment
Built with