Skip to main content
PUT
/
v1
/
units
/
{unitId}
Update unit
curl --request PUT \
  --url https://app.blinksale.test/api/v1/units/{unitId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Hour"
}'
{
  "success": true,
  "message": "Unit updated successfully",
  "data": {
    "id": "01jtbf0c9zaraqx3swthf88n5y",
    "organization_id": "01jtbf0c9zaraqx3swthf88n5y",
    "name": "Hour",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Access token obtained from the /v1/auth/login endpoint

Path Parameters

unitId
string<uuid>
required

The ID of the unit to update

Body

application/json
name
string
required
Example:

"Hour"

Response

Unit updated successfully

success
boolean
Example:

true

message
string
Example:

"Unit updated successfully"

data
object