Accept: application/vnd.likenama.v1
Content-type: application/json
Authorization: [USER'S auth_token]
User-Agent: Likenama/[APP-VERSION] Android/[ANDROID-VERSION]
- Invalid/Expired auth_token:
{
"errors": {
"base": [
"ارتباط با سرور قطع شدهاست. دوباره وارد شوید"
]
}
}
Status: 401
- Locked account:
{
"errors": {
"base": [
"اکانت شما قفل شدهاست. برای اطلاعات بیشتر با پشتیبانی تماس بگیرید"
]
}
}
Status: 401
- HTTP Status Codes:
- OK:
200
- Created:
201
- Not Found:
404
- Unprocessable Entity:
422
- Server Error:
500
- Deprecated:
410
- Unauthorized:
401
- OK:
URL: http://likenama.com/users/auth/instagram
- Success:
- URL:
http://likenama.com/session#token=7av7qqxTdUcjCe4oS3sK46569725.5106fe6.31df6ecb062448f8ae396b8ffd2ca671
-
Instagram Access Token:
46569725.5106fe6.31df6ecb062448f8ae396b8ffd2ca671
-
App Access Token:
7av7qqxTdUcjCe4oS3sK
-
Failure:
-
Instagram Failure:
- URL:
http://likenama.com/users/auth/instagram/callback?error_reason=user_denied&error=access_denied&error_description=The+user+denied+your+request.&state=feded9a3593be61a726d9a14fddadf7604de80eba540f12f
-
App Failure:
- URL:
http://likenama.com/users/auth/instagram/callback#error
-
- Method:
GET
- Endpoint:
/api/campaigns
- Request Content:
none
- Success (user has some campaigns):
-
Content:
{ "campaigns": [ { "id": 2422, "target_url": "http://instagram.com/p/***REMOVED***", "campaign_type": "instagram_liking", "payment_type": "like", "status": "درحالنمایش", "budget": 1000, "total_likes": 0 }, { "id": 2420, "target_url": "http://instagram.com/p/***REMOVED***", "campaign_type": "instagram_liking", "payment_type": "coin", "status": "ردشده", "budget": 1000, "total_likes": 0 }, { "id": 2419, "target_url": "http://instagram.com/p/***REMOVED***", "campaign_type": "instagram_liking", "payment_type": "coin", "status": "available", "budget": 1000, "total_likes": 0 } ] }
-
Status:
200
-
- Failure (when there's no campaign available)
-
Content:
{ "errors": { "base": [ "مورد درخواستشده یافت نشد" ] } }
-
Status:
404
-
- Method:
GET
- Endpoint:
/api/campaigns/new
- Request Content:
none
- Success:
-
Content:
{ "campaign_classes": [ { "id": 1092, "campaign_type": "instagram_liking", "payment_type": "like", "waiting": 0, "max_user_likes": 2000, "campaign_value": 10, "fields": { "description": false, "phone": false, "website": false, "address": false } }, { "id": 1093, "campaign_type": "instagram_liking", "payment_type": "coin", "waiting": 15, "max_user_likes": 2000, "campaign_value": 5, "fields": { "description": true, "phone": true, "website": true, "address": true } } ] }
-
Status:
200
-
-
Method:
POST
-
Endpoint:
/api/campaigns
-
Request Content:
{ "campaign": { "campaign_class_id": "1215", "target_url": "https://instagram.com/p/***REMOVED***", "budget": "1000", "description": "Ullam quam velit blanditiis hic id et. Id voluptas quae et ducimus corporis quis alias necessitatibus. Numquam omnis nulla et eos accusantium.", "phone": "09123456789", "website": "http://miller.co.uk", "address": "6485 Torp Rest, Palmerston NT 3825" } }
- Success:
- Content:
none
- Status:
201
- Content:
- Failure (when Instagram url is wrong)
-
Content:
{ "errors": { "target_url": [ "آدرس تصویر اینستاگرام اشتباه است" ] } }
-
Status:
422
-
- Failure (when user has not enough credit to create a campaign)
-
Content:
{ "errors": { "budget": [ "شما اعتبار کافی ندارید" ] } }
-
Status:
422
-
- Failure (when the budget is not enough even for a like)
-
Content:
{ "errors": { "budget": [ "باید اعتبار بیشتری برای کمپین خود اختصاص دهید" ] } }
-
Status:
422
-
- Failure (when the selected campaign_class is not available)
-
Content:
{ "errors": { "base": [ "مورد درخواستشده یافت نشد" ] } }
-
Status:
404
-
- Method:
GET
- Endpoint:
/api/campaigns/next
- Request Content:
none
- Success (when there's a campaign available):
-
Content:
{ "campaign": { "id": 2578, "payment_type": "like", "coin_user_share": 0, "like_user_share": 5, "waiting": 0, "cover": "http://likenama.com/system/instagram_liking_campaigns/covers/000/000/001/original/11820650_383510488514384_162151818_n.jpg?1463292759", "description": "Sunt quo molestiae a neque sapiente. Alias rem ullam iure et explicabo modi. Sunt velit nisi hic incidunt voluptas et.", "phone": "09123456789", "website": "http://volkman.us", "address": "0260 Abshire Locks, Grafton NSW 0800" } }
-
Status:
200
-
- Failure (when there's no campaign available)
-
Content:
{ "errors": { "base": [ "مورد درخواستشده یافت نشد" ] } }
-
Status:
404
-
-
Method:
POST
-
Endpoint:
/api/campaigns/[CAMPAIGN-ID]/like
-
Request Content:
{ "like": { "access_token": "***REMOVED***" } }
- Success (when user has liked the target):
-
Content:
{ "user": { "username": "sample_username", "like_credit": 20000, "coin_credit": 10002 } }
-
Status:
200
-
- Failure (when user didn't like the target)
-
Content:
{ "errors": { "base": [ "این کمپین لایک نشده است" ] } }
-
Status:
422
-
- Failure (when during the action, the campaign ran out of budget)
-
Content:
{ "errors": { "base": [ "بودجه این کمپین به پایان رسیدهاست" ] } }
-
Status:
422
-
- Failure (when during the action, the campaign got unverified)
-
Content:
{ "errors": { "base": [ "این کمپین به تایید مدیریت نرسیدهاست" ] } }
-
Status:
422
-
- Failure (when during the action, the campaign got unavailable)
-
Content:
{ "errors": { "base": [ "این کمپین به پایان رسیدهاست" ] } }
-
Status:
422
-
- Failure (when the period between each like isn't enough)
-
Content:
{ "errors": { "base": [ "بین هر لایک باید چند ثانیه صبر کنید" ] } }
-
Status:
422
-
- Failure (when the instagram access token is invalid)
-
Content:
{ "errors": { "base": [ "ارتباط با اینستاگرام قطع شدهاست. دوباره وارد شوید" ] } }
-
Status:
401
-
- Failure (when during the action, the campaign's source picture got deleted)
-
Content:
{ "errors": { "base": [ "این کمپین دیگر موجود نیست" ] } }
-
Status:
422
-
- Method:
POST
- Endpoint:
/api/campaigns/[CAMPAIGN-ID]/report
- Request Content:
none
- Success (when the campaign gets reported):
- Content:
none
- Status:
201
- Content:
- Failure (when user has reported the campaign before)
- Content:
none
- Status:
200
- Content:
- Method:
GET
- Endpoint:
/api/products
- Request Content:
none
- Success:
-
Content:
{ "products": [ { "id": 54, "title": "Remote Kit", "product_type": "mobiletopup", "price": 6398, "description": "Quod sequi placeat laudantium ea. Magnam velit sunt qui aspernatur molestias voluptatem laudantium sunt. Totam dolorum deleniti ab unde maxime quam numquam." }, { "id": 55, "title": "Gel Output Bridge", "product_type": "mobiletopup", "price": 9527, "description": "Odit voluptas quasi omnis est nesciunt aut. Amet veritatis impedit consectetur aspernatur eveniet error aut. Eligendi dolorem numquam sit totam autem iusto." }, { "id": 56, "title": "Remote Gel Transmitter", "product_type": "mobiletopup", "price": 9239, "description": "Consectetur laborum vel architecto enim reprehenderit fuga quae libero. Et quos consequuntur est illum qui amet corrupti. Voluptatem quam dolorum iure sit qui fuga nostrum." }, { "id": 57, "title": "Gel Mount", "product_type": "mobiletopup", "price": 7942, "description": "Et nulla expedita numquam amet facilis aut. Soluta et consequatur consectetur eaque autem eveniet sed quasi. Quidem accusantium a at reprehenderit ratione consequatur dolore magni. Odit quod libero veniam aut quis sit ut." } ] }
-
Status:
200
-
- Failure (when there are no products available)
-
Content:
{ "errors": { "base": [ "مورد درخواستشده یافت نشد" ] } }
-
Status:
404
-
- Method:
POST
- Endpoint:
/api/products/[PRODUCT-ID]/purchase
- Request Content:
none
- Success:
-
Content:
{ "detail": { "code": "Omnis eos rerum ad et ut sapiente asperiores quae.", "product": { "id": 1522, "title": "Input Power Controller", "product_type": "Electric GPS Tuner78", "price": 76, "description": "Ipsam et suscipit labore omnis autem commodi. Nisi dignissimos enim nulla atque. Sint placeat et labore autem. Facere laboriosam voluptate officia necessitatibus distinctio. Corporis aut tempore pariatur quod qui." } } }
-
Status:
200
-
- Failure (when it's out of stock)
-
Content:
{ "errors": { "base": [ "مورد درخواستشده یافت نشد" ] } }
-
Status:
404
-
- Failure (when user doesn't have enough credit)
-
Content:
{ "errors": { "coin_credit": [ "شما اعتبار کافی ندارید" ] } }
-
Status:
422
-
- Method:
GET
- Endpoint:
/api/users/self
- Request Content:
none
- Success:
-
Content:
{ "user": { "username": "phoebe_buffay", "like_credit": 20000, "coin_credit": 10000 } }
-
Status:
200
-
- Method:
GET
- Endpoint:
/api/bundles
- Request Content:
none
- Success:
-
Content:
{ "bundles": [ { "bazaar_sku": "lurline", "price": 3, "coins": 1, "free_coins": 1 }, { "bazaar_sku": "desiree.larson", "price": 3, "coins": 1, "free_coins": 1 }, { "bazaar_sku": "alene_considine", "price": 3, "coins": 1, "free_coins": 1 } ] }
-
Status:
200
-
- Failure (when there is no bundle available)
-
Content:
{ "errors": { "base": [ "مورد درخواستشده یافت نشد" ] } }
-
Status:
404
-
-
Method:
POST
-
Endpoint:
/api/bundles/[BAZAAR_SKU]/purchase
-
Request Content:
{ "bundle": { "purchase_token": "djhs543jcdlfhw452" } }
- Success:
- Content:
none
- Status:
201
- Content:
- Failure (when the payment was unsuccessful)
-
Content:
{ "errors": { "base": [ "پرداخت ناموفق بودهاست" ] } }
-
Status:
422
-
-
Method:
POST
-
Endpoint:
/api/messages
-
Request Content:
{ "message": { "email": "sample@example.com", "title": "A decent title for this message.", "content": "Dignissimos quia provident similique dolores libero dolorem. Deleniti illum perferendis et veniam id nisi est. Ut tempora modi blanditiis quasi est aliquam.\nExcepturi inventore dolorum eos rem autem. Qui vitae aperiam animi optio quos veniam vero. Aut quo qui dolore sint." } }
- Success:
- Content:
none
- Status:
201
- Content:
- Failure (when the content length is invalid)
-
Content:
{ "errors": [ "متنپیام بلند است (حداکثر 500 کاراکتر)" ] }
-
Status:
422
-