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

# Edit the given sale receipt.



## OpenAPI

````yaml api-reference/openapi.json put /api/sale-receipts/{id}
openapi: 3.0.0
info:
  title: Bigcapital
  description: Financial accounting software
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /api/sale-receipts/{id}:
    put:
      tags:
        - Sale Receipts
      summary: Edit the given sale receipt.
      operationId: SaleReceiptsController_editSaleReceipt
      parameters:
        - name: Authorization
          in: header
          description: >-
            Value must be 'Bearer <token>' where <token> is an API key prefixed
            with 'bc_' or a JWT token.
          required: true
          schema:
            type: string
            example: Bearer bc_1234567890abcdef
        - name: organization-id
          in: header
          description: >-
            Required if Authorization is a JWT token. The organization ID to
            operate within.
          required: true
          schema:
            type: string
        - name: id
          required: true
          in: path
          description: The sale receipt id
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditSaleReceiptDto'
      responses:
        '200':
          description: ''
components:
  schemas:
    EditSaleReceiptDto:
      type: object
      properties:
        customerId:
          type: number
          description: The id of the customer
          example: 1
        exchangeRate:
          type: number
          description: The exchange rate of the sale receipt
          example: 1
        depositAccountId:
          type: number
          description: The id of the deposit account
          example: 1
        receiptDate:
          format: date-time
          type: string
          description: The date of the sale receipt
          example: '2021-01-01'
        receiptNumber:
          type: string
          description: The receipt number of the sale receipt
          example: '123456'
        referenceNo:
          type: string
          description: The reference number of the sale receipt
          example: '123456'
        closed:
          type: boolean
          description: Whether the sale receipt is closed
          example: false
        warehouseId:
          type: number
          description: The id of the warehouse
          example: 1
        branchId:
          type: number
          description: The id of the branch
          example: 1
        entries:
          description: The entries of the sale receipt
          example:
            - key: '123456'
          type: array
          items:
            type: string
        receiptMessage:
          type: string
          description: The receipt message of the sale receipt
          example: '123456'
        statement:
          type: string
          description: The statement of the sale receipt
          example: '123456'
        attachments:
          description: The attachments of the sale receipt
          example:
            - key: '123456'
          type: array
          items:
            type: string
        pdfTemplateId:
          type: number
          description: The id of the pdf template
          example: 1
        discount:
          type: number
          description: The discount of the sale receipt
          example: 1
        discountType:
          type: string
          description: The discount type of the sale receipt
          example: percentage
        adjustment:
          type: number
          description: The adjustment of the sale receipt
          example: 1
      required:
        - customerId
        - exchangeRate
        - depositAccountId
        - receiptDate
        - receiptNumber
        - referenceNo
        - closed
        - warehouseId
        - branchId
        - entries
        - receiptMessage
        - statement
        - attachments
        - pdfTemplateId
        - discount
        - discountType
        - adjustment

````