Skip to content

Campaign products

Campaign products associates products with specific campaigns. This allows creation of campaigns retroactively, but will slow down data loading as each sales row needs to be matched against existing campaigns.

Campaign products should only be used if it is not possible to add campaign information directly to sales transactions.

Upload list of campaign products

Request

POST https://api.zoined.com/campaignProducts?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:"6453"
category_idstring

Associated Category ID

Example:"My category ID"
product_idstringrequired

Associated Product ID

Example:"My product ID"
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/campaignProducts?dryRun=false&separator=%3B&encoding=utf-8' \
  -H 'Authorization: Bearer <YOUR_token_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "campaign_id": "6453",
    "category_id": "My category ID",
    "product_id": "My product ID",
    "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" }