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

# List sources groupable in one payment receipt

> Sources that can share a payment receipt with `source`: same customer,
same payment date and received currency, eligible invoice and no
current receipt. Includes `source` itself.




## OpenAPI

````yaml GET /payment-receipts/candidates/
openapi: 3.0.3
info:
  title: Piriod API
  version: 1.0.0
  description: >
    Piriod API for billing, payments, procurement and collections.


    All requests require:

    - `Authorization: Token <api_token>` header.

    - `x-simple-workspace: <workspace_id>` header (the account/workspace
    identifier).

    - Optionally `x-piriod-test-mode: true` to operate against test-mode data.


    See the Documentation tab for getting started, integration flows,
    authentication,

    error handling and pagination/filtering guides.
servers:
  - url: https://api.piriod.com
    description: Production
  - url: https://api.dev.piriod.com
    description: Development
security:
  - TokenAuth: []
paths:
  /payment-receipts/candidates/:
    parameters:
      - $ref: '#/components/parameters/WorkspaceHeader'
      - $ref: '#/components/parameters/TestModeHeader'
    get:
      tags:
        - Billing
      summary: List sources groupable in one payment receipt
      description: |
        Sources that can share a payment receipt with `source`: same customer,
        same payment date and received currency, eligible invoice and no
        current receipt. Includes `source` itself.
      parameters:
        - name: source
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Groupable sources.
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        source:
                          type: string
                        payment:
                          type: string
                        invoice:
                          type: object
                          properties:
                            id:
                              type: string
                            number:
                              type: integer
                            currency:
                              type: string
                            total:
                              type: number
                        amount:
                          type: number
                        received_currency:
                          type: string
                        received_amount:
                          type: number
                        exchange_rate:
                          type: number
                          nullable: true
                        payment_date:
                          type: string
                          format: date
        '400':
          $ref: '#/components/responses/ValidationFailed'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    WorkspaceHeader:
      name: x-simple-workspace
      in: header
      required: true
      schema:
        type: string
      description: Workspace (account) identifier. Required for every request.
      example: acc_01H8XYZ123ABC
    TestModeHeader:
      name: x-piriod-test-mode
      in: header
      required: false
      schema:
        type: boolean
        default: false
      description: Whether to operate against test-mode data. Defaults to `false`.
  responses:
    ValidationFailed:
      description: Request body or query parameters failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationError'
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    ValidationError:
      type: object
      additionalProperties:
        type: array
        items:
          type: string
      description: |
        Field-keyed error map. The special key `non_field_errors` carries
        errors that are not bound to a specific field.
      example:
        name:
          - This field is required.
        non_field_errors:
          - x-simple-workspace header is required.
    Error:
      type: object
      properties:
        detail:
          type: string
          description: Human-readable error message.
      example:
        detail: Authentication credentials were not provided.
  securitySchemes:
    TokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: |
        Use header `Authorization: Token <api_token>`.
        API tokens are obtained from the Piriod dashboard.

````

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