Update Account

/accounts/{id}

Update Account [PUT]

Update an existing account.

The InspectAll API will respond with a 412: Precondition Failed if the account name looks similar to other existing account names, or if the account num matches another account num. Include "confirmed": true in the following request to continue creating the account.

Note: To make an Account "Inactive" update the "rowStatus" = 0.

Authorization: Admin, Web, Mobile

Request

  {
    "name": "Springfield Nuclear Plant",
    "num": "SPRING908",
    "rowStatus": 1,
    "address": "123 Springfield Street",
    "city": "Springfield",
    "state": "",
    "zip": "80982",
    "country": "US",
    "teamIds": [1,2,3]
  }

Response 200

  {
    "item": {
      "id": 9082,
      "num": "SPRING908",
      "name": "Springfield Nuclear Plant",
      "address": "123 Springfield Street",
      "city": "Springfield",
      "state": null,
      "zip": "80982",
      "country": "US",
      "rowStatus": 1,
      "createdBy": "290",
      "createdAt": "2015-05-19T16:37:19.827Z",
      "modifiedAt": "2015-05-19T16:37:19.827Z",
      "teamIds": [
        1,
        2,
        3
      ]
    }
  }

Response 412

  {
    "similarAccounts": [
      {
         "id": 12908,
         "name": "South Netherlands Engineering",
         "num": "SPRING"
      },{
         "id": 9082,
         "name": "Springfield Nuclear Plant INC",
         "num": "SPRING90"
      }
    ]
  }

Response 422

  {
    "errors": {
      "teamIds": [
        "At least (1) Team is required."
      ],
      "name": [
        "Name is required."
      ]
    }
  }

Still need help? Contact Us Contact Us