Overview

Partner API

Introduction

We offer this set of APIs in order to provide you access to all the functionalities that can be used through the Partner Interface and the Agent Backoffice.

This API originated from our own Partner Interface application (partners.aklamio.com) but is open to be used by any partner in order to automate common tasks like creating, confirming or rejecting conversions for referral and cashback campaigns.

Authentication

In order to maintain an authentication state the Aklamio Partner API uses JSON Web Tokens. A token can be obtained using the sign in endpoint with a username and password:

            curl -i -X POST \
-H 'Content-Type: application/json' \
-H 'Partner: Partner' \
-d '{"email":"${account_manager_email}","password":"${account_manager_password}"}' \
https://api.aklamio.com/api/v2/partners/account_managers/sign_in
          

JWT can be found in the Headers response:

            ...
authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJhY2NvdW50X21hbmFnZXJfZW1haWwiOiJzdGVm ...
...
          

The JWTs returned by the API expire after 24 hours. If you need a longer lasting token for your application, please contact your Partner Success Manager.

Include the JWT as a HTTP Authorization header in your requests. It's mandatory to add a custom 'Partner' HTTP header to the request, with an arbitrary string 'Partner' identifying you as a client. The Partner API makes the functionality of the Aklamio Partner interface available at a single GraphQL endpoint:

            curl -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ${JWT}' \
-H 'Partner: Partner' \
-d '
{
  promotion {
    id
    title
  }
}
'
https://api.aklamio.com/api/v2/partners/graphql
          

Queries and mutations

The Aklamio GraphQL API can be used to perform:

  • Queries for data retrieval.
  • Mutations for creating and updating data.

Queries

Aklamio GraphQL Schema outlines which objects and fields are available for clients to query and their corresponding data types.

Example
            query {
  promotion {
    id
    title
    uid
    url
    balance
    currency
    backoffice {
      allowCashback
      allowCashbackCode
      allowEmailAndCode
      allowFollowerEmail
      allowInvite
      allowOnlyCode
      allowOnlyEmail
      category {
        label
        legend
      }
      format
      hasIntro
      id
      intro
      inviteEmail {
        label
        legend
      }
      locale
      showSupportDocument
      supportDocumentLabel
      supportDocumentUrl
      supportPhoneNumber
      title
    }
  }
}
          

Mutations

Mutations make changes to data. We can create or update new records.

Mutations have:

  • Inputs. For example, arguments, such as which conversions you'd like to confirm.
  • Return statements. That is, what you'd like to get back when it's successful.

Creation mutations

Example
            mutation {
  createConversion(
    additionalFields: {
      shop_id: "123456"
    },
    category: "category_1",
    couponCode: "12345678",
    followerEmail: "follower@example.com",
    isCashback: false,
    orderId: "205ca310-5d04-41db-a525-c451761bb5e1",
    orderOption: "cable",
    recommenderEmail: "recommender@example.com"
  ) {
    conversion {
      id
    }
  }
}
          

Update mutations

Example
            mutation {
  confirmConversions(orderIds: ["987654"]) {
    conversions {
      id
      orderId
      state
    }
  }
}
          

When managing multiple promotions, some queries and mutations require a permalink input of the promotion which is being targeted.

It is recommended to include this input even when managing a single promotion, as no changes will be required in the future if more promotions are created.

Query Example
            query {
  promotions(permalinks: ["promotion_permalink", "promotion2_permalink")] {
    id
    title
  }
}
          
Mutation Example
            mutation {
  confirmSalesRequests(
    orderIds: ["1234", "9876"],
    promotionPermalink: "promotion_permalink"
  ) {
    salesRequests {
      id
      state
    }
  }
}
          

GraphQL API Resources

This documentation is self-generated based on Aklamio current GraphQL schema.

The API can be explored interactively using the GraphiQL IDE.

Each table below documents a GraphQL type. Types match loosely to models, but not all fields and methods on a model are available via GraphQL.

Object types

Object types represent the resources that Aklamio’s GraphQL API can return. They contain fields. Each field has its own type, which will either be one of the basic GraphQL scalar types (e.g.: String or Boolean) or other object types.

For more information, see Object Types and Fields on graphql.org.

AccountingEntriesPage

Represents a page of accounting entries

Field
Type
Description
filteredBalance
BigInt
Filtered balance
filteredInflow
BigInt
Filtered inflow
filteredOutflow
BigInt
Filtered outflow
pages
Int
Total number of pages
rows
AccountingEntriesRow
Rows in the page
totalEntries
BigInt
Total number of accounting entries

AccountingEntriesRow

Represents a pagination unit containing one or many accounting entries

Field
Type
Description
date
ISO8601Date
Row date (transferred_at.to_date for grouped conversions)
entries
AccountingEntry
Entries in this row
size
Int
Number of entries in this row
totalAmount
Int
Total amount of the entries in this row
type
String
Type of entries in this row

AccountingEntry

Represents an Accounting Entry

Field
Type
Description
amount
RewardCosts
Amount of the accounting entry in cents
orderId
String
Order ID of the accounting entry
promotion
Promotion
Promotion of the accounting entry
salesChannel
String
Sales channel of the accounting entry
type
String
Type of the accounting entry

AdditionalField

Represents a backoffice configuration for the additional field

Field
Type
Description
label
String
Label for the backoffice additional field
legend
String
Legend for the backoffice additional field
name
String
Name of the backoffice additional field
required
Boolean
Defines whether this field required or not
tabs
String
Tabs where to show backoffice additional field

Advertiser

Represents an advertiser configuration

Field
Type
Description
id
ID
ID of the advertiser
name
String
Name of the advertiser
url
String
URL of the advertiser

Backoffice

Represents an agent backoffice configuration

