Versions Compared

Key

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

This method is creating a new invoice either in Draft or Posted state

...

Parameters

...

Name

...

Type

...

Description

...

token

...

String

...

The token retrieved from the login method

...

(mandatory)

...

Accounts receivable identifier  

...

Excerpt

This method is creating a new invoice either in Draft or Posted state


Resource URL

Parameters

...

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
titleExample 1

HTTP Method: POST

 

Request:

Body:

Code Block
themeConfluence
languagejavascript
linenumberstrue
{
   "token":"4BCD003AC90E8DECBA474A03AB185CBB",
   "accounts_receivable_identifier":{"number":"401"},
   "type_identifier":{"name":"Invoice 1"},
   "life_cycle_state":"POSTED",
   "category_identifier":{"name":"Invoice Category 1"},
   "due_on":"2014-11-05T15:49:59",
   "notes":"to be issued later",
   "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":
   [
      {
         "product_identifier": {"code": "Smart Card"},
         "quantity":3,
         "cost":20,
         "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_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": 57,
        "issued_on": "2014-10-29T18:20:40",
        "life_cycle_state": "POSTED",
		"unsettled_amount": null,
        "number": "I00000498",
        "due_on": "2014-11-05T15:49:59",
        "id": "399ABC9CAAFF820100582EDEB842F026",
        "outstanding_amount": null,
        "reference_number": "542",
        "posted_on": "2014-10-29T18:20:40"
    }
}

...

titleExample 2

HTTP Method: POST

 

Request:

Body:

...

themeConfluence
languagejavascript
linenumberstrue

...

lifecycle_statemandatoryString state of the retrieved invoice which can be one of the following:

DRAFT, POSTED

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

The member accounts receivable. Applicable only if the Invoice is issued against a parent accounts receivable within a group which funds its members. The allowed accounts receivable identifier fields are the following:

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 thrown. 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:

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 invoice 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 invoice. 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 invoice which can be one of the following:

DRAFT, POSTED

category_identifier

(optional)

Financial transaction category identifier

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

Include Page
V4:accountsfinancial_transaction_receivablecategory_identifier
V4:accountsfinancial_transaction_receivablecategory_identifier

typemember_accounts_receivable_identifier

(mandatoryoptional)

Financial transaction type identifierThe financial transaction type of the invoice. The allowed financial transaction type identifier field Accounts Receivable IdentifierThe member accounts receivable. Applicable only if the Invoice is issued against a parent accounts receivable within a group which funds its members. The allowed accounts receivable identifier fields are the following:

Include Page
V4:financialaccounts_transaction_typereceivable_identifier
V4:financialaccounts_transactionreceivable_type_identifier

due_

on

(

optional)

DateThe categorydate that the credit period for that specific invoice is ending.

intended_currency_identifier

(optional)

Financial transaction category identifier
Include Page
V4:financial_transaction_category_identifierV4:financial_transaction_category_identifier

member_accounts_receivable_identifier

(optional)

Accounts Receivable Identifier
Include Page
V4:accounts_receivable_identifierV4:accounts_receivable_identifier

due_on

(optional)

DateThe date that the credit period for that specific invoice is ending.

intended_currency_identifier

(optional)

Currency Identifier
Include Page
V4:currency_identifierV4:currency_identifier
Tip

Available from CRM.COM R11.0.0

notes

(optional)

StringShared notes for the invoice

back_office_code

(optional)

String

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

Tip

Available from CRM.COM R9.1.0

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

invoice_item_set

(mandatory)

Set of invoice item objectsThe items of the invoice

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

...

Currency Identifier

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 thrown. 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:

Include Page
V4:currency_identifier
V4:currency_identifier

Tip

Available from CRM.COM R11.0.0

notes

(optional)

StringShared notes for the invoice

back_office_code

(optional)

String

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

Tip

Available from CRM.COM R9.1.0

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

invoice_item_set

(mandatory)

Set of invoice item objectsThe items of the invoice

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

Anchor
invoice referred parameters
invoice referred parameters
Referred Parameter Objects

Include Page
V4:invoice_item_parameters
V4:invoice_item_parameters

Restrictions

  • It is mandatory to specify one of the semi-optional parameters. Only one of those parameters is allowed to be specified.

Response Data

Include Page
V4:invoice_short
V4:invoice_short

Examples

Expand
titleExample 1

HTTP Method: POST

 

Request:

Body:

Code Block
themeConfluence
languagejavascript
linenumberstrue
{
   "token":"4BCD003AC90E8DECBA474A03AB185CBB",
   "accounts_receivable_identifier":{"number":"401"},
   "type_identifier":{"name":"Invoice 1"},
   "life_cycle_state":"POSTED",
   "category_identifier":{"name":"Invoice Category 1"},
   "due_on":"2014-11-05T15:49:59",
   "invoice_item_setnotes":"to be issued later",
[       {
         "product_identifier": {"code": "Smartcard"}"udf_string_1":"udf string 1",
   "udf_string_2":"udf string 2",
   "quantityudf_string_3":"udf string 3",
   "udf_string_4":"udf string 4",
   "costudf_string_5":20,"udf     string 5",
    "discountudf_string_percentage6":5,"udf      string 6",
   "vatudf_rate_identifier":{"namestring_7":"Zero"},udf string 7",
       "udf_string_18":"udf string 18",
   "udf_float_1":10,
     "udf_stringfloat_2":20,
   "udf string 2"_float_3":30,
   "udf_float_4":40,
   "udf_float_5":50,
     "udf_stringfloat_36":60,
   "udf string 3"_float_7":70,
     "udf_float_8":80,
   "udf_stringdate_41":"udf string 4",
  2014-05-05T15:49:59",
      "udf_stringdate_52":"udf string 5",
   2014-06-05T15:49:59",
     "udf_stringdate_63":"udf string 6",
  2014-07-05T15:49:59",
      "udf_stringdate_74":"udf string 7",
     2014-08-05T15:49:59",
   "udfinvoice_stringitem_8set":"udf
string 8",  [
       "udf_float_1":10,{
         "udfproduct_float_2identifier":20,
         "udf_float_3":30 {"code": "Smart Card"},
         "udf_float_4quantity":403,
         "udf_float_5cost":5020,
         "udfdiscount_float_6percentage":605,
         "udfvat_float_7":70rate_identifier":{"name":"Zero"},
         "udf_floatstring_81":80"udf string 1",
         "udf_datestring_12":"2014-05-05T15:49:59udf string 2",
         "udf_datestring_23":"2014-06-05T15:49:59udf string 3",
         "udf_datestring_34":"2014-07-05T15:49:59udf string 4",
         "udf_datestring_45":"2014-08-05T15:49:59"
 udf string 5",
     }     ]
}

Response:

Code Block
themeConfluence
languagejavascript
linenumberstrue
{
  "data": {"udf_string_6":"udf string 6",
         "postedudf_string_on7": "2016-07-05T15:33:48"udf string 7",
    "number": "I00000678",     "totaludf_string_amount8": 57,
"udf string 8",
   "unsettled_amount": null,     "issued_on": "2016-07-05T15:33:48"udf_float_1":10,
         "currencyudf_ratefloat_period2": null20,
    "id": "C83F011A58E0450EB9ADAF3416692284",     "lifeudf_cyclefloat_state3": "POSTED",30,
         "outstandingudf_float_amount4": null40,
    "reference_number": "97",     "dueudf_float_on": "2016-07-07T15:33:48"5":50,
      },   "statusudf_float_6":60,
{     "code": "OK",
    "descriptionudf_float_7": ""70,
    "message": ""   }
}
Expand
titleExample 3

HTTP Method: POST

 

Request:

Body:

Code Block
themeConfluence
languagejavascript
linenumberstrue
{ "udf_float_8":80,
         "tokenudf_date_1": "{{token}}","2014-05-05T15:49:59",
         "accountsudf_receivabledate_identifier2":{"number":"ACR0000008050"},"2014-06-05T15:49:59",
         "typeudf_date_identifier3":{"name":"Invoice"}"2014-07-05T15:49:59",
    "life_cycle_state":"POSTED",     "memberudf_accountsdate_receivable_identifier4":{"number":"ACR0000008052"},"2014-08-05T15:49:59"
       }
     "invoice_item_set":
    [
  ]
}

Response:

Code Block
themeConfluence
languagejavascript
linenumberstrue
      {
    "status":
    {
     {   "message": null,
        "product_identifierdescription":{"code":"Gold"},
    null,
        "quantitycode":1, "OK"
    },
      "costdata":30,
    {
        "discounttotal_percentageamount":10 57,

           "vatissued_rate_identifieron":{"name":"Standard"} "2014-10-29T18:20:40",
        },
 "life_cycle_state": "POSTED",
		"unsettled_amount": null,
       { "number": "I00000498",
          "productdue_identifieron":{"code":"Sports 1"} "2014-11-05T15:49:59",
            "quantity":2,
   "id": "399ABC9CAAFF820100582EDEB842F026",
        "costoutstanding_amount":10,
    null,
        "discountreference_percentagenumber":5 "542",
            "vatposted_rate_identifieron":{"name":"Standard"}
  "2014-10-29T18:20:40"
      }
    ]
}
       
Response
}
Expand
titleExample 2

