Optimise API Request Headers

The API will return responses in both JSON and XML format. There are two ways by which you can get the response in your requested format.

1. Pass the parameter output=json(for JSON) or xml(for XML) in your request URL.

2. Pass the appropriate headers in your request for getting the response in that format.

  • For JSON Response: Content-Type: application/json; charset=utf-8
  • For XML Response: Content-Type: text/xml; charset=UTF-8

Default response format is JSON.

Authentication

With each request you must authenticate with API service by passing the following information:

  1. API Key
  2. Signature value (unencrypted)
  3. Signature value (encrypted with your private key) – Find out more about this

Methods

GetAccounts / ValidateLogin

Request URI

https://api.omgpm.com/network/OMGNetworkApi.svc/v1.2.1/GetAccounts/ValidateLogin?Key={Key}&Sig={Signature}&SigData={SignatureData}&output={xml or json}

Request Parameters

There are no additional request parameters with this method

Response Parameters

GetProgrammes

Request URI

https://api.omgpm.com/network/OMGNetworkApi.svc/v1.2.1/GetProgrammes?Key={Key}&Sig={Signature}&SigData={SignatureData}&AID={AID}&AgencyID={AgencyID}&ProductName={ProductName}&CountryID=&SectorID=&ProgramStatus=&UID=&PayoutType=&ProductFeed=&ExcludeRestictedProgs=&ProductType=&NumberOfRecords=800&Key=546798AB-03B9-4C30-82C0-1EC52E833A6F&Sig=XxUfcdXJNZf%2bnHWmUIo0x86i2%2f3itEE6428fH63PUa8%3d&SigData=2015-02-04 13:55:39.453&output={xml or json}

Request Parameters

Request Parameter Data Type Required Description
AgencyID Integer Yes The ID of the OMG Agency you are accessing. More info.
AID Integer Yes Your Unique AffiliateID
NumberOfRecords Integer No The number of records to return
ProductName String No A search string. eg. “Halifax Credit Cards”
CountryID Float No The 2 digit ISO standard country identifier
SectorID Float No The vertical to search against. See a valid list here.
UID Boolean No Shows only programmes with UID/SubID enabled
ProgramStatus String No Shows only programmes with a specific status. Valid values are: live, pending, cancelled, rejected
ProductFeed Boolean No Shows only programmes with a product feed
PayoutType Integer No Shows only programmeswith a specific payout type. See a valid list here.
ProductType Integer No Shows only programmes of a specific type. See a valid list here.

Response Parameters

Response Parameter Data Type Description
CampaignID String Campaign ID
Commission String The commission payable for the PayoutType value
ContactID String The Merchant ID or MID
Contact WebsiteID String Contact WebsiteID
Cookie Duration String The cookie duration (in days)
CountryID String Country ID
Country Code String Country Code for where the programme is based
CurrencyID String Currency ID
Currency Code String The currency symbol in which commission is tracked
Currency Symbol String The 3 digit ISO currency symbol in which commission is tracked
Deep Link Enabled Boolean Indicates whether a product feed is supported by the Merchant on the programme
Merchant Logo URL String Merchant Logo URL
Merchant Name String Merchant Name
PID String Product ID
PayoutType String The action to which commission is attributable
Performer Programme String
ProductTypeID String The Type of product
Product Description String A description of the programme
Product Feed Available String Indicates whether a product feed is available on the programme
Product Name String The name of the programme
Programme Status String The status of the programme. eg. Live, Cancelled, Rejected, Waiting
Sector String The sector that the programme operates within
Tracking URL String The OMG tracking URL for this programme
UID Tracking Boolean Indicates whether the programme supports UID tracking
Website URL String URL of the Merchant’s website (this is not tracked)

Reports / Affiliate / PerformanceOverTime

Request URI

http://api.omgpm.com/network/OMGNetworkApi.svc/v1.2.1/Reports/Affiliate/PerformanceOverTime?AgencyID=95&DateFrom=01/01/14&DateTo=31/01/15&MID=&PID=&CurrencyID=INR&AID=156872&DataType=1&GroupBy=1&NumberOfRecords=50&Key=546798AB-03B9-4C30-82C0-1EC52E833A6F&Sig=FzERs9iW%2b51%2fRYWG58mjShammSrzPmuo1466nsDut0U%3d&SigData=2015-02-10 20:58:45.726&output={xml or json}

