Skip to main content
PUT
/
posts
/
{post_id}
Update a post
curl --request PUT \
  --url https://api.partoo.co/v2/posts/{post_id} \
  --header 'Content-Type: application/json' \
  --header 'x-APIKey: <api-key>' \
  --data '{
  "title": "Great post title !",
  "summary": "Wonderful post summary !",
  "image_url": [
    "https://example.com/1.png",
    "https://example.com/2.png"
  ],
  "cta_type": "book",
  "link": {
    "use_business_url": true,
    "custom_url": "<string>"
  },
  "schedule_time": "2050-01-01T09:00:00",
  "start_at": "2050-01-01T09:00:00",
  "end_at": "2050-01-01T09:00:00",
  "coupon_code": "PROMO25",
  "offer_terms": "These are the conditions"
}'
{
  "id": 34,
  "business_id": "5409c35a97bbc544d8e26737",
  "post_type": "news",
  "summary": "Wonderful post summary !",
  "schedule_time": "2020-01-01T12:00:00+02:00",
  "expiration_time": "2020-01-01T12:00:00+02:00",
  "validation_time": "2020-01-01T12:00:00+02:00",
  "post_medias": [
    {
      "media_url": [
        "https://example.com/1.png",
        "https://example.com/2.png"
      ]
    }
  ],
  "created_at": "2019-08-01T19:15:54.256000+02:00",
  "updated_at": "2019-09-01T15:12:35.256000+02:00",
  "created_on_partoo": false,
  "updated_on_partoo": false,
  "business_info": "Rick - HQ - 157 boulevard Macdonald, Paris",
  "post_insight": [
    {
      "name": "facebook__posts",
      "click_count": 1512,
      "view_count": 2012
    }
  ],
  "post_status": [
    {
      "name": "facebook__posts",
      "state": "live",
      "link": "www.partoo.co"
    }
  ],
  "offer_terms": "These are the conditions",
  "offer_code": "PROMO25",
  "cta_link": "www.partoo.co",
  "cta_type": "book"
}

Authorizations

x-APIKey
string
header
required

The authentication system on Partoo API is using API Key that should be put in the header of the request (the name of the header is x-APIKey). An api_key is linked to a user. This user's role will give you different access level to the API features.

Path Parameters

post_id
number
required

Post id

Body

application/json

Request body to update a Post

title
string

Title of the post.

Example:

"Great post title !"

summary
string

Main text content of the post.

Example:

"Wonderful post summary !"

image_url

URLs of the images displayed with the post.

Note:

  • Add up to 10 images for multi-image post on Facebook and IG
  • Multi-image is not supported by Google, only the first image will be displayed
  • Image ratio must be between 4:5 and 16:9 for IG
  • All images must be same ratio for IG or they will be crop at the first image ratio by IG
Example:
[
"https://example.com/1.png",
"https://example.com/2.png"
]
cta_type
enum<string>

The type of the post to be created. Some type mig.

Available options:
book,
order,
shop,
learn_more,
sign_up,
call,
no_cta

Link displayed in the post to redirect the client clicking on it. Use can only have one of the following parameters ('use_business_url' or 'custom_url').

schedule_time
string

Date and time of when the post will be diffused corresponding platforms. It needs to be at least 2 hours after the time of the request. The timezone used is UTC.

Example:

"2050-01-01T09:00:00"

start_at
string

For either event or offer post type. Defined when it start. Timezone is defined by the business timezone.

Example:

"2050-01-01T09:00:00"

end_at
string

For either event or offer post type. Defined when it end. Timezone is defined by the business timezone.

Example:

"2050-01-01T09:00:00"

coupon_code
string

Offer code that is usable in store or online

Example:

"PROMO25"

offer_terms
string

Terms and conditions of the offer

Example:

"These are the conditions"

Response

OK

Post

id
integer

The Post id

Example:

34

business_id
string

Business id

Example:

"5409c35a97bbc544d8e26737"

post_type
enum<string>

The type of the post to be created. Event and Offer are not yet available for Facebook.

Available options:
news,
event,
offer,
covid
summary
string

Main text content of the post.

Example:

"Wonderful post summary !"

schedule_time
string

Date when the Post will be published. No scheduled start time means that the Post will be published immediately.

Example:

"2020-01-01T12:00:00+02:00"

expiration_time
string

If this post is a draft, this indicates the date when it will be expired (= date after which the BM/GM user will no longer be able to validate and publish).

Example:

"2020-01-01T12:00:00+02:00"

validation_time
string

Date when the Draft post has been validated by the BM or GM user If the post doesn't also have a schedule time, this date coincides with the publishing date

Example:

"2020-01-01T12:00:00+02:00"

post_medias
object[]

The photo that will be on the Post

created_at
string<datetime>

Creation date on Partoo

Example:

"2019-08-01T19:15:54.256000+02:00"

updated_at
string<datetime>

Last update date (either on Partoo or on Partner platform)

Example:

"2019-09-01T15:12:35.256000+02:00"

created_on_partoo
boolean

Indicates whether or not the post was created using Partoo App/API

Example:

false

updated_on_partoo
boolean

Indicates whether or not the post was updated using Partoo App/API

Example:

false

business_info
string

name and address of the business that the post is related to.

Example:

"Rick - HQ - 157 boulevard Macdonald, Paris"

post_insight
object[]

Statistics related to the posts on the different platforms. ⚠️ Due to a Google deprecation, on 20/02/2023, Google views and counts won't be available anymore. Old insights will still be sent. Facebook ones will still be available.

post_status
object[]

Status related to the posts on the different platforms.

offer_terms
string

Terms and conditions of the offer

Example:

"These are the conditions"

offer_code
string

Offer code that is usable in store or online

Example:

"PROMO25"

Link displayed in the post to redirect the client clicking on it.

Example:

"www.partoo.co"

cta_type
enum<string>

The type of the post to be created. Some type mig.

Available options:
book,
order,
shop,
learn_more,
sign_up,
call,
no_cta