Posts API
Contents:
- Method GET/public/v1/posts/catalogs/
- Method GET/public/v1/posts/common_posts/
- Method POST/public/v1/posts/common_posts/
- Method GET/public/v1/posts/common_posts/{id}/
- Method PUT/public/v1/posts/common_posts/{id}/
- Method DELETE/public/v1/posts/common_posts/{id}/
- Method GET/public/v1/posts/common_posts/detailed_info/{common_post_id}/
- Method GET/public/v1/posts/companies/
- Method GET/public/v1/posts/fb_pages/
- Method GET/public/v1/posts/instagram_groups/
- Method POST/public/v1/posts/upload_image/
- Method DELETE/public/v1/posts/upload_image/{id}/
- Method POST/public/v1/posts/video/
- Method DELETE/public/v1/posts/video/{id}/
- Method GET/public/v1/posts/vk_pages/
In this documentation, you can find descriptions of the methods of the BrandWizard API in the Posts section.
Method GET/public/v1/posts/catalogs/
- Description: Get list of available catalogs.
- Request parameters: None.
-
Response fields description:
Field Type Description id array[integer] List of brand IDs name string Company name logo string Logo website string Website
Method GET/public/v1/posts/common_posts/
- Description: Get a list of common posts.
-
Request parameters:
Parameter Type Required? Description catalogs_idsarray[integer] No List of catalog IDs count integer No Number of results created_at_after string No Greater than the provided date created_at_before string No Less than the provided date page integer No Page number within the pagination result set status array[string] No Publication statuses: draft, scheduled, published, deleted - Response fields description:
| Field | Type | Description | ||
| count | integer | Number of results | ||
| next | string | Link to the next page | ||
| previous | string | Link to the previous page | ||
| results | id | integer | Post ID | |
| name | string | Post title | ||
| status | string | Publication statuses: draft / planned / sent / active / deleted | ||
| created_at | string | Creation date | ||
| catalogs | id | integer | Catalog ID | |
| name | string | Catalog name | ||
| website | string | Website | ||
| logo | string | Logo | ||
Method POST/public/v1/posts/common_posts/
- Description: Create common post.
- Request parameters: None.
- Request body:
| Field | Type | Description | ||
| posts | title | string | Post title | |
| text | string | Post text | ||
| button_link | string | Button link | ||
| catalog | string | Google / Yandex / Facebook / VK / Instagram | ||
|
images
|
url | string | Image link | |
| is_main | boolean | Main image: Yes/No | ||
| video | id | integer | Video ID | |
| name | string | Name | ||
| size | integer | Video size | ||
| duration | integer | Duration | ||
| preview_image_url | string | Preview image link | ||
| url | string | Video link | ||
| event | title | string | Event title | |
| start | string | Event start date | ||
| end | string | Event end date | ||
| offer | coupon_code | string | Coupon number | |
| redeem_online_url | string | Promotion link | ||
| terms_conditions | string | Promotion conditions | ||
| topic_type | string | Publication type: unspecified / standard / event / offer / alert | ||
| action_type | string | Button type: unspecified / book / order / shop / learn_more / sign_up / offer / call | ||
| alert_type | string | News type: unspecified / covid | ||
| name | string | Publication name (an arbitrary name set for identifying the publication within the system) | ||
| companies_ids | integer | Company IDs | ||
| brands_ids | integer | Brand IDs | ||
| vk_groups_ids | integer | VK group IDs | ||
| fb_pages_ids | string | Facebook page IDs | ||
| instagram_groups_ids | string | Instagram page IDs | ||
| status | string | Post status: draft / planned / sent | ||
| timezone | string | Time zone | ||
| datetime_creation | string | Creation date | ||
| datetime_deleting | string | Deletion date | ||
- Response fields description:
| Field | Type | Description | |
| id | integer | Post ID | |
| name | string | Post title | |
| status | string | Post status: draft / planned / sent / active / deleted | |
| created_at | string | Creation date | |
| catalogs | id | integer | Catalog ID |
| name | string | Catalog name | |
| website | string | Website | |
| logo | string | Logo | |
Method GET/public/v1/posts/common_posts/{id}/
- Description: Get current common post.
- Request parameters:
| Parameter | Type | Required? | Description |
|
id
|
number | Yes | Unique numeric value identifying the overall publication |
-
Response fields description:
Field Type Description id integer Post ID name string Post title status string Post status: draft / planned / sent / active / deleted created_at string Creation date catalogs id integer Catalog ID name string Catalog name website string Website logo string Logo
Method PUT/public/v1/posts/common_posts/{id}/
- Description: Update common post.
- Request parameters:
| Parameter | Type | Required? | Description |
|
id
|
number | Yes | Unique numeric value identifying the overall publication |
- Request body:
| Field | Type | Description | ||
| posts | title | string | Post title | |
| text | string | Post text | ||
| button_link | string | Button link | ||
| catalog | string | Platforms: Google / Yandex / Facebook / VK / Instagram | ||
|
images
|
url | string | Image link | |
| is_main | boolean | Main image: Yes/No | ||
| video | id | integer | Video ID | |
| name | string | Name | ||
| size | integer | Video size | ||
| duration | integer | Duration | ||
| preview_image_url | string | Preview image link | ||
| url | string | Video link | ||
| event | title | string | Event title | |
| start | string | Event start date | ||
| end | string | Event end date | ||
| offer | coupon_code | string | Coupon number | |
| redeem_online_url | string | Promotion link | ||
| terms_conditions | string | Promotion conditions | ||
| topic_type | string | Publication type: unspecified / standard / event / offer / alert | ||
| action_type | string | Button type: unspecified / book / order / shop / learn_more / sign_up / offer / call | ||
| alert_type | string | News type: unspecified / covid | ||
| name | string | Publication name | ||
| companies_ids | integer | Company IDs | ||
| brands_ids | integer | Brand IDs | ||
| vk_groups_ids | integer | VK group IDs | ||
| fb_pages_ids | string | Facebook page IDs | ||
| instagram_groups_ids | string | Instagram page IDs | ||
| status | string | Post status: draft / planned / sent | ||
| timezone | string | Time zone | ||
| datetime_creation | string | Creation date | ||
| datetime_deleting | string | Deletion date | ||
- Response fields description:
| Field | Type | Description | |
| id | integer | Post ID | |
| name | string | Post title | |
| status | string | Post status: draft / planned / sent / active / deleted | |
| created_at | string | Creation date | |
| catalogs | id | integer | Catalog ID |
| name | string | Catalog name | |
| website | string | Website | |
| logo | string | Logo | |
Method DELETE/public/v1/posts/common_posts/{id}/
- Description: Remove the common post with all related posts.
- Request parameters:
| Parameter | Type | Required? | Description |
|
id
|
number | Yes | Unique numeric value identifying the overall publication |
- Response fields description: None.
Method GET/public/v1/posts/common_posts/detailed_info/{common_post_id}/
- Description: Get a list of posts attached to common post.
- Request parameters:
| Parameter | Type | Required? | Description |
|
common_post_id
|
string | Yes | Unique numeric value identifying the overall publication |
| page | integer | No | Page number within the pagination result set |
| page_size | integer | No | Number of results for paginated return |
| provider_codes | array[string] | No | Catalog list (site names): Google / Yandex / Facebook / VK / Instagram |
| statuses | array[string] | No | Status list: created / deleted |
- Response fields description:
| Field | Type | Description | |
| count | string | Number of results | |
| next | integer | Link to the next page | |
| previous | integer | Link to the previous page | |
| results | id | integer | Post ID |
| catalog | integer | Catalog code | |
| company | integer | Company name | |
| location_id | string | This field will not appear in the actual API response | |
| current_status | string | Statuses: created – Published / updated – Updated / deleted – Deleted / error – Error / on_moderation – On moderation / rejected – Rejected | |
| catalog_link | string | Link to the publication in the catalog | |
Method GET/public/v1/posts/companies/
- Description: Get a list of companies available for posts.
- Request parameters:
| Parameter | Type | Required? | Description |
|
brand_ids
|
array[string] | No | List of brand IDs |
| city_ids | array[string] | No | List of city IDs |
| code | array[string] | No | Branch code |
| company_group_ids | array[string] | No | Company group identifiers |
| count | integer | No | Number of results for paginated return |
| ids | array[string] | No | Company IDs |
| page | integer | No | Page number within the pagination result set |
- Response fields description:
| Field | Type | Description | ||
| count | integer | Number of results | ||
| next | string | Link to the next page | ||
| previous | string | Link to the previous page | ||
| results | id | integer | Company ID | |
| name | string | Company name | ||
| code | string | Branch code | ||
| address | string | Address | ||
| brand | id | integer | Brand ID | |
| name | string | Brand name | ||
| catalogs | string | Catalog name | ||
Method GET/public/v1/posts/fb_pages/
- Description: Get a list of Facebook pages available for post sending.
- Request parameters:
| Parameter | Type | Required? | Description |
| count | integer | No | Number of results for paginated return |
| page | integer | No | Page number within the pagination result set |
- Response fields description:
| Field | Type | Description | |
| count | integer | Number of results | |
| next | string | Link to the next page | |
| previous | string | Link to the previous page | |
| results | name | string | Facebook page name |
| id | string | Facebook page ID | |
Method GET/public/v1/posts/instagram_groups/
- Description: Get a list of Instagram groups available for post sending.
- Request parameters:
| Parameter | Type | Required? | Description |
| count | integer | No | Number of results for paginated return |
| page | integer | No | Page number within the pagination result set |
- Response fields description:
| Field | Type | Description | |
| count | integer | Number of results | |
| next | string | Link to the next page | |
| previous | string | Link to the previous page | |
| results | group_id | integer | Instagram group ID |
| ig_id | integer | Instagram account ID | |
| name | string | Group name | |
Method POST/public/v1/posts/upload_image/
- Description: Upload post image.
- Request parameters: None.
- Request body:
| Parameter | Type | Required? | Description |
| image | string | Yes | Image for publication |
- Response fields description:
| Field | Type | Description |
| id | integer | Image ID |
| image | string | Image for publication |
Method DELETE/public/v1/posts/upload_image/{id}/
- Description: Delete post image.
- Request parameters:
| Parameter | Type | Required? | Description |
| id | string | Yes | Image ID |
- Response fields description: None.
Method POST/public/v1/posts/video/
- Description: Upload video to attach it to post attachments.
- Request parameters: None.
- Request body:
| Parameter | Type | Required? | Description |
| file | string | Yes | File for upload |
- Response fields description:
| Field | Type | Description |
| id | integer | Video ID |
| name | string | Video title |
| duration | integer | Duration |
| size | integer | Video size |
| url | string | Video link |
| preview_image_url | string | Preview image link |
Method DELETE/public/v1/posts/video/{id}/
- Description: Remove video from storage. Only user, who uploaded video, can remove this.
- Request parameters:
| Parameter | Type | Required? | Description |
| id | integer | Yes | Video ID |
- Response fields description: None.
Method GET/public/v1/posts/vk_pages/
- Description: Get a list of vk pages available for post sending.
- Request parameters:
| Parameter | Type | Required? | Description |
| count | integer | No | Number of results for paginated return |
| page | integer | No | Page number within the pagination result set |
- Response fields description:
| Field | Type | Description | |
| count | integer | Number of results | |
| next | string | Link to the next page | |
| previous | string | Link to the previous page | |
| results | id | integer | VK account ID |
| name | string | Group name | |
| screen_name | string | Nickname | |
| account_name | string | Account name | |
| hidden | boolean | Page closed: Yes/No | |
| group_id | integer | VK group ID | |