Promotional Properties API

Promotional Properties API Reference

Endpoint: https://accounts.api.cj.com/graphql

The Promotional Properties API is a GraphQL API used to view and manage promotional properties (PIDs).


Publisher vs. Advertiser Access

This API serves both publishers and advertisers, but the level of access differs:

OperationPublisherAdvertiser
Query promotional properties
Create promotional properties
Update promotional properties

Publishers have full read and write access. They can query their own promotional properties and use mutations to create or update them. This is useful for publishers with a high number of PIDs that require automation to manage. Publishers with a small number of PIDs are encouraged to manage them manually using the PID management interface.

Advertisers have read-only access. They can query publishers' promotional properties to see where their publishers are posting links or to assess a publisher's promotional method. Mutations are not available to advertisers.


Code Samples

Sample Query

{
  promotionalProperties(publisherId: 99999, status: ACTIVE, limit: 2, offset: 0) {
    totalCount
    resultList {
      id
      publisherId
      name
      description
      status
      isPrimary
      createdAt
      updatedAt
      tags {
        name
      }
      promotionalModels {
        type
        description
        isPrimary
      }
      propertyTypeDetails {
        type
        ... on PromotionalPropertyWebsiteDetails {
          websiteUrl
        }
        ... on PromotionalPropertyBrowserExtensionDetails {
          browserExtensionName
          browserExtensionDescription
          browserExtensionDownloadInformation {
            browserExtensionBrowser
            browserExtensionDownloadLink
          }
        }
        ... on PromotionalPropertyEmailDetails {
          emailAddress
          emailOpenRate
          emailMailingListSize
        }
        ... on PromotionalPropertyMobileAppDetails {
          mobileAppName
          mobileAppDownloadInformation {
            mobileAppPlatform
            mobileAppDownloadLink
          }
        }
        ... on PromotionalPropertyPaidSearchDetails {
          paidSearchEngineDescription
        }
        ... on PromotionalPropertySocialMediaDetails {
          socialMediaHandle
          socialMediaPlatform
        }
        ... on PromotionalPropertyPaidDisplayAdsDetails {
          paidDisplayAdsDescription
        }
        ... on PromotionalPropertyServicesAndToolsDetails {
          servicesAndToolsMarketingSiteUrl
        }
        ... on PromotionalPropertyOtherDetails {
          otherDescription
        }
      }
    }
  }
}

Sample curl Request

curl -H "Authorization: Bearer <your-personal-access-token>" \
  -H "Content-Type: application/json" \
  -d '{"query": "{promotionalProperties(publisherId: 99999, status: ACTIVE, limit: 2, offset: 0) {totalCount resultList {id publisherId name description status isPrimary createdAt updatedAt tags {name} promotionalModels {type description isPrimary} propertyTypeDetails {type ... on PromotionalPropertyWebsiteDetails {websiteUrl} ... on PromotionalPropertyBrowserExtensionDetails {browserExtensionName browserExtensionDescription browserExtensionDownloadInformation {browserExtensionBrowser browserExtensionDownloadLink}} ... on PromotionalPropertyEmailDetails {emailAddress emailOpenRate emailMailingListSize} ... on PromotionalPropertyMobileAppDetails {mobileAppName mobileAppDownloadInformation {mobileAppPlatform mobileAppDownloadLink}} ... on PromotionalPropertyPaidSearchDetails {paidSearchEngineDescription} ... on PromotionalPropertySocialMediaDetails {socialMediaHandle socialMediaPlatform} ... on PromotionalPropertyPaidDisplayAdsDetails {paidDisplayAdsDescription} ... on PromotionalPropertyServicesAndToolsDetails {servicesAndToolsMarketingSiteUrl} ... on PromotionalPropertyOtherDetails {otherDescription}}}}}"}' \
  -XPOST https://accounts.api.cj.com/graphql

Sample Response

