1. Packages
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
  • Packages
    • Create Package
      POST
    • Get Packages
      GET
    • Package Details
      GET
    • Update Package
      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
  • Schemas
    • LoginRequest
    • CreateOrderRequest
    • UpdateOrderRequest
    • Price Calculator
    • VerifyItem
    • CreateWarehouseRequest
    • Shipment Package
    • Create Reverse Shipment
    • OrderPackages
    • OrderItem
    • Order
    • ErrorResponse
    • City
    • AutomationRuleCondition
    • Country
    • AutomationRule
    • User
    • PaginationMeta
    • OrderItem
    • PaginatedAutomationRules
    • SuccessResponse
    • CreateOrderItemRequest
    • CalculateRatesRequest
    • BoxDimensions
    • OrderShippingRate
    • RateCalculationParams
    • Warehouse
    • Box
    • CreateBoxRequest
    • UpdateBoxRequest
    • ValidationError
    • NotFoundError
    • UnauthorizedError
    • ForbiddenError
    • PaginationLinks
  1. Packages

Get Packages

GET
https://api.gotreek.com/api/packages
Boxes
Last modified:2026-08-11 08:49:54
Boxes listing endpoint with pagination for box templates and dimensions.
💡
Authentication
Bearer token authentication is required.
Only packages belonging to the authenticated user or merchant are returned.
💡
Listing
Returns the list of saved package templates (type, length, width, height, weight) used when creating shipments.
Each package 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
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
or
Query Params

Header Params

Responses

🟢200
application/json
Boxes retrieved successfully
Bodyapplication/json

🟠422
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api.gotreek.com/api/packages?page=undefined&per_page=undefined' \
--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 2026-08-11 08:49:54
Previous
Create Package
Next
Package Details
Built with