{"openapi":"3.0.0","info":{"version":"1.0.0","title":"Swallow API","termsOfService":"https://swallow.app/terms","contact":{"email":"contact@llow.io"}},"servers":[{"url":"https://api.llow.io"}],"paths":{"/sw/quotes":{"get":{"summary":"Return all priced quotes","parameters":[{"name":"company_reference","in":"query","description":"Company reference. It is a UUID.","schema":{"type":"string","example":"86c575d2-b6b9-44ed-9c75-8d705b987ec1"}},{"name":"project_reference","in":"query","description":"Project reference. It is a UUID.","schema":{"type":"string","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"}},{"name":"version_reference","in":"query","description":"Project version reference. It is a UUID.","schema":{"type":"string","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"}},{"name":"since","in":"query","schema":{"type":"string","example":"-"}},{"name":"search","in":"query","description":"This is a search term use to find a quote. It searches all defined input indictors.","schema":{"type":"string","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"}},{"name":"lite","in":"query","schema":{"type":"string","example":"-"}}],"responses":{"200":{"description":"/sw/quotes response","content":{"application/json":{"schema":{"type":"object","properties":{"quote_reference":{"type":"string","description":"Quote reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"},"project_reference":{"type":"string","description":"Project reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"},"version_reference":{"type":"string","description":"Project version reference. It is a UUID.","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"},"company_reference":{"type":"string","description":"Company reference. It is a UUID.","example":"86c575d2-b6b9-44ed-9c75-8d705b987ec1"},"version":{"type":"integer","description":"Pricing project version which iterates by +1 every time the project is published.","example":1},"result":{"type":"number","description":"The priced result of the quote","example":400},"valid":{"type":"boolean","description":"The validity of the quote","example":true},"changes":{"type":"array","description":"A list of amendments ot the quote.","items":{"type":"object"}},"refers":{"type":"array","description":"A list of refers on a quote.","items":{"type":"object"}},"exclusions":{"type":"array","description":"A list of exclusions on a quote","items":{"type":"object"}},"excesses":{"type":"array","description":"A list of applied excesses on a quote.","items":{"type":"object"}},"endorsements":{"type":"array","description":"A list of endorsements names on a quote.","items":{"type":"object"}},"indicators":{"type":"string","example":"indicator_value_1::indicator_value_2::indicator_value_3"},"execution_time":{"type":"integer","description":" Time in milliseconds for the quote to return","example":125},"output":{"type":"object","description":"The outputs result of the quote including any defined additional outputs.","example":{"result":100,"valid":true,"tax":15,"commission":21}},"input":{"type":"object","description":"The inputs provided in the initial quote.","example":{"age":23,"name":"Rimmer","email":"cal@cal.com","postcode":"PO343TR"}},"sold_at":{"type":"string","description":"The time of sale","example":"2021-03-22T14:29:22.000Z"},"client_ref":{"type":"string","description":"Quote reference provided by client.","example":"AB_12345"},"created_at":{"type":"string","description":"The time of creation","example":"2021-03-22T14:29:22.000Z"},"updated_at":{"type":"string","description":"The time of creation","example":"2021-04-22T14:29:22.000Z"}}}}}}}}},"/sw/quotes/analytics":{"get":{"summary":"Return all priced quotes analytics","parameters":[{"name":"company_reference","in":"query","description":"Company reference. It is a UUID.","schema":{"type":"string","example":"86c575d2-b6b9-44ed-9c75-8d705b987ec1"}},{"name":"project_reference","in":"query","description":"Project reference. It is a UUID.","schema":{"type":"string","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"}},{"name":"version_reference","in":"query","description":"Project version reference. It is a UUID.","schema":{"type":"string","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"}},{"name":"period","in":"query","schema":{"type":"string","example":"-"}}],"responses":{"200":{"description":"/sw/quotes/analytics response","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"string","example":"-"},"data":{"type":"string","example":[{"date":"-","count":"-"}]}}}}}}}}},"/sw/quotes/large/{quote_reference}":{"get":{"summary":"Return a price quoted details","parameters":[{"name":"quote_reference","in":"path","description":"Quote reference. It is a UUID.","required":true,"schema":{"type":"string","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"}},{"name":"debug","in":"query","description":"Return the detailed quote response","schema":{"type":"string","example":"true"}}],"responses":{"200":{"description":"/sw/quotes/large/{quote_reference} response","content":{"application/json":{"schema":{"type":"object","properties":{"quote_reference":{"type":"string","description":"Quote reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"},"version_reference":{"type":"string","description":"Project version reference. It is a UUID.","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"},"project_reference":{"type":"string","description":"Project reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"},"meta":{"type":"string","example":{"name":"Monthly motor insurance product","project_reference":"56c575d2-b6b9-44ed-9c75-5d705b987ec1","version_reference":"46c575d2-b6b9-44ed-9c75-5d705b987ec1","version":1,"sold_at":"2021-03-22T14:29:22.000Z"}},"input":{"type":"object","description":"The inputs provided in the initial quote.","example":{"age":23,"name":"Rimmer","email":"cal@cal.com","postcode":"PO343TR"}},"output":{"type":"object","description":"The outputs result of the quote including any defined additional outputs.","example":{"result":100,"valid":true,"tax":15,"commission":21}},"children":{"type":"array","description":"A list of modle responses used to build a batch quote","items":{"type":"object"}},"changes":{"type":"array","description":"A list of amendments ot the quote.","items":{"type":"object"}},"debug":{"type":"object","description":"The detailed debug response for the quote.","example":{"endorsements":[],"errors":[],"excesses":[],"exclusions":[],"indicators":{},"meta":{},"refers":[],"steps":{},"timer":[]}},"created_at":{"type":"string","description":"The time of creation","example":"2021-03-22T14:29:22.000Z"},"updated_at":{"type":"string","description":"The time that it was last updated","example":"2021-04-22T14:29:22.000Z"}}}}}}}}},"/sw/quotes/{quote_reference}":{"get":{"summary":"Return a price quoted details","parameters":[{"name":"quote_reference","in":"path","description":"Quote reference. It is a UUID.","required":true,"schema":{"type":"string","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"}},{"name":"debug","in":"query","description":"Return the detailed quote response","schema":{"type":"string","example":"true"}}],"responses":{"200":{"description":"/sw/quotes/{quote_reference} response","content":{"application/json":{"schema":{"type":"object","properties":{"quote_reference":{"type":"string","description":"Quote reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"},"version_reference":{"type":"string","description":"Project version reference. It is a UUID.","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"},"project_reference":{"type":"string","description":"Project reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"},"meta":{"type":"string","example":{"name":"Monthly motor insurance product","project_reference":"56c575d2-b6b9-44ed-9c75-5d705b987ec1","version_reference":"46c575d2-b6b9-44ed-9c75-5d705b987ec1","version":1,"sold_at":"2021-03-22T14:29:22.000Z"}},"input":{"type":"object","description":"The inputs provided in the initial quote.","example":{"age":23,"name":"Rimmer","email":"cal@cal.com","postcode":"PO343TR"}},"output":{"type":"object","description":"The outputs result of the quote including any defined additional outputs.","example":{"result":100,"valid":true,"tax":15,"commission":21}},"children":{"type":"array","description":"A list of modle responses used to build a batch quote","items":{"type":"object"}},"changes":{"type":"array","description":"A list of amendments ot the quote.","items":{"type":"object"}},"debug":{"type":"object","description":"The detailed debug response for the quote.","example":{"endorsements":[],"errors":[],"excesses":[],"exclusions":[],"indicators":{},"meta":{},"refers":[],"steps":{},"timer":[]}},"created_at":{"type":"string","description":"The time of creation","example":"2021-03-22T14:29:22.000Z"},"updated_at":{"type":"string","description":"The time that it was last updated","example":"2021-04-22T14:29:22.000Z"}}}}}}}},"put":{"summary":"Update a quote result","parameters":[{"name":"quote_reference","in":"path","description":"Quote reference. It is a UUID.","required":true,"schema":{"type":"string","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"}},{"name":"debug","in":"query","description":"Return the detailed quote response","schema":{"type":"string","example":"true"}}],"responses":{"200":{"description":"/sw/quotes/{quote_reference} response","content":{"application/json":{"schema":{"type":"object","properties":{"quote_reference":{"type":"string","description":"Quote reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"},"project_reference":{"type":"string","description":"Project reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"},"version_reference":{"type":"string","description":"Project version reference. It is a UUID.","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"},"company_reference":{"type":"string","description":"Company reference. It is a UUID.","example":"86c575d2-b6b9-44ed-9c75-8d705b987ec1"},"version":{"type":"integer","description":"Pricing project version which iterates by +1 every time the project is published.","example":1},"result":{"type":"number","description":"The priced result of the quote","example":400},"valid":{"type":"boolean","description":"The validity of the quote","example":true},"changes":{"type":"array","description":"A list of amendments ot the quote.","items":{"type":"object"}},"refers":{"type":"array","description":"A list of refers on a quote.","items":{"type":"object"}},"exclusions":{"type":"array","description":"A list of exclusions on a quote","items":{"type":"object"}},"excesses":{"type":"array","description":"A list of applied excesses on a quote.","items":{"type":"object"}},"endorsements":{"type":"array","description":"A list of endorsements names on a quote.","items":{"type":"object"}},"indicators":{"type":"string","example":"indicator_value_1::indicator_value_2::indicator_value_3"},"execution_time":{"type":"integer","description":" Time in milliseconds for the quote to return","example":125},"output":{"type":"object","description":"The outputs result of the quote including any defined additional outputs.","example":{"result":100,"valid":true,"tax":15,"commission":21}},"input":{"type":"object","description":"The inputs provided in the initial quote.","example":{"age":23,"name":"Rimmer","email":"cal@cal.com","postcode":"PO343TR"}},"sold_at":{"type":"string","description":"The time of sale","example":"2021-03-22T14:29:22.000Z"},"client_ref":{"type":"string","description":"Quote reference provided by client.","example":"AB_12345"},"created_at":{"type":"string","description":"The time of creation","example":"2021-03-22T14:29:22.000Z"},"updated_at":{"type":"string","description":"The time of creation","example":"2021-04-22T14:29:22.000Z"}}}}}}},"requestBody":{"description":"put to /sw/quotes/{quote_reference}","content":{"application/json":{"schema":{"properties":{},"type":"object"}}}}}},"/sw/quotes/{project_reference}":{"post":{"summary":"Create a price from a quote","parameters":[{"name":"project_reference","in":"path","description":"Project reference. It is a UUID.","required":true,"schema":{"type":"string","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"}},{"name":"debug","in":"query","description":"Return the detailed quote response","schema":{"type":"string","example":"true"}},{"name":"version_reference","in":"query","description":"Project version reference. It is a UUID.","schema":{"type":"string","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"}},{"name":"source","in":"query","schema":{"type":"string","example":"-"}},{"name":"date","in":"query","schema":{"type":"string","example":"-"}}],"responses":{"200":{"description":"/sw/quotes/{project_reference} response","content":{"application/json":{"schema":{"type":"object","properties":{"quote_reference":{"type":"string","description":"Quote reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"},"project_reference":{"type":"string","description":"Project reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"},"version_reference":{"type":"string","description":"Project version reference. It is a UUID.","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"},"company_reference":{"type":"string","description":"Company reference. It is a UUID.","example":"86c575d2-b6b9-44ed-9c75-8d705b987ec1"},"version":{"type":"integer","description":"Pricing project version which iterates by +1 every time the project is published.","example":1},"result":{"type":"number","description":"The priced result of the quote","example":400},"valid":{"type":"boolean","description":"The validity of the quote","example":true},"changes":{"type":"array","description":"A list of amendments ot the quote.","items":{"type":"object"}},"refers":{"type":"array","description":"A list of refers on a quote.","items":{"type":"object"}},"exclusions":{"type":"array","description":"A list of exclusions on a quote","items":{"type":"object"}},"excesses":{"type":"array","description":"A list of applied excesses on a quote.","items":{"type":"object"}},"endorsements":{"type":"array","description":"A list of endorsements names on a quote.","items":{"type":"object"}},"indicators":{"type":"string","example":"indicator_value_1::indicator_value_2::indicator_value_3"},"execution_time":{"type":"integer","description":" Time in milliseconds for the quote to return","example":125},"output":{"type":"object","description":"The outputs result of the quote including any defined additional outputs.","example":{"result":100,"valid":true,"tax":15,"commission":21}},"input":{"type":"object","description":"The inputs provided in the initial quote.","example":{"age":23,"name":"Rimmer","email":"cal@cal.com","postcode":"PO343TR"}},"sold_at":{"type":"string","description":"The time of sale","example":"2021-03-22T14:29:22.000Z"},"client_ref":{"type":"string","description":"Quote reference provided by client.","example":"AB_12345"},"created_at":{"type":"string","description":"The time of creation","example":"2021-03-22T14:29:22.000Z"},"updated_at":{"type":"string","description":"The time of creation","example":"2021-04-22T14:29:22.000Z"}}}}}}},"requestBody":{"description":"post to /sw/quotes/{project_reference}","content":{"application/json":{"schema":{"properties":{},"type":"object"}}}}}},"/sw/public/quotes/{project_reference}":{"post":{"summary":"Create a price from a quote (public)","parameters":[{"name":"project_reference","in":"path","description":"Project reference. It is a UUID.","required":true,"schema":{"type":"string","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"}},{"name":"debug","in":"query","description":"Return the detailed quote response","schema":{"type":"string","example":"true"}},{"name":"version_reference","in":"query","description":"Project version reference. It is a UUID.","schema":{"type":"string","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"}},{"name":"source","in":"query","schema":{"type":"string","example":"-"}},{"name":"date","in":"query","schema":{"type":"string","example":"-"}}],"responses":{"200":{"description":"/sw/public/quotes/{project_reference} response","content":{"application/json":{"schema":{"type":"object","properties":{"quote_reference":{"type":"string","description":"Quote reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"},"project_reference":{"type":"string","description":"Project reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"},"version_reference":{"type":"string","description":"Project version reference. It is a UUID.","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"},"company_reference":{"type":"string","description":"Company reference. It is a UUID.","example":"86c575d2-b6b9-44ed-9c75-8d705b987ec1"},"version":{"type":"integer","description":"Pricing project version which iterates by +1 every time the project is published.","example":1},"result":{"type":"number","description":"The priced result of the quote","example":400},"valid":{"type":"boolean","description":"The validity of the quote","example":true},"changes":{"type":"array","description":"A list of amendments ot the quote.","items":{"type":"object"}},"refers":{"type":"array","description":"A list of refers on a quote.","items":{"type":"object"}},"exclusions":{"type":"array","description":"A list of exclusions on a quote","items":{"type":"object"}},"excesses":{"type":"array","description":"A list of applied excesses on a quote.","items":{"type":"object"}},"endorsements":{"type":"array","description":"A list of endorsements names on a quote.","items":{"type":"object"}},"indicators":{"type":"string","example":"indicator_value_1::indicator_value_2::indicator_value_3"},"execution_time":{"type":"integer","description":" Time in milliseconds for the quote to return","example":125},"output":{"type":"object","description":"The outputs result of the quote including any defined additional outputs.","example":{"result":100,"valid":true,"tax":15,"commission":21}},"input":{"type":"object","description":"The inputs provided in the initial quote.","example":{"age":23,"name":"Rimmer","email":"cal@cal.com","postcode":"PO343TR"}},"sold_at":{"type":"string","description":"The time of sale","example":"2021-03-22T14:29:22.000Z"},"client_ref":{"type":"string","description":"Quote reference provided by client.","example":"AB_12345"},"created_at":{"type":"string","description":"The time of creation","example":"2021-03-22T14:29:22.000Z"},"updated_at":{"type":"string","description":"The time of creation","example":"2021-04-22T14:29:22.000Z"}}}}}}},"requestBody":{"description":"post to /sw/public/quotes/{project_reference}","content":{"application/json":{"schema":{"properties":{"age":{"type":"integer","example":23,"description":"Example age input"},"name":{"type":"string","example":"Smith","description":"Example name input"},"postcode":{"type":"string","example":"SW1A1AA","description":"Example postcode input"},"email":{"type":"string","example":"bob@smith.com","description":"Example email input"}},"type":"object"}}}}}},"/sw/quote-sales":{"post":{"summary":"Record sales for a quote","parameters":[],"responses":{"200":{"description":"/sw/quote-sales response","content":{"application/json":{"schema":{"type":"object","properties":{"quote_reference":{"type":"string","description":"Quote reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"},"sold_at":{"type":"string","description":"The time of sale","example":"2021-03-22T14:29:22.000Z"}}}}}}},"requestBody":{"description":"post to /sw/quote-sales","content":{"application/json":{"schema":{"properties":{"quote_reference":{"type":"string","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1","description":"Quote reference. It is a UUID."},"client_ref":{"type":"string","example":"AB_12345","description":"Quote reference provided by client."},"sold_at":{"type":"string","example":"2021-03-22T14:29:22.000Z","description":"The time of sale"},"unsold_at":{"type":"string","example":"2021-03-22T14:29:22.000Z","description":"The time of sale cancellation"}},"type":"object"}}}}}},"/sw/public/quotes":{"get":{"summary":"Returns latest priced quotes (public)","parameters":[{"name":"project_reference","in":"query","description":"Project reference. It is a UUID.","schema":{"type":"string","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"}},{"name":"version_reference","in":"query","description":"Project version reference. It is a UUID.","schema":{"type":"string","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"}}],"responses":{"200":{"description":"/sw/public/quotes response","content":{"application/json":{"schema":{"type":"object","properties":{"quote_reference":{"type":"string","description":"Quote reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"},"project_reference":{"type":"string","description":"Project reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"},"version_reference":{"type":"string","description":"Project version reference. It is a UUID.","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"},"company_reference":{"type":"string","description":"Company reference. It is a UUID.","example":"86c575d2-b6b9-44ed-9c75-8d705b987ec1"},"version":{"type":"integer","description":"Pricing project version which iterates by +1 every time the project is published.","example":1},"result":{"type":"number","description":"The priced result of the quote","example":400},"valid":{"type":"boolean","description":"The validity of the quote","example":true},"changes":{"type":"array","description":"A list of amendments ot the quote.","items":{"type":"object"}},"refers":{"type":"array","description":"A list of refers on a quote.","items":{"type":"object"}},"exclusions":{"type":"array","description":"A list of exclusions on a quote","items":{"type":"object"}},"excesses":{"type":"array","description":"A list of applied excesses on a quote.","items":{"type":"object"}},"endorsements":{"type":"array","description":"A list of endorsements names on a quote.","items":{"type":"object"}},"indicators":{"type":"string","example":"indicator_value_1::indicator_value_2::indicator_value_3"},"execution_time":{"type":"integer","description":" Time in milliseconds for the quote to return","example":125},"output":{"type":"object","description":"The outputs result of the quote including any defined additional outputs.","example":{"result":100,"valid":true,"tax":15,"commission":21}},"input":{"type":"object","description":"The inputs provided in the initial quote.","example":{"age":23,"name":"Rimmer","email":"cal@cal.com","postcode":"PO343TR"}},"sold_at":{"type":"string","description":"The time of sale","example":"2021-03-22T14:29:22.000Z"},"client_ref":{"type":"string","description":"Quote reference provided by client.","example":"AB_12345"},"created_at":{"type":"string","description":"The time of creation","example":"2021-03-22T14:29:22.000Z"},"updated_at":{"type":"string","description":"The time of creation","example":"2021-04-22T14:29:22.000Z"}}}}}}}}},"/sw/quotes-large/{project_reference}":{"post":{"summary":"Create a price from a quote (debug always via download)","parameters":[{"name":"project_reference","in":"path","description":"Project reference. It is a UUID.","required":true,"schema":{"type":"string","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"}},{"name":"debug","in":"query","description":"Return the detailed quote response","schema":{"type":"string","example":"true"}},{"name":"version_reference","in":"query","description":"Project version reference. It is a UUID.","schema":{"type":"string","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"}},{"name":"source","in":"query","schema":{"type":"string","example":"-"}},{"name":"date","in":"query","schema":{"type":"string","example":"-"}}],"responses":{"200":{"description":"/sw/quotes-large/{project_reference} response","content":{"application/json":{"schema":{"type":"object","properties":{"quote_reference":{"type":"string","description":"Quote reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"},"project_reference":{"type":"string","description":"Project reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"},"version_reference":{"type":"string","description":"Project version reference. It is a UUID.","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"},"company_reference":{"type":"string","description":"Company reference. It is a UUID.","example":"86c575d2-b6b9-44ed-9c75-8d705b987ec1"},"version":{"type":"integer","description":"Pricing project version which iterates by +1 every time the project is published.","example":1},"result":{"type":"number","description":"The priced result of the quote","example":400},"valid":{"type":"boolean","description":"The validity of the quote","example":true},"changes":{"type":"array","description":"A list of amendments ot the quote.","items":{"type":"object"}},"refers":{"type":"array","description":"A list of refers on a quote.","items":{"type":"object"}},"exclusions":{"type":"array","description":"A list of exclusions on a quote","items":{"type":"object"}},"excesses":{"type":"array","description":"A list of applied excesses on a quote.","items":{"type":"object"}},"endorsements":{"type":"array","description":"A list of endorsements names on a quote.","items":{"type":"object"}},"indicators":{"type":"string","example":"indicator_value_1::indicator_value_2::indicator_value_3"},"execution_time":{"type":"integer","description":" Time in milliseconds for the quote to return","example":125},"output":{"type":"object","description":"The outputs result of the quote including any defined additional outputs.","example":{"result":100,"valid":true,"tax":15,"commission":21}},"input":{"type":"object","description":"The inputs provided in the initial quote.","example":{"age":23,"name":"Rimmer","email":"cal@cal.com","postcode":"PO343TR"}},"sold_at":{"type":"string","description":"The time of sale","example":"2021-03-22T14:29:22.000Z"},"client_ref":{"type":"string","description":"Quote reference provided by client.","example":"AB_12345"},"created_at":{"type":"string","description":"The time of creation","example":"2021-03-22T14:29:22.000Z"},"updated_at":{"type":"string","description":"The time of creation","example":"2021-04-22T14:29:22.000Z"}}}}}}},"requestBody":{"description":"post to /sw/quotes-large/{project_reference}","content":{"application/json":{"schema":{"properties":{},"type":"object"}}}}}},"/sw/projects":{"post":{"summary":"Create a new project","parameters":[],"responses":{"200":{"description":"/sw/projects response","content":{"application/json":{"schema":{"type":"object","properties":{"project_reference":{"type":"string","description":"Project reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"},"version_reference":{"type":"string","description":"Project version reference. It is a UUID.","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"},"company_reference":{"type":"string","description":"Company reference. It is a UUID.","example":"86c575d2-b6b9-44ed-9c75-8d705b987ec1"},"editor_reference":{"type":"string","example":"-"},"name":{"type":"string","description":"Pricing project name.","example":"Monthly motor insurance product"},"description":{"type":"string","description":"Pricing project description.","example":"Monthly motor insurance product for the UK market"},"summary":{"type":"string","description":"A html formatted change log of a project version.","example":"<p>Example change log of version</p>"},"version":{"type":"integer","description":"Pricing project version which iterates by +1 every time the project is published.","example":1},"status":{"type":"string","description":"Pricing project published status. It can be in draft, approved, published or subsequently unpublished","example":"draft"},"size":{"type":"number","description":"Pricing project size in MBs.","example":8.6},"is_public":{"type":"boolean","description":"Does this project have a public embedded form public template config","example":false},"public_config":{"type":"object","description":"The public template config","example":{}},"template":{"type":"string","description":"A custom template name","example":"company_name_model"},"type":{"type":"string","description":"A project type","example":"swallow"},"group":{"type":"string","description":"A project group","example":"groupname"},"disabled":{"type":"boolean","description":"Whether the pricing project is disabled. If disabled then the project can not be edited and will not be available to price against.","example":false},"approved_at":{"type":"string","description":"The time that it was approved","example":"2021-04-22T14:29:22.000Z"},"published_at":{"type":"string","description":"The time it was (or will be) published","example":"2021-04-22T14:29:22.000Z"},"updated_at":{"type":"string","description":"The time that it was last updated","example":"2021-04-22T14:29:22.000Z"},"created_at":{"type":"string","description":"The time of creation","example":"2021-03-22T14:29:22.000Z"}}}}}}},"requestBody":{"description":"post to /sw/projects","content":{"application/json":{"schema":{"properties":{"project_reference":{"type":"string","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1","description":"Project reference. It is a UUID."},"version_reference":{"type":"string","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1","description":"Project version reference. It is a UUID."},"company_reference":{"type":"string","example":"86c575d2-b6b9-44ed-9c75-8d705b987ec1","description":"Company reference. It is a UUID."},"editor_reference":{"type":"string","example":"-"},"name":{"type":"string","example":"Monthly motor insurance product","description":"Pricing project name."},"description":{"type":"string","example":"Monthly motor insurance product for the UK market","description":"Pricing project description."},"summary":{"type":"string","example":"<p>Example change log of version</p>","description":"A html formatted change log of a project version."},"version":{"type":"integer","example":1,"description":"Pricing project version which iterates by +1 every time the project is published."},"status":{"type":"string","example":"draft","description":"Pricing project published status. It can be in draft, approved, published or subsequently unpublished"},"size":{"type":"number","example":8.6,"description":"Pricing project size in MBs."},"is_public":{"type":"boolean","example":false,"description":"Does this project have a public embedded form public template config"},"public_config":{"type":"object","example":{},"description":"The public template config"},"template":{"type":"string","example":"company_name_model","description":"A custom template name"},"type":{"type":"string","example":"swallow","description":"A project type"},"group":{"type":"string","example":"groupname","description":"A project group"},"disabled":{"type":"boolean","example":false,"description":"Whether the pricing project is disabled. If disabled then the project can not be edited and will not be available to price against."},"approved_at":{"type":"string","example":"2021-04-22T14:29:22.000Z","description":"The time that it was approved"},"published_at":{"type":"string","example":"2021-04-22T14:29:22.000Z","description":"The time it was (or will be) published"},"updated_at":{"type":"string","example":"2021-04-22T14:29:22.000Z","description":"The time that it was last updated"},"created_at":{"type":"string","example":"2021-03-22T14:29:22.000Z","description":"The time of creation"}},"type":"object"}}}}},"get":{"summary":"Return all pricing project versions","parameters":[{"name":"project_reference","in":"query","description":"Project reference. It is a UUID.","schema":{"type":"string","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"}},{"name":"status","in":"query","description":"Pricing project published status. It can be in draft, approved, published or subsequently unpublished","schema":{"type":"string","example":"draft"}},{"name":"archived","in":"query","schema":{"type":"string","example":"-"}}],"responses":{"200":{"description":"/sw/projects response","content":{"application/json":{"schema":{"type":"object","properties":{"project_reference":{"type":"string","description":"Project reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"},"version_reference":{"type":"string","description":"Project version reference. It is a UUID.","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"},"company_reference":{"type":"string","description":"Company reference. It is a UUID.","example":"86c575d2-b6b9-44ed-9c75-8d705b987ec1"},"editor_reference":{"type":"string","example":"-"},"name":{"type":"string","description":"Pricing project name.","example":"Monthly motor insurance product"},"description":{"type":"string","description":"Pricing project description.","example":"Monthly motor insurance product for the UK market"},"summary":{"type":"string","description":"A html formatted change log of a project version.","example":"<p>Example change log of version</p>"},"version":{"type":"integer","description":"Pricing project version which iterates by +1 every time the project is published.","example":1},"status":{"type":"string","description":"Pricing project published status. It can be in draft, approved, published or subsequently unpublished","example":"draft"},"size":{"type":"number","description":"Pricing project size in MBs.","example":8.6},"is_public":{"type":"boolean","description":"Does this project have a public embedded form public template config","example":false},"public_config":{"type":"object","description":"The public template config","example":{}},"template":{"type":"string","description":"A custom template name","example":"company_name_model"},"type":{"type":"string","description":"A project type","example":"swallow"},"group":{"type":"string","description":"A project group","example":"groupname"},"disabled":{"type":"boolean","description":"Whether the pricing project is disabled. If disabled then the project can not be edited and will not be available to price against.","example":false},"approved_at":{"type":"string","description":"The time that it was approved","example":"2021-04-22T14:29:22.000Z"},"published_at":{"type":"string","description":"The time it was (or will be) published","example":"2021-04-22T14:29:22.000Z"},"updated_at":{"type":"string","description":"The time that it was last updated","example":"2021-04-22T14:29:22.000Z"},"created_at":{"type":"string","description":"The time of creation","example":"2021-03-22T14:29:22.000Z"},"versions":{"type":"array","description":"All previous versions of a project.","items":{"type":"object"}}}}}}}}}},"/sw/projects/versions":{"get":{"summary":"Return all pricing project versions","parameters":[{"name":"project_reference","in":"query","description":"Project reference. It is a UUID.","schema":{"type":"string","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"}},{"name":"version_reference","in":"query","description":"Project version reference. It is a UUID.","schema":{"type":"string","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"}},{"name":"summary","in":"query","description":"A html formatted change log of a project version.","schema":{"type":"string","example":"<p>Example change log of version</p>"}},{"name":"date","in":"query","description":"The time of creation","schema":{"type":"string","example":"2021-03-22T14:29:22.000Z"}}],"responses":{"200":{"description":"/sw/projects/versions response","content":{"application/json":{"schema":{"type":"object","properties":{"project_reference":{"type":"string","description":"Project reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"},"version_reference":{"type":"string","description":"Project version reference. It is a UUID.","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"},"company_reference":{"type":"string","description":"Company reference. It is a UUID.","example":"86c575d2-b6b9-44ed-9c75-8d705b987ec1"},"editor_reference":{"type":"string","example":"-"},"name":{"type":"string","description":"Pricing project name.","example":"Monthly motor insurance product"},"description":{"type":"string","description":"Pricing project description.","example":"Monthly motor insurance product for the UK market"},"summary":{"type":"string","description":"A html formatted change log of a project version.","example":"<p>Example change log of version</p>"},"version":{"type":"integer","description":"Pricing project version which iterates by +1 every time the project is published.","example":1},"status":{"type":"string","description":"Pricing project published status. It can be in draft, approved, published or subsequently unpublished","example":"draft"},"size":{"type":"number","description":"Pricing project size in MBs.","example":8.6},"is_public":{"type":"boolean","description":"Does this project have a public embedded form public template config","example":false},"public_config":{"type":"object","description":"The public template config","example":{}},"template":{"type":"string","description":"A custom template name","example":"company_name_model"},"type":{"type":"string","description":"A project type","example":"swallow"},"group":{"type":"string","description":"A project group","example":"groupname"},"disabled":{"type":"boolean","description":"Whether the pricing project is disabled. If disabled then the project can not be edited and will not be available to price against.","example":false},"approved_at":{"type":"string","description":"The time that it was approved","example":"2021-04-22T14:29:22.000Z"},"published_at":{"type":"string","description":"The time it was (or will be) published","example":"2021-04-22T14:29:22.000Z"},"updated_at":{"type":"string","description":"The time that it was last updated","example":"2021-04-22T14:29:22.000Z"},"created_at":{"type":"string","description":"The time of creation","example":"2021-03-22T14:29:22.000Z"}}}}}}}},"post":{"summary":"Create a new version for a pricing project","parameters":[],"responses":{"200":{"description":"/sw/projects/versions response","content":{"application/json":{"schema":{"type":"object","properties":{"project_reference":{"type":"string","description":"Project reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"},"version_reference":{"type":"string","description":"Project version reference. It is a UUID.","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"},"company_reference":{"type":"string","description":"Company reference. It is a UUID.","example":"86c575d2-b6b9-44ed-9c75-8d705b987ec1"},"editor_reference":{"type":"string","example":"-"},"name":{"type":"string","description":"Pricing project name.","example":"Monthly motor insurance product"},"description":{"type":"string","description":"Pricing project description.","example":"Monthly motor insurance product for the UK market"},"summary":{"type":"string","description":"A html formatted change log of a project version.","example":"<p>Example change log of version</p>"},"version":{"type":"integer","description":"Pricing project version which iterates by +1 every time the project is published.","example":1},"status":{"type":"string","description":"Pricing project published status. It can be in draft, approved, published or subsequently unpublished","example":"draft"},"size":{"type":"number","description":"Pricing project size in MBs.","example":8.6},"is_public":{"type":"boolean","description":"Does this project have a public embedded form public template config","example":false},"public_config":{"type":"object","description":"The public template config","example":{}},"template":{"type":"string","description":"A custom template name","example":"company_name_model"},"type":{"type":"string","description":"A project type","example":"swallow"},"group":{"type":"string","description":"A project group","example":"groupname"},"disabled":{"type":"boolean","description":"Whether the pricing project is disabled. If disabled then the project can not be edited and will not be available to price against.","example":false},"approved_at":{"type":"string","description":"The time that it was approved","example":"2021-04-22T14:29:22.000Z"},"published_at":{"type":"string","description":"The time it was (or will be) published","example":"2021-04-22T14:29:22.000Z"},"updated_at":{"type":"string","description":"The time that it was last updated","example":"2021-04-22T14:29:22.000Z"},"created_at":{"type":"string","description":"The time of creation","example":"2021-03-22T14:29:22.000Z"}}}}}}},"requestBody":{"description":"post to /sw/projects/versions","content":{"application/json":{"schema":{"properties":{"project_reference":{"type":"string","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1","description":"Project reference. It is a UUID."},"name":{"type":"string","example":"Monthly motor insurance product","description":"Pricing project name."},"description":{"type":"string","example":"Monthly motor insurance product for the UK market","description":"Pricing project description."}},"type":"object"}}}}}},"/sw/projects/{project_reference}":{"get":{"summary":"Return the latest pricing project","parameters":[{"name":"project_reference","in":"path","description":"Project reference. It is a UUID.","required":true,"schema":{"type":"string","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"}},{"name":"status","in":"query","description":"Pricing project published status. It can be in draft, approved, published or subsequently unpublished","schema":{"type":"string","example":"draft"}},{"name":"version_reference","in":"query","description":"Project version reference. It is a UUID.","schema":{"type":"string","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"}}],"responses":{"200":{"description":"/sw/projects/{project_reference} response","content":{"application/json":{"schema":{"type":"object","properties":{"project_reference":{"type":"string","description":"Project reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"},"version_reference":{"type":"string","description":"Project version reference. It is a UUID.","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"},"company_reference":{"type":"string","description":"Company reference. It is a UUID.","example":"86c575d2-b6b9-44ed-9c75-8d705b987ec1"},"editor_reference":{"type":"string","example":"-"},"name":{"type":"string","description":"Pricing project name.","example":"Monthly motor insurance product"},"description":{"type":"string","description":"Pricing project description.","example":"Monthly motor insurance product for the UK market"},"summary":{"type":"string","description":"A html formatted change log of a project version.","example":"<p>Example change log of version</p>"},"version":{"type":"integer","description":"Pricing project version which iterates by +1 every time the project is published.","example":1},"status":{"type":"string","description":"Pricing project published status. It can be in draft, approved, published or subsequently unpublished","example":"draft"},"size":{"type":"number","description":"Pricing project size in MBs.","example":8.6},"is_public":{"type":"boolean","description":"Does this project have a public embedded form public template config","example":false},"public_config":{"type":"object","description":"The public template config","example":{}},"template":{"type":"string","description":"A custom template name","example":"company_name_model"},"type":{"type":"string","description":"A project type","example":"swallow"},"group":{"type":"string","description":"A project group","example":"groupname"},"disabled":{"type":"boolean","description":"Whether the pricing project is disabled. If disabled then the project can not be edited and will not be available to price against.","example":false},"approved_at":{"type":"string","description":"The time that it was approved","example":"2021-04-22T14:29:22.000Z"},"published_at":{"type":"string","description":"The time it was (or will be) published","example":"2021-04-22T14:29:22.000Z"},"updated_at":{"type":"string","description":"The time that it was last updated","example":"2021-04-22T14:29:22.000Z"},"created_at":{"type":"string","description":"The time of creation","example":"2021-03-22T14:29:22.000Z"},"versions":{"type":"array","description":"All previous versions of a project.","items":{"type":"object"}}}}}}}}},"put":{"summary":"Update a project to be public (i.e. quote without authentication)","parameters":[{"name":"project_reference","in":"path","description":"Project reference. It is a UUID.","required":true,"schema":{"type":"string","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"}}],"responses":{"200":{"description":"/sw/projects/{project_reference} response","content":{"application/json":{"schema":{"type":"object","properties":{"project_reference":{"type":"string","description":"Project reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"},"version_reference":{"type":"string","description":"Project version reference. It is a UUID.","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"},"company_reference":{"type":"string","description":"Company reference. It is a UUID.","example":"86c575d2-b6b9-44ed-9c75-8d705b987ec1"},"editor_reference":{"type":"string","example":"-"},"name":{"type":"string","description":"Pricing project name.","example":"Monthly motor insurance product"},"description":{"type":"string","description":"Pricing project description.","example":"Monthly motor insurance product for the UK market"},"summary":{"type":"string","description":"A html formatted change log of a project version.","example":"<p>Example change log of version</p>"},"version":{"type":"integer","description":"Pricing project version which iterates by +1 every time the project is published.","example":1},"status":{"type":"string","description":"Pricing project published status. It can be in draft, approved, published or subsequently unpublished","example":"draft"},"size":{"type":"number","description":"Pricing project size in MBs.","example":8.6},"is_public":{"type":"boolean","description":"Does this project have a public embedded form public template config","example":false},"public_config":{"type":"object","description":"The public template config","example":{}},"template":{"type":"string","description":"A custom template name","example":"company_name_model"},"type":{"type":"string","description":"A project type","example":"swallow"},"group":{"type":"string","description":"A project group","example":"groupname"},"disabled":{"type":"boolean","description":"Whether the pricing project is disabled. If disabled then the project can not be edited and will not be available to price against.","example":false},"approved_at":{"type":"string","description":"The time that it was approved","example":"2021-04-22T14:29:22.000Z"},"published_at":{"type":"string","description":"The time it was (or will be) published","example":"2021-04-22T14:29:22.000Z"},"updated_at":{"type":"string","description":"The time that it was last updated","example":"2021-04-22T14:29:22.000Z"},"created_at":{"type":"string","description":"The time of creation","example":"2021-03-22T14:29:22.000Z"},"versions":{"type":"array","description":"All previous versions of a project.","items":{"type":"object"}}}}}}}},"requestBody":{"description":"put to /sw/projects/{project_reference}","content":{"application/json":{"schema":{"properties":{"is_public":{"type":"boolean","example":false,"description":"Does this project have a public embedded form public template config"},"public_config":{"type":"object","example":{},"description":"The public template config"},"template":{"type":"string","example":"company_name_model","description":"A custom template name"},"disabled":{"type":"string","example":"-"},"group":{"type":"string","example":"-"},"type":{"type":"string","example":"-"}},"type":"object"}}}}}},"/sw/projects/versions/{version_reference}":{"get":{"summary":"Return a pricing project version","parameters":[{"name":"version_reference","in":"path","description":"Project version reference. It is a UUID.","required":true,"schema":{"type":"string","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"}},{"name":"lite","in":"query","description":"Whether to return a lite version of the project","schema":{"type":"string","example":"true"}}],"responses":{"200":{"description":"/sw/projects/versions/{version_reference} response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","description":"Meta information about the project. This is used to identify the project and its version.","example":{"name":"Test Project","description":"Project used in all tests","project_reference":"30b06be6-1239-4d3f-8c19-2803c4deab02","updated_at":"2022-12-01T00:00:00Z"}},"tests":{"type":"array","description":"Defined tests for the project that specify the expected input and output results.","items":{"type":"object"}},"modules":{"type":"array","description":"Included sub-projects. They can be accessed by the modules step","items":{"type":"object"}},"packages":{"type":"object","description":"The external packages that Swallow uses as extensions to javascript for expressions and custom code"},"input":{"type":"object","description":"The input json schema for the project. This defines the initial payload to be transformed into a quote price.","example":{"format":{"proposer_name":{"label":"Proposer Name","exp":"({{proposer.name}})","type":"string","def":"Rimmer","index":true},"proposer_email":{"label":"Proposer email","exp":"({{proposer.email}})","type":"string","def":"cal@cal.com","index":true},"proposer_age_yy":{"label":"Proposer Age","exp":"({{proposer.dob.age(YY, start_date)}})","type":"integer","def":18},"proposer_postcode":{"label":"Postcode of where drive lives","exp":"{{address.postcode}}","type":"string","def":"W53RS","index":true},"additional_drivers":{"label":"Additional Drivers","exp":"{{additional_drivers}}","type":"array","def":[],"format_children":"driver_format"},"vehicle_postcode":{"label":"Postcode of where the vehicle is parked","exp":"{{vehicle.postcode}}","type":"string","def":"W53RS"},"min_age_yy":{"label":"Minimum Driver Age","exp":"min([{{proposer.dob.age(YY, start_date)}}, {{additional_drivers.map(dob).age(YY, start_date).min()}}])","type":"integer","def":18},"min_ncd":{"label":"Minimum Driver NCD","exp":"min([{{additional_drivers.map(ncd).min()}},{{proposer.ncd}}])","type":"integer","def":2},"vehicle_age_mm":{"label":"Minimum Vehicle Age (in months)","exp":"{{vehicle.manufacture_date.age(MM, start_date)}}","type":"integer","def":1},"vehicle_value":{"label":"Vehicle value in pounds","exp":"{{vehicle.current_value}}","type":"currency","def":1000},"total_children":{"label":"Total children over all drivers","exp":"({{additional_drivers.sum(children)}}+{{proposer.children}})","type":"integer","def":0},"is_someone_employed":{"label":"Is a driver employed","exp":"({{additional_drivers.filter(employment=E).count()}} > 0 || {{proposer.employment}} === \"E\")","type":"boolean","def":true},"is_vehicle_owner":{"label":"Is driver the vehicle owner","exp":"({{vehicle.is_owner}})","type":"boolean","def":true},"is_home_owner":{"label":"Is driver a home owner","exp":"({{address.is_owner}})","type":"boolean","def":true},"vehicle_body_type":{"label":"The body type of the vehicle","exp":"({{vehicle.body_type}})","type":"string","def":"3DH"},"tax":{"label":"Tax rate as a percentage","exp":null,"type":"decimal","def":0.12,"static":true},"commission":{"label":"Commission rate as a percentage","exp":null,"type":"decimal","def":0.2,"static":true},"base_price":{"label":"The body type of the vehicle","type":"decimal","def":1000,"static":true}},"batch":false,"format_children":{"driver_format":{"ncd":{"label":"NCD","exp":"{{ncd}}","type":"integer","def":0},"children":{"label":"Children","exp":"{{children}}","type":"integer","def":0},"dob":{"label":"Date of Birth","exp":"{{dob}}","type":"date","def":"2000-01-01"},"employment":{"label":"Employment","exp":"{{employment}}","type":"string","def":"U"}}}}},"steps":{"type":"array","description":"The steps that define the transformation of the input into the output. Each step inherits outputs from the previous step. Steps can do various tasks to transform, calculate, enrich and apply decision rules","items":{"type":"object"}},"output":{"type":"object","description":"The output json schema for the quote price. Result and valid properties are required whilst optional additional properties can be defined in the format section.","example":{"format":{"commission":{"label":"Commission","exp":"({{commission_calculation}})","type":"decimal","def":0},"tax":{"label":"Tax","exp":"({{tax_calculation}})","type":"decimal","def":0}},"exports":[],"result":{"key":"result","name":"result","formula":"round(({{tax_calculation}} + {{commission_calculation}} + {{test_calculation}}), 2)","type":"decimal","def":0},"valid":{"key":"valid","name":"valid","exp":"(!{{test_exclusion}})","type":"boolean","def":false}}}}}}}}}},"put":{"summary":"Update a version for a pricing project","parameters":[{"name":"version_reference","in":"path","description":"Project version reference. It is a UUID.","required":true,"schema":{"type":"string","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"}}],"responses":{"200":{"description":"/sw/projects/versions/{version_reference} response","content":{"application/json":{"schema":{"type":"object","properties":{"project_reference":{"type":"string","description":"Project reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"},"version_reference":{"type":"string","description":"Project version reference. It is a UUID.","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"},"company_reference":{"type":"string","description":"Company reference. It is a UUID.","example":"86c575d2-b6b9-44ed-9c75-8d705b987ec1"},"editor_reference":{"type":"string","example":"-"},"name":{"type":"string","description":"Pricing project name.","example":"Monthly motor insurance product"},"description":{"type":"string","description":"Pricing project description.","example":"Monthly motor insurance product for the UK market"},"summary":{"type":"string","description":"A html formatted change log of a project version.","example":"<p>Example change log of version</p>"},"version":{"type":"integer","description":"Pricing project version which iterates by +1 every time the project is published.","example":1},"status":{"type":"string","description":"Pricing project published status. It can be in draft, approved, published or subsequently unpublished","example":"draft"},"size":{"type":"number","description":"Pricing project size in MBs.","example":8.6},"is_public":{"type":"boolean","description":"Does this project have a public embedded form public template config","example":false},"public_config":{"type":"object","description":"The public template config","example":{}},"template":{"type":"string","description":"A custom template name","example":"company_name_model"},"type":{"type":"string","description":"A project type","example":"swallow"},"group":{"type":"string","description":"A project group","example":"groupname"},"disabled":{"type":"boolean","description":"Whether the pricing project is disabled. If disabled then the project can not be edited and will not be available to price against.","example":false},"approved_at":{"type":"string","description":"The time that it was approved","example":"2021-04-22T14:29:22.000Z"},"published_at":{"type":"string","description":"The time it was (or will be) published","example":"2021-04-22T14:29:22.000Z"},"updated_at":{"type":"string","description":"The time that it was last updated","example":"2021-04-22T14:29:22.000Z"},"created_at":{"type":"string","description":"The time of creation","example":"2021-03-22T14:29:22.000Z"}}}}}}},"requestBody":{"description":"put to /sw/projects/versions/{version_reference}","content":{"application/json":{"schema":{"properties":{"status":{"type":"string","example":"draft","description":"Pricing project published status. It can be in draft, approved, published or subsequently unpublished"}},"type":"object"}}}}}},"/sw/projects/versions/large/{version_reference}":{"get":{"summary":"Returns URL to download project directly","parameters":[{"name":"version_reference","in":"path","description":"Project version reference. It is a UUID.","required":true,"schema":{"type":"string","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"}}],"responses":{"200":{"description":"/sw/projects/versions/large/{version_reference} response","content":{"application/json":{"schema":{"type":"object","properties":{"signed_url":{"type":"string","description":"Signed S3 URL from AWS - used for uploading/downloading from S3","example":"\"https://bucket-name.s3.region.amazonaws.com/key?Content-Type=image%2Fpng&X-Amz-Algorithm=AWS4-HMAC-SHA256"},"version_reference":{"type":"string","description":"Project version reference. It is a UUID.","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"},"project_reference":{"type":"string","description":"Project reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"}}}}}}}},"put":{"summary":"Returns URL to update project directly","parameters":[{"name":"version_reference","in":"path","description":"Project version reference. It is a UUID.","required":true,"schema":{"type":"string","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"}}],"responses":{"200":{"description":"/sw/projects/versions/large/{version_reference} response","content":{"application/json":{"schema":{"type":"object","properties":{"signed_url":{"type":"string","description":"Signed S3 URL from AWS - used for uploading/downloading from S3","example":"\"https://bucket-name.s3.region.amazonaws.com/key?Content-Type=image%2Fpng&X-Amz-Algorithm=AWS4-HMAC-SHA256"},"version_reference":{"type":"string","description":"Project version reference. It is a UUID.","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"},"project_reference":{"type":"string","description":"Project reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"}}}}}}}}},"/sw/public/projects/{project_reference}":{"get":{"summary":"Returns public project details to build custom form","parameters":[{"name":"project_reference","in":"path","description":"Project reference. It is a UUID.","required":true,"schema":{"type":"string","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"}},{"name":"version_reference","in":"query","description":"Project version reference. It is a UUID.","schema":{"type":"string","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"}}],"responses":{"200":{"description":"/sw/public/projects/{project_reference} response","content":{"application/json":{"schema":{"type":"object","properties":{"version_reference":{"type":"string","description":"Project version reference. It is a UUID.","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"},"project_reference":{"type":"string","description":"Project reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"},"version":{"type":"integer","description":"Pricing project version which iterates by +1 every time the project is published.","example":1},"updated_at":{"type":"string","description":"The time that it was last updated","example":"2021-04-22T14:29:22.000Z"},"inputs":{"type":"object","description":"The inputs of a project to assist in building a custom quote form.","example":{"bike_type":{"type":"string","label":"Your bike type","def":"Road"}}},"lists":{"type":"object","description":"The inputs of a project to assist in building a custom quote form.","example":{"bike_type":{"type":"string","data":["Road","Mountain","BMX"]}}}}}}}}}}},"/sw/projects/editor/{project_reference}":{"put":{"summary":"Updates who can edit a project","parameters":[{"name":"project_reference","in":"path","description":"Project reference. It is a UUID.","required":true,"schema":{"type":"string","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"}}],"responses":{"200":{"description":"/sw/projects/editor/{project_reference} response","content":{"application/json":{"schema":{"type":"object","properties":{"project_reference":{"type":"string","description":"Project reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"},"version_reference":{"type":"string","description":"Project version reference. It is a UUID.","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"},"company_reference":{"type":"string","description":"Company reference. It is a UUID.","example":"86c575d2-b6b9-44ed-9c75-8d705b987ec1"},"editor_reference":{"type":"string","example":"-"},"name":{"type":"string","description":"Pricing project name.","example":"Monthly motor insurance product"},"description":{"type":"string","description":"Pricing project description.","example":"Monthly motor insurance product for the UK market"},"summary":{"type":"string","description":"A html formatted change log of a project version.","example":"<p>Example change log of version</p>"},"version":{"type":"integer","description":"Pricing project version which iterates by +1 every time the project is published.","example":1},"status":{"type":"string","description":"Pricing project published status. It can be in draft, approved, published or subsequently unpublished","example":"draft"},"size":{"type":"number","description":"Pricing project size in MBs.","example":8.6},"is_public":{"type":"boolean","description":"Does this project have a public embedded form public template config","example":false},"public_config":{"type":"object","description":"The public template config","example":{}},"template":{"type":"string","description":"A custom template name","example":"company_name_model"},"type":{"type":"string","description":"A project type","example":"swallow"},"group":{"type":"string","description":"A project group","example":"groupname"},"disabled":{"type":"boolean","description":"Whether the pricing project is disabled. If disabled then the project can not be edited and will not be available to price against.","example":false},"approved_at":{"type":"string","description":"The time that it was approved","example":"2021-04-22T14:29:22.000Z"},"published_at":{"type":"string","description":"The time it was (or will be) published","example":"2021-04-22T14:29:22.000Z"},"updated_at":{"type":"string","description":"The time that it was last updated","example":"2021-04-22T14:29:22.000Z"},"created_at":{"type":"string","description":"The time of creation","example":"2021-03-22T14:29:22.000Z"},"versions":{"type":"array","description":"All previous versions of a project.","items":{"type":"object"}}}}}}}},"requestBody":{"description":"put to /sw/projects/editor/{project_reference}","content":{"application/json":{"schema":{"properties":{"editor_reference":{"type":"string","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1","description":"User reference. It is a UUID."}},"type":"object"}}}}}},"/sw/process/{version_reference}":{"post":{"summary":"Create or update project process","parameters":[{"name":"version_reference","in":"path","description":"Project version reference. It is a UUID.","required":true,"schema":{"type":"string","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"}}],"responses":{"200":{"description":"/sw/process/{version_reference} response","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"object","example":{"content":"-"}},"blocks":{"type":"array","items":{"type":"object"}},"team":{"type":"array","items":{"type":"object"}},"tasks":{"type":"array","items":{"type":"object"}},"rules":{"type":"object","example":{"number_of_approvals":"-","tasks_completed":"-"}},"assets":{"type":"array","items":{"type":"object"}},"version":{"type":"object","example":"-"}}}}}}}},"get":{"summary":"Return a process history for a given project version","parameters":[{"name":"version_reference","in":"path","description":"Project version reference. It is a UUID.","required":true,"schema":{"type":"string","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"}}],"responses":{"200":{"description":"/sw/process/{version_reference} response","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"object","example":{"content":"-"}},"blocks":{"type":"array","items":{"type":"object"}},"team":{"type":"array","items":{"type":"object"}},"tasks":{"type":"array","items":{"type":"object"}},"rules":{"type":"object","example":{"number_of_approvals":"-","tasks_completed":"-"}},"assets":{"type":"array","items":{"type":"object"}},"version":{"type":"object","example":"-"}}}}}}}}},"/sw/process/assets/{version_reference}":{"get":{"summary":"Returns a S3 asset Signed URL","parameters":[{"name":"version_reference","in":"path","description":"Project version reference. It is a UUID.","required":true,"schema":{"type":"string","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"}},{"name":"file","in":"query","schema":{"type":"string","example":"-"}},{"name":"type","in":"query","schema":{"type":"string","example":{}}}],"responses":{"200":{"description":"/sw/process/assets/{version_reference} response","content":{"application/json":{"schema":{"type":"object","properties":{"signed_url":{"type":"string","description":"Signed S3 URL from AWS - used for uploading/downloading from S3","example":"\"https://bucket-name.s3.region.amazonaws.com/key?Content-Type=image%2Fpng&X-Amz-Algorithm=AWS4-HMAC-SHA256"},"version_reference":{"type":"string","description":"Project version reference. It is a UUID.","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"},"project_reference":{"type":"string","description":"Project reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"}}}}}}}},"put":{"summary":"Returns a S3 asset Signed URL for uploading","parameters":[{"name":"version_reference","in":"path","description":"Project version reference. It is a UUID.","required":true,"schema":{"type":"string","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"}},{"name":"file","in":"query","schema":{"type":"string","example":"-"}},{"name":"type","in":"query","schema":{"type":"string","example":{}}}],"responses":{"200":{"description":"/sw/process/assets/{version_reference} response","content":{"application/json":{"schema":{"type":"object","properties":{"signed_url":{"type":"string","description":"Signed S3 URL from AWS - used for uploading/downloading from S3","example":"\"https://bucket-name.s3.region.amazonaws.com/key?Content-Type=image%2Fpng&X-Amz-Algorithm=AWS4-HMAC-SHA256"},"version_reference":{"type":"string","description":"Project version reference. It is a UUID.","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"},"project_reference":{"type":"string","description":"Project reference. It is a UUID.","example":"56c575d2-b6b9-44ed-9c75-5d705b987ec1"}}}}}}}}},"/sw/tests/{version_reference}":{"post":{"summary":"Create or update project tests","parameters":[{"name":"version_reference","in":"path","description":"Project version reference. It is a UUID.","required":true,"schema":{"type":"string","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"}}],"responses":{"200":{"description":"/sw/tests/{version_reference} response","content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":"object","example":{"type":"-","url":"-","method":"-","timeout":"-","frequency":"-","headers":"-","format":"-"}},"tests":{"type":"array","items":{"type":"object"}},"saved":{"type":"array","items":{"type":"object"}}}}}}}}},"get":{"summary":"Returns test results for a project version","parameters":[{"name":"version_reference","in":"path","description":"Project version reference. It is a UUID.","required":true,"schema":{"type":"string","example":"46c575d2-b6b9-44ed-9c75-5d705b987ec1"}}],"responses":{"200":{"description":"/sw/tests/{version_reference} response","content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":"object","example":{"type":"-","url":"-","method":"-","timeout":"-","frequency":"-","headers":"-","format":"-"}},"tests":{"type":"array","items":{"type":"object"}},"saved":{"type":"array","items":{"type":"object"}}}}}}}}}}}}