Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
maxLevel2

...

Name

Type

Description

token

String

The token retrieved from the login method

credit_note_identifier

(mandatory)

Credit note identifier
 

The identifier of the credit not that should be returned as a result. The allowed credit note identifier fields are the following:

Include Page
V4:credit_note_identifier
V4:credit_note_identifier

fields_set

(optional)

List of Strings, comma separated 

A list of fields that should be included in the results. If not specified then all the available fields will be returned

...

Name

Type

Description

token

String

The token retrieved from the login method

accounts_receivable_identifier

(mandatory)

Accounts receivable identifier  

The identifier of the accounts receivable in which the credit note that should be returned as a result should be allocated. The allowed accounts receivable identifier fields are the following:

Include Page
V4:accounts_receivable_identifier
V4:accounts_receivable_identifier

type_identifier

(optional)

Financial transaction type identifier

The financial transaction type of the credit note that should be returned as a result. The allowed financial transaction type identifier field are the following:

Include Page
V4:financial_transaction_type_identifier
V4:financial_transaction_type_identifier

category_identifier

(optional)

Financial transaction category identifier

The financial transaction category of the credit note that should be returned as a result. The allowed financial transaction category identifier fields are the following:

Include Page
V4:financial_transaction_category_identifier
V4:financial_transaction_category_identifier

fields_set

(optional)

List of Strings, comma separated 

A list of fields that should be included in the results. If not specified then all the available fields will be returned

...

Name

Type

Description

token

String

The token retrieved from the login method

accounts_receivable_identifier

(mandatory)

Accounts receivable identifier  

The identifier of the accounts receivable in which the credit note should be allocated to. The allowed accounts receivable identifier fields are the following:

Include Page
V4:accounts_receivable_identifier
V4:accounts_receivable_identifier

type_identifier

(mandatory)

Financial transaction type identifier

The financial transaction type of the credit note. The allowed financial transaction type identifier field are the following:

Include Page
V4:financial_transaction_type_identifier
V4:financial_transaction_type_identifier

life_cycle_state

(mandatory)

String

The state of the retrieved credit note which can be one of the following:

DRAFT, POSTED

category_identifier

(optional)

Financial transaction category identifier

The financial transaction category of the credit note that should be returned as a result. The allowed financial transaction category identifier fields are the following:

Include Page
V4:financial_transaction_category_identifier
V4:financial_transaction_category_identifier

notes

(optional)

StringShared notes for the credit note

back_office_code

(optional)

String

A back office code for the credit note. If specified then it should be unique

Tip

Available from CRM.COM R9.1.0

issue_reason

(optional)

StringA description of the reason that the credit note is issued

udf_string_1

(optional)

String

User Defined Field of type String

udf_string_2

(optional)

String

User Defined Field of type String

udf_string_3

(optional)

String

User Defined Field of type String

udf_string_4

(optional)

String

User Defined Field of type String

udf_string_5

(optional)

String

User Defined Field of type String

udf_string_6

(optional)

String

User Defined Field of type String

udf_string_7

(optional)

String

User Defined Field of type String

udf_string_8

(optional)

String

User Defined Field of type String

udf_float_1

(optional)

Float

User Defined Field of type Float

udf_float_2

(optional)

Float

User Defined Field of type Float

udf_float_3

(optional)

Float

User Defined Field of type Float

udf_float_4

(optional)

Float

User Defined Field of type Float

udf_date_1

(optional)

Date

User Defined Field of type Date

udf_date_2

(optional)

Date

User Defined Field of type Date

udf_date_3

(optional)

Date

User Defined Field of type Date

udf_date_4

(optional)

Date

User Defined Field of type Date

invoices_to_credit_set

(optional)

Set of invoice objectsThe invoices that are intended to be credited

credit_note_item_set

(mandatory)

Set of credit item objectsThe items of the credit not

...

Expand
titleExample 1

HTTP Method: POST

 

Request:

Body:

