Connector creation
First step - get connector templates - API Reference
GET https://api.dev.mrkter.io/connector-template
Required "Authorization" header
Required "x-account-id" header
Required "x-session-id" header
Example response:
{
"hasMore": true,
"totalCount": 12,
"items": [
{
"id": 13,
"connectorType": "API",
"accountType": "ADVERTISER",
"dashboardType": "AFFILIATE",
"hasMarketingData": false,
"hasInvoiceData": false,
"isComingSoon": false,
"categories": [
"Invoice Collection"
]
},
{
"id": 12,
"connectorType": "EMAIL",
"accountType": "ADVERTISER",
"dashboardType": "AFFILIATE",
"hasMarketingData": false,
"hasInvoiceData": false,
"isComingSoon": false,
"categories": [
"Email"
]
}
]
}Next step - create dashboard - API Reference
POST https://api.dev.mrkter.io/dashboard
Required "Authorization" header
Required "x-account-id" header
Required "x-session-id" header
Example request:
{
"name": "Test Example"
}Example response:
{
"id": 972,
"dashboardTemplateId": 1,
"accountId": 1,
"accountType": "ADVERTISER",
"dashboardType": "AFFILIATE",
"name": "test",
"createdAt": "2025-05-20T09:37:52.972Z",
"updatedAt": "2025-05-20T09:37:52.972Z"
}Next step - get connector config schema - API Reference
GET https://api.dev.mrkter.io/connector-template/{connectorTemplateId}/configSchema
Required "Authorization" header
Required "x-account-id" header
Required "x-session-id" header
Example for EMAIL connector:
https://api.dev.mrkter.io/connector-template/12/configSchema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/InboundMailboxConfig",
"definitions": {
"InboundMailboxConfig": {
"type": "object",
"properties": {
"inboundMailboxes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"department": {
"$ref": "#/definitions/DepartmentType"
},
"slug": {
"type": "string"
}
},
"required": [
"department",
"slug"
],
"additionalProperties": false
}
}
},
"required": [
"inboundMailboxes"
],
"additionalProperties": false
},
"DepartmentType": {
"$ref": "#/definitions/%24Enums.DepartmentType"
},
"$Enums.DepartmentType": {
"type": "string",
"enum": [
"ALL",
"HR",
"FINANCE",
"MARKETING",
"SALES",
"ACCOUNTING"
]
}
}
}Its mean in next step you must provide object in config parameter like this:
{
"inboundMailboxes": {
"department": "FINANCE",
"slug": "123123"
}
}If you get response like this:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/ApiConfig",
"definitions": {
"ApiConfig": {
"type": "object",
"additionalProperties": false
}
}
}You must provide config like this:
{
"scope": "CONNECTOR"
}Next step - you must validate config - API Reference
POST https://api.dev.mrkter.io/connector-template/{connectorTemplateId}/check
Required "Authorization" header
Required "x-account-id" header
Required "x-session-id" header
Example request:
{
"config": {
"inboundMailboxes": {
"department": "FINANCE",
"slug": "123123"
}
}
}Example success response:
{
"connectionStatus": {
"status": "SUCCEEDED"
},
"type": "CONNECTION_STATUS"
}Next step - specific for email connector we are need check if email address is available - API Reference
POST https://api.dev.mrkter.io/inbound-mailbox/availability
Required "Authorization" header
Required "x-account-id" header
Required "x-session-id" header
Example request:
{
"department": "ALL",
"slug": "123123"
}Example success response:
{
"success": true,
"message": "The email is available."
}Next step - create connector - API Reference
POST https://api.dev.mrkter.io/dashboard/{dashboardId}/connector
Required "Authorization" header
Required "x-account-id" header
Required "x-session-id" header
Example request:
{
"connectorTemplateId": 13,
"config": {
"scope": "CONNECTOR"
},
"fetchInvoiceData": true,
"fetchMarketingData": true,
"name": "test",
"status": "DRAFT"
}Example response:
{
"id": 969,
"accountId": 1,
"dashboardId": 977,
"accountType": "ADVERTISER",
"dashboardType": "AFFILIATE",
"connectorType": "API",
"connectorTemplateId": 13,
"name": "test",
"hasMarketingData": false,
"hasInvoiceData": false,
"fetchMarketingData": false,
"fetchInvoiceData": false,
"dataUpdatedAt": null,
"createdAt": "2025-05-20T10:41:30.198Z",
"updatedAt": "2025-05-20T10:41:30.198Z",
"status": "DRAFT",
"isApiEnabled": false
}Next step - save invoice settings for connector - API Reference
POST https://api.dev.mrkter.io/invoice-settings/connector/{id}
Required "Authorization" header
Required "x-account-id" header
Required "x-session-id" header
Example request:
{
"currentStep": "ConnectorConnection",
"connectorName": "string",
"connectorCoreDepartment": "string",
"selfInvoiceSettingCurrenciesPreferences": [
"USD",
"EUR"
],
"selfInvoiceSettingGenerationSchedule": {
"frequency": "DAILY",
"dailySchedule": {
"hour": 13,
"minute": 15
}
},
"selfInvoiceSettingIssueDateBase": "COMMISSION_END_DATE",
"paymentTermType": "NET",
"paymentTermDays": 5,
"selfInvoiceSettingInvoiceRequiredForPayouts": false,
"selfInvoiceSettingInvoiceMandatoryForCountries": [
"IL",
"US"
],
"selfInvoiceSettingVatSalesTax": false,
"selfInvoiceSettingVatInclusive": "EXCLUSIVE",
"invoiceEditingWorkflowEnabled": true,
"invoiceApprovalWorkflowEnabled": true,
"invoicePayoutWorkflowEnabled": true,
"invoiceEditingPermissionsMode": "SELECTION",
"invoiceApprovalPermissionsMode": "SELECTION",
"invoicePayoutPermissionsMode": "SELECTION",
"payoutsSettingsSchedule": {
"frequency": "DAILY",
"dailySchedule": {
"hour": 13,
"minute": 15
}
},
"wirePaymentTypeSettings": {
"isVerificationRequired": true,
"thresholdAmount": 123.123,
"paymentType": "PAYPAL",
"verificationPermissions": [
{
"verificationType": "USER",
"name": "John Doe",
"verifiedId": 123456
}
],
"supportedCurrencies": [
"USD"
]
},
"cryptoPaymentTypeSettings": {
"isVerificationRequired": true,
"thresholdAmount": 123.123,
"paymentType": "PAYPAL",
"verificationPermissions": [
{
"verificationType": "USER",
"name": "John Doe",
"verifiedId": 123456
}
],
"supportedCurrencies": [
"USD"
]
},
"cryptoPaymentTypeEnabled": true,
"payoneerPaymentTypeSettings": {
"id": 123456,
"accountId": 123456,
"isVerificationRequired": true,
"thresholdAmount": 123.123,
"paymentType": "WIRE_TRANSFER",
"verificationPermissions": [
{
"verificationType": "USER",
"name": "John Doe",
"verifiedId": 123456
}
],
"supportedCurrencies": [
"USD",
"EUR"
]
},
"payoneerPaymentTypeEnabled": true,
"paypalPaymentTypeSettings": {
"id": 123456,
"accountId": 123456,
"isVerificationRequired": true,
"thresholdAmount": 123.123,
"paymentType": "WIRE_TRANSFER",
"verificationPermissions": [
{
"verificationType": "USER",
"name": "John Doe",
"verifiedId": 123456
}
],
"supportedCurrencies": [
"USD",
"EUR"
]
},
"paypalPaymentTypeEnabled": true,
"vendorSettingsProfileCustomizationAccountInfo": true,
"vendorSettingsProfileCustomizationContactInfo": true,
"vendorSettingsProfileCustomizationAccountAddress": true,
"enableVendorAutocreation": true,
"vendorSettingsPaymentMethod": true,
"vendorSettingsPaymentMethodRequired": true,
"vendorSettingsTaxFormCollection": true,
"vendorSettingsTaxFormCollectionRequired": true,
"vendorSettingsPaymentCurrency": true,
"taxSettingsPurposesPayments": [
{
"id": 1
}
],
"taxSettingsPurposePaymentDefaultId": 1,
"taxCollectFromRecipients": "UsAndInternational",
"taxW9FormSubmitted": "Manual",
"taxW9FormApprovePermissions": [
{
"approverId": 1,
"approvalScope": "USER"
}
],
"taxW8FormSubmitted": "Manual",
"taxW8FormApprovePermissions": [
{
"approverId": 1,
"approvalScope": "USER"
}
],
"taxWithoutTaxForm": "Required",
"feeConnectorYourCompany": true,
"feeTransferWireFeeYourCompany": true,
"feeTransferCryptoYourCompany": true,
"feeTransferPayonnerYourCompany": true,
"feeTransferPayPalYourCompany": true,
"feeCurrencyNotDefinedTransferYourCompany": true,
"feeCurrencyNotDefinedConversionYourCompany": true,
"feeAccountVerificationManualUploadYourCompany": true,
"feeAccountVerificationBankLinkageYourCompany": true,
"feeAccountVerificationMicroDepositYourCompany": true,
"feeInvoicingTaxFormsInvoiceGenerationYourCompany": true,
"feeInvoicingTaxFormsCollectionYourCompany": true,
"feeWithholdingVatTaxYourCompany": true,
"feeWithholdingVatVatYourCompany": true,
"feeEWalletPayPalConnectYourCompany": true,
"feeEWalletPayPalTransactionYourCompany": true,
"feeEWalletPayonnerConnectYourCompany": true,
"feeEWalletPayonnerTransactionYourCompany": true,
"feeFiatToCryptoCurrencyYourCompany": true,
"vendorManagementPreference": "MANUAL",
"vendorDataAdditionMethods": [
"CSV"
],
"vendorDataAdditionMethodOther": "string",
"vendorPortalMigrateExistingOther": "string",
"vendorPortalOnboardPreference": "INVITE_ALL",
"vendorPortalMigrateExistingPreferences": [
"CSV"
],
"isApiEnabled": true
}Example response:
{
"clientId": 1,
"vendorId": 1,
"connectorType": "AFFISE",
"connectorTemplateId": 1,
"connectorId": 1,
"configType": "Account",
"currentStep": "ConnectorConnection",
"connectorName": "string",
"connectorCoreDepartment": "string",
"connectorConfig": {
"apiURL": "*",
"apiKey": "*"
},
"selfInvoiceSettingCurrenciesPreferences": [
"USD",
"EUR"
],
"selfInvoiceSettingGenerationSchedule": {
"frequency": "DAILY",
"dailySchedule": {
"hour": 13,
"minute": 15
}
},
"selfInvoiceSettingIssueDateBase": "COMMISSION_END_DATE",
"paymentTermType": "NET",
"paymentTermDays": 5,
"selfInvoiceSettingInvoiceRequiredForPayouts": false,
"selfInvoiceSettingInvoiceMandatoryForCountries": [
"IL",
"US"
],
"selfInvoiceSettingVatSalesTax": false,
"selfInvoiceSettingVatInclusive": true,
"invoiceEditingWorkflowEnabled": true,
"invoiceApprovalWorkflowEnabled": true,
"invoicePayoutWorkflowEnabled": true,
"invoiceEditingPermissionsMode": "SELECTION",
"invoiceApprovalPermissionsMode": "SELECTION",
"invoicePayoutPermissionsMode": "SELECTION",
"invoiceApprovalPermissions": {
"action": "EDIT",
"permissions": [
{
"type": "CAN",
"gte": 100,
"lte": 1000,
"currency": "USD",
"steps": [
{
"stepOrder": 0,
"groups": [
{
"approvalGroupId": 0,
"condition": "AND",
"actors": [
{
"id": 0,
"actorType": "USER"
}
]
}
]
}
]
}
]
},
"invoiceEditPermissions": {
"action": "EDIT",
"permissions": [
{
"type": "CAN",
"gte": 100,
"lte": 1000,
"currency": "USD",
"steps": [
{
"stepOrder": 0,
"groups": [
{
"approvalGroupId": 0,
"condition": "AND",
"actors": [
{
"id": 0,
"actorType": "USER"
}
]
}
]
}
]
}
]
},
"invoicePayoutsPermissions": {
"action": "EDIT",
"permissions": [
{
"type": "CAN",
"gte": 100,
"lte": 1000,
"currency": "USD",
"steps": [
{
"stepOrder": 0,
"groups": [
{
"approvalGroupId": 0,
"condition": "AND",
"actors": [
{
"id": 0,
"actorType": "USER"
}
]
}
]
}
]
}
]
},
"payoutsSettingsSchedule": {
"frequency": "DAILY",
"dailySchedule": {
"minute": 0,
"hour": 0
},
"weeklySchedule": {
"minute": 0,
"hour": 0,
"dayOfWeek": "SUNDAY"
},
"monthlySchedule": {
"minute": 0,
"hour": 0,
"dayOfMonth": 0
},
"twiceAMonthSchedule": {
"first": {
"minute": 0,
"hour": 0,
"dayOfMonth": 0
},
"second": {
"minute": 0,
"hour": 0,
"dayOfMonth": 0
}
}
},
"wirePaymentTypeSettings": {
"id": 123456,
"accountId": 123456,
"isVerificationRequired": true,
"thresholdAmount": 123.123,
"paymentType": "WIRE_TRANSFER",
"verificationPermissions": [
{
"verificationType": "USER",
"name": "John Doe",
"verifiedId": 123456
}
],
"supportedCurrencies": [
"USD",
"EUR"
]
},
"cryptoPaymentTypeSettings": {
"id": 123456,
"accountId": 123456,
"isVerificationRequired": true,
"thresholdAmount": 123.123,
"paymentType": "WIRE_TRANSFER",
"verificationPermissions": [
{
"verificationType": "USER",
"name": "John Doe",
"verifiedId": 123456
}
],
"supportedCurrencies": [
"USD",
"EUR"
]
},
"cryptoPaymentTypeEnabled": true,
"payoneerPaymentTypeSettings": {
"id": 123456,
"accountId": 123456,
"isVerificationRequired": true,
"thresholdAmount": 123.123,
"paymentType": "WIRE_TRANSFER",
"verificationPermissions": [
{
"verificationType": "USER",
"name": "John Doe",
"verifiedId": 123456
}
],
"supportedCurrencies": [
"USD",
"EUR"
]
},
"payoneerPaymentTypeEnabled": true,
"paypalPaymentTypeSettings": {
"id": 123456,
"accountId": 123456,
"isVerificationRequired": true,
"thresholdAmount": 123.123,
"paymentType": "WIRE_TRANSFER",
"verificationPermissions": [
{
"verificationType": "USER",
"name": "John Doe",
"verifiedId": 123456
}
],
"supportedCurrencies": [
"USD",
"EUR"
]
},
"paypalPaymentTypeEnabled": true,
"vendorSettingsProfileCustomization": true,
"vendorSettingsProfileCustomizationAccountInfo": true,
"vendorSettingsProfileCustomizationContactInfo": true,
"vendorSettingsProfileCustomizationAccountAddress": true,
"enableVendorAutocreation": true,
"vendorSettingsProfileCustomizationPaymentMethod": true,
"vendorSettingsTaxFormCollection": true,
"vendorSettingsTaxFormCollectionRequired": true,
"vendorSettingsPaymentCurrency": true,
"taxSettingsPurposesPayments": [
{
"id": 1,
"code": "SM150107",
"description": "Media services and distribution / revenue sharing / streaming platform software",
"additionalDescription": "Revenue sharing"
}
],
"taxSettingsPurposePaymentDefaultId": 1,
"taxCollectFromRecipients": "UsAndInternational",
"taxW9FormSubmitted": "Manual",
"taxW9FormApprovePermissions": [],
"taxW8FormSubmitted": "Manual",
"taxW8FormApprovePermissions": [],
"taxWithoutTaxForm": "Required",
"vendorManagementPreference": "MANUAL",
"vendorDataAdditionMethods": [
"CSV"
],
"vendorDataAdditionMethodOther": {},
"vendorPortalMigrateExistingOther": {},
"vendorPortalOnboardPreference": "INVITE_ALL",
"vendorPortalMigrateExistingPreferences": [
"CSV"
],
"isApiEnabled": true,
"vendorCreationPolicy": {}
}Last step - activate connector - API Reference
PUT https://api.dev.mrkter.io/dashboard/{dashboardId}/connector/{connectorId}/activate
Required "Authorization" header
Required "x-account-id" header
Required "x-session-id" header
If you get 200 status code on request - connector success created.
Updated 7 months ago
