{"openapi":"3.0.0","servers":[{"url":"https://portal.1naturalway.com","description":"Main Production Server","variables":{}}],"info":{"version":"1.0.0","title":"1 Natural Way Public API","description":"","termsOfService":"","contact":{}},"tags":[{"name":"Contacts"},{"name":"States"},{"name":"Insurance Companies"}],"paths":{"/api/v1/public/insurance-companies":{"get":{"summary":"List all insurance companies","tags":["Insurance Companies"],"parameters":[{"in":"header","name":"Accept","required":true,"style":"simple","schema":{"type":"string","example":"application/json"}},{"in":"header","name":"Content-Type","required":true,"style":"simple","schema":{"type":"string","example":"application/json"}},{"in":"query","name":"group_id","description":"Providing group_id of 3 will filter out insurance company list down to just payers that we accept and have contracts with.","required":true,"schema":{"type":"string"},"example":"3"},{"in":"query","name":"with","schema":{"type":"array","items":{"type":"string","enum":["states"]}}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InsuranceCompany"}},"example":[{"id":1,"name":"AETNA"},{"id":2,"name":"AETNA - ALLIED HEALTH BENEFITS"}]}}}}}},"/api/v1/public/states":{"get":{"summary":"List all states","tags":["States"],"parameters":[{"in":"header","name":"Accept","required":true,"style":"simple","schema":{"type":"string","example":"application/json"}},{"in":"header","name":"Content-Type","required":true,"style":"simple","schema":{"type":"string","example":"application/json"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/State"}},"example":[{"id":1,"state":"Alabama","abbreviation":"AL"},{"id":2,"state":"Alaska","abbreviation":"AK"}]}}}}}},"/api/v1/public/contacts":{"post":{"summary":"Create a new contact","tags":["Contacts"],"parameters":[{"in":"header","name":"Accept","required":true,"style":"simple","schema":{"type":"string","example":"application/json"}},{"in":"header","name":"Content-Type","required":true,"style":"simple","schema":{"type":"string","example":"application/json"}}],"operationId":"CreateContact","responses":{"201":{"description":"Created"}},"requestBody":{"description":"Create a new contact record.","required":true,"content":{"application/json":{"example":{"first_name":"Jane","last_name":"Doe","email_address":"jane.doe@example.com","phone":"8888888888","date_of_birth":"1900-01-01","expected_due_date":"2021-01-01","lead_source_id":123,"insurance":{"name":"AETNA","identification_number":"123456789","group_number":"000001","phone":"8888888888"},"shipping_address":{"street_address_1":"123 Main Street","street_address_2":"Apartment D","city":"Maumee","state":"Ohio","postal_code":"43537"},"physician":{"first_name":"John","last_name":"Doe","phone":"8888888888","npi_number":"1111111111"}},"schema":{"$ref":"#/components/schemas/CreateContactRequest"}}}}}}},"components":{"schemas":{"CreateContactRequest":{"type":"object","required":["first_name","last_name","email_address","phone","date_of_birth","due_date","lead_source_id"],"properties":{"first_name":{"type":"string","example":"Jane"},"last_name":{"type":"string","example":"Doe"},"email_address":{"type":"string","format":"email","example":"jane.doe@example.com"},"phone":{"type":"string","example":"8888888888","pattern":"/^\\d{10}$/"},"date_of_birth":{"type":"string","format":"date","example":"1980-01-01"},"due_date":{"type":"string","format":"date","example":"2021-01-01"},"lead_source_id":{"type":"integer"},"insurance":{"type":"object","required":["name"],"properties":{"name":{"type":"string","example":"AETNA"},"identification_number":{"type":"string","example":"123456789"},"group_number":{"type":"string","example":"00005"},"phone":{"type":"string","example":"8888888888","pattern":"/^\\d{10}$/"}}},"shipping_address":{"type":"object","required":["state"],"properties":{"street_address_1":{"type":"string","example":"123 Main Street"},"street_address_2":{"type":"string","example":"Apartment D"},"city":{"type":"string","example":"Maumee"},"state":{"type":"string","example":"Ohio"},"postal_code":{"type":"string","example":"88888","pattern":"/^\\d{5}$/"}}},"physician":{"type":"object","properties":{"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"phone":{"type":"string","example":"8888888888","pattern":"/^\\d{10}$/"},"npi_number":{"type":"string","example":"8888888888","pattern":"/^\\d{10}$/"}}}}},"InsuranceCompany":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"State":{"type":"object","properties":{"id":{"type":"integer"},"state":{"type":"string"},"abbreviation":{"type":"string","maxLength":2,"minLength":2}}}}}}