Create an Account
POST/v2/accounts
With the account creation endpoint, you have the ability to create parent accounts and subaccounts.
Request
- application/json
Body
- Account
- SubAccount
data object required
Default value: account
Specifies the the type of object. Set this value to account
.
Specifies the name of the account.
Specifies the legal name of the account.
Specifies the registration ID. If specified, this field is checked for uniqueness.
The unique attribute associated with the account. For example, this could be an external reference from a separate company system. The maximum length is 2048 characters. Default is null
.
Default value: account
Specifies the the type of object. Set this value to account
.
Specifies the name of the account.
Specifies the legal name of the account.
Specifies the registration ID. If specified, this field is checked for uniqueness.
The unique attribute associated with the account. For example, this could be an external reference from a separate company system. The maximum length is 2048 characters. Default is null
.
Specifies the ID of the parent account.
Responses
- 201
- 400
- default
Created
- application/json
- Schema
- Example (from schema)
Schema
data object
Default value: account
Specifies the the type of object. Set this value to account
.
Specifies the name of the account.
Specifies the legal name of the account.
Specifies the registration ID. If specified, this field is checked for uniqueness.
The unique attribute associated with the account. For example, this could be an external reference from a separate company system. The maximum length is 2048 characters. Default is null
.
The unique identifier for an Account.
meta object
Additional information for this realm. For more information, see The meta object section.
timestamps object
The date the account is created.
The date the account is updated.
links object
A URL to the specific resource.
{
"data": {
"type": "account",
"name": "acc-name",
"legal_name": "acc-legal-name",
"registration_id": "reg-id",
"external_ref": "ext-ref",
"id": "deb6b25f-8451-4211-9a22-95610333df23",
"meta": {
"timestamps": {
"created_at": "2021-02-23T09:40:33.882Z",
"updated_at": "2021-02-23T09:40:33.882Z"
}
},
"links": {
"self": "https://useast.api.elasticpath.com/v2/accounts/deb6b25f-8451-4211-9a22-95610333df23"
}
}
}
Bad Request
- application/json
- Schema
- Example (from schema)
- bad-request-error
Schema
- Array [
- ]
errors Error[]required
A brief summary of the error.
The HTTP response code of the error.
Optional additional detail about the error.
{
"errors": [
{
"title": "string",
"status": "string",
"detail": "string"
}
]
}
{
"errors": [
{
"title": "Bad Request",
"status": "400",
"detail": "Validation failed: field 'Name' on the 'min' tag."
}
]
}
Internal server error.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors Error[]required
A brief summary of the error.
The HTTP response code of the error.
Optional additional detail about the error.
{
"errors": [
{
"title": "string",
"status": "string",
"detail": "string"
}
]
}
Internal server error
{
"errors": [
{
"title": "Internal Server Error",
"status": "500",
"detail": "there was a problem processing your request"
}
]
}