Field
Type
Description
addItem
String
Add purchased products
additionalFields
AdditionalField
Backoffice configuration for additional fields
allowCashback
Boolean
Indicates if cashback is allowed
allowCashbackCode
Boolean
Indicates if cashback code is allowed
allowEmailAndCode
Boolean
Indicates if email and code are allowed
allowFollowerEmail
Boolean
Indicates if the follower email is allowed
allowInvite
Boolean
Indicates if the user invitation to the referral program is allowed
allowOnlyCode
Boolean
Indicates if only code is allowed
allowOnlyEmail
Boolean
Indicates if only email is allowed
backgroundColor
String
Color of backoffice background
categories
String
The list of the product categories
category
Category
Backoffice configuration for the category field
customErrorMessages
FieldError
Backoffice configuration for the custom error messages
followerEmailCashback
FollowerEmailCashback
Backoffice configuration for the follower email cashback field
followerEmailReferral
FollowerEmailReferral
Backoffice configuration for the follower email referral field
format
String
Validation of the order ID format. It uses regular expressions to define what a correct order ID should look like
hasIntro
Boolean
Indicates if the agent backoffice has an introduction text
hideAddItem
Boolean
Indicates if the add item field is shown or not.
hideItemQuantity
Boolean
Indicates if the item quantity field is shown or not.
id
ID
ID of the agent backoffice
intro
String
Introduction text showed above the form
inviteEmail
InviteEmail
Backoffice configuration for the invite email field
inviteIntro
String
Introduction text showed at the invite form
isActive
Boolean
Indicates if the agent backoffice is configured
isTest
Boolean
Indicates if the backoffice is in test mode
isValidOrderId
Boolean
Validate order ID before creating a conversion
isValidOrderIdForSalesRequest
Boolean
Validate order ID before creating a sales request from backoffice
isValidRewardCode
Boolean
Validate reward code before creating a conversion
itemCategory
ItemCategory
Product category
itemName
ItemName
Product name
itemPrice
ItemPrice
Product price
itemQuantity
String
Label for quantity of purchased product
itemSku
ItemSKU
Product SKU
locale
String
Locale of the promotion that has been set in the agent backoffice, otherwise it will be `de`
metricsOrderStatusForAllAgents
Boolean
Backoffice configuration to enable order status metric to show all agents orders
orderId
OrderId
Backoffice configuration for the order id field
orderOption
OrderOption
Backoffice configuration for the order options field
orderOptions
String
The list of order options
productItemTitle
String
Header of individual purchased product
productListTitle
String
Header of purchased products section
referrerEmail
ReferrerEmail
Backoffice configuration for the referrer email field
requiresCategory
Boolean
Indicated if the category is required
requiresOrderOption
Boolean
Indicates if the order option is required
rewardCodeCashback
RewardCodeCashback
Backoffice configuration for the reward code cashback field
rewardCodeReferral
RewardCodeReferral
Backoffice configuration for the reward code referral field
showItemSku
Boolean
Indicates if the item SKU field is shown or not.
showMetricsAgentsStats
Boolean
Backoffice configuration to show metrics of agent stats
showMetricsOrderStatus
Boolean
Backoffice configuration to show metrics for order status
showReferralTab
Boolean
Indicates if the refferal tab is shown or not.
showSupportDocument
Boolean
Indicates if the support document link is shown
supportDocumentLabel
String
Label of the link to download the support document
supportDocumentUrl
String
File URL of the support document
supportEmail
String
Email for support requests
supportPhoneNumber
String
Phone number for customer support service
tabTitleCashback
String
Custom title for 'Cashback' tab
tabTitleInvite
String
Tab Title for invite form
tabTitleReferral
String
Custom title for 'Referral' tab
textColor
String
Color of backoffice text
title
String
Title of the agent backoffice

Backoffices

Backoffices associated to a promotion, keyed by sales channel.

Field
Type
Description
hotline
Backoffice
Backoffice configuration for the hotline sales channel.
offline
Backoffice
Backoffice configuration for the offline sales channel.
online
Backoffice
Backoffice configuration for the online sales channel.

BoAgentMetrics

Represents various metrics for a backoffice agent

Field
Type
Description
invitesConversions
MetricResult
Metrics for invites conversions
invitesSent
MetricResult
Metrics for invites sent
salesSubmitted
MetricResult
Metrics for sales submitted

BoOrderMetrics

Represents an order for backoffice metrics

Field
Type
Description
createdAt
ISO8601DateTime
Timestamp when sales request was created
email
String
Email of the referral user
orderId
String
ID of the order
state
State
State of the sales request. Possible values: 'open', 'confirmed', 'rejected'.
updatedAt
ISO8601DateTime
Timestamp when sales request was updated

BoOrdersListMetrics

Represents a list of orders for backoffice metrics

Field
Type
Description
orders
BoOrderMetrics
List of sales requests

Brand

Represents a promotion information with related advertiser and conversions

Field
Type
Description
accountingEntriesPage
AccountingEntriesPage
Accounting entries for the brand
apiKey
String
Api key for server to server integration
apiKeyGeneratedOn
String
Api key generation time
balance
Int
Balance of the brand
conditionalDashboards
ConditionalDashboards
Conditional dashboards for the brand
currency
String
Currency of the brand
emailTemplates
EmailTemplate
Email templates for the brand
estimatedRewardsInNextDays
Int
Estimated reward costs for the next X days
formatterFields
JSON
Formatter fields for all active support request formatters of the promotions in the brand.
inflowInLastDays
Int
Inflow of the brand
logoUrl
String
Link to the logo of the brand
name
String
Name of the brand
outflowInLastDays
Int
Outflow of the brand
promotions
Promotion
Promotions of the brand
salesRequests
SalesRequest
Sales Requests for the promotion
salesRequestsCount
Int
Sales requests count
supportRequests
SupportRequest
Support requests for all promotions of the brand.
supportRequestsCount
Int
Support Requests count
supportedLanguages
String
Supported languages for the brand (first element is default)
uid
String
Non sequential identifier for brand
website
String
Official webpage of brand

Campaign

Represents a campaign attached to a promotion

Field
Type
Description
active
Boolean
Whether this is the currently active campaign
activeRulePlan
RulePlan
Active rule plan for this campaign (or latest if not active)
description
String
Description of the campaign
emailTemplates
EmailTemplate
Email templates for the campaign
endDate
ISO8601DateTime
Campaign end date
followingCampaign
Campaign
Following campaign
gap
Boolean
Whether it is a gap campaign
name
String
Name of the campaign
previousCampaign
Campaign
Previous campaign
resumesPenultimateCampaign
Boolean
Whether this campaign resumes the penultimate campaign
rulePlans
RulePlan
Rule plans
startDate
ISO8601DateTime
Campaign start date
uid
String
Unique identifier of the campaign

Category

Represents a backoffice configuration for the category field

Field
Type
Description
label
String
Title above the category field
legend
String
Description below the category field

