Demander API - Segments
This article is part of the REST Integration API documentation.
Documentation for querying, inserting, updating and deleting segments.
Consultation
Section titled “Consultation”List the company’s segments. Without filter, considers dataAlteracao from the last 6 months.
Rota: {host}/public/v1/segmentos?pagina={pagina}&limite={limite}&filtroDataAlteracao={data}&operadorFiltro={operador}Método: GETReturn:
{ "segmentos": [ { "codigo": "1", "descricao": "Vestuário", "ativo": 1, "dataAlteracao": "2026-07-15 10:00:00" } ]}Insert or update
Section titled “Insert or update”POST upsert by key codigo.
Rota: {host}/public/v1/segmentosMétodo: POSTBody: json| Property | Type | Size | Mandatory | Description |
|---|---|---|---|---|
| code | string | 20 | ✓ | Segment code. Unique identifier used to insert or update (upsert). |
| description | string | 255 | ✓ | Segment name. |
| active | int | Values: 0 or 1. Default on inclusion: 1. |
Body:
{ "codigo": "1", "descricao": "Vestuário", "ativo": 1}Return:
{ "codigo": "1", "descricao": "Vestuário", "ativo": 1, "dataAlteracao": "2026-07-15 10:00:00"}Delete
Section titled “Delete”Removes the segment.
Rota: {host}/public/v1/segmentos?codigo={codigo}Método: DELETEReturn:
{ "mensagem": "Registro excluído com sucesso."}