Purposes

HTTP Method: GET

URL: https://app.aplos.com/hermes/api/v1/purposes

Parameters:

  • f_enabled: Whether the purpose is enabled: y, n
  • f_name: Any part of the name, case insensitive

Headers:

  • Authorization = Bearer: [ACCESS TOKEN]
    The access token obtained via the authentication resource.
  • aplos-account-id = [ACCOUNT ID]
    The Aplos account (organization) you are accessing (OPTIONAL)

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"
        }
      }
    ]
  }
}

Get

HTTP Method: GET

URL: https://app.aplos.com/hermes/api/v1/purposes/:purposeId

Parameters:

  • [NONE]

Headers:

  • Authorization = Bearer: [ACCESS TOKEN]
    The access token obtained via the authentication resource.
  • aplos-account-id = [ACCOUNT ID]
    The Aplos account (organization) you are accessing (OPTIONAL)

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"
      }
    }
  }
}

Post

HTTP Method: POST

URL: https://app.aplos.com/hermes/api/v1/purposes

Parameters:

  • [NONE]

Headers:

  • Authorization = Bearer: [ACCESS TOKEN]
    The access token obtained via the authentication resource.
  • aplos-account-id = [ACCOUNT ID]
    The Aplos account (organization) you are accessing (OPTIONAL)

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"
		      }
		    }
		  }
		}

Put

HTTP Method: PUT

URL: https://app.aplos.com/hermes/api/v1/purposes/:purposeId

Parameters:

  • [NONE]

Headers:

  • Authorization = Bearer: [ACCESS TOKEN]
    The access token obtained via the authentication resource.
  • aplos-account-id = [ACCOUNT ID]
    The Aplos account (organization) you are accessing (OPTIONAL)

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"
		      }
		    }
		  }
		}

Delete

HTTP Method: DELETE

URL: https://app.aplos.com/hermes/api/v1/purposes/:purposeId

Parameters:

  • [NONE]

Headers:

  • Authorization = Bearer: [ACCESS TOKEN]
    The access token obtained via the authentication resource.
  • aplos-account-id = [ACCOUNT ID]
    The Aplos account (organization) you are accessing (OPTIONAL)

Example JSON Response:

		{
		  "version": "v2_0_0",
		  "message": "deleted: 1",
		  "status": 200
		}