TrackMe API Docs
API ReferenceOwner: Trucks

Update an owned truck.

PATCH
/api/v1/owner/trucks/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

AdonisJS access-token guard (middleware.auth({ guards: ["api"] })). Send Authorization: Bearer <oat_…> (issued by /auth/register, /auth/login, /auth/social/{google,apple}, or /auth/guest).

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/api/v1/owner/trucks/string" \  -H "Content-Type: application/json" \  -d '{    "description": "Smash burgers, turkish coffee, and seasonal specials. Now open Saturdays.",    "isOpen": true,    "cuisineTypes": [      "burgers",      "coffee",      "shawarma"    ],    "openingHours": [      {        "day": 0,        "isClosed": false,        "opensAt": "10:00",        "closesAt": "22:00"      },      {        "day": 1,        "isClosed": true,        "opensAt": "10:00",        "closesAt": "22:00"      }    ]  }'
{  "data": {    "truck": {      "id": "trk_01jq8z2hf5t8z4w9d8x4mzg2p3",      "ownerId": "usr_01jq8z4b2k6h7n8m9p0r3s5t7v",      "name": "Crispy Cart",      "description": "KSA-style smash burgers and turkish coffee, on wheels.",      "city": "Riyadh",      "region": "Riyadh",      "address": "Tahlia Street, near Boulevard",      "lat": 24.6877,      "lng": 46.7219,      "status": "active",      "isOpen": true,      "isFeatured": true,      "ratingAverage": 4.7,      "reviewsCount": 218,      "contactPhone": "+966555012345",      "contactWhatsapp": "+966555012345",      "whatsappNumber": "+966555012345",      "contactPreferences": [        "whatsapp",        "phone"      ],      "website": "https://crispycart.sa",      "socialLinks": [        {          "platform": "instagram",          "url": "https://instagram.com/crispycart"        }      ],      "openingHours": [        {          "day": 0,          "opensAt": "09:00",          "closesAt": "21:00",          "isClosed": false        },        {          "day": 1,          "opensAt": "09:00",          "closesAt": "21:00",          "isClosed": false        },        {          "day": 2,          "opensAt": "09:00",          "closesAt": "21:00",          "isClosed": true        },        {          "day": 3,          "opensAt": "09:00",          "closesAt": "21:00",          "isClosed": false        },        {          "day": 4,          "opensAt": "09:00",          "closesAt": "21:00",          "isClosed": false        },        {          "day": 5,          "opensAt": "12:00",          "closesAt": "23:00",          "isClosed": false        },        {          "day": 6,          "opensAt": "12:00",          "closesAt": "23:00",          "isClosed": false        }      ],      "images": [        {          "id": "fil_01jq8z5a0b1c2d3e4f5g6h7j8k",          "purpose": "truck_photo",          "urls": {            "original": "https://cdn.trackme.sa/t/crispy-cart-original.jpg",            "thumb": "https://cdn.trackme.sa/t/crispy-cart-thumb.jpg",            "medium": "https://cdn.trackme.sa/t/crispy-cart-medium.jpg",            "large": "https://cdn.trackme.sa/t/crispy-cart-large.jpg"          }        }      ],      "langActual": "en",      "categoryId": "cat_01jq8z2c4r6n8p0q2s4u6w8y0a",      "cuisineTypes": [        "burgers",        "coffee"      ],      "publishedAt": "2026-04-12T09:11:14.000Z",      "featuredUntil": "2026-06-30T23:59:59.000Z",      "ordersCount": 1480,      "createdAt": "2026-04-12T09:11:14.000Z",      "updatedAt": "2026-05-19T18:24:02.000Z"    }  },  "meta": {    "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7"  }}
{  "error": {    "code": "AUTH_REQUIRED",    "message": "Authentication is required to access this resource."  },  "meta": {    "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7"  }}
{  "error": {    "code": "FORBIDDEN",    "message": "You are not allowed to perform this action."  },  "meta": {    "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7"  }}
{  "error": {    "code": "NOT_FOUND",    "message": "Resource not found.",    "targetType": "food_truck",    "targetId": "trk_01jq8z2hf5t8z4w9d8x4mzg2p3"  },  "meta": {    "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7"  }}
{  "error": {    "code": "VALIDATION_ERROR",    "message": "One or more fields are invalid.",    "fields": [      {        "path": "email",        "rule": "email",        "message": "Must be a valid email address."      }    ]  },  "meta": {    "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7"  }}