> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api-docs.papertracc.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api-docs.papertracc.com/_mcp/server.

# Update Account

PATCH https://api.papertracc.com/v1/store/account
Content-Type: application/json

Changes the shopper's name or phone. The email cannot be changed. The merchant's customer record is not edited.

**Keys:** public key or secret key.

Reference: https://api-docs.papertracc.com/storefront/account/profile/update-account

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.
- `identity` header (required) — The identity for the active workspace.

## Servers

- `https://api.papertracc.com/v1` (Production, default)
- `https://api.papertracc.com/rc-1` (Release Candidate 1)

## Request

### Headers

- `shopper-token` (string, required) — The `token` returned when the shopper signed in. Treat it as a secret: never put it in a URL or a log.

### Body (application/json)

This endpoint expects an UpdateAccountRequest.

- `first_name` (string, optional)
- `last_name` (string, optional)
- `phone` (string, optional) — Between 7 and 15 digits. An empty string removes it.

## Response

### 200

Successfully updated account

- `status` (boolean, required) — Always `true` on success.
- `message` (string, required) — Human-readable outcome.
- `data` (Account, required)

## Errors

### 400 Bad Request Error

The `channel` header is missing, the body is not valid JSON, or a field failed validation.

- `status` (boolean, required) — Always `false` on a failed request.
- `message` (string, required) — What went wrong, written for the shopper or the developer.
- `error_code` (string, optional) — Present on `402` responses.

### 401 Unauthorized Error

The `shopper-token` header is missing, the session has expired, or the shopper signed out.

- `status` (boolean, required) — Always `false` on a failed request.
- `message` (string, required) — What went wrong, written for the shopper or the developer.
- `error_code` (string, optional) — Present on `402` responses.

### 402 Payment Required Error

The workspace's subscription plan does not include the Open API.

- `status` (boolean, required) — Always `false` on a failed request.
- `message` (string, required) — What went wrong, written for the shopper or the developer.
- `error_code` (string, optional) — Present on `402` responses.

### 422 Unprocessable Entity Error

The request was understood but a rule stopped it. The message says which.

- `status` (boolean, required) — Always `false` on a failed request.
- `message` (string, required) — What went wrong, written for the shopper or the developer.
- `error_code` (string, optional) — Present on `402` responses.

## Types

### Account

- `id` (string, required)
- `email` (string, required) — Verified email address. It identifies the account in the workspace.
- `first_name` (string, required, nullable)
- `last_name` (string, required, nullable)
- `phone` (string, required, nullable)
- `created_at` (datetime, required)

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "status": true,
  "message": "Successfully updated account",
  "data": {
    "id": "string",
    "email": "ada@example.com",
    "first_name": "string",
    "last_name": "string",
    "phone": "string",
    "created_at": "2024-01-15T09:30:00Z"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.papertracc.com/v1/store/account"

payload = {}
headers = {
    "channel": "channel",
    "shopper-token": "shopper-token",
    "Authorization": "Bearer <apiKey>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.papertracc.com/v1/store/account';
const options = {
  method: 'PATCH',
  headers: {
    channel: 'channel',
    'shopper-token': 'shopper-token',
    Authorization: 'Bearer <apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.papertracc.com/v1/store/account"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("channel", "channel")
	req.Header.Add("shopper-token", "shopper-token")
	req.Header.Add("Authorization", "Bearer <apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.papertracc.com/v1/store/account")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["channel"] = 'channel'
request["shopper-token"] = 'shopper-token'
request["Authorization"] = 'Bearer <apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.papertracc.com/v1/store/account")
  .header("channel", "channel")
  .header("shopper-token", "shopper-token")
  .header("Authorization", "Bearer <apiKey>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.papertracc.com/v1/store/account', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
    'Content-Type' => 'application/json',
    'channel' => 'channel',
    'shopper-token' => 'shopper-token',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.papertracc.com/v1/store/account");
var request = new RestRequest(Method.PATCH);
request.AddHeader("channel", "channel");
request.AddHeader("shopper-token", "shopper-token");
request.AddHeader("Authorization", "Bearer <apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "channel": "channel",
  "shopper-token": "shopper-token",
  "Authorization": "Bearer <apiKey>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.papertracc.com/v1/store/account")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```