Order Management API

This API allows merchants to manage orders within the platform. Supported actions are get-all, create, and edit.

1. URL

https://api.tec.delivery/common/merchant/1.0/

2. Authentication

All requests must include a valid token parameter in the query string, form data, or JSON body. The token identifies the authenticated merchant session.

Token access:
You can obtain or refresh the API token in the admin panel:
Merchant → Select a Merchant → Settings → Token field

Parameters Transmission

Request parameters can be passed via GET, POST, or in the request body as RAW JSON. Any of these methods can be used, including a combination of them.

3. Field Reference

Field Type Required Description
order_id int No Order ID
external_id string No External order ID
user object Yes* Customer object
type int No 1 — delivery, 2 — pickup
destination_address multilang Yes* Delivery address in multiple languages
destination_coordinates object Yes** Delivery coordinates: { "lat": -58.3816, "lon":-34.6037 },
destination_info string No Additional delivery address information
comment string No Order comment
cost decimal No Items subtotal
discount decimal No Discount amount
bonus decimal No Bonus amount
promocode_amount decimal No Promo code discount amount
tips decimal No Tips amount
fee decimal No Service fee
vat decimal No Tax amount
delivery decimal No Delivery fee
payment_commission decimal No Payment commission
reserve decimal No Reserve amount
refund decimal No Refund amount
total decimal No Final total amount
order_status object / int No Order status
time_create datetime No Order creation datetime
time_finish datetime No Planned completion datetime
time_delivery datetime No Actual delivery datetime
courier object No Courier object
asap bool / int No 1 — ASAP, 0 — scheduled / preorder
cutlery int No Number of persons / cutlery sets
paid bool No Payment completed flag
paid_refund bool No Refund completed flag
pay_type object / int No Payment type
pay_link string No Payment URL
currency string No Currency code
cart array Yes* Order cart / list of items

User Field

Field Type Required Description
user object Yes Customer information associated with the order.
user.phone string Yes Customer phone number.
user.name string Yes Customer full name.
user.email string No Customer email address.

Cart Field

Field Type Required Description
cart array Yes List of items included in the order.
cart[].item object Yes Product object.
cart[].item.name multilang object Yes Product name in multiple languages.
cart[].item.description multilang object No Product description in multiple languages.
cart[].item.img string No Product image URL.
cart[].qty decimal Yes Quantity of the item.
cart[].price decimal Yes Price of one item unit.
cart[].discount decimal No Discount amount applied to this cart item.

* Required for order creation in a typical delivery flow. Exact validation rules depend on your business logic and merchant configuration.

** To create an order, it is mandatory to provide the exact coordinates of the destination location.

Multilang field value

If a string is provided, the same value is applied to all languages enabled in the company settings.
If an object is provided, values are assigned to the corresponding supported languages, and any missing languages are automatically filled with the last provided value.
Any language codes not enabled in the company settings are ignored.

 "destination_address": {
      "es": "Buenos Aires, Calle Falsa 123",
      "en": "Fake Street 123, Buenos Aires"
    }

4. Response Structure

{
  "auth": {
    "status": "OK",
    "merchant": {
      "id": 427,
      "company": 228,
      "country": {
        "currency_code": "ILS"
      }
    },
    "languages": [
      {
        "code": "ES",
        "name": "Español"
      },
      {
        "code": "EN",
        "name": "English"
      },
      {
        "code": "RU",
        "name": "Русский"
      }
    ]
  },
  "payload": {
    "status": "OK",
    "error": "",
    "data": [...]
  }
}
  • auth.status — authentication status, for example OK
  • auth.error — authentication error description if auth.status is ERROR
  • auth.merchant — authenticated merchant data
  • auth.languages — languages available for the merchant/company
  • payload.status — operation result: OK or ERROR
  • payload.error — operation error description if payload.status is ERROR
  • payload.request_id — API request ID (for example for webhook tracking)
  • payload.data — returned data object or array depending on the method

5. Selecting Specific Fields

By default, API methods return all available fields. You can limit the response by passing the fields parameter as an array of public field names.

Example Request

{
  "api": "order",
  "method": "get-all",
  "token": "...",
  "limit": 100,
  "offset": 0,
  "fields": ["order_id", "external_id", "order_status"]
}

Notes

  • fields must contain public field names exactly as shown in the Field Reference section.
  • If fields is not provided, all fields are returned.

6. Get Orders

Returns a flat list of merchant orders.

Request

Methods: GET / POST / RAW JSON body
URL: https://api.tec.delivery/common/merchant/1.0/

Parameters

Name Type Description Required
api string order Yes
method string get-all Yes
token string Authentication token Yes
limit integer Maximum number of orders to return (default: 20) No
offset integer Pagination offset (default: 0) No
fields array List of fields to return No
filter object Filter rules. See section 7. Filtering Results No

Example Request

{
  "api": "order",
  "method": "get-all",
  "token": "...",
  "limit": 50,
  "offset": 0,
  "fields": ["order_id", "external_id", "cart"],
  "filter": {
    "external_id": { "eq": "ext-1003" }
  }
}

Example Response

{
  "auth": {
    "status": "OK"
  },
  "payload": {
    "status": "OK",
    "error": "",
    "data": [
      {
        "order_id": 2289,
        "external_id": "ext-1003",
        "cart": [
          {
            "qty": 2,
            "price": 10.50,
            "total": 21.00
          }
        ]
      }
    ],
    "total": 1,
    "offset": false
  }
}