Request Parameters

Request Parameter Data Type Required Description
AgencyID Integer Yes The ID of the OMG Agency you are accessing. More info.
DateFrom Date Yes The date to report from dd/mm/yyyy
DateTo Date No The date to report to dd/mm/yyyy
MID Integer No Merchant ID or MID
PID Integer No ProductID or PID
CurrencyID Integer No The CurrencyID
AID Integer No AffiliateID or AID
DataType Integer No 1 = Transaction Date (most common value), 2 = Completion Date
GroupBy Integer No
NumberOfRecords Integer No The number of rows to return

Response Parameters

Response Parameter Data Type Description
FullDate String Date of the events dd/mm/yyyy
MonthName String Name of month
MonthNo Integer Month integer
Year Integer Year
DayName String Name of day
WeekNo Integer Week number
MerchantName String Merchant name
ProductName String Product name
Impressions String Impressions
Clicks Integer Clicks
UniqueVisitors Integer Unique Visitors
TotalTransactions Integer Total Transactions
ValidatedTransactions Integer Validated Transactions
PendingTransactions Integer Pending Transactions
RejectedTransactions Integer Rejected Transactions
CR Integer Conversion Rate
CTR Integer Click Through Rate
EPC Integer Earnings per click
ECPM Integer Effective Cost per mille
TotalCommissionEarned Decimal Total amount of commission validated and invoiced
TotalCommissionPending Decimal Total amount of commission validated but not yet invoiced
StandardCommissionRejected Decimal Total amount of rejected commission
StandardCommissionPending Decimal Total amount of pending commission

Reports / Affiliate / PerformanceByAdvertiser

Request URI

http://api.omgpm.com/network/OMGNetworkApi.svc/v1.2.1/Reports/Affiliate/PerformanceByAdvertiser?AgencyID=95&DateFrom=01/01/14&DateTo=31/01/15&MID=&PID=&CurrencyID=INR&AID=156872&DataType=1&NumberOfRecords=50&Key=546798AB-03B9-4C30-82C0-1EC52E833A6F&Sig=8om5r7SBaWG6G4x5Zm0WROnSmqveQKkblB26Rr2m%2f%2bA%3d&SigData=2015-02-10 21:01:47.898&GroupByProduct=&output={xml or json}

Request Parameters

Request Parameter Data Type Required Description
AgencyID Integer Yes The ID of the OMG Agency you are accessing. See OMG Agencies or more info.
DateFrom Date Yes The date to report from dd/mm/yyyy
DateTo Date No The date to report to dd/mm/yyyy
MID Integer No Merchant ID or MID
PID Integer No ProductID or PID
CurrencyID Integer No The CurrencyID
AID Integer No AffiliateID or AID
DataType Integer No 1 = Transaction Date (most common value), 2 = Completion Date
GroupBy Integer No
NumberOfRecords Integer No The number of rows to return

Response Parameters

Response Parameter Data Type Description
MerchantName String Campaign ID
ProductName String Campaign ID
Impressions String Campaign ID
Clicks Integer Campaign ID
UniqueVisitors Integer Campaign ID
TotalTransactions Integer Campaign ID
ValidatedTransactions Integer Campaign ID
PendingTransactions Integer Campaign ID
RejectedTransactions Integer Campaign ID
CR Integer Campaign ID
CTR Integer Campaign ID
EPC Integer Campaign ID
ECPM Integer Campaign ID
TotalCommissionEarned Decimal Campaign ID
TotalCommissionPending Decimal Campaign ID
StandardCommissionRejected Decimal Campaign ID
StandardCommissionPending Decimal Campaign ID

Reports / Affiliate / TransactionsOverview

Request URI

http://api.omgpm.com/network/OMGNetworkApi.svc/v1.2.1/Reports/Affiliate/TransactionsOverview?Key={Key}&Sig={Signature}&SigData={SignatureData}&AID={AID}&CountryCode={CountryCode}&AgencyID={AgencyID}&MID={MID}&PID={PID}&Status={Status}&StartDate={StartDate}&EndDate={EndDate}&NumberOfRecords={NumberOfRecords}&UID={UID}&UIDRestrict={True or False}&PaidOnly={True or False}&output={xml or json}

