Getting Started

The SmartFile API allows programmers to create automated interfaces that can pass files and information directly into the SendMyAd and Virtual Publisher portals without user intervention. This API is based on a REST interface that accepts commands via HTTP POST variables.

To get started using the API a few things are required:

  1. Request an API key. API keys can be received via a request to the SendMyAd staff.
  2. Identify the publisher code you wish to send files to. If you're a publisher, this can be seen within your company profile. Otherwise, submit a request to the SendMyAd staff.
  3. You will need the ability to make an HTTP POST with required variables & follow case sensitivity naming conventions. This can be done in most languages.
  4. It is also preferable that you have the ability to parse XML and/or JSON responses, since this is the native result of all API calls. Without it, you may not know your results.

Download our SmartFile API Postman collection and try it out!

To use: download and unzip the archive. In Postman, import both our collection and environment files. Fill in your information (publisher code, API key, etc.) in the environment variables and run the examples.


Examples

Below is an example of how to return a list of issues for a publication. We recommend using the cURL command line application for testing, because it will accurately display the responses in your terminal. (Note: SendMyAd does not supply example code in specific programming languages)

Request Example via cURL POST

curl -v -3 https://yourpublishername.sendmyad.com/SmartFile/api.php -F apiKey=12345678  -F action=getIssueList -F className=Issue -F publisherCode=XYZ  -F publicationName="Testing Publication"

Alternatively, you can simply create a GET style URL and run in a browser. However, various browsers and versions will handle the response differently. If the XML or JSON response does not display properly, try another browser or use cURL instead.

Request Example via URL

https://yourpublishername.sendmyad.com/SmartFile/api.php?apiKey=12345678&action=getIssueList&className=Issue&publisherCode=XYZ&publicationName=Testing%20Publication


POST Example via HTML Form

                        
                        <!-- POST AN AD FILE THROUGH HTML FORM -->
                        <form method="post" action="https://portal.sendmyad.com/SmartFile/api.php" enctype="multipart/form-data">
                            <input type="file" id="upfile_0" name="upfile_0"  value="">
                            <input type="hidden" id="action" name="action" value="uploadAd" />
                            <input type="hidden" id="className" name="className" value="Upload" />
                            Key:
                            <input type="text" id="apiKey" class="w120" name="apiKey" value="[YOURKEY]" />
                            PublisherCode:
                            <input type="text" id="publisherCode" name="publisherCode" value="[YOURDATA]" />
                            PublicationCode:
                            <input type="text" id="publicationCode" name="publicationCode" value="[YOURDATA]" />
                            IssueCode:
                            <input type="text" id="issueCode" name="issueCode" value="[YOURDATA]" />
                            AdSpecCode:
                            <input type="text" id="adSpecCode" name="adSpecCode" value="[YOURDATA]" />
                            colorProfileShortLabel:
                            <input type="text" id="colorProfileCode" name="colorProfileCode" value="[YOURDATA]" />
                            <input type="submit" class="btn" name="mysubmit" value="Upload">
                        </form>

                        <!-- RESERVE AN AD SPACE -->
                        <form method="post" action="https://portal.sendmyad.com/SmartFile/api.php" enctype="multipart/form-data">
                            <input type="hidden" id="action" name="action" value="reserveAdSpace" />
                            <input type="hidden" id="className" name="className" value="Reservation" />
                            <input type="hidden" id="responseFormat" name="responseFormat" value="JSON" />
                            Publisher Code:
                            <input type="text" id="publisherCode" name="publisherCode" value="[YOURDATA]" />
                            API Key: 
                            <input type="text" id="apiKey" name="apiKey" value="[YOURKEY]" />
                            Publication Code:
                            <input type="text" id="publicationCode" name="publicationCode" value="[YOURDATA]" />
                            Ad Spec Code:
                            <input type="text" id="adSpecCode" name="adSpecCode" value="[YOURDATA]" />
                            Issue Code:
                            <input type="text" id="issueCode" name="issueCode" value="[YOURDATA]" />
                            Color Profile Name:
                            <input type="text" id="colorProfileName" name="colorProfileName" value="[YOURDATA]" />
                            Label:
                            <input type="text" id="label" name="label" value="API TEST AD" />
                            Credit Hold:
                            <input type="text" id="creditStatus" name="creditStatus" value="0" />
                            Ad Instructions:
                            <input type="text" id="adInstructions" name="adInstructions" value="lorem ipsum..." />
                            <input type="submit" class="btn" name="mysubmit" value="Send">
                        </form>
                        
                    

The Upload Class

The upload class contains all of the functions needed to post a file to SendMyAd and Virtual Publisher.

Guidelines

  • File posting is limited to no more than 100mb per file
  • Files must be uploaded 1 at a time
  • To post a file, your form must employ the method POST, GET will not work and type of multipart/form-data.
  • Your file form variable must be named upload_0
  • The api supports PDF only. Each PDF must have a valid embedded xmp job ticket. Supported job ticket formats are GWG Ad Ticket and SMA Job Ticket format.

Available Actions

upload is the action which tells the api to upload the supplied file.


Parameters

NameTypeRequiredDescription
action String Yes The action variable tells the api what you want to do.
className String Yes The className variable tells the api where the action is located.
apiKey String Yes The apiKey allows the api to authenticate you. Api keys can be requested from SendMyAd staff.
publisherCode String Yes The publisherCode tells the api what publisher you are trying to connect with.
upfile_0 The File Yes This is a reference to the file that you wish to upload.

Response

                                    
                                    <results>
                                        <success>true/false</success>
                                        <error>Each error that occurred as a text description. Each error will generate a new xml error tag.</error>
                                        <processId>A unique string which represents the ad.</processId>
                                    </results>
                                    
                                

uploadPage is the action which tells the api to upload the supplied file to a Virtual Publisher plan.


Parameters

NameTypeRequiredDescription
action String Yes The action variable tells the api what you want to do.
className String Yes The className variable tells the api where the action is located.
apiKey String Yes The apiKey allows the api to authenticate you. Api keys can be requested from SendMyAd staff.
publisherCode String Yes The publisherCode tells the api what publisher you are trying to connect with.
issueCode String Yes The issueCode tells the api to what issue the page will be assigned.
upfile_0 The File Yes This is a reference to the file that you wish to upload.


Response

                                    
                                    <results>
                                        <success>true/false</success>
                                        <error>Each error that occurred as a text description. Each error will generate a new xml error tag.</error>
                                        <processId>A unique string which represents the ad.</processId>
                                    </results>
                                    
                                

The Reservation Class

This class contains ways to create reservations in the system.

Available Actions

reserveAdSpace creates an insertion order to be fulfilled by an ad sender.


Parameters

