Flavoso APIGetting startedTools

Tools

The console with request log, API explorer, webhook deliveries and test tokens, plus the OpenAPI specification and a Postman collection.

The console

The console lives at app.flavoso.com/en/developers. It only needs a Flavoso account, no restaurant and no subscription. Every app has these areas:

AreaWhat is there
OverviewThe app's status, next steps, recent activity.
CredentialsClient ID, renewing the client secret, editing the redirect URIs, “Create test token”, the sign-in addresses.
WebhooksAddress, events, signing secret, every delivery with every attempt, “Resend”, “Send a test event”, deleting the webhook.
LogsEvery request of your app in the last 14 days, with filters and a search by request id.
API explorerRun any operation against your test restaurant, with ready-made code next to it.
ConnectionsWhich restaurants have connected your app.
ReviewSubmitting, the status of the review, the reason.
SettingsName, description, logo, website, privacy policy, support e-mail, scopes, app directory entry, deleting the app.

Next to them are the test restaurant with its tools, shared by all your apps, and the setup until it is complete.

Request log

Every request of your app that carries a valid token stays in the log for 14 days: time, restaurant, method, path, operation (operationId), query, status, duration, X-Request-Id, error code, Idempotency-Key and User-Agent. It can be filtered by status, method, path, restaurant, period and “Test restaurant only”; the detail view shows a whole request.

For the test restaurant, the request and response bodies are stored as well (up to 16,000 characters). For real restaurants, never: they contain names, phone numbers and addresses of guests. Headers are not stored, so no token either.

When your program reports an error, look up the response's X-Request-Id in the log: it shows what arrived.

API explorer

The API explorer runs any operation from the specification against your test restaurant. It gets the token itself, valid for 15 minutes. You pick the operation, fill in parameters and body, and see the response with its headers, plus the same call as curl, Node.js, Python and PHP to copy.

What you do there is real: an accepted test order is accepted, and events go to your webhook.

Webhook deliveries

Under Webhooks you find every delivery, filterable by status, type, restaurant and period. The detail view shows the envelope, the headers sent including the signature, and every attempt: time, automatic or manual, HTTP status, duration, error and the beginning of your server's response (up to 2,000 characters).

“Resend” sends a delivery again, with the same envelope and the same event id; it does not count against the automatic attempts. “Send a test event” sends any type with data from your test restaurant. More under Webhooks.

Test token

“Create test token” under Credentials issues an access token and a refresh token for your test restaurant, without a detour through the browser. The access token is valid for one hour and carries your app's scopes; you can narrow it to fewer. The refresh token is valid for 180 days from its last use and is replaced on every use; you refresh at the token endpoint, with your app's client authentication. The console shows both tokens exactly once. For a real restaurant there is no test token: there the owner decides.

OpenAPI specification

The whole API as OpenAPI 3.1, without authentication: https://api.flavoso.com/v1/openapi.json. Every operation has an operationId, descriptions, schemas with examples and error responses; webhooks are listed under webhooks. This documentation builds its reference from it.

Generate clients and types straight from the specification:

# The specification, without authentication
curl https://api.flavoso.com/v1/openapi.json -o flavoso-openapi.json

# Only the TypeScript types, no runtime (openapi-typescript)
npx openapi-typescript https://api.flavoso.com/v1/openapi.json -o flavoso-api.d.ts

# A complete client, e.g. Python (openapi-generator, needs Java)
npx @openapitools/openapi-generator-cli generate \
  -i https://api.flavoso.com/v1/openapi.json \
  -g python -o ./flavoso-client

Postman

https://api.flavoso.com/v1/postman.json is a Postman collection (v2.1) with every request, built from the specification. It has two variables: baseUrl and accessToken.

# The Postman collection (v2.1), built from the specification
curl https://api.flavoso.com/v1/postman.json -o flavoso.postman_collection.json

# In Postman: Import › Link › https://api.flavoso.com/v1/postman.json
# Then set the collection variable accessToken to a test token (flv_at_...).
# baseUrl is preset to https://api.flavoso.com/v1

For language models

https://flavoso.com/llms.txt lists the documentation, the specification and the Postman collection in a form language models can read. If an assistant writes code for you, give it the specification.

Still unclear? Write to support@flavoso.com and include the id from X-Request-Id. It lets us find your request in the log.