HTTP Method: POST

 

Request:

Body:

{ "data":
Code Block
themeConfluence
languagejavascript
linenumberstrue
linenumberstrue
{
    "posted_ontoken": "2017-04-05T17:28:29"{{token}}",
    "accounts_receivable_identifier":{"number": "I00002949ACR0000000214"},
    "total_amount": 57.5type_identifier":{"name":"Invoice"},
    "unsettledlife_cycle_amountstate": null"POSTED",
    "issued_on": "2017-04-05T17:28:29"notes":"to be issued later",
    "currencyudf_ratestring_period1": null,
"udf string 1",
   "idudf_string_2":"udf string 2"2415A59E46F347CAB2392B4A000EB0A1",
    "lifeudf_cyclestring_state3":"udf string 3"POSTED",
    "outstandingudf_string_amount4": null"udf string 4",
    "referenceudf_string_number5": "2762"udf string 5",
    "dueudf_string_on6": "2017-04-07T17:28:29"
  },"udf string 6",
   "statusudf_string_7":"udf {string 7",
   "codeudf_string_8": "OK"udf string 8",
    "descriptionudf_float_1": ""10,
    "messageudf_float_2":20,
   ""
udf_float_3":30,
 } }   

 

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

 

Expand
titleExample 1

HTTP Method: POST

 

