Table of Contents | ||
---|---|---|
|
GET invoices/show
This method returns information related with an invoice. A single invoice is returned by each call
Resource URL
Parameters
...
Name
...
Type
...
Description
...
token
...
String
...
The token retrieved from the login method
...
(mandatory)
...
Invoice identifier
The identifier of the invoice that should be returned as a result. The allowed invoice 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:
|
Expand | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
HTTP Method: GET
Request: Response:
|
GET invoices/list
This method returns information related with invoices. Multiple invoices 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 invoice 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 invoice 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 invoice 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 invoices/create
This method is creating a new invoice 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 invoice should be allocated to. The allowed accounts receivable identifier fields are the following:
...
type_identifier
(mandatory)
...
The financial transaction type of the invoice. The allowed financial transaction type identifier field are the following:
...
life_cycle_state
(mandatory)
...
The state of the retrieved invoice which can be one of the following:
DRAFT, POSTED
...
category_identifier
(optional)
...
The financial transaction category of the invoice that should be returned as a result. The allowed financial transaction category identifier fields are the following:
...
member_accounts_receivable_identifier
(optional)
...
due_on
(optional)
...
intended_currency_identifier
(optional)
...
The currency that the user was intended to use for the invoice. If specified then it is validated against the currency of the specified accounts receivable and if they don't match then an error is throw. Note that the intended currency is not saved within CRM.COM; it is just used for validation purposes. The allowed currency identifier fields are the following:
...
Tip |
---|
...
notes
(optional)
...
back_office_code
(optional)
...
A back office code for the invoice. If specified then it should be unique
Tip |
---|
...
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
...
(mandatory)
...
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: POST
Request: Body:
Response:
|
Expand | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||
HTTP Method: POST
Request: Body:
Response:
|
Expand | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||
HTTP Method: POST
Request: Body:
Response:
|
POST invoices/post
This method is used to post an invoice which is in draft state.
Resource URL
Parameters
...
Name
...
Type
...
Description
...
token
...
String
...
The token retrieved from the login method
...
(mandatory)
...
Invoice identifier
The identifier of the invoice that should be returned as a result. The allowed invoice 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
...
title | Example 1 |
---|
HTTP Method: POST
Request:
Body:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"token": "B8D7A12E9F91AFADE914B7330AFD08CB",
"invoice_identifier":{"reference_number":"559"}
} |
Response:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"status":
{
"message": null,
"description": null,
"code": "OK"
},
"data":
{
"total_amount": 57,
"issued_on": "2014-11-07T11:38:48",
"life_cycle_state": "POSTED",
"unsettled_amount": 57,
"number": "I00000519",
"due_on": "2014-11-10T15:49:59",
"id": "7968903798226F14CB73E59E2DD8712B",
"outstanding_amount": 0,
"reference_number": "559",
"posted_on": "2014-11-07T11:45:41"
}
} |
...
title | Example 2 |
---|
HTTP Method: POST
Request:
Body:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"token":"{{token}}",
"invoice_identifier":{"reference_number":"55"}
} |
Response:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"data": {
"posted_on": "2016-07-05T15:46:36",
"number": "I00000679",
"total_amount": 5,
"unsettled_amount": -5,
"issued_on": "2015-04-14T06:41:39",
"currency_rate_period": null,
"id": "2C2374687D424D8AA6A3E02772900492",
"life_cycle_state": "POSTED",
"outstanding_amount": -5,
"reference_number": "55",
"due_on": "2016-07-05T20:42:13"
},
"status": {
"code": "OK",
"description": "",
"message": ""
}
} |
POST invoices/reject
This method is used to reject an invoice which is in draft state.
Resource URL
Parameters
...
Name
...
Type
...
Description
...
token
...
String
...
The token retrieved from the login method
...
(mandatory)
...
Invoice identifier
The identifier of the invoice that should be rejected. The allowed invoice identifier fields are the following:
...
The reason that the invoice is rejected. The allowed rejection reason 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
...
title | Example 1 |
---|
HTTP Method: POST
Request:
Body:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"token": "B8D7A12E9F91AFADE914B7330AFD08CB",
"invoice_identifier":{"reference_number":"559"},
"rejection_reason_identifier":{"name":"Reject Due to Business Request"}
} |
Response:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"status":
{
"message": null,
"description": null,
"code": "OK"
},
"data":
{
"total_amount": 57,
"issued_on": "2014-11-07T11:38:48",
"life_cycle_state": "REJECTED",
"unsettled_amount": 0,
"number": "I00000519",
"due_on": "2014-11-10T15:49:59",
"id": "7968903798226F14CB73E59E2DD8712B",
"outstanding_amount": 0,
"reference_number": "559",
"posted_on": "2014-11-07T11:45:41"
}
} |
...
title | Example 1 |
---|
HTTP Method: POST
Request:
Body:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"token":"{{token}}",
"invoice_identifier":{"reference_number":"541"},
"rejection_reason_identifier":{"name":"Reject Due to Error"}
} |
Response:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"data": {
"posted_on": "2016-04-14T06:43:24",
"number": "542",
"total_amount": 100,
"unsettled_amount": 0,
"issued_on": "2016-04-15T00:00:00",
"currency_rate_period": null,
"id": "01A75EF631294253B24B2401CA65F15D",
"life_cycle_state": "REJECTED",
"outstanding_amount": 0,
"reference_number": "541",
"due_on": "2016-04-16T06:43:24"
},
"status": {
"code": "OK",
"description": "",
"message": ""
}
} |
POST invoices/cancel
This method is used to cancel a posted invoice. An invoice cancellation is created and posted to cancel the specified invoice
Resource URL
Parameters
...
Name
...
Type
...
Description
...
token
...
String
...
The token retrieved from the login method
...
(mandatory)
...
Invoice identifier
The identifier of the invoice that should be cancelled. The allowed invoice identifier fields are the following:
...
type_identifier
(mandatory)
...
The financial transaction type of the invoice cancellation. The allowed financial transaction type identifier field are the following:
...
category_identifier
(optional)
...
The financial transaction category of the invoice cancellation. The allowed financial transaction category identifier fields are the following:
...
notes
(optional)
...
back_office_code
(optional)
...
A back office code for the invoice cancellation. 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
...
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
Name | Type | Description |
invoice | Invoice object | The invoice that was cancelled |
invoice_cancellation | Invoice cancellation object | The invoice cancellation that was created |
...
Examples
...
title | Example 1 |
---|
HTTP Method: POST
Request:
Body:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"token": "B8D7A12E9F91AFADE914B7330AFD08CB",
"invoice_identifier":{"reference_number":"559"},
"type_identifier":{"name":"Invoice Cancellation"}
} |
Response:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"status":
{
"message": null,
"description": null,
"code": "OK"
},
"data":
{
"invoice_cancellation":
{
"issued_on": "2014-11-07T11:53:50",
"total_amount": 57,
"life_cycle_state": "POSTED",
"number": "51",
"id": "576831622F3735D9B734B419B4BC6C7A",
"reference_number": "2",
"posted_on": "2014-11-07T11:53:50"
},
"invoice":
{
"total_amount": 57,
"issued_on": "2014-11-07T11:38:48",
"life_cycle_state": "POSTED",
"unsettled_amount": 0,
"number": "I00000519",
"due_on": "2014-11-10T15:49:59",
"id": "7968903798226F14CB73E59E2DD8712B",
"outstanding_amount": 0,
"reference_number": "559",
"posted_on": "2014-11-07T11:45:41"
}
}
} |
...
title | Example 2 |
---|
HTTP Method: POST
Request:
Body:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"token":"{{token}}",
"invoice_identifier":{"reference_number":"55"},
"type_identifier":{"name":"Invoice Cancellation"}
} |
Response:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"data": {
"invoice": {
"posted_on": "2016-07-05T15:46:36",
"number": "I00000679",
"total_amount": 5,
"unsettled_amount": 0,
"issued_on": "2015-04-14T06:41:39",
"currency_rate_period": null,
"id": "2C2374687D424D8AA6A3E02772900492",
"life_cycle_state": "POSTED",
"outstanding_amount": 0,
"reference_number": "55",
"due_on": "2016-07-05T20:42:13"
},
"invoice_cancellation": {
"posted_on": "2016-07-05T15:59:57",
"number": "15",
"total_amount": 5,
"issued_on": "2016-07-05T15:59:57",
"id": "CA9A48B203FD413296866132184838DA",
"life_cycle_state": "POSTED",
"reference_number": "15"
}
},
"status": {
"code": "OK",
"description": "",
"message": ""
}
} |
POST invoices/update
Tip |
---|
Available from CRM.COM R9.1.0 |
This method is used to update a single invoice but only as long it is in Draft life cycle state.
Resource URL
Parameters
...
Name
...
Type
...
Description
...
token
...
String
...
The token retrieved from the login method
...
(mandatory)
...
Invoice identifier
The identifier of the invoice that should be updated. Only invoices in draft state can be specified.The allowed invoice identifier fields are the following:
...
accounts_receivable_identifier
(optional)
...
The identifier of the invoice's updated accounts receivable. The allowed accounts receivable identifier fields are the following:
...
type_identifier
(optional)
...
The identifier of the invoice's updated type. Only Financial transaction Types with classification Invoice are allowed to be specified. The allowed financial transaction type identifier fields are the following:
...
category_identifier
(optional)
...
The identifier of the invoice's updated category. The allowed financial transaction category identifier fields are the following:
...
member_accounts_receivable_identifier
(optional)
...
due_on
(optional)
...
intended_currency_identifier
(optional)
...
The currency that the user was intended to use for the invoice. If specified then it is validated against the currency of the specified accounts receivable and if they don't match then an error is throw. Note that the intended currency is not saved within CRM.COM; it is just used for validation purposes. The allowed currency identifier fields are the following:
...
Tip |
---|
...
notes
(optional)
...
back_office_code
(optional)
...
The back office code of the invoice
...
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
...
The information related to the items of the invoice to be updated
...
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
...
title | Example 1 |
---|
HTTP Method: POST
Request:
Body:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"token":"35FA3612DEB94BF7A2FE2C9EC9EF406D",
"invoice_identifier":{"reference_number":"1013"},
"accounts_receivable_identifier":{"name":"Mathew Spector 3"},
"type_identifier":{"name":"Invoice 2"},
"category_identifier":{"name":"Invoice Categories"},
"due_on":"2014-11-05T15:49:59",
"notes":"to be issued later",
"back_office_code":"000112",
"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",
"invoice_item_set":
[
{
"action":"add",
"product_identifier": {"code": "Smartcard 2"},
"quantity":2,
"cost":15,
"discount_percentage":5,
"vat_rate_identifier":{"name":"Zero"},
"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_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"
},
{
"action":"remove",
"invoice_item_identifier": {"id": "09E3B818BB644A57AD1D19FB95007C64"}
}
]
}
|
Response:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"status": {
"message": "",
"description": "",
"code": "OK"
},
"data": {
"notes": "Marios Lannister\t4/5/2016 00:21:36\tto be issued later\tMarios Lannister\t4/5/2016 00:25:07\tto be issued later\tMarios Lannister\t4/5/2016 09:18:53\tto be issued later\tMarios Lannister\t4/5/2016 11:30:01\tto be issued later\tMarios Lannister\t4/5/2016 11:38:58\tto be issued later\tMarios Lannister\t4/5/2016 11:42:25\tto be issued later\tMarios Lannister\t4/5/2016 11:44:12\tto be issued later\tMarios Lannister\t4/5/2016 11:45:35\tto be issued later",
"udf_float_1": 10,
"udf_float_2": 20,
"invoice_item_set": [
{
"vat_percentage": 0,
"sub_total": 0,
"discount_amount": 0,
"vat_rate": {
"id": "EDE5318C0AA394902E8C7DAE0227CB01",
"name": "Zero",
"description": "No VAT applied",
"alternative_code": "ZR"
},
"discount_percentage": 0,
"net_amount": 0,
"id": "C21B99AA435742EF89B9398C60593DE9",
"quantity": 1,
"cost": 0,
"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": "EAC7A30429364176616CFEF5DF709941",
"description": "Smartcard 1",
"code": "Smartcard 1",
"alternative_code": "SC1"
}
},
{
"vat_percentage": 0,
"sub_total": 28.5,
"discount_amount": 1.5,
"vat_rate": {
"id": "EDE5318C0AA394902E8C7DAE0227CB01",
"name": "Zero",
"description": "No VAT applied",
"alternative_code": "ZR"
},
"discount_percentage": 5,
"net_amount": 30,
"id": "794A7B5C1660432D906A487062376666",
"quantity": 2,
"cost": 15,
"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"
}
}
],
"udf_float_3": 30,
"udf_float_4": 40,
"number": null,
"due_on": "2014-11-05T15:49:59",
"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": "Spector",
"middle_name": null,
"life_cycle_state": "FINANCIAL",
"company_profile": null,
"title": null,
"first_name": "Mathew",
"type": "PERSON",
"id": "95548C3522A249E6B452D20C700BA95C",
"name": null,
"company_name": null,
"demographics": {
"gender": null,
"passport_issued_by_country": null,
"social_security_number": "1245",
"passport_number": null,
"industry_sector": null,
"name_day": {
"month": null,
"day": null
},
"date_of_birth": {
"month": null,
"day": null,
"year": null
},
"id_number": "454545",
"industry": null,
"id_issued_by_country": null
}
},
"life_cycle_state": "ACTIVE",
"number": "168",
"id": "B3FB252765AF2AA339BAA0156E15E3C3",
"name": "Mathew Spector 3"
},
"discount_amount": 1.5,
"id": "4015E251C7CC4F738918454379B988C5",
"outstanding_amount": null,
"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",
"udf_date_4": "2014-08-05T15:49:59",
"vat_amount": 0,
"log_information": {
"updated_date": "2016-05-04T08:45:37",
"created_date": "2015-04-07T17:36:43",
"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": "2015-04-07T17:36:43",
"total_amount": 28.5,
"life_cycle_state": "DRAFT",
"unsettled_amount": null,
"back_office_code": "000112",
"rejection_reason": null,
"type": {
"classification": "INVOICE",
"id": "AD2930A767CA6BDB51E2BF7072D82E68",
"name": "Invoice 2",
"description": "Invoice 2",
"alternative_code": "I2"
},
"net_amount": 30,
"reference_number": "1013",
"category": {
"id": "1AABE70F46D5937ABE25B2FDCBD7BCF5",
"name": "Invoice Categories",
"description": "Invoice Categories",
"code": "IC"
}
}
}
|
...
title | Example 2 |
---|
HTTP Method: POST
Request:
Body:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"token":"{{token}}",
"invoice_identifier":{"number":"I00000581"},
"type_identifier":{"name":"Invoice"},
"due_on":"2014-11-05T15:49:59",
"notes":"to be issued later",
"back_office_code":"000112",
"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",
"invoice_item_set":
[
{
"action":"add",
"product_identifier": {"code": "Smartcard"},
"quantity":2,
"cost":15,
"discount_percentage":5,
"vat_rate_identifier":{"name":"Zero"},
"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_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": {
"notes": "CRM COM\t5/7/2016 18:55:07\tto be issued later",
"log_information": {
"created_by_unit": {
"alternative_code": "adminunit",
"group_name": "Main Group",
"community_name": "Community",
"name": "Admin Unit",
"description": "admin unit",
"id": "1"
},
"updated_by_unit": {
"alternative_code": "adminunit",
"group_name": "Main Group",
"community_name": "Community",
"name": "Admin Unit",
"description": "admin unit",
"id": "1"
},
"created_date": "2015-04-14T06:42:47",
"updated_date": "2016-07-05T15:55:07",
"updated_by_user": {
"person_name": "CRM COM",
"id": "1",
"email": "dev@crm.com",
"username": "MPAdministrator"
},
"created_by_user": {
"person_name": "k_clerides",
"id": "1C21EB0EDC614C6888A77D076C1B7018",
"email": null,
"username": "k_clerides"
}
},
"discount_amount": 1.5,
"currency_rate_period": null,
"udf_date_2": "2014-06-05T15:49:59",
"type": {
"alternative_code": "INV",
"name": "Invoice",
"description": null,
"id": "INVOICE",
"classification": "INVOICE"
},
"udf_date_1": "2014-05-05T15:49:59",
"due_on": "2014-11-05T15:49:59",
"udf_date_4": "2014-08-05T15:49:59",
"udf_date_3": "2014-07-05T15:49:59",
"invoice_item_set": [
{
"product": {
"code": "Smartcard",
"product_type": {
"service_type": null,
"used_for_provisioning": true,
"alternative_code": "S",
"composition_method": "FLAT",
"name": "SMARTCARD",
"description": "SMARTCARD",
"id": "D6BE0209EC0149989A89972CE889DF8B",
"classification": "PHYSICALGOODS",
"physical_good_type": "TRACEABLE"
},
"alternative_code": "S",
"description": null,
"id": "4F656ED5DAC44168B0805227881202CD"
},
"quantity": 2,
"cost": 15,
"vat_amount": 0,
"discount_amount": 1.5,
"sub_total": 28.5,
"id": "6097885683D243B092D48BB90274F595",
"net_amount": 30,
"discount_percentage": 5,
"vat_percentage": 0,
"vat_rate": {
"alternative_code": "Z",
"name": "Zero",
"description": null,
"id": "B975C041156341D8A9D2F83FC8D36E87"
}
},
{
"product": {
"code": "aionet",
"product_type": {
"service_type": "TERMED",
"used_for_provisioning": true,
"alternative_code": "Main Packages",
"composition_method": "FLAT",
"name": "Main Packages",
"description": null,
"id": "E186E293AAAB49EE86A729540A4287FE",
"classification": "SERVICES",
"physical_good_type": null
},
"alternative_code": "aionet",
"description": null,
"id": "100D15C611CD4B0591EF62F2163266B9"
},
"quantity": 1,
"cost": 9,
"vat_amount": 0,
"discount_amount": 0,
"sub_total": 9,
"id": "641A3AA0B58146D1818239931BA17C4B",
"net_amount": 9,
"discount_percentage": 0,
"vat_percentage": 0,
"vat_rate": {
"alternative_code": "VAT 9%",
"name": "VAT 9%",
"description": null,
"id": "48ADFA77916048328685049A3B7E3F64"
}
}
],
"number": "I00000581",
"udf_float_3": 30,
"udf_float_4": 40,
"vat_amount": 0,
"rejection_reason": null,
"id": "00115409F875439DBF1C757039AA3D08",
"udf_float_1": 10,
"udf_float_2": 20,
"udf_string_2": "udf string 2",
"udf_string_3": "udf string 3",
"accounting_period_information": null,
"udf_string_4": "udf string 4",
"udf_string_5": "udf string 5",
"udf_string_1": "udf string 1",
"accounts_receivable": {
"number": "ACR0000000217",
"name": "ACR0000000217 Andreas1 Georgiou",
"id": "38A43B82198F4E508AD05F88EE6ACCFA",
"life_cycle_state": "ACTIVE",
"account_owner": {
"company_profile": null,
"company_name": null,
"name": null,
"last_name": "Georgiou",
"id": "5E106D94863C4709BA3A8AA5621D1789",
"life_cycle_state": "FINANCIAL",
"middle_name": null,
"title": null,
"type": "PERSON",
"first_name": "Andreas1",
"demographics": {
"name_day": {
"month": null,
"day": null
},
"id_number": "6453214",
"gender": null,
"date_of_birth": {
"month": null,
"year": null,
"day": null
},
"industry_sector": null,
"passport_number": null,
"industry": null,
"social_security_number": null,
"id_issued_by_country": null,
"passport_issued_by_country": null
}
}
},
"life_cycle_state": "DRAFT",
"reference_number": "57",
"posted_on": "2015-04-14T06:43:18",
"total_amount": 37.5,
"unsettled_amount": null,
"issued_on": "2015-04-14T06:42:47",
"net_amount": 39,
"outstanding_amount": null,
"udf_string_6": "udf string 6",
"category": null,
"udf_string_7": "udf string 7",
"udf_string_8": "udf string 8",
"back_office_code": "000112"
},
"status": {
"code": "OK",
"description": "",
"message": ""
}
} |
POST invoices/write_off
Tip |
---|
Available from CRM.COM R13.0.0 |
This method is used to write off a single invoice but only as long it is in Posted life cycle state and not fully allocated
Resource URL
Parameters
...
Name
...
Type
...
Description
...
token
...
String
...
The token retrieved from the login method
...
(mandatory)
...
Invoice identifier
The identifier of the invoice that should be written off. Only Invoices in Posted life cycle state are allowed to be specified and only as long as they are not paid. The allowed invoice identifier fields are the following:
...
type_identifier
(mandatory)
...
The financial transaction type of the Write Off. The allowed financial transaction type identifier fields are the following:
...
category_identifier
(optional)
...
The financial transaction category of the Write Off. The allowed financial transaction category identifier fields are the following:
...
notes
(optional)
...
back_office_code
(optional)
...
A back office code for the Write off. If specified then it should be unique
...
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)
...
Restrictions
- It is mandatory to specify one of the semi-optional parameters. Only one of those parameters is allowed to be specified.
Response Data
Name | Type | Description |
invoice | Invoice object | The invoice that was written off |
write_off | Write Off object | The write off that was created |
...
Examples
Expand | ||||||
---|---|---|---|---|---|---|
|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"token":"{{token}}",
"invoice_identifier":{"reference_number":"1542"},
"type_identifier":{"name":"Write Off"},
"category_identifier":{"name":"Write Off"},
"udf_string_1":"Write Off",
"notes":"Write Off"
} |
Response:
theme | Confluence |
---|---|
language | javascript |
linenumbers | true |
name | blue |
---|
Child pages (Children Display) | ||||
---|---|---|---|---|
|