{
  "data": {
    "promotionalProperties": {
      "totalCount": 97,
      "resultList": [
        {
          "id": "100",
          "publisherId": "99999",
          "name": "sample property name",
          "description": "sample property description",
          "status": "ACTIVE",
          "isPrimary": true,
          "createdAt": "2020-07-09T18:47:50.430Z",
          "updatedAt": "2020-07-21T00:26:59.501Z",
          "tags": [
            { "name": "tag2" },
            { "name": "tag1" }
          ],
          "promotionalModels": [
            { "type": "COUPON_DEAL", "description": null, "isPrimary": false },
            { "type": "CONTENT_BLOG_MEDIA", "description": null, "isPrimary": true }
          ],
          "propertyTypeDetails": {
            "type": "WEBSITE",
            "websiteUrl": "https://cj.com"
          }
        },
        {
          "id": "101",
          "publisherId": "99999",
          "name": "sample instagram property",
          "description": "",
          "status": "ACTIVE",
          "isPrimary": false,
          "createdAt": "2020-07-09T20:59:15.097Z",
          "updatedAt": "2020-07-21T00:28:30.248Z",
          "tags": [],
          "promotionalModels": [
            { "type": "INFLUENCER", "description": null, "isPrimary": true }
          ],
          "propertyTypeDetails": {
            "type": "SOCIAL_MEDIA",
            "socialMediaHandle": "@sample-property",
            "socialMediaPlatform": "INSTAGRAM"
          }
        }
      ]
    }
  }
}

Sample Mutation — Create a New Promotional Property

Publishers only. Advertisers do not have access to mutations.

mutation {
  createPromotionalProperty(
    input: {
      name: "test website"
      description: "test description."
      publisherId: 99999
      propertyTypeDetails: {
        type: WEBSITE
        websiteUrl: "https://cj.com"
      }
      isPrimary: false
      status: ACTIVE
      promotionalModels: [
        { type: CONTENT_BLOG_MEDIA, isPrimary: false }
        { type: COUPON_DEAL, isPrimary: true }
      ]
      tags: [{ name: "myTag" }, { name: "mySecondTag" }]
    }
  ) {
    id
  }
}

Sample curl Request

curl -H "Authorization: Bearer <your-personal-access-token>" \
  -H "Content-Type: application/json" \
  -d '{"operationName":null,"variables":{},"query":"mutation {createPromotionalProperty(input: {name: \"test website\", description: \"test description\", publisherId: 99999, propertyTypeDetails: {type: WEBSITE, websiteUrl: \"https://cj.com\"}, isPrimary: false, status: ACTIVE, promotionalModels: [{type: CONTENT_BLOG_MEDIA, isPrimary: false}, {type: COUPON_DEAL, isPrimary: true}], tags: [{name: \"myTag\"}, {name: \"mySecondTag\"}]}) {id}}"}' \
  -XPOST https://accounts.api.cj.com/graphql

Sample Response

{
  "data": {
    "createPromotionalProperty": {
      "id": "103"
    }
  }
}

Sample Mutation — Update an Existing Promotional Property

Publishers only. Advertisers do not have access to mutations.

mutation {
  updatePromotionalProperty(
    input: {
      id: 103
      name: "updated name"
      description: "updated description"
      publisherId: 99999
      status: ACTIVE
      isPrimary: false
      tags: [{ name: "tag 1" }]
      promotionalModels: [
        { type: INFLUENCER, isPrimary: true }
        { type: CONTENT_BLOG_MEDIA, isPrimary: false }
      ]
      propertyTypeDetails: {
        type: SOCIAL_MEDIA
        socialMediaHandle: "@sampleSocialHandle"
        socialMediaPlatform: INSTAGRAM
      }
    }
  ) {
    id
    name
  }
}

Sample Response

{
  "data": {
    "updatePromotionalProperty": {
      "id": "103",
      "name": "updated name"
    }
  }
}

Errors

ErrorExampleCauseFix
Invalid authorization token"message": "Invalid authorization token"The provided auth token is not valid.Provide a valid Personal Access Token.
Missing subfields"Field \"propertyType\" of type \"PropertyType!\" must have a selection of subfields."Required subfields for a field were not included in the query.Query all required subfields.
Parse error"Cannot query field \"propertyTyipe\" on type \"PromotionalProperty\"."An invalid or misspelled field was included in the query.Check spelling and validity of all queried fields.

Objects

PromotionalProperty

A single promotional property (PID) belonging to a publisher.