Cause

Represents cause object

Field
Type
Description
description
String
Description of the cause
included
Boolean
Indicates if promotion already has cause not
isDefault
Boolean
Indicates if the cause is set as default for the promotion
location
String
Location of the cause
logoUrl
String
Link to the logo of the cause
name
String
Name of cause
providerCauseId
String
Provider ID for cause
url
String
URL to website of cause

CauseCategory

Represents cause category object

Field
Type
Description
code
String
Code of the category
name
String
Name of the category

CausesWrapper

Wrapper object to bring more details around list of causes like count, page and per page

Field
Type
Description
categories
CauseCategory
List of cause categories
count
Int
Shows how many causes are there in total
data
Cause
List of causes for the current page
page
Int
Shows the page of the paginated causes list response
perPage
Int
Indicates how many causes per page was used to generate this response

ConditionTemplate

Represents a template for condition in reward rules

Field
Type
Description
acceptedValues
JSON
Predefined values format for condition templates
conditionScope
ConditionScope
A scope for condition. Can be `ITEM` or `BASKET`
description
String
Detailed description of the condition
expression
String
Condition for reward rule
id
ID
ID of the condition template
isDefault
Boolean
Is this condition for default reward or not

ConditionalDashboards

Represents conditional dashboards object

Field
Type
Description
agentActivity
Boolean
Indicates if agent activity dash is enabled
agents
Boolean
Indicates if agents dash is enabled
donations
Boolean
Indications if donations dash is enabled
linkApi
Boolean
Indicates if link api dash is enabled
trees
Boolean
Indications if trees dash is enabled
vouchers
Boolean
Indicates if vouchers dash is enabled

ConfirmPayload

Autogenerated return type of Confirm

Field
Type
Description
conversions
Conversion
A list of conversions
errors
String
Errors

ConfirmSalesRequestPayload

Autogenerated return type of ConfirmSalesRequest

Field
Type
Description
errors
String
Errors
salesRequest
SalesRequest
Confirmed sales request

ConfirmSalesRequestsPayload

Autogenerated return type of ConfirmSalesRequests

Field
Type
Description
errors
String
Errors
salesRequests
SalesRequest
A list of the sales requests

Conversion

Represents a conversion information

Field
Type
Description
activatedParam
String
Value of the param that triggered the rule
additionalFields
JSON
Additional fields
comment
String
Comment for conversion
commissionCategory
String
Commission category
id
ID
ID of the conversion
networkCommission
Int
Network commission
orderId
String
Order ID
promotion
Promotion
Promotion associated with the conversion
requestType
String
Describe whether it's Cashback or Follow
source
String
Source
state
String
State of conversion
trackedAtIso
String
Time when conversion was tracked
trackingSystem
String
Tracking system used to create the conversion

Cost

Represents a cost information

Field
Type
Description
aklamioFees
Int
Aklamio fees in cents
follower
Int
Reward value for follower in cents
recommender
Int
Reward value for recommender in cents
total
Int
Total amount (Reward value for end-users + aklamio fees) in cents

CreateBackofficeSalesRequestPayload

Autogenerated return type of CreateBackofficeSalesRequest

Field
Type
Description
errors
String
Errors
salesRequest
SalesRequest
Created Sales Request

CreateCampaignPayload

Autogenerated return type of CreateCampaign

Field
Type
Description
duplicateCampaign
Campaign
Campaign following the newly created campaign (dup of previous)
errors
String
Errors
newCampaign
Campaign
Newly created campaign

CreateConversionPayload

Autogenerated return type of CreateConversion

Field
Type
Description
conversion
Conversion
Conversion
errors
String
Errors

CreatePromotionCausesPayload

Autogenerated return type of CreatePromotionCauses

Field
Type
Description
errors
String
Errors
message
String
response message

CreateRulePlanPayload

Autogenerated return type of CreateRulePlan

Field
Type
Description
errors
String
Errors
rulePlan
RulePlan
Rule plan

CreateSalesRequestPayload

Autogenerated return type of CreateSalesRequest

Field
Type
Description
errors
String
Errors
salesRequest
SalesRequest
Created Sales Request

CreateUserPayload

Autogenerated return type of CreateUser

Field
Type
Description
errors
String
Errors
user
User
User

Customer

Represents customer object

Field
Type
Description
name
String
Name of the customer
uid
String
UID of the customer

DataflowCheckpoint

Represents status info of individual checkpoint

Field
Type
Description
lastEventReceivedOn
String
Indicates the timestamp of last event process time
payload
JSON
Request payload recieved from Kafka
recentEventsDetails
RequestLog
Status of the specific service
status
String
Status of the specific service

DestroyCampaignPayload

Autogenerated return type of DestroyCampaign

Field
Type
Description
errors
String
Errors
success
Boolean
Whether the campaign was destroyed

EmailTemplate

Represents an email template

Field
Type
Description
config
JSON
Configuration of the email template
createdAt
ISO8601DateTime
When the email template was created
entityId
ID
ID of the associated entity (Brand or Campaign)
entityType
String
Type of the associated entity (Brand or Campaign)
html
JSON
HTML content of the email template
id
ID
ID of the email template
isActive
Boolean
Whether the email template is active
subject
JSON
Subject of the email template
type
EmailTemplateType
Type of the email template
updatedAt
ISO8601DateTime
When the email template was last updated
version
Int
Version of the email template

EmailTemplateType

Represents an email template type

Field
Type
Description
category
String
Category of the email template type
description
JSON
Description of the email template type
id
ID
ID of the email template type
mergeTags
JSON
Merge tags available for this template type
name
JSON
Name of the email template type
trigger
String
Trigger identifier for the email template type

FeatureFlag

Information about growthbook features

Field
Type
Description
on
Boolean
Indicates whether the feature flag is on or not

FieldError

Represents a backoffice configuration for the field error

Field
Type
Description
attribute
String
Attribute of the backoffice custom field
message
String
Error message of the backoffice custom field
name
String
Error type of the backoffice custom field

FollowerEmailCashback

Represents a backoffice configuration for the follower email cashback field

Field
Type
Description
label
String
Title above the follower email cashback field
legend
String
Description below the follower email cashback field

FollowerEmailReferral

Represents a backoffice configuration for the follower email referral field

Field
Type
Description
label
String
Title above the follower email referral field
legend
String
Description below the follower email referral field

