> Tillcast is live: the API at https://api.tillcast.com/v1 and the dashboard at https://dashboard.tillcast.com. A key prints on real printers, so do not call the API unless asked. A job carries its receipt as "document", an array of blocks (the recommended way), or as "receiptline", ReceiptLine text, exactly one of the two: read https://docs.tillcast.com/create-a-print-job.md and https://docs.tillcast.com/concepts/documents.md before you write a job body. Do not code against what does not exist yet: webhooks, a template language, stored templates (a job has no template field), OAuth connections and connectors for Make, Zapier and n8n, and OAuth sign-in for the MCP server. SDKs for TypeScript (@tillcast/sdk, version 0.2.0 or later for blocks) and Python (tillcast) exist as pre-1.0 versions. To show a receipt in a web page without printing, there are the npm packages @tillcast/preview and @tillcast/html-render (0.x, no API key, no call to Tillcast to draw): read https://docs.tillcast.com/preview-a-receipt.md. The docs are the source of truth: check the index https://docs.tillcast.com/llms.txt and https://docs.tillcast.com/roadmap.md before you code against anything. For clean Markdown of any page, append .md to the page URL. The Tillcast MCP server is live at https://api.tillcast.com/mcp and takes an API key as a bearer token (setup: https://docs.tillcast.com/connect-an-ai-assistant.md). It acts on the live account and its tools print on real paper, so do not connect to it or call its tools unless the owner asked you to. The MCP server at https://docs.tillcast.com/_mcp/server is a different one: it only searches these docs and cannot call the Tillcast API.

# List locations

GET https://api.tillcast.com/v1/locations

