Webservicesqmb: Difference between revisions

From QuatenusWiki
No edit summary
No edit summary
Line 1: Line 1:
{{QuatenusHeader}}
{{QuatenusHeader}}


= Web Services Quatenus® Core =
= GetLicensableItems =
 
== 📌 Introdução ==
Documentação dos Web Services do Quatenus® Core para integração e obtenção de dados.
 
Versão: 12.00
Fonte:
 
== 🧭 Estrutura ==
 
=== 📦 Licenciamento ===
 
[[QBM/WebServices/GetPartnerCodesFamilies]]
[[QBM/WebServices/GetLicensableItems]]
[[QBM/WebServices/GetLicensableItemExtras]]
 
=== 📱 Ativos ===
 
[[QBM/WebServices/GetAssetBrands]]
[[QBM/WebServices/GetAssetModels]]
[[QBM/WebServices/GetDeviceClasses]]
 
=== 🚗 Frota ===
 
[[QBM/WebServices/GetVehiclesBrands]]
[[QBM/WebServices/GetVehiclesModels]]
[[QBM/WebServices/GetVehiclesClassType]]
[[QBM/WebServices/GetFuelTypes]]
 
=== 👤 Entidades ===
 
[[QBM/WebServices/GetCustomers]]
[[QBM/WebServices/GetPartners]]
 
=== 📄 Documentos ===
 
[[QBM/WebServices/GetExternalContracts]]
[[QBM/WebServices/GetBillingEvents]]
 
=== 💰 Pagamentos ===
 
[[QBM/WebServices/GetPaymentTerms]]
 
== 🔐 Autenticação ==
 
Parâmetros comuns:
 
{| class="wikitable"
 
! Campo !! Descrição
userName
-
password
-
token
}
 
{{QuatenusFooter}}
 
🧩 Template Base (para cada serviço)
 
Usa isto como padrão para todas as páginas 👇
 
{{QuatenusHeader}}
 
= <Nome do Serviço> =


== 📌 Descrição ==
== 📌 Descrição ==
Descrição funcional do serviço.
Este serviço obtém uma lista de produtos QBM que correspondem a produtos licenciáveis das gamas Quatenus.


---
---


== 🌐 Endpoint ==
== 🌐 Endpoint ==
<code>
<code>
URL_DO_SERVIÇO
.../QbmItemsServices.svc/GetLicensableItems
</code>
</code>


Line 82: Line 16:


== 🔐 Autenticação ==
== 🔐 Autenticação ==
 
* userName
* userName
* password
* password
* token
* token (opcional) 


---
---
Line 92: Line 25:


{| class="wikitable"
{| class="wikitable"
! Nome !! Tipo !! Obrigatório !! Descrição !! Exemplo
! Nome !! Tipo !! Obrigatório !! Descrição !! Valor por omissão !! Exemplo
|-
| filter || String || ❌ || Filtro de pesquisa || "" || Fleet
|-
| familyIds || String || ❌ || Lista de IDs de gamas || "" || 114
|-
| cultureInfo || String || ❌ || Cultura do servidor || pt-PT || en-US
|-
| timeZoneId || String || ❌ || Fuso horário || GMT || GMT Standard Time
|-
| pageNumber || String || ❌ || Página atual || "" || 1
|-
| rowsPerPage || String || ❌ || Nº registos || "" || 100
|-
| sortColumnName || String || ❌ || Coluna de ordenação || Code || Description
|-
|-
| filter || string || ❌ || Filtro de pesquisa || "Fleet"
| sortDirection || String || ❌ || Direção ordenação || ascending || descending
|}
|-
 
| requestDate || String || ❌ || Data cálculo preço || 0001-01-01 00:00 || 2013-12-04 00:00
---
|-
 
| currencyId || String || ❌ || Moeda || 0 || 50
== 📤 Resposta ==
|-
 
| fromBusinessEntityId || String || ❌ || Entidade fornecedora || 0 || 123
{| class="wikitable"
|-
! Campo !! Tipo !! Descrição
| toBusinessEntityId || String || ❌ || Entidade cliente || "" || 123
|-
| userName || String || ✔ || Login || - || user@test.com
|-
|-
| Rows || object[] || Lista de resultados
| password || String || ✔ || Password || - || *****
|-
|-
| TotalRows || int || Total de registos
| token || String || ❌ || Token || - || -
|}
 
---
 
== 📄 Estrutura do Objeto ==
 
{| class="wikitable"
! Campo !! Tipo !! Descrição
|-
|-
| Id || int || Identificador
| args || JSON || ❌ || Filtros avançados || - || ver abaixo
|}
|}


