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.

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
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
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`
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.
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

Brand

Represents a promotion information with related advertiser and conversions

Field
Type
Description
apiKey
String
Api key for server to server integration
apiKeyGeneratedOn
String
Api key generation time
name
String
Name of the brand
uid
String
Non sequential identifier for brand
website
String
Official webpage of brand

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

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

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
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

CreateBackofficeSalesRequestPayload

Autogenerated return type of CreateBackofficeSalesRequest

Field
Type
Description
errors
String
Errors
salesRequest
SalesRequest
Created Sales Request

CreateConversionPayload

Autogenerated return type of CreateConversion

Field
Type
Description
conversion
Conversion
Conversion
errors
String
Errors

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

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

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

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
backoffice
Backoffice
Backoffice associated with the promotion
balance
Int
Current balance in cents for the current advertiser. Returns null for affiliate networks
brand
Brand
Basic info related to brand
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
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
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
Reward rules for the promotion
salesRequests
SalesRequest
Sales Requests for the promotion
salesRequestsCount
Int
Sales requests count
supportRequests
SupportRequest
Support requests for the promotion.
supportRequestsCount
Int
Support Requests count
title
String
Title of the promotion
treckerFlowCheckpoints
TreckerFlowCheckpoint
Different points of interaction for trecking flow
uid
String
UID of the promotion
url
String
URL of the promotion
useTrackingJs
Boolean
Indicates if promotion is using new tracking js flow

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

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

RewardRule

Represents a reward rule information

Field
Type
Description
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
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
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.

SalesRequest

Represents a Sales Request

Field
Type
Description
additionalFields
JSON
Additional fields
conversions
Conversion
Conversions of the sales request
id
ID
ID of the sales request
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'.
orderId
String
ID of the order
predecessorId
ID
ID of the predecessor sales request
promotion
Promotion
Promotion the sales request belongs to
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.
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.

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

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

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
useCase
ProgramType
Type of use case. Valid values: referral/cashback
Return Fields
Field
Type
Description
errors
String
Errors
salesRequest
SalesRequest
Created Sales Request

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

createRulePlan

Create rule plan mutation

Input Fields
Field
Type
Description
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
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
promotionPermalink
String
Promotion permalink
Return Fields
Field
Type
Description
errors
String
Errors
user
User
User

generateApiKey

Generate API key for brand for server to server tracking

Input Fields
Field
Type
Description
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
predecessorSalesRequestId
ID
Predecessor sales request ID
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

revokeApiKey

Remove Api key from brand

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

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
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

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.

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
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
startDate
ISO8601DateTime
Start date of the reward rule