« Back to Documentation Overview

set_campaign_postal_address

Section: Campaigns
Version: 1.5.0


Set postal address and postal design (formatting) in campaign. Postal address is attached to every message sent from campaign.

Conditions:

  • campaigns (mandatory) – CAMPAIGN_ID obtained from get_campaigns.
  • name (optional) - Name of you or your company.
  • address (mandatory) – Street and number.
  • city (mandatory) – City.
  • state (optional) - State or region.
  • zip (mandatory) – Zip / postal code.
  • country (mandatory) – Country. Name must be compatible with the one on web interface.
  • design (mandatory) – How your postal address will be formatted. Fields above marked as mandatory must also be present in design! Do not insert HTML tags here, this will be converted in HTML part of messages automatically.


Parameters
stringAPI_KEY
object
stringcampaignCAMPAIGN_ID
stringnameMy name
stringaddressMy address
stringcityMy city
stringstateMy state
stringzipMy zip
stringcountryMy country
stringdesign[[name]], [[address]], [[city]], [[state]] [[zip]], [[country]]
Return Value
integerupdated1

Example Request JSON

[
    "API_KEY",
    {
        "campaign": "CAMPAIGN_ID",
        "name": "My name",
        "address": "My address",
        "city": "My city",
        "state": "My state",
        "zip": "My zip",
        "country": "My country",
        "design": "[[name]], [[address]], [[city]], [[state]] [[zip]], [[country]]"
    }
]

Example Response JSON

{
    "updated": 1
}

Example Error Response JSON

{
    "code": -1,
    "message": "Token missing in design"
}
Method-specific Errors
Missing campaign
Token missing in design
API-wide Errors
API key verification failed API key verification failed
API client IP not allowed API client IP not allowed
Invalid params Attribute params must be reference to hash