GenerateApiKeyPayload

Autogenerated return type of GenerateApiKey

Field
Type
Description
brand
Brand
Brand
errors
String
Errors

IntegrationMeta

Represents the status of additional script used by client alongwith trackingjs

Field
Type
Description
managerDesc
String
Short description of tag manager used by client
snippet
String
Code block used by client for integration
tagManager
Boolean
Indicates the use of tag manager services alongside trackingjs
updatedAt
String
Datetime when the last change made to record
versions
Version
Last three changes made to the record in raw format

InviteEmail

Represents a backoffice configuration for the invite email field

Field
Type
Description
label
String
Title above the invite email field
legend
String
Description below the invite email field

ItemCategory

Category of purchased product

Field
Type
Description
label
String
Category of purchased product
legend
String
Description below category of purchased product

ItemName

Name of purchased product

Field
Type
Description
label
String
Name of purchased product
legend
String
Name of purchased product description

ItemPrice

Price of purchased product

Field
Type
Description
label
String
Purchased product price
legend
String
Price of purchased product description

ItemSKU

SKU of purchased product

Field
Type
Description
label
String
Purchased product SKU
legend
String
Description of purchased product SKU

LineItem

Represents a Sales Request Line Item

Field
Type
Description
category
String
Category of the line item
contractRecurrences
Int
Number of monthly payments
contractRecurringFee
Int
Amount of individual payments in cents
contractSetupFee
Int
Fee for setting up the contract in cents
id
ID
ID of the line item
name
String
Name of the line item
price
Int
Price of the line item
sku
String
SKU of the line item

MetricResult

Represents metrics results including current, past, and relative change

Field
Type
Description
currentResult
Int
The current result count
pastResult
Int
The past result count
relativeChange
Float
The relative change between current and past results

OrderId

Represents a backoffice configuration for the order id field

Field
Type
Description
label
String
Title above the order id field
legend
String
Description below the order id field

OrderOption

Represents a backoffice configuration for the order options field

Field
Type
Description
label
String
Title above the order options field
legend
String
Description below the order options field

Promotion

Represents a promotion information with related advertiser and conversions

Field
Type
Description
activeRulePlan
RulePlan
Active Rule Plan
advertiser
Advertiser
Advertiser associated with the promotion
aklamioLight
Boolean
Flag to identify if Promotion is running claim by link flow
aklamioMedium
Boolean
Flag to identify if Promotion is running Aklamio medium flow
averageDaysToConfirm
Int
Average days to confirm; NULL if unknown or not set
backoffices
Backoffices
Backoffices associated with the promotion, keyed by sales channel.
balance
Int
Current balance in cents for the current advertiser. Returns null for affiliate networks
brand
Brand
Basic info related to brand
campaigns
Campaign
Campaigns associated with the promotion
causes
PromotionCauses
Promotion causes
confirmationTime
Int
Average confirmation time in seconds
conversions
Conversion
Conversions of the promotion
conversionsCount
Int
Conversions count for the given promotion.
createdAt
ISO8601DateTime
UTC Timestamp when promotion is created
currency
String
Currency for the current promotion
features
JSON
Promotion features
formatterFields
JSON
Formatter fields for the promotion.
id
ID
ID of the promotion
image
String
Image URL of a specified size
isActiveBackoffice
Boolean
Indicates if an agent backoffice is configured
isAffiliateNetwork
Boolean
Indicates if the promotion is an affiliate network
lastDepositAmount
Int
Last deposit amount in cents. Returns null for affiliate networks or for accounts without pay ins
lastDepositDate
ISO8601DateTime
Last deposit date in iso format. Returns null for affiliate networks or for accounts without pay ins
lightFormValidDays
Int
Number of days since the follow event occur for a valid claim form
migratedPromotions
String
List of promotions that have been migrated to One Program
omniType
String
Method of tracking the promotion
openRewardsAmount
Int
Amount in cents for open rewards
openRewardsCount
Int
Number of open rewards
openSupportRequestsCount
Int
Open support requests count
permalink
String
A permanent link of the shop which is needed for the dashboard
programType
String
Describes the program type, ie. referral, cashback
promotionsIntegrationMeta
IntegrationMeta
New trecking js integration meta data
rewardAllocatedBy
String
Identify if a promotion supports Carbon Offsetting. Values: user(normal keep share give) and customer(Carbon Offsetting support)
rewardReceivers
String
Reward receivers configuration
rulePlans
RulePlan
Rule plans for the promotion
salesChannels
String
Sales channels for the promotion
salesRequests
SalesRequest
Sales Requests for the promotion
salesRequestsCount
Int
Sales requests count
state
String
State of the promotion
supportRequests
SupportRequest
Support requests for the promotion.
supportRequestsCount
Int
Support Requests count
surroundingCampaigns
SurroundingCampaigns
Returns campaigns surrounding a specific datetime
title
String
Title of the promotion
trailingConversions
TrailingConversions
Totals for current and previous period for the promotion conversions
treckerFlowCheckpoints
TreckerFlowCheckpoint
Different points of interaction for trecking flow
uid
String
UID of the promotion
updatedAt
ISO8601DateTime
UTC Timestamp when promotion is updated
url
String
URL of the promotion
useTrackingJs
Boolean
Indicates if promotion is using new tracking js flow
vouchers
PromotionVouchers
Returns list of vouchers added for the promotion (but not featured) or potentially addable to the promotion

PromotionCauses

Represents promotion causes

Field
Type
Description
featured
Cause
Featured causes
nonFeatured
Cause
Non-featured causes

PromotionVouchers

Represents promotion vouchers response type, including featured and non-featured vouchers

Field
Type
Description
availableCategories
String
List of available categories used for vouchers
featured
Voucher
List of featured vouchers related to the promotion
nonFeatured
VouchersWrapper
Returns object with multiple fields related to the non-featured vouchers of the promotion
totalCount
PromotionVouchersCount
Object containing total counts of different voucher types

PromotionVouchersCount

Represents promotion vouchers count type, giving total number of vouchers

Field
Type
Description
excluded
Int
Total number of non featured excluded vouchers
featured
Int
Total number of featured vouchers
included
Int
Total number of non featured included vouchers

RecreateSalesRequestPayload

Autogenerated return type of RecreateSalesRequest

