The Location object

Attributes

  • idstring

    Unique identifier for the object.

  • addressobject

    The full address of the location.

  • display_namestring

    The display name of the location.

  • metadataobject

    Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

More attributes

  • objectstring

  • configuration_overridesnullable string

  • livemodeboolean

The Location object
{
"id": "tml_FBakXQG8bQk4Mm",
"object": "terminal.location",
"address": {
"city": "San Francisco",
"country": "US",
"line1": "1234 Main Street",
"line2": "",
"postal_code": "94111",
"state": "CA"
},
"display_name": "My First Store",
"livemode": false,
"metadata": {}
}

Create a Location

Creates a new Location object. For further details, including which address fields are required in each country, see the Manage locations guide.

Parameters

  • addressobjectRequired

    The full address of the location.

  • display_namestringRequired

    A name for the location.

  • metadataobject

    Set of key-value pairs 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.

More parameters

  • configuration_overridesstring

Returns

Returns a Location object if creation succeeds.

POST /v1/terminal/locations
curl https://api.stripe.com/v1/terminal/locations \
-u "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc:" \
-d display_name="My First Store" \
-d "address[line1]"="1234 Main Street" \
-d "address[city]"="San Francisco" \
-d "address[postal_code]"=94111 \
-d "address[state]"=CA \
-d "address[country]"=US
Response
{
"id": "tml_FBakXQG8bQk4Mm",
"object": "terminal.location",
"address": {
"city": "San Francisco",
"country": "US",
"line1": "1234 Main Street",
"line2": "",
"postal_code": "94111",
"state": "CA"
},
"display_name": "My First Store",
"livemode": false,
"metadata": {}
}

Update a Location

Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Parameters

  • addressobject

    The full address of the location.

  • display_namestring

    A name for the location.

  • metadataobject

    Set of key-value pairs 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.

More parameters

  • configuration_overridesstring

Returns

Returns an updated Location object if a valid identifier was provided.

POST /v1/terminal/locations/:id
curl https://api.stripe.com/v1/terminal/locations/tml_FBakXQG8bQk4Mm \
-u "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc:" \
-d display_name="Update Store Name"
Response
{
"id": "tml_FBakXQG8bQk4Mm",
"object": "terminal.location",
"address": {
"city": "San Francisco",
"country": "US",
"line1": "1234 Main Street",
"line2": "",
"postal_code": "94111",
"state": "CA"
},
"display_name": "Update Store Name",
"livemode": false,
"metadata": {}
}

Retrieve a Location

Retrieves a Location object.

Parameters

No parameters.

Returns

Returns a Location object if a valid identifier was provided.

GET /v1/terminal/locations/:id
curl https://api.stripe.com/v1/terminal/locations/tml_FBakXQG8bQk4Mm \
-u "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc:"
Response
{
"id": "tml_FBakXQG8bQk4Mm",
"object": "terminal.location",
"address": {
"city": "San Francisco",
"country": "US",
"line1": "1234 Main Street",
"line2": "",
"postal_code": "94111",
"state": "CA"
},
"display_name": "My First Store",
"livemode": false,
"metadata": {}
}

List all Locations

Returns a list of Location objects.

Parameters

No parameters.

More parameters

  • ending_beforestring

  • limitinteger

  • starting_afterstring

Returns

A dictionary with a data property that contains an array of up to limit locations, starting after location starting_after. Each entry in the array is a separate Terminal location object. If no more locations are available, the resulting array will be empty.

GET /v1/terminal/locations
curl -G https://api.stripe.com/v1/terminal/locations \
-u "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc:" \
-d limit=3
Response
{
"object": "list",
"url": "/v1/terminal/locations",
"has_more": false,
"data": [
{
"id": "tml_FBakXQG8bQk4Mm",
"object": "terminal.location",
"address": {
"city": "San Francisco",
"country": "US",
"line1": "1234 Main Street",
"line2": "",
"postal_code": "94111",
"state": "CA"
},
"display_name": "My First Store",
"livemode": false,
"metadata": {}
}
{...}
{...}
],
}
Stripe Shell
Test mode
Welcome to the Stripe Shell! Stripe Shell is a browser-based shell with the Stripe CLI pre-installed. Log in to your Stripe account and press Control + Backtick (`) on your keyboard to start managing your Stripe resources in test mode. - View supported Stripe commands: - Find webhook events: - Listen for webhook events: - Call Stripe APIs: stripe [api resource] [operation] (e.g., )
The Stripe Shell is best experienced on desktop.
$