> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anythingmd.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a receipt

> Returns a receipt by id (rcpt_<jobId>).



## OpenAPI

````yaml /openapi.json get /api/v1/receipts/{receiptId}
openapi: 3.1.0
info:
  title: AnythingMD API
  version: 1.0.0-preview
  description: >-
    Convert PDFs, Office documents, spreadsheets and images into Markdown.
    Guides, pricing and limits: https://docs.anythingmd.com. Preview: available
    to workspaces that have purchased credits.
servers:
  - url: https://anythingmd.com
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Uploads
    description: Stage a source document for conversion
  - name: Jobs
    description: Create and observe async conversion work
  - name: Artifacts
    description: Retrieve job outputs
  - name: Quotes
    description: See what a conversion would cost before starting it.
  - name: Receipts
    description: What a job was charged. Receipts outlive the job.
paths:
  /api/v1/receipts/{receiptId}:
    get:
      tags:
        - Receipts
      summary: Get a receipt
      description: Returns a receipt by id (rcpt_<jobId>).
      operationId: getReceipt
      parameters:
        - name: receiptId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            description: Id of a usage receipt
      responses:
        '200':
          description: Usage receipt
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Receipt'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: >-
            Authenticated, but the credential lacks the scope this operation
            requires (code: insufficient_scope). Reads need documents:read,
            uploads and job creation need documents:write, cancel needs
            documents:delete. Checked before the resource is looked up, so this
            never reveals whether the resource exists.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - BearerAuth: []
components:
  schemas:
    Receipt:
      type: object
      properties:
        id:
          type: string
          minLength: 1
          description: 'Receipt id (stable: rcpt_<jobId>)'
        jobId:
          type: string
          minLength: 1
          description: Id of an async job
        quoteId:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          description: Quote id when one was pinned
        artifactIds:
          type: array
          items:
            type: string
            minLength: 1
          description: Artifact ids produced by the job
        holdId:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
        tenantId:
          type: string
          minLength: 1
        actorPrincipalId:
          type: string
          minLength: 1
        actorType:
          type: string
          minLength: 1
        credentialId:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
        channel:
          type: string
          minLength: 1
        usage:
          type: object
          properties:
            inputBytes:
              description: Source document size in bytes
              type: integer
              minimum: 0
              maximum: 9007199254740991
            discoveredPages:
              description: Pages detected in the source
              type: integer
              minimum: 0
              maximum: 9007199254740991
            ocrPages:
              description: Pages that required OCR
              type: integer
              minimum: 0
              maximum: 9007199254740991
            outputBytes:
              description: Produced artifact bytes
              type: integer
              minimum: 0
              maximum: 9007199254740991
            durationMs:
              description: Wall-clock processing time in milliseconds
              type: integer
              minimum: 0
              maximum: 9007199254740991
          additionalProperties: false
          description: Natural units; not a second bill
        sourceFormat:
          type:
            - string
            - 'null'
        reservedCredits:
          type: integer
          minimum: 0
          maximum: 9007199254740991
          description: Credits reserved when the job started
        settledCredits:
          type: integer
          minimum: 0
          maximum: 9007199254740991
          description: Credits actually captured; 0 when the hold was released
        priceVersion:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
        tier:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          description: Pricing tier the job was charged at, e.g. standard
        fundingSource:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
        originalReceiptId:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          description: Set on refund/correction receipts; null on the original
        kind:
          type: string
          enum:
            - original
            - refund
            - correction
        outcome:
          type: string
          minLength: 1
        errorCode:
          type:
            - string
            - 'null'
        metronomeEventId:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
        stripeInvoiceId:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
        occurredAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
        createdAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
      required:
        - id
        - jobId
        - quoteId
        - artifactIds
        - holdId
        - tenantId
        - actorPrincipalId
        - actorType
        - credentialId
        - channel
        - usage
        - sourceFormat
        - reservedCredits
        - settledCredits
        - priceVersion
        - tier
        - fundingSource
        - originalReceiptId
        - kind
        - outcome
        - errorCode
        - metronomeEventId
        - stripeInvoiceId
        - occurredAt
        - createdAt
      additionalProperties: false
    ApiError:
      type: object
      properties:
        error:
          type: string
          description: User-facing error message
        code:
          description: Optional machine-readable error code (e.g. invalid_request)
          type: string
      required:
        - error
      additionalProperties: false
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: >-
        Create a key under Settings → API Keys and send it as `Authorization:
        Bearer amd_live_…`. See https://docs.anythingmd.com/authentication.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.