Demander API - Routes and Route Customers
This article is part of the REST Integration API documentation.
Documentation for querying, inserting, updating and deleting routes and route customers.
Routes
Route Query
Section titled “Route Query”Lists the company’s routes. Without filter, considers dataAlteracao from the last 6 months.
Rota: {host}/public/v1/rotas?filtroDataAlteracao={data}&operadorFiltro={operador}Método: GETReturn:
[ { "codigo": 100, "codVendedor": 78123, "descricao": "RT LAJEADO", "ativo": 1, "dataAlteracao": "2025-06-01 14:30:00" }]Insert or update Route
Section titled “Insert or update Route”POST upsert by key codigo + codVendedor.
Rota: {host}/public/v1/rotasMétodo: POSTBody: json| Property | Type | Size | Mandatory | Description |
|---|---|---|---|---|
| code | int | ✓ | Route code. Upsert key part with codVendedor. |
|
| codVendedor | int | ✓ | Route seller code. Part of the upsert key. | |
| description | string | 100 | ✓ | Route name. |
| active | int | Values: 0 or 1. Default on inclusion: 1. |
Body:
{ "codigo": 100, "codVendedor": 78123, "descricao": "RT LAJEADO", "ativo": 1}Return:
{ "codigo": 100, "codVendedor": 78123, "descricao": "RT LAJEADO", "ativo": 1, "dataAlteracao": "2025-06-02 10:00:00"}Delete Route
Section titled “Delete Route”Removes the route and the customers linked to it.
Rota: {host}/public/v1/rotas?codigo={codigo}&codVendedor={codVendedor}Método: DELETEReturn:
{ "mensagem": "Registro excluído com sucesso."}Rota Customers
Rota Customer Consultation
Section titled “Rota Customer Consultation”Lists customers linked to a route.
Rota: {host}/public/v1/rotas/clientes?codRota={codRota}&codVendedor={codVendedor}Método: GETReturn:
[ { "codRota": 100, "cpfCNPJCliente": "261.840.230-80", "codCliente": 64068, "posicao": 1, "codVendedor": 78123, "ativo": 1, "dataAlteracao": "2025-06-01 14:30:00" }]Insert or update Route Client
Section titled “Insert or update Route Client”POST upsert by key codRota + codVendedor + codCliente + cpfCNPJCliente.
Rota: {host}/public/v1/rotas/clientesMétodo: POSTBody: json| Property | Type | Size | Mandatory | Description |
|---|---|---|---|---|
| codRota | int | ✓ | Route code. Part of the upsert key. | |
| codVendedor | int | ✓ | Seller code. Part of the upsert key. | |
| codCliente | int | ✓ | Customer code. Part of the upsert key. | |
| cpfCNPJCliente | string | 100 | ✓ | Customer CPF/CNPJ. Part of the upsert key. |
| position | int | ✓ | Customer order on route. | |
| active | int | ✓ | Values: 0 or 1. |
Body:
{ "codRota": 100, "codVendedor": 78123, "codCliente": 64068, "cpfCNPJCliente": "261.840.230-80", "posicao": 1, "ativo": 1}Return:
{ "codRota": 100, "cpfCNPJCliente": "261.840.230-80", "codCliente": 64068, "posicao": 1, "codVendedor": 78123, "ativo": 1, "dataAlteracao": "2025-06-02 10:00:00"}Delete Customer from Route
Section titled “Delete Customer from Route”Removes the client’s link to the route.
Rota: {host}/public/v1/rotas/clientes?codRota={codRota}&codVendedor={codVendedor}&codCliente={codCliente}&cpfCNPJCliente={cpfCNPJCliente}Método: DELETEReturn:
{ "mensagem": "Registro excluído com sucesso."}