List the cost centers (restaurants) the user has access to.
GET /orderCenters
Before you start
Base URL: https://app.tspoonlab.com/recipes/api
Headers
rememberme· required — Session token returned by the login.
Each center's idOrderCenter is the value you send in the order header on every other call. If you don't send it, the user's active cost center is used.
Login — Returns the token as plain text.
curl https://app.tspoonlab.com/recipes/api/login \
-d [email protected] \
-d password=XXXXXXX
Permissions — Permission to view centers.
Responses may include fields other than the documented ones. Use only the documented fields.
List cost centers
Returns the user's cost centers sorted by name. Hidden centers are not included.
GET /orderCenters
Example
curl https://app.tspoonlab.com/recipes/api/orderCenters \
-H "rememberme: $TOKEN"
Response
[
{
"id": "3515834441676562996102020101",
"idOrderCenter": "3515834441676562996102020102",
"descr": "Downtown Restaurant",
"active": true,
"culture": "es-ES",
"country": "es",
"currency": "€",
"codi": "DR",
"name": "Downtown Dining S.L.",
"nif": "B12345678",
"address": "Carrer Major, 12",
"cp": "17001",
"city": "Girona",
"mail": "[email protected]",
"telfs": "972 000 000",
"mailText": "Good morning, please find our order attached.",
"mailSignature": "Purchasing department",
"decimalsCurrencyShort": 2,
"decimalsCurrencyLong": 4
}
]
idstring — Id of the user/cost-center relationship.idOrderCenterstring — Cost center id. This is the value of theorderheader.descrstring — Center name.activeboolean — Whether it is the user's active cost center.culturestring — Center language and country, for examplees-ES.countrystring — Lowercase country code, for examplees.currencystring — Currency symbol, for example€.codistring — Center code.name,nif,address,cp,citystring — Identifying details: name, tax id, address, postcode and city.mail,telfsstring — Email and phone numbers.mailTextstring — Text of purchase order emails to suppliers.mailSignaturestring — Signature of those emails.decimalsCurrencyShortinteger — Decimals for amounts of 1 or more (absolute value). If the center has no setting, 2.decimalsCurrencyLonginteger — Decimals for amounts under 1. If the center has no setting, 4.
Need help? Message us from the support chat in the bottom-right corner.