Request Parameters

Request Parameter Data Type Required Description
AID Integer Yes AffiliateID or AID. Pass a comma separated list if you access multiple accounts.
CountryCode String Yes 2 digit ISO standard Country Code
AgencyID Integer Yes The ID of the OMG Agency you are accessing. See OMG Agencies or more info. Pass a comma separated list if you access multiple accounts.
MID Integer No MerchantID to filter by a specific Merchant
PID Integer No ProductID to filter by a specific Product
Status Integer Yes The Transaction Status to query. Allowed values are: -1 -> All, 0 -> Validated, 1 -> Rejected, 2 -> Pending
StartDate Date Yes Start of search date range
EndDate Date Yes End of search date range
UID String No UID value to search for
UIDRestrict Boolean No Shows only transactions with UID value
PaidOnly Boolean No Shows only paid transactions
NumberOfRecords Integer No The number of rows to return
TimeZoneID Integer No You can specify an optional time zone to convert all times in the response into this time zone. Look up TimeZoneIDs here.

Response Parameters

Response Parameter Data Type Description
ClickTime String  The date & time of the last click prior to the transaction in UTC
Completed String  The date the transaction was completed for invoicing purposes
Currency String  The 3 digit ISO standard currency symbol associated with the transaction
EX1 String  Extended data 1 – free format data provided by the merchant (if provided)
EX2 String  Extended data 2 – free format data provided by the merchant (if provided)
EX3 String  Extended data 3 – free format data provided by the merchant (if provided)
EX4 String  Extended data 4 – free format data provided by the merchant (if provided)
EX5 String  Extended data 5- free format data provided by the merchant (if provided)
LastUpdated String  The date & time that the transaction was last updated in UTC
MID Integer .The MerchantID
Merchant String  The Merchant Name
MerchantRef String  The Merchant’s sale reference or order id (if provided)
PID Integer  The ProductID
Product String  The Product Name
Referrer String  The referring URL of the last click prior to the transaction (if provided)
SR Integer  The Standard Rate of commission that will be paid out. This does not take into account validation or tiered commission rules. The VR (Validated Rate) is the actual amount that will be paid out if a transaction is validated.
Status String  The status of the Transaction. eg. Validated, pending, rejected
TransactionID String  The Optimise Transaction reference. This will not be set until the day after the transaction is recorded. Use UKEY as a unique identifier
TransactionTime String  The date & time of the transaction in the time zone associated with the campaign. See OriginalTimeZone.
TransactionValue Integer  The sale value of the transaction (if provided)
UID String  Unique Identifier. See UID/SubID
UID2 String  Unique Identifier 2. See UID/SubID
UID3 String  Unique Identifier 3. See UID/SubID
UID4 String  Unique Identifier 4. See UID/SubID
UID5 String  Unique Identifier 5. See UID/SubID
UKey String  Unique Key – this is a unique identifer for the transaction
VR Integer  Validated Rate – the commission that will be paid once the transaction is validated.
VoucherCode String  The voucher code used in the transaction (if available)
OffsetTransactionTime String The date & time of the transaction in your chosen time zone. Only visible if you pass a value into TimeZoneID request parameter.
OffsetTimeZoneValue String The time zone offset specified as a numeric. Only visible if you pass a value into TimeZoneID request parameter.
OffsetTimeZone String The name of the offset time zone chosen. Only visible if you pass a value into TimeZoneID request parameter.
OffsetClickTime String The date & time of the transaction in your chosen time zone. Only visible if you pass a value into TimeZoneID request parameter.
OffsetCompleted String  The date & time of the last click prior to the transaction in your chosen time zone. Only visible if you pass a value into TimeZoneID request parameter.
OriginalTimeZone String The original Time zone used for TransactionTime, ClickTime & Completed.
PaymentStatus String Indicates the payment stats of the Transaction.

ProductFeeds / GetProducts

View code samples

Request URI

https://api.omgpm.com/network/OMGNetworkApi.svc/v1.2.1/ProductFeeds/GetProducts?Key={Key}&Sig={Signature}&SigData={SignatureData}&AID={AID}&AgencyID={AgencyID}&MID={MID}&Keyword={Keyword}&MinPrice={MinPrice}&MaxPrice={MaxPrice}&Currency={Currency}&Brand={Brand}&DiscountedOnly={DiscountedOnly}&MPN={MPN}&ProductSKU={ProductSKU}&FeedID={FeedID}&NoOfRecords=50&output={xml or json}

