forked from viaacode/mijn-viaa
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Requesting a service happens now by redirecting to https://viaa.zendesk.com/hc/nl/requests/new.
We want to replace this by sending a JSON object to the zendesk API automatically, because we already have all the info that needs to be send: their email adress, (name), organization and the service they want to have access to.
Two things need to be changed:
- Send a POST request to the Zendesk API.
You can do this in the command line like this (but you need to do this in the front-end with an ajax call:
curl https://viaa.zendesk.com/api/v2/tickets.json -d '{"ticket": {"subject": "Toegang tot dienst {naam-dienst}", "comment": { "body": "Email-adres: {email-adress}\n Naam: {naam-persoon}\n Organisatie: {organisatie}\n"}, "tags": ["toegang-dienst"] }}' -H "Content-Type: application/json" -v -u {username}:{password} -X POST
I will send you the credentials of the 'support' account.
- Change the layout so 'Request access' changes to 'Access requested'