HTTP Method: GET
URL: https://www.aplos.com/hermes/api/v1/receivables
Parameters:
Headers:
Example JSON:
{
"version": "v2_0_0",
"status": 200,
"meta": {
"resource_count": 1,
"available_filters": {
"f_accountnumber": "Account number of any line in the receivable",
"f_amount": "Total amount of the receivable (always a positive number)",
"f_contact": "Contact ID",
"f_contactname": "Any part of any contact name (first, last, and/or company), case insensitive",
"f_fund": "Fund ID",
"f_note": "Any part of the note, case insensitive",
"f_rangeend": "Maximum date range (inclusive). Format: yyyy-MM-dd",
"f_rangestart": "Minimum date range (inclusive) Format: yyyy-MM-dd",
"f_referencenum": "Reference number"
}
},
"links": {
"next": "/api/v1/receivables?page_size=1&page_num=2",
"self": "/api/v1/receivables?page_size=1&page_num=1"
},
"data": {
"receivables": [
{
"id": 1,
"bill_date": "2014-12-31",
"due_date": "2015-01-15",
"reference_num": "1",
"note": "My First Receivable",
"contact": {
"id": 1,
"companyname": "Aplos",
"type": "company"
},
"created": "2014-12-31T01:23:45.678-0700",
"modified": "2014-12-31T12:34:56.789-0700",
"amount": 100,
"received": 100,
"asset_account": {
"account_number": 1100,
"name": "Accounts Receivable"
}
}
]
}
}
HTTP Method: GET
URL: https://www.aplos.com/hermes/api/v1/receivables/:receivableId
Parameters:
Headers:
Example JSON:
{
"version": "v2_0_0",
"status": 200,
"meta": {
"resource_count": 1
},
"links": {
"self": "/api/v1/receivables/1"
},
"data": {
"receivable": {
"id": 1,
"bill_date": "2014-12-31",
"due_date": "2015-01-15",
"reference_num": "1",
"note": "My First Receivable",
"contact": {
"id": 1,
"companyname": "Aplos",
"type": "company"
},
"created": "2014-12-31T01:23:45.678-0700",
"modified": "2014-12-31T12:34:56.789-0700",
"amount": 100,
"received": 100,
"asset_account": {
"account_number": 1100,
"name": "Accounts Receivable"
},
"lines": [
{
"id": 1,
"note": "For fund 1",
"amount": 75,
"account": {
"account_number": 4000,
"name": "Donation Income"
},
"fund": {
"id": 1,
"name": "General Fund"
}
},
{
"id": 2,
"note": "For fund 2",
"amount": 25,
"account": {
"account_number": 4000,
"name": "Donation Income"
},
"fund": {
"id": 2,
"name": "Building Fund"
}
}
]
}
}
}
HTTP Method: POST
URL: https://www.aplos.com/hermes/api/v1/receivables
Parameters:
Headers:
Example JSON Body:
{
"bill_date": "2014-12-31",
"due_date": "2015-01-15",
"reference_num": "1000",
"note": "My First Receivable",
"contact": {
"companyname": "Aplos",
"type": "company"
},
"asset_account": {
"account_number": 1100
},
"lines": [
{
"amount": 75,
"note": "For fund 1",
"account": {
"account_number": 4000
},
"fund": {
"id": 1
}
},
{
"amount": 25,
"note": "For fund 2",
"account": {
"account_number": 4000
},
"fund": {
"id": 2
}
}
]
}
Example JSON Response:
{
"version": "v2_0_0",
"message": "posted: 2",
"status": 200,
"meta": {
"resource_count": 1
},
"links": {
"self": "/api/v1/receivables/2"
},
"data": {
"receivable": {
"id": 2,
"bill_date": "2014-12-31",
"due_date": "2015-01-15",
"reference_num": "1000",
"note": "My First Receivable",
"contact": {
"id": 1,
"companyname": "Aplos",
"type": "company"
},
"created": "2014-12-31T01:23:45.678-0700",
"amount": 100,
"asset_account": {
"account_number": 1100,
"name": "Accounts Receivable"
},
"lines": [
{
"id": 3,
"note": "For fund 1",
"amount": 75,
"account": {
"account_number": 4000,
"name": "Donation Income"
},
"fund": {
"id": 1,
"name": "General Fund"
}
},
{
"id": 4,
"note": "For fund 2",
"amount": 25,
"account": {
"account_number": 4000,
"name": "Donation Income"
},
"fund": {
"id": 2,
"name": "Building Fund"
}
}
]
}
}
}
HTTP Method: PUT
URL: https://www.aplos.com/hermes/api/v1/receivables/:receivableId
Parameters:
Headers:
Example JSON Body:
{
"bill_date": "2014-12-31",
"due_date": "2015-01-15",
"reference_num": "1000",
"note": "My First Receivable (updated amounts)",
"contact": {
"companyname": "Aplos",
"type": "company"
},
"asset_account": {
"account_number": 1100
},
"lines": [
{
"amount": 750,
"note": "For fund 1",
"account": {
"account_number": 4000
},
"fund": {
"id": 1
}
},
{
"amount": 250,
"note": "For fund 2",
"account": {
"account_number": 4000
},
"fund": {
"id": 2
}
}
]
}
Example JSON Response:
{
"version": "v2_0_0",
"message": "put: 2",
"status": 200,
"meta": {
"resource_count": 1
},
"links": {
"self": "/api/v1/receivables/2"
},
"data": {
"receivable": {
"id": 2,
"bill_date": "2014-12-31",
"due_date": "2015-01-15",
"reference_num": "1000",
"note": "My First Receivable (updated amounts)",
"contact": {
"id": 1,
"companyname": "Aplos",
"type": "company"
},
"created": "2014-12-31T01:23:45.678-0700",
"modified": "2014-12-31T12:34:56.789-0700",
"amount": 1000,
"asset_account": {
"account_number": 1100,
"name": "Accounts Receivable"
},
"lines": [
{
"id": 3,
"note": "For fund 1",
"amount": 750,
"account": {
"account_number": 4000,
"name": "Donation Income"
},
"fund": {
"id": 1,
"name": "General Fund"
}
},
{
"id": 4,
"note": "For fund 2",
"amount": 250,
"account": {
"account_number": 4000,
"name": "Donation Income"
},
"fund": {
"id": 2,
"name": "Building Fund"
}
}
]
}
}
}
HTTP Method: DELETE
URL: https://www.aplos.com/hermes/api/v1/receivables/:receivableId
Parameters:
Headers:
Example JSON Response:
{
"version": "v2_0_0",
"message": "deleted: 2",
"status": 200
}
HTTP Method: PUT
URL: https://www.aplos.com/hermes/api/v1/receivables/:receivableId/receive
Parameters:
Headers:
Example JSON Body:
{
"received_date": "2015-01-15",
"cash_account": {
"account_number": 1000
}
}
Example JSON Response:
{
"version": "v2_0_0",
"message": "received: 2",
"status": 200,
"meta": {
"resource_count": 1
},
"links": {
"self": "/api/v1/receivables/2"
},
"data": {
"receivable": {
"id": 2,
"bill_date": "2014-12-31",
"due_date": "2015-01-15",
"reference_num": "1000",
"note": "My First Receivable (updated amounts)",
"contact": {
"id": 1,
"companyname": "Aplos",
"type": "company"
},
"created": "2014-12-31T01:23:45.678-0700",
"modified": "2014-12-31T12:34:56.789-0700",
"amount": 1000,
"received": 1000,
"asset_account": {
"account_number": 1100,
"name": "Accounts Receivable"
},
"lines": [
{
"id": 3,
"note": "For fund 1",
"amount": 750,
"account": {
"account_number": 4000,
"name": "Donation Income"
},
"fund": {
"id": 1,
"name": "General Fund"
}
},
{
"id": 4,
"note": "For fund 2",
"amount": 250,
"account": {
"account_number": 4000,
"name": "Donation Income"
},
"fund": {
"id": 2,
"name": "Building Fund"
}
}
]
}
}
}