NameTypeRequiredDescription
apiKey String Yes The apiKey allows the api to authenticate you. Api keys can be requested from SendMyAd staff.
publisherCode String Yes The code of the publisher you wish to send the space reservation to, must have been granted access or be the same user company.
publicationId Int 1 publication identifer is required The publication's SendMyAd ID you wish to use. publicationId overrides publicationCode and publicationName.Publication IDs can be obtained through the publication class.
publicationCode String 1 publication identifer is required The publication code you wish to use. publicationCode overrides publicationName.
publicationName String 1 publication identifer is required The publication name you wish to use. It must match a publication in the system owned by the publisher.
adSpecId Int 1 ad spec identifier is required The ad size SendMyAd ID you wish to use.
adSpecCode String 1 ad spec identifier is required The ad size SendMyAd code you wish to use.
adSpecHeight Int 1 ad spec identifier is required The exact trim height size represented in the SendMyAd system that you wish to use.
adSpecWidth Int Required if adSpecHeight is used The exact trim width size represented in the SendMyAd system that you wish to use.
adSpecBleed Int Required if adSpecHeight is used The exact bleed side of the size represented in the SendMyAd system that you wish to use.
colorProfileId Int 1 color profile identifier is required The color Profile SendMyAd id you wish to use.
colorProfileName String 1 color profile identifier is required The exact color profile name you wish to use.
notify Boolean No 'true' or 'false': notify the assignment user
notifyOnDate String No Date format: MM/DD/YYYY. Notify the assignment user on this date instead of immediately
reNotifyForDays Int No Schedule notifications to the assignment user, from now until the issue materials due date, at the interval of days specified with this value.
assignmentUserId Int No A valid SendMyAd userId overrides assignmentUserEmail, assignmentUserCompanyId, assignmentUserCompany, and assignmentUserCompanyCode. Assignment user will be the advertiser user who is assigned to the ad. They will receive all notifications for the advertiser. If no assignment user information is provided, it can be added later in the portal.
assignmentUserEmail String No A legal SendMyAd user email which overrides assignmentUserCompanyId, assignmentUserCompany, and assignmentUserCompanyCode.
assignmentUserCompanyId Int No A legal SendMyAd user companyId (termId) which overrides assignmentUserCompany, and assignmentUserCompanyCode.
assignmentUserCompanyCode String No A legal SendMyAd user company code which overrides assignmentUserCompany.
assignmentUserCompany String No A legal SendMyAd user company name
issueId Int 1 issue identifier is required A valid issueId for the publication
issueRunDate String 1 issue identifier is required A date of the format mm/dd/yyyy
issueCode String 1 issue identifier is required A SMA code which matches a running issue.
bookingNumber String No A booking number which will be tracked on the ad material.
processId String No If a unique processId is not supplied one will be created for you. This should only be created by a machine.
label String No This is a label for the ad materials.
product String No The product label represented in the ad.
headline String No The headline represented in the ad.
categoryId Int No A system category ID, must be from a category already present in the system. See Publication.addAdCategory function.
pageCount Int No Default is 1. If the chosen ad specification is an open multipage ad, the page count defines how many pages the ad should cover. Less than 1 is not supported.
folioNumber String No The intended folio number of the ad. This does not dictate true layout placement and is only a suggested position. Default is empty.
advertiserNumber String No A unique ad identifier supplied from the advertiser's system or workflow. Possibly adId. Default is empty.
publisherInfo String No Publisher supplied information about the ad. Usually not usable for advertisers. Default is empty.
productUrl String No A web url which represents the product for the advertisement. Default empty
externalId String No An external unique identifier supplied by the sending system. Usually used for finding ads by a 3rd party system's id. Default empty
planOnly Int No Defines if the reservation should only be visible in the Virtual publisher product and not the SMA product. Default 0. 1 true or 0 false
printAdTypeId Int No Defines which type of ad this is. Useful for categorization and reporting of ad types. Default 1 (Supplied Ad) Options: 1 (Supplied Ad), 2 (House Ad), 3 (PSA)
positionTagIds String No A comma-separated list of position tag IDs.
positionTagCodes String No A comma-separated list of position tag codes.
positionTagNames String No A comma-separated list of position tag names.
creditStatus Int No 1 or 0 to place the ad on credit hold.
cancelled Int No 1 or 0 to flag the ad as cancelled.
salesRepId Int No A user ID who represents the publisher sales person for the ad.
salesRepIds String No A comma-separated list of user IDs that represents the publisher sales representatives for the ad.
responseType String No Default xml , alternative option is "json". Allows system to send alternate response object type. All newly created api functions will default to JSON.
adRate Float No A float money value which represents the ad's rate cost.
netCost Float No A float money value which represents the ad's net cost.
adInstructions String No Ad instructions from the advertiser
brand String No Brand information
externalPosition String No also referred to as Requested Position
custom_[internal name] String No Custom metadata fields. Format: custom_[internal name] where internal name matches the configuration in SendMyAd's Manage Custom Metadata Options screen. Example: A custom field with an internal name of "salesNumber" would be referenced by custom_salesNumber.
notifyPublisher Int No Default is 0. Set to 1 to send notification email to publisher about the new reservation


Response

                                    
                                    <results>
                                        <success>true/false</success>
                                        <error>Each error that occurred as a text description. Each error will generate a new xml error tag.</error>
                                        <processId>A unique string which represents the ad.</processId>
                                    </results>
                                    
                                

addMaterials add material to print ad reservation


Parameters

NameTypeRequiredDescription
apiKey String Yes The apiKey allows the api to authenticate you. Api keys can be requested from SendMyAd staff.
publisherCode String Yes The code of the publisher you wish to send the space reservation to, must have been granted access or be the same user company.
processId String Yes The unique identifier for the ad reservation.


Response

                                    
                                    <results>
                                        <success>true/false</success>
                                        <error>Upload failed. Please try again.</error>
                                        <processId>A unique string which represents the ad.</processId>
                                    </results>
                                    
                                

The Message Class

This class contains all of the functions needed to send messages related the SendMyAd Portal

Available Actions

sendAdMaterialsReminder will take supplied processIds and send out an email reminder to each ad contact.


Parameters

NameTypeRequiredDescription
action String Yes "sendAdMaterialsReminder" The action variable tells the api what you want to do.
className String Yes "Message" The className variable tells the api where the action is located.
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff.
publisherCode String Yes The publisherCode tells the api what publisher you are trying to connect with.
processIds String Yes This needs to be a comma delimited list of processIds or an url encoded json block of processIds.


Response

                                    
                                         <results>
                                            <success>true/false</success>
                                            <error>Each error that occurred as a text description. Each error will generate a new xml error tag.</error>
                                            <emailsSentCount>The number of emails successfully sent out.</emailsSentCount>
                                        </results>
                                    
                                

The User Class

This class contains functions related to SendMyAd users.

Available Actions

addPublisherSalesRep adds a new publisher based sales representative user to the system.


Parameters

