---
agentTools:
  projectIndex: https://konvex.readme.io/llms.txt
---

# Download form 300 by year

This endpoint retrieves or generates the official Formulario 300 PDF (Tax Return for Legal Entities) for a specific fiscal year.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Konvex Universal API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.getkonvex.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "X-Secret",
        "in": "header",
        "x-default": ""
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/core/api/dian/download-300-pdf-by-year": {
      "post": {
        "summary": "Download form 300 by year",
        "description": "This endpoint retrieves or generates the official Formulario 300 PDF (Tax Return for Legal Entities) for a specific fiscal year.",
        "operationId": "download-form-300-by-year",
        "parameters": [
          {
            "name": "x-connection",
            "in": "header",
            "description": "Connection or Integration ID. A unique identifier that links the request to the client's specific account or environment. <code> DIAN </code>",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "year",
                  "formularioId"
                ],
                "properties": {
                  "year": {
                    "type": "string",
                    "description": "The fiscal year of the tax return (e.g., 2025).",
                    "default": "2025"
                  },
                  "formularioId": {
                    "type": "string",
                    "description": "The unique ID of the form. Note: This ID must be obtained beforehand from the Form 300 GET request."
                  }
                }
              },
              "examples": {
                "Request Example": {
                  "value": {
                    "year": 2024,
                    "formularioId": "3004718210971"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"status\": 200,\n    \"software\": \"dian\",\n    \"data\":\"binary content pdf\"\n}\n"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "example": 200,
                      "default": 0
                    },
                    "software": {
                      "type": "string",
                      "example": "dian"
                    },
                    "data": {
                      "type": "string",
                      "example": "binary content pdf"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"status\": 500,\n    \"error\": {\n        \"software\": \"dian\",\n        \"code\": \"ERR_BAD_RESPONSE\",\n        \"message\": \"Request failed with status code 500\",\n        \"params\": [\n            \"ERR_BAD_RESPONSE\"\n        ],\n        \"detail\": {\n            \"ok\": false,\n            \"error\": \"No se encontró el formulario 300 con id id_form\"\n        }\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "example": 500,
                      "default": 0
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "software": {
                          "type": "string",
                          "example": "dian"
                        },
                        "code": {
                          "type": "string",
                          "example": "ERR_BAD_RESPONSE"
                        },
                        "message": {
                          "type": "string",
                          "example": "Request failed with status code 500"
                        },
                        "params": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "example": "ERR_BAD_RESPONSE"
                          }
                        },
                        "detail": {
                          "type": "object",
                          "properties": {
                            "ok": {
                              "type": "boolean",
                              "example": false,
                              "default": true
                            },
                            "error": {
                              "type": "string",
                              "example": "No se encontró el formulario 300 con id id_form"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "654c4fc4d4a41c002a458704:69bac41c0e442102c2e17060"
}
```