Zinrelo (f.k.a. ShopSocially) Support

How can we help you today?

Share-on-Mobile API

Modified on: Fri, 29 Jul, 2016 at 2:34 AM

This article describes the various endpoints related to the Share-on-Mobile app type. Using the various endpoints you can export data related to a particular Share-on-Mobile campaign or all the Share-on-Mobile campaigns that you might have run.

Posts Endpoint

The Posts API endpoint allows you to export the posts / reviews made by users in a Share-on-Mobile campaign. Alternately, this endpoint can also be used to export the posts / reviews of users in all your Share-on-Mobile campaigns.

Type of Request : POST

Endpoint : /app/share-on-mobile/posts

Full URL : https://api.shopsocially.com/v2/app/share-on-mobile/posts

Request Parameters

The following table outlines the POST request parameters that you can use with this endpoint.

Parameter

Value

Description

campaign_id

The campaign ID for the Share-on-Mobile campaign

(Optional) The ID of the campaign for which you want to pull the data. If this parameter is not specified, then the data for all the Share-on-Mobile campaigns will be returned.

start_date

Date in the format "yyyy-mm-ddTHH:MM:SSZ" in the UTC timezone

(Optional) Signifies the date from which you want the data. This date is inclusive, that is, you will get the data for this date as well.

end_date

Date in the format "yyyy-mm-ddTHH:MM:SSZ" in the UTC timezone

(Optional) Signifies the date till which you want the data. This date is inclusive.

Response

On a successful request, this API returns the following JSON response containing a list of all the posts. The meaning of the various fields are included in the following response.

{

"success" : true,

"posts" : [

{

"user_first_name" : "<The first name of the user who made this post>",

"user_last_name" : "<The last name of the user who made this post>",

"user_facebook_profile" : "<The link to the facebook profile of the user>",

"user_photo" : "<The link to the photo of the user>",

"image" : "<The link to the image uploaded by the user>",

"user_comment" : "<The comment or review written by the user>",

"attached_link" : "<The link attached to this post>",

"date" : "<The date and time when this post was created in the format yyyy-mm-ddTHH:MM:SSZ in the UTC timezone>",

"rating" : <The rating selected by the user which will be a number from 0 to 5>

},

{

"user_first_name" : "<The first name of the user who made this post>",

"user_last_name" : "<The last name of the user who made this post>",

"user_facebook_profile" : "<The link to the facebook profile of the user>",

"user_photo" : "<The link to the photo of the user>",

"image" : "<The link to the photo uploaded by the user>",

"user_comment" : "<The comment or review written by the user>",

"attached_link" : "<The link attached to this post>",

"date" : "<The date and time when this post was created in the format yyyy-mm-ddTHH:MM:SSZ in the UTC timezone>",

"rating" : <The rating selected by the user which will be a number from 0 to 5>

}

]

}

As you find above, all the posts will be a list in the posts field.

Example

Below is a sample example of the API request should look and what the response looks like. We show the example using the command-line tool curl but you can use any programming language you want to consume the API.