Request:

Body:

Code Block
themeConfluence
languagejavascript
linenumberstrue
{
	"token": "B8D7A12E9F91AFADE914B7330AFD08CB",
	"invoice_identifier":{"reference_number":"559"}
}

Response:

Code Block
themeConfluence
languagejavascript
linenumberstrue
{
    "status":
    {
        "message": null "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":
   [
      {
         "product_identifier": {"code": "Smartcard"},
         "descriptionquantity":3,
null,         "codecost":20,
"OK"     },     "datadiscount_percentage":
    {5,
         "total_amount": 57,vat_rate_identifier":{"name":"Zero"},
         "issuedudf_string_on1": "2014-11-07T11:38:48"udf string 1",
         "lifeudf_cyclestring_state2":"udf string 2"POSTED",
         "unsettledudf_string_amount3": 57"udf string 3",
         "numberudf_string_4": "I00000519"udf string 4",
         "dueudf_string_on5": "2014-11-10T15:49:59"udf string 5",
         "idudf_string_6":"udf string 6"7968903798226F14CB73E59E2DD8712B",
         "outstandingudf_string_amount7": 0"udf string 7",
         "referenceudf_string_number8":"udf string 8"559",
         "postedudf_float_on1": "2014-11-07T11:45:41"
    }
}
Expand
titleExample 2

HTTP Method: POST

 

Request:

Body:

Code Block
themeConfluence
languagejavascript
linenumberstrue
{10,
         "tokenudf_float_2":"{{token}}"20,
    "invoice_identifier":{"reference_number":"55"}
}

Response:

Code Block
themeConfluence
languagejavascript
linenumberstrue
{
  "data": {     "udf_float_3":30,
         "udf_float_4":40,
         "postedudf_float_on5": "2016-07-05T15:46:36"50,
    "number": "I00000679",     "totaludf_float_amount6": 5,60,
         "unsettledudf_float_amount7": -570,
    "issued_on": "2015-04-14T06:41:39",     "currencyudf_ratefloat_period8": null80,

   "id": "2C2374687D424D8AA6A3E02772900492",     "lifeudf_cycledate_state1": "POSTED"2014-05-05T15:49:59",

   "outstanding_amount": -5,     "referenceudf_date_number2": "55","2014-06-05T15:49:59",
         "dueudf_date_on3": "20162014-07-05T2005T15:4249:1359"
  },

 "status": {        "codeudf_date_4": "OK","2014-08-05T15:49:59"
    "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

Expand
titleExample 1

HTTP Method: POST

 

Request:

Body:

Code Block
themeConfluence
languagejavascript
linenumberstrue
{
	"token": "B8D7A12E9F91AFADE914B7330AFD08CB",
	"invoice_identifier":{"reference_number":"559"},
	"rejection_reason_identifier":{"name":"Reject Due to Business Request"}
}

ResponseResponse:

Code Block
themeConfluence
languagejavascript
linenumberstrue
{
  "data": {
    "posted_on": "2016-07-05T15:33:48",
    "number": "I00000678",
    "total_amount": 57,
    "unsettled_amount": null,
    "issued_on": "2016-07-05T15:33:48",
    "currency_rate_period": null,
    "id": "C83F011A58E0450EB9ADAF3416692284",
    "life_cycle_state": "POSTED",
    "outstanding_amount": null,
    "reference_number": "97",
    "due_on": "2016-07-07T15:33:48"
  },
  "status": {
    "code": "OK",
    "description": "",
    "message": ""
  }
}
Expand
titleExample 3

HTTP Method: POST

 

Request:

Body:

Code Block
themeConfluence
languagejavascript
linenumberstrue
{
    "status":
    {
  
     "messagetoken": null"{{token}}",
    "accounts_receivable_identifier":{"number":"ACR0000008050"},
   "description": null,
   "type_identifier":{"name":"Invoice"},
     "codelife_cycle_state": "OKPOSTED",
    "member_accounts_receivable_identifier":{"number":"ACR0000008052"},
    "datainvoice_item_set":
    {[
        {
 "total_amount": 57,           "issuedproduct_onidentifier": "2014-11-07T11:38:48"{"code":"Gold"},
        "life_cycle_state    "quantity": "REJECTED",1,
            "unsettled_amountcost":30,
   0,         "numberdiscount_percentage": "I00000519",10,
            "duevat_rate_onidentifier": "2014-11-10T15:49:59",{"name":"Standard"}
        },
  "id": "7968903798226F14CB73E59E2DD8712B",      {
  "outstanding_amount": 0,         "reference_numberproduct_identifier":{"code":"Sports 1"559"},
            "posted_onquantity": "2014-11-07T11:45:41"2,
      } }
Expand
titleExample 1

HTTP Method: POST

 

Request:

Body:

Code Block
themeConfluence
languagejavascript
linenumberstrue
{     "tokencost":"{{token}}",10,
            "invoicediscount_identifierpercentage":{"reference_number":"541"},5,
            "rejectionvat_reasonrate_identifier":{"name":"Reject Due to Error"}
}Standard"}
        }
    ]
}
       

Response:

Code Block
themeConfluence
languagejavascript
linenumberstrue
{
  "data": {
    "posted_on": "20162017-04-14T0605T17:4328:2429",
    "number": "542I00002949",
    "total_amount": 10057.5,
    "unsettled_amount": 0null,
    "issued_on": "20162017-04-15T0005T17:0028:0029",
    "currency_rate_period": null,
    "id": "01A75EF631294253B24B2401CA65F15D2415A59E46F347CAB2392B4A000EB0A1",
    "life_cycle_state": "REJECTEDPOSTED",
    "outstanding_amount": 0null,
    "reference_number": "5412762",
    "due_on": "20162017-04-16T0607T17:4328:2429"
  },
  "status": {
    "code": "OK",
    "description": "",
    "message": ""
  }
}