Field
Type
Description
errors
String
Errors
salesRequest
SalesRequest
Recreated Sales Request

ReferrerEmail

Represents a backoffice configuration for the referrer email field

Field
Type
Description
label
String
Title above the referrer email field
legend
String
Description below the referrer email field

RejectPayload

Autogenerated return type of Reject

Field
Type
Description
conversions
Conversion
A list of conversions
errors
String
Errors

RejectSalesRequestsPayload

Autogenerated return type of RejectSalesRequests

Field
Type
Description
errors
String
Errors
salesRequests
SalesRequest
A list of the sales requests

RejectSupportRequestPayload

Autogenerated return type of RejectSupportRequest

Field
Type
Description
errors
String
Errors
supportRequests
SupportRequest
A list of the support requests

RequestLog

Represents the primary detail of the request/sales event log from trackingjs

Field
Type
Description
createdAt
String
Indicates the timestamp when record is created
errorDescription
String
Error raised while processing request.
eventSource
String
Indicates whether client directly sent the request or used trackingjs library
id
String
Unique identifier for the record
payload
JSON
Request payload of event
status
String
Status of the record if exist
updatedAt
String
Indicates the timestamp when record is updated

RevertEmailTemplatePayload

Autogenerated return type of RevertEmailTemplate

Field
Type
Description
emailTemplates
EmailTemplate
The newly created email templates with global configuration
errors
String
Errors

RevokeApiKeyPayload

Autogenerated return type of RevokeApiKey

Field
Type
Description
brand
Brand
Brand
errors
String
Errors

RewardCodeCashback

Represents a backoffice configuration for the reward code cashback field

Field
Type
Description
label
String
Title above the reward code cashback field
legend
String
Description below the reward code cashback field

RewardCodeReferral

Represents a backoffice configuration for the reward code referral field

Field
Type
Description
label
String
Title above the reward code referral field
legend
String
Description below the reward code referral field

RewardCosts

Represents a Reward Costs

Field
Type
Description
fee
Int
Reward fee in cents
follower
Int
Reward follower in cents
recommender
Int
Reward recommender in cents
total
Int
Total amount in cents

RewardRule

Represents a reward rule information

Field
Type
Description
commissionFixed
Int
The fixed payment associated with a certain amount of sale that Aklamio receives
commissionPercent
Float
The percentage payment associated with a certain amount of sale that Aklamio receives
conditionScope
ConditionScope
The scope for condition. Can be `ITEM` or `BASKET`
conditionTemplate
ConditionTemplate
Condition template for the reward rule
conditionValues
JSON
values for condition template
description
String
Description of the reward rule
endDate
ISO8601DateTime
End date of the reward rule
id
ID
ID of the reward rule
isActive
Boolean
Is this rule active or not
isDefault
Boolean
Is this rule default or not
name
String
Name of the reward rule
rank
Int
A position in a collection of reward rules for the particular promotion
rewardConfigurations
JSON
JSON Object that represent how the reward value will be fulfilled for the sharer and follower (eg. Follower gets 1 tree & 10€, Sharer gets 2 trees & 5€)
rewardTemplate
RewardTemplate
Reward template for the reward rule
rewardValues
JSON
values for reward template
salesChannels
String
Sales channels enabled for the rule
startDate
ISO8601DateTime
Start date of the reward rule

RewardTemplate

Represents a template for reward in reward rules

Field
Type
Description
acceptedValues
JSON
Predefined values format for reward templates
description
String
Detailed description of the reward
expression
String
Expression for reward rule
id
ID
ID of the condition template
rewardType
RewardType
Type of the reward

RulePlan

Represents a rule plan information

Field
Type
Description
createdAt
ISO8601DateTime
Creation date of the rule plan
endDate
ISO8601DateTime
End date of the rule plan
id
ID
ID of the rule plan
predecessorId
ID
ID of the previous rule plan
rewardEvaluationMode
RewardEvaluationMode
The mode of the reward evaluation.
rewardRules
RewardRule
Reward rules for the rule plan.
versionNumber
Int
Version number of the rule plan

SalesRequest

Represents a Sales Request

Field
Type
Description
activatedParams
String
Value of the params that triggered the rule, for each conversion
additionalFields
JSON
Additional fields
agentEmail
String
Email of the agent who created the sale
conversions
Conversion
Conversions of the sales request
cost
Cost
Cost object describing how cost is split on rewards and fees
daysUntilDue
Int
Number of days until the sales request is due
eventSource
String
Indicates whether client directly sent the request via api, used trackingjs library or end user used the claim by link form
fileUrl
String
Receipt file s3 url
id
ID
ID of the sales request
leadEmail
String
Masked email of the lead/follower
lineItems
LineItem
Line items of a sales request
matchingCriterion
String
Stores the value by what strategy the sales request was generated. Possible values: 'aid', 'tracking_id', 'ip_and_fingerprint'.
metainfo
JSON
Returns meta info from sales event sales data
orderId
String
ID of the order
predecessorId
ID
ID of the predecessor sales request
promotion
Promotion
Promotion the sales request belongs to
salesChannel
String
Sales channel of the sales request
state
State
State of the sales request. Possible values: 'open', 'confirmed', 'rejected'.
trackedAt
ISO8601DateTime
Timestamp when sales request was tracked

SupportRequest

Represents a Support Request

Field
Type
Description
closingReason
ClosingReason
The reason why Support Request was closed, which is provided by the partner.
createdAt
ISO8601DateTime
The date Support Request was created at.
formatterFieldsValues
JSON
Support Request formatter values.
id
ID
ID of the Support Request.
openingReason
OpeningReason
The reason why Support Request was created, which is provided by the user.
promotion
Promotion
Promotion of the support request.
salesRequest
SalesRequest
Sales request tracked by TrackingJS when the opening reason for the support request is rejected or unconfirmed.
state
SupportRequestState
Support Request state. Possible values: 'closed', 'created' and 'sent'.
user
User
User who created a support request.

SurroundingCampaigns

Campaigns before and after a specific datetime

Field
Type
Description
following
Campaign
Campaign with start_date after the given datetime
previous
Campaign
Campaign with start_date before the given datetime

TrailingConversions

Totals of conversions for current and previous period

Field
Type
Description
currentWindowTotal
Int
Total number of conversions for the current period.
previousWindowTotal
Int
Total number of conversions for the previous period.

