Update an existing account

PUT /api/accounts/{id}

Update the details of an account by passing its ID in the system and the attributes to edit. Available to Garmat administrators and to customer admins with limited editable fields.

Path parameters

  • id string Required

    the ID of the account to update

application/json

Body

The parameters to update an account

  • customer_type string

    customer type, if applicable. One of: consolidator, mso, manufacturer, banner_or_franchise, buying_group, dealer_group

  • name string Required

    name of the account to create

  • primary_industry string

    primary industry of the account, if applicable. One of: automotive, aerospace, marine, industrial, or other.

  • status string

    status of the account to create.

  • type string Required

    type of the account to create.

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • customer_type string

      the customer type, if applicable.

    • id string

      ID of the account in the system

    • name string

      Name of the account

    • primary_industry string

      primary industry of the account, if applicable.

    • status string

      Whether the account is active or has been deactivated

    • type string

      Account type

  • 400 application/json

    Bad request

    Hide response attribute Show response attribute object
    • error string

      Human readable version of the error status code

  • 401 application/json

    Unauthorized

    Hide response attribute Show response attribute object
    • error string

      Human readable version of the error status code

PUT /api/accounts/{id}
curl \
 --request PUT 'http://localhost:4000/api/accounts/{id}' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"name":"Customer Account","type":"customer","status":"deactivated","customer_type":"mso","primary_industry":"automotive"}'
Request examples
{
  "name": "Customer Account",
  "type": "customer",
  "status": "deactivated",
  "customer_type": "mso",
  "primary_industry": "automotive"
}
Response examples (200)
{
  "id": "f260f115-f2e6-4dde-bcab-98b10fdb8cf6",
  "name": "Test Account",
  "type": "customer",
  "status": "active",
  "customer_type": "mso",
  "primary_industry": "automotive"
}
Response examples (200)
{
  "id": "f260f115-f2e6-4dde-bcab-98b10fdb8cf6",
  "name": "Test Account",
  "type": "customer",
  "status": "active",
  "customer_type": "mso",
  "primary_industry": "automotive"
}
Response examples (400)
{
  "error": "Error Reason"
}
Response examples (400)
{
  "error": "Error Reason"
}
Response examples (401)
{
  "error": "Error Reason"
}
Response examples (401)
{
  "error": "Error Reason"
}