Company Group Management API
This API allows a company to list, retrieve, create, update, and delete groups. A group can contain multilingual content, product references, display settings, and multibuy configuration.
URL
https://api.tec.delivery/common/company/1.0/
GET and POST requests are supported. For requests with structured data, send a raw JSON body with Content-Type: application/json.
Authentication
Every request must include a valid company token in the query string or JSON body. The token identifies the company and determines the available languages.
Use the token assigned to the company. Contact the company administrator if a token must be issued or refreshed.
Response Structure
{
"auth": {
"status": "OK",
"company": {
"id": 228,
"lang": "[...]",
"country": {"currency_code": "USD"}
},
"languages": [
{"code": "EN", "name": "English"},
{"code": "ES", "name": "Español"}
]
},
"payload": {
"status": "OK",
"error": "",
"data": []
},
"time": {"execution": 12.34}
}
auth.status— authentication result.auth.company— authenticated company data.auth.languages— languages configured for the company.payload.status— operation result:OKorERROR.payload.error— error message when the operation fails.payload.data— a group object or an array of groups, depending on the method.time.execution— server execution time in milliseconds.
Write methods also return payload.request_id. List responses include payload.total and the next payload.offset; the next offset is false on the last page.
Field Reference
| Field | Type | Writable | Description |
|---|---|---|---|
| group_id | integer | No | Internal group ID. |
| external_group_id | string / null | Yes | External group ID. Unique within the company; values longer than 50 characters are truncated. |
| company | integer | No | Company ID. |
| title | object | Yes | Group title keyed by language code, for example {"EN":"Lunch","ES":"Almuerzo"}. |
| description | object | Yes | Group description keyed by language code. |
| product | array | Yes | Products assigned to the group. See Product References. |
| status | integer | Yes | Group status. Defaults to 1 when a group is created. |
| date_create | datetime | No | Creation timestamp. |
| date_update | datetime | No | Last update timestamp. |
| creator | integer | No | ID of the creator. |
| img | string / object / null | Yes | Stored image reference in responses; image URL or processing options in write requests. Output size is 100×100 px. |
| size | integer | Yes | Display size setting. |
| scroll | integer | Yes | Scrolling/display behavior setting. |
| color | object / array / null | Yes | Group color configuration stored as JSON. |
| btn_color | object / array / null | Yes | Button color configuration stored as JSON. |
| multibuy | boolean | Yes | Enables multibuy pricing. |
| multibuy_quantity | decimal | Yes | Quantity required for the multibuy offer. |
| multibuy_price | decimal | Yes | Multibuy price. |
| multibuy_date_start | datetime / null | Yes | Offer start in YYYY-MM-DD HH:MM:SS format. |
| multibuy_date_finish | datetime / null | Yes | Offer finish in YYYY-MM-DD HH:MM:SS format. |
Datetime input may also use YYYY-MM-DDTHH:MM or YYYY-MM-DD HH:MM; seconds are added automatically.
Selecting Specific Fields
By default, read and write methods return every field. Pass fields as an array of public field names to limit each returned object.
{
"api": "group",
"method": "get-all",
"token": "...",
"fields": ["group_id", "external_group_id", "title", "status"]
}
- Unknown field names are ignored.
- If
fieldsis omitted, all fields are returned. - If no requested field is valid, an empty object is returned for each matching list item; pagination metadata is preserved.
1. Get All Groups
Returns a paginated list of groups owned by the authenticated company, ordered by group_id.
Request
Methods: GET / POST
URL: https://api.tec.delivery/common/company/1.0/?api=group&method=get-all&token={token}&limit={limit}&offset={offset}
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| api | string | group | Yes |
| method | string | get-all | Yes |
| token | string | Company authentication token. | Yes |
| limit | integer | Page size. Default: 500; minimum: 1; maximum: 1000. | No |
| offset | integer | Starting offset. Default: 0. | No |
| fields | array | Fields to return. | No |
| filter | object | Filter expression. See Filtering Results. | No |
Response Example
{
"status": "OK",
"error": "",
"data": [
{
"group_id": 42,
"external_group_id": "lunch-specials",
"title": {"EN": "Lunch specials", "ES": "Especiales de almuerzo"},
"status": 1
}
],
"total": 1,
"offset": false
}
2. Get Group Details
Returns one group. Identify it by group_id (the id alias is also accepted) or external_group_id.
Request by Internal ID
https://api.tec.delivery/common/company/1.0/?api=group&method=get-group&token={token}&group_id=42
Request by External ID
https://api.tec.delivery/common/company/1.0/?api=group&method=get-group&token={token}&external_group_id=lunch-specials
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| api | string | group | Yes |
| method | string | get-group | Yes |
| token | string | Company authentication token. | Yes |
| group_id | integer | Internal group ID. | One identifier is required |
| id | integer | Alias of group_id. | One identifier is required |
| external_group_id | string | External group ID. | One identifier is required |
| fields | array | Fields to return. | No |
3. Filtering Results
The get-all method supports a filter object. Filter keys must be public field names from the Field Reference.
Supported Operators
| Operator | Description | Example |
|---|---|---|
| eq | Equals | "status":{"eq":1} |
| ne | Not equal | "status":{"ne":0} |
| gt | Greater than | "size":{"gt":1} |
| gte | Greater than or equal | "group_id":{"gte":100} |
| lt | Less than | "group_id":{"lt":500} |
| lte | Less than or equal | "size":{"lte":3} |
| like | Pattern match; include % wildcards explicitly | "external_group_id":{"like":"lunch%"} |
| in | Value is in a list | "group_id":{"in":[1,2,3]} |
| nin | Value is not in a list | "status":{"nin":[0,2]} |
| between | Inclusive range | "group_id":{"between":[100,200]} |
| is_null | NULL check | "external_group_id":{"is_null":false} |
Simple AND Filter
{
"api": "group",
"method": "get-all",
"token": "...",
"filter": {
"status": {"eq": 1},
"group_id": {"gte": 100}
}
}
AND / OR Groups
{
"filter": {
"and": [
{"status": {"eq": 1}},
{"group_id": {"between": [100, 200]}}
],
"or": [
{"external_group_id": {"like": "lunch%"}},
{"external_group_id": {"like": "dinner%"}}
]
}
}
in: []always matches nothing.nin: []always matches.- Boolean values are converted to
0or1. - Unknown fields and unsupported operators are ignored.
4. Create / Update Groups
Method: POST
URL: https://api.tec.delivery/common/company/1.0/
Send the request as raw JSON. The payload may be one group object or an array of group objects.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| api | string | group | Yes |
| method | string | put-group or put-groups | Yes |
| token | string | Company authentication token. | Yes |
| payload | object / array | Group data. | Yes |
| language | string | Language code used when title or description is a plain string. | No |
| fields | array | Fields to return for each saved group. | No |
| webhook | string | Callback URL associated with asynchronous image processing. | No |
Create Example
{
"api": "group",
"method": "put-group",
"token": "...",
"language": "EN",
"payload": {
"external_group_id": "lunch-specials",
"title": {
"EN": "Lunch specials",
"ES": "Especiales de almuerzo"
},
"description": "Available on weekdays",
"product": [101, {"external_id": "combo-2"}],
"status": 1,
"size": 2,
"scroll": 1,
"color": {"background": "#ffffff", "text": "#222222"},
"btn_color": {"background": "#ff887a", "text": "#ffffff"},
"multibuy": true,
"multibuy_quantity": 2,
"multibuy_price": 19.90,
"multibuy_date_start": "2026-09-15 09:00:00",
"multibuy_date_finish": "2026-09-30 23:59:59"
}
}
Update Example
{
"api": "group",
"method": "put-groups",
"token": "...",
"fields": ["group_id", "external_group_id", "title", "status"],
"payload": [
{
"group_id": 42,
"title": {"EN": "Updated lunch specials"},
"status": 1
},
{
"external_group_id": "dinner-specials",
"title": {"EN": "Dinner specials"}
}
]
}
Upsert Behavior
put-groupandput-groupsupdate a matchinggroup_idorexternal_group_id; otherwise they create a new group.createalways creates a new group and ignores a suppliedgroup_id.editrequires an identifier and fails if the group does not exist.- Only fields present in an item are changed. Read-only fields are ignored.
external_group_idmust be unique within the company.
Multilingual Fields
title and description accept either a language object or a plain string. When a plain string is used, language selects its language; otherwise the first company language is used, falling back to EN.
{
"language": "EN",
"payload": {
"title": "Lunch specials",
"description": {
"EN": "Available on weekdays",
"ES": "Disponible entre semana"
}
}
}
The saved multilingual object contains every language configured for the company. Missing translations are stored as empty strings.
Product References
The product field must be an array. Each product can be identified by an internal menu_id or by an external_id.
{
"product": [
101,
"external-product-id",
{"menu_id": 102},
{"external_id": "another-external-id"}
]
}
All referenced products must belong to a merchant in the authenticated company. An external_id must resolve to exactly one company product; if it is ambiguous, use menu_id.
Response Format
{
"product": [
{"menu_id": 101, "external_id": "external-product-id"},
{"menu_id": 102, "external_id": null}
]
}
Duplicate product references are removed. References to products no longer available to the company are omitted from responses.
Image Processing
The img field accepts a publicly accessible image URL as a string:
{"img": "https://example.com/group.png"}
It also accepts an object with processing options:
{
"img": {
"url": "https://example.com/group.png",
"resize": true,
"bgcolor": "#ffffff",
"transparent": false,
"scale": 0.8,
"remove_background": false,
"auth": {
"type": "Bearer",
"token": "source-image-access-token"
}
}
}
- The generated group image is 100×100 px.
scalemust be greater than 0 and at most 1; invalid values fall back to0.8.- Set
imgtonullor an empty string to clear it. - Image processing is asynchronous. The write response includes
request_id; a suppliedwebhookis associated with that request.
5. Delete Groups
Method: POST
URL: https://api.tec.delivery/common/company/1.0/
Delete one or more groups using internal or external identifiers. The payload may contain numbers, numeric strings, external ID strings, or objects with group_id, id, or external_group_id.
Delete by Internal IDs
{
"api": "group",
"method": "delete-groups",
"token": "...",
"payload": [42, 43]
}
Delete by Mixed Identifiers
{
"api": "group",
"method": "delete-groups",
"token": "...",
"payload": [
{"group_id": 42},
{"external_group_id": "dinner-specials"},
"lunch-specials"
]
}
Response Example
{
"status": "OK",
"error": "",
"request_id": 317,
"deleted": [42, 43]
}
Only groups found in the authenticated company are deleted and included in deleted. Duplicate identifiers are removed.
Warning: Deletion is permanent. Verify identifiers before sending the request.
Errors and Method Aliases
| Primary Method | Accepted Aliases |
|---|---|
put-group / put-groups | create, edit |
delete-group / delete-groups | delete |
Common Errors
| Error | Cause |
|---|---|
Unknown group method | The method value is missing or unsupported. |
Group ID not specified | A method requiring an identifier received neither group_id nor external_group_id. |
Group not found | The requested group could not be resolved for the authenticated company. |
Incorrect payload | payload is missing or is not an object/array. |
Payload is empty | An empty array was supplied to a write method. |
Group payload item must be an object | An item in a write payload is not a JSON object. |