TreckerFlowCheckpoint

Represents different checkpoints associated with trecker integration

Field
Type
Description
aklamio
DataflowCheckpoint
Indicates the status of aklamio consumer service
kafka
DataflowCheckpoint
Indicates the status of kafka service
trecker
DataflowCheckpoint
Indicates the status of trecker producer service
treckerjs
DataflowCheckpoint
Indicates the status trecker frontend

UpdateCampaignPayload

Autogenerated return type of UpdateCampaign

Field
Type
Description
campaign
Campaign
Updated campaign
duplicateCampaign
Campaign
Campaign following the updated campaign (dup of previous)
errors
String
Errors

UpdateEmailTemplatesPayload

Autogenerated return type of UpdateEmailTemplates

Field
Type
Description
emailTemplates
EmailTemplate
List of updated email templates
errors
String
Errors

UpdatePromotionCausesPayload

Autogenerated return type of UpdatePromotionCauses

Field
Type
Description
errors
String
Errors
message
String
response message

UpdatePromotionPayload

Autogenerated return type of UpdatePromotion

Field
Type
Description
errors
String
Errors
rewardReceivers
String
Updated promotion reward receivers

UpdatePromotionVouchersPayload

Autogenerated return type of UpdatePromotionVouchers

Field
Type
Description
errors
String
Errors
message
String
response message

UpdateRulePlanPayload

Autogenerated return type of UpdateRulePlan

Field
Type
Description
errors
String
Errors
rulePlan
RulePlan
Rule plan

UpdateSalesRequestPayload

Autogenerated return type of UpdateSalesRequest

Field
Type
Description
errors
String
Errors
salesRequest
SalesRequest
Updated Sales Request

User

Represents a user information

Field
Type
Description
additionalFields
JSON
Fields with additional information about the user
email
String
Email of the User
id
ID
ID of the User

Version

Represents the information regarding change in the record

Field
Type
Description
createdAt
String
Last three changes made to the record in raw format
id
Int
Inditifier for record
itemType
String
Model name which is modified
objectChanges
String
Changes made to the record
whodunnit
Int
Who made this change

Voucher

Represents voucher object

Field
Type
Description
categories
String
Array of category names
code
String
Voucher code unique for the provider
countries
String
Array of country names
currency
String
Currency of the voucher
expiryInMonths
Int
Indicates how long the voucher is valid for, or NULL if it doesn't expire
expiryMode
String
Indicates if voucher can expire
id
ID
Id of the voucher
included
Int
Indicates if voucher is included for the promotion or not
logoUrl
String
Link to the logo of the voucher
maxValue
Int
Max value for the voucher
minValue
Int
Min value for the voucher
name
String
User friendly name of the voucher
orderable
Boolean
Indicates if voucher is orderable or not
provider
String
Provider name of the voucher
redeemableAt
String
Indicates where the voucher is redeemable (all, online, in-store)
state
String
State of the voucher as indicated by the provider
termsAndConditionsUrl
String
Link to terms and conditions for the voucher

VouchersWrapper

Wrapper object to bring more details around list of vouchers like count, page and per page

Field
Type
Description
count
Int
Shows how many vouchers are there in total
data
Voucher
List of vouchers for the current page
page
Int
Shows the page of the paginated vouchers list response
perPage
Int
Indicates how many vouchers per page was used to generate this response

Mutation types

The mutation type defines how GraphQL operations change data. It is analogous to performing HTTP verbs such as POST, PATCH, and DELETE.

For more information, see Mutations on graphql.org.

confirmConversions

Confirm conversions mutation

Input Fields
Field
Type
Description
category
String
DEPRECATED: This feature is only for specific partners. Conversions with matching category will be confirmed. In case of mismatch conversion category will be updated (reward recalculated) and conversion will be confirmed
orderIds
String
A list of order_ids to confirm
promotionPermalink
String
Promotion permalink
Return Fields
Field
Type
Description
conversions
Conversion
A list of conversions
errors
String
Errors

confirmSalesRequest

Confirm sales requests mutation

Input Fields
Field
Type
Description
newLineItems
LineItemInput
Extra line items to add to add to sales request
orderId
String
Order ID of sales request to confirm
promotionPermalink
String
Promotion permalink
selectedSkus
String
Existing line items to confirm
Return Fields
Field
Type
Description
errors
String
Errors
salesRequest
SalesRequest
Confirmed sales request

confirmSalesRequests

Confirm sales requests mutation

Input Fields
Field
Type
Description
orderIds
String
A list of sales requests' order_ids to confirm
promotionPermalink
String
Promotion permalink
Return Fields
Field
Type
Description
errors
String
Errors
salesRequests
SalesRequest
A list of the sales requests

createBackofficeSalesRequest

Create a sales requests from backoffice

Input Fields
Field
Type
Description
additionalFields
JSON
Additional fields
couponCode
String
Reward code
email
String
Email of the follower user when referral use case, If Cashback then receiver’s email
isCashback
Boolean
Boolean value for cashback
lineItems
LineItemBoInput
Line items that belong to the order
orderDate
ISO8601DateTime
The date that order was made
orderId
String
Order ID
promotionPermalink
String
Promotion permalink
recommenderEmail
String
Email of the recommender when referral use case, if coupon is given this must be empty
salesChannel
SalesChannel
Sales channel
useCase
ProgramType
Type of use case. Valid values: referral/cashback
Return Fields
Field
Type
Description
errors
String
Errors
salesRequest
SalesRequest
Created Sales Request

createCampaign

Create a campaign

Input Fields
Field
Type
Description
campaign
CampaignCreateInput
Campaign input
Return Fields
Field
Type
Description
duplicateCampaign
Campaign
Campaign following the newly created campaign (dup of previous)
errors
String
Errors
newCampaign
Campaign
Newly created campaign

createConversion

Create conversion mutation

Input Fields
Field
Type
Description
additionalFields
JSON
Additional fields
category
String
Category
couponCode
String
Reward code
followerEmail
String
Follower email
isCashback
Boolean
Boolean value for cashback
orderId
String
Order id
orderOption
String
Order option
promotionPermalink
String
Promotion permalink
recommenderEmail
String
Recommender email
Return Fields
Field
Type
Description
conversion
Conversion
Conversion
errors
String
Errors

createPromotionCauses

Create promotion causes