---
---


== 🧪 Exemplo ==
== ⚙️ Filtros Avançados (args) ==


<code>
Formato JSON:
URL_EXEMPLO
</code>


---
<syntaxhighlight lang="json">
 
{
== ⚠️ Notas ==
  "Data": {
 
    "Global": "",
* Observações importantes
    "Extra": "",
    "Units": "",
    "ItemTypes": "",
    "IsEnabledFilter": "ALL",
    "HasPriceFilter": "",
    "IsLicensedFilter": ""
  }
}
</syntaxhighlight>


---
---


{{QuatenusFooter}}
== 📊 Valores Possíveis ==
🔧 Exemplo Real (já pronto)
👉 GetLicensableItems


{{QuatenusHeader}}
=== Units ===
* B – Box 
* M – Month 
* Y – Year 
* U – Unit 
* L – License 
* D – Devices 


= GetLicensableItems =
=== ItemTypes ===
* P – Produto 
* S – Serviço 


== 📌 Descrição ==
=== IsEnabledFilter ===
Obtém lista de produtos QBM licenciáveis.
* ACTIVE 
* INACTIVE 
* ALL 


== 🌐 Endpoint ==
=== IsLicensedFilter ===
* LICENSED 
* UNLICENSED 
* ALL 


<code> .../QbmItemsServices.svc/GetLicensableItems </code>
=== Currency ===
* 50 – EUR 
* 21 – BRL 


== 📥 Parâmetros ==
---


{| class="wikitable"
== 📤 Resposta ==
 
! Nome !! Tipo !! Obrigatório !! Descrição !! Exemplo
filter
-
familyIds
-
currencyId
-
requestDate
-
args
}
 
== ⚙️ Filtros Avançados (args) ==
 
<code> { "Data":{ "Global":"", "Extra":"", "Units":"", "ItemTypes":"", "IsEnabledFilter":"ALL" } } </code>


== 📤 Resposta ==
Tipo: <code>PagedData&lt;QbmLicensableItemObject&gt;</code>


{| class="wikitable"
{| class="wikitable"
! Campo !! Tipo !! Descrição
|-
| Rows || object[] || Lista de items
|-
| TotalRows || int || Total de registos
|}


! Campo !! Tipo !! Descrição
---
Rows
-
TotalRows
}


== 📄 Estrutura do Objeto ==
== 📄 Estrutura do Objeto ==


{| class="wikitable"
{| class="wikitable"
! Campo !! Tipo !! Nullable !! Descrição
|-
| Code || String || ❌ || Código do item
|-
| Description || String || ❌ || Descrição
|-
| IsEnabled || Bool || ❌ || Item ativo
|-
| ItemType || Char || ❌ || Tipo (P/S)
|-
| PartnerCodeColor || String || ✔ || Cor
|-
| InsertedUser || String || ❌ || Criador
|-
| PartnerCodeFamilyId || Int || ✔ || ID da gama
|-
| PartnersCodeIsExtra || Bool || ✔ || É extra
|-
| PartnersCodeIsGlobal || Bool || ✔ || É global
|-
| PartnersCodeUnit || String || ✔ || Unidade
|-
| QbmItemId || Int || ❌ || ID do item
|-
| ShortDescription || String || ✔ || Descrição curta
|-
| Unit || Int || ✔ || Unidade de preço
|-
| UnitPrice || Decimal || ✔ || Preço
|-
| Discount || Decimal || ✔ || Desconto
|-
| TaxRate || Decimal || ✔ || IVA
|-
| CheckBox || Bool || ❌ || Campo técnico
|-
| DataAction || Object || ❌ || Interno
|-
| DataObjectDescription || String || ❌ || Interno
|-
| DataSource || Object || ❌ || Interno
|-
| GridIndex || Int || ❌ || Interno
|-
| Id || String || ❌ || Interno
|-
| UsageHistoryId || String || ✔ || Interno
|}


! Campo !! Tipo !! Descrição
---
Code
-
Description
-
ItemType
-
UnitPrice
-
TaxRate
}


== 🧪 Exemplo ==
== 🧪 Exemplo ==


