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: OK or ERROR.
  • 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

FieldTypeWritableDescription
group_idintegerNoInternal group ID.
external_group_idstring / nullYesExternal group ID. Unique within the company; values longer than 50 characters are truncated.
companyintegerNoCompany ID.
titleobjectYesGroup title keyed by language code, for example {"EN":"Lunch","ES":"Almuerzo"}.
descriptionobjectYesGroup description keyed by language code.
productarrayYesProducts assigned to the group. See Product References.
statusintegerYesGroup status. Defaults to 1 when a group is created.
date_createdatetimeNoCreation timestamp.
date_updatedatetimeNoLast update timestamp.
creatorintegerNoID of the creator.
imgstring / object / nullYesStored image reference in responses; image URL or processing options in write requests. Output size is 100×100 px.
sizeintegerYesDisplay size setting.
scrollintegerYesScrolling/display behavior setting.
colorobject / array / nullYesGroup color configuration stored as JSON.
btn_colorobject / array / nullYesButton color configuration stored as JSON.
multibuybooleanYesEnables multibuy pricing.
multibuy_quantitydecimalYesQuantity required for the multibuy offer.
multibuy_pricedecimalYesMultibuy price.
multibuy_date_startdatetime / nullYesOffer start in YYYY-MM-DD HH:MM:SS format.
multibuy_date_finishdatetime / nullYesOffer 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 fields is 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

NameTypeDescriptionRequired
apistringgroupYes
methodstringget-allYes
tokenstringCompany authentication token.Yes
limitintegerPage size. Default: 500; minimum: 1; maximum: 1000.No
offsetintegerStarting offset. Default: 0.No
fieldsarrayFields to return.No
filterobjectFilter 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

NameTypeDescriptionRequired
apistringgroupYes
methodstringget-groupYes
tokenstringCompany authentication token.Yes
group_idintegerInternal group ID.One identifier is required
idintegerAlias of group_id.One identifier is required
external_group_idstringExternal group ID.One identifier is required
fieldsarrayFields 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

OperatorDescriptionExample
eqEquals"status":{"eq":1}
neNot equal"status":{"ne":0}
gtGreater than"size":{"gt":1}
gteGreater than or equal"group_id":{"gte":100}
ltLess than"group_id":{"lt":500}
lteLess than or equal"size":{"lte":3}
likePattern match; include % wildcards explicitly"external_group_id":{"like":"lunch%"}
inValue is in a list"group_id":{"in":[1,2,3]}
ninValue is not in a list"status":{"nin":[0,2]}
betweenInclusive range"group_id":{"between":[100,200]}
is_nullNULL 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 0 or 1.
  • 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

NameTypeDescriptionRequired
apistringgroupYes
methodstringput-group or put-groupsYes
tokenstringCompany authentication token.Yes
payloadobject / arrayGroup data.Yes
languagestringLanguage code used when title or description is a plain string.No
fieldsarrayFields to return for each saved group.No
webhookstringCallback 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-group and put-groups update a matching group_id or external_group_id; otherwise they create a new group.
  • create always creates a new group and ignores a supplied group_id.
  • edit requires 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_id must 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.
  • scale must be greater than 0 and at most 1; invalid values fall back to 0.8.
  • Set img to null or an empty string to clear it.
  • Image processing is asynchronous. The write response includes request_id; a supplied webhook is 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 MethodAccepted Aliases
put-group / put-groupscreate, edit
delete-group / delete-groupsdelete

Common Errors

ErrorCause
Unknown group methodThe method value is missing or unsupported.
Group ID not specifiedA method requiring an identifier received neither group_id nor external_group_id.
Group not foundThe requested group could not be resolved for the authenticated company.
Incorrect payloadpayload is missing or is not an object/array.
Payload is emptyAn empty array was supplied to a write method.
Group payload item must be an objectAn item in a write payload is not a JSON object.