{"openapi":"3.0.0","servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/Break-the-Mould-Limi/aai_party_model/1.0.0"}],"info":{"description":"This is a simple API","version":"1.0.0","title":"AAI Single View Party Data Model API","contact":{"email":"you@your-company.com"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"tags":[{"name":"admins","description":"Secured Admin-only calls"},{"name":"developers","description":"Operations available to regular developers"}],"paths":{"/party":{"get":{"tags":["developers"],"summary":"searches party","operationId":"searchInventory","description":"By passing in the appropriate options, you can search for\navailable inventory in the system\n","parameters":[{"in":"query","name":"searchString","description":"pass an optional search string for looking up party","required":false,"schema":{"type":"string"}},{"in":"query","name":"skip","description":"number of records to skip for pagination","schema":{"type":"integer","format":"int32","minimum":0}},{"in":"query","name":"limit","description":"maximum number of records to return","schema":{"type":"integer","format":"int32","minimum":0,"maximum":50}}],"responses":{"200":{"description":"search results matching criteria","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PartyModel"}}}}},"400":{"description":"bad input parameter"}}}}},"components":{"schemas":{"PartyModel":{"type":"object","required":["party_group_identifier","party_snapshot_date"],"properties":{"party_group_identifier":{"type":"string","format":"uuid","example":"d290f1ee-6c54-4b01-90e6-d701748f0851","description":"The unique identifier for the party group."},"party_snapshot_date":{"type":"string","format":"date-time","example":"2023-08-29T09:12:33+00:00","description":"The date and time when the party snapshot was taken.","pattern":"^\\\\d{4}-\\\\d{2}-\\\\d{2}[Tt]\\\\d{2}:\\\\d{2}:\\\\d{2}(\\\\.\\\\d{3})?[Zz]$"},"persons":{"type":"array","items":{"$ref":"#/components/schemas/Person"}},"addresses":{"type":"array","items":{"$ref":"#/components/schemas/Address"}},"email_addresses":{"type":"array","items":{"$ref":"#/components/schemas/EmailAddressDetailed"}},"phone_numbers":{"type":"array","items":{"$ref":"#/components/schemas/PhoneNumberDetailed"}},"profiles":{"type":"array","items":{"$ref":"#/components/schemas/Profile"}}}},"Person":{"type":"object","required":["party_identifier","first_name","last_name"],"properties":{"party_identifier":{"type":"string","format":"uuid","example":"d290f1ee-6c54-4b01-90e6-d701748f0851","description":"The unique identifier for the person."},"first_name":{"type":"string","example":"Matt","description":"The first name of the person."},"last_name":{"type":"string","example":"Bannister","description":"The last name of the person."},"salutation":{"type":"string","example":"Mr","description":"The salutation of the person."},"demographics":{"$ref":"#/components/schemas/Demographics"}}},"Address":{"type":"object","properties":{"street_address":{"type":"string","description":"The street address for the address."},"rural_district":{"type":"string","description":"The rural district for the address."},"suburb":{"type":"string","description":"The suburb for the address."},"city":{"type":"string","description":"The city for the address."},"post_code":{"type":"string","description":"The postal code for the address.","maxLength":4},"country":{"type":"string","description":"The country for the address."}}},"EmailAddressDetailed":{"type":"object","properties":{"email_address":{"type":"string","example":"matt.bannister@gmail.com","description":"The email address.","pattern":"^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Z|a-z]{2,}$"},"recipient_type":{"type":"string","description":"The recipient type for the email address."},"email_domain":{"type":"string","description":"The domain of the email address."}}},"PhoneNumberDetailed":{"type":"object","properties":{"phone_type":{"type":"string","example":"mobile","description":"The type of phone number."},"phone_number":{"type":"string","example":49566364,"description":"The phone number."},"phone_parameters":{"$ref":"#/components/schemas/PhoneParameters"}}},"PhoneParameters":{"type":"object","properties":{"country_code":{"type":"string","example":64,"description":"The country code for the phone number."},"area_code":{"type":"string","example":27,"maxLength":3,"description":"The area code for the phone number."},"dial_number":{"type":"string","example":5051234,"maxLength":8,"description":"The dial number for the phone number."},"extension":{"type":"string","description":"The extension for the phone number."}}},"Demographics":{"type":"object","properties":{"date_of_birth":{"type":"string","format":"date","example":"1973-01-24","description":"The date of birth for the person.","pattern":"^\\\\d{4}-\\\\d{2}-\\\\d{2}$"}}},"Profile":{"type":"object","properties":{"person":{"$ref":"#/components/schemas/PersonDetail"},"profile_type":{"type":"string","example":"Organisation"},"organisation":{"$ref":"#/components/schemas/Organisation"},"product_portfolio":{"type":"array","items":{"$ref":"#/components/schemas/ProductPorfolio"}}}},"PersonDetail":{"type":"object","required":["party_identifier","first_name","last_name"],"properties":{"party_identifier":{"type":"string","format":"uuid","example":"d290f1ee-6c54-4b01-90e6-d701748f0851","description":"The unique identifier for the person."},"first_name":{"type":"string","example":"Matt","description":"The first name of the person."},"last_name":{"type":"string","example":"Bannister","description":"The last name of the person."},"salutation":{"type":"string","example":"Mr","description":"The salutation of the person."},"demographics":{"$ref":"#/components/schemas/Demographics"}}},"Organisation":{"type":"object","properties":{"organisation_category":{"type":"string","example":"commercial enterprise"},"organisation_type":{"type":"string","example":"limited company"},"trading_name":{"type":"string","example":"Selwyn's Lid"},"legal_name":{"type":"string","example":"Selwyn's Accountants Limited"},"ird_number":{"type":"string","example":"406-123-444"},"nzbn_number":{"type":"string","example":"NZB54656445"},"firmographics":{"$ref":"#/components/schemas/Firmographics"}}},"Firmographics":{"type":"object","properties":{"industry_classification":{"type":"string","example":"ISIC"},"industry_code":{"type":"string","example":6920},"industry_category":{"type":"string","example":"Accounting, Bookkeeping and Auditing"},"business_size":{"type":"string","example":"1-5 Employees"}}},"ProductPorfolio":{"type":"object","properties":{"portfolio_type":{"type":"string","example":"insurance policies"},"system_key":{"type":"string","example":"DC1067777"},"external_reference":{"type":"string","format":"uuid","example":"c5f602b5-2811-4769-8522-05307f809b0c"},"portfolio_products":{"type":"array","items":{"$ref":"#/components/schemas/PortfolioProduct"}}}},"PortfolioProduct":{"type":"object","properties":{"product_reference":{"type":"string","example":"AMIQ12345","description":"The human readable product reference for the portfolio product."},"product_status":{"type":"string","example":"QUOTED","description":"The product status for the portfolio product.","enum":["QUOTED","BOUGHT","EXPIRED","REFERRAL"]},"product_created":{"type":"string","example":"2023-04-21","description":"This is the date that the product was created in the system.","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"product_expiry":{"type":"string","example":"2023-05-05","description":"This is the date that the product has expired from being valid. If the product is in a state of QUOTED then the expiry might be when the quote expires.","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"product_description":{"type":"string","example":"MAZDA MPV 2005, KHE101, 27 NAPIER AVENUE, TAKAPUNA, 0622","description":"This is generally a concatenated human readable description of a product that can be recognised without having to go into the detail of the product."},"product_entities":{"type":"array","description":"These are all the parties related to a product along with their product specific party role(s).","items":{"$ref":"#/components/schemas/ProductEntities"}},"product_activities":{"type":"array","description":"These are the activities that are related to a product. For example, an insurance policy has activities such as claims whereas for roadside assistance, the activity might be a callout for breakdown recovery.","items":{"$ref":"#/components/schemas/ProductActivities"}}}},"ProductEntities":{"type":"object","properties":{"person":{"$ref":"#/components/schemas/Person"},"email_address":{"type":"string","example":"matt.bannister@gmail.com"},"phone_number":{"type":"string","example":49566364},"party_roles":{"type":"array","description":"A list of the product-specific roles for this person associated with the product.","items":{"type":"string"},"example":["PRIMARY POLICY HOLDER"]}}},"ProductActivities":{"type":"object","properties":{"activity_type":{"type":"string","example":"insurance claims","description":"The type of activity."},"system_key":{"type":"string","example":"guide12345","description":"The system key for the activity."},"external_reference":{"type":"string","example":"6b54f958-778a-4136-a756-4355cd189578","description":"The external reference for the activity.","format":"uuid"},"activities":{"type":"array","description":"The list of activities related to the product.","items":{"$ref":"#/components/schemas/ActivityDetail"}}}},"ActivityDetail":{"type":"object","required":["activity_reference","activity_status","activity_description","activity_created","activity_occurred","activity_last_updated"],"properties":{"activity_reference":{"type":"string","example":"claim1234","description":"The human-readable reference used for an activity, such as a claim reference."},"activity_status":{"type":"string","example":"CLOSED","description":"The status of the activity.","enum":["OPEN","CLOSED","PENDING","CANCELLED"]},"activity_description":{"type":"string","example":"Accidental Collision with a Bus","description":"A description of the activity."},"activity_created":{"type":"string","example":"2023-08-29T09:12:33+00:00","description":"The date and time when the activity was created in the system.","pattern":"^\\\\d{4}-\\\\d{2}-\\\\d{2}[Tt]\\\\d{2}:\\\\d{2}:\\\\d{2}(\\\\.\\\\d{3})?[Zz]$"},"activity_occurred":{"type":"string","example":"2023-08-29T09:12:33+00:00","description":"The date and time when the activity occurred.","pattern":"^\\\\d{4}-\\\\d{2}-\\\\d{2}[Tt]\\\\d{2}:\\\\d{2}:\\\\d{2}(\\\\.\\\\d{3})?[Zz]$"},"activity_last_updated":{"type":"string","example":"2023-08-29T09:12:33+00:00","description":"The date and time when the activity was last updated.","pattern":"^\\\\d{4}-\\\\d{2}-\\\\d{2}[Tt]\\\\d{2}:\\\\d{2}:\\\\d{2}(\\\\.\\\\d{3})?[Zz]$"}}}}}}