API V0.1
API Access
API Access is controlled by each Currinda site. Each client will provide OAuth Client ID and Client Secret information.
Authentication
Authentication to the API is through OAuth2.
Token Endpoint
https://{currinda_site_domain}/api/token
Authorize Endpoint
https://{currinda_site_domain}/api/authorize
Scopes
The only scopes available currently are for events and organisations, these are: event-{event_id}
these allow access to an authenticated delegate's registration details for the specified event and org-{organisation_id}
which is for the organisation membership details.The following outlines the information supplied by the API endpoints for event and organisation. You must have authenticated for the pertaining scope to access this data.
Registration Details
Endpoint
https://{currinda_site_domain}/api/event/{event_id}
Payload
{"FirstName": "Michael","LastName": "Gall","Nametag": "Mike Gall","Registration": {"ID": "1","Name": "Event Item Cost #1","Cost": "100.00","Description": "A description of the test registration","Extras": [{"Question": "Test question?","Answer": "Whatever!!"}]},"Outstanding": "150.00","Currency": "NZD","Addons": [{"Quantity": "1","Addon": {"ID": "1","Name": "TestEventAddon #1 Cost","Description": "Description","Cost": "50.00"},"Extras": []}],"Extras": [{"Question": "Test question?","Answer": "Whatever!!"}]}
Membership Details
Endpoint
https://{currinda_site_domain}/api/organisation/{organisation_id}
Payload
{"FirstName":"Peter","LastName":"Test1","Title":"","Email":"test1@example.com","Organisation":"Test Org","Address": {"Address":null,"Suburb":"Test Park","Postcode":"","State":"VIC","Country":"Australia",},"MailingAddress": {"Address":"whatever St","Suburb":"Test Park","Postcode":"","State":"VIC","Country":"Australia",},"Phone":"22423423423","WorkPhone":"23423423423","Mobile":"","Membership": {"ID":"31807","MembershipNumber": "D23423423","ExpiryDate":"2010-12-31","JoiningDate":"2014-05-12","Status":"outstanding","Chapter":null,"MembershipType": {"ID":"362","Type":"Membership Type #1","Cost":"100","Description":"","Student": 0,"Extras": [{"ID":"98","Question":"Test question?","Answer":"Yes 1"}]},"AmountOutstanding":"100.000","Addons":[],"Extras":[]},"Currency":"NZD","InvoiceURL":"http:\/\/test.asnevents.localhost\/organisations\/invoice","PaymentURL":"http:\/\/test.asnevents.localhost\/organisations\/payment","Committee": {"Chapter": null,"Financial": true}}
Membership Status
There are a number of different statuses that maybe applicable to a membership:
- unapproved (the member has not been checked by an admin)
- pending (the member has been checked and has payments pending)
- outstanding (the member has outstanding invoices, maybe expired or not)
- expire (the member is none of the above and their expiry date is in the past)
- current (the member is current)
Logging Out
Logging out of connected websites is an important function so that people who are on shared computers canensure their privacy. The connecting website should logout (clear the session of the exisiting user) and then redirect to https://{currinda_site_domain}/logout?redirect={return_url}