Top

Vendor Credits

List vendor credits
GET /vendorcredits
List vendor credits with pagination.
Get vendor credit
GET /vendorcredits/:vendor_credit_id
Get details of a vendor credit.
Create a vendor credit
POST /vendorcredits
Create a vendor credit for a vendor.
Update vendor credit
PUT /vendorcredits/:vendor_credit_id
Update an existing vendor credit.
Delete vendor credit
DELETE /vendorcredits/:vendor_credit_id
Delete a vendor credit.
Convert to open
POST /vendorcredits/:vendor_credit_id/status/open
Change an existing vendor credit status to open.
Void vendor credit
POST /vendorcredits/:vendor_credit_id/status/void
Mark an existing vendor credit as void.

List vendor credits

GET  /vendorcredits

List vendor credits with pagination.

Parameters

vendor_credit_number string
[100]
Search vendor credits by vendor credit number.
Variants: vendor_credit_number.startswith and vendor_credit_number.contains
date string
[yyyy-mm-dd]
Search vendor credits by date.
Variants: date.start, date.end, date.before and date.after
status string Search vendor credits by vendor credit status. Allowed statuses are open, closed and void.
Allowed Values: open, closed and void
total double Search vendor credits by total amount.
Variants: total.start, total.end, total.less_than, total.less_equals, total.greater_than and total.greater_equals
reference_number string
[100]
Search vendor credits by vendor credit reference number.
Variants: reference_number.startswith and reference_number.contains
vendor_name string
[100]
Search vendor credits by vendor name.
Variants: vendor_name.startswith and vendor_name.contains
item_name string
[100]
Search vendor credits by item name.
Variants: item_name.startswith and item_name.contains
item_description string
[100]
Search vendor credits by vendor credit item description.
Variants: item_description.startswith and item_description.contains
vendor_id string Search vendor credits by vendor id.
line_item_id string Search vendor credits by vendor credit line item id.
item_id string Search vendor credits by item id.
tax_id string Search vendor credits by tax id.
filter_by string Filter vendor credits by statuses.
Allowed Values: Status.All, Status.Open, Status.Draft, Status.Closed and Status.Void
search_text string
[100]
Search vendor credits by vendor credit number or vendor name or vendor credit reference number.
sort_column string Sort vendor credits by following columns vendor_name, vendorcredit_number, balance, total, date and created_time.
_Allowed Values
: vendor_name, vendor_credit_number, balance, total, date, created_time, last_modified_time and reference_number

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
      "code": 0,
      "message": "success",
      "vendorcredits": [
        {
          "vendor_credit_id": "3000000002075",
          "vendor_credit_number": "DN-00002",
          "status": "open",
          "reference_number": "",
          "date": "2014-08-28",
          "total": 30.00,
          "balance": 30.00,
          "vendor_id": "",
          "vendor_name": "Bowman and Co",
          "currency_id": "3000000000083",
          "currency_code": "USD",
          "created_time": "2014-08-28T22:52:31-0700",
          "last_modified_time": "2014-08-28T22:52:31-0700"
        },
        {
          "vendor_credit_id": "3000000002045",
          "vendor_credit_number": "DN-00001",
          "status": "open",
          "reference_number": "",
          "date": "2014-08-28",
          "total": 100.00,
          "balance": 100.00,
          "vendor_id": "",
          "vendor_name": "Bowman and Co",
          "currency_id": "3000000000083",
          "currency_code": "USD",
          "created_time": "2014-08-28T22:51:35-0700",
          "last_modified_time": "2014-08-28T22:51:35-0700"
        }
      ],
      "page_context": {
        "page": 1,
        "per_page": 200,
        "has_more_page": false,
        "report_name": "Vendor Credits",
        "applied_filter": "Status.All",
        "sort_column": "created_time",
        "sort_order": "D"
      }
    }

Get vendor credit

GET  /vendorcredits/:vendor_credit_id

Get details of a vendor credit.

Parameters