Note: The Response will return a maximum of 50 records at a time. If you require more records consider downloading the full feed.

Request Parameters

Request Parameter Data Type Required Description
AgencyID Integer Yes The ID of the OMG Agency you are accessing. More info.
AID Integer Yes Your Unique AffiliateID
MID Integer No A MerchantID you want to filter the results by
NumberOfRecords Integer Yes The number of records to return. Max: 50.
Keyword String Yes A search string. eg. “Samsung Galaxy Note”
MinPrice Float No The minimum product search price
MaxPrice Float No The maximum product search price
Currency String Yes The 3 digit ISO standard currency code. eg. GBP, USD, INR, SGD, AUD, etc
ProductSKU String No The unique product identifier to return a specific product
DiscountedOnly Boolean No Indicates whether to return Discounted products only. Default = false

Response Parameters

Response Parameter Data Type Description
Brand String The brand of the producrt
CategoryName String The category of the product
CategoryPathAsString String The full category path of the product
Colour String The colour of the product
Custom1 String A custom value for this feed
Custom2 String A custom value for this feed
Custom3 String A custom value for this feed
Custom4 String A custom value for this feed
Custom5 String A custom value for this feed
DiscountedPrice Float The discounted sale price
Location String The location of the product or offer
MID String OMG MerchantID
MPN String Manufacturer Part Number
PID String A custom value for this feed
ProductDescription String A description for the product
ProductID String OMG’s unique product indentifier
ProductLargeImageURL String URL for a large image of the product
ProductMediumImageURL String URL for a medium image of the product
ProductSmallImageURL String URL for a small image of the product
ProductName String The name/title of the product
ProductPrice Float The current sale price
ProductPriceCurrency String 3 digit ISO standard currency code. eg. GBP, INR
ProductSKU String The merchant’s unique product identifier
ProductURL String The OMG tracked deeplink for the product
StockAvailability String Indicates whether the item is in stock
WasPrice Float The previous sale price

ProductFeeds / GetMerchants

Request URI

http://api.omgpm.com/network/OMGNetworkApi.svc/v1.2.1/ProductFeeds/GetMerchants?Key={Key}&Sig={Signature}&SigData={SignatureData}&AID={AID}&AgencyID={AgencyID}&output={xml or json}

Request Parameters

Request Parameter Data Type Required Description
AgencyID Integer Yes The ID of the OMG Agency you are accessing. More info.
AID Integer Yes Your unique AffiliateID

Response Parameters

Response Parameter Data Type Description
FeedID Integer  The Feed identifier
MerchantID Integer  The ID of the Merchant
MerchantName String  Name of the Merchant
ProductCount Integer  No. of products in the feed.

GetVoucherCodes

Request URI

http://api.omgpm.com/network/OMGNetworkApi.svc/v1.2.1/Affiliate/GetVoucherCodes?Key={Key}&Sig={Signature}&SigData={SignatureData}&AID={AID}&AgencyID={AgencyID}&Status={Status}&StartDate={StartDate}&EndDate={EndDate}&CategoryName={CategoryName}&output={xml or json}

Request Parameters

Request Parameter Data Type Required Description
AgencyID Integer Yes The ID of the OMG Agency you are accessing. More info.
AID Integer Yes Your unique AffiliateID
Status String Yes The status of the voucher/coupon to return. Value should be either Active or Expired.
StartDate Date Yes The starting date from which to search for valid voucher/coupons dd/mm/yyyy
EndDate Date Yes The end date from which to search for valid voucher/coupons dd/mm/yyyy
CategoryName String No The category name of voucher/coupon to return

Response Parameters

Response Parameter Data Type Description
ActivationDate DateTime Date on which the offer stats
Addedon DateTime Date the offer was added to the Optimise Feed
CategoryName String Name of the Merchant
Code String No. of products in the feed.
Description String Further information about the offer
Discount String The discount amount for the offer (if available)
Merchant String The merchant for which the offer applies
Product String The product for which the offer applies
Status String The status of the offer
Title String A title for the offer
TrackingURL String The tracking URL including deeplink (if available) for the offer