Sending data for connected companies
Your product collects sustainability data for the companies that use it, such as food waste, energy or purchasing, and you want that data on each company's BeCause profile without anyone retyping it. The company connects your product from inside BeCause and hands you an access token. From then on you send its data whenever you have it, as answers to BeCause data points.
This page covers the whole job: the connection, checking it, sending answers, and what to do when a send fails.
A hotel, restaurant, venue or any other establishment is a company in the BeCause API, here as in every other endpoint. The two words mean the same thing.
Unlike most of the API, these two endpoints are synchronous: a send is either stored or rejected before the response comes back. There is no correlation id to poll.
Before you start
- An API key, created on your own BeCause profile. Getting started covers creating one.
- The data points you will answer. We agree the list with you when you start: each data point's id, its type and, for list data points, the options it accepts. Send only these: a request containing any other data point is rejected as a whole, and nothing in it is stored.
- Unit ids, for number data points that are measured in a unit, from
GET /api/v1/unit-types.
Two credentials
Every request carries two headers:
| Header | What it is | Where it comes from |
|---|---|---|
Authorization | Your API key | You create it on your BeCause profile. |
X-Company-Access-Token | The company's access token for your product | The company generates it in BeCause and pastes it into your product. |
The API key says who you are, and the token says which company you are sending for. Send the API key as it is, with no prefix: Authorization: YOUR_API_KEY, not Bearer YOUR_API_KEY.
Each token stands for exactly one company and one integration: yours. The company can revoke it from BeCause at any time. Treat tokens like your API key: keep them server-side and out of logs.
1. The company connects
On BeCause, the company opens Solution providers, picks your product and selects Connect. BeCause shows it an access token, which it pastes into your product. Where in your product it pastes the token is up to you.
2. Check the connection
Call GET /api/v2/connected-company as soon as a token is pasted. It returns the company the token belongs to, so you can show "Connected to BeCause: Hotel Alexandra" right away, and catch a mistyped token before the first send.
curl https://api.because.eco/api/v2/connected-company \
-H "Authorization: YOUR_API_KEY" \
-H "X-Company-Access-Token: COMPANY_ACCESS_TOKEN"
{
"name": "Hotel Alexandra",
"connectedAtUtc": "2026-09-25T09:14:00Z",
"lastAnswersReceivedAtUtc": null
}
| Field | Meaning |
|---|---|
name | The company's name on BeCause. |
connectedAtUtc | When the company generated this token. |
lastAnswersReceivedAtUtc | When answers sent with this token were last stored; null until your first successful send. |
A 403 means the token is unknown or has been revoked: ask the company to connect again.
3. Send answers
POST /api/v2/connected-company/answers sends one company's data as a list of answers. Each answer is one data point's value for one period. Two months of food waste:
curl -X POST https://api.because.eco/api/v2/connected-company/answers \
-H "Authorization: YOUR_API_KEY" \
-H "X-Company-Access-Token: COMPANY_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d @answers.json
{
"answers": [
{
"dataPointId": "7a5d14d9-1c2b-4e5f-8a9b-0c1d2e3f4a5b",
"periodType": "Monthly",
"year": 2026,
"month": "July",
"answer": { "number": 388.0 },
"unitId": "c0a80f2e-6b1d-4c3a-9e7f-2d4b6a8c0e1f"
},
{
"dataPointId": "7a5d14d9-1c2b-4e5f-8a9b-0c1d2e3f4a5b",
"periodType": "Monthly",
"year": 2026,
"month": "August",
"answer": { "number": 412.5 },
"unitId": "c0a80f2e-6b1d-4c3a-9e7f-2d4b6a8c0e1f"
}
]
}
A successful send returns how many answers were stored:
{ "requestId": "8f2c4e1a-5b6d-4f7e-9a8b-1c2d3e4f5a6b", "accepted": 2 }
One answer per data point and period
| Field | Required | Meaning |
|---|---|---|
dataPointId | Yes | The data point you are answering. |
periodType | Yes | Monthly or Yearly. |
year | Yes | The year the period starts in. |
month | For Monthly | January to December. |
answer | Yes | The value. See Answer values. |
unitId | When the data point has units | The unit answer.number is in, from GET /api/v1/unit-types. |
The period types:
Monthlyis a calendar month:monthofyear.Yearlyis a twelve-month total starting atmonthofyear. Withoutmonthit starts in January, which makes it a calendar year. A fiscal year running from April 2025 to March 2026 is"periodType": "Yearly", "year": 2025, "month": "April".
Which period type a data point takes is part of what we agree with you. Answers can come in any order, but each data point may appear only once per period in a request.
Answer values
Set exactly one field in answer, the one that matches the data point's type:
| Data point type | Field | Example |
|---|---|---|
| Number | number | { "number": 412.5 } |
| Text | text | { "text": "Composted on site" } |
| Yes/no | boolean | { "boolean": true } |
| Choice from a list | list | { "list": ["1-10%"] } |
| Date | dateIso | { "dateIso": "2026-03-31" } |
| Date range | dateRangeFromDateIso and dateRangeToDateIso | { "dateRangeFromDateIso": "2026-01-01", "dateRangeToDateIso": "2026-06-30" } |
| File | text, as the file's URL | { "text": "https://example.com/report.pdf" } |
- Numbers are JSON numbers (
412.5), not strings ("412.5"). - Dates are
yyyy-MM-dd. A date range sends both ends, and its last day is included. - List answers name the chosen options, either all by label or all by id; don't mix the two in one answer. Send one option for a single-choice data point, and several for a multi-choice one.
List options by label or by id
An element shaped like an id, 7a5d14d9-1c2b-4e5f-8a9b-0c1d2e3f4a5b, is read as an option id; anything else is read as a label. Labels match ignoring case, surrounding and repeated spaces and the kind of dash, so 1-10% matches 1–10%.
Labels are stable in practice, but could potentially change. Only ids are guaranteed never to change. If a label stops matching, the request is rejected, nothing is stored, and the error names the labels the data point accepts. If you would rather never handle that case, send ids.
How sending behaves
- Resending is safe. An answer replaces the earlier one for the same data point and period, and anything you leave out keeps its value. Retrying a request that timed out does no harm.
- Send only what you have.
0is stored as zero. Leave out a data point you have no value for instead of sending0. There is no way to remove a value; send the corrected one instead. - All or nothing. If any answer in a request is invalid, nothing from that request is stored, and the response lists every problem.
- The most recent value wins. If the company edits a value you sent, its edit shows until you send a newer one. The company sees your product named as the source of what you send.
- Answers from a certifier are verified. If your profile on BeCause is a certifier, the answers you send are stored as verified, and the company sees them as verified. Answers from every other partner are stored as unverified. A value the company edits afterwards is its own and is unverified. The company can also add figures of its own beside yours for the same data point and period; the sum is then no longer what you sent, and is unverified.
- One company per request. To send for many companies, send one request per company.
- Unknown fields are ignored, so a field this page doesn't describe has no effect.
When a send fails
Every error comes back in the usual error envelope, with errorCode to branch on:
| Status | errorCode | What to do |
|---|---|---|
400 | integration/input-invalid | Fix the answers listed in errors and resend. Nothing was stored. |
400 | integration/input-missing | Send the X-Company-Access-Token header. |
400 | integration/connected-company/request-too-large | The request carries too many answers. Split them over several requests. |
401 | integration/authentication | Check your API key. It is checked before anything else in the request. |
403 | integration/connected-company/token-invalid | The token is unknown or revoked. Stop sending with it and ask the company to connect again. |
429 | integration/rate-limited | Wait the number of seconds in the Retry-After header, then continue. See Rate limit. |
A validation failure lists every problem in errors, each identified by data point and period:
{
"errorCode": "integration/input-invalid",
"message": "2 answers failed validation.",
"errors": [
{
"dataPointId": "7a5d14d9-1c2b-4e5f-8a9b-0c1d2e3f4a5b",
"periodType": "Monthly",
"year": 2026,
"month": "August",
"reason": "InvalidUnit",
"message": "Unit 'kg' is not valid for this data point."
},
{
"dataPointId": "a3741731-2d4e-4f6a-8b9c-0d1e2f3a4b5c",
"periodType": "Monthly",
"year": 2026,
"month": "August",
"reason": "ValueTypeMismatch",
"message": "Expected a number."
}
]
}
reason is a stable code, such as MonthRequired, DuplicateDataPoint, InvalidUnit, ValueTypeMismatch or DataPointNotInCatalog. DataPointNotInCatalog means the data point is outside the list agreed with you. message explains it in words that may change, so don't parse it. A Yearly answer sent without month is reported with "month": "January", the month it is stored under.
The request's structure is checked before its values: a Monthly answer without month, or the same data point twice for one period, is reported on its own, and the values are checked once the structure is valid. Data points outside the list agreed with you are reported before the values are checked, so a request with both kinds of problem reports them in two responses.
Rate limit
You can make 600 requests per minute, counted per partner across all your API keys. A request over the limit gets 429 with a Retry-After header in seconds; wait that long and continue. Rate limits has the details.
Getting help with a request
Every response carries an X-Request-Id header, and a successful send also returns it as requestId in the body. Quote it when you contact support@because.eco about a request, so we can find exactly that request.