POST bill/present_and_reject

This method is used to set the life cycle state of a bill to presented and rejected

Resource URL

Parameters

Name

Type

Description

token

String

The token retrieved from the login method

bill_identifier

(mandatory)

Bill identifier  

The identifier of the bill that should be updated.The allowed bill identifier fields are the following:

Name

Type

Description

id

(semi-optional)

String

The ID of the bill

number

(semi-optional)

String

The number of the bill

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

 bill object response data

Name

Type

Description

id

String

The ID of the retrieved bill

number

String

The number of the retrieved bill

life_cycle_state

String

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

POSTED, PRESENTED, PRESENTED_CONFIRMED, PRESENTED_REJECTED

from_dateDateThe date from which the accounts receivable is billed for
to_dateDateThe date until which the accounts receivable is billed for
due_dateDate

The due date of bill. The field is calculated dynamically. The maximum due date of related invoices.

Available from CRM.COM R12.4.0

total_billed_amountNumberThe total billed amount
total_amount_to_be_paidNumberThe total amount to be paid
bill_statusString

The status of the bill in terms of it is settled or not.The supported values are the following:

SETTLED, UNSETTLED, PARTIALLY_SETTLED

currencyCurrency object

The bill's currency

Available from CRM.COM R10.0.0

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": "D0B5DB906B4C1B56FFEFCE634435A4D5",
    "bill_identifier":{"number":"100"},
}


Response:

 {
    "status":
    {
        "message": null,
        "description": null,
        "code": "OK"
    },
    "data":
    {
        "total_amount_to_be_paid": 49.5,
        "bill_status": "SETTLED",
        "to_date": null,
        "from_date": null,
        "life_cycle_state": "PRESENTED_AND_REJECTED",
        "total_billed_amount": 24.75,
        "number": "100",
        "id": "34490C34216FFDB1CF563C106449A817"
    }
}

 Example 2

HTTP Method: POST

 

Request:

Body:

{
    "token": "{{token}}",
    "bill_identifier":{"number":"54"}
}


Response:

{
  "data": {
    "number": "54",
    "from_date": "2016-04-01T00:00:00",
    "to_date": "2016-06-01T00:00:00",
    "currency": {
      "suffix_symbol": null,
      "prefix_symbol": "€",
      "decimal_part_name": null,
      "code": "EUR",
      "integer_part_name": null,
      "id": "2"
    },
    "id": "7304970D4987432B96D54F72971A4152",
    "life_cycle_state": "PRESENTED_AND_REJECTED",
    "total_billed_amount": 100,
    "total_amount_to_be_paid": 160.35,
    "bill_status": "SETTLED"
  },
  "status": {
    "code": "OK",
    "description": "",
    "message": ""
  }
}