You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
Version 1
Next »
POST bills/present
This method is used to set the life cycle state of a bill to presented
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_date | Date | The date from which the accounts receivable is billed for |
to_date | Date | The date until which the accounts receivable is billed for |
due_date | Date | The due date of bill. The field is calculated dynamically. The maximum due date of related invoices. |
total_billed_amount | Number | The total billed amount |
total_amount_to_be_paid | Number | The total amount to be paid |
bill_status | String | The status of the bill in terms of it is settled or not.The supported values are the following: SETTLED, UNSETTLED, PARTIALLY_SETTLED |
currency | Currency object | The bill's currency |
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_symbol | String | The prefix symbol for the specified currency |
suffix_symbol | String | The suffix symbol for the specified currency |
life_cycle_state | String | The life cycle state for the specified currency, which can be EFFECTIVE or NOT EFFECTIVE |
integer_part_name | String | The integer part name for the specified currency |
decimal_part_name | String | The decimal part name for the specified currency |
Examples
Example 1
HTTP Method: POST
Request:
Body:
{
"token": "D0B5DB906B4C1B56FFEFCE634435A4D5",
"bill_identifier":{"number":"10"},
}
Response:
{
"status":
{
"message": null,
"description": null,
"code": "OK"
},
"data":
{
"total_amount_to_be_paid": 160.97,
"bill_status": "SETTLED",
"to_date": null,
"from_date": null,
"life_cycle_state": "PRESENTED",
"total_billed_amount": 160.97,
"number": "10",
"id": "A3887F949F688206F424A5E3001E9153"
}
}
Example 2
HTTP Method: POST
Request:
Body:
{
"token": "{{token}}",
"bill_identifier":{"number":"172"}
}
Response:
{
"data": {
"number": "172",
"from_date": "2016-07-04T14:11:56",
"to_date": null,
"currency": {
"suffix_symbol": null,
"prefix_symbol": "€",
"decimal_part_name": null,
"code": "EUR",
"integer_part_name": null,
"id": "2"
},
"id": "F4A9F227C9B74E07B519AF0AE96C5466",
"life_cycle_state": "PRESENTED",
"total_billed_amount": 260,
"total_amount_to_be_paid": 467.42,
"bill_status": "UNSETTLED"
},
"status": {
"code": "OK",
"description": "",
"message": ""
}
}