Get a single story API
Â
API Documentation
Endpoint:
GET /api/v2/stories/:id
Authentication: Requires valid authentication token
Response Format: JSON
Query Parameter
id
(integer): The unique identifier for the story
Response Attributes
id
(integer): Unique identifier for the story.text
(string, nullable): The text content of the story.number
(string): Story number.approved
(boolean): Indicates whether the story is approved.story_group
(string): Group to which the story belongs.location
(string, nullable): Location associated with the story.project_id
(integer): Identifier of the associated project.charity_id
(integer, nullable): Identifier of the associated charity.story_category_id
(integer): Identifier of the story category.edited_by
(integer): User ID of the editor.user_id
(integer): User ID of the creator.updated_at
(string): Timestamp of the last update.created_at
(string): Timestamp of creation.actual_created_at
(string): Actual creation timestamp.beneficiary_ids
(array): List of beneficiary IDs associated with the story.case_ids
(array): List of case IDs associated with the story.custom_fields
(array): Custom fields associated with the story.id
(integer): Custom field ID.name
(string): Name of the custom field.type
(string): Type of the custom field.value
(string): Value of the custom field.
story_indicator_beneficiaries
(array): Indicators associated with beneficiaries in the story.id
(integer): ID of the indicator-beneficiary association.beneficiary_id
(integer): ID of the beneficiary.indicator_id
(integer): ID of the indicator.indicator_type
(string): Type of the indicator.sub_ratio_id
(integer): ID of the sub-ratio.outcome_id
(integer): ID of the outcome.
story_change_beneficiaries
(array): Beneficiaries associated with story changes.story_changes
(array): List of story changes.
Â
Example
GET https://makerble.com/api/v2/stories/368376
Â
Response
{
"id": 368376,
"text": null,
"number": "0",
"approved": true,
"story_group": "change_created",
"location": null,
"project_id": 3914,
"charity_id": null,
"story_category_id": 1007,
"edited_by": 1318,
"user_id": 1318,
"updated_at": "2023-10-06T14:16:21.703+01:00",
"created_at": "2023-10-06T14:16:20.000+01:00",
"actual_created_at": "2023-10-06T14:16:20.859+01:00",
"beneficiary_ids": [
146211
],
"case_ids": [],
"custom_fields": [
{
"id": 53,
"name": "Date of birth",
"type": "text",
"value": "21/01/1986"
},
{
"id": 2700,
"name": "Ideal Weight:",
"type": "text",
"value": "130"
}
],
"story_indicator_beneficiaries": [
{
"id": 434199,
"beneficiary_id": 146211,
"indicator_id": 1588,
"indicator_type": "scale",
"sub_ratio_id": 1359,
"outcome_id": 925
},
{
"id": 434230,
"beneficiary_id": 146211,
"indicator_id": 1619,
"indicator_type": "binary"
}
],
"story_change_beneficiaries": [],
"story_changes": []
}
Â
Example video
Â