Welcome to CRM-Server.
Ruby tool that will allow you to expose Fusion CRM SOAP Web Services as REST services to your consumers. The REST services return JSON for easy consumption.
Intallation
Clone this repository:
$ git clone https://github.com/mvilrokx/crm-server
bundle
$ bundle install
Serve
$ rackup config.ru
That's it!
Quickstart
Logon
$ curl -X POST -c cookie.txt -d "ws_host=<your-crm-host-name>&user=<your-username>&pwd=<your-password>" http://localhost:9393/logon
retrieve all interactions
$ curl -X GET -b cookie.txt http://localhost:9393/interactions
Retrieve one interaction (of which you know the id)
$ curl -X GET -b cookie.txt http://localhost:9393/interactions/<your-interaction-id>
Of course you can run all these from a browser too. A GET URL for logon has been provided for your convenience for that purpose.
More
Queries
$ curl -X GET -b cookie.txt http://localhost:9393/interactions?search[InteractionTypeCode]=PHONE CALL
Any attribute can be queried, note that AND will be applied on multiple attributes and currently on the equal operator is supported.
Sorting
$ curl -X GET -b cookie.txt http://localhost:9393/interactions?sort[InteractionId]=asc
Any attribute can be used for sorting
Combine
$ curl -X GET -b cookie.txt http://localhost:9393/api/v0.1/interactions?search[InteractionTypeCode]=PHONE%20CALL&sort[InteractionId]=asc
Pagination
$ curl -X GET -b cookie.txt http://localhost:9393/interactions?page=1&page_size=20
$ curl -X GET -b cookie.txt http://localhost:9393/interactions?page=2&page_size=20