Update User

Update A User

PATCH
/user
/user

The Authorization access token

Authorization

Authorization
Required
Bearer <token>

In: header

Request Body

application/jsonRequired

userId
Required
number

name
Required
string

subscriptionLevel
Required
number

curl -X PATCH "https://api.t4b.top/user" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "userId": 0,
    "name": "string",
    "subscriptionLevel": 0
  }'

Ok

{
  "data": {
    "user": {
      "id": 1,
      "name": "merchant",
      "role": "MERCHANT",
      "createdAt": "2021-01-01T00:00:00.000Z",
      "supplierId": 1,
      "backupSupplierIds": [
        0
      ],
      "profitRate": "0.1",
      "subscriptionLevel": 1
    }
  },
  "statusCode": 200
}