> 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.

# Create Address

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

Saves an address. An account can keep up to 20.

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

Reference: https://api-docs.papertracc.com/storefront/account/addresses/create-address

## 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 AddressInput.

- `name` (string, required) — Label or recipient.
- `line1` (string, required) — First address line.
- `line2` (string, optional)
- `city` (string, optional)
- `state` (string, optional)
- `postal_code` (string, optional)
- `country_code` (string, optional) — ISO 3166-1 alpha-2 code.
- `phone` (string, optional)
- `is_default` (boolean, optional) — Make this the default address. The first address saved is always the default.
- `area` (string, optional) — Neighbourhood or area the store delivers to, as listed in Get Delivery Areas (for example `Lekki`). Delivery options are matched on it.
- `landmark` (string, optional) — Directions for the rider, for example `Opposite the Total filling station`.

## Response

### 201

Successfully saved address

- `status` (boolean, required) — Always `true` on success.
- `message` (string, required) — Human-readable outcome.
- `data` (ShopperAddress, 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

### ShopperAddress

- `id` (string, required)
- `name` (string, required) — Label or recipient, as the shopper entered it.
- `line1` (string, required) — First address line.
- `line2` (string, required, nullable)
- `city` (string, required, nullable)
- `state` (string, required, nullable)
- `postal_code` (string, required, nullable)
- `country_code` (string, required, nullable)
- `phone` (string, required, nullable)
- `is_default` (boolean, required) — The address to offer first at checkout. Exactly one address is the default.
- `area` (string, required, nullable)
- `landmark` (string, required, nullable)

## Examples

**Request**

```json
{
  "name": "Home",
  "line1": "12 Allen Avenue"
}
```

**Response**

```json
{
  "status": true,
  "message": "Successfully saved address",
  "data": {
    "id": "string",
    "name": "Home",
    "line1": "12 Allen Avenue",
    "line2": "string",
    "city": "string",
    "state": "string",
    "postal_code": "string",
    "country_code": "string",
    "phone": "string",
    "is_default": true,
    "area": "string",
    "landmark": "string"
  }
}
```

**SDK Code**

```python
import requests

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

payload = {
    "name": "Home",
    "line1": "12 Allen Avenue"
}
headers = {
    "channel": "channel",
    "shopper-token": "shopper-token",
    "Authorization": "Bearer <apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.papertracc.com/v1/store/account/addresses';
const options = {
  method: 'POST',
  headers: {
    channel: 'channel',
    'shopper-token': 'shopper-token',
    Authorization: 'Bearer <apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"name":"Home","line1":"12 Allen Avenue"}'
};

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/addresses"

	payload := strings.NewReader("{\n  \"name\": \"Home\",\n  \"line1\": \"12 Allen Avenue\"\n}")

	req, _ := http.NewRequest("POST", 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/addresses")

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

request = Net::HTTP::Post.new(url)
request["channel"] = 'channel'
request["shopper-token"] = 'shopper-token'
request["Authorization"] = 'Bearer <apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Home\",\n  \"line1\": \"12 Allen Avenue\"\n}"

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.post("https://api.papertracc.com/v1/store/account/addresses")
  .header("channel", "channel")
  .header("shopper-token", "shopper-token")
  .header("Authorization", "Bearer <apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Home\",\n  \"line1\": \"12 Allen Avenue\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.papertracc.com/v1/store/account/addresses', [
  'body' => '{
  "name": "Home",
  "line1": "12 Allen Avenue"
}',
  '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/addresses");
var request = new RestRequest(Method.POST);
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", "{\n  \"name\": \"Home\",\n  \"line1\": \"12 Allen Avenue\"\n}", 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 = [
  "name": "Home",
  "line1": "12 Allen Avenue"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.papertracc.com/v1/store/account/addresses")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```