FieldTypeDescription
createdAtISODateTimeTimestamp of when the promotional property was created.
descriptionStringA text description of the promotional property.
idID!The promotional property ID.
isPrimaryBoolean!Indicates whether this is the primary promotional property for this CID.
nameString!Name of the promotional property.
promotionalModels[PromotionalModel!]!Promotional models associated with this property.
propertyTypeDetailsPromotionalPropertyTypeDetails!Type-specific details for this property. Uses inline fragments — see Property Type Details.
publisherIdID!The publisher's CID.
statusPromotionalPropertyStatus!Current status of the property.
tags[PromotionalPropertyTag!]!Tags added to this property.
updatedAtISODateTimeTimestamp of when the property was last edited.

PromotionalProperties

Wrapper object returned by the promotionalProperties query.

FieldTypeDescription
resultList[PromotionalProperty!]!List of promotional properties matching the query.
totalCountInt!Total count of promotional properties matching the query, regardless of limit.

PromotionalModel

Describes the promotional model associated with a promotional property.

FieldTypeDescription
descriptionStringText description of the promotional model. Only applicable for OTHER type properties.
isPrimaryBoolean!Indicates whether this is the primary promotional model for the property. Used primarily for reporting.
typePromotionalModelType!The kind of promotional model. See PromotionalModelType enum.

PromotionalPropertyTag

An optional tag added to a promotional property. Tags can be keywords, categories, or other descriptors — they are searchable and visible to advertisers.

FieldTypeDescription
nameString!The tag value.

DistinctPropertyValues

Returns the unique promotional models and property types in use across a publisher's properties.

FieldTypeDescription
promotionalModels[String!]!List of all promotional models the publisher is using.
propertyTypes[String!]!List of all property types the publisher is using.

BrowserExtensionDownloadInformation

Browser extension type properties may have multiple supported browsers. Each entry represents one browser and its download link.

FieldTypeDescription
browserExtensionBrowserBrowserType!The browser the extension runs on. See BrowserType enum.
browserExtensionDownloadLinkString!The URL where end users can download the extension for that browser.

MobileAppDownloadInformation

Mobile app type properties may support multiple platforms. Each entry represents one platform and its download link.

FieldTypeDescription
mobileAppDownloadLinkString!The URL where end users can download the app for that platform.
mobileAppPlatformMobileAppPlatform!The platform the app is built for. See MobileAppPlatform enum.

Interface: PromotionalPropertyTypeDetails

All propertyTypeDetails objects implement this interface. Use inline fragments (... on TypeName) in your query to access type-specific fields. The type field is always present and identifies which concrete type was returned.

Implementations:

Typetype ValueType-Specific Fields
PromotionalPropertyWebsiteDetailsWEBSITEwebsiteUrl
PromotionalPropertyBrowserExtensionDetailsBROWSER_EXTENSIONbrowserExtensionName, browserExtensionDescription, browserExtensionDownloadInformation, browserExtensionTrackingConsentType
PromotionalPropertyEmailDetailsEMAILemailAddress, emailOpenRate, emailMailingListSize
PromotionalPropertyMobileAppDetailsMOBILE_APPmobileAppName, mobileAppDownloadInformation
PromotionalPropertyPaidSearchDetailsPAID_SEARCH_ENGINEpaidSearchEngineDescription
PromotionalPropertySocialMediaDetailsSOCIAL_MEDIAsocialMediaHandle, socialMediaPlatform
PromotionalPropertyPaidDisplayAdsDetailsPAID_DISPLAY_ADSpaidDisplayAdsDescription
PromotionalPropertyServicesAndToolsDetailsSERVICES_AND_TOOLSservicesAndToolsMarketingSiteUrl
PromotionalPropertyOtherDetailsOTHERotherDescription

PromotionalPropertyWebsiteDetails

FieldTypeDescription
typePromotionalPropertyType!Always WEBSITE.
websiteUrlString!The website URL.

PromotionalPropertyBrowserExtensionDetails

FieldTypeDescription
browserExtensionDescriptionStringDescription of how the browser extension functions and how customers engage with it.
browserExtensionDownloadInformation[BrowserExtensionDownloadInformation!]!Download links and supported browsers.
browserExtensionNameString!The name of the extension as it appears in the download store.
browserExtensionTrackingConsentTypeTrackingConsentTypeIndicates whether the extension operates on affirmative click only or automatic redirect with affirmative click on request.
typePromotionalPropertyType!Always BROWSER_EXTENSION.

