SAP Cloud Platform Open Connectors

PATCH /accounts/{id}

PATCH /accounts/{id}

Change the name, description, or externalId of a specific account with the account id and the PATCH /accounts/{id} endpoint.

You can also deactivate an account or activate an already deactivated account. Deactivating an account essentially performs the same action as deleting an account. After you deactivate an account, you cannot view it in SAP Cloud Platform Open Connectors.  You can still find the account using the SAP Cloud Platform Open Connectors APIs. 

Path Parameters

idThe unique identifier for an account within an organization.

 Request Body Parameters

Field
Description
Required
Type
active
Indicates if the account is active. In the JSON response true is active and false is inactive.
N
Boolean
name
The name of the account.
Y
string
description
A brief description of the account.
Y
string
externalId
A unique identifier for the account, required to add an account using POST/ accounts.
Y
string

 Example Request

curl -X POST \
  https://api.openconnectors.us2.ext.hana.ondemand.com/elements/api-v2/accounts \
  -H 'authorization: User sAfK7LJGNz5ZHcNrvdJvLI=f03WbTbH6aRKc0HJ3oOIi, Organization 58168435e3b9959a929eb04b6218b9a2' \
  -H 'content-type: application/json' \
  -d '{
  "name": "Account For Docs",
  "description": "This account is used to demonstrate a POST /instances request",
  "externalId": "notsorandomId"
}
'

 Example Response

{
    "id": 4030,
    "name": "Account For Docs",
    "description": "This account is used to demonstrate a POST /instances request",
    "active": true,
    "companyId": 819,
    "externalId": "notsorandomId",
    "defaultAccount": false,
    "type": "CompanyAccount"
}