Create an account

POST /api/accounts

Allows you to create a new account in the system. Only available to Garmat administrators.

Body

The parameters to create an account

  • 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 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

  • OK

    Hide response attributes Show response attributes object
    • booths number

      Number of booths in the system associated to the account

    • Number of facilities in the system associated to the account

    • id string

      ID of the account in the system

    • name string

      Name of the account

    • status string

      Whether the account is active or has been deactivated

    • type string

      Account type

    • users number

      Number of users in the system associated to the account

  • Bad request

    Hide response attribute Show response attribute object
    • error string

      Human readable version of the error status code

  • Unauthorized

    Hide response attribute Show response attribute object
    • error string

      Human readable version of the error status code

POST /api/accounts
curl \
 -X POST http://localhost:4000/api/accounts \
 -d '{"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",
  "users": 5,
  "booths": 2,
  "status": "active",
  "facilities": 2
}
Response examples (200)
{
  "id": "f260f115-f2e6-4dde-bcab-98b10fdb8cf6",
  "name": "Test Account",
  "type": "customer",
  "users": 5,
  "booths": 2,
  "status": "active",
  "facilities": 2
}
Response examples (400)
{
  "error": "Error Reason"
}
Response examples (400)
{
  "error": "Error Reason"
}
Response examples (401)
{
  "error": "Error Reason"
}
Response examples (401)
{
  "error": "Error Reason"
}