{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nmi/json-schema/nmi-get-sub-affiliates-list-response-schema.json",
  "title": "Response",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nmi-affiliates-api-openapi.yml#/components/schemas/GetSubAffiliatesListResponse",
  "type": "object",
  "properties": {
    "objectType": {
      "type": "string",
      "description": "Type of the object, in this case, 'report'."
    },
    "reportId": {
      "type": "integer",
      "description": "ID for the report."
    },
    "offset": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Offset value for pagination, or null if not used."
    },
    "maxResults": {
      "type": "integer",
      "description": "Maximum number of results per page."
    },
    "totalResults": {
      "type": "integer",
      "description": "Total number of results available for the report."
    },
    "hasMore": {
      "type": "boolean",
      "description": "Indicates if there are more results available beyond the current page."
    },
    "links": {
      "type": "object",
      "title": "Links",
      "description": "Pagination links for navigating through the report results.",
      "properties": {
        "first": {
          "type": "string",
          "format": "uri",
          "description": "URL to the first page of results."
        },
        "last": {
          "type": "string",
          "format": "uri",
          "description": "URL to the last page of results."
        },
        "next": {
          "type": "string",
          "format": "uri",
          "description": "URL to the next page of results."
        },
        "previous": {
          "type": "string",
          "format": "uri",
          "description": "URL to the previous page of results."
        }
      }
    },
    "results": {
      "type": "array",
      "title": "Sub-Affiliates",
      "description": "List of sub-affiliate details.",
      "items": {
        "type": "object",
        "properties": {
          "objectType": {
            "type": "string",
            "description": "Type of the object, typically 'affiliate' for sub-affiliate details."
          },
          "id": {
            "type": "string",
            "description": "ID for the sub-affiliate."
          },
          "firstName": {
            "type": "string",
            "description": "First name of the sub-affiliate."
          },
          "lastName": {
            "type": "string",
            "description": "Last name of the sub-affiliate."
          },
          "company": {
            "type": "string",
            "description": "Company name of the sub-affiliate."
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Email address of the sub-affiliate."
          },
          "replyToEmail": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "description": "Reply-to email address for the sub-affiliate."
          },
          "camAssignedName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the Customer Account Manager (CAM) assigned to the sub-affiliate. CAMs are assigned on top-level partner accounts, so this is null for a sub-affiliate with no CRM account of its own; read the CAM from its parent affiliate in that case."
          },
          "phone": {
            "type": "string",
            "description": "Phone number of the sub-affiliate."
          },
          "fax": {
            "type": [
              "string",
              "null"
            ],
            "description": "Fax number of the sub-affiliate."
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "Website URL of the sub-affiliate."
          },
          "address1": {
            "type": "string",
            "description": "Primary address line for the sub-affiliate."
          },
          "address2": {
            "type": [
              "string",
              "null"
            ],
            "description": "Secondary address line for the sub-affiliate."
          },
          "city": {
            "type": "string",
            "description": "City of the sub-affiliate's address."
          },
          "state": {
            "type": "string",
            "description": "State or region of the sub-affiliate's address."
          },
          "zip": {
            "type": "string",
            "description": "Postal or ZIP code of the sub-affiliate's address."
          },
          "country": {
            "type": "string",
            "description": "Country code of the sub-affiliate's address (ISO 3166-1 alpha-2)."
          },
          "timezone": {
            "type": "string",
            "description": "Time zone of the sub-affiliate."
          },
          "features": {
            "type": "object",
            "title": "Features",
            "description": "Set of features available to the sub-affiliate.",
            "properties": {
              "allowCredits": {
                "type": "boolean",
                "description": "Indicates if the sub-affiliate is allowed to issue credits."
              },
              "canOfferCashDiscount": {
                "type": "boolean",
                "description": "Indicates if the sub-affiliate can offer cash discounts."
              }
            }
          },
          "status": {
            "type": "string",
            "description": "Current status of the sub-affiliate (e.g., active, inactive)."
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the sub-affiliate was created."
          },
          "updated": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the sub-affiliate was last updated."
          },
          "parentAffiliateId": {
            "type": "string",
            "description": "ID for the parent affiliate of the sub-affiliate."
          },
          "support": {
            "type": "object",
            "title": "Support",
            "description": "Contact details for various support roles within the sub-affiliate's organization.",
            "properties": {
              "general": {
                "type": "object",
                "title": "General",
                "description": "General support contact details.",
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "Email address for general support."
                  },
                  "phone": {
                    "type": "string",
                    "description": "Phone number for general support."
                  },
                  "name": {
                    "type": "string",
                    "description": "Name of the general support contact."
                  }
                }
              },
              "check": {
                "type": "object",
                "title": "Check",
                "description": "Check support contact details.",
                "properties": {
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "description": "Email address for check support."
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Phone number for check support."
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Name of the check support contact."
                  }
                }
              },
              "accounting": {
                "type": "object",
                "title": "Accounting",
                "description": "Accounting support contact details.",
                "properties": {
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "description": "Email address for accounting support."
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Phone number for accounting support."
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Name of the accounting support contact."
                  }
                }
              },
              "riskManagement": {
                "type": "object",
                "title": "Risk Management",
                "description": "Risk management support contact details.",
                "properties": {
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "description": "Email address for risk management support."
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Phone number for risk management support."
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Name of the risk management support contact."
                  }
                }
              },
              "accountManagement": {
                "type": "object",
                "title": "Account Management",
                "description": "Account management support contact details.",
                "properties": {
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "description": "Email address for account management support."
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Phone number for account management support."
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Name of the account management support contact."
                  }
                }
              },
              "marketing": {
                "type": "object",
                "title": "Marketing",
                "description": "Marketing support contact details.",
                "properties": {
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "description": "Email address for marketing support."
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Phone number for marketing support."
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Name of the marketing support contact."
                  }
                }
              },
              "technical": {
                "type": "object",
                "title": "Technical",
                "description": "Technical support contact details.",
                "properties": {
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "description": "Email address for technical support."
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Phone number for technical support."
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Name of the technical support contact."
                  }
                }
              },
              "emergency": {
                "type": "object",
                "title": "Emergency",
                "description": "Emergency support contact details.",
                "properties": {
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "description": "Email address for emergency support."
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Phone number for emergency support."
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Name of the emergency support contact."
                  }
                }
              }
            }
          },
          "branding": {
            "type": "object",
            "title": "Branding",
            "description": "Branding information for the sub-affiliate.",
            "properties": {
              "gatewayTitle": {
                "type": "string",
                "description": "Title or name of the gateway as branded by the sub-affiliate."
              },
              "isBranded": {
                "type": "boolean",
                "description": "Indicates if the gateway is branded for the sub-affiliate."
              }
            }
          },
          "accountInfo": {
            "type": "object",
            "title": "Account Info",
            "description": "Account information for the sub-affiliate.",
            "properties": {
              "checkAba": {
                "type": "string",
                "description": "ABA routing number for check transactions."
              },
              "checkAccount": {
                "type": "string",
                "description": "Masked account number for check transactions."
              },
              "legalName": {
                "type": "string",
                "description": "Legal name of the sub-affiliate's business."
              },
              "businessType": {
                "type": "string",
                "description": "Type of business entity (e.g., LLC, Corporation)."
              },
              "taxId": {
                "type": "string",
                "description": "Tax identification number, partially masked."
              }
            }
          },
          "billTo": {
            "type": "string",
            "description": "Billing arrangement for the sub-affiliate (e.g., 'merchant')."
          },
          "rejectedCertificates": {
            "type": "string",
            "description": "Number of rejected certificates associated with the sub-affiliate."
          }
        }
      }
    }
  }
}