Internal APIs

George Dawoud edited this page Apr 2, 2018 · 8 revisions

Current API

ChurchCRM leverages Slim 2.6.2 to provide REST access to the data elements.

Please see the Postman collections and Dev Env settings.

Families

  • [POST] /api/families/:familyId/activate/:status
    • Update the family status to activated or deactivated with :familyId and :status true/false. Pass true to activate and false to deactivate.

Groups

  • [POST] /api/groups
  • Post Data options:
  {
    'groupName':"groupName",
    'isSundaySchool':[true|false]
  }
  • if isSundaySchool is specified, the group will be marked as a Sunday School class, and the Teacher and Student roles will be created.

  • [POST] /api/groups/:groupID/removeuser/:userID

  • Removes the user with ID :userID from group with ID :groupID

  • [POST] /api/groups/:groupID/adduser/:userID

  • Adds the user with ID :userID to the group with ID :groupID

  • [DELETE] /api/groups/:groupID

  • Deletes the group with ID :groupID

  • [GET] /api/groups/:groupID

  • Returns a JSON objecte representing the group with ID :groupID

  • [POST] /api/groups/:groupID/roles/:roleID

  • Alters the role with ID :roleID for group with ID :groupID/adduser/

  • Requires JSON with either "groupRoleName", or "groupRoleOrder" properties set

  • [DELETE] /api/groups/:groupID/roles/:roleID

  • Deletes the specified roleID in the group

  • [POST] /api/groups/:groupID/defaultRole

  • Sets the default role fo the group with ID :groupID

  • Requres JSON in the POST body with the "roleID" property set

  • [POST] /api/groups/:groupID/roles/

  • Creates a new group role for group with ID :groupID

  • requires JSON in the POST body with roleName set to the new role's name

  • [POST] /api/groups/:groupID/userRole/:userID

  • Sets the role of a user in a group

  • requires JSON in the POST body with roleID set to the ID of the user's role in the specified group

  • [POST] /api/:groupID/setGroupSpecificPropertyStatus

  • requires JSON property GroupSpecificPropertyStatus either true or false

  • [POST] /api/:groupID/settings/active/{true/false}

  • sets the status to true or false

  • [POST] /api/:groupID/settings/email/export/{true/false}

  • sets the email export status to true or false

Deposits

  • [GET] /

  • Returns all deposits

  • [POST] /

  • Creates a new deposit

  • Requires JSON body with properties: depositType, depositComment, depositDate

  • [GET] /:id

  • Returns the deposit with the selected ID

  • [POST] /:id

  • Updates the deposit

  • requires JSON body with properties: depositType, depositComment, depositDate, depositClosed

  • [GET] /:id/ofx

  • Returns an OFX file representing the requested deposit

  • [GET] /:id/pdf

  • Returns a PDF file representing the requested deposit

  • [GET] /:id/csv

  • Returns a CSV file representing the requested deposit

  • [DELETE] /:id

  • Deletes the selected deposit

  • [GET] /:id/payments

  • Returns all payments associated with the supplied deposit ID

Payments

  • [GET] /

    • Returns all payments
  • [POST] /

    • Posts a new payment. Validates the input
  • [GET] /:id

    • Gets the specified payment by ID
  • [GET] /byFamily/:familyID(/:fyid)

    • Gets all payments be family, and optionally by the fiscal year ID
  • [DELETE] /:groupKey

    • Deleted the payment with the specified GroupKey
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.