Skip to content

Campaigns

A campaign is a sales effort which can be measured for progress and success. Campaigns can be linked to sales transactions either directly or via Campaign Products.

Operations

Upload list of campaigns

Request

POST https://api.zoined.com/campaigns?dryRun=false&separator=%3B&encoding=utf-8

Security
bearerAuth
Query
dryRunbooleanrequired

Only validate the request without storing the data

Example:dryRun=false
separatorstringrequired

Column separator used when loading CSV data

Example:separator=;
encodingstringrequired

Character encoding used in the CSV data (default is utf-8)

Example:encoding=utf-8
Body
Any of:
campaign_idstringrequired

Campaign ID

Example:"6344"
campaign_namestringrequired

Campaign name

Example:"February 2016"
campaign_typestring

Campaign type

Example:"Web"
start_datestring

Campaign Start Date (yyyy-mm-dd)

Example:"2016-02-01"
end_datestring

Campaign End Date (yyyy-mm-dd)

Example:"2016-02-29"
organisation_idstring

Organisation ID

Example:"540"
custom_field_1string

Custom Field 1

Example:"New"
custom_field_2string

Custom Field 2

Example:"New"
custom_field_3string

Custom Field 3

Example:"New"
custom_field_4string

Custom Field 4

Example:"New"
custom_field_5string

Custom Field 5

Example:"New"
source_systemstring

Identifier of the source system this data is from. Needed when mapping between source system identifiers and master identifiers are used.

Example:"ABCDEF"
curl -i -X POST \
  'https://zapi-api.zoined.com/_mock/campaigns?dryRun=false&separator=%3B&encoding=utf-8' \
  -H 'Authorization: Bearer <YOUR_token_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "campaign_id": "6344",
    "campaign_name": "February 2016",
    "campaign_type": "Web",
    "start_date": "2016-02-01",
    "end_date": "2016-02-29",
    "organisation_id": "540",
    "custom_field_1": "New",
    "custom_field_2": "New",
    "custom_field_3": "New",
    "custom_field_4": "New",
    "custom_field_5": "New",
    "source_system": "ABCDEF"
  }'

Responses

Request has been processed successfully.

Headers

  • Content-Type: application/json
Bodyapplication/json
statusstringrequired

Status of the operation OK / Not OK

Example:"OK"
msgstringrequired

Message describing result of operation

Example:"1 entity added"
Response
{ "status": "OK", "msg": "1 entity added" }