Accounting Payables

HTTP Method: GET

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

Parameters:

  • f_accountnumber: Account number of any line in the payable
  • f_amount: Total amount of the payable (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

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_accountnumber": "Account number of any line in the payable",
      "f_amount": "Total amount of the payable (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/payables?page_size=1&page_num=2",
    "self": "/api/v1/payables?page_size=1&page_num=1"
  },
  "data": {
    "payables": [
      {
        "id": 1,
        "bill_date": "2014-12-31",
        "due_date": "2015-01-15",
        "reference_num": "1",
        "note": "My First Payable",
        "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,
        "paid": 100,
        "liability_account": {
          "account_number": 2000,
          "name": "Accounts Payable"
        }
      }
    ]
  }
}

Get

HTTP Method: GET

URL: https://app.aplos.com/hermes/api/v1/payables/:payableId

Parameters:

  • allTags: List All tags: y, n

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/payables/1"
  },
  "data": {
    "payable": {
      "id": 1,
      "bill_date": "2014-12-31",
      "due_date": "2015-01-15",
      "reference_num": "1",
      "note": "My First Payable",
      "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,
      "paid": 100,
      "liability_account": {
        "account_number": 2000,
        "name": "Accounts Payable"
      },
      "lines": [
        {
          "id": 1,
          "note": "From fund 1",
          "amount": 75,
          "account": {
            "account_number": 5000,
            "name": "Operating Expense"
          },
          "fund": {
            "id": 1,
            "name": "General Fund"
          }
        },
        {
          "id": 2,
          "note": "From fund 2",
          "amount": 25,
          "account": {
            "account_number": 5000,
            "name": "Operating Expense"
          },
          "fund": {
            "id": 2,
            "name": "Building Fund"
          }
        }
      ]
    }
  }
}

Post

HTTP Method: POST

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

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:

{
  "bill_date": "2014-12-31",
  "due_date": "2015-01-15",
  "reference_num": "1000",
  "note": "My First Payable",
  "contact": {
    "companyname": "Aplos",
    "type": "company"
  },
  "liability_account": {
    "account_number": 2000
  },
  "lines": [
    {
      "amount": 75,
      "note": "From fund 1",
      "account": {
        "account_number": 5000
      },
      "fund": {
        "id": 1
      }
    },
    {
      "amount": 25,
      "note": "From fund 2",
      "account": {
        "account_number": 5000
      },
      "fund": {
        "id": 2
      }
    }
  ]
}

Example JSON Response:

{
  "version": "v2_0_0",
  "message": "posted: 2",
  "status": 200,
  "meta": {
    "resource_count": 1
  },
  "links": {
    "self": "/api/v1/payables/2"
  },
  "data": {
    "payable": {
      "id": 2,
      "bill_date": "2014-12-31",
      "due_date": "2015-01-15",
      "reference_num": "1000",
      "note": "My First Payable",
      "contact": {
        "id": 1,
        "companyname": "Aplos",
        "type": "company"
      },
      "created": "2014-12-31T01:23:45.678-0700",
      "amount": 100,
      "liability_account": {
        "account_number": 2000,
        "name": "Accounts Payable"
      },
      "lines": [
        {
          "id": 3,
          "note": "From fund 1",
          "amount": 75,
          "account": {
            "account_number": 5000,
            "name": "Operating Expense"
          },
          "fund": {
            "id": 1,
            "name": "General Fund"
          }
        },
        {
          "id": 4,
          "note": "From fund 2",
          "amount": 25,
          "account": {
            "account_number": 5000,
            "name": "Operating Expense"
          },
          "fund": {
            "id": 2,
            "name": "Building Fund"
          }
        }
      ]
    }
  }
}

Put

HTTP Method: PUT

URL: https://app.aplos.com/hermes/api/v1/payables/:payableId

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:

{
  "bill_date": "2014-12-31",
  "due_date": "2015-01-15",
  "reference_num": "1000",
  "note": "My First Payable (updated amounts)",
  "contact": {
    "companyname": "Aplos",
    "type": "company"
  },
  "liability_account": {
    "account_number": 2000
  },
  "lines": [
    {
      "amount": 750,
      "note": "From fund 1",
      "account": {
        "account_number": 5000
      },
      "fund": {
        "id": 1
      }
    },
    {
      "amount": 250,
      "note": "From fund 2",
      "account": {
        "account_number": 5000
      },
      "fund": {
        "id": 2
      }
    }
  ]
}

Example JSON Response:

{
  "version": "v2_0_0",
  "message": "put: 2",
  "status": 200,
  "meta": {
    "resource_count": 1
  },
  "links": {
    "self": "/api/v1/payables/2"
  },
  "data": {
    "payable": {
      "id": 2,
      "bill_date": "2014-12-31",
      "due_date": "2015-01-15",
      "reference_num": "1000",
      "note": "My First Payable (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,
      "liability_account": {
        "account_number": 2000,
        "name": "Accounts Payable"
      },
      "lines": [
        {
          "id": 3,
          "note": "From fund 1",
          "amount": 750,
          "account": {
            "account_number": 5000,
            "name": "Operating Expense"
          },
          "fund": {
            "id": 1,
            "name": "General Fund"
          }
        },
        {
          "id": 4,
          "note": "From fund 2",
          "amount": 250,
          "account": {
            "account_number": 5000,
            "name": "Operating Expense"
          },
          "fund": {
            "id": 2,
            "name": "Building Fund"
          }
        }
      ]
    }
  }
}

Delete

HTTP Method: DELETE

URL: https://app.aplos.com/hermes/api/v1/payables/:payableId

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
}

Pay

HTTP Method: PUT

URL: https://app.aplos.com/hermes/api/v1/payables/:payableId/pay

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:

{
  "paid_date": "2015-01-15",
  "cash_account": {
    "account_number": 1000
  }
}

Example JSON Response:

{
  "version": "v2_0_0",
  "message": "paid: 2",
  "status": 200,
  "meta": {
    "resource_count": 1
  },
  "links": {
    "self": "/api/v1/payables/2"
  },
  "data": {
    "payable": {
      "id": 2,
      "bill_date": "2014-12-31",
      "due_date": "2015-01-15",
      "reference_num": "1000",
      "note": "My First Payable (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,
      "paid": 1000,
      "liability_account": {
        "account_number": 2000,
        "name": "Accounts Payable"
      },
      "lines": [
        {
          "id": 3,
          "note": "From fund 1",
          "amount": 750,
          "account": {
            "account_number": 5000,
            "name": "Operating Expense"
          },
          "fund": {
            "id": 1,
            "name": "General Fund"
          }
        },
        {
          "id": 4,
          "note": "From fund 2",
          "amount": 250,
          "account": {
            "account_number": 5000,
            "name": "Operating Expense"
          },
          "fund": {
            "id": 2,
            "name": "Building Fund"
          }
        }
      ]
    }
  }
}