print boolean Export vendor credit pdf with default print option.
Allowed Values: true, false, on and off
accept string [100] You can get vendor credit details as json/pdf/html. Default format is html.
Allowed Values: json, xml, csv, xls, pdf, html and jhtml

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
      "code": 0,
      "message": "success",
      "vendor_credit": {
        "vendor_credit_id": "3000000003007",
        "vendor_credit_number": "DN-00003",
        "date": "2014-08-28",
        "status": "open",
        "reference_number": "103",
        "vendor_id": "3000000002029",
        "vendor_name": "Bowman and Co",
        "currency_id": "3000000000083",
        "currency_code": "USD",
        "exchange_rate": 1.00,
        "price_precision": 2,
        "is_inclusive_tax": "false",
        "line_items": [
          {
            "item_id": "3000000002039",
            "line_item_id": "3000000003009",
            "account_id": "3000000002035",
            "account_name": "Inventory Expense",
            "name": "Hard Drive",
            "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
            "item_order": 0,
            "quantity": 3.00,
            "unit": "",
            "bcy_rate": 100.00,
            "rate": 100.00,
            "tax_id": "3000000003005",
            "tax_name": "Electronics Tax",
            "tax_type": "tax",
            "tax_percentage": 6.7,
            "item_total": 300.00
          },
          {
            "item_id": "3000000002071",
            "line_item_id": "3000000003011",
            "account_id": "3000000000397",
            "account_name": "IT and Internet Expenses",
            "name": "Premium Plan - Web hosting",
            "description": "10 GB Space, 300 GB Transfer 100 Email Accounts 10 MySQL Databases",
            "item_order": 1,
            "quantity": 10.00,
            "unit": "",
            "bcy_rate": 30.00,
            "rate": 30.00,
            "tax_id": "3000000003003",
            "tax_name": "VAT",
            "tax_type": "tax",
            "tax_percentage": 13.2,
            "item_total": 300.00
          }
        ],
        "sub_total": 600.00,
        "total": 659.70,
        "total_credits_used": 0.00,
        "total_refunded_amount": 0.00,
        "balance": 659.70,
        "taxes": [
          {
            "tax_name": "VAT (13.2%)",
            "tax_amount": 39.60
          },
          {
            "tax_name": "Electronics Tax (6.7%)",
            "tax_amount": 20.10
          }
        ],
        "notes": "Returned on 08/24/2014.",
        "comments": [
          {
            "comment_id": "3000000003031",
            "vendor_credit_id": "3000000003007",
            "description": "Vendor credits created for $659.70",
            "commented_by_id": "3000000000741",
            "commented_by": "rajdeep.a",
            "comment_type": "system",
            "date": "2014-08-28",
            "date_description": "2 minutes ago",
            "time": "11:51 PM",
            "operation_type": "Added",
            "transaction_id": "",
            "transaction_type": "vendor_credit"
          }
        ],
        "vendor_credit_refunds": [],
        "bills_credited": [],
        "created_time": "2014-08-28T23:51:47-0700",
        "last_modified_time": "2014-08-28T23:51:47-0700"
      }
    }

Create a vendor credit

POST  /vendorcredits

Create a vendor credit for a vendor.

Parameters

ignore_auto_number_generation boolean Ignore auto number generation for this vendor credit only. On enabling this option vendor credit number is mandatory.
bill_id string Create a vendor credit and apply it to a bill.

Request attributes

vendor_id* string ID of the vendor the vendor credit has to be created.
vendor_credit_number string
[50]
Mandatory if auto number generation is disabled.
reference_number string
[50]
Reference number for the refund recorded.
date string
[yyyy-mm-dd]
The date the vendor credit is created.
exchange_rate double Exchange rate of the currency.
is_inclusive_tax
(Not applicable for US edition)
boolean Used to specify whether the line item rates are inclusive or exclusive of tax.
line_items array Line items of a vendor credit.
item_id string ID of the item.
account_id string ID of the account, the line item is associated with.
name string
[100]
Name of the line item.
description string
[2000]
Description of the line item.
unit string
[100]
Unit of the line item e.g. kgs, Nos.
rate double Rate of the line item.
quantity double Quantity of the line item.

Sample Request

{
      "vendor_id": "3000000002029",
      "vendor_credit_number": "DN-00002",
      "date": "2014-08-28",
      "exchange_rate": 1.00,
      "is_inclusive_tax": "false",
      "line_items": [
        {
          "item_id": "3000000002071",
          "line_item_id": "3000000002077",
          "account_id": "3000000000397",
          "name": "Premium Plan - Web hosting",
          "description": "10 GB Space, 300 GB Transfer 100 Email Accounts 10 MySQL Databases",
          "unit": "",
          "rate": 30.00,
          "quantity": 1.00,
          "item_order": 0
        }
      ],
      "notes": ""
    }

Sample Response

Status: 201 Created
Content Type: application/json;charset=UTF-8
{
      "code": 0,
      "message": "The vendor credit has been created.",
      "vendor_credit": {
        "vendor_credit_id": "3000000002075",
        "vendor_credit_number": "DN-00002",
        "date": "2014-08-28",
        "status": "open",
        "reference_number": "",
        "vendor_id": "3000000002029",
        "vendor_name": "Bowman and Co",
        "currency_id": "3000000000083",
        "currency_code": "USD",
        "exchange_rate": 1.00,
        "price_precision": 2,
        "is_inclusive_tax": "false",
        "line_items": [
          {
            "item_id": "3000000002071",
            "line_item_id": "3000000002077",
            "account_id": "3000000000397",
            "account_name": "IT and Internet Expenses",
            "name": "Premium Plan - Web hosting",
            "description": "10 GB Space, 300 GB Transfer 100 Email Accounts 10 MySQL Databases",
            "item_order": 0,
            "quantity": 1.00,
            "unit": "",
            "bcy_rate": 30.00,
            "rate": 30.00,
            "tax_id": "",
            "tax_name": "",
            "tax_type": "tax",
            "tax_percentage": 0,
            "item_total": 30.00
          }
        ],
        "sub_total": 30.00,
        "total": 30.00,
        "total_credits_used": 0.00,
        "total_refunded_amount": 0.00,
        "balance": 30.00,
        "taxes": [],
        "notes": "",
        "comments": [
          {
            "comment_id": "3000000002089",
            "vendor_credit_id": "3000000002075",
            "description": "Vendor credits created for $30.00",
            "commented_by_id": "3000000000741",
            "commented_by": "rajdeep.a",
            "comment_type": "system",
            "date": "2014-08-28",
            "date_description": "32 minutes ago",
            "time": "10:52 PM",
            "operation_type": "Added",
            "transaction_id": "",
            "transaction_type": "vendor_credit"
          }
        ],
        "vendor_credit_refunds": [],
        "bills_credited": [],
        "created_time": "2014-08-28T22:52:31-0700",
        "last_modified_time": "2014-08-28T22:52:31-0700"
      }
    }

