Skip to content

Add publisher

This endpoint adds publisher.

POST https://adelion.com/api/publisher/add
ParameterTypeDescriptionRequirement
MailstringPublisher’s email.required
NamestringPublisher’s name.required
DescriptionstringPublisher’s description.optional
WebsitestringPublisher’s website.optional
CountrystringPublisher’s country. It must be a ISO-3166-1-alpha-2 country code. See Info -> Get countries for a list of available countries.required
CitystringPublisher’s city.optional
ZipCodestringPublisher’s zip code.optional
AddressstringPublisher’s address.optional
PhonestringPublisher’s phone.optional
MsgAppstringMessaging application: Teams, Telegram or WhatsApp.optional
MsgAccountstringMessaging account name on Messaging application.optional
PlatformDomainstringThe canonical domain name of the advertising system of the publisher. RTB EP of the publisher will try to inherit this value on creation.optional
SellersJsonDomainstringThe canonical domain where advertising system of the publisher hosts its sellers.json file. Usually it is the same domain as Platform Domain. RTB EP of the publisher will try to inherit this value on creation.optional
UsernamestringPublisher’s username. It is required for fetching statistics through stats API or CSV export.required
SellerTypeintType of the Publisher’s seller account that will be displayed in sellers.json. 1 - Publisher, 2 - Intermediary, 3 - Both.optional
SellerIdstringSeller ID of the publisher that will be displayed as “seller_id” in sellers.json and “sid” in schain. If blank, ID of the publisher will be used.optional
JSON payload example
{
"Publisher": {
"Mail": "publisher@mail.com",
"Name": "Publisher",
"Description": "Publisher desc",
"Website": "www.publisher.com",
"Country": "US",
"City": "New York",
"ZipCode": "123456",
"Address": "123 Street",
"Phone": "+11111111111",
"MsgApp": "[msg_app]",
"MsgAccount": "[msg_account]",
"PlatformDomain": "google.com",
"SellersJsonDomain": "realtimebidding.google.com",
"Username": "publisher1",
"SellerType": 2,
"SellerId": ""
}
}
Success JSON
{
"Status": "Ok",
"Publisher": {
"Id": 15,
"TeamId": 1,
"Mail": "publisher@mail.com",
"Name": "Publisher",
"Description": "Publisher desc",
"Website": "www.publisher.com",
"Country": "US",
"City": "New York",
"ZipCode": "123456",
"Address": "123 Street",
"Phone": "+11111111111",
"MsgApp": "[msg_app]",
"MsgAccount": "[msg_account]",
"PlatformDomain": "google.com",
"SellersJsonDomain": "realtimebidding.google.com",
"Username": "publisher1",
"SellerType": 2,
"SellerId": "",
"StatsAuth": "7sdd23",
"StatsByDate": "https://adelion.com/api/ortb/stats/publisher/general?username=publisher1&auth=7sdd23&date_from={date_from}&date_to={date_to}&columns=DateStats,Requests,Wins,Bills,NetImpressions,Spent",
"AccManagerId": 5,
"AccManagerName": "John Doe",
"Status": 0,
"StatusString": "Active",
"BannerEpsCount": 0,
"VastTagsCount": 0,
"RtbEpsCount": 0,
"PopFeedsCount": 1
}
}
Error JSON
{
"Status": "Error",
"Error": "[error description]"
}
Error CodeMeaning
400Bad Request — You sent a body that isn’t JSON.
401Unauthorized — Your access token is invalid.
406Not Acceptable — Some value(s) inside JSON are missing or malformed, or requested object is not found.
500Internal Server Error — We had a problem with our server. Try again later.