{
  "openapi": "3.0.4",
  "info": {
    "title": "Affelios Platform API",
    "version": "v1"
  },
  "paths": {
    "/api/v1/affiliate/import": {
      "post": {
        "tags": [
          "Affiliate"
        ],
        "summary": "Imports affiliate items.",
        "operationId": "AffiliateImportPost",
        "parameters": [
          {
            "name": "X-Api-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Affiliate items.",
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AffiliateImportBody"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AffiliateImportBody"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AffiliateImportBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliateImportResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliateImportResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliateImportResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/customer/{id}": {
      "get": {
        "tags": [
          "Customer"
        ],
        "summary": "Retrieves a customer item.",
        "operationId": "CustomerGet",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique identifier of the customer item.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Api-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliateCustomer"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliateCustomer"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliateCustomer"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Customer"
        ],
        "summary": "Updates a customer item.",
        "operationId": "CustomerPut",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique identifier of the customer item.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Api-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The customer item body.",
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AffiliateCustomerUpdateBody"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AffiliateCustomerUpdateBody"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AffiliateCustomerUpdateBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliateCustomer"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliateCustomer"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliateCustomer"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/customer": {
      "post": {
        "tags": [
          "Customer"
        ],
        "summary": "Creates a new customer item.",
        "operationId": "CustomerPost",
        "parameters": [
          {
            "name": "X-Api-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The new customer item body.",
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AffiliateCustomerBody"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AffiliateCustomerBody"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AffiliateCustomerBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliateCustomer"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliateCustomer"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliateCustomer"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/customer/bulk": {
      "post": {
        "tags": [
          "Customer"
        ],
        "summary": "Creates many new customers from external customer records.",
        "operationId": "CustomerBulkPost",
        "parameters": [
          {
            "name": "X-Api-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "An array of external customers.",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ExternalAffiliateCustomerItem"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ExternalAffiliateCustomerItem"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ExternalAffiliateCustomerItem"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliateCustomerImportResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliateCustomerImportResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliateCustomerImportResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/customer/import": {
      "post": {
        "tags": [
          "Customer"
        ],
        "summary": "Imports customer items.",
        "operationId": "CustomerImportPost",
        "parameters": [
          {
            "name": "X-Api-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Customer items.",
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AffiliateCustomerImportBody"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AffiliateCustomerImportBody"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AffiliateCustomerImportBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliateCustomerImportResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliateCustomerImportResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliateCustomerImportResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/testimonial/list/{operatorId}": {
      "get": {
        "tags": [
          "Testimonial"
        ],
        "summary": "Lists testimonial items.",
        "operationId": "TestimonialListGet",
        "parameters": [
          {
            "name": "operatorId",
            "in": "path",
            "description": "The unique identifier of the operator.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Api-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Testimonial"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transaction": {
      "post": {
        "tags": [
          "Transaction"
        ],
        "summary": "Asynchronously enqueues a request to create a new transaction item.",
        "operationId": "TransactionPost",
        "parameters": [
          {
            "name": "X-Api-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The new transaction item body.",
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/TransactionBody"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/TransactionBody"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/TransactionBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted"
          }
        }
      }
    },
    "/api/v1/transaction/bulk": {
      "post": {
        "tags": [
          "Transaction"
        ],
        "summary": "Asynchronously enqueues a request to create a batch of new transaction items.",
        "operationId": "TransactionBulkPost",
        "parameters": [
          {
            "name": "X-Api-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The new transaction item body batch.",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TransactionBody"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TransactionBody"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TransactionBody"
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted"
          }
        }
      }
    },
    "/api/v1/transaction/{id}": {
      "get": {
        "tags": [
          "Transaction"
        ],
        "summary": "Retrieves a transaction item.",
        "operationId": "TransactionGet",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique identifier of the transaction item.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Api-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AffiliateCustomer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "operatorId": {
            "type": "string",
            "nullable": true
          },
          "updatedTs": {
            "type": "string",
            "format": "date-time"
          },
          "createdTs": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "isIdEmpty": {
            "type": "boolean",
            "readOnly": true
          },
          "createdBy": {
            "type": "string",
            "nullable": true
          },
          "hidden": {
            "type": "boolean"
          },
          "deleted": {
            "type": "boolean"
          },
          "importId": {
            "type": "string",
            "nullable": true
          },
          "externalId": {
            "type": "string",
            "nullable": true
          },
          "externalBrandId": {
            "type": "string",
            "nullable": true
          },
          "username": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          },
          "country_code": {
            "type": "string",
            "nullable": true
          },
          "registerIp": {
            "type": "string",
            "nullable": true
          },
          "registrationDate": {
            "type": "string",
            "format": "date-time"
          },
          "hasDeposited": {
            "type": "boolean"
          },
          "ftdDate": {
            "type": "string",
            "format": "date-time"
          },
          "cpaQualified": {
            "type": "boolean"
          },
          "cpaQualificationDate": {
            "type": "string",
            "format": "date-time"
          },
          "lifetimeRevenue": {
            "type": "number",
            "format": "double"
          },
          "firstDepositAmount": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "firstRevenueAmount": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "lifetimeDeposits": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "lifetimeRevShareCommission": {
            "type": "number",
            "format": "double"
          },
          "lifetimeCpaCommission": {
            "type": "number",
            "format": "double"
          },
          "lifetimeFixedCommission": {
            "type": "number",
            "format": "double"
          },
          "lifetimeCommission": {
            "type": "number",
            "format": "double"
          },
          "tracking": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TrackingDimensions"
              }
            ],
            "nullable": true
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "label": {
            "type": "string",
            "nullable": true
          },
          "revShareExcluded": {
            "type": "boolean"
          },
          "cpaExcluded": {
            "type": "boolean"
          },
          "transactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Transaction"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AffiliateCustomerBody": {
        "required": [
          "brandId",
          "externalId"
        ],
        "type": "object",
        "properties": {
          "externalId": {
            "minLength": 1,
            "type": "string"
          },
          "brandId": {
            "minLength": 1,
            "type": "string"
          },
          "clickKey": {
            "type": "string",
            "nullable": true
          },
          "username": {
            "type": "string",
            "nullable": true
          },
          "registrationDate": {
            "type": "string",
            "format": "date-time"
          },
          "country_code": {
            "type": "string",
            "nullable": true
          },
          "operatorId": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AffiliateCustomerImportBody": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AffiliateCustomerImportLineItem"
            }
          }
        },
        "additionalProperties": false
      },
      "AffiliateCustomerImportLineItem": {
        "required": [
          "affiliateExternalId",
          "externalId",
          "registrationDate"
        ],
        "type": "object",
        "properties": {
          "externalId": {
            "minLength": 1,
            "type": "string"
          },
          "affiliateExternalId": {
            "minLength": 1,
            "type": "string"
          },
          "externalTrackerId": {
            "type": "string",
            "nullable": true
          },
          "username": {
            "type": "string",
            "nullable": true
          },
          "registrationDate": {
            "type": "string",
            "format": "date-time"
          },
          "brandId": {
            "type": "string",
            "nullable": true
          },
          "externalBrandId": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          },
          "revShareExcluded": {
            "type": "boolean"
          },
          "cpaExcluded": {
            "type": "boolean"
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "label": {
            "type": "string",
            "nullable": true
          },
          "customParameter": {
            "type": "string",
            "nullable": true
          },
          "referringUrl": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AffiliateCustomerImportResponse": {
        "type": "object",
        "properties": {
          "numImported": {
            "type": "integer",
            "format": "int32"
          },
          "numDuplicates": {
            "type": "integer",
            "format": "int32"
          },
          "numFailed": {
            "type": "integer",
            "format": "int32"
          },
          "firstFailureId": {
            "type": "string",
            "nullable": true
          },
          "firstFailureMessage": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AffiliateCustomerUpdateBody": {
        "type": "object",
        "properties": {
          "revShareExcluded": {
            "type": "boolean",
            "nullable": true
          },
          "cpaExcluded": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AffiliateImportBody": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AffiliateImportLineItem"
            }
          }
        },
        "additionalProperties": false
      },
      "AffiliateImportLineItem": {
        "required": [
          "balance",
          "email",
          "externalId",
          "name",
          "paid",
          "username"
        ],
        "type": "object",
        "properties": {
          "externalId": {
            "minLength": 1,
            "type": "string"
          },
          "email": {
            "minLength": 1,
            "type": "string"
          },
          "username": {
            "minLength": 1,
            "type": "string"
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "website": {
            "type": "string",
            "nullable": true
          },
          "companyName": {
            "type": "string",
            "nullable": true
          },
          "companyNumber": {
            "type": "string",
            "nullable": true
          },
          "addressLine1": {
            "type": "string",
            "nullable": true
          },
          "addressLine2": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "region": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          },
          "postcode": {
            "type": "string",
            "nullable": true
          },
          "balance": {
            "type": "number",
            "format": "double"
          },
          "paid": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "AffiliateImportResponse": {
        "type": "object",
        "properties": {
          "numImported": {
            "type": "integer",
            "format": "int32"
          },
          "numDuplicates": {
            "type": "integer",
            "format": "int32"
          },
          "numFailed": {
            "type": "integer",
            "format": "int32"
          },
          "firstFailureId": {
            "type": "string",
            "nullable": true
          },
          "firstFailureMessage": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ContactAddress": {
        "type": "object",
        "properties": {
          "addressLine": {
            "type": "string",
            "nullable": true
          },
          "addressLine2": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "region": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          },
          "postcode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ExternalAffiliateCustomerItem": {
        "required": [
          "externalBrandId",
          "externalId",
          "regDate"
        ],
        "type": "object",
        "properties": {
          "externalId": {
            "minLength": 1,
            "type": "string"
          },
          "externalBrandId": {
            "minLength": 1,
            "type": "string"
          },
          "regDate": {
            "minLength": 1,
            "type": "string"
          },
          "clickKey": {
            "type": "string",
            "nullable": true
          },
          "externalProductId": {
            "type": "string",
            "nullable": true
          },
          "username": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          },
          "country_code": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ImageItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "operatorId": {
            "type": "string",
            "nullable": true
          },
          "updatedTs": {
            "type": "string",
            "format": "date-time"
          },
          "createdTs": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "isIdEmpty": {
            "type": "boolean",
            "readOnly": true
          },
          "createdBy": {
            "type": "string",
            "nullable": true
          },
          "hidden": {
            "type": "boolean"
          },
          "deleted": {
            "type": "boolean"
          },
          "url": {
            "type": "string",
            "nullable": true
          },
          "cdnUrl": {
            "type": "string",
            "nullable": true
          },
          "key": {
            "type": "string",
            "nullable": true
          },
          "height": {
            "type": "integer",
            "format": "int32"
          },
          "width": {
            "type": "integer",
            "format": "int32"
          },
          "alt": {
            "type": "string",
            "nullable": true
          },
          "size": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "PaymentTaxId": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "value": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          },
          "stripeId": {
            "type": "string",
            "nullable": true
          },
          "stripeStatus": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PayoutMethod": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "operatorId": {
            "type": "string",
            "nullable": true
          },
          "updatedTs": {
            "type": "string",
            "format": "date-time"
          },
          "createdTs": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "isIdEmpty": {
            "type": "boolean",
            "readOnly": true
          },
          "createdBy": {
            "type": "string",
            "nullable": true
          },
          "hidden": {
            "type": "boolean"
          },
          "deleted": {
            "type": "boolean"
          },
          "companyId": {
            "type": "string",
            "nullable": true
          },
          "companyName": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "payee": {
            "type": "string",
            "nullable": true
          },
          "walletAddress": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "iban": {
            "type": "string",
            "nullable": true
          },
          "swift": {
            "type": "string",
            "nullable": true
          },
          "accountNumber": {
            "type": "string",
            "nullable": true
          },
          "sortcode": {
            "type": "string",
            "nullable": true
          },
          "bankName": {
            "type": "string",
            "nullable": true
          },
          "bankAddress": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ContactAddress"
              }
            ],
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "StatMedia": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "text": {
            "type": "string",
            "nullable": true
          },
          "imageUrl": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Testimonial": {
        "required": [
          "text",
          "url",
          "website"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "operatorId": {
            "type": "string",
            "nullable": true
          },
          "updatedTs": {
            "type": "string",
            "format": "date-time"
          },
          "createdTs": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "isIdEmpty": {
            "type": "boolean",
            "readOnly": true
          },
          "createdBy": {
            "type": "string",
            "nullable": true
          },
          "hidden": {
            "type": "boolean"
          },
          "deleted": {
            "type": "boolean"
          },
          "affiliateId": {
            "type": "string",
            "nullable": true
          },
          "affiliateName": {
            "type": "string",
            "nullable": true
          },
          "image": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ImageItem"
              }
            ],
            "format": "uri",
            "nullable": true
          },
          "text": {
            "minLength": 1,
            "type": "string"
          },
          "website": {
            "minLength": 1,
            "type": "string"
          },
          "url": {
            "minLength": 1,
            "type": "string",
            "format": "uri"
          },
          "approved": {
            "type": "boolean",
            "nullable": true
          },
          "enabled": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TrackingDimensions": {
        "type": "object",
        "properties": {
          "clickId": {
            "type": "string",
            "nullable": true
          },
          "affiliateId": {
            "type": "string",
            "nullable": true
          },
          "affiliateName": {
            "type": "string",
            "nullable": true
          },
          "affiliateTrackerId": {
            "type": "string",
            "nullable": true
          },
          "affiliateTrackerName": {
            "type": "string",
            "nullable": true
          },
          "brandId": {
            "type": "string",
            "nullable": true
          },
          "brandName": {
            "type": "string",
            "nullable": true
          },
          "productId": {
            "type": "string",
            "nullable": true
          },
          "productName": {
            "type": "string",
            "nullable": true
          },
          "mediaId": {
            "type": "string",
            "nullable": true
          },
          "media": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatMedia"
              }
            ],
            "nullable": true
          },
          "customParameter": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "referringUrl": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Transaction": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "operatorId": {
            "type": "string",
            "nullable": true
          },
          "updatedTs": {
            "type": "string",
            "format": "date-time"
          },
          "createdTs": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "isIdEmpty": {
            "type": "boolean",
            "readOnly": true
          },
          "createdBy": {
            "type": "string",
            "nullable": true
          },
          "hidden": {
            "type": "boolean"
          },
          "deleted": {
            "type": "boolean"
          },
          "importId": {
            "type": "string",
            "nullable": true
          },
          "integrationType": {
            "type": "string",
            "nullable": true
          },
          "customerId": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "externalId": {
            "type": "string",
            "nullable": true
          },
          "externalCustomerId": {
            "type": "string",
            "nullable": true
          },
          "externalBrandId": {
            "type": "string",
            "nullable": true
          },
          "externalProductId": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          },
          "country_code": {
            "type": "string",
            "nullable": true
          },
          "depositAmount": {
            "type": "number",
            "format": "double"
          },
          "firstTransaction": {
            "type": "boolean"
          },
          "grossRevenue": {
            "type": "number",
            "format": "double"
          },
          "revenueAmount": {
            "type": "number",
            "format": "double"
          },
          "wageredAmount": {
            "type": "number",
            "format": "double"
          },
          "taxes": {
            "type": "number",
            "format": "double"
          },
          "costOfGoodsSold": {
            "type": "number",
            "format": "double"
          },
          "paymentFees": {
            "type": "number",
            "format": "double"
          },
          "cpaQualified": {
            "type": "boolean"
          },
          "revShareCommission": {
            "type": "number",
            "format": "double"
          },
          "cpaCommission": {
            "type": "number",
            "format": "double"
          },
          "fixedCommission": {
            "type": "number",
            "format": "double"
          },
          "transactionDate": {
            "type": "string",
            "format": "date-time"
          },
          "periodId": {
            "type": "integer",
            "format": "int32"
          },
          "tracking": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TrackingDimensions"
              }
            ],
            "nullable": true
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "label": {
            "type": "string",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "childAffiliateIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "payoutInfo": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionPayoutInfo"
              }
            ],
            "nullable": true
          },
          "planId": {
            "type": "string",
            "nullable": true
          },
          "planName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TransactionBody": {
        "type": "object",
        "properties": {
          "externalId": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "affiliateId": {
            "type": "string",
            "nullable": true
          },
          "clickKey": {
            "type": "string",
            "nullable": true
          },
          "externalCustomerId": {
            "type": "string",
            "nullable": true
          },
          "externalBrandId": {
            "type": "string",
            "nullable": true
          },
          "externalProductId": {
            "type": "string",
            "nullable": true
          },
          "transactionDate": {
            "type": "string",
            "format": "date-time"
          },
          "country": {
            "type": "string",
            "nullable": true
          },
          "country_code": {
            "type": "string",
            "nullable": true
          },
          "depositAmount": {
            "type": "number",
            "format": "double"
          },
          "grossRevenue": {
            "type": "number",
            "format": "double"
          },
          "wageredAmount": {
            "type": "number",
            "format": "double"
          },
          "revShareCommission": {
            "type": "number",
            "format": "double"
          },
          "cpaCommission": {
            "type": "number",
            "format": "double"
          },
          "fixedCommission": {
            "type": "number",
            "format": "double"
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "label": {
            "type": "string",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "operatorId": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TransactionPayoutInfo": {
        "type": "object",
        "properties": {
          "affiliateId": {
            "type": "string",
            "nullable": true
          },
          "affiliateName": {
            "type": "string",
            "nullable": true
          },
          "invoicePeriod": {
            "type": "string",
            "nullable": true
          },
          "invoiceDate": {
            "type": "string",
            "format": "date-time"
          },
          "dueDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "payoutMethod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PayoutMethod"
              }
            ],
            "nullable": true
          },
          "paymentDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "amount": {
            "type": "number",
            "format": "double"
          },
          "tax": {
            "type": "number",
            "format": "double"
          },
          "total": {
            "type": "number",
            "format": "double"
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "website": {
            "type": "string",
            "nullable": true
          },
          "affiliateContact": {
            "type": "string",
            "nullable": true
          },
          "affiliateCompany": {
            "type": "string",
            "nullable": true
          },
          "affiliateCompanyNo": {
            "type": "string",
            "nullable": true
          },
          "affiliateAddress": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ContactAddress"
              }
            ],
            "nullable": true
          },
          "affiliateTaxIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentTaxId"
            },
            "nullable": true
          },
          "affiliateVatRegistered": {
            "type": "boolean",
            "nullable": true
          },
          "affiliateTaxRate": {
            "type": "number",
            "format": "double"
          },
          "companyName": {
            "type": "string",
            "nullable": true
          },
          "companyInvoiceAddress": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ContactAddress"
              }
            ],
            "nullable": true
          },
          "companyTaxIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentTaxId"
            },
            "nullable": true
          },
          "companyNumber": {
            "type": "string",
            "nullable": true
          },
          "accountsEmail": {
            "type": "string",
            "nullable": true
          },
          "currencyCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TransactionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "operatorId": {
            "type": "string",
            "nullable": true
          },
          "updatedTs": {
            "type": "string",
            "format": "date-time"
          },
          "createdTs": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "isIdEmpty": {
            "type": "boolean",
            "readOnly": true
          },
          "createdBy": {
            "type": "string",
            "nullable": true
          },
          "hidden": {
            "type": "boolean"
          },
          "deleted": {
            "type": "boolean"
          },
          "importId": {
            "type": "string",
            "nullable": true
          },
          "integrationType": {
            "type": "string",
            "nullable": true
          },
          "customerId": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "externalId": {
            "type": "string",
            "nullable": true
          },
          "externalCustomerId": {
            "type": "string",
            "nullable": true
          },
          "externalBrandId": {
            "type": "string",
            "nullable": true
          },
          "externalProductId": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          },
          "country_code": {
            "type": "string",
            "nullable": true
          },
          "depositAmount": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "firstTransaction": {
            "type": "boolean"
          },
          "grossRevenue": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "revenueAmount": {
            "type": "number",
            "format": "double"
          },
          "wageredAmount": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "taxes": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "costOfGoodsSold": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "paymentFees": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "cpaQualified": {
            "type": "boolean"
          },
          "revShareCommission": {
            "type": "number",
            "format": "double"
          },
          "cpaCommission": {
            "type": "number",
            "format": "double"
          },
          "fixedCommission": {
            "type": "number",
            "format": "double"
          },
          "transactionDate": {
            "type": "string",
            "format": "date-time"
          },
          "tracking": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TrackingDimensions"
              }
            ],
            "nullable": true
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "label": {
            "type": "string",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "childAffiliateIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "payoutInfo": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionPayoutInfo"
              }
            ],
            "nullable": true
          },
          "planId": {
            "type": "string",
            "nullable": true
          },
          "planName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "apiKey",
        "description": "JWT Authorization header using the Bearer scheme. Example: \"Authorization: Bearer {token}\"",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "Bearer": [ ]
    }
  ]
}