Sub Posts & Translation

Add a post translation

POST https://ushahididocs.api.ushahidi.io/api/v3/posts/{parent_id}/translations

Path Parameters

Name
Type
Description

parent_id**

String

Parent Identifier

Request Body

Name
Type
Description

content

String

Post content

type

String

Post type

author_email

String

Email address of source

message

String

Additional message for post

url

String

Post URL

id

String

Post unique identifier

slug

String

Post slug

user_id

String

Post user indentifier

color

String

Post color

title

String

Post Tiitle

locale

String

The local language of post 

status

String

Post status

author_realname

String

The full name of the Post source

published_to

Array

This contains an array of where the post was published

completed_stages

Array

Contains an array of post-completed stage

source

String

The Source of the post contains an array of post-completed stage

{
    "id": 10000,
    "url": "http://localhost:8000/api/v3/posts/10000",
    "parent": {
        "id": 97,
        "url": "http://localhost:8000/api/v3/posts/97"
    },
    "form": null,
    "user_id": null,
    "message": null,
    "color": null,
    "type": "report",
    "title": "creat post",
    "slug": "test-create6",
    "content": "test: create new post",
    "author_email": "er@et.com",
    "author_realname": null,
    "status": "draft",
    "created": "2022-09-02T08:34:57+00:00",
    "updated": null,
    "locale": "fr_fr",
    "values": {
        "markdown": [
            "#markdowny"
        ]
    },
    "post_date": "2022-09-02T08:34:57+00:00",
    "tags": [],
    "published_to": [],
    "completed_stages": [],
    "sets": [],
    "lock": null,
    "source": null,
    "contact": null,
    "data_source_message_id": null,
    "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search",
        "change_status",
        "read_full"
    ]
}

Edit post translation

PUT https://ushahididocs.api.ushahidi.io/api/v3/posts/{parent_id}/translations/{translation_id}

Path Parameters

Name
Type
Description

parent_id*

Integer

Parent Identifier

translation_id*

integer

Translation Identifier

Request Body

Name
Type
Description

id

String

Post unique identifier

published_to

Array

Contains an array of post-completed stage

locale

String

The local language of the post 

status

String

Post status

author_realname

String

The full name of the Post source

author_email

String

The full name of the Post source

type

String

Post type

color

String

Post color

message

String

Post message

content

String

Content of post

title

String

Post title

user_id

String

Post user identifier

url

String

Post URL

source

String

The Source of the post contains an array of post-completed stage

{
    "id": 10000,
    "url": "http://localhost:8000/api/v3/posts/10000",
    "parent": {
        "id": 97,
        "url": "http://localhost:8000/api/v3/posts/97"
    },
    "form": null,
    "user_id": null,
    "message": null,
    "color": null,
    "type": "report",
    "title": "creat post",
    "slug": "test-create6",
    "content": "test: create new post",
    "author_email": "er@et.com",
    "author_realname": null,
    "status": "draft",
    "created": "2022-09-02T08:34:57+00:00",
    "updated": null,
    "locale": "fr_fr",
    "values": {
        "markdown": [
            "#markdowny"
        ]
    },
    "post_date": "2022-09-02T08:34:57+00:00",
    "tags": [],
    "published_to": [],
    "completed_stages": [],
    "sets": [],
    "lock": null,
    "source": null,
    "contact": null,
    "data_source_message_id": null,
    "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search",
        "change_status",
        "read_full"
    ]
}

Edit post local translation

PUT https://ushahididocs.api.ushahidi.io/api/v3/posts/{parent_id}/translations/(local)

Path Parameters

Name
Type
Description

parent_id*

Integer

Parent Identifier

local*

String

Post locale

Request Body

Name
Type
Description

id

String

Post unique identifier

published_to

Array

Contains an array of post-completed stage

locale

String

The local language of the post 

status

String

Post status

author_realname

String

The full name of the Post source

author_email

String

The full name of the Post source

type

String

Post type

color

String

Post color

message

String

Post message

content

String

Content of post

title

String

Post title

user_id

Integer

Post user identifier

url

String

Post URL

source

String

The Source of the post contains an array of post-completed stage

form_id

Integer

Post form identifier

{
    "id": 10000,
    "url": "http://localhost:8000/api/v3/posts/10000",
    "parent": {
        "id": 97,
        "url": "http://localhost:8000/api/v3/posts/97"
    },
    "form": null,
    "user_id": null,
    "message": null,
    "color": null,
    "type": "report",
    "title": "creat post",
    "slug": "test-create6",
    "content": "test: create new post",
    "author_email": "er@et.com",
    "author_realname": null,
    "status": "draft",
    "created": "2022-09-02T08:34:57+00:00",
    "updated": null,
    "locale": "fr_fr",
    "values": {
        "markdown": [
            "#markdowny"
        ]
    },
    "post_date": "2022-09-02T08:34:57+00:00",
    "tags": [],
    "published_to": [],
    "completed_stages": [],
    "sets": [],
    "lock": null,
    "source": null,
    "contact": null,
    "data_source_message_id": null,
    "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search",
        "change_status",
        "read_full"
    ]}