Table of Contents | ||
---|---|---|
|
GET credit_notes/show
This method returns information related with a credit note. A single credit note is returned by each call
Resource URL
Parameters
...
Name
...
Type
...
Description
...
token
...
String
...
The token retrieved from the login method
...
(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:
...
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
Restrictions
- It is mandatory to specify one of the semi-optional parameters. Only one of those parameters is allowed to be specified.
Response Data
...
Examples
Expand | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
HTTP Method: GET
Request: Response:
|
Expand | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
HTTP Method: GET
Request: Response:
|
GET credit_notes/list
This method returns information related with credit notes. Multiple credit notes are returned by each call
Resource URL
Parameters
...
Name
...
Type
...
Description
...
token
...
String
...
The token retrieved from the login method
...
(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:
...
type_identifier
(optional)
...
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:
...
category_identifier
(optional)
...
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:
...
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
Restrictions
- It is mandatory to specify one of the semi-optional parameters. Only one of those parameters is allowed to be specified.
Response Data
...
Examples
Expand | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
HTTP Method: GET
Request: Response:
|
Expand | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
HTTP Method: GET
Request: Response:
|
POST credit_notes/create
This method is creating a new credit note either in Draft or Posted state
Resource URL
Parameters
...
Name
...
Type
...
Description
...
token
...
String
...
The token retrieved from the login method
...
(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:
...
type_identifier
(mandatory)
...
The financial transaction type of the credit note. The allowed financial transaction type identifier field are the following:
...
life_cycle_state
(mandatory)
...
The state of the retrieved credit note which can be one of the following:
DRAFT, POSTED
...
category_identifier
(optional)
...
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:
...
notes
(optional)
...
back_office_code
(optional)
...
A back office code for the credit note. If specified then it should be unique
Tip |
---|
...
issue_reason
(optional)
...
udf_string_1
(optional)
...
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
...
(optional)
...
(mandatory)
...
Restrictions
- It is mandatory to specify one of the semi-optional parameters. Only one of those parameters is allowed to be specified.
Response Data
...
Examples
...
title | Example 1 |
---|
HTTP Method: POST
Request:
Body:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"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 | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"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"
}
} |
...
title | Example 2 |
---|
HTTP Method: POST
Request:
Body:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"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 | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"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.
Resource URL
Parameters
...
Name
...
Type
...
Description
...
token
...
String
...
The token retrieved from the login method
...
(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:
...
Restrictions
- It is mandatory to specify one of the semi-optional parameters. Only one of those parameters is allowed to be specified.
Response Data
...
Examples
...
title | Example 1 |
---|
HTTP Method: POST
Request:
Body:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"token": "B8D7A12E9F91AFADE914B7330AFD08CB",
"credit_note_identifier":{"reference_number":"118"},
} |
Response:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"status":
{
"message": null,
"description": null,
"code": "OK"
},
"data":
{
"total_amount": 9,
"issued_on": "2014-07-14T14:26:04",
"life_cycle_state": "POSTED",
"number": "CT00000104",
"id": "6C918645DCFE24C866EF51986AB71E41",
"reference_number": "118",
"posted_on": "2014-07-14T14:26:50"
}
} |
POST credit_notes/reject
This method is used to reject a credit note which is in draft state.
Resource URL
Parameters
...
Name
...
Type
...
Description
...
token
...
String
...
The token retrieved from the login method
...
(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:
...
The reason that the credit note is rejected. The allowed rejection reason identifier fields are the following:
...
Restrictions
- It is mandatory to specify one of the semi-optional parameters. Only one of those parameters is allowed to be specified.
Response Data
...
Examples
...
title | Example 1 |
---|
HTTP Method: POST
Request:
Body:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"token": "B8D7A12E9F91AFADE914B7330AFD08CB",
"credit_note_identifier":{"reference_number":"119"},
"rejection_reason_identifier":{"name":"Reject Due to Business Request"},
} |
Response:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"status":
{
"message": null,
"description": null,
"code": "OK"
},
"data":
{
"total_amount": 18,
"issued_on": "2014-07-14T14:28:51",
"life_cycle_state": "REJECTED",
"number": null,
"id": "FFB55C221FE17BF201AEAF2E5A504E94",
"reference_number": "119",
"posted_on": null
}
} |
POST credit_notes/update
Tip |
---|
Available from CRM.COM R9.1.0 |
This method is updating a single Credit Note but only as long as it is in Draft life cycle state
Resource URL
Parameters
...
Name
...
Type
...
Description
...
token
...
String
...
The token retrieved from the login method
...
credit_note_identifier
(mandatory)
...
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:
...
(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:
...
type_identifier
(optional)
...
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:
...
category_identifier
(optional)
...
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:
...
notes
(optional)
...
back_office_code
(optional)
...
A back office code for the credit note. If specified then it should be unique
...
issue_reason
(optional)
...
udf_string_1
(optional)
...
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
...
(optional)
...
The invoices that are intended to be credited
...
(optional)
...
The items of the credit note
...
Restrictions
- It is mandatory to specify one of the semi-optional parameters. Only one of those parameters is allowed to be specified.
Response Data
...
Examples
...
title | Example 1 |
---|
HTTP Method: POST
Request:
Body:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"token":"BBF4751F690743CD860E518662A15026",
"credit_note_identifier":{"reference_number":"145"},
"accounts_receivable_identifier":{"name":"CityFlat Sub"},
"type_identifier":{"name":"Credit Note 2"},
"category_identifier":{"name":"Global Categories"},
"back_office_code":"CRN000001",
"notes":"Credit note",
"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":
[
{
"action":"add",
"invoice_identifier":{"number":"I00000173"}
}
],
"credit_note_item_set":
[
{
"action":"remove",
"credit_note_item_identifier":{"id":"4B47E5F350EA4F98959FDECA4E2E87DD"}
},
{
"action":"add",
"product_identifier":{"code":"Smartcard 2"},
"quantity":2,
"sub_total":15,
"discount_amount":5,
"vat_rate_identifier":{"name":"Zero"}
}
]
} |
Response:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"status": {
"message": "",
"description": "",
"code": "OK"
},
"data": {
"notes": "Marios Lannister\t4/5/2016 15:48:24\tCredit note\tMarios Lannister\t4/5/2016 15:55:05\tCredit note\tMarios Lannister\t4/5/2016 15:55:28\tCredit note\tMarios Lannister\t4/5/2016 15:56:29\tCredit note\tMarios Lannister\t4/5/2016 15:56:43\tCredit note\tMarios Lannister\t4/5/2016 16:08:54\tCredit note\tMarios Lannister\t4/5/2016 16:11:11\tCredit note",
"udf_float_1": 10,
"udf_float_2": 20,
"udf_float_3": 30,
"number": null,
"udf_float_4": 40,
"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",
"accounts_receivable": {
"account_owner": {
"last_name": "Clark",
"middle_name": "S.",
"life_cycle_state": "FINANCIAL",
"company_profile": null,
"title": "Mrs",
"first_name": "Kathy",
"type": "PERSON",
"id": "460BB0DB7A4EB61D9D6E3DFEE8566C08",
"name": null,
"company_name": null,
"demographics": {
"gender": "FEMALE",
"passport_issued_by_country": null,
"social_security_number": "88996633",
"passport_number": "4564455",
"industry_sector": null,
"name_day": {
"month": 1,
"day": 1
},
"date_of_birth": {
"month": 1,
"day": 1,
"year": 1980
},
"id_number": "87878000",
"industry": null,
"id_issued_by_country": null
}
},
"life_cycle_state": "ACTIVE",
"number": "253",
"id": "3CCC9B1B4D2AB43F57E49751DF63B916",
"name": "CityFlat Sub"
},
"discount_amount": 10,
"id": "E391DC06C890D7A58D73DA030B922B01",
"credit_note_item_set": [
{
"vat_percentage": 0,
"sub_total": 15,
"discount_amount": 5,
"vat_rate": {
"id": "EDE5318C0AA394902E8C7DAE0227CB01",
"name": "Zero",
"description": "No VAT applied",
"alternative_code": "ZR"
},
"discount_percentage": 25,
"net_amount": 20,
"id": "4B47E5F350EA4F98959FDECA4E2E87DD",
"quantity": 2,
"cost": 10,
"vat_amount": 0,
"product": {
"id": "80EEE8F6F46767AE32E6ABE68603E9F2",
"description": "SmartCards 2",
"code": "Smartcard 2",
"alternative_code": "SC2"
}
},
{
"vat_percentage": 0,
"sub_total": 15,
"discount_amount": 5,
"vat_rate": {
"id": "EDE5318C0AA394902E8C7DAE0227CB01",
"name": "Zero",
"description": "No VAT applied",
"alternative_code": "ZR"
},
"discount_percentage": 25,
"net_amount": 20,
"id": "C96703BE1CDA47B0889DED7AA83445DA",
"quantity": 10,
"cost": 2,
"vat_amount": 0,
"product": {
"id": "80EEE8F6F46767AE32E6ABE68603E9F2",
"description": "SmartCards 2",
"code": "Smartcard 2",
"alternative_code": "SC2"
}
},
{
"vat_percentage": 0,
"sub_total": 15,
"discount_amount": 5,
"vat_rate": {
"id": "EDE5318C0AA394902E8C7DAE0227CB01",
"name": "Zero",
"description": "No VAT applied",
"alternative_code": "ZR"
},
"discount_percentage": 25,
"net_amount": 20,
"id": "A54EE4337C6144D196B521BC7CECF92D",
"quantity": 2,
"cost": 10,
"vat_amount": 0,
"product": {
"product_type": {
"service_type": null,
"physical_good_type": "TRACEABLE",
"used_for_provisioning": false,
"classification": "PHYSICALGOODS",
"composition_method": "FLAT",
"id": "6173FC99331504AD1ACB5D697D54DA8C",
"name": "Smartcards",
"description": "Smartcards",
"alternative_code": "SC"
},
"id": "80EEE8F6F46767AE32E6ABE68603E9F2",
"description": "SmartCards 2",
"code": "Smartcard 2",
"alternative_code": "SC2"
}
}
],
"posted_on": null,
"udf_date_1": "2014-05-05T15:49:59",
"udf_date_2": "2014-06-05T15:49:59",
"udf_date_3": "2014-07-05T15:49:59",
"issue_reason": null,
"udf_date_4": "2014-08-05T15:49:59",
"vat_amount": 0,
"log_information": {
"updated_date": "2016-05-04T13:11:16",
"created_date": "2014-11-05T13:08:37",
"created_by_unit": {
"community_name": "Internal Community",
"id": "48305F8849E3C18B227C5BE3A27BA6DF",
"name": "Admin Unit",
"group_name": "Main Group",
"description": "r1 Test Description for resource request tab.Test Description for resource request tab.",
"alternative_code": "MG"
},
"updated_by_unit": {
"community_name": "Internal Community",
"id": "48305F8849E3C18B227C5BE3A27BA6DF",
"name": "Admin Unit",
"group_name": "Main Group",
"description": "r1 Test Description for resource request tab.Test Description for resource request tab.",
"alternative_code": "MG"
},
"created_by_user": {
"person_name": "MPAdministrator",
"username": "MPAdministrator",
"id": "1",
"email": "sakkascy1986@hotmail.com"
},
"updated_by_user": {
"person_name": "Marios Lannister",
"username": "MPAdministrator",
"id": "1"
}
},
"issued_on": "2014-11-06T00:00:00",
"total_amount": 30,
"life_cycle_state": "DRAFT",
"back_office_code": "CRN000001",
"rejection_reason": null,
"type": {
"classification": "CREDIT_NOTE",
"id": "CD0946E1DB7D9524000E72DAC88AB124",
"name": "Credit Note 2",
"description": "Credit Note 2",
"alternative_code": "CN2"
},
"net_amount": 40,
"reference_number": "145",
"category": {
"id": "A2BC929D02D8CA9E6C2C639A91DFBE4B",
"name": "Global Categories",
"description": "Global Categories",
"code": "GC"
}
}
} |
...
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
|