{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/campaigns.json","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{\n    \"name\": \"test1.0\",\n    \"type\": \"AuctionCampaign\",\n    \"daily_budget\": 10.0,\n    \"bid_amount\": 0.01,\n    \"status\": \"Active\",\n    \"daily_budget_per_product\": 1.0,\n    \"lifetime_budget\": 10.0,\n    \"lifetime_budget_per_product\": 10.0\n}","language":"json","status":200}]},"params":[{"name":"name","type":"string","default":"Required","desc":"Name of the campaign","required":false,"in":"query","ref":"","_id":"5e7c6912530fe80018f6b8eb"},{"name":"type","type":"string","default":"Required","desc":"Type of the campaign. Please take a look at \"Campaign Definition\" for detailed campaign types.","required":false,"in":"query","ref":"","_id":"5e7c6912530fe80018f6b8ea"},{"name":"daily_budget","type":"float","default":"","desc":"Set your daily budget of a campaign","required":false,"in":"query","ref":"","_id":"5e7c6912530fe80018f6b8e9"},{"name":"bid_amount","type":"float","default":"","desc":"Set your daily budget of a campaign","required":false,"in":"query","ref":"","_id":"5e7c6912530fe80018f6b8e8"},{"name":"daily_budget_per_product","type":"float","default":"","desc":"Set your daily budget of a campaign per product","required":false,"in":"query","ref":"","_id":"5e7c6912530fe80018f6b8e7"},{"name":"lifetime_budget","type":"float","default":"","desc":"Set your lifetime budget of a campaign","required":false,"in":"query","ref":"","_id":"5e7c6912530fe80018f6b8e6"},{"name":"lifetime_budget_per_product","type":"float","default":"","desc":"Set your lifetime budget of a campaign per product","required":false,"in":"query","ref":"","_id":"5e7c6912530fe80018f6b8e5"}],"examples":{"codes":[{"code":"# Given that you have 1 product in a campaign and you want to schedule it 10 times daily\ncurl -X POST https://tophatter.com/merchant_api/v1/campaigns.json \\\n-H 'X-ERP-Name: company_name' \\\n-H 'User-Agent: CompanyName/1.0.0' \\\n-d 'access_token=YOUR_ACCESS_TOKEN' \\\n-d 'name=test_campaign_1.0' \\\n-d 'type=AuctionCampaign' \\\n-d 'daily_budget=10'\n-d 'bid_amount=1.0'\n-d 'daily_budget_per_product=1'\n-d 'lifetime_budget=10'\n-d 'lifetime_budget_per_product=10'","language":"curl"}]},"method":"post"},"next":{"description":"","pages":[]},"title":"Create a Campaign","type":"endpoint","slug":"create-a-campaign","excerpt":"","body":"","updates":[],"order":2,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5e7c6912530fe80018f6b8e3","createdAt":"2020-03-26T08:34:26.186Z","user":"567f0baca74a1c0d003e1fba","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Campaigns","slug":"account","order":5,"from_sync":false,"reference":false,"_id":"5c64c200244bda003204b97f","project":"567f0c06143cc60d00c1fdbe","version":"567f0c06143cc60d00c1fdc1","createdAt":"2019-02-14T01:18:56.582Z","__v":1},"version":{"version":"1","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["567f0c07143cc60d00c1fdc2","56a9783109cb9c0d00f0c7d3","56a97837f834950d0037b363","56a9783b2d8fd90d0036eed6","56a979912d8fd90d0036eed8","5834b5691a80690f00d31faf","5834b5e4f775120f00c45f9d","5bf1a1473031e4005075ae14","5c64c200244bda003204b97f","6036b3ce32fcbe02eb8d7011","60f505090c9c97000f61acce"],"_id":"567f0c06143cc60d00c1fdc1","__v":11,"createdAt":"2015-12-26T21:52:06.734Z","releaseDate":"2015-12-26T21:52:06.734Z","project":"567f0c06143cc60d00c1fdbe"},"project":"567f0c06143cc60d00c1fdbe","__v":6,"parentDoc":null}

postCreate a Campaign


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

name:
stringRequired
Name of the campaign
type:
stringRequired
Type of the campaign. Please take a look at "Campaign Definition" for detailed campaign types.
daily_budget:
float
Set your daily budget of a campaign
bid_amount:
float
Set your daily budget of a campaign
daily_budget_per_product:
float
Set your daily budget of a campaign per product
lifetime_budget:
float
Set your lifetime budget of a campaign
lifetime_budget_per_product:
float
Set your lifetime budget of a campaign per product

Examples


Result Format