HTTP Method: GET
URL: https://www.aplos.com/hermes/api/v1/purposes
Parameters:
Headers:
Example JSON:
{
"version": "v2_0_0",
"status": 200,
"meta": {
"resource_count": 1,
"available_filters": {
"f_enabled": "Whether the purpose is enabled: y, n",
"f_name": "Any part of the name, case insensitive"
}
},
"links": {
"next": "/api/v1/purposes?page_size=1&page_num=2",
"self": "/api/v1/purposes?page_size=1&page_num=1"
},
"data": {
"purposes": [
{
"id": 1,
"name": "General",
"description": "General purpose",
"is_enabled": true,
"seq": 1,
"created": "2014-12-31T01:23:45.678-0700",
"modified": "2014-12-31T12:34:56.789-0700",
"income_account": {
"account_number": 4000,
"name": "Contributions Income"
},
"fund": {
"id": 1,
"name": "General Fund"
}
}
]
}
}
HTTP Method: GET
URL: https://www.aplos.com/hermes/api/v1/purposes/:purposeId
Parameters:
Headers:
Example JSON:
{
"version": "v2_0_0",
"status": 200,
"meta": {
"resource_count": 1
},
"links": {
"self": "/api/v1/purposes/1"
},
"data": {
"purpose": {
"id": 1,
"name": "General",
"description": "General purpose",
"is_enabled": true,
"seq": 1,
"created": "2014-12-31T01:23:45.678-0700",
"modified": "2014-12-31T12:34:56.789-0700",
"income_account": {
"account_number": 4000,
"name": "Contributions Income"
},
"fund": {
"id": 1,
"name": "General Fund"
}
}
}
}
HTTP Method: POST
URL: https://www.aplos.com/hermes/api/v1/purposes
Parameters:
Headers:
Example JSON Body:
{
"name":"My new purpose",
"description":"My new purpose created via the Aplos API",
"is_enabled":true,
"income_account":{"account_number":4002},
"fund":{"id":5000}
}
Example JSON Response:
{
"version": "v2_0_0",
"message": "posted: 32940",
"status": 200,
"meta": {
"resource_count": 1
},
"links": {
"self": "/api/v1/purposes/1"
},
"data": {
"purpose": {
"id": 32940,
"name": "My new purpose",
"description": "My new purpose created via the Aplos API",
"is_enabled": true,
"is_unlinked": false,
"created": "2016-05-03T07:09:23.911+0200",
"income_account": {
"account_number": 4002,
"name": "Interest Income"
},
"fund": {
"id": 5000,
"name": "Sample fund"
}
}
}
}
HTTP Method: PUT
URL: https://www.aplos.com/hermes/api/v1/purposes/:purposeId
Parameters:
Headers:
Example JSON Body:
{
"name":"Sample purpose update",
"description":"My new purpose updated via the Aplos API",
"is_enabled":true,
"income_account":{"account_number":4002},
"fund":{"id":5000}
}
Example JSON Response:
{
"version": "v2_0_0",
"message": "put: 1",
"status": 200,
"meta": {
"resource_count": 1
},
"links": {
"self": "/api/v1/purposes/1"
},
"data": {
"purpose": {
"id": 32927,
"name": "Sample purpose update",
"description": "My new purpose updated via the Aplos API",
"is_enabled": true,
"is_unlinked": false,
"created": "2016-04-29T08:50:33.959+0200",
"modified": "2016-05-03T06:52:16.896+0200",
"income_account": {
"account_number": 4002,
"name": "Interest Income"
},
"fund": {
"id": 5000,
"name": "Sample fund"
}
}
}
}
HTTP Method: DELETE
URL: https://www.aplos.com/hermes/api/v1/purposes/:purposeId
Parameters:
Headers:
Example JSON Response:
{
"version": "v2_0_0",
"message": "deleted: 1",
"status": 200
}