Advancement Devolutions
This section describes the API of the advancement devolution resource.
Parameters
id: | integer |
amount: | float |
currency: | string |
receiver_id: | JSON object |
payer: | JSON object |
currency: | string based on currencies code |
_links: |
array of object array of links of the advancement |
Example of Advancement Devolution
Create an advancement devolutions
This request creates a new advancement devolution.
Important:
- The payer must have a relation with the receiver to create a new advancement devolution.
Parameters
payer: |
payer object attributes required
id: integer
type: string |
receiver: |
receiver object attributes required
id: integer
type: string |
amount: | float required |
date: | string required iso8601 format |
currency: | string based on currencies code |
Expired organization
If the organization is expired, it will return an 402 error.
Definition
POST https://app.rexpense.com/api/v1/advancement_devolutions
Example Request
$ curl -u $YOUR_API_TOKEN:X -X POST https://app.rexpense.com/api/v1/advancement_devolutions \ -H 'Accept: application/json' \ -H 'Content-type: application/json' \ -d '{"amount": 1000.00, "date": "2013-12-24", "receiver": {"id": 1, "type": "Organization"}}'
Response Example Success
HTTP 201 CREATED
Response Example Failure
HTTP 422 Unprocessable Entity
Example Response Failure when organization is expired
HTTP 402 Payment Required