---
title: "Create a General Ledger export"
method: POST
path: "/api/external/v2/exports/general_ledgers"
tags: ["Exports"]
---

# Create a General Ledger export

`POST /api/external/v2/exports/general_ledgers`

## Request

- Base URL: `https://app.pennylane.com`
- URL: `https://app.pennylane.com/api/external/v2/exports/general_ledgers`
- Auth: OAuth 2
  - Authorization code: `https://app.pennylane.com/oauth/authorize`
  - Token URL: `https://app.pennylane.com/oauth/oauth/token` scopes: `exports:gl`

This endpoint allows you to create a General Ledger export. The generated export file is an xlsx file.

> ℹ️
> This endpoint requires the following scope: `exports:gl`

## Headers

- `X-Company-Id` string

## Request body

- object
  - `period_start` string, date, required: Start date of the period to export
  - `period_end` string, date, required: End date of the period to export

## Response `201`

Returns the generated export status

- object
  - `id` integer, required: ID of the export
  - `status` 'pending' | 'ready' | 'error', required: The state of the export
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `400`: Bad request
- `401`: Access token is missing or invalid
- `403`: Access to this resource forbidden
- `404`: The resource was not found

## Changes

- **2026-11-03** `871f863307e5`: 1 info
  - added the new optional `header` request parameter `X-Company-Id`

[Operation history](https://skmtc.dev/pennylane/apis/company-v2/changes/api/external/v2/exports/general_ledgers/post.md)

---

[API](https://skmtc.dev/pennylane/apis/company-v2.md) - [All operations](https://skmtc.dev/pennylane/apis/company-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/pennylane/apis/company-v2/revisions/871f863307e5?raw)
