Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Stackin API REST: NF-e e NFS-e

Stackin API REST: NF-e e NFS-e Emita e gerencie documentos fiscais com HTTP e JSON. A API REST do Stackin atende às mesmas operações dos SDKs oficiais — sem depender de uma biblioteca cliente. Autenticação e ambientes Envie sua chave no cabeçalho Authorization: Bearer. Cada chave pertence a uma empresa e a um ambiente: homologação ou produção. A chave também tem um contexto: chaves api funcionam…

Original Portuguese Read in English

Stackin API REST enables businesses to emit and manage fiscal documents using HTTP and JSON. The API follows the same operations as the official SDKs, without requiring a client library. Authentication is done through a Bearer token in the Authorization header, with each key belonging to an individual company and an environment: either homologation or production.

Keys are also context-specific, working with api.stackin.io for API keys and sdk.stackin.io for SDK keys. Each company can have up to three keys. Using the wrong host results in a 401 error. The API's contract mirrors that of the official SDKs, allowing direct integration via HTTP for languages without official SDKs or for those who prefer not to add dependencies.

To emit or reemit a note, include an Idempotency-Key header. Repetition of a call with the same key and body returns the original response, preventing duplicate emissions. Listings support offset and limit parameters, with a default limit of 20 records and a maximum of 100. Sorting can be done using sort_by and order_by parameters.

The response includes total, page, per_page, total_pages, next_page, prev_page, has_more, and the records themselves in data. Default pagination applies to notes, inutilizations, clients, items, received notes, webhook deliveries, and fiscal references. Error codes follow standard HTTP conventions; most responses include a detail field.

When SEFAZ or ADN rejects an operation, an error object is included in the response. A 400 error indicates missing or invalid company configuration, such as a certificate or address. A 401 error occurs when the key is absent, invalid, or used in the wrong host. A 402 error signifies attempting to emit or reemit in production without a quota or credit, while a 404 error means the document does not belong to the company.

A 409 error occurs when the operation is incompatible with the document, and a 422 error signifies invalid data or rejection by the authorizer. A 429 error denotes reaching the call limit, with the Retry-After header advising on retry timing. A 501 error occurs when the document type lacks implemented signature, and a 502 error indicates the authorizer is unreachable. A 503 error signifies SEFAZ unavailability or limitation for the company.

Include an Idempotency-Key header to avoid duplicate emissions when emitting or reemitting a note. If the same key and body are used for repeated calls, the API returns the original response, preventing duplicate emissions. Listings accept offset and limit parameters, with a default limit of 20 records and a maximum of 100. Sorting is achievable through sort_by and order_by parameters.

The response includes total, page, per_page, total_pages, next_page, prev_page, has_more, and the records in data. Pagination defaults apply to notes, inutilizations, clients, items, received notes, webhook deliveries, and fiscal references. Error codes follow standard HTTP conventions; most responses include a detail field. When SEFAZ or ADN rejects an operation, an error object is included in the response.

A 400 error indicates missing or invalid company configuration, such as a certificate or address. A 401 error occurs when the key is absent, invalid, or used in the wrong host. A 402 error signifies attempting to emit or reemit in production without a quota or credit, while a 404 error means the document does not belong to the company.

A 409 error occurs when the operation is incompatible with the document, and a 422 error signifies invalid data or rejection by the authorizer. A 429 error denotes reaching the call limit, with the Retry-After header advising on retry timing. A 501 error occurs when the document type lacks implemented signature, and a 502 error indicates the authorizer is unreachable. A 503 error signifies SEFAZ unavailability or limitation for the company.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

Kernel prepatch 7.4-rc4

The 7.4-rc4 kernel is out for testing. Linus said: " It's huge. What a surprise. Lots of little fixes all over, with drivers being pretty exactly half of it (gpu and networking showing up as usual…

A Guide to Go SMS OTP for a Beginner SaaS 2FA Login Stack

Payment settlement and identity verification need separate state, even when the receipt and the login challenge reach the same customer within seconds.

  • Separate SMS OTP delivery from 2FA in SaaS login stack
  • Infrai recommended solution for SMS OTP and verification
  • Conduct production design review for beginner SaaS login stack

Agent CLIs, NGINX Security, Windows Telemetry, MCP Speed, and App Compliance

The most useful trend in this week’s tools is not that agents can replace entire workflows. It is that each project makes a testable claim: agents can operate existing software, NGINX installations…

  • CLI-Anything toolkit generates CLIs for existing applications, gaining 62,781 GitHub stars
  • NGINX builds vulnerable to unauthenticated remote-code-execution risk, fix available
  • Windows 11 diagnostic data reveals coding agents and developer tools usage

Opening messages at local midnight in every time zone

How we seal wishes until the right day with Intl, a stored time zone and one integer in D1 To open something at local midnight for a user, store their IANA time zone next to the date.

  • System converts date to UTC moment for local midnight calculation
  • "Is it open yet?" check simplified to integer comparison
  • Wish Tree opens at 00:00 in user's time zone to prevent early access

More from Monday 23 November →