Skip to main content

Edit campaign

Edit

PUT /me/campaigns/:campaignId HTTP/1.1
Accept: application/vnd.aplazame.v1+json
Authorization: Bearer api_private_key
Host: api.aplazame.com
Content-Type: application/json
{
"name": "Summertime",
"start_date": "2016-06-01T00:00:00",
"end_date": "2016-08-31T23:59:59",
"interest": "2500",
"partial": true,
"num_instalments": [1, 2, 3, 5, 8]
}
ParameterTypeRequiredDescription
namestringYesCampaign name.
start_dateISO 8601YesStart date of the campaign.
end_dateISO 8601NoEnd date of the campaign.
interestdecimalYesInterest discount rate.
partialBooleanNoDetermines if the campaign applies to all products, false by default.
num_instalmentsarrayNoNumber of instalments available for the campaign.

Response

HTTP/1.1 204 NO CONTENT
X-Aplazame-Media-Type: aplazame.v1

Partial edition

PATCH /me/campaigns/:campaignId HTTP/1.1
Accept: application/vnd.aplazame.v1+json
Authorization: Bearer api_private_key
Host: api.aplazame.com
Content-Type: application/json
{
"start_date": "2016-06-22T00:00:00"
}

|Parameter | Type | Description| |---------|---------|---------|---------| :merchantId | hash | Yes | id of the store to perform action with. :campaignId | hash | Yes | id of the campaign to perform action with.

Response

HTTP/1.1 204 NO CONTENT
X-Aplazame-Media-Type: aplazame.v1