Contributions

HTTP Method: GET

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

Parameters:

  • f_contact: Contact ID
  • f_contactname: Any part of any contact name (first, last, and/or company), case insensitive
  • f_lastupdated: Last updated (created or modified). Format: yyyy-MM-ddTHH:mm:ss.SSSZ
  • f_rangeend: Maximum date range (inclusive). Format: yyyy-MM-dd
  • f_rangestart: Minimum date range (inclusive). Format: yyyy-MM-dd

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_contact": "Contact ID",
      "f_contactname": "Any part of any contact name (first, last, and/or company), case insensitive",
      "f_lastupdated": "Last updated (created or modified). Format: yyyy-MM-ddTHH:mm:ss.SSSZ",
      "f_rangeend": "Maximum date range (inclusive). Format: yyyy-MM-dd",
      "f_rangestart": "Minimum date range (inclusive). Format: yyyy-MM-dd"
    }
  },
  "links": {
    "next": "/api/v1/contributions?page_size=1&page_num=2",
    "self": "/api/v1/contributions?page_size=1&page_num=1"
  },
  "data": {
    "contributions": [
      {
        "id": 1,
        "name": "My first contribution",
        "date": "2014-12-31"
        "created": "2014-12-31T01:23:45.678-0700",
        "modified": "2014-12-31T12:34:56.789-0700"
      }
    ]
  }
}

Get

HTTP Method: GET

URL: https://app.aplos.com/hermes/api/v1/contributions/:contributionId

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/contributions/1000",
    "transaction": "/aws/cr?fi_tx=2000"
  },
  "data": {
    "contribution": {
      "id": 1,
      "name": "My new contribution",
      "description": "My new contribution created via the Aplos API",
      "date": "2016-04-26",
      "source_url": "www.sample.org",
      "lines": [
        {
          "id": 3000,
          "contribution_id": 1000,
          "contact": {
            "id": 1,
            "firstname": "New",
            "lastname": "Donor",
            "type": "individual"
          },
          "purpose": {
            "id": 1,
            "name": "General"
          },
          "note": "A sample comment or note.",
          "amount": 100,
          "is_ntd": false,
          "ntd_amount": 0.00,
          "expense_amount": 3.2
        }
      ],
      "created": "2016-04-27T03:25:30.553+0200",
      "deposit_transaction_id": 2000,
      "deposit_account": {
        "account_number": 1010,
        "name": "Cash"
      },
      "expense_account": {
        "account_number": 5000,
        "name": "Salary & Payroll"
      },
      "expense_contact": {
        "id": 4000,
        "name": "Bank of Aplos",
        "companyname": "Bank of Aplos",
        "type": "company"
      },
      "amount": 100,
      "expense_amount": 3.2
    }
  }
}

Post

HTTP Method: POST

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

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 contribution", 
  "description": "My new contribution created via the Aplos API", 
  "source_url": "http://www.sample.org",  
  "date": "2016-04-26", 
  "deposit_account": { "account_number": 1010 }, 
  "expense_account": { "account_number": 5000 }, 
  "expense_contact": { "name": "Bank of Aplos" }, 
  "lines": [ 
  { 
      "contact": { 
        "firstname": "New", 
        "lastname": "Donor", 
        "type": "individual", 
        "email": "newdonor@sample.org" 
        }, 
        "purpose": { 
            "id": 1 
        }, 
        "note": "A sample comment or note.", 
        "amount": 100, 
        "expense_amount": 3.2,
        "ntd_amount": 2,
        "is_ntd": true
        } 
  ] 
}

Example JSON Response:

{
  "version": "v2_0_0",
  "message": "posted: 1",
  "status": 200,
  "meta": {
    "resource_count": 1
  },
  "links": {
    "self": "/api/v1/contributions/1000",
    "transaction": "/aws/cr?fi_tx=2"
  },
  "data": {
    "contribution": {
      "id": 1000,
      "name": "My new contribution",
      "description": "My new contribution created via the Aplos API",
      "date": "2016-04-26",
      "source_url": "http://www.sample.org",
      "lines": [
        {
          "id": 3000,
          "contribution_id": 1000,
          "contact": {
            "id": 1562749,
            "firstname": "New",
            "lastname": "Donor",
            "type": "individual"
          },
          "purpose": {
            "id": 1,
            "name": "General"
          },
          "note": "A sample comment or note.",
          "amount": 100,
          "is_ntd": true,
          "ntd_amount": 2,
          "expense_amount": 3.2
        }
      ],
      "created": "2016-05-03T07:51:04.512+0200",
      "deposit_transaction_id": 2000,
      "deposit_account": {
        "account_number": 1010,
        "name": "Cash"
      },
      "expense_account": {
        "account_number": 5000,
        "name": "Salary & Payroll"
      },
      "expense_contact": {
        "id": 4000,
        "name": "Bank of Aplos",
        "companyname": "Bank of Aplos",
        "type": "company"
      },
      "amount": 100,
      "expense_amount": 3.2
    }
  }
}

Put

HTTP Method: PUT

URL: https://app.aplos.com/hermes/api/v1/contributions/:contributionId

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 contribution (updated amounts)",
  "description": "My new contribution created via the Aplos API",
  "source_url": "http://www.sample.org", 
  "date": "2015-06-01",
  "deposit_account": {
    "account_number": 1000
  },
  "expense_account": {
    "account_number": 5000
  },
  "expense_contact": {
    "name": "Bank of Aplos"
  },
  "lines": [
    {
      "contact": {
        "firstname": "New",
        "lastname": "Donor",
        "type": "individual",
        "email": "newdonor@sample.org"
      },
      "purpose": {
        "id": 1
      },
      "note": "A sample comment or note.",
      "amount": 1000,
      "expense_amount": 30.2,
      "is_ntd": false,
      "ntd_amount": 0.00
    }
  ]
}

Example JSON Response:

{
  "version": "v2_0_0",
  "message": "put: 2000",
  "status": 200,
  "meta": {
    "resource_count": 1
  },
  "links": {
    "self": "/api/v1/contributions/2000",
    "transaction": "/aws/cr?fi_tx=3000"
  },
  "data": {
    "contribution": {
      "id": 2000,
      "name": "My new contribution (updated amounts)",
      "description": "My new contribution created via the Aplos API",
      "date": "2015-06-01",
      "source_url": "http://www.sample.org",
      "lines": [
        {
          "id": 4000,
          "contribution_id": 2000,
          "contact": {
            "id": 1562749,
            "firstname": "New",
            "lastname": "Donor",
            "type": "individual"
          },
          "purpose": {
            "id": 1,
            "name": "General"
          },
          "note": "A sample comment or note.",
          "amount": 1000,
          "is_ntd": false,
          "ntd_amount": 0.00,
          "expense_amount": 30.2
        }
      ],
      "created": "2016-04-27T03:25:30.553+0200",
      "modified": "2016-05-03T09:08:37.419+0200",
      "deposit_transaction_id": 3000,
      "deposit_account": {
        "account_number": 1010,
        "name": "Cash"
      },
      "expense_account": {
        "account_number": 5000,
        "name": "Salary & Payroll"
      },
      "expense_contact": {
        "id": 6000,
        "name": "Bank of Aplos",
        "companyname": "Bank of Aplos",
        "type": "company"
      },
      "amount": 1000,
      "expense_amount": 30.2,
      "ntd_amount": 0.00
    }
  }
}

Delete

HTTP Method: DELETE

URL: https://app.aplos.com/hermes/api/v1/contributions/:contributionId

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: 2",
  "status": 200
}