Update vendor credit

PUT  /vendorcredits/:vendor_credit_id

Update an existing vendor credit.

Request attributes

vendor_id* string ID of the vendor the vendor credit has to be created.
vendor_credit_number string
[50]
Mandatory if auto number generation is disabled.
reference_number string
[50]
Reference number for the refund recorded.
date string
[yyyy-mm-dd]
The date the vendor credit is created.
exchange_rate double Exchange rate of the currency.
is_inclusive_tax
(Not applicable for US edition)
boolean Used to specify whether the line item rates are inclusive or exclusive of tax.
line_items array Line items of a vendor credit.
item_id string ID of the item.
account_id string ID of the account, the line item is associated with.
name string
[100]
Name of the line item.
description string
[2000]
Description of the line item.
unit string
[100]
Unit of the line item e.g. kgs, Nos.
rate double Rate of the line item.
quantity double Quantity of the line item.

Sample Request

{
      "vendor_credit_id": "3000000002075",
      "vendor_id": "3000000002029",
      "vendor_credit_number": "DN-00002",
      "date": "2014-08-28",
      "exchange_rate": 1.00,
      "is_inclusive_tax": "false",
      "line_items": [
        {
          "item_id": "3000000002071",
          "line_item_id": "3000000002077",
          "account_id": "3000000000397",
          "name": "Premium Plan - Web hosting",
          "description": "10 GB Space, 300 GB Transfer 100 Email Accounts 10 MySQL Databases",
          "unit": "",
          "rate": 30.00,
          "quantity": 1.00,
          "item_order": 0
        }
      ],
      "notes": ""
    }

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
      "code":1002,
      "message":"Vendor credit information has been updated.",
      "vendor_credit": 
      {
        "vendor_credit_id": "3000000002075",
        "vendor_credit_number": "DN-00002",
        "date": "2014-08-28",
        "status": "open",
        "reference_number": "",
        "vendor_id": "3000000002029",
        "vendor_name": "Bowman and Co",
        "currency_id": "3000000000083",
        "currency_code": "USD",
        "exchange_rate": 1.00,
        "price_precision": 2,
        "is_inclusive_tax": "false",
        "line_items": [
          {
            "item_id": "3000000002071",
            "line_item_id": "3000000002077",
            "account_id": "3000000000397",
            "account_name": "IT and Internet Expenses",
            "name": "Premium Plan - Web hosting",
            "description": "10 GB Space, 300 GB Transfer 100 Email Accounts 10 MySQL Databases",
            "item_order": 0,
            "quantity": 1.00,
            "unit": "",
            "bcy_rate": 30.00,
            "rate": 30.00,
            "tax_id": "",
            "tax_name": "",
            "tax_type": "tax",
            "tax_percentage": 0,
            "item_total": 30.00
          }
        ],
        "sub_total": 30.00,
        "total": 30.00,
        "total_credits_used": 0.00,
        "total_refunded_amount": 0.00,
        "balance": 30.00,
        "taxes": [],
        "notes": "",
        "comments": [
          {
            "comment_id": "3000000002089",
            "vendor_credit_id": "3000000002075",
            "description": "Vendor credits created for $30.00",
            "commented_by_id": "3000000000741",
            "commented_by": "rajdeep.a",
            "comment_type": "system",
            "date": "2014-08-28",
            "date_description": "32 minutes ago",
            "time": "10:52 PM",
            "operation_type": "Added",
            "transaction_id": "",
            "transaction_type": "vendor_credit"
          }
        ],
        "vendor_credit_refunds": [],
        "bills_credited": [],
        "created_time": "2014-08-28T22:52:31-0700",
        "last_modified_time": "2014-08-28T22:52:31-0700"
      }
    }

Delete vendor credit

DELETE  /vendorcredits/:vendor_credit_id

Delete a vendor credit.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{"code":0,"message":"The vendor credit has been deleted."}

Convert to open

POST  /vendorcredits/:vendor_credit_id/status/open

Change an existing vendor credit status to open.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
      "code": 0,
      "message": "The status of the vendor credit has been changed to open."
    }

Void vendor credit

POST  /vendorcredits/:vendor_credit_id/status/void

Mark an existing vendor credit as void.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
      "code": 0,
      "message": "The vendor credit has been voided."
    }