TrellisDevelopers

Analytics

GET
/analytics/v1/locations

Authorization

AuthorizationBearer <token>

Trellis integration credential. Analytics reads require reports:sales:read and access to every selected location. Omit x-tenant, x-location, and staff identity headers when using this credential.

In: header

Header Parameters

x-tenant-id?string

Selects the tenant by id. When both tenant headers are omitted, the server falls back to the configured default tenant slug.

x-tenant-slug?string

Selects the tenant by slug. Use this when you know the tenant slug instead of the tenant id.

Response Body

application/json

curl -X GET "https://example.com/analytics/v1/locations" \  -H "x-tenant-id: tenant-local" \  -H "x-tenant-slug: trellis-local"
{  "locations": [    {      "id": "string",      "canonicalId": "bbdc4db1-7968-429d-8969-cad65c34b810",      "name": "string",      "timezone": "string"    }  ]}
GET
/analytics/v1/sales

Read sales for one or more locations by business date. Use sales-by-location-day to group by canonical location and date. Money columns use the tenant currency’s minor units. The default page size is 100.

Authorization

AuthorizationBearer <token>

Trellis integration credential. Analytics reads require reports:sales:read and access to every selected location. Omit x-tenant, x-location, and staff identity headers when using this credential.

In: header

Query Parameters

kind*|||||||||||||
locationIds*string

Comma-separated list of one to twenty location codes or canonical UUIDs.

Length1 <= length <= 2000
start*string

First business date (inclusive).

Formatdate
end*string

End business date (exclusive), up to 366 days after start.

Formatdate
offset?integer
Range0 <= value <= 100000
limit?integer
Range1 <= value <= 500

Header Parameters

x-tenant-id?string

Selects the tenant by id. When both tenant headers are omitted, the server falls back to the configured default tenant slug.

x-tenant-slug?string

Selects the tenant by slug. Use this when you know the tenant slug instead of the tenant id.

Response Body

application/json

curl -X GET "https://example.com/analytics/v1/sales?kind=sales-summary&locationIds=string&start=2019-08-24&end=2019-08-24" \  -H "x-tenant-id: tenant-local" \  -H "x-tenant-slug: trellis-local"
{  "kind": "sales-summary",  "start": "2019-08-24",  "end": "2019-08-24",  "generatedAt": "2019-08-24T14:15:22Z",  "currency": "string",  "locations": [    {      "id": "string",      "canonicalId": "bbdc4db1-7968-429d-8969-cad65c34b810",      "name": "string",      "timezone": "string"    }  ],  "columns": [    {      "key": "string",      "label": "string",      "kind": "text"    }  ],  "rows": [    {      "property1": "string",      "property2": "string"    }  ],  "totalRows": 0,  "offset": 0,  "notes": [    "string"  ]}
GET
/analytics/v1/history/comparison

Read Fourth Street dates across the published Aloha archive and Trellis operational sales. Source overlap or an incompatible currency returns 409.

Authorization

AuthorizationBearer <token>

Trellis integration credential. Analytics reads require reports:sales:read and access to every selected location. Omit x-tenant, x-location, and staff identity headers when using this credential.

In: header

Query Parameters

locationId*string

Fourth Street location code or canonical UUID.

Length1 <= length
start*string

First business date (inclusive).

Formatdate
end*string

End business date (exclusive), up to 366 days after start.

Formatdate

Header Parameters

x-tenant-id?string

Selects the tenant by id. When both tenant headers are omitted, the server falls back to the configured default tenant slug.

x-tenant-slug?string

Selects the tenant by slug. Use this when you know the tenant slug instead of the tenant id.

Response Body

application/json

curl -X GET "https://example.com/analytics/v1/history/comparison?locationId=string&start=2019-08-24&end=2019-08-24" \  -H "x-tenant-id: tenant-local" \  -H "x-tenant-slug: trellis-local"
{  "basis": "recorded-checkout-v1",  "sourceNamespace": "string",  "currentReportIncluded": true,  "financialReportingReady": false,  "recognizedRevenueReady": false,  "rows": [    {      "day": "2019-08-24",      "location": "string",      "source": "aloha",      "recordedCheckoutCents": 0,      "recordedCheckoutSourceDecimal": "string",      "monetaryPrecisionStatus": "string",      "availability": "string"    }  ]}
GET
/analytics/v1/history/recorded-checkout

Read the published Fourth Street Aloha archive by business date. Missing and unverified values are null. The recorded-checkout basis can include deferred amounts.

Authorization

AuthorizationBearer <token>

Trellis integration credential. Analytics reads require reports:sales:read and access to every selected location. Omit x-tenant, x-location, and staff identity headers when using this credential.

In: header

Query Parameters

locationId*string

Fourth Street location code or canonical UUID.

Length1 <= length
start*string

First business date (inclusive).

Formatdate
end*string

End business date (exclusive), up to 366 days after start.

Formatdate

Header Parameters

x-tenant-id?string

Selects the tenant by id. When both tenant headers are omitted, the server falls back to the configured default tenant slug.

x-tenant-slug?string

Selects the tenant by slug. Use this when you know the tenant slug instead of the tenant id.

Response Body

application/json

curl -X GET "https://example.com/analytics/v1/history/recorded-checkout?locationId=string&start=2019-08-24&end=2019-08-24" \  -H "x-tenant-id: tenant-local" \  -H "x-tenant-slug: trellis-local"
{  "basis": "recorded-checkout-v1",  "sourceNamespace": "string",  "currentReportIncluded": true,  "financialReportingReady": false,  "recognizedRevenueReady": false,  "rows": [    {      "day": "2019-08-24",      "location": "string",      "source": "aloha",      "recordedCheckoutCents": 0,      "recordedCheckoutSourceDecimal": "string",      "monetaryPrecisionStatus": "string",      "availability": "string"    }  ]}