SWFA
Submission API
For teams that want complete flexibility with the SWFA form, you are able to add signups securely via the SWFA API/webook.
In order to add signups post your data to the following details:
Note: only authorised domains can submit via the API. Contact us in order to be added to the whitelist.
Endoint
https://saferworld.org.au/swfa-api/signup
This endpoint only supports the POST method.
Valid properties
- fname – Signups first name – REQUIRED
- lname – Signups last name
- email – Email address – REQUIRED
- postcode – Post code
- partner – SWFA Partner (i.e. Oxfam, Micah)
- return_url – URL that the submission will redirect to upon success. Only useful for when using basic HTML form posts. If submitting via AJAX or as a webhook omit this property.
Errors
The endpoint returns a json object with two properties—success and data.
If success is true you are good. The response code is 200.
If success is false there will be an error description.
400 errors are generally to do with required form fields not being added.
403 errors mean your domain is not authorised to submit to the api. Contact us and we will add you.