---
updatedAt: 2026-07-08T07:28:10.000Z
agentTools:
  projectIndex: https://pennylane.readme.io/llms.txt
---

# Get a ledger account

Get a ledger account


> ℹ️
> This endpoint requires one of the following scopes: `ledger_accounts:readonly`, `ledger_accounts:all`

<br />

<Callout icon="ℹ️" theme="info">
  ###

  This endpoint requires one of the following scopes: `ledger_accounts:readonly`, `ledger_accounts:all`
</Callout>

<br />

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Company V2",
    "description": "Automate your accounting with the Pennylane API. [Documentation](https://pennylane.readme.io/)",
    "contact": {
      "email": "tech@pennylane.com"
    },
    "version": "2.0"
  },
  "x-readme": {
    "samples-languages": [
      "curl",
      "node",
      "ruby",
      "php",
      "python",
      "java"
    ]
  },
  "servers": [
    {
      "url": "https://app.pennylane.com"
    }
  ],
  "paths": {
    "/api/external/v2/ledger_accounts/{id}": {
      "get": {
        "operationId": "getLedgerAccount",
        "summary": "Get a ledger account",
        "description": "Get a ledger account\n\n\n> ℹ️\n> This endpoint requires one of the following scopes: `ledger_accounts:readonly`, `ledger_accounts:all`",
        "tags": [
          "Ledger Accounts"
        ],
        "security": [
          {
            "oauth2": [
              "ledger_accounts:readonly",
              "ledger_accounts:all"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "description": "Ledger Account ID",
            "in": "path",
            "schema": {
              "type": "integer",
              "example": 123
            },
            "required": true
          },
          {
            "name": "X-Company-Id",
            "description": "Numeric ID of the company to act on. Required when authenticating with a firm token. Ignored when the token is already bound to a company.",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "12345"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the ledger account",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "id": {
                      "type": "integer",
                      "format": "int64",
                      "example": 124
                    },
                    "number": {
                      "type": "string",
                      "example": "512"
                    },
                    "label": {
                      "type": "string",
                      "example": "Secondary Account"
                    },
                    "vat_rate": {
                      "description": "Ledger Account's VAT rate in percentage",
                      "type": "string",
                      "example": "any"
                    },
                    "country_alpha2": {
                      "description": "Ledger Account's country code (alpha2)",
                      "type": "string",
                      "example": "FR"
                    },
                    "enabled": {
                      "type": "boolean",
                      "example": true
                    },
                    "type": {
                      "type": "string",
                      "example": "custom"
                    },
                    "letterable": {
                      "type": "boolean",
                      "example": false
                    },
                    "created_at": {
                      "description": "The time the ledger account has been created",
                      "type": "string",
                      "format": "date-time",
                      "example": "2023-08-30T10:08:08.146343Z"
                    },
                    "updated_at": {
                      "description": "The last time the ledger account has been updated",
                      "type": "string",
                      "format": "date-time",
                      "example": "2023-08-30T10:08:08.146343Z"
                    }
                  },
                  "required": [
                    "id",
                    "number",
                    "label",
                    "vat_rate",
                    "country_alpha2",
                    "enabled",
                    "type",
                    "letterable",
                    "created_at",
                    "updated_at"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "error": {
                          "type": "string"
                        },
                        "status": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "error",
                        "status"
                      ]
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message"
                      ]
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "InvalidDateFormat",
                            "InvalidDateTimeFormat",
                            "InvalidEmailFormat",
                            "InvalidPattern",
                            "InvalidUUIDFormat",
                            "LessThanExclusiveMinimum",
                            "LessThanMinimum",
                            "LessThanMinItems",
                            "LessThanMinLength",
                            "MoreThanExclusiveMaximum",
                            "MoreThanMaximum",
                            "MoreThanMaxItems",
                            "MoreThanMaxLength",
                            "NotAMultipartFile",
                            "NotAnyOf",
                            "NotEnumInclude",
                            "NotExistContentTypeDefinition",
                            "NotExistDiscriminatorMappedSchema",
                            "NotExistDiscriminatorPropertyName",
                            "NotExistPropertyDefinition",
                            "NotExistRequiredKey",
                            "NotExistStatusCodeDefinition",
                            "NotNullError",
                            "NotOneOf",
                            "ValidateError"
                          ]
                        }
                      },
                      "required": [
                        "message",
                        "code"
                      ]
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "field": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "InvalidDateFormat",
                            "InvalidDateTimeFormat",
                            "InvalidEmailFormat",
                            "InvalidPattern",
                            "InvalidUUIDFormat",
                            "LessThanExclusiveMinimum",
                            "LessThanMinimum",
                            "LessThanMinItems",
                            "LessThanMinLength",
                            "MoreThanExclusiveMaximum",
                            "MoreThanMaximum",
                            "MoreThanMaxItems",
                            "MoreThanMaxLength",
                            "NotAMultipartFile",
                            "NotAnyOf",
                            "NotEnumInclude",
                            "NotExistContentTypeDefinition",
                            "NotExistDiscriminatorMappedSchema",
                            "NotExistDiscriminatorPropertyName",
                            "NotExistPropertyDefinition",
                            "NotExistRequiredKey",
                            "NotExistStatusCodeDefinition",
                            "NotNullError",
                            "NotOneOf",
                            "ValidateError"
                          ]
                        }
                      },
                      "required": [
                        "message",
                        "field",
                        "code"
                      ]
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "payload": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "InvalidDateFormat",
                            "InvalidDateTimeFormat",
                            "InvalidEmailFormat",
                            "InvalidPattern",
                            "InvalidUUIDFormat",
                            "LessThanExclusiveMinimum",
                            "LessThanMinimum",
                            "LessThanMinItems",
                            "LessThanMinLength",
                            "MoreThanExclusiveMaximum",
                            "MoreThanMaximum",
                            "MoreThanMaxItems",
                            "MoreThanMaxLength",
                            "NotAMultipartFile",
                            "NotAnyOf",
                            "NotEnumInclude",
                            "NotExistContentTypeDefinition",
                            "NotExistDiscriminatorMappedSchema",
                            "NotExistDiscriminatorPropertyName",
                            "NotExistPropertyDefinition",
                            "NotExistRequiredKey",
                            "NotExistStatusCodeDefinition",
                            "NotNullError",
                            "NotOneOf",
                            "ValidateError"
                          ]
                        }
                      },
                      "required": [
                        "message",
                        "payload",
                        "code"
                      ]
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "field": {
                          "type": "string"
                        },
                        "payload": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "InvalidDateFormat",
                            "InvalidDateTimeFormat",
                            "InvalidEmailFormat",
                            "InvalidPattern",
                            "InvalidUUIDFormat",
                            "LessThanExclusiveMinimum",
                            "LessThanMinimum",
                            "LessThanMinItems",
                            "LessThanMinLength",
                            "MoreThanExclusiveMaximum",
                            "MoreThanMaximum",
                            "MoreThanMaxItems",
                            "MoreThanMaxLength",
                            "NotAMultipartFile",
                            "NotAnyOf",
                            "NotEnumInclude",
                            "NotExistContentTypeDefinition",
                            "NotExistDiscriminatorMappedSchema",
                            "NotExistDiscriminatorPropertyName",
                            "NotExistPropertyDefinition",
                            "NotExistRequiredKey",
                            "NotExistStatusCodeDefinition",
                            "NotNullError",
                            "NotOneOf",
                            "ValidateError"
                          ]
                        }
                      },
                      "required": [
                        "message",
                        "field",
                        "payload",
                        "code"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Access token is missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "The access token is invalid"
                    },
                    "status": {
                      "type": "integer",
                      "example": 401
                    }
                  },
                  "required": [
                    "error",
                    "status"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Access to this resource forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Access to this resource requires scope \"ledger\"."
                    },
                    "status": {
                      "type": "integer",
                      "example": 403
                    }
                  },
                  "required": [
                    "error",
                    "status"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Not Found"
                    },
                    "status": {
                      "type": "integer",
                      "example": 404
                    }
                  },
                  "required": [
                    "error",
                    "status"
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://app.pennylane.com/oauth/authorize",
            "tokenUrl": "https://app.pennylane.com/oauth/oauth/token",
            "refreshUrl": "https://app.pennylane.com/oauth/oauth/token",
            "scopes": {
              "ledger": "Grant create, update and read access to Ledger Entries and its related resources"
            }
          }
        }
      }
    }
  }
}
```