Create a Location
POST / v1 / terminal / locations
Creates a new Location object. For further details, including which address fields are required in each country, see the Manage locations guide.
Parameters
- address object The full address of the location.
- display _ name string A name for the location. Maximum length is 1000 characters.
- metadata map 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
- address _ kana object Preview feature
- address _ kanji object Preview feature
- configuration _ overrides string
- display _ name _ kana string Preview feature
- display _ name _ kanji string Preview feature
- phone string Preview feature
Returns
Returns a Location object if creation succeeds.
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
POST / v1 / terminal / locations /:id
Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Parameters
- address object The full address of the location. You can’t change the location’s
country. If you need to modify thecountryfield, create a newLocationobject and re-register any existing readers to that location. - display _ name string A name for the location.
- metadata map 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
- address _ kana object Preview feature
- address _ kanji object Preview feature
- configuration _ overrides string
- display _ name _ kana string Preview feature
- display _ name _ kanji string Preview feature
- phone string Preview feature
Returns
Returns an updated Location object if a valid identifier was provided.
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
GET / v1 / terminal / locations /:id
Retrieves a Location object.
Parameters
No parameters.
Returns
Returns a Location object if a valid identifier was provided.
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": {}}