NameTypeRequiredDescription
action String Yes "addPublisherSalesRep" The action variable tells the api what you want to do.
className String Yes "User" The className variable tells the api where the action is located.
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff.
publisherCode String Yes The code of the publisher, must have been granted access or be the same user company.
email String Yes A url encoded email address. This will be used as the username and email of the created user
password String (31) Yes A password must be 8 characters or greater, no spaces, cannot contain special chars, and cannot contain any of the following: 1234, password, welcome, abc123, qwerty, asdfg, zxcvb, sunshine, princess
firstName String (255) No The first name of the user
lastName String (255) No The last name of the user
phone String (25) No The phone number
ext String (10) No The phone extension
userPhone2 String (25) No A secondary phone number
jobTitle String (255) No The user\s job title
notify Int No 1 or 0, trigger to send user a welcome email


Response

                                    
                                         <results>
                                            <success>true/false</success>
                                            <userId>the id of the newly created user.</userId>
                                            <msg>Any response message.</msg>
                                        </results>
                                    
                                

addAgencyUser adds a new agency based user to the system as non-admins.


Parameters

NameTypeRequiredDescription
action String Yes "addAgencyUser" The action variable tells the api what you want to do.
className String Yes "User" The className variable tells the api where the action is located.
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff.
publisherCode String Yes The code of the publisher, must have been granted access or be the same user company.
companyId String Yes The id of the agency company you wish to add the user to.
email String (255) Yes A URL encoded email address. This will be used as the username and email of the created user
password String (31) Yes A password must be 8 characters or greater, no spaces, cannot contain special chars, and cannot contain any of the following: 1234, password, welcome, abc123, qwerty, asdfg, zxcvb, sunshine, princess
firstName String (255) No The first name of the user
lastName String (255) No The last name of the user
phone String (25) No The phone number
ext String (10) No The phone extension
userPhone2 String (25) No A secondary phone number
jobTitle String (255) No The user\s job title
notify Int No 1 or 0, trigger to send user a welcome email


Response

                                    
                                        <results>
                                            <success>true/false</success>
                                            <userId>the id of the newly created user.</userId>
                                            <msg>Any response message.</msg>
                                        </results>
                                    
                                

addAdvertiserUser adds a new advertiser based user to the system as non-admins.


Parameters

NameTypeRequiredDescription
action String Yes "addAdvertiserUser" The action variable tells the api what you want to do.
className String Yes "User" The className variable tells the api where the action is located.
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff.
publisherCode String Yes The code of the publisher, must have been granted access or be the same user company.
companyId String Yes The id of the agency company you wish to add the user to.
email String (255) Yes A URL encoded email address. This will be used as the username and email of the created user
password String (31) Yes A password must be 8 characters or greater, no spaces, cannot contain special chars, and cannot contain any of the following: 1234, password, welcome, abc123, qwerty, asdfg, zxcvb, sunshine, princess
firstName String (255) No The first name of the user
lastName String (255) No The last name of the user
phone String (25) No The phone number
ext String (10) No The phone extension
userPhone2 String (25) No A secondary phone number
jobTitle String (255) No The user\s job title
notify Int No 1 or 0, trigger to send user a welcome email


Response

                                    
                                        <results>
                                            <success>true/false</success>
                                            <userId>the id of the newly created user.</userId>
                                            <msg>Any response message.</msg>
                                        </results>
                                    
                                

checkAdvertiserUserExists checks if an advertiser user exists based on the supplied email address. Returns userId if found.


Parameters

NameTypeRequiredDescription
action String Yes "checkAdvertiserUserExists" The action variable tells the api what you want to do.
className String Yes "User" The className variable tells the api where the action is located.
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff.
publisherCode String Yes The code of the publisher, must have been granted access or be the same user company.
email String (255) Yes A URL encoded email address. This will be used as the username and email of the created user


Response

                                    
                                        {"success":1,"msg":"", "userId":"123"}
                                    
                                

checkPublisherUserExists checks if an Publisher user exists based on the supplied email address. Returns userId if found.


Parameters

NameTypeRequiredDescription
action String Yes "checkPublisherUserExists" The action variable tells the api what you want to do.
className String Yes "User" The className variable tells the api where the action is located.
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff.
publisherCode String Yes The code of the publisher, must have been granted access or be the same user company.
email String (255) Yes A URL encoded email address. This will be used as the username and email of the created user


Response

                                    
                                        {"success":1,"msg":"", "userId":"123"}
                                    
                                

updateUser updates a publisher, agency or advertiser user's information.


Parameters

NameTypeRequiredDescription
action String Yes "updateUser" The action variable tells the api what you want to do.
className String Yes "User" The className variable tells the api where the action is located.
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff.
publisherCode String Yes The code of the publisher, must have been granted access or be the same user company.
companyId Int Yes The id of the advertiser company you wish to add the user to.
userId Int Yes The ID of the user to edit. (at least one of the following is required)
email String (255) No a URL encoded email address. It must be unique.
firstName String (255) No The first name of the user
lastName String (255) No The last name of the user
phone String (25) No The phone number
ext String (10) No The phone extension
userPhone2 String (25) No A secondary phone number
jobTitle String (255) No The user's job title


Response

                                    
                                        {"success":1,"msg":"", "userId":"123"}
                                    
                                

The Ad Class

This class contains ways to get and update ad information in the system.

Available Actions

getAdInfo queries an ad by its unique processId to list available information known about the ad.


Parameters

NameTypeRequiredDescription
action String Yes "getAdInfo" The action variable tells the api what you want to do.
className String Yes "Ad" The className variable tells the api where the action is located.
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff.
publisherCode String Yes The code of the publisher that owns the ad to be queried.
processId String Yes The unique identifier for the ad.


