# ТК «Луч»

AI for Ural freight: TK Luch quotes and shipment orders in chat

Грузоперевозки по Уралу: расчёт стоимости, заявки на перевозку, статусы грузов

## How the agent works with ТК «Луч»

The agent works with the OTR-API of the Luch transport company: it reads the directories of cities, services and packaging, prices a shipment on the company calculator, creates freight orders and pulls their status, amounts due and warehouse movement history. Coverage matches the company itself: the whole Urals (the Chelyabinsk, Sverdlovsk, Tyumen, Kurgan and Orenburg regions, Perm Krai, Bashkortostan, Udmurtia), Tatarstan and Samara, KhMAO and YaNAO, Strezhevoy and Kazakhstan. The agent takes the exact list of points from the company directory every time.

A city in an order is not a string but an identifier from the directory, and remote areas are listed there as «Village (City)». So the agent first finds the city in the directory and only then prices or files the order, and for a quote it asks you for the weight, the dimensions of every place and the declared value of the cargo. It does not invent dimensions: the price depends on volume, and an invented box gives an invented total.

Anything that spends money the agent first shows in full: route, cargo places, services, who pays and how. The order goes to TK Luch only after your confirmation. The company accepts same-day pickup orders until 15:00 Chelyabinsk time, and the agent warns you when that time has passed and the pickup will move to the next day.

The connection rests on a pair of tokens, X-User and X-Token, issued by the system developer, OTR IT. The agent signs every request to the B2B part with them, while the calculator receives only the identifier and never the secret token. When a value is missing from a response the agent says so directly instead of showing an empty table.

## Integration scenarios

### A freight quote in a minute
The agent prices a shipment between Ural cities by weight, dimensions and declared value, including pickup, door delivery and packaging.

### A shipment order
The agent assembles an order with sender, consignee, cargo places and services, shows it in full and sends it to TK Luch after you confirm.

### Where the cargo is now
The agent pulls the status and warehouse movement history for every order and sends a summary: what is in transit, what arrived and what awaits payment.

### Orders for a period
The agent exports the orders sent over a month with cities, consignees and statuses and lays them out in a table to reconcile against your shipments.

### City check before shipping
The agent checks a city or remote area against the TK Luch directory and tells you where pickup or delivery is mandatory and what the weight limits are.

### A draft forwarding order for EDI
The agent fetches the XML draft of the forwarding instruction for an order, so you can sign it in your EDI system without filling it in by hand.

## How to connect

**Before you connect**

- X-User and X-Token from OTR IT (request at Info@otr-it.ru)
- Your confirmation before a freight order is created

### Email OTR IT at Info@otr-it.ru
The request to connect to the TK Luch API is free-form. OTR IT usually sets up a working Telegram chat with your team.

### Receive the X-User and X-Token tokens
Both tokens arrive in the working chat and look like UUIDs. The same pair works for the test stand and the production API.

### Check your contract with TK Luch
Orders placed through the API are filed under the organisation the account is tied to. Ask your manager who pays and which payment method the contract uses.

## FAQ

### How do I connect TK Luch?
With the X-User and X-Token pair. OTR IT issues them on a free-form request to Info@otr-it.ru, usually through a working Telegram chat. The tokens are the same for the test stand and the production API.

### What can the agent see in TK Luch?
Directories of cities, services and packaging, freight quotes, orders sent over a period, the status and history of every shipment, amounts due and the draft forwarding instruction.

### Does the agent write to TK Luch?
Yes, the agent creates freight orders, and it shows each one to you and sends it only after confirmation. Everything else is quoting and reading statuses.

### Where does TK Luch deliver?
Across the Urals and neighbouring regions: the Chelyabinsk, Sverdlovsk, Tyumen, Kurgan, Orenburg and Samara regions, Perm Krai, Bashkortostan, Tatarstan, Udmurtia, KhMAO, YaNAO, Strezhevoy in the Tomsk region and Kazakhstan. The exact list of cities and remote areas, about 960 points, the agent takes from the company directory.

[Open ТК «Луч»](https://sites.google.com/view/luch-api/otr-api)
