Update an Customer Address
PUThttps://useast.api.elasticpath.com/v2/customers/:customerID/addresses/:addressID
Update an address for a Customer.
Request
Responses
- 200
- 400
- 404
OK
Bad Request
Not Found
Authorization: http
name: BearerTokentype: httpscheme: bearer
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "https://useast.api.elasticpath.com/v2/customers/:customerID/addresses/:addressID");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"data\": {\n \"type\": \"address\",\n \"first_name\": \"Ron\",\n \"last_name\": \"Swanson\",\n \"name\": \"Home\",\n \"phone_number\": \"(555) 555-1234\",\n \"instructions\": \"Leave behind bin\",\n \"company_name\": \"Ron Swanson Enterprises\",\n \"line_1\": \"1 Sunny Street\",\n \"line_2\": \"Unit 101\",\n \"city\": \"Sunny Town\",\n \"county\": \"Sunnyville\",\n \"region\": \"acc-legal-name\",\n \"postcode\": \"SU33 1YY\",\n \"country\": \"GB\"\n }\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear