Référence de l'API GraphQL
L'intégralité de Revclic est accessible via une seule API GraphQL destinée aux clients. Cette référence documente chaque requête, mutation et type du schéma. L'API est authentifiée : chaque requête doit présenter un jeton Bearer.
Point d'accès
https://api.revclic.com/Méthode
POSTAuthentification
Jeton Bearer (JWT)Format
application/jsonEnvoyez une requête HTTP POST au point d'accès, avec un corps JSON contenant le champ query (et éventuellement variables), et un en-tête Authorization portant votre jeton Bearer.
curl -X POST https://api.revclic.com/ \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <token>" \
-d '{"query": "{ me { id email } }"}'Obtenez un jeton via la mutation signin (ou signup), puis présentez-le dans l'en-tête Authorization: Bearer <token> de chaque requête.
Requêtes
health
health: String!Retourne String!
me
me: UserRetourne User
users
users(page: Int = 1, perPage: Int, search: String, status: String, sort: String = "id_desc"): UserPage!Arguments
| page | Int = 1 |
| perPage | Int |
| search | String |
| status | String |
| sort | String = "id_desc" |
Retourne UserPage!
user
user(id: ID!): UserArguments
| id | ID! |
Retourne User
mySessions
mySessions(currentRefreshToken: String): [RefreshToken!]!Arguments
| currentRefreshToken | String |
Retourne [RefreshToken!]!
myMerchants
myMerchants: [Merchant!]!Retourne [Merchant!]!
merchants
merchants(page: Int = 1, perPage: Int, search: String, status: String, sort: String = "id_desc"): MerchantPage!Arguments
| page | Int = 1 |
| perPage | Int |
| search | String |
| status | String |
| sort | String = "id_desc" |
Retourne MerchantPage!
merchant
merchant(id: ID!): MerchantArguments
| id | ID! |
Retourne Merchant
merchantProducts
merchantProducts(merchantId: ID!, page: Int = 1, perPage: Int): ProductPage!Arguments
| merchantId | ID! |
| page | Int = 1 |
| perPage | Int |
Retourne ProductPage!
merchantDomains
merchantDomains(merchantId: ID!): [MerchantDomain!]!Arguments
| merchantId | ID! |
Retourne [MerchantDomain!]!
merchantVouchers
merchantVouchers(merchantId: ID!): [MerchantVoucher!]!Arguments
| merchantId | ID! |
Retourne [MerchantVoucher!]!
productCategories
productCategories(locale: Locale! = FR): [PublicProductCategory!]!Arguments
| locale | Locale! = FR |
Retourne [PublicProductCategory!]!
searchProducts
searchProducts(query: String, locale: Locale! = FR, categoryId: ID, limit: Int = 20, offset: Int = 0): [ProductSearchResult!]!Arguments
| query | String |
| locale | Locale! = FR |
| categoryId | ID |
| limit | Int = 20 |
| offset | Int = 0 |
Retourne [ProductSearchResult!]!
merchantCategories
merchantCategories(locale: Locale! = FR): [MerchantCategory!]!Arguments
| locale | Locale! = FR |
Retourne [MerchantCategory!]!
merchantTransactions
merchantTransactions(merchantId: ID!, page: Int = 1, startDate: String, endDate: String): TransactionPage!Arguments
| merchantId | ID! |
| page | Int = 1 |
| startDate | String |
| endDate | String |
Retourne TransactionPage!
merchantTransaction
merchantTransaction(merchantId: ID!, transactionId: ID!): TransactionArguments
| merchantId | ID! |
| transactionId | ID! |
Retourne Transaction
transactionStats
transactionStats(merchantId: ID!, from: String, to: String, rewardStatus: String, type: String, excludeBots: Boolean = true): TransactionStats!Arguments
| merchantId | ID! |
| from | String |
| to | String |
| rewardStatus | String |
| type | String |
| excludeBots | Boolean = true |
Retourne TransactionStats!
merchantInvoices
merchantInvoices(merchantId: ID!, page: Int = 1, status: String): InvoicePage!Arguments
| merchantId | ID! |
| page | Int = 1 |
| status | String |
Retourne InvoicePage!
merchantContracts
merchantContracts(merchantId: ID!): [MerchantContract!]!Arguments
| merchantId | ID! |
Retourne [MerchantContract!]!
phonePrefixes
phonePrefixes: [PhonePrefix!]!Retourne [PhonePrefix!]!
logs
logs(page: Int = 1, type: String, actorType: String, userId: ID, startDate: String, endDate: String, order: String = "desc"): LogPage!Arguments
| page | Int = 1 |
| type | String |
| actorType | String |
| userId | ID |
| startDate | String |
| endDate | String |
| order | String = "desc" |
Retourne LogPage!
logFacets
logFacets(facet: String = "type"): [String!]!Arguments
| facet | String = "type" |
Retourne [String!]!
notifications
notifications(page: Int = 1, unreadOnly: Boolean): NotificationPage!Arguments
| page | Int = 1 |
| unreadOnly | Boolean |
Retourne NotificationPage!
unreadNotificationCount
unreadNotificationCount: Int!Retourne Int!
mercureSubscription
mercureSubscription: MercureSubscriptionRetourne MercureSubscription
unusedRecoveryCodeCount
unusedRecoveryCodeCount: Int!Retourne Int!
merchantStatuses
merchantStatuses: [EnumValue!]!Retourne [EnumValue!]!
merchantDomainStatuses
merchantDomainStatuses: [EnumValue!]!Retourne [EnumValue!]!
notificationEvents
notificationEvents: [EnumValue!]!Retourne [EnumValue!]!
notificationChannels
notificationChannels: [EnumValue!]!Retourne [EnumValue!]!
productPricingTypes
productPricingTypes: [EnumValue!]!Retourne [EnumValue!]!
transactionStatuses
transactionStatuses: [EnumValue!]!Retourne [EnumValue!]!
transactionRewards
transactionRewards: [EnumValue!]!Retourne [EnumValue!]!
basketItemStatuses
basketItemStatuses: [EnumValue!]!Retourne [EnumValue!]!
invoiceStatuses
invoiceStatuses: [EnumValue!]!Retourne [EnumValue!]!
paymentMethods
paymentMethods: [EnumValue!]!Retourne [EnumValue!]!
userStatuses
userStatuses: [EnumValue!]!Retourne [EnumValue!]!
locales
locales: [EnumValue!]!Retourne [EnumValue!]!
featureFlags
featureFlags: [EnumValue!]!Retourne [EnumValue!]!
Mutations
signup
signup(email: String!, password: String!, firstName: String, lastName: String, challengeToken: String): AuthPayload!Arguments
| String! | |
| password | String! |
| firstName | String |
| lastName | String |
| challengeToken | String |
Retourne AuthPayload!
verifyEmail
verifyEmail(token: String!): Boolean!Arguments
| token | String! |
Retourne Boolean!
requestPasswordReset
requestPasswordReset(email: String!, challengeToken: String): Boolean!Arguments
| String! | |
| challengeToken | String |
Retourne Boolean!
resetPassword
resetPassword(token: String!, newPassword: String!): Boolean!Arguments
| token | String! |
| newPassword | String! |
Retourne Boolean!
signin
signin(email: String!, password: String!): SigninResult!Arguments
| String! | |
| password | String! |
Retourne SigninResult!
verifyTwoFactor
verifyTwoFactor(challengeToken: String!, code: String!): AuthPayload!Arguments
| challengeToken | String! |
| code | String! |
Retourne AuthPayload!
refreshToken
refreshToken(refreshToken: String!): AuthPayload!Arguments
| refreshToken | String! |
Retourne AuthPayload!
logout
logout(refreshToken: String!): Boolean!Arguments
| refreshToken | String! |
Retourne Boolean!
setupTwoFactor
setupTwoFactor: TwoFactorSetup!Retourne TwoFactorSetup!
enableTwoFactor
enableTwoFactor(secret: String!, code: String!): TwoFactorRecoveryCodes!Arguments
| secret | String! |
| code | String! |
Retourne TwoFactorRecoveryCodes!
disableTwoFactor
disableTwoFactor(code: String!): Boolean!Arguments
| code | String! |
Retourne Boolean!
regenerateRecoveryCodes
regenerateRecoveryCodes(password: String!, code: String!): TwoFactorRecoveryCodes!Arguments
| password | String! |
| code | String! |
Retourne TwoFactorRecoveryCodes!
updateAccount
updateAccount(firstName: String!, lastName: String!, locale: Locale!): User!Arguments
| firstName | String! |
| lastName | String! |
| locale | Locale! |
Retourne User!
changePassword
changePassword(currentPassword: String!, newPassword: String!): Boolean!Arguments
| currentPassword | String! |
| newPassword | String! |
Retourne Boolean!
updateNotificationPreferences
updateNotificationPreferences(preferences: [String!]!): User!Arguments
| preferences | [String!]! |
Retourne User!
updateAccountFeatures
updateAccountFeatures(featureFlags: [String!]!): User!Arguments
| featureFlags | [String!]! |
Retourne User!
revokeSession
revokeSession(id: ID!): Boolean!Arguments
| id | ID! |
Retourne Boolean!
generatePersonalToken
generatePersonalToken(password: String!): AuthPayload!Arguments
| password | String! |
Retourne AuthPayload!
updateUser
updateUser(id: ID!, input: UpdateUserInput!): User!Arguments
| id | ID! |
| input | UpdateUserInput! |
Retourne User!
createMerchant
createMerchant(input: CreateMerchantInput!): Merchant!Arguments
| input | CreateMerchantInput! |
Retourne Merchant!
updateMerchant
updateMerchant(id: ID!, input: UpdateMerchantInput!): Merchant!Arguments
| id | ID! |
| input | UpdateMerchantInput! |
Retourne Merchant!
createProduct
createProduct(merchantId: ID!, input: CreateProductInput!): Product!Arguments
| merchantId | ID! |
| input | CreateProductInput! |
Retourne Product!
updateProduct
updateProduct(id: ID!, input: UpdateProductInput!): Product!Arguments
| id | ID! |
| input | UpdateProductInput! |
Retourne Product!
deleteProduct
deleteProduct(id: ID!): ItemDeleted!Arguments
| id | ID! |
Retourne ItemDeleted!
addMerchantDomain
addMerchantDomain(merchantId: ID!, host: String!): MerchantDomain!Arguments
| merchantId | ID! |
| host | String! |
Retourne MerchantDomain!
verifyMerchantDomain
verifyMerchantDomain(id: ID!): MerchantDomain!Arguments
| id | ID! |
Retourne MerchantDomain!
deleteMerchantDomain
deleteMerchantDomain(id: ID!): ItemDeleted!Arguments
| id | ID! |
Retourne ItemDeleted!
createMerchantVoucher
createMerchantVoucher(merchantId: ID!, input: MerchantVoucherInput!): MerchantVoucher!Arguments
| merchantId | ID! |
| input | MerchantVoucherInput! |
Retourne MerchantVoucher!
updateMerchantVoucher
updateMerchantVoucher(id: ID!, input: MerchantVoucherInput!): MerchantVoucher!Arguments
| id | ID! |
| input | MerchantVoucherInput! |
Retourne MerchantVoucher!
deleteMerchantVoucher
deleteMerchantVoucher(id: ID!): ItemDeleted!Arguments
| id | ID! |
Retourne ItemDeleted!
createTransaction
createTransaction(merchantId: ID!, input: CreateTransactionInput!): Transaction!Arguments
| merchantId | ID! |
| input | CreateTransactionInput! |
Retourne Transaction!
updateTransaction
updateTransaction(merchantId: ID!, transactionId: ID!, input: UpdateTransactionInput!): Transaction!Arguments
| merchantId | ID! |
| transactionId | ID! |
| input | UpdateTransactionInput! |
Retourne Transaction!
requestContractSigningCode
requestContractSigningCode(merchantId: ID!, contractId: ID!, phonePrefix: String!, phoneNumber: String!): ContractCodeResult!Arguments
| merchantId | ID! |
| contractId | ID! |
| phonePrefix | String! |
| phoneNumber | String! |
Retourne ContractCodeResult!
validateContractSigningCode
validateContractSigningCode(merchantId: ID!, contractId: ID!, code: String!): Boolean!Arguments
| merchantId | ID! |
| contractId | ID! |
| code | String! |
Retourne Boolean!
signContract
signContract(merchantId: ID!, contractId: ID!, code: String!, acceptContract: Boolean!): Boolean!Arguments
| merchantId | ID! |
| contractId | ID! |
| code | String! |
| acceptContract | Boolean! |
Retourne Boolean!
markNotificationRead
markNotificationRead(id: ID!): Boolean!Arguments
| id | ID! |
Retourne Boolean!
markAllNotificationsRead
markAllNotificationsRead: Boolean!Retourne Boolean!
submitContactRequest
submitContactRequest(input: ContactRequestInput!): Boolean!Arguments
| input | ContactRequestInput! |
Retourne Boolean!
Types
AuthPayload
type AuthPayload {
token: String!
refreshToken: String!
user: User!
}BasketItem
type BasketItem {
id: ID!
gtin: String!
name: String
price: String!
quantity: Int!
commissionRate: String!
status: EnumValue!
}BillingAddress
type BillingAddress {
companyName: String
firstName: String
lastName: String
linePrimary: String
lineSecondary: String
city: String
state: String
postalCode: String
country: String
}ContractCodeResult
type ContractCodeResult {
expiresAt: String!
}EnumValue
type EnumValue {
code: String!
label: String!
}InvoicePage
type InvoicePage {
items: [MerchantInvoice!]!
currentPage: Int!
totalResults: Int!
totalPages: Int!
}ItemDeleted
type ItemDeleted {
id: ID!
typeName: String!
}Log
type Log {
id: ID!
type: String!
userId: ID
actorType: String!
actorId: ID
actorIpAddress: String
actorUserAgent: String
data: String!
createdAt: String!
}LogPage
type LogPage {
items: [Log!]!
currentPage: Int!
totalResults: Int!
totalPages: Int!
}Merchant
type Merchant {
id: ID!
name: String!
status: EnumValue!
description: Translations!
activityIntroduction: String
websiteUrl: String
logoUrl: String
countries: [String!]!
activityTypes: [String!]!
billingAddress: BillingAddress!
disableInvoicing: Boolean!
owner: MerchantOwner
createdAt: String!
categoryIds: [ID!]!
categories: [MerchantCategory!]!
}MerchantCategory
type MerchantCategory {
id: ID!
name: String!
label: String!
}MerchantContract
type MerchantContract {
id: ID!
contractId: ID!
title: String!
version: String!
fileUrl: String!
fileHash: String!
submittedAt: String!
signed: Boolean!
signedAt: String
signerPhonePrefix: String
signerPhoneNumber: String
codeSentAt: String
}MerchantDomain
type MerchantDomain {
id: ID!
merchantId: ID!
host: String!
status: EnumValue!
verificationToken: String!
txtRecordName: String!
txtRecordValue: String!
verifiedAt: String
createdAt: String!
}MerchantInvoice
type MerchantInvoice {
id: ID!
amount: String!
dueDate: String!
paymentMethod: EnumValue
paymentDate: String
status: EnumValue!
externalInvoiceId: String
pdfUrl: String
createdAt: String!
}MerchantOwner
type MerchantOwner {
email: String!
name: String!
}MerchantPage
type MerchantPage {
items: [Merchant!]!
currentPage: Int!
totalResults: Int!
totalPages: Int!
}MerchantVoucher
type MerchantVoucher {
id: ID!
merchantId: ID!
code: String!
usageConditions: String!
validFrom: String
validUntil: String
createdAt: String!
updatedAt: String!
}MercureSubscription
type MercureSubscription {
hubUrl: String!
token: String!
topic: String!
}Notification
type Notification {
id: ID!
event: EnumValue!
context: String!
hasBeenRead: Boolean!
notifiedAt: String!
}NotificationPage
type NotificationPage {
items: [Notification!]!
currentPage: Int!
totalResults: Int!
totalPages: Int!
}PhonePrefix
type PhonePrefix {
code: String!
prefix: String!
}Product
type Product {
id: ID!
name: Translations!
description: Translations!
price: String!
pricingType: EnumValue!
imageUrls: [String!]!
url: String
originalName: String
requiresTranslation: Boolean!
targetedMarkets: [String!]!
categoryIds: [ID!]!
merchantId: ID!
}ProductPage
type ProductPage {
items: [Product!]!
currentPage: Int!
totalResults: Int!
totalPages: Int!
}ProductSearchResult
type ProductSearchResult {
id: ID!
name: String!
description: String
price: String!
pricingType: EnumValue!
imageUrls: [String!]!
url: String
merchant: ProductSearchResultMerchant!
categories: [PublicProductCategory!]!
}ProductSearchResultMerchant
type ProductSearchResultMerchant {
id: ID!
name: String!
websiteUrl: String
logoUrl: String
}PublicProductCategory
type PublicProductCategory {
id: ID!
name: String!
label: String!
}RefreshToken
type RefreshToken {
id: ID!
device: String
ipAddress: String
location: String
label: String
current: Boolean!
createdAt: String!
}SigninResult
type SigninResult {
twoFactorRequired: Boolean!
challengeToken: String
auth: AuthPayload
}Transaction
type Transaction {
id: ID!
redirectId: ID
merchantName: String!
basketPrice: String!
totalCommission: String!
status: EnumValue!
reward: EnumValue!
basketItemCount: Int!
basketItems: [BasketItem!]!
createdAt: String!
updatedAt: String!
}TransactionDailyStat
type TransactionDailyStat {
date: String!
count: Int!
revenue: String!
reward: String!
redirects: Int!
}TransactionPage
type TransactionPage {
items: [Transaction!]!
currentPage: Int!
totalResults: Int!
totalPages: Int!
}TransactionStats
type TransactionStats {
count: Int!
acceptedCount: Int!
acceptanceRate: Float!
revenue: String!
reward: String!
redirectsCount: Int!
conversionRate: Float!
series: [TransactionDailyStat!]!
}Translations
type Translations {
fr: String
es: String
}TwoFactorRecoveryCodes
type TwoFactorRecoveryCodes {
recoveryCodes: [String!]!
}TwoFactorSetup
type TwoFactorSetup {
secret: String!
qrCodeUri: String!
}User
type User {
id: ID!
email: String!
firstName: String
lastName: String
roles: [String!]!
featureFlags: [String!]!
notificationPreferences: [String!]!
emailVerified: Boolean!
twoFactorEnabled: Boolean!
locale: EnumValue!
status: EnumValue!
createdAt: String!
}UserPage
type UserPage {
items: [User!]!
currentPage: Int!
totalResults: Int!
totalPages: Int!
}Types d'entrée
BillingAddressInput
input BillingAddressInput {
companyName: String
firstName: String
lastName: String
linePrimary: String
lineSecondary: String
city: String
state: String
postalCode: String
country: String
}ContactRequestInput
input ContactRequestInput {
name: String!
email: String!
company: String
phone: String
message: String!
turnstileToken: String
}CreateBasketItemInput
input CreateBasketItemInput {
name: String
gtin: String!
price: String!
quantity: Int!
commissionRate: String!
status: String
}CreateMerchantInput
input CreateMerchantInput {
name: String!
description: TranslationsInput
activityIntroduction: String
websiteUrl: String
logoUrl: String
countries: [String!]
activityTypes: [String!]
billingAddress: BillingAddressInput
categoryIds: [ID!]
}CreateProductInput
input CreateProductInput {
name: TranslationsInput!
description: TranslationsInput
price: String!
pricingType: ProductPricingType
imageUrls: [String!]
url: String
originalName: String
requiresTranslation: Boolean
targetedMarkets: [String!]
categoryIds: [ID!]
}CreateTransactionInput
input CreateTransactionInput {
redirectId: ID
basketItems: [CreateBasketItemInput!]!
}MerchantVoucherInput
input MerchantVoucherInput {
code: String!
usageConditions: String!
validFrom: String
validUntil: String
}TranslationsInput
input TranslationsInput {
fr: String
es: String
}UpdateBasketItemInput
input UpdateBasketItemInput {
id: ID!
status: String!
}UpdateMerchantInput
input UpdateMerchantInput {
name: String
description: TranslationsInput
activityIntroduction: String
websiteUrl: String
logoUrl: String
countries: [String!]
activityTypes: [String!]
billingAddress: BillingAddressInput
categoryIds: [ID!]
status: String
disableInvoicing: Boolean
}UpdateProductInput
input UpdateProductInput {
name: TranslationsInput
description: TranslationsInput
price: String
pricingType: ProductPricingType
imageUrls: [String!]
url: String
originalName: String
requiresTranslation: Boolean
targetedMarkets: [String!]
categoryIds: [ID!]
}UpdateTransactionInput
input UpdateTransactionInput {
basketItems: [UpdateBasketItemInput!]!
}UpdateUserInput
input UpdateUserInput {
firstName: String
lastName: String
email: String
locale: String
emailVerified: Boolean
featureFlags: [String!]
status: String
notificationPreferences: [String!]
}Énumérations
Locale
enum Locale {
FR
ES
}ProductPricingType
enum ProductPricingType {
ONE_TIME_PURCHASE
SUBSCRIPTION_PER_MONTH
SUBSCRIPTION_PER_YEAR
}