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

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:

Name

Type

Description

id

(semi-optional)

String

The ID of the credit note

number

(semi-optional)

String

The number of the credit note

reference_number

(semi-optional)

String

The reference number of  the credit note

back_office_code

(semi-optional)

String

The back office code of the credit note

Available from CRM.COM R9.1.0

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

 credit note object response data

Name

Type

Description

id

String

The ID of the retrieved credit note

number

String

The number of the retrieved credit note

reference_number

String

The reference number of the retrieved credit note

life_cycle_state

String

The life cycle state of the credit note. One of the following values is returned:

DRAFT, REJECTED, POSTED, CANCELLED
issued_onDateThe date that the credit note was issued
posted_onDateThe date that the credit note was posted
total_amountNumberThe total amount of the credit note
currency_rate_periodCurrency Rate Period object

The currency rate period based on which the credit note's amounts were calculated

Available from CRM.COM R10.0.0

Referred Objects Response Data

 currency rate period object response data

Name

Type

Description

id

String

The ID of the retrieved currency rate period

rateNumberThe exchange rate of the currency rate period
inverse_rateNumberThe inverse exchange rate of the currency rate period
from_dateDateThe date from which the exchange rate is valid
to_dateDateThe date until which the exchange rate is valid
currencyCurrency ObjectThe Currency with which the returned exchange rate information refers to

Referred Objects Response Data

 currency object response data

Name

Type

Description

id

String

The ID of the retrieved currency

code

String

The code of the retrieved currency

prefix_symbolStringThe prefix symbol for the specified currency

suffix_symbol

StringThe suffix symbol for the specified currency
life_cycle_stateString

The life cycle state for the specified currency, which can be EFFECTIVE or NOT EFFECTIVE

Available from CRM.COM R14.0.0

integer_part_nameStringThe integer part name for the specified currency
decimal_part_nameStringThe decimal part name for the specified currency

Examples

 Example 1

HTTP Method: POST

 

Request:

Body:

{
	"token": "B8D7A12E9F91AFADE914B7330AFD08CB",
	"credit_note_identifier":{"reference_number":"118"},
}


Response:

{
    "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"
    }
}
 Example 1

HTTP Method: POST

 

Request:

Body:

{
    "token":"{{token}}",
    "credit_note_identifier":{"reference_number":"24"}
}


Response:

{
 "data": {
 "posted_on": "2016-07-05T15:06:38",
 "number": "108",
 "total_amount": 5.45,
 "issued_on": "2016-06-14T14:12:13",
 "currency_rate_period": null,
 "id": "C90CA0E074194C57B88C2C107B83A244",
 "life_cycle_state": "POSTED",
 "reference_number": "24"
 },
 "status": {
 "code": "OK",
 "description": "",
 "message": ""
 }
}