Code Block
themeConfluence
languagejavascript
linenumberstrue
{
  "token": "E55F0CADDDFEAC5C5F269A71039DDA40",
  "accounts_receivable_identifier":{"number":"401"},
  "type_identifier":{"name":"Credit Note 1"},
  "life_cycle_state":"POSTED",
  "category_identifier":{"name":"Credit Note Categories"},
  "notes":"standard credit note",
  "issue_reason":"Cancellation of prepaid service",
  "udf_string_1":"udf string 1",
  "udf_string_2":"udf string 2",
  "udf_string_3":"udf string 3",
  "udf_string_4":"udf string 4",
  "udf_string_5":"udf string 5",
  "udf_string_6":"udf string 6",
  "udf_string_7":"udf string 7",
  "udf_string_8":"udf string 8",
  "udf_float_1":10,
  "udf_float_2":20,
  "udf_float_3":30,
  "udf_float_4":40,
  "udf_float_5":50,
  "udf_float_6":60,
  "udf_float_7":70,
  "udf_float_8":80,
  "udf_date_1":"2014-05-05T15:49:59",
  "udf_date_2":"2014-06-05T15:49:59",
  "udf_date_3":"2014-07-05T15:49:59",
  "udf_date_4":"2014-08-05T15:49:59",
  "invoices_to_credit_set": 
   [
     {
        "invoice_identifier":{"number":"I0010210"}
     },
     {
        "invoice_identifier":{"number":"I0010211"}
     }
   ],
   "credit_note_item_set":
   [
     {
       "product_identifier":{"code":"Smart Card"},
       "quantity":2,
       "cost":18,
       "discount_amount":3,
       "vat_rate_identifier":{"name":"Standard"},
       "udf_string_1":"udf string 1",
       "udf_string_2":"udf string 2",
       "udf_string_3":"udf string 3",
       "udf_string_4":"udf string 4",
       "udf_string_5":"udf string 5",
       "udf_string_6":"udf string 6",
       "udf_string_7":"udf string 7",
       "udf_string_8":"udf string 8",
       "udf_float_1":10,
       "udf_float_2":20,
       "udf_float_3":30,
       "udf_float_4":40,
       "udf_float_5":50,
       "udf_float_6":60,
       "udf_float_7":70,
       "udf_float_8":80,
       "udf_date_1":"2014-05-05T15:49:59",
       "udf_date_2":"2014-06-05T15:49:59",
       "udf_date_3":"2014-07-05T15:49:59",
       "udf_date_4":"2014-08-05T15:49:59"
     }
   ]
}


Response:

Code Block
themeConfluence
languagejavascript
linenumberstrue
      {
    "status":
    {
        "message": null,
        "description": null,
        "code": "OK"
    },
    "data":
    {
        "total_amount": 33,
        "issued_on": "2014-10-30T11:34:37",
        "life_cycle_state": "POSTED",
        "number": "CT00000158",
        "id": "48E6B743D21A8F284EE0CB99805E4CF9",
        "reference_number": "171",
        "posted_on": "2014-10-30T11:36:27"
    }
}
Expand
titleExample 2

HTTP Method: POST

 

Request:

Body:

Code Block
themeConfluence
languagejavascript
linenumberstrue
{
    "token":"{{token}}",
    "accounts_receivable_identifier":{"number":"ACR0000000214"},
  "type_identifier":{"name":"Credit Note"},
  "life_cycle_state":"POSTED",
  "notes":"standard credit note",
  "issue_reason":"Cancellation of prepaid service",
  "udf_string_1":"udf string 1",
  "udf_string_2":"udf string 2",
  "udf_string_3":"udf string 3",
  "udf_string_4":"udf string 4",
  "udf_string_5":"udf string 5",
  "udf_string_6":"udf string 6",
  "udf_string_7":"udf string 7",
  "udf_string_8":"udf string 8",
  "udf_float_1":10,
  "udf_float_2":20,
  "udf_float_3":30,
  "udf_float_4":40,
  "udf_float_5":50,
  "udf_float_6":60,
  "udf_float_7":70,
  "udf_float_8":80,
  "udf_date_1":"2014-05-05T15:49:59",
  "udf_date_2":"2014-06-05T15:49:59",
  "udf_date_3":"2014-07-05T15:49:59",
  "udf_date_4":"2014-08-05T15:49:59",
   "credit_note_item_set":
   [
     {
       "product_identifier":{"code":"Smartcard"},
       "quantity":2,
       "cost":18,
       "discount_amount":3,
       "vat_rate_identifier":{"name":"Standard"},
       "udf_string_1":"udf string 1",
       "udf_string_2":"udf string 2",
       "udf_string_3":"udf string 3",
       "udf_string_4":"udf string 4",
       "udf_string_5":"udf string 5",
       "udf_string_6":"udf string 6",
       "udf_string_7":"udf string 7",
       "udf_string_8":"udf string 8",
       "udf_float_1":10,
       "udf_float_2":20,
       "udf_float_3":30,
       "udf_float_4":40,
       "udf_float_5":50,
       "udf_float_6":60,
       "udf_float_7":70,
       "udf_float_8":80,
       "udf_date_1":"2014-05-05T15:49:59",
       "udf_date_2":"2014-06-05T15:49:59",
       "udf_date_3":"2014-07-05T15:49:59",
       "udf_date_4":"2014-08-05T15:49:59"
     }
   ]
}