<code> .../GetLicensableItems?userName=xxx&password=xxx </code>
<code>
.../GetLicensableItems?selectedLanguage=pt-PT&timeZoneId=GMT&userName=xxx&password=xxx
</code>
 
---


== ⚠️ Notas ==
== ⚠️ Notas ==


Pode usar filtros por unidade (M, Y, U, etc.)
* requestDate deve estar no formato: yyyy-MM-dd HH:mm 
Pode filtrar por produtos ou serviços
* args é obrigatório em alguns cenários 
* Filtros podem impactar preços calculados 


{{QuatenusFooter}}
{{QuatenusFooter}}

Revision as of 14:25, 28 April 2026

GetLicensableItems

📌 Descrição

Este serviço obtém uma lista de produtos QBM que correspondem a produtos licenciáveis das gamas Quatenus.

---

🌐 Endpoint

.../QbmItemsServices.svc/GetLicensableItems

---

🔐 Autenticação

  • userName
  • password
  • token

---

📥 Parâmetros

Nome Tipo Obrigatório Descrição Valor por omissão Exemplo
filter String ❌ Filtro de pesquisa "" Fleet
familyIds String ❌ Lista de IDs de gamas "" 114
cultureInfo String ❌ Cultura do servidor pt-PT en-US
timeZoneId String ❌ Fuso horário GMT GMT Standard Time
pageNumber String ❌ Página atual "" 1
rowsPerPage String ❌ Nº registos "" 100
sortColumnName String ❌ Coluna de ordenação Code Description
sortDirection String ❌ Direção ordenação ascending descending
requestDate String ❌ Data cálculo preço 0001-01-01 00:00 2013-12-04 00:00
currencyId String ❌ Moeda 0 50
fromBusinessEntityId String ❌ Entidade fornecedora 0 123
toBusinessEntityId String ❌ Entidade cliente "" 123
userName String ✔ Login - user@test.com
password String ✔ Password - *****
token String ❌ Token - -
args JSON ❌ Filtros avançados - ver abaixo

---

⚙️ Filtros Avançados (args)

Formato JSON:

{
  "Data": {
    "Global": "",
    "Extra": "",
    "Units": "",
    "ItemTypes": "",
    "IsEnabledFilter": "ALL",
    "HasPriceFilter": "",
    "IsLicensedFilter": ""
  }
}

---

📊 Valores Possíveis

Units

  • B – Box
  • M – Month
  • Y – Year
  • U – Unit
  • L – License
  • D – Devices

ItemTypes

  • P – Produto
  • S – Serviço

IsEnabledFilter

  • ACTIVE
  • INACTIVE
  • ALL

IsLicensedFilter

  • LICENSED
  • UNLICENSED
  • ALL

Currency

  • 50 – EUR
  • 21 – BRL

---

📤 Resposta

Tipo: PagedData<QbmLicensableItemObject>

Campo Tipo Descrição
Rows object[] Lista de items
TotalRows int Total de registos

---

📄 Estrutura do Objeto

Campo Tipo Nullable Descrição
Code String ❌ Código do item
Description String ❌ Descrição
IsEnabled Bool ❌ Item ativo
ItemType Char ❌ Tipo (P/S)
PartnerCodeColor String ✔ Cor
InsertedUser String ❌ Criador
PartnerCodeFamilyId Int ✔ ID da gama
PartnersCodeIsExtra Bool ✔ É extra
PartnersCodeIsGlobal Bool ✔ É global
PartnersCodeUnit String ✔ Unidade
QbmItemId Int ❌ ID do item
ShortDescription String ✔ Descrição curta
Unit Int ✔ Unidade de preço
UnitPrice Decimal ✔ Preço
Discount Decimal ✔ Desconto
TaxRate Decimal ✔ IVA
CheckBox Bool ❌ Campo técnico
DataAction Object ❌ Interno
DataObjectDescription String ❌ Interno
DataSource Object ❌ Interno
GridIndex Int ❌ Interno
Id String ❌ Interno
UsageHistoryId String ✔ Interno

---

🧪 Exemplo

.../GetLicensableItems?selectedLanguage=pt-PT&timeZoneId=GMT&userName=xxx&password=xxx

---

⚠️ Notas

  • requestDate deve estar no formato: yyyy-MM-dd HH:mm
  • args é obrigatório em alguns cenários
  • Filtros podem impactar preços calculados