Update an Account
PUThttps://useast.api.elasticpath.com/v2/accounts/:accountID
Update the information contained on an account.
Request
Path Parameters
accountID stringrequired
The ID of the account you want to retrieve.
- application/json
Body
data object
Responses
- 200
- 400
- 404
- default
OK
- application/json
- Schema
- Example (from schema)
Schema
data
{
"data": {
"id": "deb6b25f-8451-4211-9a22-95610333df23",
"type": "account",
"name": "acc-name",
"legal_name": "acc-legal-name",
"registration_id": "00000000-0000-1000-8000-000f00000300",
"external_ref": "16bedceb-8b2d-4f82-a973-b0a8d8432708",
"meta": {
"timestamps": {
"created_at": "2021-02-23T09:40:33.882Z",
"updated_at": "2021-02-23T09:40:33.882Z"
}
},
"links": {
"self": "/v2/accounts/deb6b25f-8451-4211-9a22-95610333df23"
}
}
}
Bad Request
- application/json
- Schema
- Example (from schema)
Schema
errors object[]
{
"errors": [
{
"detail": "Validation failed: field 'Name' on the 'min' tag.",
"status": "400",
"title": "Bad Request"
}
]
}
Not Found
- application/json
- Schema
- Example (from schema)
Schema
errors object[]
{
"errors": [
{
"detail": "account not found",
"status": "404",
"title": "Not Found"
}
]
}
Internal server error.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
errors Error[]required
{
"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"
}
]
}
Authorization: http
name: BearerTokentype: httpscheme: bearer
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X PUT 'https://useast.api.elasticpath.com/v2/accounts/:accountID' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"data": {
"type": "account",
"name": "acc-name",
"legal_name": "acc-legal-name",
"registration_id": "reg-id",
"external_ref": "ext-ref"
}
}'
ResponseClear