Skip to main content

Update Company API

Overview

Updates corporate client information, credit limits, or active status.

  • Endpoint: /api/companies/update
  • Method: POST
  • Access: Super Admin / Platform RM

Request Body Schema

FieldTypeRequiredDescription
idString (UUID)YesTarget company ID
nameStringNoUpdated display name
creditLimitNumberNoUpdated credit limit
creditDaysNumberNoUpdated credit days
activeBooleanNoEnable/disable company access

Request Body Example

{
"id": "c478a846-993d-4c8d-bf8d-d77cb3370e01",
"creditLimit": 1500000,
"creditDays": 45
}

Success Response (200 OK)

{
"success": true,
"message": "Company updated successfully",
"data": {
"id": "c478a846-993d-4c8d-bf8d-d77cb3370e01",
"name": "Abbott Healthcare",
"creditLimit": "1500000.00",
"creditDays": 45
}
}

Database Impact

  • Table: companies
  • Operations: UPDATE record by ID.