Input Fields
Field
Type
Description
causes
CauseInput
List of providers cause IDs
promotionPermalink
String
Promotion permalink
Return Fields
Field
Type
Description
errors
String
Errors
message
String
response message

createRulePlan

Create rule plan mutation

Input Fields
Field
Type
Description
campaignUid
String
Campaign UID
promotionPermalink
String
Promotion permalink
rewardEvaluationMode
RewardEvaluationMode
The mode of the reward evaluation.
rewardRules
RewardRuleInput
Reward rules which belong to the rule plan
Return Fields
Field
Type
Description
errors
String
Errors
rulePlan
RulePlan
Rule plan

createSalesRequest

Create sales request mutation

Input Fields
Field
Type
Description
lineItems
LineItemInput
Line items that belong to the order
orderDate
ISO8601DateTime
The date that order was made
orderId
String
Order ID
salesChannel
SalesChannel
Sales channel of sale
supportRequestId
ID
Support Request ID which is related to the order
Return Fields
Field
Type
Description
errors
String
Errors
salesRequest
SalesRequest
Created Sales Request

createUser

Create user mutation

Input Fields
Field
Type
Description
additionalFields
JSON
Additional fields
email
String
Email of the user
locale
String
Locale
promotionPermalink
String
Promotion permalink
Return Fields
Field
Type
Description
errors
String
Errors
user
User
User

destroyCampaign

Destroy a campaign

Input Fields
Field
Type
Description
uid
ID
Campaign UID
Return Fields
Field
Type
Description
errors
String
Errors
success
Boolean
Whether the campaign was destroyed

generateApiKey

Generate API key for brand for server to server tracking

Input Fields
Field
Type
Description
brandUid
String
Brand UID
Return Fields
Field
Type
Description
brand
Brand
Brand
errors
String
Errors

recreateSalesRequest

Recreate sales request mutation

Input Fields
Field
Type
Description
lineItems
LineItemInput
Line items that belong to the order
predecessorOrderId
String
Predecessor order ID
predecessorSalesRequestId
ID
Predecessor sales request ID
promotionPermalink
String
Promotion permalink
Return Fields
Field
Type
Description
errors
String
Errors
salesRequest
SalesRequest
Recreated Sales Request

rejectConversions

Reject conversions mutation

Input Fields
Field
Type
Description
orderIds
String
A list of order ids to reject
promotionPermalink
String
Promotion permalink
Return Fields
Field
Type
Description
conversions
Conversion
A list of conversions
errors
String
Errors

rejectSalesRequests

Reject sales requests mutation

Input Fields
Field
Type
Description
orderIds
String
A list of sales requests' order_ids to reject
promotionPermalink
String
Promotion permalink
Return Fields
Field
Type
Description
errors
String
Errors
salesRequests
SalesRequest
A list of the sales requests

rejectSupportRequests

Reject support requests mutation

Input Fields
Field
Type
Description
closingReason
ClosingReason
Rejection reason
ids
ID
A list of support requests with ids to reject
promotionPermalink
String
Promotion permalink
Return Fields
Field
Type
Description
errors
String
Errors
supportRequests
SupportRequest
A list of the support requests

revertEmailTemplate

Revert brand email template to global template configuration

Input Fields
Field
Type
Description
brandUid
String
UID of the brand
triggers
String
Array of template triggers to revert
Return Fields
Field
Type
Description
emailTemplates
EmailTemplate
The newly created email templates with global configuration
errors
String
Errors

revokeApiKey

Remove Api key from brand

Input Fields
Field
Type
Description
brandUid
String
Brand UID
Return Fields
Field
Type
Description
brand
Brand
Brand
errors
String
Errors

updateCampaign

Update a campaign

Input Fields
Field
Type
Description
campaign
CampaignUpdateInput
Campaign input
uid
ID
Campaign UID
Return Fields
Field
Type
Description
campaign
Campaign
Updated campaign
duplicateCampaign
Campaign
Campaign following the updated campaign (dup of previous)
errors
String
Errors

updateEmailTemplates

Update email templates

Input Fields
Field
Type
Description
entityType
String
Type of entity: Brand or Campaign
entityUid
String
UID of the entity (Brand or Campaign)
templates
EmailTemplateUpdateInput
Array of email templates to update
Return Fields
Field
Type
Description
emailTemplates
EmailTemplate
List of updated email templates
errors
String
Errors

updatePromotion

Update promotion

Input Fields
Field
Type
Description
promotionPermalink
String
Promotion permalink
rewardReceivers
String
Updated promotion reward receivers
Return Fields
Field
Type
Description
errors
String
Errors
rewardReceivers
String
Updated promotion reward receivers

updatePromotionCauses

Update promotion causes

Input Fields
Field
Type
Description
causes
CauseInput
Promotion causes to update
promotionPermalink
String
Promotion permalink
Return Fields
Field
Type
Description
errors
String
Errors
message
String
response message

updatePromotionVouchers

Update promotion vouchers

Input Fields
Field
Type
Description
promotionPermalink
String
Promotion permalink
vouchers
VoucherInput
Promotion vouchers to update
Return Fields
Field
Type
Description
errors
String
Errors
message
String
response message

updateRulePlan

Update rule plan mutation

Input Fields
Field
Type
Description
rulePlanInput
RulePlanUpdateInput
Rule plan input
Return Fields
Field
Type
Description
errors
String
Errors
rulePlan
RulePlan
Rule plan

updateSalesRequest

Update sales request mutation

Input Fields
Field
Type
Description
lineItems
LineItemInput
Line items that belong to the order
salesRequestId
ID
Sales request ID
Return Fields
Field
Type
Description
errors
String
Errors
salesRequest
SalesRequest
Updated Sales Request

Enum types

For more information, see Enumeration types on graphql.org.

ClosingReason

Represents an enum type for support request closing reason.

Field
Description
EXISTING_CUSTOMER
Already existing customer
LOST_COOKIES
Lost cookies
MIGRATED_FOR_ONE_PROGRAM
Migrated for one program
ORDER_CANCELLATION
Cancellations (cancelled contracts or orders)
ORDER_IS_NOT_ONLINE
Order not placed online
ORDER_IS_OLDER_THAN_LINK
Order was made before the referral link was created
PRODUCT_WITHOUT_REWARD
Product doesnt get any reward
REQUEST_IS_CORRECT
Request is correct
SALE_IS_ALREADY_TRACKED
Sale is already tracked
WRONG_ORDER_ID
Order id can't be found
WRONG_ORDER_ID_FORMAT
Order id in a wrong format

