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

Update Package

PUT
https://api.gotreek.com/api/packages/{id}
Boxes
Last modified:2026-08-11 09:15:46
Update an existing box by its ID, applying validated changes to its attributes (type, dimensions, weight..) and returning the updated resource.
💡
Authentication
Bearer token authentication is required.
Only packages owned or accessible by the authenticated user should be updated according to your access rules.
📌
Behavior
If the package exists, the API updates only the allowed fields (type, length, width, height, weight) from the validated request and returns the updated package in the response body.

Request

Authorization
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
or
Path Params

Header Params

Body Params application/jsonRequired

Examples

Responses

🟢200
application/json
Box updated successfully
Bodyapplication/json

🟠404
🟠422
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://api.gotreek.com/api/packages/' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "type": "primary",
    "length": 22,
    "width": 15,
    "height": 36,
    "weight": 3
}'
Response Response Example
200 - Success
{
    "success": true,
    "message": "Package updated successfully",
    "data": {
        "id": 15,
        "organisation_id": 21,
        "type": "Small Box",
        "length": 123,
        "width": 123,
        "height": 123,
        "packaging_type_id": 1,
        "created_at": "2025-03-04T22:58:04.000000Z",
        "updated_at": "2026-08-11T08:52:14.000000Z",
        "weight": 1
    }
}
Modified at 2026-08-11 09:15:46
Previous
Package Details
Next
Merchants Details
Built with