diff --git a/source/includes/_create_action_fields.md.erb b/source/includes/_create_action_fields.md.erb deleted file mode 100644 index 4c03e83d4fe..00000000000 --- a/source/includes/_create_action_fields.md.erb +++ /dev/null @@ -1,19 +0,0 @@ -| Field | Explanation | -| ------------------------- | ------------------------------------------------------------------------ | -| `<%= action_name %>[first_name]` | The first name of the member who took action, required. | -| `<%= action_name %>[last_name]` | The last name of the member who took action, required. | -| `<%= action_name %>[email]` | The email address of the member who took action, required. | -| `<%= action_name %>[postcode]` | The postal or zip code of the member. Depending on your platform settings this may be a required field. Depending on your configuration, this may be validated for your country. | -| `<%= action_name %>[phone_number]` | The phone number of the member who took action. Depending on your platform settings this may be a required field. | -| `<%= action_name %>[locale]` | The language and localization setting of the member who has taken action. This is specified as an [ISO_639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) two-character language code combined with an optional [ISO 3166](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes) two character country code. For eg `en-US` or `en`. This is an optional field, if not provided will be set to `en` by default. | -| `<%= action_name %>[country]` | The country specified as an [ISO 3166](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes) two character country code. This may be optional or required depending on your platform configuration. | -| `<%= action_name %>[email_opt_in_type_external_id]` | The External ID for the ControlShift email opt in type to use for this action. The email opt in type must have "external" context. You can list available email opt in types with [this endpoint](https://developers.controlshiftlabs.com/#authenticated-rest-api-email-opt-in-types). This is a required field. | -| `<%= action_name %>[join_organisation]` | Whether or not the member has opted in to email communications from this campaign and organisation. This may be optional if you are using email confirmation for members actions. | -| `<%= action_name %>[partnership_opt_ins]` | For partnership campaigns, whether or not this member has opted into communication from each partnership. This should be a JSON object like `{"123": true, "456": false}`, mapping partnership IDs to the opt-in status. | -| `<%= action_name %>[eu_data_processing_consent]` | Whether or not member has given consent for GDPR data processing. This field must be true if the organisation requires data processing consent for user actions with `use_eu_data_processing_consent = true`. | -| `<%= action_name %>[consent_content_version_external_id]` | The External ID for the data processing consent content version the member has consented to on this action. The consent content version tracks what the privacy policy, terms of service, and checkbox label were at the time of this action. You can list available consent content versions via [this endpoint](https://developers.controlshiftlabs.com/#authenticated-rest-api-consent-content-versions). This field is required if the organisation requires data processing consent for user actions. | -| `<%= action_name %>[utm_source]` | UTM tracking field, optional. | -| `<%= action_name %>[utm_campaign]` | UTM tracking field, optional. | -| `<%= action_name %>[utm_content]` | UTM tracking field, optional. | -| `<%= action_name %>[utm_medium]` | UTM tracking field, optional. | -| `<%= action_name %>[utm_term]` | UTM tracking field, optional. | diff --git a/source/includes/authenticated_api/_signatures.md.erb b/source/includes/authenticated_api/_signatures.md.erb index af99ed5f4ce..2e62273a210 100644 --- a/source/includes/authenticated_api/_signatures.md.erb +++ b/source/includes/authenticated_api/_signatures.md.erb @@ -133,26 +133,7 @@ The JSON response has a single "signature" object, which may include the followi ### Create -Creates a new signature for the specified petition. This API endpoint can be used to record externally collected signatures for -a particular petition within your instance of the ControlShift platform. - -All of the same post-signature actions that the platform usually supports including webhooks, CRM syncs, and other integrations -will still be triggered, in the same way they are for normal signatures. - -For organisations that require email confirmation, a confirmation email will be sent to the action taker. - -<%= partial 'includes/create_action_fields.md.erb', locals: { action_name: 'signature' } %> - -`POST /api/v1/petitions/no-taxes-on-tea/signatures/` - -
- - -#### POST body - -`signature[first_name]=Ada&signature[last_name]=Lovelave&signature[email]=ada@lovelace.com&signature[postcode]=12345` - -> POST response body for create +> Response body ```json { @@ -208,6 +189,22 @@ For organisations that require email confirmation, a confirmation email will be } ``` +Creates a new signature for the specified petition. This API endpoint can be used to record externally collected signatures for +a particular petition within your instance of the ControlShift platform. + +`POST /api/v1/petitions/no-taxes-on-tea/signatures/` + +All of the same post-signature actions that the platform usually supports including webhooks, CRM syncs, and other integrations +will still be triggered, in the same way they are for normal signatures. + +For organisations that require email confirmation, a confirmation email will be sent to the action taker. + +The request body should be a JSON block containing one `"signature"` object, which can have the following properties: + +| Field | Description | Required? | +| ------------------------- | ------------------------------------------------------------------------ | --------- | +<%= partial 'includes/authenticated_api/common_action_fields.md.erb' %> +
### Update email opt in type