> For the complete documentation index, see [llms.txt](https://docs.platform.softwareone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.platform.softwareone.com/developer-resources/rest-api/billing-api/custom-ledger-object/get-custom-ledger-attachment.md).

# Get custom ledger attachment

## Retrieves a specific custom ledger attachment by its ID.

> Depending on the Accept header, returns metadata (application/json) or redirects to file download (301).

```json
{"openapi":"3.0.1","info":{"title":"Marketplace API","version":"5.9.245-gd8302a06"},"servers":[{"url":"https://api.platform.softwareone.com"}],"paths":{"/public/v1/billing/custom-ledgers/{customLedgerId}/attachments/{id}":{"get":{"tags":["CustomLedgerAttachments"],"summary":"Retrieves a specific custom ledger attachment by its ID.","description":"Depending on the Accept header, returns metadata (application/json) or redirects to file download (301).","parameters":[{"name":"id","in":"path","description":"The ID of the custom ledger attachment to retrieve.","required":true,"schema":{"type":"string"}},{"name":"select","in":"query","description":"Optional select statement to specify which fields to include in the response.","schema":{"type":"string"}},{"name":"customLedgerId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomLedgerAttachment"}}}},"301":{"description":"Moved Permanently"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"406":{"description":"Not Acceptable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"CustomLedgerAttachment":{"type":"object","properties":{"audit":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectAudit"}]},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"revision":{"type":"integer","format":"int32"},"name":{"type":"string","description":"Name of the attachment."},"type":{"allOf":[{"$ref":"#/components/schemas/BillingAttachmentType"}],"description":"Specifies the type of the attachment, such as input, output, or general attachment."},"filename":{"type":"string","description":"Represents the name of the file associated with the attachment."},"size":{"type":"integer","description":"Indicates the size of the file in bytes.","format":"int64","nullable":true},"contentType":{"type":"string","description":"Represents the MIME type of the file content."},"description":{"type":"string","description":"Provides a description of the attachment."},"isDeleted":{"type":"boolean","description":"Indicates whether the attachment has been marked as deleted."},"id":{"type":"string","description":"The unique identifier of the attachment."},"customLedger":{"type":"object","allOf":[{"$ref":"#/components/schemas/CustomLedgerRef"}]}},"additionalProperties":false,"description":"Represents an attachment associated with a custom ledger in the billing system."},"PlatformObjectAudit":{"type":"object","properties":{"created":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"updated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true}},"additionalProperties":false},"PlatformObjectEvent":{"type":"object","properties":{"at":{"type":"string","format":"date-time","nullable":true},"by":{"type":"object","allOf":[{"$ref":"#/components/schemas/PlatformIdentityRef"}]}},"additionalProperties":false},"PlatformIdentityRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"}},"additionalProperties":false},"PlatformMetadata":{"type":"object","properties":{"omitted":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"BillingAttachmentType":{"enum":["Attachment","Input","Output"],"type":"string","description":"Represents the type of billing attachment."},"CustomLedgerRef":{"type":"object","properties":{"revision":{"type":"integer","format":"int32"},"id":{"type":"string","description":"The unique identifier of the custom ledger."},"name":{"type":"string","description":"Name of the custom ledger."}},"additionalProperties":false,"description":"Represents a custom ledger in the billing system."},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.platform.softwareone.com/developer-resources/rest-api/billing-api/custom-ledger-object/get-custom-ledger-attachment.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
