Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Expand
titleContent

Table of Contents

Table of Contents
maxLevel2


Note

In order to use the Programmatic Data Import API, your Salesforce Org needs to have API usage activated through having an API usage License. 


Numberedheadings
start-numbering-with1

The Programmatic Data Import API function is implemented as Apex class and is exposed as REST web service by using Salesforce standard functionality (see Apex Developer Guide for more information). For general information about the Forecast API feature, see

REST web service

URL

https://<my-domain-name>.my.salesforce.com/services/apexrest/ADvendio/ProgrammaticDataService/loadCSV/

https://<my-domain-name>.my.salesforce.com/services/apexrest/ADvendio/ProgrammaticDataService/loadCSV/


Method

POST

URL Params


NameValueDescription
idex: a0M5r000000xkfkEAASalesforce id of the connection object to which the data to be imported is related to.


Body

The request body should content a csv file binary containing the data to be imported according the following mapping. More information about the mapping and the file to attach can be found here: 


CSV Column

Type

Required

Imported in object/field

month

String

X

ProgrammaticDataWorkingSet__c.ADvendio__Month__c

advertiserId

String


ProgrammaticAdvertiser__c.ADvendio__AdvertiserId__c

ProgrammaticDataWorkingSet__c.ADvendio__AdvertiserId__c

advertiserName

String


ProgrammaticAdvertiser__c.ADvendio__AdvertiserName__c

ProgrammaticDataWorkingSet__c.ADvendio__AdvertiserName__c

partnerName

String


ProgrammaticPartner__c.ADvendio__PartnerName__c

ProgrammaticDataWorkingSet__c.ADvendio__SSPPartner__c

adUnitId

String


ProgrammaticPrice__c.ADvendio__AdUnitId__c

ProgrammaticDataWorkingSet__c.ADvendio__AdUnitId__c

adUnitName

String


ProgrammaticPrice__c.ADvendio__AdUnitName__c

ProgrammaticDataWorkingSet__c.ADvendio__AdUnitName__c

dealType

String


ProgrammaticPrice__c.ADvendio__DealType__c

ProgrammaticDataWorkingSet__c.ADvendio__DealType__c

costType

String


ProgrammaticPrice__c.ADvendio__CostType__c

ProgrammaticDataWorkingSet__c.ADvendio__CostType__c

creativeSize

String


ProgrammaticPrice__c.ADvendio__CreativeSize__c

ProgrammaticDataWorkingSet__c.ADvendio__CreativeSize__c

currencyCode

String


ProgrammaticPrice__c.CurrencyIsoCode

ProgrammaticDataWorkingSet__c.CurrencyIsoCode

impressions

Number


ProgrammaticDataWorkingSet__c.ADvendio__Impressions__c

clicks

Number


ProgrammaticDataWorkingSet__c.ADvendio__Clicks__c

revenue

Number


ProgrammaticDataWorkingSet__c.ADvendio__Revenue__c

Success Response

Code: 200

Content: A serialized JSON with the batch job id that will handle the import process.

Example: {"jobId":"7075r00001lfCmsAAE"}

Error Response

See Salesforce Apex REST Documentation

Examples

Get a Session-ID

bashGet a Session ID


Connected App

Get CLIENT_ID and CLIENT_SECRET from any connected app or create a new app in your org: App Manager -> New Connected App

Enable Enable OAuth Settings to see the consumer key (CLIENT_ID) and Consumer Secret (CLIENT_SECRET)


Minimal request

A simple request for a data set connected to an Ad Server.

bashCall Check Availability web service


jsResponse