Skip to content

Campaign Sales

Campaign sales provides a way to link multiple campaigns to a single sales, sales order or sales offer line. Ordinarily only one campaign can be linked directly but this allows support for any number of campaigns per line.

Upload list of campaign sales

Request

POST https://api.zoined.com/salesCampaigns?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:
transaction_idstringrequired

ID for transaction this campaign attaches to

Example:"T1234"
line_item_idstringrequired

Line ID in a transaction this campaign attaches to

Example:"1"
campaign_idstringrequired

Campaign ID

Example:"6344"
campaign_typestring

Type (origin) of campaign record ('sales', 'salesorder', 'salesoffer')

Example:"sales"
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/salesCampaigns?dryRun=false&separator=%3B&encoding=utf-8' \
  -H 'Authorization: Bearer <YOUR_token_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "transaction_id": "T1234",
    "line_item_id": "1",
    "campaign_id": "6344",
    "campaign_type": "sales",
    "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" }