biterp

Download invoice PDF

Returns the PDF of an issued Brazilian service invoice (NFS-e), generated from the fiscal XML stored in bitERP. The PDF exists when br_data.transmission_status is "issued" and the invoice has a stored XML (br_data.has_response_xml or has_source_xml). A national NFS-e (NFS-e Nacional) returns the DANFSe. A municipal NFS-e in the ABRASF layout returns a mirror of the invoice, labeled as not being the official document: the official one is the city hall portal record.

GET
/invoices/{id}/pdf
AuthorizationBearer <token>

In: header

Response Body

application/pdf

application/pdf

application/json

application/json

application/pdf

application/pdf

application/pdf

application/json

curl -X GET "https://api.biterp.ai/invoices/{id}/pdf"
"string"
{
  "status_code": 422,
  "message": "Could not resolve provided geography fields",
  "error": "Unprocessable Entity",
  "code": "string",
  "details": {
    "fields": {
      "country_code": [
        "Could not resolve country from '1112' (tried ISO2, ISO3, numeric code and names)"
      ],
      "city": [
        "Could not resolve city from 'CidadeQueNaoExiste' in country 'BR'"
      ]
    }
  }
}
{
  "status_code": 404,
  "message": "Customer not found",
  "error": "Not Found",
  "code": "CUSTOMER_NOT_FOUND"
}
{
  "status_code": 404,
  "message": "Customer not found",
  "error": "Not Found",
  "code": "CUSTOMER_NOT_FOUND"
}
{
  "status_code": 404,
  "message": "Customer not found",
  "error": "Not Found",
  "code": "CUSTOMER_NOT_FOUND"
}
{
  "status_code": 404,
  "message": "Customer not found",
  "error": "Not Found",
  "code": "CUSTOMER_NOT_FOUND"
}
{
  "status_code": 422,
  "message": "Could not resolve provided geography fields",
  "error": "Unprocessable Entity",
  "code": "string",
  "details": {
    "fields": {
      "country_code": [
        "Could not resolve country from '1112' (tried ISO2, ISO3, numeric code and names)"
      ],
      "city": [
        "Could not resolve city from 'CidadeQueNaoExiste' in country 'BR'"
      ]
    }
  }
}
{
  "status_code": 404,
  "message": "Customer not found",
  "error": "Not Found",
  "code": "CUSTOMER_NOT_FOUND"
}