Skip to content

Commit

Permalink
Add example for creating a signature, and update the example for crea…
Browse files Browse the repository at this point in the history
…ting an attendee via the API to make clearer how to do it
  • Loading branch information
anero committed May 30, 2024
1 parent 6ea3086 commit d8b62db
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
8 changes: 4 additions & 4 deletions source/includes/authenticated_api/_attendees.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ Find an attendee by email address. Once you have obtained the attendee's id you
},
"data_processing_consent_type": "explicit",
"email_opt_in_type": {
"context": "web_form",
"kind": "radio_sure",
"context": "external",
"kind": "external",
"mailable": true,
"external_id": null,
"active": true
"external_id": "canvass-signature-2022",
"active": false
},
"member": {
"id": 1124,
Expand Down
24 changes: 20 additions & 4 deletions source/includes/authenticated_api/_signatures.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,22 @@ The JSON response has a single "signature" object, which may include the followi
<div></div>

### Create
> POST /api/v1/petitions/no-taxes-on-tea/signatures/

```json
{
"signature": {
"first_name": "Foo",
"last_name": "Bar",
"email": "[email protected]",
"postcode": "10010",
"phone_number": "123-456",
"country": "US",
"email_opt_in_type_external_id": "abcd12345",
"join_organisation": true
}
}
```

> Response body

Expand Down Expand Up @@ -171,11 +187,11 @@ The JSON response has a single "signature" object, which may include the followi
"data_processing_consent_type": "explicit",
"partnership_opt_ins": [],
"email_opt_in_type": {
"context": "web_form",
"kind": "radio_sure",
"context": "external",
"kind": "external",
"mailable": true,
"external_id": null,
"active": true
"external_id": "abcd12345",
"active": false
},
"member": {
"id": 111222333,
Expand Down

0 comments on commit d8b62db

Please sign in to comment.