# PostTerminalLocations

From **Stripe API**.

`POST /v1/terminal/locations`

<p>Creates a new <code>Location</code> object.
For further details, including which address fields are required in each country, see the <a href="/docs/terminal/fleet/locations">Manage locations</a> guide.</p>

## Request body

- Required: true
### `application/x-www-form-urlencoded`

- Type: `object`

```json
{"additionalProperties":false,"properties":{"address":{"description":"The full address of the location.","properties":{"city":{"maxLength":5000,"type":"string"},"country":{"maxLength":5000,"type":"string"},"line1":{"maxLength":5000,"type":"string"},"line2":{"maxLength":5000,"type":"string"},"postal_code":{"maxLength":5000,"type":"string"},"state":{"maxLength":5000,"type":"string"}},"required":["country"],"title":"create_location_address_param","type":"object"},"display_name":{"description":"A name for the location.","maxLength":1000,"type":"string"},"expand":{"description":"Specifies which fields in the response should be expanded.","items":{"maxLength":5000,"type":"string"},"type":"array"},"metadata":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"enum":[""],"type":"string"}],"description":"Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`."}},"required":["address","display_name"],"type":"object"}
```

## Security

### `basicAuth`

- Type: `http`
- Request header: `Authorization`
- Scheme: `basic`
Send credentials in the `Authorization` request header using the `Basic` scheme.

Basic HTTP authentication. Allowed headers-- Authorization: Basic <api_key> | Authorization: Basic <base64 hash of `api_key:`>

### `bearerAuth`

- Type: `http`
- Request header: `Authorization`
- Scheme: `bearer`
- Bearer format: `auth-scheme`
Send the token in the `Authorization` request header using the `Bearer` scheme.

Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>

## Responses

### `200`

Successful response.

### `application/json`

- Type: `object`

A Location represents a grouping of readers.

Related guide: [Fleet Management](https://stripe.com/docs/terminal/fleet/locations).

```json
{"description":"A Location represents a grouping of readers.\n\nRelated guide: [Fleet Management](https://stripe.com/docs/terminal/fleet/locations).","properties":{"address":{"$ref":"#/components/schemas/address"},"display_name":{"description":"The display name of the location.","maxLength":5000,"type":"string"},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"livemode":{"description":"Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.","type":"boolean"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.","type":"object"},"object":{"description":"String representing the object's type. Objects of the same type share the same value.","enum":["terminal.location"],"type":"string"}},"required":["address","display_name","id","livemode","metadata","object"],"title":"TerminalLocationLocation","type":"object","x-expandableFields":["address"],"x-resourceId":"terminal.location"}
```

### `default`

Error response.

### `application/json`

- Type: `object`

An error response from the Stripe API

```json
{"description":"An error response from the Stripe API","properties":{"error":{"$ref":"#/components/schemas/api_errors"}},"required":["error"],"type":"object"}
```

## Request examples

### cURL

```shell
curl --request POST \
  --url https://api.stripe.com/v1/terminal/locations \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data '{
  "address": {
    "city": "string",
    "country": "string",
    "line1": "string",
    "line2": "string",
    "postal_code": "string",
    "state": "string"
  },
  "display_name": "string",
  "expand": [
    "string"
  ],
  "metadata": "string"
}'
```