Response:

Code Block
themeConfluence
languagejavascript
linenumberstrue
   {
  "data": {
    "posted_on": "2016-07-05T15:04:02",
    "number": "107",
    "total_amount": 0,
    "issued_on": "2016-07-05T15:04:02",
    "currency_rate_period": null,
    "id": "1D975E651947499EAC1733ED1E0EE6FD",
    "life_cycle_state": "POSTED",
    "reference_number": "38"
  },
  "status": {
    "code": "OK",
    "description": "",
    "message": ""
  }
}

POST credit_notes/post

This method is used to post a credit note which is in draft state.

...

Name

Type

Description

token

String

The token retrieved from the login method

credit_note_identifier

(mandatory)

Credit note identifier  

The identifier of the credit note that should be posted. Only credit notes in draft state can be specified.The allowed credit note identifier fields are the following:

Include Page
V4:credit_note_identifier
V4:credit_note_identifier

...

Name

Type

Description

token

String

The token retrieved from the login method

credit_note_identifier

(mandatory)

Credit note identifier  

The identifier of the credit note that should be posted. Only credit notes in draft state can be specified.The allowed credit note identifier fields are the following:

Include Page
V4:credit_note_identifier
V4:credit_note_identifier

rejection_reason_identifierRejection reason identifier

The reason that the credit note is rejected. The allowed rejection reason identifier fields are the following:

Include Page
V4:financial_transaction_rejection_reason_identifier
V4:financial_transaction_rejection_reason_identifier

...

Name

Type

Description

token

String

The token retrieved from the login method

credit_note_identifier

(mandatory)

Credit Note identifier

The identifier of the credit note that should be updated. Only credit notes in draft state can be specified.The allowed credit note identifier fields are the following:

Include Page
V4:credit_note_identifier
V4:credit_note_identifier

accounts_receivable_identifier

(optional)

Accounts receivable identifier  

The identifier of the accounts receivable in which the credit note should be allocated to. The allowed accounts receivable identifier fields are the following:

Include Page
V4:accounts_receivable_identifier
V4:accounts_receivable_identifier

type_identifier

(optional)

Financial transaction type identifier

The financial transaction type of the credit note. Only financial transaction types with classification Credit Note can be specified. The allowed financial transaction type identifier field are the following:

Include Page
V4:financial_transaction_type_identifier
V4:financial_transaction_type_identifier

category_identifier

(optional)

Financial transaction category identifier

The financial transaction category of the credit note that should be returned as a result. The allowed financial transaction category identifier fields are the following:

Include Page
V4:financial_transaction_category_identifier
V4:financial_transaction_category_identifier

notes

(optional)

StringShared notes for the credit note

back_office_code

(optional)

String

A back office code for the credit note. If specified then it should be unique

 

issue_reason

(optional)

StringA description of the reason that the credit note is issued

udf_string_1

(optional)

String

User Defined Field of type String

udf_string_2

(optional)

String

User Defined Field of type String

udf_string_3

(optional)

String

User Defined Field of type String

udf_string_4

(optional)

String

User Defined Field of type String

udf_string_5

(optional)

String

User Defined Field of type String

udf_string_6

(optional)

String

User Defined Field of type String

udf_string_7

(optional)

String

User Defined Field of type String

udf_string_8

(optional)

String

User Defined Field of type String

udf_float_1

(optional)

Float

User Defined Field of type Float

udf_float_2

(optional)

Float

User Defined Field of type Float

udf_float_3

(optional)

Float

User Defined Field of type Float

udf_float_4

(optional)

Float

User Defined Field of type Float

udf_date_1

(optional)

Date

User Defined Field of type Date

udf_date_2

(optional)

Date

User Defined Field of type Date

udf_date_3

(optional)

Date

User Defined Field of type Date

udf_date_4

(optional)

Date

User Defined Field of type Date

invoices_to_credit_set

(optional)

Set of invoice objects

The invoices that are intended to be credited

Include Page
V4:Web API - Updating Sets
V4:Web API - Updating Sets

credit_note_item_set

(optional)

Set of credit item objects

The items of the credit note

Include Page
V4:Web API - Updating Sets
V4:Web API - Updating Sets

...