{"openapi":"3.0.0","info":{"title":"1071 Small Business Lending Data Collection API","description":"API specification for collecting and managing small business lending application data under Section 1071","version":"1.0"},"servers":[{"url":"https://api.example.com/v1","description":"Production server"}],"paths":{"/application":{"post":{"summary":"Submit a new lending application record","description":"Create a new small business lending application record","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LendingApplication"}}}},"responses":{"201":{"description":"Application successfully created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LendingApplication"}}}},"400":{"description":"Invalid application data"},"422":{"description":"Validation error in application data"}}}},"/application/{uid}":{"get":{"summary":"Retrieve a specific lending application","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string"},"description":"Unique identifier of the application"}],"responses":{"200":{"description":"Application retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LendingApplication"}}}},"404":{"description":"Application not found"}}}}},"components":{"schemas":{"LendingApplication":{"type":"object","required":["uid","app_date","app_method","app_recipient","ct_credit_product","ct_guarantee","ct_loan_term_flag","credit_purpose","amount_applied_for_flag","action_taken","action_taken_date","denial_reasons","pricing_interest_rate_type","pricing_adj_index_name","census_tract_adr_type","gross_annual_revenue_flag","naics_code_flag","number_of_workers","time_in_business_type","business_ownership_status","num_principal_owners_flag"],"properties":{"uid":{"type":"string","minLength":21,"maxLength":45,"pattern":"^[A-Z0-9]+$","description":"Unique identifier for each application","example":"10BX939C5543TQA1144M999143938"},"app_date":{"type":"string","format":"date","description":"Date the application was received","example":"2025-10-01"},"app_method":{"type":"string","enum":["1","2","3","4"],"description":"Application method: 1=In-person, 2=Telephone, 3=Online, 4=Mail","example":"3"},"app_recipient":{"type":"string","enum":["1","2"],"description":"Application recipient: 1=Direct to FI, 2=Via third party","example":"1"},"ct_credit_product":{"type":"string","enum":["1","2","3","4","5","6","7","8","977","988"],"description":"Credit product type","example":"2"},"ct_credit_product_ff":{"type":"string","maxLength":300,"description":"Description of other credit product"},"ct_guarantee":{"type":"string","description":"Type(s) of guarantees (semicolon-separated)","example":"1;3;4"},"ct_guarantee_ff":{"type":"string","maxLength":300,"description":"Description of other guarantee type"},"ct_loan_term_flag":{"type":"string","enum":["900","988","999"],"description":"Loan term flag: 900=Applicable, 988=Not provided, 999=Not applicable","example":"900"},"ct_loan_term":{"type":"integer","minimum":1,"maximum":1200,"description":"Loan term in months","example":36},"credit_purpose":{"type":"string","description":"Credit purpose(s) (semicolon-separated)","example":"5;7"},"credit_purpose_ff":{"type":"string","maxLength":300,"description":"Description of other credit purpose"},"amount_applied_for_flag":{"type":"string","enum":["900","988","999"],"description":"Amount applied for applicability flag","example":"900"},"amount_applied_for":{"type":"number","format":"double","minimum":0,"exclusiveMinimum":true,"description":"Amount applied for in dollars","example":250000},"amount_approved":{"type":"number","format":"double","minimum":0,"exclusiveMinimum":true,"description":"Amount approved in dollars","example":225000},"action_taken":{"type":"string","enum":["1","2","3","4","5"],"description":"Action taken: 1=Originated, 2=Approved not accepted, 3=Denied, 4=Withdrawn, 5=Incomplete","example":"1"},"action_taken_date":{"type":"string","format":"date","description":"Date action was taken","example":"2025-10-25"},"denial_reasons":{"type":"string","description":"Denial reason(s) (semicolon-separated)","example":"4;5"},"pricing_interest_rate_type":{"type":"string","enum":["1","2","3","4","5","6","999"],"description":"Interest rate type","example":"2"},"pricing_adj_index_name":{"type":"string","enum":["1","2","3","4","5","6","7","8","9","10","977","999"],"description":"Index name for adjustable rate","example":"1"},"census_tract_adr_type":{"type":"string","enum":["1","2","3","988"],"description":"Type of address used for census tract","example":"1"},"gross_annual_revenue_flag":{"type":"string","enum":["900","988"],"description":"Gross annual revenue reporting flag","example":"900"},"naics_code_flag":{"type":"string","enum":["900","988"],"description":"NAICS code reporting flag","example":"900"},"number_of_workers":{"type":"string","enum":["1","2","3","4","5","6","7","8","9","988"],"description":"Range of number of workers","example":"4"},"time_in_business_type":{"type":"string","enum":["1","2","3","988"],"description":"Time in business response type","example":"1"},"business_ownership_status":{"type":"string","description":"Business ownership status codes","example":"1;2"},"num_principal_owners_flag":{"type":"string","enum":["900","988"],"description":"Number of principal owners reporting flag","example":"900"},"principal_owners":{"type":"array","maxItems":4,"description":"Array of principal owners (maximum of 4)","items":{"$ref":"#/components/schemas/PrincipalOwner"}}}},"PrincipalOwner":{"type":"object","required":["po_ethnicity","po_race","po_gender_flag"],"properties":{"po_ethnicity":{"type":"string","description":"Ethnicity codes (semicolon-separated)","example":"11;12"},"po_ethnicity_ff":{"type":"string","maxLength":300,"description":"Other Hispanic or Latino ethnicity"},"po_race":{"type":"string","description":"Race codes (semicolon-separated)","example":"21;22"},"po_race_anai_ff":{"type":"string","maxLength":300,"description":"American Indian or Alaska Native Enrolled or Principal Tribe"},"po_race_asian_ff":{"type":"string","maxLength":300,"description":"Other Asian race"},"po_race_baa_ff":{"type":"string","maxLength":300,"description":"Other Black or African American race"},"po_race_pi_ff":{"type":"string","maxLength":300,"description":"Other Pacific Islander race"},"po_gender_flag":{"type":"string","enum":["1","966","988"],"description":"Sex/gender flag: 1=Provided, 966=Declined, 988=Not provided","example":"1"},"po_gender_ff":{"type":"string","maxLength":300,"description":"Self-identified sex/gender"}}}}}}