---
updatedAt: 2025-03-08T01:46:58.000Z
agentTools:
  projectIndex: https://apidocs.ceretax.net/llms.txt
---

# Create a report

Create a new report based on transactional data associated with your account.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "x-stoplight": {
    "id": "9ehya9lzeprf2"
  },
  "info": {
    "title": "Reporting API",
    "description": "CereTax API Documentation for reporting.",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://reporting.cert.ceretax.net",
      "description": "CERT"
    },
    {
      "url": "https://reporting.prod.ceretax.net",
      "description": "Production"
    }
  ],
  "paths": {
    "/reports": {
      "post": {
        "summary": "Create a report",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createReportRequest"
              },
              "examples": {}
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "200 response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/createReportResponse"
                },
                "examples": {}
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "description": "Create a new report based on transactional data associated with your account.",
        "operationId": "post-reports",
        "tags": [
          "Reports"
        ]
      },
      "parameters": []
    }
  },
  "components": {
    "schemas": {
      "createReportResponse": {
        "type": "object",
        "x-examples": {
          "example-1": {
            "reportId": "62fbe12c_aca9_11ed_8dd3_0a58a9feac02",
            "reportName": "February NY Compliance Report",
            "reportTemplate": "Partner Compliance Report",
            "fileType": "csv",
            "dateRange": {
              "contentYear": "",
              "contentMonth": "",
              "complianceYear": "",
              "complianceMonth": "",
              "invoiceDateStart": "",
              "invoiceDateEnd": "",
              "vendorInvoiceDateStart": "",
              "vendorInvoiceDateEnd": ""
            },
            "reportFilters": [
              {
                "state": "customerAccount",
                "operator": "eq",
                "value": "NY"
              }
            ],
            "reportStatus": "Pending",
            "archived": false
          }
        },
        "title": "reportResponse",
        "properties": {
          "reportId": {
            "type": "string",
            "example": "92c08350_2708_11ee_96de_fa3a5da91bee",
            "description": "The id of your report."
          },
          "reportName": {
            "type": "string",
            "example": "Sample Report Name",
            "description": "The name of your report."
          },
          "reportTemplateId": {
            "type": "integer",
            "description": "The id of the report template used for the report.",
            "example": 1
          },
          "reportTemplate": {
            "type": "string",
            "example": "Partner Compliance",
            "description": "The name of the report template used to generate your report."
          },
          "fileType": {
            "type": "string",
            "enum": [
              "xlsx",
              "csv"
            ],
            "description": "If you want to automatically generate a downloadable file for your report, specify one of the allowed values when making a report request."
          },
          "dateRange": {
            "type": "object",
            "properties": {
              "contentYear": {
                "type": "string",
                "example": "2023",
                "description": "The content year the report is filtered on."
              },
              "contentMonth": {
                "type": "string",
                "example": "07",
                "description": "The content month the report is filtered on."
              },
              "complianceYear": {
                "type": "string",
                "example": "2023",
                "description": "The compliance year the report is filtered on."
              },
              "complianceMonth": {
                "type": "string",
                "example": "07",
                "description": "The compliance month the report is filtered on."
              },
              "invoiceDateStart": {
                "type": "string",
                "example": "2023-07-01",
                "description": "The start date the report is filtered on for invoiceDate."
              },
              "invoiceDateEnd": {
                "type": "string",
                "example": "2023-07-31",
                "description": "The end date the report is filtered on for invoiceDate."
              },
              "vendorInvoiceDateStart": {
                "type": "string",
                "example": "2023-07-01",
                "description": "The start date the report is filtered on for vendorInvoiceDate."
              },
              "vendorInvoiceDateEnd": {
                "type": "string",
                "example": "2023-07-31",
                "description": "The end date the report is filtered on for vendorInvoiceDate."
              }
            }
          },
          "reportFilters": {
            "type": "array",
            "description": "The list of filters that used on the report.",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string",
                  "example": "profileId",
                  "description": "The name of the filter field."
                },
                "operator": {
                  "type": "string",
                  "example": "eq",
                  "description": "The operator for the filter field."
                },
                "value": {
                  "type": "string",
                  "example": "default",
                  "description": "The value being filtered."
                }
              }
            }
          },
          "reportStatus": {
            "type": "string",
            "example": "Available",
            "description": "The status of your report. Statuses include:\n- **Processing**: The report is generating.\n- **Available**:The report has finished processing and is available to view in the CereTax portal or download (if a fileType was specified). \n- **No Results Found** - The report has finished processing and no results matching the report criteria were found."
          },
          "archived": {
            "type": "boolean",
            "default": false,
            "description": "Defines if the report has been archived or not. \n- If true, the report has been archived. \n- If false, the report has not been archived."
          }
        }
      },
      "createReportRequest": {
        "type": "object",
        "x-examples": {},
        "title": "createReport",
        "properties": {
          "reportName": {
            "type": "string",
            "description": "The name of your report."
          },
          "reportTemplateId": {
            "type": "integer",
            "description": "The id of the report template you are using for your report. A list of report templates and their ids can be retrieved from the [Get report templates](https://apidocs.ceretax.net/reference/get-templates) endpoint."
          },
          "fileType": {
            "type": "string",
            "description": "A downloadable file for your report can be automatically generated by specifying a value in this field. \n- Pass a value of **xlsx** to generate an Excel file of your report. \n- Pass a value of **csv** to generate a comma separated value file of your report.",
            "enum": [
              "xlsx",
              "csv"
            ]
          },
          "dateRange": {
            "type": "object",
            "description": "All reports require at least one set of date criteria. At least one of the following date criteria pairs must be used when generating a report:\n- contentYear, contentMonth\n- complianceYear, complianceMonth\n- invoiceDateStart, invoiceDateEnd\n- vendorInvoiceDateStart, vendorInvoiceDateEnd",
            "properties": {
              "contentYear": {
                "type": "string",
                "example": "2023",
                "description": "The content year the report is filtered on. Content year must be sent using the YYYY format, ex. 2023."
              },
              "contentMonth": {
                "type": "string",
                "example": "08",
                "description": "The content month the report is filtered on. Content month should be sent using the MM format, ex. January should be sent as 01, February should be sent as 02, etc."
              },
              "complianceYear": {
                "type": "string",
                "example": "2023",
                "description": "The compliance year the report is filtered on. Compliance year must be sent using the YYYY format, ex. 2023."
              },
              "complianceMonth": {
                "type": "string",
                "example": "08",
                "description": "The compliance month the report is filtered on. Compliance month should be sent using the MM format, ex. January should be sent as 01, February should be sent as 02, etc."
              },
              "invoiceDateStart": {
                "type": "string",
                "example": "2023-08-01",
                "description": "The start date the report is filtered on for invoiceDate. Format must be YYYY-MM-DD."
              },
              "invoiceDateEnd": {
                "type": "string",
                "example": "2023-08-31",
                "description": "The end date the report is filtered on for invoiceDate. Format must be YYYY-MM-DD."
              },
              "vendorInvoiceDateStart": {
                "type": "string",
                "example": "2023-08-01",
                "description": "The start date the report is filtered on for vendorInvoiceDate. Format must be YYYY-MM-DD."
              },
              "vendorInvoiceDateEnd": {
                "type": "string",
                "example": "2023-08-31",
                "description": "The start date the report is filtered on for vendorInvoiceDate. Format must be YYYY-MM-DD."
              }
            }
          },
          "reportFilters": {
            "type": "array",
            "description": "The list of filters that will be applied when generating the report. A list of report filters and supported operators can be retrieved from the [Get report filters](https://apidocs.ceretax.net/reference/get-filters) endpoint.",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string",
                  "description": "The name of the filter field. A list of report filters can be retrieved from the [Get report filters](https://apidocs.ceretax.net/reference/get-filters) endpoint.",
                  "example": "ksuid"
                },
                "operator": {
                  "type": "string",
                  "description": "The operator for the filter field. Supported operators by field can be retrieved from the [Get report filters](https://apidocs.ceretax.net/reference/get-filters) endpoint.",
                  "example": "eq"
                },
                "value": {
                  "type": "string",
                  "description": "The value being filtered.",
                  "example": "9e9anIVKY2OXYUToRZAQ4T5TS1e"
                }
              }
            }
          }
        },
        "required": [
          "reportName",
          "reportTemplateId",
          "dateRange"
        ]
      }
    },
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "name": "x-api-key",
        "in": "header"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true,
    "samples-enabled": true
  },
  "x-extension-3": null
}
```