Skip to main content

Update an Account Membership

PUT 

https://useast.api.elasticpath.com/v2/accounts/:accountID/account-memberships/:membershipID

You can update and extend an account member details using core flows. However, you cannot update the account_member_id of an account member.

Request

Path Parameters

    accountID uuidrequired

    The unique identifier of the account that the account member is associated with.

    membershipID uuidrequired

    The unique identifier of the account membership to update the details of the account member.

Body

    data object
    account_member_idstring<uuid>required

    Specifies the unique identifier of the account member that the membership is associated with.

    Example: 908f7849-60da-4e4a-a3b1-51d4cbe3b953
    typestringrequired

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

    Default value: account_membership

Responses

OK

Schema
    data object
    idstring<uuid>

    Represents the unique identifier for the account membership.

    Example: 24e939f6-178f-497b-9d64-5bf2b5a70a2e
    typestring

    Represents the type of the object returned.

    Default value: account_membership
    meta object
    timestamps object
    created_atstring

    The date the resource is created.

    Example: 2021-02-23T09:40:33.882Z
    updated_atstring

    The date the resource is updated.

    Example: 2021-02-23T09:40:33.882Z
    relationships object
    account_member object
    data object
    idstring<uuid>

    Specifies the ID of the account member.

    Example: 908f7849-60da-4e4a-a3b1-51d4cbe3b953
    typestring

    Specifies the type of the account member.

    Default value: account_member
    links object
    selfstring<uri>

    A URL to the specific resource.

    Example: https://useast.api.elasticpath.com/v2/accounts/5b495058-9ffc-4b9b-810a-c9d43ffc6500/account-memberships/24e939f6-178f-497b-9d64-5bf2b5a70a2e

Authorization: http

name: BearerTokentype: httpscheme: bearer
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "https://useast.api.elasticpath.com/v2/accounts/:accountID/account-memberships/:membershipID");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"data\": {\n \"account_member_id\": \"908f7849-60da-4e4a-a3b1-51d4cbe3b953\",\n \"type\": \"account_membership\"\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
— pathrequired
Body
{
  "data": {
    "account_member_id": "908f7849-60da-4e4a-a3b1-51d4cbe3b953",
    "type": "account_membership"
  }
}
ResponseClear

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