1. Boxes
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
      GET
    • Cities List
      GET
    • Couriers List
      GET
  • Warehouses
    • Warehouses List
    • Create warehouse
    • warehouse Details
  • Price Calculator
    • Price Calculator
  • Packaging Type
    • Packaging Types List
    • Packaging Type Details
  • statistics
    • Statistics
  • 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. Boxes

Get Boxes

GET
https://app.gotreek.com/api/boxes
Boxes
Last modified:2025-12-25 15:13:43
Boxes listing endpoint with pagination for box templates and dimensions.
💡
Authentication
Bearer token authentication is required.
Only boxes belonging to the authenticated user or merchant are returned.
💡
Listing
Returns the list of saved box templates (type, length, width, height, weight) used when creating shipments.
Each box includes its dimensions, owner user ID, and creation timestamps.
📌
Filtering & pagination
Results are paginated.
Use ?page= and ?per_page= query parameters to control pagination.

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

Header Params

Responses

🟢200
application/json
Boxes retrieved successfully
Body

🟠422
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://app.gotreek.com/api/boxes?page&per_page' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'
Response Response Example
200 - Success
{
    "current_page": 1,
    "data": [
        {
            "id": 15,
            "type": "s",
            "length": 10,
            "width": 10,
            "height": 10,
            "user_id": 33,
            "created_at": "2025-03-04T19:58:04.000000Z",
            "updated_at": "2025-03-04T19:58:04.000000Z",
            "weight": 0
        },
        {
            "id": 22,
            "type": "primary",
            "length": 10,
            "width": 10,
            "height": 10,
            "user_id": 33,
            "created_at": "2025-07-14T09:56:02.000000Z",
            "updated_at": "2025-07-18T13:38:16.000000Z",
            "weight": 0
        },
        {
            "id": 35,
            "type": "شنطة سفر",
            "length": 46,
            "width": 45,
            "height": 31,
            "user_id": 33,
            "created_at": "2025-08-22T10:50:01.000000Z",
            "updated_at": "2025-10-29T05:31:22.000000Z",
            "weight": 0
        },
        {
            "id": 72,
            "type": "صندوق كيكه تريك",
            "length": 58,
            "width": 42,
            "height": 55,
            "user_id": 33,
            "created_at": "2025-10-10T11:58:16.000000Z",
            "updated_at": "2025-10-29T05:11:53.000000Z",
            "weight": 0
        },
        {
            "id": 75,
            "type": "وسط 1",
            "length": 20,
            "width": 15,
            "height": 15,
            "user_id": 33,
            "created_at": "2025-10-14T10:50:05.000000Z",
            "updated_at": "2025-10-14T10:50:05.000000Z",
            "weight": 0
        }
    ],
    "first_page_url": "http://localhost/api/boxes?page=1",
    "from": 1,
    "last_page": 2,
    "last_page_url": "http://localhost/api/boxes?page=2",
    "links": [
        {
            "url": null,
            "label": "&laquo; Previous",
            "page": null,
            "active": false
        },
        {
            "url": "http://localhost/api/boxes?page=1",
            "label": "1",
            "page": 1,
            "active": true
        },
        {
            "url": "http://localhost/api/boxes?page=2",
            "label": "2",
            "page": 2,
            "active": false
        },
        {
            "url": "http://localhost/api/boxes?page=2",
            "label": "Next &raquo;",
            "page": 2,
            "active": false
        }
    ],
    "next_page_url": "http://localhost/api/boxes?page=2",
    "path": "http://localhost/api/boxes",
    "per_page": 5,
    "prev_page_url": null,
    "to": 5,
    "total": 6
}
Modified at 2025-12-25 15:13:43
Previous
Create Box
Next
Box Details
Built with