Articles

Add

Once the campaign is created, you must add the list of the articles to which it applies.

POST /me/campaigns/:campaignId/articles HTTP/1.1
Accept: application/vnd.aplazame.v1+json
Authorization: Bearer api_private_key
Host: api.aplazame.com

[
  {
    "id": "89793238462643383279",
    "name": "18 ct white gold watch with diamonds",
    "description": "High-precision quartz movement",
    "url": "http://www.chanel.com/fragrance-beauty/Fragrance-N05-88145/sku/138083",
    "image_url": "http://www.chanel.com/fragrance-beauty/Fragrance-N05-88145/sku/138083/product_01.jpg"
  },
  {
    "id": "59825349042875546873",
    "name": "Nº5 eau premiere spray",
    "description": "A decidedly lighter, fresher...",
    "url": "http://www.chanel.com/fragrance-beauty/Fragrance-N05-88145/sku/138083",
    "image_url": "http://www.chanel.com/fragrance-beauty/Fragrance-N05-88145/sku/138083/product_01.jpg"
  }
]
Parameter Type Required Description
id string yes Article ID
name string yes Article name
description string no Article description
url URL yes Article absolute URL
image_url URL no Article image absolute URL

Response

HTTP/1.1 204 NO CONTENT
Content-Type: application/vnd.aplazame.v1+json

Delete

Individual deletion of an article included in a campaign.

DELETE /me/campaigns/:campaignId/articles/:articleId HTTP/1.1
Accept: application/vnd.aplazame.v1+json
Authorization: Bearer api_private_key
Host: api.aplazame.com

Response

HTTP/1.1 204 NO CONTENT
Content-Type: application/vnd.aplazame.v1+json

Delete all

if you do not include the article id in the URL, all campaign articles are referenced.

DELETE /me/campaigns/:campaignId/articles HTTP/1.1
Accept: application/vnd.aplazame.v1+json
Authorization: Bearer api_private_key
Host: api.aplazame.com

Response

HTTP/1.1 204 NO CONTENT
Content-Type: application/vnd.aplazame.v1+json

List

GET /me/campaigns/:campaignId/articles?page=2 HTTP/1.1
Accept: application/vnd.aplazame.v1+json
Authorization: Bearer api_private_key
Host: api.aplazame.com

Response

HTTP/1.1 200 OK
Content-Type: application/json

{
  "cursor": {
    "after": 3,
    "before": 1
  },
  "paging": {
    "count": 314,
    "next": "https://api.aplazame.com/me/campaigns/:campaignId/articles?page=3",
    "previous": "https://api.aplazame.com/me/campaigns/:campaignId/articles?page=1"
  },
  "results": [
  ]
}
Parameter Type Description
cursor object Pagination cursor object
paging object Pagination status
results collection List of campaigns