Skip to main content

Update an Account

PUT 

https://useast.api.elasticpath.com/v2/accounts/:accountID

Update the information contained on an account.

Request

Path Parameters

    accountID uuidrequired

    The ID of the account you want to retrieve.

Body

    data object
    typestringrequired

    Specifies the type of object. Set this value to account.

    Default value: account
    namestringrequired

    Specifies the name of the account.

    Example: acc-name
    legal_namestring | null

    Specifies the legal name of the account.

    Example: acc-legal-name
    registration_idstring | null

    Specifies the registration ID. If specified, this field is checked for uniqueness.

    Example: reg-id
    external_refstring | null

    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.

    Example: ext-ref

Responses

OK

Schema
    data object
    iduuid

    The unique identifier for an Account.

    Example: deb6b25f-8451-4211-9a22-95610333df23
    typestring

    The type of the object returned. Always use account.

    Default value: account
    namestring

    The name of the account.

    Example: acc-name
    legal_namestring

    The legal name of the account.

    Example: acc-legal-name
    registration_idstring

    The registration ID of the account. The maximum character limit for this field is 63.

    Example: 00000000-0000-1000-8000-000f00000300
    external_refstring | null

    The optional external ID reference. For example, this could be an external reference from a separate company system. The maximum length is 2048 characters. Default is null.

    Example: 16bedceb-8b2d-4f82-a973-b0a8d8432708
    meta object
    timestamps object
    created_atdate-time

    The date the account is created.

    Example: 2021-02-23T09:40:33.882Z
    updated_atdate-time

    The date the account is last updated.

    Example: 2021-02-23T09:40:33.882Z
    links object
    selfuri

    A URL to the specific resource.

    Example: /v2/accounts/deb6b25f-8451-4211-9a22-95610333df23

Authorization: http

name: BearerTokentype: httpscheme: bearer
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "https://useast.api.elasticpath.com/v2/accounts/:accountID");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"data\": {\n \"type\": \"account\",\n \"name\": \"acc-name\",\n \"legal_name\": \"acc-legal-name\",\n \"registration_id\": \"reg-id\",\n \"external_ref\": \"ext-ref\"\n }\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://useast.api.elasticpath.com
Auth
Parameters
— pathrequired
Body
{
  "data": {
    "type": "account",
    "name": "acc-name",
    "legal_name": "acc-legal-name",
    "registration_id": "reg-id",
    "external_ref": "ext-ref"
  }
}
ResponseClear

Click the Send API Request button above and see the response here!

We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies.