Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
NinjaPartsBR
New Member

API Tiny ERP

Boa tarde, estamos tendo um problema com o limite de requisições do Tiny ERP, por exemplo para buscarmos os itens presentes em nossas Notas Fiscais é preciso fazer uma requisição para cada uma delas pelo ID, disponibilizado por outra API, porém como geramos um número maior de Notas Fiscais do que o limite do site, acabam vindo erros da API. Criamos um temporizador com a função InvokeAfter, e ainda assim tivemos problemas, por vezes a API roda corretamente e outras ela repete os erros. Segue o código abaixo, se alguém conseguir nos auxiliar com isso.

 

 

 

(ID as text) =>

let

GET = Function.InvokeAfter(()=>

Json.Document(Web.Contents(

"https://api.tiny.com.br/api2/",[

RelativePath = "nota.fiscal.obter.php?token=Token do Tiny &formato=json&id="&ID

]

)), #duration(0,0,0,6)) 

in

GET

2 REPLIES 2
NinjaPartsBR
New Member

Hi, 
Thanks for the reply.

The returned error happened when the limit of API requests is reached, it returns that the API couldn´t have been called. I believe that you probably not add your own tiny token to use the code, right? The part of the cold in bold, you have to add your own tiny token.

v-xiaotang
Community Support
Community Support

Hi @NinjaPartsBR 

Thanks for reaching out to us.

What error did it return? I tested it and got an error with the invalid token

vxiaotang_0-1662002258511.png

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.