OpenAPI Specification
openapi: 3.0.0
info:
title: batches vendor-credits API
description: Batches help you track inventory items by batch numbers, manufacturing dates, and expiration dates.
contact: {}
version: 1.0.0
servers:
- url: https://www.zohoapis.com/inventory/v1
description: API Endpoint
tags:
- name: vendor-credits
description: Vendor-Credits Module
paths:
/vendorcredits:
x-mcp-group:
- Vendor Credits
parameters:
- $ref: '#/components/parameters/organization_id'
post:
tags:
- vendor-credits
operationId: create_vendor_credit
summary: Create a vendor credit
description: Create a vendor credit for a vendor.
parameters:
- name: ignore_auto_number_generation
in: query
description: Ignore auto number generation for this vendor credit only. On enabling this option vendor credit number is mandatory.
required: false
schema:
type: boolean
- name: bill_id
in: query
description: Bill Associated with the Vendor Credit
required: false
schema:
type: string
example: '460000000057075'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/create-a-vendor-credit-request'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/create-a-vendor-credit-response'
deprecated: false
security:
- Zoho_Auth:
- ZohoInventory.debitnotes.CREATE
get:
tags:
- vendor-credits
operationId: list_vendor_credits
summary: List vendor credits
description: List vendor credits with pagination.
parameters:
- name: vendor_credit_number
in: query
description: 'Search vendor credits by vendor credit number. Variants: <code>vendor_credit_number_startswith</code> and <code>vendor_credit_number_contains</code>'
required: false
schema:
type: string
example: DN-00002
- name: date
in: query
description: 'General Format: yyyy-mm-dd. Search vendor credits by date. Variants: <code>date.start</code>, <code>date.end</code>, <code>date.before</code> and <code>date.after</code>'
required: false
schema:
type: string
example: '2014-08-28'
- name: status
in: query
description: 'Search vendor credits by vendor credit status. Allowed statuses are open, closed and void. Allowed Values: <code>open</code>, <code>closed</code> and <code>void</code>'
required: false
schema:
type: string
example: open
- name: total
in: query
description: 'Search vendor credits by total amount. Variants: <code>total_start</code>, <code>total_end</code>, <code>total_less_than</code>, <code>total_less_equals</code>, <code>total_greater_than</code> and <code>total_greater_equals</code>'
required: false
schema:
type: string
example: 30
- name: reference_number
in: query
description: 'Search vendor credits by vendor credit reference number. Variants: <code>reference_number_startswith</code> and <code>reference_number_contains</code>'
required: false
schema:
type: string
example: ''
- name: customer_name
in: query
description: 'Search vendor credits by vendor name. Variants: <code>customer_name_startswith</code> and <code>customer_name_contains</code>'
required: false
schema:
type: string
example: Bowman and Co
- name: item_name
in: query
description: 'Search vendor credits by item name. Variants: <code>item_name_startswith</code> and <code>item_name_contains</code>'
required: false
schema:
type: string
example: ''
- name: item_description
in: query
description: 'Search vendor credits by vendor credit item description. Variants: <code>item_description_startswith</code> and <code>item_description_contains</code>'
required: false
schema:
type: string
example: ''
- name: notes
in: query
description: 'Search vendor credits by vendor credit notes. Variants: <code>notes_startswith</code> and <code>notes_contains</code>'
required: false
schema:
type: string
example: ''
- name: custom_field
in: query
description: 'Search vendor credits by custom field. Variants : <code>custom_field_startswith</code> and <code>custom_field_contains</code>'
required: false
schema:
type: string
example: ''
- name: last_modified_time
in: query
description: Search vendor credits by vendor credit last modfified time
required: false
schema:
type: string
example: 2014-08-28T22:53:31-0700
- name: customer_id
in: query
description: Search vendor credits by vendor credit customer ID
required: false
schema:
type: string
example: ''
- name: line_item_id
in: query
description: Search vendor credits by vendor credit line item ID
required: false
schema:
type: string
example: '460000000020077'
- name: item_id
in: query
description: Search vendor credits by vendor credit item ID
required: false
schema:
type: string
example: '460000000020071'
- name: tax_id
in: query
description: Search vendor credits by vendor credit tax ID
required: false
schema:
type: string
example: ''
- name: filter_by
in: query
description: 'Filter vendor credits by statuses. Allowed Values: <code>Status.All</code>, <code>Status.Open</code>, <code>Status.Draft</code>, <code>Status.Closed</code> and <code>Status.Void</code>.'
required: false
schema:
type: string
example: ''
- name: search_text
in: query
description: Search vendor credits by vendor credit number or vendor name or vendor credit reference number.
required: false
schema:
type: string
example: ''
- name: sort_column
in: query
description: 'Sort vendor credits by following columns vendor_name, vendorcredit_number, balance, total, date and created_time. Allowed Values: <code>vendor_name</code>, <code>vendor_credit_number</code>, <code>balance</code>, <code>total</code>, <code>date</code>, <code>created_time</code>, <code>last_modified_time</code> and <code>reference_number</code>.'
required: false
schema:
type: string
example: created_time
- name: page
in: query
description: Page number to be fetched. Default value is 1.
required: false
schema:
type: integer
default: 1
example: 1
- name: per_page
in: query
description: Number of records to be fetched per page. Default value is 200.
required: false
schema:
type: integer
default: 200
example: 200
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/list-vendor-credits-response'
deprecated: false
security:
- Zoho_Auth:
- ZohoInventory.debitnotes.READ
/vendorcredits/{vendor_credit_id}:
x-mcp-group:
- Vendor Credits
parameters:
- name: vendor_credit_id
in: path
required: true
description: Unique identifier of the vendor credit.
schema:
type: string
example: '3000000002075'
- $ref: '#/components/parameters/organization_id'
put:
tags:
- vendor-credits
operationId: update_vendor_credit
summary: Update vendor credit
description: Update an existing vendor credit.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/update-vendor-credit-request'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/update-vendor-credit-response'
deprecated: false
security:
- Zoho_Auth:
- ZohoInventory.debitnotes.UPDATE
get:
tags:
- vendor-credits
operationId: get_vendor_credit
summary: Get vendor credit
description: Get details of a vendor credit.
parameters:
- name: print
in: query
description: 'Export vendor credit pdf with default print option. Allowed Values: <code>true</code>, <code>false</code>, <code>on</code> and <code>off</code>.'
required: false
schema:
type: boolean
- name: accept
in: query
description: 'You can get vendor credit details as json/pdf/html. Default format is html. Allowed Values: <code>json</code>, <code>xml</code>, <code>csv</code>, <code>xls</code>, <code>pdf</code>, <code>html</code> and <code>jhtml</code>.'
required: false
schema:
type: string
example: ''
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/get-vendor-credit-response'
deprecated: false
security:
- Zoho_Auth:
- ZohoInventory.debitnotes.READ
delete:
tags:
- vendor-credits
operationId: delete_vendor_credit
summary: Delete vendor credit
description: Delete a vendor credit.
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/delete-vendor-credit-response'
deprecated: false
security:
- Zoho_Auth:
- ZohoInventory.debitnotes.DELETE
/vendorcredits/{vendor_credit_id}/status/open:
x-mcp-group:
- Vendor Credits
parameters:
- name: vendor_credit_id
in: path
required: true
description: Unique identifier of the vendor credit.
schema:
type: string
example: '3000000002075'
- $ref: '#/components/parameters/organization_id'
post:
tags:
- vendor-credits
operationId: mark_vendor_credit_as_open
summary: Convert to open
description: Change an existing vendor credit status to open.
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/convert-to-open-response'
deprecated: false
security:
- Zoho_Auth:
- ZohoInventory.debitnotes.CREATE
/vendorcredits/{vendor_credit_id}/status/void:
x-mcp-group:
- Vendor Credits
parameters:
- name: vendor_credit_id
in: path
required: true
description: Unique identifier of the vendor credit.
schema:
type: string
example: '3000000002075'
- $ref: '#/components/parameters/organization_id'
post:
tags:
- vendor-credits
operationId: mark_vendor_credit_as_void
summary: Void vendor credit
description: Mark an existing vendor credit as void.
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/void-vendor-credit-response'
deprecated: false
security:
- Zoho_Auth:
- ZohoInventory.debitnotes.CREATE
/vendorcredits/{vendor_credit_id}/submit:
x-mcp-group:
- Vendor Credits
parameters:
- name: vendor_credit_id
in: path
required: true
description: Unique identifier of the vendor credit.
schema:
type: string
example: '3000000002075'
- $ref: '#/components/parameters/organization_id'
post:
tags:
- vendor-credits
operationId: submit_vendor_credit
summary: Submit a Vendor credit for approval
description: Submit a Vendor credit for approval.
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/submit-a-vendor-credit-for-approval-response'
deprecated: false
security:
- Zoho_Auth:
- ZohoInventory.debitnotes.CREATE
/vendorcredits/{vendor_credit_id}/approve:
x-mcp-group:
- Vendor Credits
parameters:
- name: vendor_credit_id
in: path
required: true
description: Unique identifier of the vendor credit.
schema:
type: string
example: '3000000002075'
- $ref: '#/components/parameters/organization_id'
post:
tags:
- vendor-credits
operationId: approve_vendor_credit
summary: Approve a Vendor credit
description: Approve a Vendor credit.
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/approve-a-vendor-credit-response'
deprecated: false
security:
- Zoho_Auth:
- ZohoInventory.debitnotes.CREATE
/vendorcredits/{vendor_credit_id}/bills:
x-mcp-group:
- Vendor Credits
parameters:
- name: vendor_credit_id
in: path
required: true
description: Unique identifier of the vendor credit.
schema:
type: string
example: '3000000002075'
- $ref: '#/components/parameters/organization_id'
get:
tags:
- vendor-credits
operationId: list_vendor_credited_bills
summary: List bills credited
description: List bills to which the vendor credit is applied.
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/list-bills-credited-response'
deprecated: false
security:
- Zoho_Auth:
- ZohoInventory.debitnotes.READ
post:
tags:
- vendor-credits
operationId: apply_vendor_credit_to_bill
summary: Apply credits to a bill
description: Apply vendor credit to existing bills.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/apply-credits-to-a-bill-request'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/apply-credits-to-a-bill-response'
deprecated: false
security:
- Zoho_Auth:
- ZohoInventory.debitnotes.CREATE
/vendorcredits/{vendor_credit_id}/bills/{vendor_credit_bill_id}:
x-mcp-group:
- Vendor Credits
parameters:
- name: vendor_credit_id
in: path
required: true
description: Unique identifier of the vendor credit.
schema:
type: string
example: '3000000002075'
- $ref: '#/components/parameters/organization_id'
delete:
tags:
- vendor-credits
operationId: delete_vendor_credited_bill
summary: Delete bills credited
description: Delete the credits applied to a bill.
parameters:
- name: vendor_credit_bill_id
in: path
required: true
description: Unique identifier of the vendor credit bill.
schema:
type: string
example: '460000000057075'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/delete-bills-credited-response'
deprecated: false
security:
- Zoho_Auth:
- ZohoInventory.debitnotes.DELETE
/vendorcredits/{vendor_credit_id}/refunds:
x-mcp-group:
- Vendor Credits
parameters:
- name: vendor_credit_id
in: path
required: true
description: Unique identifier of the vendor credit.
schema:
type: string
example: '3000000002075'
- $ref: '#/components/parameters/organization_id'
post:
tags:
- vendor-credits
operationId: refund_vendor_credit
summary: Refund a vendor credit
description: Refund vendor credit amount.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/refund-a-vendor-credit-request'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/refund-a-vendor-credit-response'
deprecated: false
security:
- Zoho_Auth:
- ZohoInventory.debitnotes.CREATE
get:
tags:
- vendor-credits
operationId: list_refunds_of_a_vendor_credit
summary: List refunds of a vendor credit
description: List all refunds of an existing vendor credit.
parameters:
- name: page
in: query
description: Page number to be fetched. Default value is 1.
required: false
schema:
type: integer
default: 1
example: 1
- name: per_page
in: query
description: Number of records to be fetched per page. Default value is 200.
required: false
schema:
type: integer
default: 200
example: 200
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/list-refunds-of-a-vendor-credit-response'
deprecated: false
security:
- Zoho_Auth:
- ZohoInventory.debitnotes.READ
/vendorcredits/{vendor_credit_id}/refunds/{vendor_credit_refund_id}:
x-mcp-group:
- Vendor Credits
parameters:
- name: vendor_credit_id
in: path
required: true
description: Unique identifier of the vendor credit.
schema:
type: string
example: '3000000002075'
- $ref: '#/components/parameters/organization_id'
put:
tags:
- vendor-credits
operationId: update_vendor_credit_refund
summary: Update vendor credit refund
description: Update the refunded transaction.
parameters:
- name: vendor_credit_refund_id
in: path
required: true
description: Unique identifier of the vendor credit refund.
schema:
type: string
example: '3000000003151'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/update-vendor-credit-refund-request'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/update-vendor-credit-refund-response'
deprecated: false
security:
- Zoho_Auth:
- ZohoInventory.debitnotes.UPDATE
get:
tags:
- vendor-credits
operationId: get_vendor_credit_refund
summary: Get vendor credit refund
description: Get refund of a particular vendor credit.
parameters:
- name: vendor_credit_refund_id
in: path
required: true
description: Unique identifier of the vendor credit refund.
schema:
type: string
example: '3000000003151'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/get-vendor-credit-refund-response'
deprecated: false
security:
- Zoho_Auth:
- ZohoInventory.debitnotes.READ
delete:
tags:
- vendor-credits
operationId: delete_vendor_credit_refund
summary: Delete vendor credit refund
description: Delete a vendor credit refund.
parameters:
- name: vendor_credit_refund_id
in: path
required: true
description: Unique identifier of the vendor credit refund.
schema:
type: string
example: '3000000003151'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/delete-vendor-credit-refund-response'
deprecated: false
security:
- Zoho_Auth:
- ZohoInventory.debitnotes.DELETE
/vendorcredits/refunds:
x-mcp-group:
- Vendor Credits
parameters:
- $ref: '#/components/parameters/organization_id'
get:
tags:
- vendor-credits
operationId: list_refunds_of_all_vendor_credits
summary: List vendor credit refunds
description: List all refunds with pagination.
parameters:
- name: customer_id
in: query
description: Search vendor credits by vendor credit customer ID
required: false
schema:
type: string
example: ''
- name: last_modified_time
in: query
description: Search vendor credits by vendor credit last modfified time
required: false
schema:
type: string
example: 2014-08-28T22:53:31-0700
- name: sort_column
in: query
description: 'Sort vendor credits by following columns vendor_name, vendorcredit_number, balance, total, date and created_time. Allowed Values: <code>vendor_name</code>, <code>vendor_credit_number</code>, <code>balance</code>, <code>total</code>, <code>date</code>, <code>created_time</code>, <code>last_modified_time</code> and <code>reference_number</code>.'
required: false
schema:
type: string
example: created_time
- name: page
in: query
description: Page number to be fetched. Default value is 1.
required: false
schema:
type: integer
default: 1
example: 1
- name: per_page
in: query
description: Number of records to be fetched per page. Default value is 200.
required: false
schema:
type: integer
default: 200
example: 200
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/list-vendor-credit-refunds-response'
deprecated: false
security:
- Zoho_Auth:
- ZohoInventory.debitnotes.READ
/vendorcredits/{vendor_credit_id}/comments:
x-mcp-group:
- Vendor Credits
parameters:
- name: vendor_credit_id
in: path
required: true
description: Unique identifier of the vendor credit.
schema:
type: string
example: '3000000002075'
- $ref: '#/components/parameters/organization_id'
post:
tags:
- vendor-credits
operationId: add_vendor_credit_comment
summary: Add a comment
description: Add a comment to an existing vendor credit.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/add-a-comment-request'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/add-a-comment-response'
deprecated: false
security:
- Zoho_Auth:
- ZohoInventory.debitnotes.CREATE
get:
tags:
- vendor-credits
operationId: list_vendor_credit_comments
summary: List vendor credit comments & history
description: Get history and comments of a vendor credit.
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/list-vendor-credit-comments-and-history-response'
deprecated: false
security:
- Zoho_Auth:
- ZohoInventory.debitnotes.READ
/vendorcredits/{vendor_credit_id}/comments/{comment_id}:
x-mcp-group:
- Vendor Credits
parameters:
- name: vendor_credit_id
in: path
required: true
description: Unique identifier of the vendor credit.
schema:
type: string
example: '3000000002075'
- $ref: '#/components/parameters/organization_id'
delete:
tags:
- vendor-credits
operationId: delete_vendor_credit_comment
summary: Delete a comment
description: Delete a vendor credit comment.
parameters:
- name: comment_id
in: path
required: true
description: Unique identifier of the comment.
schema:
type: string
example: '3000000002089'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/delete-a-comment-response'
deprecated: false
security:
- Zoho_Auth:
- ZohoInventory.debitnotes.DELETE
components:
schemas:
vendor_credit_number:
description: Number of the Vendor Credit
type: string
example: DN-00002
transaction_id:
description: Transaction ID that caused the Comment
type: string
example: '460000000069087'
item_custom_fields:
type: array
description: List of custom fields associated with the line item
items:
type: object
properties:
label:
$ref: '#/components/schemas/label'
value:
$ref: '#/components/schemas/value'
imported_transactions:
type: array
items:
type: object
properties:
imported_transaction_id:
$ref: '#/components/schemas/imported_transaction_id'
date:
$ref: '#/components/schemas/date'
amount:
$ref: '#/components/schemas/amount'
payee:
$ref: '#/components/schemas/payee'
description:
$ref: '#/components/schemas/description'
reference_number:
$ref: '#/components/schemas/reference_number'
status:
$ref: '#/components/schemas/status'
account_id:
$ref: '#/components/schemas/account_id'
reverse_charge_tax_amount:
description: Tax amount of the reverse charge
type: number
format: double
example: 100
x-node_available_in:
- in
x-node_unavailable_in: []
taxes:
type: array
items:
type: object
properties:
tax_name:
$ref: '#/components/schemas/tax_name'
tax_amount:
$ref: '#/components/schemas/tax_amount'
vendor_name:
description: Name of the Vendor Associated with the Vendor Credit
type: string
example: Bowman and Co
batches:
description: Batch details for the line item. Reference an existing batch using <code>batch_id</code>. Applicable only for items with batch tracking enabled.
type: array
items:
type: object
required:
- batch_id
- out_quantity
properties:
batch_id:
description: Unique identifier of an existing batch.
type: string
example: '6780203000000214019'
out_quantity:
description: Quantity removed from the batch.
type: number
format: float
example: 2
storages:
description: Bin/storage locations from which stock was issued for this batch.
type: array
x-node_available_in:
- Batch with Bin tracked items
items:
type: object
required:
- storage_id
- out_quantity
properties:
storage_id:
description: Unique identifier of the bin/storage location.
type: string
example: '6780203000000093226'
out_quantity:
description: Quantity removed from the bin.
type: number
format: float
example: 2
update-vendor-credit-refund-request:
required:
- date
- amount
- account_id
type: object
properties:
date:
$ref: '#/components/schemas/date'
refund_mode:
$ref: '#/components/schemas/refund_mode'
reference_number:
$ref: '#/components/schemas/reference_number'
amount:
$ref: '#/components/schemas/amount'
exchange_rate:
$ref: '#/components/schemas/exchange_rate'
account_id:
$ref: '#/components/schemas/account_id'
description:
$ref: '#/components/schemas/description'
item_id:
description: ID of the item.
type: string
example: '460000000020071'
sub_total:
type: number
format: double
example: 30
comments:
type: array
items:
type: object
properties:
comment_id:
$ref: '#/components/schemas/comment_id'
vendor_credit_id:
$ref: '#/components/schemas/vendor_credit_id'
description:
$ref: '#/components/schemas/description'
commented_by_id:
$ref: '#/components/schemas/commented_by_id'
commented_by:
$ref: '#/components/schemas/commented_by'
comment_type:
$ref: '#/components/schemas/comment_type'
date:
$ref: '#/components/schemas/date'
date_description:
$ref: '#/components/schemas/date_description'
time:
$ref: '#/components/schemas/time'
operation_type:
$ref: '#/components/schemas/operation_type'
transaction_id:
$ref: '#/components/schemas/transaction_id'
transaction_type:
$ref: '#/components/schemas/transaction_type'
account_id:
description: ID of the account, the line item is associated with
type: string
example: '460000000020097'
serial_numbers:
description: Serial numbers for the line item. Applicable only for items with serial tracking enabled.
type: array
items:
type: string
example: ARMP-0078
documents:
type: array
description: List of documents associated with the vendor credit
items:
type: object
properties:
document_id:
$ref: '#/components/schemas/document_id'
file_name:
$ref: '#/components/schemas/file_name'
date:
description: The date the vendor credit is created. [yyyy-mm-dd]
type: string
example: '2014-08-28'
bills_credited:
type: array
items:
type: object
properties:
bill_id:
description: ID of the Bill Credited
type: string
example: '460000000057075'
vendor_credit_bill_id:
$ref: '#/components/schemas/vendor_credit_bill_id'
date:
description: Date of the Bill Credit
type: string
example: '2014-08-30'
bill_number:
description: Number of the Bill Credited
type: string
amount:
description: Amount that is credited in the bill
type: number
format: double
example: 13
item_total:
description: Total price of the Item
type: number
format: double
example: 30
update-vendor-credit-request:
required:
- vendor_id
type: object
properties:
vendor_id:
$ref: '#/components/schemas/vendor_id'
vat_treatment:
$ref: '#/components/schemas/vat_treatment'
vendor_credit_number:
description: Mandatory if auto number generation is disabled.
type: string
example: DN-00002
gst_treatment:
$ref: '#/components/schemas/gst_treatment'
tax_treatment:
$ref: '#/components/schemas/tax_treatment'
gst_no:
$ref: '#/components/schemas/gst_no'
source_of_supply:
# --- truncated at 32 KB (97 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/zoho-inventory/refs/heads/main/openapi/zoho-inventory-vendor-credits-api-openapi.yml