Every location of your organization (or of the key's customer), by
customer and then by creation. With `customer` the list is that customer's
(the same list as under `/customers/{customer}/locations`), and a customer
that is not yours is `404`. With `client_reference_id` the list holds every
location that carries that value (it is not unique), narrowed to the
`customer` when one is named; an unknown value is an empty list.
A search reads only so many rows in one request: it may answer fewer
than `limit` objects, even none, with `has_more` true and a
`next_cursor`, which you send as `starting_after` (or `ending_before`)
to go on until `has_more` is false.

**Scope:** `customers:read`.

Reference: https://docs.tillcast.com/api-reference/locations/list

## Authentication

- `Authorization` header (bearer token, required) — A restricted API key, `tc_rk_live_` and 32 characters. Send it as `Authorization: Bearer <key>`. A key lists its scopes, and each operation below names the one it needs; a key may also be limited to one customer. An owner or a developer of the organization makes a key in the dashboard, under API keys, after a code sent to their e-mail. The key is shown once, when it is made. An owner or a developer can revoke it there, and a revoked key stops working within a minute.

## Request

### Query parameters

- `limit` (integer, optional) — How many objects a page holds, 1 to 100. The default is 10.
- `starting_after` (string, optional) — The id of the last object of the page you hold: returns the page that follows it. In a search by `client_reference_id` the answer can be a short page, or none, with `has_more` true and a `next_cursor`: send that instead, and go on until `has_more` is false.
- `ending_before` (string, optional) — The id of the first object of the page you hold: returns the page that precedes it. Not together with `starting_after`. In a search by `client_reference_id` read backward, the `next_cursor` of the answer when it has one.
- `client_reference_id` (string, optional) — Only the locations that carry this client reference id (1 to 128 characters). It is not unique, so the list can hold many; an unknown value is an empty list.
- `customer` (string, optional) — Only the locations of this customer: its id.

## Response

### 200

A page of locations.

- `data` (list of LocationObject, required)
- `has_more` (boolean, required) — Whether another page follows. Ask for it with `starting_after` set to the id of the last object here, or, when the answer has a `next_cursor`, with that. A search by `client_reference_id` can answer a short page, or none, with `has_more` true: it reads only so many rows in one request, and `next_cursor` is the way on.
- `object` (string, required) — Always `list`.
- `next_cursor` (string, optional) — Only in the answer to a search (`client_reference_id`) that stopped before it could fill the page: it read all the rows it may in one request. Then `data` holds what it found so far, possibly nothing, `has_more` is true, and this is the position to continue from: pass it as `starting_after` (or as `ending_before`, if you page backward) in place of the id of the last object. It is an id of the kind of the list, but not necessarily the id of an object in `data`. Left out otherwise.

## Errors

### 400 Bad Request Error

The request is malformed or a parameter is invalid.

- `error` (ErrorObject, required)

### 401 Unauthorized Error

The key (or token) is missing or not valid.

- `error` (ErrorObject, required)

### 403 Forbidden Error

Not allowed.

- `error` (ErrorObject, required)

### 404 Not Found Error

There is no such object, or it is another organization's.

- `error` (ErrorObject, required)

### 500 Internal Server Error

A problem on Tillcast's side.

- `error` (ErrorObject, required)

## Types

### LocationObject

A place of a customer, such as a hotel or a venue. A location is not part of any printer URL.

- `client_reference_id` (string, required, nullable)
- `created_at` (string, required)
- `customer` (string, required) — The id of the customer the location belongs to.
- `id` (string, required)
- `name` (string, required)
- `object` (string, required)
- `printer_count` (long, required)
- `state` (string, required) — `active`, or `suspended` (paused).
- `address` (string, optional, nullable) — Only in the answer to a single location; lists leave it out.
- `timezone` (string, optional, nullable) — An IANA time zone name. Only in the answer to a single location.

### ErrorObject

- `code` (string, required) — A stable code to branch on. The ones known today are listed in `x-codes` of this schema; a new one can be added, so a client treats a code it does not know by the HTTP status.
- `message` (string, required) — A sentence for a person. Do not parse it.
- `param` (string, required, nullable) — The request parameter the error is about, if one.
- `request_id` (string, required) — Quote it when you ask for help.
- `type` (string, required) — The kind of error: `invalid_request_error`, `authentication_error`, `permission_error`, `conflict_error`, `idempotency_error`, `rate_limit_error` or `api_error`.

## Examples

**Response**

```json
{
  "data": [
    {
      "client_reference_id": "prop-17",
      "created_at": "2026-10-11T09:20:00Z",
      "customer": "cus_c3x9k2m3",
      "id": "loc_01M42YMFP03Q1P9N7M5K3H1G0F",
      "name": "Hotel Gdansk Old Town",
      "object": "location",
      "printer_count": 2,
      "state": "active",
      "address": "Dluga 1, Gdansk",
      "timezone": "Europe/Warsaw"
    }
  ],
  "has_more": false,
  "object": "list"
}
```

**SDK Code**

```python
import requests

url = "https://api.tillcast.com/v1/locations"

querystring = {"client_reference_id":"prop-17","customer":"cus_c3x9k2m3","limit":"25","starting_after":"cus_c3x9k2m3"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.tillcast.com/v1/locations?client_reference_id=prop-17&customer=cus_c3x9k2m3&limit=25&starting_after=cus_c3x9k2m3';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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"
	"net/http"
	"io"
)

func main() {

	url := "https://api.tillcast.com/v1/locations?client_reference_id=prop-17&customer=cus_c3x9k2m3&limit=25&starting_after=cus_c3x9k2m3"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	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.tillcast.com/v1/locations?client_reference_id=prop-17&customer=cus_c3x9k2m3&limit=25&starting_after=cus_c3x9k2m3")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

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.get("https://api.tillcast.com/v1/locations?client_reference_id=prop-17&customer=cus_c3x9k2m3&limit=25&starting_after=cus_c3x9k2m3")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.tillcast.com/v1/locations?client_reference_id=prop-17&customer=cus_c3x9k2m3&limit=25&starting_after=cus_c3x9k2m3', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.tillcast.com/v1/locations?client_reference_id=prop-17&customer=cus_c3x9k2m3&limit=25&starting_after=cus_c3x9k2m3");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.tillcast.com/v1/locations?client_reference_id=prop-17&customer=cus_c3x9k2m3&limit=25&starting_after=cus_c3x9k2m3")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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()
```