Top

Refunds

List credit note refunds
GET /creditnotes/refunds
List all refunds with pagination.
List refunds of a credit note
GET /creditnotes/:creditnote_id/refunds
List all refunds of an existing credit note.
Get credit note refund
GET /creditnotes/:creditnote_id/refunds/:creditnote_refund_id
Get refund of a particular credit note.
Refund credit note
POST /creditnotes/:creditnote_id/refunds
Refund credit note amount.
Update credit note refund
PUT /creditnotes/:creditnote_id/refunds/:creditnote_refund_id
Update the refunded transaction.
Delete credit note refund
DELETE /creditnotes/:creditnote_id/refunds/:creditnote_refund_id
Delete a credit note refund.

List credit note refunds

GET  /creditnotes/refunds

List all refunds with pagination.

Parameters

customer_id string List credit note refunds made for a particular customer.
sort_column string Sort refunds list.
Allowed Values: refund_mode, reference_number, date, creditnote_number, customer_name, amount_bcy and amount_fcy

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "creditnote_refunds": [
    {
      "creditnote_refund_id": "982000000567158",
      "creditnote_id": "982000000567134",
      "date": "2013-11-19",
      "refund_mode": "cash",
      "reference_number": "782364",
      "creditnote_number": "CN-00001",
      "customer_name": "Bowman & Co",
      "description": "",
      "amount_bcy": 57.15,
      "amount_fcy": 57.15
    }
  ],
  "page_context": {
    "page": 1,
    "per_page": 200,
    "has_more_page": false,
    "report_name": "Credit Notes Refund",
    "sort_column": "date",
    "sort_order": "D"
  }
}

List refunds of a credit note

GET  /creditnotes/:creditnote_id/refunds

List all refunds of an existing credit note.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "creditnote_refunds": [
    {
      "creditnote_refund_id": "982000000567158",
      "creditnote_id": "982000000567134",
      "date": "2013-11-19",
      "refund_mode": "cash",
      "reference_number": "782364",
      "creditnote_number": "CN-00001",
      "customer_name": "Bowman & Co",
      "description": "",
      "amount_bcy": 57.15,
      "amount_fcy": 57.15
    }
  ],
  "page_context": {
    "page": 1,
    "per_page": 200,
    "has_more_page": false,
    "report_name": "Credit Notes Refund",
    "sort_column": "date",
    "sort_order": "D"
  }
}

Get credit note refund

GET  /creditnotes/:creditnote_id/refunds/:creditnote_refund_id

Get refund of a particular credit note.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "creditnote_refund": {
    "creditnote_refund_id": "982000000567158",
    "creditnote_id": "982000000567134",
    "date": "2013-11-19",
    "refund_mode": "Cash",
    "reference_number": "782364",
    "amount": 57.15,
    "exchange_rate": 1.00,
    "description": ""
  }
}

Refund credit note

POST  /creditnotes/:creditnote_id/refunds

Refund credit note amount.

Request attributes

date* string
[yyyy-mm-dd]
The date the credit note is created.
refund_mode string
[50]
Mode of refund for the credit note refund amount.
reference_number string
[50]
Reference number for the refund recorded.
amount* double Amount refunded from the credit note.
exchange_rate double Exchange rate of the currency.
description string
[2000]
Description for the refund recorded.

Sample Request

{
  "date": "2013-11-19",
  "refund_mode": "Cash",
  "reference_number": "782364",
  "amount": 57.15,
  "exchange_rate": 1.00,
  "description": ""
}

Sample Response

Status: 201 Created
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The refund information for this credit note has been saved.",
  "creditnote_refund": {
    "creditnote_refund_id": "982000000567158",
    "creditnote_id": "982000000567134",
    "date": "2013-11-19",
    "refund_mode": "Cash",
    "reference_number": "782364",
    "amount": 57.15,
    "exchange_rate": 1.00,
    "description": ""
  }
}

Update credit note refund

PUT  /creditnotes/:creditnote_id/refunds/:creditnote_refund_id

Update the refunded transaction.

Request attributes

date* string
[yyyy-mm-dd]
The date the credit note is created.
refund_mode string
[50]
Mode of refund for the credit note refund amount.
reference_number string
[50]
Reference number for the refund recorded.
amount* double Amount refunded from the credit note.
exchange_rate double Exchange rate of the currency.
description string
[2000]
Description for the refund recorded.

Sample Request

{
  "date": "2013-11-19",
  "refund_mode": "Cash",
  "reference_number": "782364",
  "amount": 57.15,
  "exchange_rate": 1.00,
  "description": ""
}

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The refund information has been saved.",
  "creditnote_refund": {
    "creditnote_refund_id": "982000000567158",
    "creditnote_id": "982000000567134",
    "date": "2013-11-19",
    "refund_mode": "Cash",
    "reference_number": "782364",
    "amount": 57.15,
    "exchange_rate": 1.00,
    "description": ""
  }
}

Delete credit note refund

DELETE  /creditnotes/:creditnote_id/refunds/:creditnote_refund_id

Delete a credit note refund.

Sample Response

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