> ## 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.

# Apply vendor credit to the given bills.



## OpenAPI

````yaml api-reference/openapi.json post /api/vendor-credits/{vendorCreditId}/apply-to-bills
openapi: 3.0.0
info:
  title: Bigcapital
  description: Financial accounting software
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /api/vendor-credits/{vendorCreditId}/apply-to-bills:
    post:
      tags:
        - Vendor Credits Apply Bills
      summary: Apply vendor credit to the given bills.
      operationId: VendorCreditApplyBillsController_applyVendorCreditToBills
      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: vendorCreditId
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplyVendorCreditToBillsDto'
      responses:
        '201':
          description: ''
components:
  schemas:
    ApplyVendorCreditToBillsDto:
      type: object
      properties:
        entries:
          description: Entries of bill ID and amount to apply
          example:
            - billId: 1
              amount: 100.5
            - billId: 2
              amount: 50
          type: array
          items:
            $ref: '#/components/schemas/ApplyVendorCreditToBillEntryDto'
      required:
        - entries
    ApplyVendorCreditToBillEntryDto:
      type: object
      properties:
        billId:
          type: number
          description: Bill ID to apply vendor credit to
          example: 1
        amount:
          type: number
          description: Amount to apply
          example: 100.5
      required:
        - billId
        - amount

````