Update Record in Custom Table

PUT/api/thirdparty/customtable/{table_name}/{id}

Updates an existing record in the specified custom table. All columns in the request body must exist in the table, otherwise an error will be returned.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
Content-Type String application/json

Parameters

FieldTypeDescription
table_name String Name of the custom database table (exact table name as it exists in the database)
id Number Record ID
curl -X PUT "https://yoursite.com/api/thirdparty/customtable/TABLE_NAME/123" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "field": "value" }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Record updated successfully"
}

Error-Response (Column Not Found):

HTTP/1.1 400 Bad Request
{
  "status": false,
  "message": "Column 'invalid_column' does not exist in table 'george'"
}
MethodPUT
Path/api/thirdparty/customtable/{table_name}/{id}
GroupThirdparty
Sincev0.3.0
Defined inmodules/api/controllers/Thirdparty.php