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

# Create a new vendor credit.



## OpenAPI

````yaml api-reference/openapi.json post /api/vendor-credits
openapi: 3.0.0
info:
  title: Bigcapital
  description: Financial accounting software
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /api/vendor-credits:
    post:
      tags:
        - Vendor Credits
      summary: Create a new vendor credit.
      operationId: VendorCreditsController_createVendorCredit
      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
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateVendorCreditDto'
      responses:
        '201':
          description: ''
components:
  schemas:
    CreateVendorCreditDto:
      type: object
      properties:
        vendorId:
          type: number
          description: The id of the vendor
          example: 1
        exchangeRate:
          type: number
          description: The exchange rate of the vendor credit
          example: 1
        vendorCreditNumber:
          type: string
          description: The vendor credit number
          example: '123456'
        referenceNo:
          type: string
          description: The reference number of the vendor credit
          example: '123456'
        vendorCreditDate:
          type: string
          description: The date of the vendor credit
          example: '2021-01-01'
        note:
          type: string
          description: The note of the vendor credit
          example: '123456'
        open:
          type: boolean
          description: The open status of the vendor credit
          example: true
        warehouseId:
          type: number
          description: The warehouse id of the vendor credit
          example: 1
        branchId:
          type: number
          description: The branch id of the vendor credit
          example: 1
        entries:
          description: The entries of the vendor credit
          example:
            - itemId: 1
              quantity: 1
              unitPrice: 1
              discount: 1
              discountType: percentage
              accountId: 1
              amount: 1
          type: array
          items:
            type: string
        attachments:
          description: The attachments of the vendor credit
          example:
            - key: '123456'
          type: array
          items:
            type: string
        discount:
          type: number
          description: The discount of the vendor credit
          example: 1
        discountType:
          type: string
          description: The discount type of the vendor credit
          example: percentage
        adjustment:
          type: number
          description: The adjustment of the vendor credit
          example: 1
      required:
        - vendorId
        - exchangeRate
        - vendorCreditNumber
        - referenceNo
        - vendorCreditDate
        - note
        - open
        - warehouseId
        - branchId
        - entries
        - attachments
        - discount
        - discountType
        - adjustment

````