Response

                                    
                                        {"success":"1","msg":"","data":{"key1":"value1","key2":"value2",...}
                                    
                                

getAdsByChanged returns an ad list in json by last updated in number of minutes.


Parameters

NameTypeRequiredDescription
action String Yes "getAdsByChanged" The action variable tells the api what you want to do.
className String Yes "Ad" The className variable tells the api where the action is located.
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff.
publisherCode String Yes The code of the publisher that owns the ad to be queried.
minutes String Yes A number of minutes you wish to check by last changed. Must be between 1 and 44640.


Response

                                    
                                        {
                                            "success":1,
                                            "rowCount":16,
                                            "data":{
                                                "123455":{
                                                    "processId":"12342314",
                                                    "fileName":"my.pdf",
                                                    "publicationName":"My Publication",
                                                },
                                                ...
                                            }
                                        }
                                    
                                

editAd edits an ad by processId using a pre-defined set of fields.


Parameters

NameTypeRequiredDescription
action String Yes "editAd" The action variable tells the api what you want to do.
className String Yes "Ad" The className variable tells the api where the action is located.
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff.
publisherCode String Yes The code of the publisher that owns the ad to be queried.
processId String Yes The unique identifier for the ad.
At least one of the following fields is required
materialsId String No
creditStatus Int No 0 or 1
cancelled Int No 0 or 1
label String No The label of the ad (also seen as advertiser string in interface)
headline String No
adInstructions String No Ad instructions from the advertiser
publisherInfo String No Internal notes about the ad only seen by the publisher.
salesRepIds String No A comma-separated list of user IDs that represents the publisher sales representatives for the ad.
adRate Float No A money value which represents the ad's rate cost.
netCost Float No A money value which represents the ad's net cost.
folioNumber String No The intended folio number of the ad. This does not dictate true layout placement and is only a suggested position. Default is empty.
categoryId Int No A system category ID, must be from a category already present in the system. See Publication.addAdCategory function.
adSpecId Int No An ad size (spec) ID. See AdSpec.getAdSpecList function.
adSpecCode String No The ad size SMA code you wish to use. NOTE: Ad sizes can only be edited for reservations without materials or for ads that have rejected materials. Editing the ad spec value will move the ad to the clipboard in all Virtual Publisher plans on which it is placed.
positionTagIds String No A comma-separated list of position tag IDs.
positionTagCodes String No A comma-separated list of position tag codes.
positionTagNames String No A comma-separated list of position tag names.
brand String No Brand information
externalPosition String No Also referred to as Requested Position.
custom_[internal name] String No Custom metadata fields. Format: custom_[internal name] where internal name matches the configuration in SendMyAd's Manage Custom Metadata Options screen. Example: A custom field with an internal name of "salesNumber" would be referenced by custom_salesNumber.


Response

                                    
                                        {"success":"1","msg":"","data":{"key1":"value1","key2":"value2",...}
                                    
                                

editIssue assigns an issue to an existing ad


Parameters

NameTypeRequiredDescription
action String Yes "editIssue" The action variable tells the api what you want to do.
className String Yes "Ad" The className variable tells the api where the action is located.
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff.
publisherCode String Yes The code of the publisher that owns the ad to be queried.
processId String Yes The unique identifier for the ad.
publicationId Int Yes The publicationId for the issue
issueId Int 1 issue identifier is required A valid issueId for the publication.
issueCode String 1 issue identifier is required An SMA code which matches a running issue.


Response

                                    
                                        {"success":"0 | 1","msg":"","issueId":1234}
                                    
                                

archiveAd removes an ad or reservation


Parameters

NameTypeRequiredDescription
action String Yes "archiveAd" The action variable tells the api what you want to do.
className String Yes "Ad" The className variable tells the api where the action is located.
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff.
publisherCode String Yes The code of the publisher that owns the ad to be queried.
processId String Yes The unique identifier for the ad.
publicationId Int Yes The publicationId for the issue
issueId Int Yes A valid issueId for the publication.


Response

                                    
                                        {"success":"0 | 1","msg":""}
                                    
                                

unarchiveAd restores an ad or reservation


Parameters

NameTypeRequiredDescription
action String Yes "unarchiveAd" The action variable tells the api what you want to do.
className String Yes "Ad" The className variable tells the api where the action is located.
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff.
publisherCode String Yes The code of the publisher that owns the ad to be queried.
processId String Yes The unique identifier for the ad.


Response

                                    
                                        {"success":"0 | 1","msg":""}
                                    
                                

getStatusList gets a list of available ad status IDs and codes


Parameters

NameTypeRequiredDescription
action String Yes "getStatusList" The action variable tells the api what you want to do.
className String Yes "Ad" The className variable tells the api where the action is located.
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff.
publisherCode String Yes The code of the publisher that owns the ad to be queried.


Response

                                    
                                        {"success":"0 | 1","msg":"","data":[{"id":"150","name":"Materials Ok"},{...}]}
                                    
                                

getStatus gets a list of available ad status IDs and codes


Parameters

NameTypeRequiredDescription
action String Yes "getStatus" The action variable tells the api what you want to do.
className String Yes "Ad" The className variable tells the api where the action is located.
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff.
publisherCode String Yes The code of the publisher that owns the ad to be queried.
processId String Yes The unique identifier for the ad


Response

                                    
                                        {"success":"0 | 1","msg":"","status":"statusId"}
                                    
                                

getAsset retrieves link for an asset type of given process


Parameters

NameTypeRequiredDescription
action String Yes "getAsset" The action variable tells the api what you want to do.
className String Yes "Ad" The className variable tells the api where the action is located.
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff.
publisherCode String Yes The code of the publisher that owns the ad to be queried.
processId String Yes The unique identifier for the ad
assetType String Yes The assetType variable tells the api which asset you want to retrieve for the ad. Allowed values: "original", "final", "receipt", "preview", "thumbnail"


Response

                                    
                                        {"success":"0 | 1","msg":"","linkToAsset":"https://<LINK_TO_ASSET>"}
                                    
                                

updatePrintAd updates a metadata value for an ad. Deprecated method, use editAd (above) instead.


Parameters

NameTypeRequiredDescription
action String Yes "updatePrintAd" The action variable tells the api what you want to do.
className String Yes "Ad" The className variable tells the api where the action is located.
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff.
publisherCode String Yes The code of the publisher that owns the ad to be queried
processId String Yes The unique identifier for the ad
key String Yes The metadata field identifier
value String Yes The URL-encoded value to be updated.


Response

                                    
                                        {"success":"0 | 1","msg":""}
                                    
                                

The DigitalAd Class

This class contains ways to create digital ad reservations in the system.

Available Actions

reserveAdSpace creates a digital ad space reservation to be fulfilled by an ad sender.


Parameters

NameTypeRequiredDescription
action String Yes "reserveAdSpace" The action variable tells the api what you want to do.
className String Yes "DigitalAd" The className variable tells the api where the action is located.
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff.
publisherCode String Yes The code of the publisher you wish to send the space reservation to, must have been granted access or be the same user company.
mediaProfileId Int Yes The mediaProfileId is required and can be found in the details of the media profiles list of your site or call getWebMediaProfilesList function for results. Note: The chosen mediaProfile must be turned on for advertisers in order for this option to work.
publicationId Int No The publications SMA id key you wish to use, publicationId over rides publicationCode and publicationname. Publication Id keys can be obtained through the publication class.
publicationCode String No The publication code you wish to use, publicationCode over rides publicationname
publicationName String No The publication name you wish to use, must match a publication in the sytem owned by the publisher.
adSpecId Int 1 ad spec identifier is required The ad size SMA id you wish to use.
adSpecCode String 1 ad spec identifier is required The ad size SMA code you wish to use.
adSpecName String 1 ad spec identifier is required The ad size SMA name you wish to use.
notify String 1 ad spec identifier is required 'true' or 'false'. Notify the assignment user
notifyOnDate String No Date format: MM/DD/YYYY. Notify the assignment user on this date instead of immediately
notifyEndDate String No Date format: MM/DD/YYYY. Notify the assignment user up to this date. Specify the interval of days for the reNotifyForDays parameter
reNotifyForDays Int No Schedule notifications to the assignment user, from now until the notification end date, at the interval of days specified with this value.
assignmentUserId Int Yes A valid SMA userId over rides assignmentUserEmail, assignmentUserCompanyId, assignmentUserCompany, and assignmentUserCompanyCode. Assignment user will be the advertiser user who is assigned to the ad. They will receive all notifications for the advertiser.
assignmentUserEmail String No A legal SMA user Email, overrides assignmentUserCompanyId, assignmentUserCompany, and assignmentUserCompanyCode
assignmentUserCompanyId String No A legal SMA user companyId (termId) , over rides assignmentUserCompany, and assignmentUserCompanyCode
assignmentUserCompanyCode String No A legal SMA user company code, overrides assignmentUserCompany
assignmentUserCompany String No A legal SMA user company name
issueId Int No A valid issueId for the publication.
issueCode String No a SMA code which matches a running issue. Note, publisher must have issues and publications for digital ads turned on for this to work.
processId String No if a unique processId is not supplied one will be created for you. This should only be created by a machine.
advertiser String No This is a label for the ad materials.
product String No The product label represented in the ad.
externalId String No An external unique identifier supplied by the sending system. Usually used for finding ads by a 3rd party system's id. Default empty
responseType String No Default xml , alternative option is "json". Allows system to send alternate response object type. All newly created api functions will default to JSON.
adInstructions String No Ad instructions from the advertiser
brand String No Brand information
runFrom String No mm/dd/yyyy. The start run date of the ad.
runTo String No mm/dd/yyyy. The end run date of the ad.
clickUrl String No The url executed when the advertisement is clicked.
clickUrl String No The url executed when the advertisement is clicked.
custom_[internal name] String No Custom metadata fields. Format: custom_[internal name] where internal name matches the configuration in SendMyAd's Manage Custom Metadata Options screen. Example: A custom field with an internal name of "salesNumber" would be referenced by custom_salesNumber.


Response

                                    
                                        <results>
                                            <success>true/false</success>
                                            <error>Each error that occurred as a text description. Each error will generate a new xml error tag.</error>
                                            <processId>A unique string which represents the ad.</processId>
                                        </results>
                                    
                                

getAdInfo queries an ad by its unique processId to list available information known about the ad.


Parameters

NameTypeRequiredDescription
action String Yes "getAdInfo" The action variable tells the api what you want to do.
className String Yes "DigitalAd" The className variable tells the api where the action is located.
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff.
publisherCode String Yes The code of the publisher that owns the ad to be queried.
processId String Yes The unique identifier for the ad.


Response

                                    
                                        {"success":"1","msg":"","data":{"key1":"value1","key2":"value2",...}
                                    
                                

getWebMediaProfilesList returns a list of mediaProfiles based on provided filters.


Parameters

NameTypeRequiredDescription
action String Yes "getWebMediaProfilesList" The action variable tells the api what you want to do.
className String Yes "DigitalAd" The className variable tells the api where the action is located.
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff.
publisherCode String Yes The publisherCode tells the api what publisher you are trying to connect with.


Response

                                    
                                        {
                                            "success":1,
                                            "rowCount":1,
                                            "data":{
                                                "568":{
                                                    "mediaProfileId":"568",
                                                    "publisherName":"Example Publisher",
                                                    ...
                                                }
                                            }
                                        }
                                    
                                

getAdUnitsList returns a list of Ad Units for a supplied Media Profile. Necessary for creating a reservation.


Parameters

NameTypeRequiredDescription
action String Yes "getAdUnitsList" The action variable tells the api what you want to do.
className String Yes "DigitalAd" The className variable tells the api where the action is located.
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff.
publisherCode String Yes The publisherCode tells the api what publisher you are trying to connect with.
mediaProfileId Int Yes The mediaProfileId is required and can be found in the details of the media profiles list of your site or call getWebMediaProfilesList function for results.


Response

                                    
                                        {
                                            "success":1,
                                            "rowCount":10,
                                            "data":{
                                                "123":{
                                                    "id":"123",
                                                    "adSpecName":"3:1 Rectangle",
													"width":"300",
													"height":"100",
                                                    ...
                                                }
                                            }
                                        }
                                    
                                

sendAdMaterialsReminder will take supplied processIds and send out an email reminder to each ad contact.


Parameters

NameTypeRequiredDescription
action String Yes "sendAdMaterialsReminder" The action variable tells the api what you want to do.
className String Yes "DigitalAd" The className variable tells the api where the action is located.
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff.
publisherCode String Yes The publisherCode tells the api what publisher you are trying to connect with.
processIds String Yes This needs to be a comma delimited list of processIds or an url encoded json block of processIds.


Response

                                    
                                         <results>
                                            <success>true/false</success>
                                            <error>Each error that occurred as a text description. Each error will generate a new xml error tag.</error>
                                            <emailsSentCount>The number of emails successfully sent out.</emailsSentCount>
                                        </results>
                                    
                                

The AdCreator Class

This class contains ways to create Ad Creator reservations in the system.

Available Actions

reserveAdSpace creates an AdCreator space reservation to be fulfilled by an ad sender.


Parameters

NameTypeRequiredDescription
action String Yes "reserveAdSpace" The action variable tells the api what you want to do.
className String Yes "AdCreator" The className variable tells the api where the action is located.
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff.
publisherCode String Yes The code of the publisher you wish to send the space reservation to, must have been granted access or be the same user company.
publicationId Int No The publications SMA id key you wish to use, publicationId over rides publicationCode and publicationname. Publication Id keys can be obtained through the publication class.
publicationCode String No The publication code you wish to use, publicationCode over rides publicationname
publicationName String No The publication name you wish to use, must match a publication in the sytem owned by the publisher.
adSpecId Int 1 ad spec identifier is required The ad size SMA id you wish to use.
adSpecCode String 1 ad spec identifier is required The ad size SMA code you wish to use.
adSpecName String 1 ad spec identifier is required The ad size SMA name you wish to use.
notify String No 'true' or 'false'. Notify the assignment user
notifyOnDate String No Date format: MM/DD/YYYY. Notify the assignment user on this date instead of immediately
reNotifyForDays Int No Schedule notifications to the assignment user, from now until the issue materials due date, at the interval of days specified with this value.
assignmentUserId Int Yes A valid SMA userId over rides assignmentUserEmail, assignmentUserCompanyId, assignmentUserCompany, and assignmentUserCompanyCode. Assignment user will be the advertiser user who is assigned to the ad. They will receive all notifications for the advertiser.
assignmentUserEmail String No A legal SMA user Email, overrides assignmentUserCompanyId, assignmentUserCompany, and assignmentUserCompanyCode
assignmentUserCompanyId String No A legal SMA user companyId (termId) , over rides assignmentUserCompany, and assignmentUserCompanyCode
assignmentUserCompanyCode String No A legal SMA user company code, overrides assignmentUserCompany
assignmentUserCompany String No A legal SMA user company name
issueId Int No A valid issueId for the publication.
issueCode String No a SMA code which matches a running issue. Note, publisher must have issues and publications for digital ads turned on for this to work.
processId String No if a unique processId is not supplied one will be created for you. This should only be created by a machine.
product String No The product label represented in the ad.
bookingNumber String No A booking number which will be tracked on the ad material.
label String No This is a label for the ad materials.
headline String No The headline represented in the ad.
folioNumber String No The intended folio number of the ad. This does not dictate true layout placement and is only a suggested position. Default is empty.
advertiserNumber String No A unique ad identifier supplied from the advertiser's system or workflow. Possibly adId. Default is empty.
publisherInfo String No Publisher supplied information about the ad. Usually not usable for advertisers. Default is empty.
productUrl String No A web url which represents the product for the advertisement. Default empty
adRate Float No A float money value which represents the ad's rate cost.
netCost Float No A float money value which represents the ad's net cost.
externalId String No An external unique identifier supplied by the sending system. Usually used for finding ads by a 3rd party system's id. Default empty
responseType String No Default xml , alternative option is "json". Allows system to send alternate response object type. All newly created api functions will default to JSON.
adInstructions String No Ad instructions from the advertiser
brand String No Brand information
custom_[internal name] String No Custom metadata fields. Format: custom_[internal name] where internal name matches the configuration in SendMyAd's Manage Custom Metadata Options screen. Example: A custom field with an internal name of "salesNumber" would be referenced by custom_salesNumber.


Response

                                    
                                        <results>
                                            <success>true/false</success>
                                            <error>Each error that occurred as a text description. Each error will generate a new xml error tag.</error>
                                            <processId>A unique string which represents the ad.</processId>
                                        </results>
                                    
                                

The AdSpec Class

This class contains ways to get ad specification (size) information in the system.

Available Actions

getAdSpecList return a list of active ad sizes by publication.


Parameters

NameTypeRequiredDescription
action String Yes "getAdSpecList" The action variable tells the api what you want to do.
className String Yes "AdSpec" The className variable tells the api where the action is located.
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff.
publisherCode String Yes The publisherCode tells the api what publisher you are trying to connect with.
publicationId String Yes The unique identifier for the publication.
publicationCode String required if publicationId or publicationCode not supplied The unique code for the publication.
publicationName String required if publicationId or publicationCode not supplied The name of the publication.
adCreatorOnly Int No 0 to include all ad sizes. 1 to limit the results to only ad sizes used for Ad Creator


Response

                                    
                                         {
                                            "success":1,
                                            "rowCount":16,
                                            "data":{
                                                "216":{
                                                    "adSpecId":"216",
                                                    "adSpecName":"Full Page",
                                                    "adSpecCode":"FP",
                                                    ...
                                        }
                                    
                                

The Company Class

This class contains ways to create advertiser and agency companies associated with a publisher.

Available Actions

addAgencyCompany creates a new agency company and links it to a publisher.


Parameters

NameTypeRequiredDescription
action String Yes "addAgencyCompany" The action variable tells the api what you want to do
className String Yes "Company" The className variable tells the api where the action is located
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff
publisherCode String Yes The code of the publisher, must have been granted access or be the same user company
name String (255) Yes The name of the company
code String (12) No The code of the company
address String (255) No The address line 1 of the company
address2 String (255) No The address line 2 of the company
city String (255) No The city of the company
state String (4) No The 2 digit state code of the company
country String (4) No The 3 digit country code of the company
zip String (11) No The zip/postal code of the company
phone String (12) No The phone number of the company
fax String (12) No The fax number of the company
website String (255) No The web url the company


Response

                                    
                                         {"success":1,"msg":""}
                                    
                                

addAdvertiserCompany creates a new advertiser company and links it to a publisher.


Parameters

NameTypeRequiredDescription
action String Yes "addAdvertiserCompany" The action variable tells the api what you want to do
className String Yes "Company" The className variable tells the api where the action is located
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff
publisherCode String Yes The code of the publisher, must have been granted access or be the same user company
name String (255) Yes The name of the company
code String (12) No The code of the company
address String (255) No The address line 1 of the company
address2 String (255) No The address line 2 of the company
city String (255) No The city of the company
state String (4) No The 2 digit state code of the company
country String (4) No The 3 digit country code of the company
zip String (11) No The zip/postal code of the company
phone String (12) No The phone number of the company
fax String (12) No The fax number of the company
website String (255) No The web url the company


Response

                                    
                                         {"success":1,"msg":""}
                                    
                                

editCompany allows editing of company information if the API user has been granted that right.


Parameters

NameTypeRequiredDescription
action String Yes "editCompany" The action variable tells the api what you want to do
className String Yes "Company" The className variable tells the api where the action is located
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff
publisherCode String Yes The code of the publisher, must have been granted access or be the same user company
companyId Int Yes The ID of the company to be edited
At least one of the following are required
name String (255) No The name of the company
code String (12) No The code of the company
address String (255) No The address line 1 of the company
address2 String (255) No The address line 2 of the company
city String (255) No The city of the company
state String (4) No The 2 digit state code of the company
country String (4) No The 3 digit country code of the company
zip String (11) No The zip/postal code of the company
phone String (12) No The phone number of the company
fax String (12) No The fax number of the company
website String (255) No The web url the company


Response

                                    
                                         {"success":1,"msg":""}
                                    
                                

checkCompanyExists checks if an advertiser or agency company exists based on the supplied company name or code.


Parameters

NameTypeRequiredDescription
action String Yes "checkCompanyExists" The action variable tells the api what you want to do
className String Yes "Company" The className variable tells the api where the action is located
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff
publisherCode String Yes The code of the publisher, must have been granted access or be the same user company
companyName String (255) This or the company code is required The name of the company
companyCode String (12) This or the company name is required The code of the company.


Response

                                    
                                         {"success":1,"msg":"", "companyId":"123"}
                                    
                                

getAdvertisersList returns a list of all the advertiser companies associated with this publisher.


Parameters

NameTypeRequiredDescription
action String Yes "getAdvertisersList" The action variable tells the api what you want to do
className String Yes "Company" The className variable tells the api where the action is located
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff
publisherCode String Yes The code of the publisher, must have been granted access or be the same user company


Response

                                    
                                         {
                                             "success":1,
                                             "rowCount":4,
                                             "data":{
                                                 ["advertiserId":"411","advertiserName": ...]
                                             }
                                        }
                                    
                                

getAgenciesList returns a list of all the agency companies associated with this publisher.


Parameters

NameTypeRequiredDescription
action String Yes "getAgencyList" The action variable tells the api what you want to do
className String Yes "Company" The className variable tells the api where the action is located
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff
publisherCode String Yes The code of the publisher, must have been granted access or be the same user company


Response

                                    
                                         {
                                             "success":1,
                                             "rowCount":3,
                                             "data":{
                                                 ["agency":"436","agencyName": ...]
                                             }
                                        }
                                    
                                

The Publisher Class

This class contains ways to find information specific to a publishe

Available Actions

getPrintAdTypeList returns a list of all print ad types for a given publisher.


Parameters

NameTypeRequiredDescription
action String Yes "getPrintAdTypeList" The action variable tells the api what you want to do.
className String Yes "Publisher" The className variable tells the api where the action is located.
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff.
publisherCode String Yes The publisherCode tells the api what publisher you are trying to connect with.


Response

                                    
                                        {
                                            "success":1,
                                            "rowCount":3,
                                            "data":{
                                                "2":{"name":"House Ad","code":"","description":"","publisherId":"0","id":"2"},
                                                "3":{"name":"PSA","code":"","description":"","publisherId":"0","id":"3"},
                                                "1":{"name":"Supplied Ad","code":"","description":"","publisherId":"0","id":"1"}
                                            }
                                        }
                                    
                                

addPrintAdType adds a print ad type for a given publisher.


Parameters

NameTypeRequiredDescription
action String Yes "addPrintAdType" The action variable tells the api what you want to do.
className String Yes "Publisher" The className variable tells the api where the action is located.
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff.
publisherCode String Yes The code of the publisher for this request.
name String (255) Yes The proposed name of the ad type
description String (255) No The proposed description of the ad type
code String (12) No The proposed code of the ad type


Response

                                    
                                        {
                                            "success":1,
                                            "id":4,
                                            "msg":"Ad type added successfully."
                                        }
                                    
                                

The Issue Class

This class contains ways to find information about and add new issues.

Available Actions

addIssue adds a new issue for this publication. Note: Our API will recognize most common date formats in your supplied string and convert to a proper date.


Parameters

NameTypeRequiredDescription
action String Yes "addIssue" The action variable tells the api what you want to do
className String Yes "Issue" The className variable tells the api where the action is located
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff
publisherCode String Yes The code of the publisher, must have been granted access or be the same user company
publicationId String 1 publication identifier is required The publication SMA id you wish to use, publicationId over rides $publicationCode and $publicationCode overrides $publicationName.
publicationCode String 1 publication identifier is required The publication code you wish to use, publicationCode over rides publicationName
publicationName String 1 publication identifier is required The publication name you wish to use
name String (255) Yes The name of the issue
code String (4) No The code of the company
runDate String No The issue run date. If not supplied, default will be today.
materialsDueDate String No The ad materials due date: If not supplied, will be today.
onSaleDate String No The issue on sale date. If not supplied will be issue run date.
shipDate String No The issue ship date. If not supplied will be issue run date.
description String (255) No A description of the issue.


Response

                                    
                                         {"success":1,"id":2437}
                                    
                                

issueExists checks if an issue exists using a variety of different variables


Parameters

NameTypeRequiredDescription
action String Yes "issueExists" The action variable tells the api what you want to do
className String Yes "Issue" The className variable tells the api where the action is located
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff
publisherCode String Yes The code of the publisher for this request
issueId Int If an issueId is not supplied, an issueName, runDate, issueCode or publication identifier will be required. Look for an issue by id.
name String No An issue name string
runDate String No The issue run date formatted mm/dd/yyyy
code String No An SMA code which matches a running issue.
publicationId Int Required if issueId not supplied The SMA publication ID you wish to use, publicationId overrides publicationCode and publicationName
publicationCode String Required if publicationId is not supplied or another publication identifier The publication code which contains the issue
publicationName String Required if publicationId is not supplied or another publication identifier The exact publication name which contains the issue


Response

                                    
                                         {"success":1,"exists":"0 | 1"}
                                    
                                

getIssueInfo returns information about an issue


Parameters

NameTypeRequiredDescription
action String Yes "getIssueInfo" The action variable tells the api what you want to do
className String Yes "Issue" The className variable tells the api where the action is located
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff
publisherCode String Yes The code of the publisher for this request.
issueId Int If an issueId is not supplied, a publication identifier will be required, along with the issueName or runDate. Look for an issue by id.
name String No An issue name string
runDate String No The issue run date formatted mm/dd/yyyy
code String No An SMA code which matches a running issue.
publicationId Int Required if issueId not supplied The SMA publication ID you wish to use, publicationId overrides publicationCode and publicationName
publicationCode String Required if publicationId is not supplied or another publication identifier The publication code which contains the issue
publicationName String Required if publicationId is not supplied or another publication identifier The exact publication name which contains the issue


Response

                                    
                                         {
                                             "success":1,
                                             "data":{
                                                 "issueId":"2436",
                                                 "issueCode":"",
                                                 "runDate":"2014-06-16 00:00:00",
                                                 ...
                                            }
                                         }
                                    
                                

getIssueList returns a list of issues for the specified publication.


Parameters

NameTypeRequiredDescription
action String Yes "getIssueList" The action variable tells the api what you want to do
className String Yes "Issue" The className variable tells the api where the action is located
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff
publisherCode String Yes The code of the publisher for this request.
publicationId Int Yes The SMA publication ID you wish to use, publicationId overrides publicationCode and publicationName
publicationCode String Required if publicationId is not supplied or another publication identifier The publication code which contains the issue
publicationName String Required if publicationId is not supplied or another publication identifier The exact publication name which contains the issue
allIssues Int No 0 = (default value if paramater not specified) Return only issues which are in the future and less the 190 days passed run date.
1 = Return all issues for publication.


Response

                                    
                                         {
                                             "success":1,
                                             "rowCount":4,
                                             "data":{
                                                 "1621":{
                                                     "issueId":"1621",
                                                     "issueName":"2015",
                                                     "issueCode":"ISS2015",
                                                     "runDate":"2014-12-19 00:00:00",
                                                     ...
                                                    }
                                             }
                                         }
                                    
                                

updateIssue updates an issue's metadata value


Parameters

NameTypeRequiredDescription
action String Yes "updateIssue" The action variable tells the api what you want to do
className String Yes "Issue" The className variable tells the api where the action is located
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff
publisherCode String Yes The code of the publisher for this request.
issueId Int Issue id or code is required. Look for an issue by id. This will be used as the key to update issue info.
code String Issue id or code is required. Issue id or code is required. This will be used as the key to update issue info.
key String Yes A known database key.
value String Yes A URL-encoded string to update as the value.


Response

                                    
                                         {"success":1,"msg":"Updated issue successfully."}
                                    
                                

The Publication Class

This class contains ways to find information about publications.

Available Actions

getPublicationList returns a list of all publications for a given publisher.


Parameters

NameTypeRequiredDescription
action String Yes "getPublicationList" The action variable tells the api what you want to do
className String Yes "Publication" The className variable tells the api where the action is located
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff
publisherCode String Yes The code of the publisher for this request


Response

                                    
                                        {
                                            "success":1,
                                            "rowCount":7,
                                            "data":{
                                                "155":{
                                                    "publicationId":"155",
                                                    "publicationName":"Testing Magazine",
                                                    ...
                                                }
                                            }
                                        }
                                    
                                

getColorProfileList returns a list of color profiles for the specified publication.


Parameters

NameTypeRequiredDescription
action String Yes "getColorProfileList" The action variable tells the api what you want to do
className String Yes "Publication" The className variable tells the api where the action is located
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff
publisherCode String Yes The code of the publisher for this request
publicationId String Yes The SMA publication ID you wish to use, publicationId overrides publicationCode and publicationName
publicationCode String Required if publicationId is not supplied or another publication identifier The publication code which contains the color profiles
publicationName String Required if publicationId is not supplied or another publication identifier The exact publication name which contains the color profiles


Response

                                    
                                        {
                                            "success":1,
                                            "rowCount":3,
                                            "data":{
                                                "247":{
                                                    "colorProfileId":"247",
                                                    "colorProfileName":"all warnings",
                                                    ...
                                                }
                                            }
                                        }
                                    
                                

getAdCategoryList returns a list of ad categories for the specified publication.


Parameters

NameTypeRequiredDescription
action String Yes "getAdCategoryList" The action variable tells the api what you want to do
className String Yes "Publication" The className variable tells the api where the action is located
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff
publisherCode String Yes The code of the publisher for this request
publicationId String Yes The SMA publication ID you wish to use, publicationId overrides publicationCode and publicationName
publicationCode String Required if publicationId is not supplied or another publication identifier The publication code which contains the categories
publicationName String Required if publicationId is not supplied or another publication identifier The exact publication name which contains the categories


Response

                                    
                                        {
                                            "success":1,
                                            "rowCount":3,
                                            "data":{
                                                "247":{
                                                    "colorProfileId":"247",
                                                    "colorProfileName":"all warnings",
                                                    ...
                                                }
                                            }
                                        }
                                    
                                

getSectionList returns a list of sections for the specified publication.


Parameters

NameTypeRequiredDescription
action String Yes "getSectionList" The action variable tells the api what you want to do
className String Yes "Publication" The className variable tells the api where the action is located
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff
publisherCode String Yes The code of the publisher for this request
publicationId String Yes The SMA publication ID you wish to use, publicationId overrides publicationCode and publicationName
publicationCode String Required if publicationId is not supplied or another publication identifier The publication code which contains the sections
publicationName String Required if publicationId is not supplied or another publication identifier The exact publication name which contains the sections


Response

                                    
                                        {"success":1,"rowCount":5,"data":{"2":{"sectionId":"2",...}}
                                    
                                

addAdCategory adds a new ad category for this publication.


Parameters

NameTypeRequiredDescription
action String Yes "addAdCategory" The action variable tells the api what you want to do
className String Yes "Publication" The className variable tells the api where the action is located
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff
publisherCode String Yes The code of the publisher for this request
publicationId String Yes The SMA publication ID you wish to use, publicationId overrides publicationCode and publicationName
publicationCode String Required if publicationId is not supplied or another publication identifier The publication code
publicationName String Required if publicationId is not supplied or another publication identifier The exact publication name
name String (255) Yes The proposed name of the ad category
code String (12) No The proposed code of the ad category
color String (12) No 7 or 3 comma delimited values. HEX or comma delimited RGB values (Optional) The proposed bar color of the ad category. Auto generated if none supplied. HTML HEX FORMAT: #FFFFFF
compDistRuleOn Int (1) No Decides if the competitive distance rule is on for this category. Default is off (0).
compDistRule Int (1000) No Decides how far apart in pages an item with the same category must be. Default is (0), which means not on the same page.


Response

                                    
                                        {
                                            "success":1,
                                            "id":809,
                                            "msg":"Ad Category added successfully."
                                        }
                                    
                                

addSection adds a new section for this publication


Parameters

NameTypeRequiredDescription
action String Yes "addSection" The action variable tells the api what you want to do
className String Yes "Publication" The className variable tells the api where the action is located
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff
publisherCode String Yes The code of the publisher for this request
publicationId String Yes The SMA publication ID you wish to use, publicationId overrides publicationCode and publicationName
publicationCode String Required if publicationId is not supplied or another publication identifier The unique publication code
publicationName String Required if publicationId is not supplied or another publication identifier The exact publication name
name String (255) Yes The proposed name of the section
color String (7) No The proposed bar color of the publication section. Auto generated if none supplied. HTML HEX FORMAT: #FFFFFF
fontColor String (7) No The proposed font color of the publication section. Defaults to white if none supplied. HTML HEX FORMAT: #FFFFFF
description String (255) No The proposed description of the publication section


Response

                                    
                                        {
                                            "success":1,
                                            "id":49,
                                            "msg":"Publication section added successfully."
                                        }
                                    
                                

getPositionTagsList returns a list of all the position tags associated with a publication.


Parameters

NameTypeRequiredDescription
action String Yes "getPositionTagsList" The action variable tells the api what you want to do
className String Yes "Publication" The className variable tells the api where the action is located
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff
publisherCode String Yes The code of the publisher for this request
publicationId String Yes The SMA publication ID you wish to use


Response

                                    
                                        {"success":1,"rowCount":5,"data":{"45":{"tagId":"45",...}}
                                    
                                

addPositionTag adds a new position tag for this publication


Parameters

NameTypeRequiredDescription
action String Yes "addPositionTag" The action variable tells the api what you want to do
className String Yes "Publication" The className variable tells the api where the action is located
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff
publisherCode String Yes The code of the publisher for this request
publicationId String Yes The SMA publication ID you wish to use, publicationId overrides publicationCode
name String (255) Yes The name of the new position tag
code String (8) Yes The code for the new position tag


Response

                                    
                                        {"success":1,"tagId":342,"msg":"Position tag added successfully."}
                                    
                                

editPositionTag edits a position tag by its ID


Parameters

NameTypeRequiredDescription
action String Yes "addPositionTag" The action variable tells the api what you want to do
className String Yes "Publication" The className variable tells the api where the action is located
apiKey String Yes The apiKey allows the api to authenticate you. API keys can be requested from SendMyAd staff
publisherCode String Yes The code of the publisher for this request
tagId String Yes The SMA publication ID you wish to use, publicationId overrides publicationCode and publicationName
name String (255) Required if code is not passed The new name of the position tag
code String (8) Required if name is not passed The new code for the position tag


Response

                                    
                                        {
                                            "success":1,
                                            "msg":"Position tag 342 edited successfully."
                                        }