LoudVoice API \ Authors \ Update author
LoudVoice API Resources
Resource/URI - Discussions | GET | POST | PUT | DELETE |
---|---|---|---|---|
Discussions
/loudvoice/discussions.json
|
List all discussions | Create a discussion | – | – |
Discussion
/loudvoice/discussions/<discussion_token>.json
|
Read a discussion | – | Update a discussion | Delete a discussion |
Discussion messages
/loudvoice/comments/<discussion_token>/comments.json
|
Read discussion comments | – | – | – |
Resource/URI - Authors | GET | POST | PUT | DELETE |
---|---|---|---|---|
Authors
/loudvoice/authors.json
|
List all authors | Create an author | – | – |
Author
/loudvoice/authors/<author_token>.json
|
Read an author | – | Update an author | Delete an author |
Resource/URI - Author Sessions | GET | POST | PUT | DELETE |
---|---|---|---|---|
Author Sessions
/loudvoice/authors/sessions.json
|
List all sessions | – | Create or update a session | – |
Author Session
/loudvoice/authors/sessions/<session_token>.json
|
– | – | – | Delete a session |
Resource/URI - Comments | GET | POST | PUT | DELETE |
---|---|---|---|---|
Comments
/loudvoice/comments.json
|
List all comments | Create a comment | – | – |
Comment
/loudvoice/comments/<comment_token>.json
|
Read a comment | – | Update a comment | Delete a comment |
Resource/URI - Votes | GET | POST | PUT | DELETE |
---|---|---|---|---|
Votes
/loudvoice/votes.json
|
List all votes |
– | – | – |
Vote
/loudvoice/votes/comments/<comment_token>/authors/<author_token>.json
|
Read a vote | – | Cast a vote | Delete a vote |
Workflow
Request: the code to send to the API
Send an API request to one of these endpoints to update the details of an author:
PUT
/loudvoice/authors/<author_token>.json
PUT
/loudvoice/authors/author.json?author_reference=<author_reference>
The <author_token>
represents the unique identifier of the author.
The <author_reference>
is the unique reference that you optionally specified when you created the author.
PUT
data to include in the request
{ "request": { "author": { "author_reference": "#author_reference#", "identity_token": "#identity_token#", "name": "#name#", "email": "#email#", "picture_url": "#picture_url#", "website_url": "#website_url#", "description": "#description#" } } }
Node | Description |
---|---|
Reference | |
author_referencestring
|
Your custom reference for this author, e.g. the unique id of the user in your system. The value must be unique amongst all authors. Example : USER-123456 |
Identity | |
identity_tokenstring
|
Links the author to an existing identity. Please note that an identity can only be linked to a single author at once. Example: 39931bb2-15a8-488b-bcac-dccd9952ae90 |
Metadata | |
namestring
|
The author's name, as displayed in the LoudVoice widget. Example: John Doe |
emailstring
|
The author's email address. Example: john.doe@example.com |
picture_urlstring, uri
|
The fully qualified URL of the author's avatar. Example: https://www.example.com/user/avatar.png |
website_urlstring, uri |
The fully qualified URL of the author's website. Example: http://www.example.com/ |
descriptionstring
|
Information about the author. Example: A writer by day and a reader by night. |
Result: the code returned by the API
The API will either return a HTTP status code 200
on success or an appropriate message body with
further details on the error that occured.
Resultset Example
{ "response": { "request": { "date": "Thu, 22 Mar 2018 14:01:13 +0100", "resource": "/loudvoice/authors/39931bb2-15a8-488b-bcac-dccd9952ae90.json", "status": { "flag": "success", "code": 200, "info": "Your request has been processed successfully" } }, "result": { "data": { "author": { "author_token": "39931bb2-15a8-488b-bcac-dccd9952ae90", "identity_token": "5dd7336a-cb66-42dc-95da-1a6dade8f743", "author_reference": "USER-123456", "date_creation": "Thu, 22 Mar 2018 13:59:53 +0100", "name": "John Doe", "email": "john.doe@example.com", "picture_url": "https://www.example.com/user/avatar.png", "website_url": "http://www.example.com/", "description": "A writer by day and a reader by night.", "num_comments": 0, "date_last_comment": null, "date_creation": "Fri, 06 Apr 2018 12:49:38 0200", "date_last_update": "Thu, 22 Mar 2018 14:01:13 +0100" } } } } }