Desenvolvedores · Documentação técnica
Arena Upya
API Links
CRUD de links da empresa e lista filtrada “como vendedor” (for_user_id / external_code).
Leitura
links.readEscrita
links.writeEndpoints
| Método | Rota | Escopo | Descrição |
|---|---|---|---|
GET |
/api/v1/links |
links.read |
Lista admin (ou filtrada por user) |
GET |
/api/v1/links/{id} |
links.read |
Obter link |
POST |
/api/v1/links |
links.write |
Criar link |
PATCH |
/api/v1/links/{id} |
links.write |
Atualizar link |
DELETE |
/api/v1/links/{id} |
links.write |
Excluir link |
Por endpoint — assinaturas e exemplos
Parâmetros
| Campo | Em | Tipo | Obrig. | Descrição |
|---|---|---|---|---|
for_user_id |
query |
integer |
não | Filtra visibilidade para o user |
external_code |
query |
string |
não | Alternativa a for_user_id |
Link
Link útil exibido no App.
| Campo | Tipo | Obrig. | Descrição |
|---|---|---|---|
id |
integer |
não |
ID. ex.: 38
|
title |
string |
não |
Título. ex.: "Contratar — Mensal"
|
url |
string |
não |
URL de destino. ex.: "https://exemplo.com/contratar"
|
description |
string | null |
não | Texto auxiliar. |
audience |
string · all | targeted |
não | `all` = todos; `targeted` = sellers/times listados. |
is_active |
integer |
não |
`1` visível. ex.: 1
|
sort_order |
integer |
não | Ordem. |
seller_ids |
array<integer> |
não | Sellers alvo quando `audience=targeted`. |
team_ids |
array<integer> |
não | Times alvo quando `audience=targeted`. |
Exemplo
Response 2xx
{
"status": "success",
"data": {
"items": [
{
"id": 38,
"title": "Playbook",
"url": "https://exemplo.com/playbook",
"audience": "all",
"is_active": 1
}
]
},
"meta": {
"request_id": "a1b2c3d4e5f6789012345678"
}
}
Parâmetros
| Campo | Em | Tipo | Obrig. | Descrição |
|---|---|---|---|---|
id |
path |
integer |
sim | ID do recurso na empresa |
Link
Link útil exibido no App.
| Campo | Tipo | Obrig. | Descrição |
|---|---|---|---|
id |
integer |
não |
ID. ex.: 38
|
title |
string |
não |
Título. ex.: "Contratar — Mensal"
|
url |
string |
não |
URL de destino. ex.: "https://exemplo.com/contratar"
|
description |
string | null |
não | Texto auxiliar. |
audience |
string · all | targeted |
não | `all` = todos; `targeted` = sellers/times listados. |
is_active |
integer |
não |
`1` visível. ex.: 1
|
sort_order |
integer |
não | Ordem. |
seller_ids |
array<integer> |
não | Sellers alvo quando `audience=targeted`. |
team_ids |
array<integer> |
não | Times alvo quando `audience=targeted`. |
Exemplo
Response 2xx
{
"status": "success",
"data": {
"link": {
"id": 38,
"title": "Playbook",
"url": "https://exemplo.com/playbook",
"audience": "all",
"is_active": 1
}
},
"meta": {
"request_id": "a1b2c3d4e5f6789012345678"
}
}
LinkCreate — body
Body para criar link.
| Campo | Tipo | Obrig. | Descrição |
|---|---|---|---|
title |
string |
sim |
Título. ex.: "Contratar — Mensal"
|
url |
string |
sim |
URL. ex.: "https://exemplo.com/contratar"
|
description |
string |
não | Texto auxiliar. |
sort_order |
integer |
não | Ordem. |
is_active |
boolean |
não |
Default `true`. ex.: true
|
audience |
string · all | targeted |
não |
Público-alvo. ex.: "all"
|
seller_ids |
array<integer> |
não | IDs de sellers (targeted). |
team_ids |
array<integer> |
não | IDs de times (targeted). |
Link
Link útil exibido no App.
| Campo | Tipo | Obrig. | Descrição |
|---|---|---|---|
id |
integer |
não |
ID. ex.: 38
|
title |
string |
não |
Título. ex.: "Contratar — Mensal"
|
url |
string |
não |
URL de destino. ex.: "https://exemplo.com/contratar"
|
description |
string | null |
não | Texto auxiliar. |
audience |
string · all | targeted |
não | `all` = todos; `targeted` = sellers/times listados. |
is_active |
integer |
não |
`1` visível. ex.: 1
|
sort_order |
integer |
não | Ordem. |
seller_ids |
array<integer> |
não | Sellers alvo quando `audience=targeted`. |
team_ids |
array<integer> |
não | Times alvo quando `audience=targeted`. |
Exemplo
Request POST (body)
{
"title": "Playbook",
"url": "https://exemplo.com/playbook",
"audience": "all",
"is_active": true
}
Response 2xx
{
"status": "success",
"data": {
"link": {
"id": 38,
"title": "Playbook",
"url": "https://exemplo.com/playbook",
"audience": "all",
"is_active": 1
}
},
"meta": {
"request_id": "a1b2c3d4e5f6789012345678"
}
}
Parâmetros
| Campo | Em | Tipo | Obrig. | Descrição |
|---|---|---|---|---|
id |
path |
integer |
sim | ID do recurso na empresa |
LinkCreate — body
Body para criar link.
| Campo | Tipo | Obrig. | Descrição |
|---|---|---|---|
title |
string |
sim |
Título. ex.: "Contratar — Mensal"
|
url |
string |
sim |
URL. ex.: "https://exemplo.com/contratar"
|
description |
string |
não | Texto auxiliar. |
sort_order |
integer |
não | Ordem. |
is_active |
boolean |
não |
Default `true`. ex.: true
|
audience |
string · all | targeted |
não |
Público-alvo. ex.: "all"
|
seller_ids |
array<integer> |
não | IDs de sellers (targeted). |
team_ids |
array<integer> |
não | IDs de times (targeted). |
Link
Link útil exibido no App.
| Campo | Tipo | Obrig. | Descrição |
|---|---|---|---|
id |
integer |
não |
ID. ex.: 38
|
title |
string |
não |
Título. ex.: "Contratar — Mensal"
|
url |
string |
não |
URL de destino. ex.: "https://exemplo.com/contratar"
|
description |
string | null |
não | Texto auxiliar. |
audience |
string · all | targeted |
não | `all` = todos; `targeted` = sellers/times listados. |
is_active |
integer |
não |
`1` visível. ex.: 1
|
sort_order |
integer |
não | Ordem. |
seller_ids |
array<integer> |
não | Sellers alvo quando `audience=targeted`. |
team_ids |
array<integer> |
não | Times alvo quando `audience=targeted`. |
Exemplo
Request PATCH (body)
{
"title": "Playbook v2",
"url": "https://exemplo.com/playbook",
"is_active": true
}
Response 2xx
{
"status": "success",
"data": {
"link": {
"id": 38,
"title": "Playbook v2",
"url": "https://exemplo.com/playbook",
"audience": "all",
"is_active": 1
}
},
"meta": {
"request_id": "a1b2c3d4e5f6789012345678"
}
}
Parâmetros
| Campo | Em | Tipo | Obrig. | Descrição |
|---|---|---|---|---|
id |
path |
integer |
sim | ID do recurso na empresa |
DeletedResult
| Campo | Tipo | Obrig. | Descrição |
|---|---|---|---|
deleted |
boolean |
não |
Sempre `true` quando excluído. ex.: true
|
Exemplo
Response 2xx
{
"status": "success",
"data": {
"deleted": true
},
"meta": {
"request_id": "a1b2c3d4e5f6789012345678"
}
}
curl — criar
curl -X POST "https://arenaupya.com.br/api/v1/links" \
-H "Authorization: Bearer arena_live_SEU_TOKEN" \
-H "Content-Type: application/json" \
-d '{"title":"Playbook","url":"https://exemplo.com/playbook","audience":"all","is_active":true}'