ConditionScope

Represents a condition scope.

Field
Description
BASKET
Basket scope
ITEM
Item scope

OpeningReason

Represents an enum type for support request opening reason.

Field
Description
MISSING
Reward is missing.
REJECTED
Reward was rejected.
UNCONFIRMED
Reward is unconfirmed.

ProgramType

Represents program type

Field
Description
cashback
Cashback program
referral
Refer a Friend program

RewardEvaluationMode

Represent the evaluation modes for a reward.

Field
Description
ALL_RULES
A mode where the reward is the sum of rewards evaluated on all active rules created in a particular promotion.
FIRST_MATCH
A mode where the reward is evaluated on the first active rule ordered by primary ID.

RewardType

Represents reward type

Field
Description
FIXED
Fixed reward
PERCENT
Percent reward

SalesChannel

Represents the sales channel

Field
Description
hotline
hotline sales channel
offline
offline sales channel
online
online sales channel

State

Represents an enum type for state

Field
Description
CLOSED
Closed state
CONFIRMED
Confirmed state
OPEN
Open state
REJECTED
Rejected state

SupportRequestState

Represents an enum type for support request state.

Field
Description
CLOSED
The state of the Support Request when it is closed.
CREATED
The state of the Support Request when it is created.
SENT
The state of the Support Request when it was processed by customer support manager and sent to the advertiser.

Input types

For more information, see Input types on graphql.org.

AccountingEntriesFiltersInput

Filters for accounting entries page

Input Fields
Field
Type
Description
dateRange
DateRangeInput
Filter entries by date range
permalinks
String
Filter entries by promotions
salesChannel
String
Filter entries by sales channel
type
String
Filter entries by bookable type (e.g., Conversion, PayIn, Refund)

CampaignCreateInput

Input type for campaign creation

Input Fields
Field
Type
Description
description
String
Campaign description
emailTemplates
EmailTemplateUpdateInput
Email templates to update after copying from source
emailTemplatesSourceType
String
Type of source to copy email templates from: Brand or Campaign
emailTemplatesSourceUid
String
UID of Brand or Campaign to copy email templates from
endDate
ISO8601DateTime
Start date of following campaign
gap
Boolean
Gap campaign
name
String
Campaign name
permalink
String
Promotion permalink
rewardEvaluationMode
RewardEvaluationMode
The mode of the reward evaluation.
rewardRules
RewardRuleInput
Reward rules
startDate
ISO8601DateTime
Campaign start date

CampaignUpdateInput

Input type for campaign update

Input Fields
Field
Type
Description
description
String
Campaign description
emailTemplates
EmailTemplateUpdateInput
Email templates to update for this campaign
endDate
ISO8601DateTime
Start date of following campaign
gap
Boolean
Gap campaign
name
String
Campaign name
permalink
String
Promotion permalink
rewardEvaluationMode
RewardEvaluationMode
The mode of the reward evaluation.
rewardRules
RewardRuleInput
Reward rules which belong to the rule plan
startDate
ISO8601DateTime
Campaign start date

CauseInput

Input type for a cause

Input Fields
Field
Type
Description
featured
Boolean
Whether the cause is featured
included
Boolean
Whether the cause is included
isDefault
Boolean
Whether the cause is default
providerCauseId
String
ID of the cause

DateRangeInput

Date range filter with from and to dates

Input Fields
Field
Type
Description
fromDate
ISO8601DateTime
Start date of the range (inclusive)
toDate
ISO8601DateTime
End date of the range (inclusive)

EmailTemplateUpdateInput

Input type for updating email templates

Input Fields
Field
Type
Description
config
JSON
Configuration of the email template
isActive
Boolean
Whether the email template is active
subject
JSON
Subject of the email template
trigger
String
Trigger identifier for the email template type

LineItemBoInput

Input type for line item for backoffice

Input Fields
Field
Type
Description
category
String
Category of the line item
contractRecurrences
Int
Number of monthly payments
contractRecurringFee
Int
Amount of individual payments in cents
contractSetupFee
Int
Fee for setting up the contract in cents
name
String
Name of the line item
price
Int
Price of the line item
sku
String
SKU of the line item

LineItemInput

Input type for line item

Input Fields
Field
Type
Description
category
String
Category of the line item
contractRecurrences
Int
Number of monthly payments
contractRecurringFee
Int
Amount of individual payments in cents
contractSetupFee
Int
Fee for setting up the contract in cents
name
String
Name of the line item
price
Int
Price of the line item
sku
String
SKU of the line item

RewardRuleInput

Input type for reward rule

Input Fields
Field
Type
Description
commissionFixed
Int
The fixed payment associated with a certain amount of sale that Aklamio receives
commissionPercent
Float
The percentage payment associated with a certain amount of sale that Aklamio receives
conditionScope
ConditionScope
The scope for condition. Can be `ITEM` or `BASKET`
conditionTemplateId
Int
Condition template ID
conditionValues
JSON
values for condition template
description
String
Description of the reward rule
endDate
ISO8601DateTime
End date of the reward rule
frontendUid
String
frontend_uid for errors representation on the frontend
isDefault
Boolean
Is this rule default or not
name
String
Name of the reward rule
rank
Int
A position in a collection of reward rules for the particular promotion
rewardConfigurations
JSON
JSON Object that represent how the reward value will be fulfilled for the sharer and follower (eg. Follower gets 1 tree & 10€, Sharer gets 2 trees & 5€)
rewardTemplateId
Int
Reward template ID
rewardValues
JSON
values for reward template
salesChannels
SalesChannel
Sales channels for the reward rule
startDate
ISO8601DateTime
Start date of the reward rule

RulePlanUpdateInput

Input type for rule plan update

Input Fields
Field
Type
Description
campaignUid
String
Campaign UID
rewardEvaluationMode
RewardEvaluationMode
The mode of the reward evaluation.
rewardRules
RewardRuleInput
Reward rules which belong to the rule plan

VoucherInput

Input type for a voucher

Input Fields
Field
Type
Description
featured
Boolean
Whether the voucher is featured
included
Boolean
Whether the voucher is included
voucherId
ID
ID of the voucher