PromotionalPropertyEmailDetails

FieldTypeDescription
emailAddressString!The send-from address for the email newsletter campaign.
emailMailingListSizeString!Approximate number of unique subscribers.
emailOpenRateString!Approximate open rate for email newsletters.
typePromotionalPropertyType!Always EMAIL.

PromotionalPropertyMobileAppDetails

FieldTypeDescription
mobileAppDownloadInformation[MobileAppDownloadInformation!]!Download links and supported platforms.
mobileAppNameString!The name of the app as it appears in the app store.
typePromotionalPropertyType!Always MOBILE_APP.

PromotionalPropertyPaidSearchDetails

FieldTypeDescription
paidSearchEngineDescriptionString!The platforms where search ads are purchased and the click-through rates achieved.
typePromotionalPropertyType!Always PAID_SEARCH_ENGINE.

PromotionalPropertySocialMediaDetails

FieldTypeDescription
socialMediaHandleString!The link or handle for the social media account.
socialMediaPlatformSocialPlatform!The social platform. See SocialPlatform enum.
typePromotionalPropertyType!Always SOCIAL_MEDIA.

PromotionalPropertyPaidDisplayAdsDetails

FieldTypeDescription
paidDisplayAdsDescriptionString!The platforms where display ads are purchased and the click-through rates achieved.
typePromotionalPropertyType!Always PAID_DISPLAY_ADS.

PromotionalPropertyServicesAndToolsDetails

FieldTypeDescription
servicesAndToolsMarketingSiteUrlString!Marketing site URL for the services and tools property.
typePromotionalPropertyType!Always SERVICES_AND_TOOLS.

PromotionalPropertyOtherDetails

FieldTypeDescription
otherDescriptionString!A text description of the promotional property type.
typePromotionalPropertyType!Always OTHER.

Enums

BrowserType

Value
CHROME
FIREFOX
SAFARI
OPERA

MobileAppPlatform

Value
IOS
ANDROID

PromotionalModelType

Describes the kind of promotional model for a property. Each property may have more than one model, but one must be designated as primary.

ValueDescription
CONTENT_BLOG_MEDIACustomers read original content or articles about topics that interest them.
COUPON_DEALCustomers come to discover coupons, vouchers, or discounts.
LOYALTY_CASH_BACKCustomers receive cash back as a percentage of their purchase.
LOYALTY_NON_CASH_REWARDSCustomers receive non-cash rewards such as points, airline miles, or charity donations.
LOYALTY_CLOSED_USER_GROUPA membership service where customers must have an exclusive login to access benefits (e.g. employee benefits, credit card rewards, airline rewards malls).
TRADEMARK_BIDDINGSearch engine ads are purchased by bidding on advertiser brand names; customers are directed to the publisher's own website.
INFLUENCERCustomers follow a personality or figure they are interested in.
PAY_PER_CALLCall tracking is used to drive customer transactions over the telephone.
PRODUCT_COMPARISON_REVIEWS_DISCOVERYLinks to specific products that customers can browse, compare, or search for.
OTHERNone of the above — a brief description of the promotional method should be provided.

PromotionalPropertyStatus

Value
ACTIVE
ARCHIVED
TERMINATED

PromotionalPropertyType

Value
WEBSITE
SOCIAL_MEDIA
EMAIL
MOBILE_APP
BROWSER_EXTENSION
SERVICES_AND_TOOLS
PAID_SEARCH_ENGINE
PAID_DISPLAY_ADS
OTHER

SocialPlatform

Value
INSTAGRAM
FACEBOOK
YOUTUBE
TWITTER
PINTEREST
TWITCH
WHATSAPP
SNAPCHAT
OTHER

TrackingConsentType

Value
AFFIRMATIVE
AUTOMATIC

Scalars

NameDescription
BooleanRepresents true or false.
FloatSigned double-precision fractional values (IEEE 754).
IDUnique identifier. Appears as a String in JSON; accepts string or integer input.
ISODateTimeISO 8601 datetime. e.g. 1999-12-31T23:59:59Z
IntNon-fractional signed whole numeric values. Range: -(2^31) to 2^31 - 1.
StringTextual data represented as UTF-8 character sequences.
UploadRepresents a file upload.