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

# Create a partner-settled stock donation pledge

> 
    Creates a liquidated stock donation pledge for a donation that has already settled at a tech-platform partner.

    Authentication is required:
    - A valid tech-platform API key
    - An Endaoment user via the `x-endaoment-user-id` header

    This endpoint allows permissioned partners to:
    - Record an already-settled stock donation against a receiving fund
    - Provide the settled stock metadata and partner operation reference
    - Create the resulting placeholder Donation in the same transaction
    



## OpenAPI

````yaml https://api.endaoment.org/oas-json post /v1/donation-pledges/partner/stock-settled
openapi: 3.0.0
info:
  title: Endaoment API
  description: >-
    The official Endaoment API endpoints. Dev (canary) = newest features;
    Staging (stable) = pre-production.
  version: 0.0.1
  contact: {}
servers:
  - url: https://api.endaoment.org
    description: Production
security: []
tags: []
paths:
  /v1/donation-pledges/partner/stock-settled:
    post:
      tags:
        - Donation Pledges
      summary: Create a partner-settled stock donation pledge
      description: |2-

            Creates a liquidated stock donation pledge for a donation that has already settled at a tech-platform partner.

            Authentication is required:
            - A valid tech-platform API key
            - An Endaoment user via the `x-endaoment-user-id` header

            This endpoint allows permissioned partners to:
            - Record an already-settled stock donation against a receiving fund
            - Provide the settled stock metadata and partner operation reference
            - Create the resulting placeholder Donation in the same transaction
            
      operationId: DonationPledgesController_createSettledStockPledge
      parameters:
        - name: x-endaoment-user-id
          in: header
          description: UUID of the Endaoment user for this partner-settled operation
          required: true
          schema:
            type: string
        - name: x-api-key
          in: header
          description: Partner API key used for authentication
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SettledStockPledgeInputDto'
      responses:
        '201':
          description: Partner-settled stock donation pledge successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateDonationPledgeResponseDto'
        '400':
          description: Invalid stock pledge input data provided
        '401':
          description: Missing or invalid partner auth, or user could not be resolved
        '403':
          description: Partner is authenticated but not configured for settled operations
        '409':
          description: >-
            Idempotency conflict: the provided `idempotencyKey` is already bound
            to a different `partnerOperationId`, or the `partnerOperationId` has
            already been recorded under a different key
      security:
        - ApiKey: []
components:
  schemas:
    SettledStockPledgeInputDto:
      type: object
      properties:
        stockPledgeData:
          description: Settled stock pledge details reported by the partner
          allOf:
            - $ref: '#/components/schemas/SettledStockPledgeDataDto'
        receivingFundId:
          type: string
          description: Unique identifier of the receiving fund
          format: uuid
          example: 123e4567-e89b-12d3-a456-426614174000
        idempotencyKey:
          type: string
          description: Client-generated key to ensure idempotency of the request
          format: uuid
          example: 123e4567-e89b-12d3-a456-426614174000
        donationValueMicroDollars:
          type: string
          description: Settled donation value in microdollars
          example: '50000000000'
        partnerOperationId:
          type: string
          description: Partner-owned reference for this operation
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
          maxLength: 36
      required:
        - stockPledgeData
        - receivingFundId
        - idempotencyKey
        - donationValueMicroDollars
        - partnerOperationId
    CreateDonationPledgeResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the created donation pledge
          example: 123e4567-e89b-12d3-a456-426614174000
          format: uuid
      required:
        - id
    SettledStockPledgeDataDto:
      type: object
      properties:
        shares:
          type: number
          description: Number of shares already donated by the partner (must be positive)
          example: 100
          minimum: 1
        ticker:
          type: string
          description: Stock ticker symbol
          example: AAPL
        lots:
          description: Optional lot information for the donated shares
          type: array
          items:
            $ref: '#/components/schemas/StockLotDataDto'
      required:
        - shares
        - ticker
    StockLotDataDto:
      type: object
      properties:
        numberOfShares:
          type: number
          description: Number of shares in this lot
          example: 50
          minimum: 0
        purchasePrice:
          type: number
          description: Purchase price per share in this lot
          example: 150.75
          minimum: 0
        purchaseDate:
          format: date-time
          type: string
          description: Date when the shares in this lot were purchased
          example: '2023-01-15T00:00:00.000Z'
        employeeStockPlan:
          type: string
          description: Type of employee stock plan (if applicable)
          enum:
            - Exercised
            - ESPP
            - Restricted
          example: RSU
        lotId:
          type: string
          description: Alphanumeric identifier for this lot
          example: LOT123
          pattern: ^[a-zA-Z0-9]+$
      required:
        - numberOfShares
        - purchasePrice
        - purchaseDate

````