Notes:

  • offset = false means there is no next page.
  • fields limits the returned fields.

7. Filtering Results

The get-all method supports a universal filter object for SQL-like filtering.

Fields inside filter must use public field names.

Supported Operators

Operator Description Example
eq Equals "order_id":{"eq":10}
ne Not equals "paid":{"ne":1}
gt Greater than "total":{"gt":100}
gte Greater than or equal "total":{"gte":100}
lt Less than "total":{"lt":100}
lte Less than or equal "total":{"lte":100}
like SQL LIKE (use % manually) "external_id":{"like":"%1003%"}
in IN list "order_id":{"in":[1,2,3]}
nin NOT IN list "order_id":{"nin":[1,2,3]}
between Range "total":{"between":[10,50]}
is_null NULL check "external_id":{"is_null":true}

Simple AND Filter

{
  "filter": {
    "paid": { "eq": 1 },
    "total": { "gte": 10 }
  }
}

Result:

paid = 1 AND total >= 10

AND / OR Groups

{
  "filter": {
    "and": [
      { "paid": { "eq": 1 } },
      { "type": { "eq": 1 } }
    ],
    "or": [
      { "external_id": { "like": "%web%" } },
      { "comment": { "like": "%web%" } }
    ]
  }
}

Only OR

{
  "filter": {
    "or": [
      { "order_status": { "eq": 1 } },
      { "order_status": { "eq": 2 } }
    ]
  }
}

Full Example

{
  "api": "order",
  "method": "get-all",
  "token": "...",
  "limit": 50,
  "offset": 0,
  "fields": ["order_id", "external_id", "total", "paid"],
  "filter": {
    "and": [
      { "paid": { "eq": 1 } },
      { "total": { "between": [10, 50] } }
    ],
    "or": [
      { "external_id": { "is_null": false } },
      { "comment": { "like": "%promo%" } }
    ]
  }
}

Important Notes

  • Use % manually in LIKE expressions.
  • in: [] results in an always-false condition.
  • nin: [] results in an always-true condition.
  • For boolean values, using 0 / 1 is recommended.

8. Create Order

Creates a new order for the authenticated merchant.

Request

Methods: POST / RAW JSON body
URL: https://api.tec.delivery/common/merchant/1.0/

Parameters

Name Type Description Required
api string order Yes
method string create Yes
token string Authentication token Yes
fields array List of fields to return No
payload array Payload data yes

Example Request

{
  "api": "order",
  "method": "create",
  "token": "5486e371-631d-11f0-a416-fa163eed394d",
  "payload": {
    "external_id": "ext-1004",
    "user": {
      "phone": "+54 (911) 1234-5678",
      "name": "Juan Perez",
      "email": "juan@example.com"
    },
    "type": 1,
    "destination_address": {
      "es": "Buenos Aires, Calle Falsa 123",
      "en": "Fake Street 123, Buenos Aires"
    },
    "destination_coordinates": { "lat": -58.3816, "lon":-34.6037 },
    "destination_info": "Depto 4B, timbre Perez",
    "comment": "Sin cebolla por favor",
    "bonus": 10,
    "promocode_amount": 5,
    "tips": 2,
    "fee": 1.5,
    "vat": 3,
    "delivery": 4,
    "payment_commission": 0.5,
    "odd": 0,
    "promocode": "WELCOME",
    "tips_percent": 5,
    "order_status": null,
    "time_finish": "2026-03-19 20:00:00",
    "time_delivery": null,
    "delivery_time": 0,
    "asap": 1,
    "cutlery": 2,
    "platform": "ios",
    "ver": "1.0.0",
    "promocode_type": 1,
    "promocode_discount": 5,
    "currency": "ARS",
    "cart": [
      {
        "item": {
          "name": {
            "es": "Hamburguesa",
            "en": "Burger"
          },
          "description": {
            "es": "Carne con queso",
            "en": "Beef with cheese"
          },
          "img": "https://example.com/burger.jpg"
        },
        "qty": 2,
        "price": 10.5,
        "discount": 1.5
      },
      {
        "item": {
          "name": {
            "es": "Papas fritas",
            "en": "Fries"
          },
          "description": {
            "es": "Papas crujientes",
            "en": "Crispy fries"
          },
          "img": "https://example.com/fries.jpg"
        },
        "qty": 1,
        "price": 5,
        "discount": 0
      }
    ]
  }
                }

Notes

  • The exact validation of nested fields depends on your merchant setup and integration rules.
  • For delivery orders, address and coordinates are usually required.
  • Returned data may include more fields depending on implementation.

9. Edit Order

Updates an existing order.

Request

Methods: POST / RAW JSON body
URL: https://api.tec.delivery/common/merchant/1.0/

Parameters

Name Type Description Required
api string order Yes
method string edit Yes
token string Authentication token Yes
fields array List of fields to return No
payload array Payload data yes

* At least one order identifier is typically required: order_id or external_id, depending on implementation.

Example Request

{
  "api": "order",
  "method": "edit",
  "token": "5486e371-631d-11f0-a416-fa163eed394d",
  "fields": ["order_status"],
  "payload": {
     "external_id": "ext-1003",
     "order_status": 4
  }
}

Notes

  • Only the passed fields are updated.
  • Editable fields depend on your business logic, order status, and integration restrictions.
  • If an order is not found or cannot be changed, the API returns payload.status = "ERROR".