Skip to content

Commit

Permalink
use new style for signature create table too
Browse files Browse the repository at this point in the history
  • Loading branch information
lavaturtle committed Mar 15, 2024
1 parent 80d3809 commit ebcd1f6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 39 deletions.
19 changes: 0 additions & 19 deletions source/includes/_create_action_fields.md.erb

This file was deleted.

37 changes: 17 additions & 20 deletions source/includes/authenticated_api/_signatures.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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/`

<div></div>


#### POST body

`signature[first_name]=Ada&signature[last_name]=Lovelave&signature[email][email protected]&signature[postcode]=12345`

> POST response body for create
> Response body

```json
{
Expand Down Expand Up @@ -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' %>

<div></div>

### Update email opt in type
Expand Down

0 comments on commit ebcd1f6

Please sign in to comment.