{
  "info": {
    "name": "DocsOCR API (English)",
    "description": "Extract the data of a Brazilian birth certificate with one request.\n\n**Start in three steps**\n1. Import the **DocsOCR (en)** environment and pick it. Put your API key in `apiKey`: create it in the panel, under [API Keys](https://app.docsocr.com/api-keys). The key stays in the environment, as a *secret*, never in the collection.\n2. Run **Start here → 1. Check the prices**: no key needed.\n3. Run **Start here → 2. Extract the sample certificate**: a fictitious certificate we host.\n\nEvery extraction sends a new `requestId` (`{{$guid}}`). The same request, with the same `requestId`, file and options, within 15 minutes of its answer, gets the same answer at no charge.\n\nThe requests under **Refusals at no cost** cost nothing. Those under **Extraction** cost credits when they return data.\n\nDocs: https://docs.docsocr.com/en/",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "event": [
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "exec": [
          "let body = {};",
          "try {",
          "  body = pm.response.json();",
          "} catch (error) {",
          "  body = {};",
          "}",
          "if (pm.request.method === 'POST' && pm.response.code === 201 && body.success === true) {",
          "  pm.test(`Extracted by ${body.engine}, ${body.creditsCharged} credit(s)`, function () {",
          "    pm.expect(body.data).to.be.an('object');",
          "  });",
          "} else if (pm.request.method === 'POST' && pm.response.code === 201) {",
          "  pm.test(`Not extracted (${body.errorCode}): nothing charged`, function () {",
          "    pm.expect(body.creditsCharged).to.eql(0);",
          "  });",
          "}"
        ]
      }
    }
  ],
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.docsocr.com/api/v1"
    },
    {
      "key": "language",
      "value": "en"
    },
    {
      "key": "sampleImageUrl",
      "value": "https://docsocr.com/samples/certidao-nascimento-exemplo.jpg"
    },
    {
      "key": "smallSampleImageUrl",
      "value": "https://docsocr.com/samples/certidao-nascimento-exemplo-800x640.jpg"
    },
    {
      "key": "imageUrl",
      "value": "https://docsocr.com/samples/certidao-nascimento-exemplo.jpg"
    }
  ],
  "item": [
    {
      "name": "Start here",
      "item": [
        {
          "name": "1. Check the prices",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"200: the prices\", function () {",
                  "  pm.response.to.have.status(200);",
                  "});"
                ]
              }
            }
          ],
          "request": {
            "auth": {
              "type": "noauth"
            },
            "method": "GET",
            "header": [
              {
                "key": "Accept-Language",
                "value": "{{language}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/documents/prices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "documents",
                "prices"
              ]
            },
            "description": "The price of an extraction, in credits: on the standard engines, on the fast engine and for resizeImage. No key needed. fast's price may change: this request reads it live."
          },
          "response": []
        },
        {
          "name": "2. Extract the sample certificate",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"201: the extraction answer\", function () {",
                  "  pm.response.to.have.status(201);",
                  "});"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept-Language",
                "value": "{{language}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"imageType\": \"url\",\n  \"imageUrl\": \"{{sampleImageUrl}}\",\n  \"requestId\": \"{{$guid}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/documents/birth-certificate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "documents",
                "birth-certificate"
              ]
            },
            "description": "Sends the sample certificate we host (fictitious data). The answer carries the data in `data`."
          },
          "response": [
            {
              "name": "201 · The sample certificate's data",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept-Language",
                    "value": "{{language}}"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"imageType\": \"url\",\n  \"imageUrl\": \"{{sampleImageUrl}}\",\n  \"requestId\": \"{{$guid}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/documents/birth-certificate",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "documents",
                    "birth-certificate"
                  ]
                }
              },
              "status": "Created",
              "code": 201,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"processingTimeMs\": 6120,\n  \"data\": {\n    \"documento\": {\n      \"tipo\": \"Certidão de Nascimento\",\n      \"órgão_emissor\": \"CARTÓRIO DO 1º OFÍCIO DE REGISTRO CIVIL DE RECIFE - PE\"\n    },\n    \"dados_pessoais\": {\n      \"nome_completo\": \"ANA BEATRIZ DOS SANTOS TESTE\",\n      \"cpf\": \"123.456.789-09\",\n      \"matrícula\": \"123456 01 55 2020 1 00012 123 0001234 56\",\n      \"data_nascimento\": {\n        \"texto_completo\": \"\",\n        \"dia\": \"15\",\n        \"mês\": \"03\",\n        \"ano\": \"2020\"\n      },\n      \"hora_nascimento\": \"08:45\",\n      \"naturalidade\": \"RECIFE - PE\",\n      \"sexo\": \"FEMININO\"\n    },\n    \"local_nascimento\": {\n      \"estabelecimento\": \"HOSPITAL EXEMPLO\",\n      \"município\": \"RECIFE\",\n      \"uf\": \"PE\"\n    },\n    \"registro\": {\n      \"município\": \"RECIFE\",\n      \"uf\": \"PE\",\n      \"cartório\": \"CARTÓRIO DO 1º OFÍCIO DE REGISTRO CIVIL DE RECIFE - PE\",\n      \"data_registro\": \"20/03/2020\",\n      \"número_dnv\": \"\",\n      \"livro\": \"A-123\",\n      \"folha\": \"045\",\n      \"termo\": \"00012\"\n    },\n    \"filiação\": {\n      \"genitor_1\": {\n        \"nome_completo\": \"CARLA DOS SANTOS TESTE\",\n        \"naturalidade\": \"\"\n      },\n      \"genitor_2\": {\n        \"nome_completo\": \"JOÃO PEREIRA TESTE\",\n        \"naturalidade\": \"\"\n      }\n    },\n    \"avós\": {\n      \"paternos\": {\n        \"avô\": \"ANTÔNIO PEREIRA\",\n        \"avó\": \"LÚCIA PEREIRA\"\n      },\n      \"maternos\": {\n        \"avô\": \"JOSÉ DOS SANTOS\",\n        \"avó\": \"MARIA DOS SANTOS\"\n      }\n    },\n    \"gêmeos\": {\n      \"status\": \"Não\",\n      \"informações_adicionais\": \"\"\n    },\n    \"observações\": {\n      \"averbações\": \"\",\n      \"anotações\": \"\"\n    },\n    \"autenticação\": {\n      \"selo_digital\": \"\",\n      \"oficial_registro\": \"PEDRO EXEMPLO\",\n      \"data_emissão\": \"20/03/2020\"\n    }\n  },\n  \"engine\": \"mini\",\n  \"creditsCharged\": 1\n}"
            },
            {
              "name": "201 · No engine could answer: nothing charged",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept-Language",
                    "value": "{{language}}"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"imageType\": \"url\",\n  \"imageUrl\": \"{{sampleImageUrl}}\",\n  \"requestId\": \"{{$guid}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/documents/birth-certificate",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "documents",
                    "birth-certificate"
                  ]
                }
              },
              "status": "Created",
              "code": 201,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"success\": false,\n  \"processingTimeMs\": 1203,\n  \"error\": \"The extraction service is busy. Please retry in a few moments. No credit was charged.\",\n  \"errorCode\": \"EXTRACTION_BUSY\",\n  \"data\": {\n    \"documento\": {\n      \"tipo\": \"\",\n      \"órgão_emissor\": \"\"\n    },\n    \"dados_pessoais\": {\n      \"nome_completo\": \"\",\n      \"cpf\": \"\",\n      \"matrícula\": \"\",\n      \"data_nascimento\": {\n        \"texto_completo\": \"\",\n        \"dia\": \"\",\n        \"mês\": \"\",\n        \"ano\": \"\"\n      },\n      \"hora_nascimento\": \"\",\n      \"naturalidade\": \"\",\n      \"sexo\": \"\"\n    },\n    \"local_nascimento\": {\n      \"estabelecimento\": \"\",\n      \"município\": \"\",\n      \"uf\": \"\"\n    },\n    \"registro\": {\n      \"município\": \"\",\n      \"uf\": \"\",\n      \"cartório\": \"\",\n      \"data_registro\": \"\",\n      \"número_dnv\": \"\"\n    },\n    \"filiação\": {\n      \"genitor_1\": {\n        \"nome_completo\": \"\",\n        \"naturalidade\": \"\"\n      },\n      \"genitor_2\": {\n        \"nome_completo\": \"\",\n        \"naturalidade\": \"\"\n      }\n    },\n    \"avós\": {\n      \"paternos\": {\n        \"avô\": \"\",\n        \"avó\": \"\"\n      },\n      \"maternos\": {\n        \"avô\": \"\",\n        \"avó\": \"\"\n      }\n    },\n    \"gêmeos\": {\n      \"status\": \"Não\",\n      \"informações_adicionais\": \"\"\n    },\n    \"observações\": {\n      \"averbações\": \"\",\n      \"anotações\": \"\"\n    },\n    \"autenticação\": {\n      \"selo_digital\": \"\",\n      \"oficial_registro\": \"\",\n      \"data_emissão\": \"\"\n    }\n  },\n  \"creditsCharged\": 0\n}"
            },
            {
              "name": "401 · No key",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept-Language",
                    "value": "{{language}}"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"imageType\": \"url\",\n  \"imageUrl\": \"{{sampleImageUrl}}\",\n  \"requestId\": \"{{$guid}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/documents/birth-certificate",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "documents",
                    "birth-certificate"
                  ]
                }
              },
              "status": "Unauthorized",
              "code": 401,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"error\": \"Unauthorized\",\n  \"message\": \"API key is required. Provide Authorization: Bearer <your-api-key>\",\n  \"timestamp\": \"2026-10-02T12:00:00.000Z\"\n}"
            },
            {
              "name": "402 · The balance cannot pay the request",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept-Language",
                    "value": "{{language}}"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"imageType\": \"url\",\n  \"imageUrl\": \"{{sampleImageUrl}}\",\n  \"requestId\": \"{{$guid}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/documents/birth-certificate",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "documents",
                    "birth-certificate"
                  ]
                }
              },
              "status": "Payment Required",
              "code": 402,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"statusCode\": 402,\n  \"message\": \"This request costs 1 credit, and the available balance is 0 credits. Buy credits or upgrade your plan to continue.\",\n  \"error\": \"Payment Required\",\n  \"errorCode\": \"NOT_ENOUGH_CREDITS\",\n  \"action\": \"purchase_credits\",\n  \"creditsAvailable\": 0,\n  \"creditsRequired\": 1,\n  \"planCreditsRemaining\": 0,\n  \"purchasedCreditsRemaining\": 0\n}"
            },
            {
              "name": "429 · Too many requests this minute",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept-Language",
                    "value": "{{language}}"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"imageType\": \"url\",\n  \"imageUrl\": \"{{sampleImageUrl}}\",\n  \"requestId\": \"{{$guid}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/documents/birth-certificate",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "documents",
                    "birth-certificate"
                  ]
                }
              },
              "status": "Too Many Requests",
              "code": 429,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"statusCode\": 429,\n  \"message\": \"Organization rate limit exceeded (10 requests per minute). Retry after 6 seconds.\",\n  \"error\": \"Too Many Requests\",\n  \"retryAfter\": 6\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "Extraction",
      "item": [
        {
          "name": "From an image URL",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"201: the extraction answer\", function () {",
                  "  pm.response.to.have.status(201);",
                  "});"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept-Language",
                "value": "{{language}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"imageType\": \"url\",\n  \"imageUrl\": \"{{imageUrl}}\",\n  \"requestId\": \"{{$guid}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/documents/birth-certificate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "documents",
                "birth-certificate"
              ]
            },
            "description": "Sends the image at `imageUrl`: the sample certificate, or your image's public, direct URL. In the Collection Runner, each row of the data file gives an `imageUrl`, and each one is an extraction."
          },
          "response": [
            {
              "name": "201 · The sample certificate's data",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept-Language",
                    "value": "{{language}}"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"imageType\": \"url\",\n  \"imageUrl\": \"{{imageUrl}}\",\n  \"requestId\": \"{{$guid}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/documents/birth-certificate",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "documents",
                    "birth-certificate"
                  ]
                }
              },
              "status": "Created",
              "code": 201,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"processingTimeMs\": 6120,\n  \"data\": {\n    \"documento\": {\n      \"tipo\": \"Certidão de Nascimento\",\n      \"órgão_emissor\": \"CARTÓRIO DO 1º OFÍCIO DE REGISTRO CIVIL DE RECIFE - PE\"\n    },\n    \"dados_pessoais\": {\n      \"nome_completo\": \"ANA BEATRIZ DOS SANTOS TESTE\",\n      \"cpf\": \"123.456.789-09\",\n      \"matrícula\": \"123456 01 55 2020 1 00012 123 0001234 56\",\n      \"data_nascimento\": {\n        \"texto_completo\": \"\",\n        \"dia\": \"15\",\n        \"mês\": \"03\",\n        \"ano\": \"2020\"\n      },\n      \"hora_nascimento\": \"08:45\",\n      \"naturalidade\": \"RECIFE - PE\",\n      \"sexo\": \"FEMININO\"\n    },\n    \"local_nascimento\": {\n      \"estabelecimento\": \"HOSPITAL EXEMPLO\",\n      \"município\": \"RECIFE\",\n      \"uf\": \"PE\"\n    },\n    \"registro\": {\n      \"município\": \"RECIFE\",\n      \"uf\": \"PE\",\n      \"cartório\": \"CARTÓRIO DO 1º OFÍCIO DE REGISTRO CIVIL DE RECIFE - PE\",\n      \"data_registro\": \"20/03/2020\",\n      \"número_dnv\": \"\",\n      \"livro\": \"A-123\",\n      \"folha\": \"045\",\n      \"termo\": \"00012\"\n    },\n    \"filiação\": {\n      \"genitor_1\": {\n        \"nome_completo\": \"CARLA DOS SANTOS TESTE\",\n        \"naturalidade\": \"\"\n      },\n      \"genitor_2\": {\n        \"nome_completo\": \"JOÃO PEREIRA TESTE\",\n        \"naturalidade\": \"\"\n      }\n    },\n    \"avós\": {\n      \"paternos\": {\n        \"avô\": \"ANTÔNIO PEREIRA\",\n        \"avó\": \"LÚCIA PEREIRA\"\n      },\n      \"maternos\": {\n        \"avô\": \"JOSÉ DOS SANTOS\",\n        \"avó\": \"MARIA DOS SANTOS\"\n      }\n    },\n    \"gêmeos\": {\n      \"status\": \"Não\",\n      \"informações_adicionais\": \"\"\n    },\n    \"observações\": {\n      \"averbações\": \"\",\n      \"anotações\": \"\"\n    },\n    \"autenticação\": {\n      \"selo_digital\": \"\",\n      \"oficial_registro\": \"PEDRO EXEMPLO\",\n      \"data_emissão\": \"20/03/2020\"\n    }\n  },\n  \"engine\": \"mini\",\n  \"creditsCharged\": 1\n}"
            },
            {
              "name": "422 · The link answered 404",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept-Language",
                    "value": "{{language}}"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"imageType\": \"url\",\n  \"imageUrl\": \"{{imageUrl}}\",\n  \"requestId\": \"{{$guid}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/documents/birth-certificate",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "documents",
                    "birth-certificate"
                  ]
                }
              },
              "status": "Unprocessable Entity",
              "code": 422,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"success\": false,\n  \"processingTimeMs\": 410,\n  \"error\": \"We could not download the image from imageUrl: the link answered HTTP 404 (file not found). Use a public, direct link to a PDF, JPG, PNG, WebP or GIF file that opens without a login, or send the image as imageBase64.\",\n  \"errorCode\": \"IMAGE_DOWNLOAD_FAILED\",\n  \"data\": {\n    \"documento\": {\n      \"tipo\": \"\",\n      \"órgão_emissor\": \"\"\n    },\n    \"dados_pessoais\": {\n      \"nome_completo\": \"\",\n      \"cpf\": \"\",\n      \"matrícula\": \"\",\n      \"data_nascimento\": {\n        \"texto_completo\": \"\",\n        \"dia\": \"\",\n        \"mês\": \"\",\n        \"ano\": \"\"\n      },\n      \"hora_nascimento\": \"\",\n      \"naturalidade\": \"\",\n      \"sexo\": \"\"\n    },\n    \"local_nascimento\": {\n      \"estabelecimento\": \"\",\n      \"município\": \"\",\n      \"uf\": \"\"\n    },\n    \"registro\": {\n      \"município\": \"\",\n      \"uf\": \"\",\n      \"cartório\": \"\",\n      \"data_registro\": \"\",\n      \"número_dnv\": \"\"\n    },\n    \"filiação\": {\n      \"genitor_1\": {\n        \"nome_completo\": \"\",\n        \"naturalidade\": \"\"\n      },\n      \"genitor_2\": {\n        \"nome_completo\": \"\",\n        \"naturalidade\": \"\"\n      }\n    },\n    \"avós\": {\n      \"paternos\": {\n        \"avô\": \"\",\n        \"avó\": \"\"\n      },\n      \"maternos\": {\n        \"avô\": \"\",\n        \"avó\": \"\"\n      }\n    },\n    \"gêmeos\": {\n      \"status\": \"Não\",\n      \"informações_adicionais\": \"\"\n    },\n    \"observações\": {\n      \"averbações\": \"\",\n      \"anotações\": \"\"\n    },\n    \"autenticação\": {\n      \"selo_digital\": \"\",\n      \"oficial_registro\": \"\",\n      \"data_emissão\": \"\"\n    }\n  },\n  \"creditsCharged\": 0\n}"
            }
          ]
        },
        {
          "name": "From a file (base64)",
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "if (!pm.variables.get('imageBase64')) {",
                  "  throw new Error(\"Put the file's content in base64 in the environment's imageBase64 variable.\");",
                  "}"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"201: the extraction answer\", function () {",
                  "  pm.response.to.have.status(201);",
                  "});"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept-Language",
                "value": "{{language}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"imageType\": \"base64\",\n  \"imageBase64\": \"{{imageBase64}}\",\n  \"requestId\": \"{{$guid}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/documents/birth-certificate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "documents",
                "birth-certificate"
              ]
            },
            "description": "Sends a file's content in base64, from the environment's `imageBase64` variable, for example `data:image/jpeg;base64,/9j/4AAQ...`."
          },
          "response": [
            {
              "name": "201 · The sample certificate's data",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept-Language",
                    "value": "{{language}}"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"imageType\": \"base64\",\n  \"imageBase64\": \"{{imageBase64}}\",\n  \"requestId\": \"{{$guid}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/documents/birth-certificate",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "documents",
                    "birth-certificate"
                  ]
                }
              },
              "status": "Created",
              "code": 201,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"processingTimeMs\": 6120,\n  \"data\": {\n    \"documento\": {\n      \"tipo\": \"Certidão de Nascimento\",\n      \"órgão_emissor\": \"CARTÓRIO DO 1º OFÍCIO DE REGISTRO CIVIL DE RECIFE - PE\"\n    },\n    \"dados_pessoais\": {\n      \"nome_completo\": \"ANA BEATRIZ DOS SANTOS TESTE\",\n      \"cpf\": \"123.456.789-09\",\n      \"matrícula\": \"123456 01 55 2020 1 00012 123 0001234 56\",\n      \"data_nascimento\": {\n        \"texto_completo\": \"\",\n        \"dia\": \"15\",\n        \"mês\": \"03\",\n        \"ano\": \"2020\"\n      },\n      \"hora_nascimento\": \"08:45\",\n      \"naturalidade\": \"RECIFE - PE\",\n      \"sexo\": \"FEMININO\"\n    },\n    \"local_nascimento\": {\n      \"estabelecimento\": \"HOSPITAL EXEMPLO\",\n      \"município\": \"RECIFE\",\n      \"uf\": \"PE\"\n    },\n    \"registro\": {\n      \"município\": \"RECIFE\",\n      \"uf\": \"PE\",\n      \"cartório\": \"CARTÓRIO DO 1º OFÍCIO DE REGISTRO CIVIL DE RECIFE - PE\",\n      \"data_registro\": \"20/03/2020\",\n      \"número_dnv\": \"\",\n      \"livro\": \"A-123\",\n      \"folha\": \"045\",\n      \"termo\": \"00012\"\n    },\n    \"filiação\": {\n      \"genitor_1\": {\n        \"nome_completo\": \"CARLA DOS SANTOS TESTE\",\n        \"naturalidade\": \"\"\n      },\n      \"genitor_2\": {\n        \"nome_completo\": \"JOÃO PEREIRA TESTE\",\n        \"naturalidade\": \"\"\n      }\n    },\n    \"avós\": {\n      \"paternos\": {\n        \"avô\": \"ANTÔNIO PEREIRA\",\n        \"avó\": \"LÚCIA PEREIRA\"\n      },\n      \"maternos\": {\n        \"avô\": \"JOSÉ DOS SANTOS\",\n        \"avó\": \"MARIA DOS SANTOS\"\n      }\n    },\n    \"gêmeos\": {\n      \"status\": \"Não\",\n      \"informações_adicionais\": \"\"\n    },\n    \"observações\": {\n      \"averbações\": \"\",\n      \"anotações\": \"\"\n    },\n    \"autenticação\": {\n      \"selo_digital\": \"\",\n      \"oficial_registro\": \"PEDRO EXEMPLO\",\n      \"data_emissão\": \"20/03/2020\"\n    }\n  },\n  \"engine\": \"mini\",\n  \"creditsCharged\": 1\n}"
            },
            {
              "name": "422 · Not an image we read",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept-Language",
                    "value": "{{language}}"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"imageType\": \"base64\",\n  \"imageBase64\": \"{{imageBase64}}\",\n  \"requestId\": \"{{$guid}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/documents/birth-certificate",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "documents",
                    "birth-certificate"
                  ]
                }
              },
              "status": "Unprocessable Entity",
              "code": 422,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"success\": false,\n  \"processingTimeMs\": 35,\n  \"error\": \"The file is not in one of these formats: PDF, JPG, PNG, WebP or GIF. Convert it to one of them and send it again.\",\n  \"errorCode\": \"IMAGE_FORMAT_UNSUPPORTED\",\n  \"data\": {\n    \"documento\": {\n      \"tipo\": \"\",\n      \"órgão_emissor\": \"\"\n    },\n    \"dados_pessoais\": {\n      \"nome_completo\": \"\",\n      \"cpf\": \"\",\n      \"matrícula\": \"\",\n      \"data_nascimento\": {\n        \"texto_completo\": \"\",\n        \"dia\": \"\",\n        \"mês\": \"\",\n        \"ano\": \"\"\n      },\n      \"hora_nascimento\": \"\",\n      \"naturalidade\": \"\",\n      \"sexo\": \"\"\n    },\n    \"local_nascimento\": {\n      \"estabelecimento\": \"\",\n      \"município\": \"\",\n      \"uf\": \"\"\n    },\n    \"registro\": {\n      \"município\": \"\",\n      \"uf\": \"\",\n      \"cartório\": \"\",\n      \"data_registro\": \"\",\n      \"número_dnv\": \"\"\n    },\n    \"filiação\": {\n      \"genitor_1\": {\n        \"nome_completo\": \"\",\n        \"naturalidade\": \"\"\n      },\n      \"genitor_2\": {\n        \"nome_completo\": \"\",\n        \"naturalidade\": \"\"\n      }\n    },\n    \"avós\": {\n      \"paternos\": {\n        \"avô\": \"\",\n        \"avó\": \"\"\n      },\n      \"maternos\": {\n        \"avô\": \"\",\n        \"avó\": \"\"\n      }\n    },\n    \"gêmeos\": {\n      \"status\": \"Não\",\n      \"informações_adicionais\": \"\"\n    },\n    \"observações\": {\n      \"averbações\": \"\",\n      \"anotações\": \"\"\n    },\n    \"autenticação\": {\n      \"selo_digital\": \"\",\n      \"oficial_registro\": \"\",\n      \"data_emissão\": \"\"\n    }\n  },\n  \"creditsCharged\": 0\n}"
            }
          ]
        },
        {
          "name": "Resize an image outside our standard",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"201: the extraction answer\", function () {",
                  "  pm.response.to.have.status(201);",
                  "});"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept-Language",
                "value": "{{language}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"imageType\": \"url\",\n  \"imageUrl\": \"{{smallSampleImageUrl}}\",\n  \"resizeImage\": true,\n  \"requestId\": \"{{$guid}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/documents/birth-certificate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "documents",
                "birth-certificate"
              ]
            },
            "description": "With `resizeImage: true`, an image outside our standard is resized on our side for 1 extra credit, instead of refused. Here, the 800×640 sample."
          },
          "response": [
            {
              "name": "201 · The 800×640 sample, resized",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept-Language",
                    "value": "{{language}}"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"imageType\": \"url\",\n  \"imageUrl\": \"{{smallSampleImageUrl}}\",\n  \"resizeImage\": true,\n  \"requestId\": \"{{$guid}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/documents/birth-certificate",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "documents",
                    "birth-certificate"
                  ]
                }
              },
              "status": "Created",
              "code": 201,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"processingTimeMs\": 6120,\n  \"data\": {\n    \"documento\": {\n      \"tipo\": \"Certidão de Nascimento\",\n      \"órgão_emissor\": \"CARTÓRIO DO 1º OFÍCIO DE REGISTRO CIVIL DE RECIFE - PE\"\n    },\n    \"dados_pessoais\": {\n      \"nome_completo\": \"ANA BEATRIZ DOS SANTOS TESTE\",\n      \"cpf\": \"123.456.789-09\",\n      \"matrícula\": \"123456 01 55 2020 1 00012 123 0001234 56\",\n      \"data_nascimento\": {\n        \"texto_completo\": \"\",\n        \"dia\": \"15\",\n        \"mês\": \"03\",\n        \"ano\": \"2020\"\n      },\n      \"hora_nascimento\": \"08:45\",\n      \"naturalidade\": \"RECIFE - PE\",\n      \"sexo\": \"FEMININO\"\n    },\n    \"local_nascimento\": {\n      \"estabelecimento\": \"HOSPITAL EXEMPLO\",\n      \"município\": \"RECIFE\",\n      \"uf\": \"PE\"\n    },\n    \"registro\": {\n      \"município\": \"RECIFE\",\n      \"uf\": \"PE\",\n      \"cartório\": \"CARTÓRIO DO 1º OFÍCIO DE REGISTRO CIVIL DE RECIFE - PE\",\n      \"data_registro\": \"20/03/2020\",\n      \"número_dnv\": \"\",\n      \"livro\": \"A-123\",\n      \"folha\": \"045\",\n      \"termo\": \"00012\"\n    },\n    \"filiação\": {\n      \"genitor_1\": {\n        \"nome_completo\": \"CARLA DOS SANTOS TESTE\",\n        \"naturalidade\": \"\"\n      },\n      \"genitor_2\": {\n        \"nome_completo\": \"JOÃO PEREIRA TESTE\",\n        \"naturalidade\": \"\"\n      }\n    },\n    \"avós\": {\n      \"paternos\": {\n        \"avô\": \"ANTÔNIO PEREIRA\",\n        \"avó\": \"LÚCIA PEREIRA\"\n      },\n      \"maternos\": {\n        \"avô\": \"JOSÉ DOS SANTOS\",\n        \"avó\": \"MARIA DOS SANTOS\"\n      }\n    },\n    \"gêmeos\": {\n      \"status\": \"Não\",\n      \"informações_adicionais\": \"\"\n    },\n    \"observações\": {\n      \"averbações\": \"\",\n      \"anotações\": \"\"\n    },\n    \"autenticação\": {\n      \"selo_digital\": \"\",\n      \"oficial_registro\": \"PEDRO EXEMPLO\",\n      \"data_emissão\": \"20/03/2020\"\n    }\n  },\n  \"imageResized\": true,\n  \"originalImageSize\": {\n    \"width\": 800,\n    \"height\": 640\n  },\n  \"finalImageSize\": {\n    \"width\": 1344,\n    \"height\": 1075\n  },\n  \"engine\": \"mini\",\n  \"creditsCharged\": 2\n}"
            }
          ]
        },
        {
          "name": "Ask for the fast engine",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"201: the extraction answer\", function () {",
                  "  pm.response.to.have.status(201);",
                  "});"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept-Language",
                "value": "{{language}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"imageType\": \"url\",\n  \"imageUrl\": \"{{sampleImageUrl}}\",\n  \"engine\": \"fast\",\n  \"requestId\": \"{{$guid}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/documents/birth-certificate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "documents",
                "birth-certificate"
              ]
            },
            "description": "With `\"engine\": \"fast\"`, the fast engine is tried first, at its own price, and the standard engines answer when it cannot. The answer names the engine that answered and what it cost."
          },
          "response": [
            {
              "name": "201 · fast could not answer: a standard engine did",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept-Language",
                    "value": "{{language}}"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"imageType\": \"url\",\n  \"imageUrl\": \"{{sampleImageUrl}}\",\n  \"engine\": \"fast\",\n  \"requestId\": \"{{$guid}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/documents/birth-certificate",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "documents",
                    "birth-certificate"
                  ]
                }
              },
              "status": "Created",
              "code": 201,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"success\": true,\n  \"processingTimeMs\": 6120,\n  \"data\": {\n    \"documento\": {\n      \"tipo\": \"Certidão de Nascimento\",\n      \"órgão_emissor\": \"CARTÓRIO DO 1º OFÍCIO DE REGISTRO CIVIL DE RECIFE - PE\"\n    },\n    \"dados_pessoais\": {\n      \"nome_completo\": \"ANA BEATRIZ DOS SANTOS TESTE\",\n      \"cpf\": \"123.456.789-09\",\n      \"matrícula\": \"123456 01 55 2020 1 00012 123 0001234 56\",\n      \"data_nascimento\": {\n        \"texto_completo\": \"\",\n        \"dia\": \"15\",\n        \"mês\": \"03\",\n        \"ano\": \"2020\"\n      },\n      \"hora_nascimento\": \"08:45\",\n      \"naturalidade\": \"RECIFE - PE\",\n      \"sexo\": \"FEMININO\"\n    },\n    \"local_nascimento\": {\n      \"estabelecimento\": \"HOSPITAL EXEMPLO\",\n      \"município\": \"RECIFE\",\n      \"uf\": \"PE\"\n    },\n    \"registro\": {\n      \"município\": \"RECIFE\",\n      \"uf\": \"PE\",\n      \"cartório\": \"CARTÓRIO DO 1º OFÍCIO DE REGISTRO CIVIL DE RECIFE - PE\",\n      \"data_registro\": \"20/03/2020\",\n      \"número_dnv\": \"\",\n      \"livro\": \"A-123\",\n      \"folha\": \"045\",\n      \"termo\": \"00012\"\n    },\n    \"filiação\": {\n      \"genitor_1\": {\n        \"nome_completo\": \"CARLA DOS SANTOS TESTE\",\n        \"naturalidade\": \"\"\n      },\n      \"genitor_2\": {\n        \"nome_completo\": \"JOÃO PEREIRA TESTE\",\n        \"naturalidade\": \"\"\n      }\n    },\n    \"avós\": {\n      \"paternos\": {\n        \"avô\": \"ANTÔNIO PEREIRA\",\n        \"avó\": \"LÚCIA PEREIRA\"\n      },\n      \"maternos\": {\n        \"avô\": \"JOSÉ DOS SANTOS\",\n        \"avó\": \"MARIA DOS SANTOS\"\n      }\n    },\n    \"gêmeos\": {\n      \"status\": \"Não\",\n      \"informações_adicionais\": \"\"\n    },\n    \"observações\": {\n      \"averbações\": \"\",\n      \"anotações\": \"\"\n    },\n    \"autenticação\": {\n      \"selo_digital\": \"\",\n      \"oficial_registro\": \"PEDRO EXEMPLO\",\n      \"data_emissão\": \"20/03/2020\"\n    }\n  },\n  \"engine\": \"mini\",\n  \"creditsCharged\": 1\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "Refusals at no cost",
      "item": [
        {
          "name": "No API key",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"401: no key, no cost\", function () {",
                  "  pm.response.to.have.status(401);",
                  "});"
                ]
              }
            }
          ],
          "request": {
            "auth": {
              "type": "noauth"
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept-Language",
                "value": "{{language}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"imageType\": \"url\",\n  \"imageUrl\": \"{{sampleImageUrl}}\",\n  \"requestId\": \"{{$guid}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/documents/birth-certificate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "documents",
                "birth-certificate"
              ]
            },
            "description": "The extraction without the Authorization header: the API answers 401 and nothing is charged."
          },
          "response": [
            {
              "name": "401 · No key",
              "originalRequest": {
                "auth": {
                  "type": "noauth"
                },
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept-Language",
                    "value": "{{language}}"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"imageType\": \"url\",\n  \"imageUrl\": \"{{sampleImageUrl}}\",\n  \"requestId\": \"{{$guid}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/documents/birth-certificate",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "documents",
                    "birth-certificate"
                  ]
                }
              },
              "status": "Unauthorized",
              "code": 401,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"error\": \"Unauthorized\",\n  \"message\": \"API key is required. Provide Authorization: Bearer <your-api-key>\",\n  \"timestamp\": \"2026-10-02T12:00:00.000Z\"\n}"
            }
          ]
        },
        {
          "name": "Unknown engine",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"400: unknown engine, no cost\", function () {",
                  "  pm.response.to.have.status(400);",
                  "});"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept-Language",
                "value": "{{language}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"imageType\": \"url\",\n  \"imageUrl\": \"{{sampleImageUrl}}\",\n  \"engine\": \"turbo\",\n  \"requestId\": \"{{$guid}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/documents/birth-certificate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "documents",
                "birth-certificate"
              ]
            },
            "description": "An `engine` other than `\"fast\"`: the API answers 400 and nothing is charged."
          },
          "response": [
            {
              "name": "400 · Unknown engine",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept-Language",
                    "value": "{{language}}"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"imageType\": \"url\",\n  \"imageUrl\": \"{{sampleImageUrl}}\",\n  \"engine\": \"turbo\",\n  \"requestId\": \"{{$guid}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/documents/birth-certificate",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "documents",
                    "birth-certificate"
                  ]
                }
              },
              "status": "Bad Request",
              "code": 400,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"message\": [\n    \"engine accepts only \\\"fast\\\". Leave it out to use the standard engines.\"\n  ],\n  \"error\": \"Bad Request\",\n  \"statusCode\": 400\n}"
            }
          ]
        },
        {
          "name": "Image below our standard",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"422: IMAGE_RESOLUTION_TOO_LOW, no cost\", function () {",
                  "  pm.response.to.have.status(422);",
                  "  pm.expect(pm.response.json().errorCode).to.eql(\"IMAGE_RESOLUTION_TOO_LOW\");",
                  "});"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept-Language",
                "value": "{{language}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"imageType\": \"url\",\n  \"imageUrl\": \"{{smallSampleImageUrl}}\",\n  \"requestId\": \"{{$guid}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/documents/birth-certificate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "documents",
                "birth-certificate"
              ]
            },
            "description": "The 800×640 sample without `resizeImage`: the API refuses it with 422 and `IMAGE_RESOLUTION_TOO_LOW`, and nothing is charged."
          },
          "response": [
            {
              "name": "422 · Below our standard",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept-Language",
                    "value": "{{language}}"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"imageType\": \"url\",\n  \"imageUrl\": \"{{smallSampleImageUrl}}\",\n  \"requestId\": \"{{$guid}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/documents/birth-certificate",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "documents",
                    "birth-certificate"
                  ]
                }
              },
              "status": "Unprocessable Entity",
              "code": 422,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"success\": false,\n  \"processingTimeMs\": 35,\n  \"error\": \"The image has 800 px on its long side; our standard is 1,344 to 2,048 px. Send a photo with more resolution, or set resizeImage: true to have it enlarged (1 extra credit).\",\n  \"errorCode\": \"IMAGE_RESOLUTION_TOO_LOW\",\n  \"data\": {\n    \"documento\": {\n      \"tipo\": \"\",\n      \"órgão_emissor\": \"\"\n    },\n    \"dados_pessoais\": {\n      \"nome_completo\": \"\",\n      \"cpf\": \"\",\n      \"matrícula\": \"\",\n      \"data_nascimento\": {\n        \"texto_completo\": \"\",\n        \"dia\": \"\",\n        \"mês\": \"\",\n        \"ano\": \"\"\n      },\n      \"hora_nascimento\": \"\",\n      \"naturalidade\": \"\",\n      \"sexo\": \"\"\n    },\n    \"local_nascimento\": {\n      \"estabelecimento\": \"\",\n      \"município\": \"\",\n      \"uf\": \"\"\n    },\n    \"registro\": {\n      \"município\": \"\",\n      \"uf\": \"\",\n      \"cartório\": \"\",\n      \"data_registro\": \"\",\n      \"número_dnv\": \"\"\n    },\n    \"filiação\": {\n      \"genitor_1\": {\n        \"nome_completo\": \"\",\n        \"naturalidade\": \"\"\n      },\n      \"genitor_2\": {\n        \"nome_completo\": \"\",\n        \"naturalidade\": \"\"\n      }\n    },\n    \"avós\": {\n      \"paternos\": {\n        \"avô\": \"\",\n        \"avó\": \"\"\n      },\n      \"maternos\": {\n        \"avô\": \"\",\n        \"avó\": \"\"\n      }\n    },\n    \"gêmeos\": {\n      \"status\": \"Não\",\n      \"informações_adicionais\": \"\"\n    },\n    \"observações\": {\n      \"averbações\": \"\",\n      \"anotações\": \"\"\n    },\n    \"autenticação\": {\n      \"selo_digital\": \"\",\n      \"oficial_registro\": \"\",\n      \"data_emissão\": \"\"\n    }\n  },\n  \"creditsCharged\": 0\n}"
            }
          ]
        },
        {
          "name": "A link that does not open",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"422: IMAGE_DOWNLOAD_FAILED, no cost\", function () {",
                  "  pm.response.to.have.status(422);",
                  "  pm.expect(pm.response.json().errorCode).to.eql(\"IMAGE_DOWNLOAD_FAILED\");",
                  "});"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept-Language",
                "value": "{{language}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"imageType\": \"url\",\n  \"imageUrl\": \"https://docsocr.com/samples/nao-existe.jpg\",\n  \"requestId\": \"{{$guid}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/documents/birth-certificate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "documents",
                "birth-certificate"
              ]
            },
            "description": "An `imageUrl` that answers 404: the API refuses it with 422 and `IMAGE_DOWNLOAD_FAILED`, and nothing is charged."
          },
          "response": [
            {
              "name": "422 · The link answered 404",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept-Language",
                    "value": "{{language}}"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"imageType\": \"url\",\n  \"imageUrl\": \"https://docsocr.com/samples/nao-existe.jpg\",\n  \"requestId\": \"{{$guid}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/documents/birth-certificate",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "documents",
                    "birth-certificate"
                  ]
                }
              },
              "status": "Unprocessable Entity",
              "code": 422,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"success\": false,\n  \"processingTimeMs\": 410,\n  \"error\": \"We could not download the image from imageUrl: the link answered HTTP 404 (file not found). Use a public, direct link to a PDF, JPG, PNG, WebP or GIF file that opens without a login, or send the image as imageBase64.\",\n  \"errorCode\": \"IMAGE_DOWNLOAD_FAILED\",\n  \"data\": {\n    \"documento\": {\n      \"tipo\": \"\",\n      \"órgão_emissor\": \"\"\n    },\n    \"dados_pessoais\": {\n      \"nome_completo\": \"\",\n      \"cpf\": \"\",\n      \"matrícula\": \"\",\n      \"data_nascimento\": {\n        \"texto_completo\": \"\",\n        \"dia\": \"\",\n        \"mês\": \"\",\n        \"ano\": \"\"\n      },\n      \"hora_nascimento\": \"\",\n      \"naturalidade\": \"\",\n      \"sexo\": \"\"\n    },\n    \"local_nascimento\": {\n      \"estabelecimento\": \"\",\n      \"município\": \"\",\n      \"uf\": \"\"\n    },\n    \"registro\": {\n      \"município\": \"\",\n      \"uf\": \"\",\n      \"cartório\": \"\",\n      \"data_registro\": \"\",\n      \"número_dnv\": \"\"\n    },\n    \"filiação\": {\n      \"genitor_1\": {\n        \"nome_completo\": \"\",\n        \"naturalidade\": \"\"\n      },\n      \"genitor_2\": {\n        \"nome_completo\": \"\",\n        \"naturalidade\": \"\"\n      }\n    },\n    \"avós\": {\n      \"paternos\": {\n        \"avô\": \"\",\n        \"avó\": \"\"\n      },\n      \"maternos\": {\n        \"avô\": \"\",\n        \"avó\": \"\"\n      }\n    },\n    \"gêmeos\": {\n      \"status\": \"Não\",\n      \"informações_adicionais\": \"\"\n    },\n    \"observações\": {\n      \"averbações\": \"\",\n      \"anotações\": \"\"\n    },\n    \"autenticação\": {\n      \"selo_digital\": \"\",\n      \"oficial_registro\": \"\",\n      \"data_emissão\": \"\"\n    }\n  },\n  \"creditsCharged\": 0\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "Reference",
      "item": [
        {
          "name": "Document types",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"200: the document types\", function () {",
                  "  pm.response.to.have.status(200);",
                  "});"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept-Language",
                "value": "{{language}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/documents/types",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "documents",
                "types"
              ]
            },
            "description": "The document types the API reads. Needs a key."
          },
          "response": [
            {
              "name": "200 · The document types",
              "originalRequest": {
                "method": "GET",
                "header": [
                  {
                    "key": "Accept-Language",
                    "value": "{{language}}"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/documents/types",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "documents",
                    "types"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"types\": [\n    {\n      \"id\": \"birth-certificate\",\n      \"name\": \"Certidão de Nascimento\",\n      \"description\": \"Brazilian birth certificate OCR extraction\",\n      \"icon\": \"📜\",\n      \"enabled\": true,\n      \"endpoint\": \"/documents/birth-certificate\"\n    }\n  ]\n}"
            }
          ]
        },
        {
          "name": "API status",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"200: the API is up\", function () {",
                  "  pm.response.to.have.status(200);",
                  "});"
                ]
              }
            }
          ],
          "request": {
            "auth": {
              "type": "noauth"
            },
            "method": "GET",
            "header": [
              {
                "key": "Accept-Language",
                "value": "{{language}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/health",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "health"
              ]
            },
            "description": "Whether the API is up. No key needed."
          },
          "response": [
            {
              "name": "200 · The API is up",
              "originalRequest": {
                "auth": {
                  "type": "noauth"
                },
                "method": "GET",
                "header": [
                  {
                    "key": "Accept-Language",
                    "value": "{{language}}"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/health",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "health"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json; charset=utf-8"
                }
              ],
              "body": "{\n  \"status\": \"ok\",\n  \"timestamp\": \"2026-10-02T12:00:00.000Z\",\n  \"uptime\": 123.4,\n  \"environment\": \"production\",\n  \"loadTestMode\": false\n}"
            }
          ]
        }
      ]
    }
  ]
}
