{"openapi":"3.1.0","info":{"title":"Impact Track Public API","version":""},"paths":{"/v1/projects/{project_id}/surveys":{"get":{"parameters":[{"in":"query","name":"page","schema":{"type":["integer","null"],"format":"uint32","minimum":0},"style":"form"},{"in":"query","name":"title","schema":{"type":["string","null"]},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_for_PublicProjectSurvey"}}}}}}},"/v1/projects/{project_id}/data-collection-tags":{"get":{"parameters":[{"in":"query","name":"page","schema":{"type":["integer","null"],"format":"uint32","minimum":0},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_for_PublicProjectDataCollectionTag"}}}}}},"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePublicProjectDataCollectionTag"}}},"required":true}}},"/v1/projects/{project_id}/indicators":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicProjectIndicator"}}}}}}}},"/v1/projects/{project_id}/surveys/{survey_id}/campaigns":{"get":{"parameters":[{"in":"query","name":"page","schema":{"type":["integer","null"],"format":"uint32","minimum":0},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_for_PublicProjectSurveyCampaign"}}}}}},"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePublicProjectSurveyCampaign"}}},"required":true}}},"/v1/projects/{project_id}/surveys/{survey_id}/campaigns/{campaign_id}":{"delete":{}},"/v1/projects/{project_id}/surveys/{survey_id}/responses":{"get":{"parameters":[{"in":"query","name":"page","schema":{"type":["integer","null"],"format":"uint32","minimum":0},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_for_PublicProjectSurveyResponse"}}}}}}}},"components":{"schemas":{"CreatePublicProjectDataCollectionTag":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},"CreatePublicProjectSurveyCampaign":{"type":"object","properties":{"collectionEndAt":{"type":"string","format":"date"},"collectionStartAt":{"type":"string","format":"date"},"interventionEndAt":{"type":"string","format":"date"},"interventionStartAt":{"type":"string","format":"date"},"populationSize":{"type":["integer","null"],"format":"int32"},"projectDataCollectionTagId":{"type":["string","null"]}},"required":["collectionStartAt","collectionEndAt","interventionStartAt","interventionEndAt"]},"GetProjectDataCollectionTagsQuery":{"type":"object","properties":{"page":{"type":["integer","null"],"format":"uint32","minimum":0}}},"GetProjectSurveyCampaignsQuery":{"type":"object","properties":{"page":{"type":["integer","null"],"format":"uint32","minimum":0}}},"GetProjectSurveyResponsesQuery":{"type":"object","properties":{"page":{"type":["integer","null"],"format":"uint32","minimum":0}}},"IndicatorDataType":{"type":"string","enum":["text","number","percent","scale","single_select","multi_select","matrix"]},"Page_for_PublicProjectDataCollectionTag":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PublicProjectDataCollectionTag"}},"itemsPerPage":{"type":"integer","format":"uint32","minimum":0},"number":{"type":["integer","null"],"format":"uint32","minimum":0},"totalItems":{"type":"integer","format":"uint32","minimum":0},"totalPages":{"type":"integer","format":"uint32","minimum":0}},"required":["items","itemsPerPage","totalItems","totalPages"]},"Page_for_PublicProjectSurvey":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PublicProjectSurvey"}},"itemsPerPage":{"type":"integer","format":"uint32","minimum":0},"number":{"type":["integer","null"],"format":"uint32","minimum":0},"totalItems":{"type":"integer","format":"uint32","minimum":0},"totalPages":{"type":"integer","format":"uint32","minimum":0}},"required":["items","itemsPerPage","totalItems","totalPages"]},"Page_for_PublicProjectSurveyCampaign":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PublicProjectSurveyCampaign"}},"itemsPerPage":{"type":"integer","format":"uint32","minimum":0},"number":{"type":["integer","null"],"format":"uint32","minimum":0},"totalItems":{"type":"integer","format":"uint32","minimum":0},"totalPages":{"type":"integer","format":"uint32","minimum":0}},"required":["items","itemsPerPage","totalItems","totalPages"]},"Page_for_PublicProjectSurveyResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PublicProjectSurveyResponse"}},"itemsPerPage":{"type":"integer","format":"uint32","minimum":0},"number":{"type":["integer","null"],"format":"uint32","minimum":0},"totalItems":{"type":"integer","format":"uint32","minimum":0},"totalPages":{"type":"integer","format":"uint32","minimum":0}},"required":["items","itemsPerPage","totalItems","totalPages"]},"PublicProjectDataCollectionTag":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"PublicProjectIndicator":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/IndicatorDataType"},"deletedAt":{"type":["string","null"],"format":"partial-date-time"},"id":{"type":"string"},"label":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/PublicProjectIndicatorOption"}},"projectId":{"type":"string"},"questionLabel":{"type":["string","null"]},"subQuestions":{"type":"array","items":{"$ref":"#/components/schemas/PublicProjectIndicatorSubQuestion"}}},"required":["id","projectId","type","label","options","subQuestions"]},"PublicProjectIndicatorOption":{"type":"object","properties":{"deletedAt":{"type":["string","null"],"format":"partial-date-time"},"id":{"type":"string"},"label":{"type":"string"},"position":{"type":"integer","format":"int64"}},"required":["id","label","position"]},"PublicProjectIndicatorSubQuestion":{"type":"object","properties":{"deletedAt":{"type":["string","null"],"format":"partial-date-time"},"id":{"type":"string"},"label":{"type":"string"},"position":{"type":"integer","format":"int64"}},"required":["id","label","position"]},"PublicProjectSurvey":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"},"projectId":{"type":"string"}},"required":["id","projectId","title"]},"PublicProjectSurveyCampaign":{"type":"object","properties":{"collectionEndAt":{"type":"string","format":"date"},"collectionStartAt":{"type":"string","format":"date"},"deactivatedAt":{"type":["string","null"],"format":"partial-date-time"},"id":{"type":"string"},"interventionEndAt":{"type":"string","format":"date"},"interventionStartAt":{"type":"string","format":"date"},"projectDataCollectionTagId":{"type":["string","null"]},"projectId":{"type":"string"},"projectSurveyId":{"type":"string"},"publicLink":{"type":"string"}},"required":["id","projectId","projectSurveyId","collectionStartAt","collectionEndAt","interventionStartAt","interventionEndAt","publicLink"]},"PublicProjectSurveyQuery":{"type":"object","properties":{"title":{"type":["string","null"]},"page":{"type":["integer","null"],"format":"uint32","minimum":0}}},"PublicProjectSurveyResponse":{"type":"object","properties":{"answers":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PublicProjectSurveyResponseAnswer"}},"code":{"type":["string","null"]},"createdAt":{"type":"string","format":"partial-date-time"},"id":{"type":"string"},"projectId":{"type":"string"},"projectSurveyCampaignId":{"type":"string"},"projectSurveyId":{"type":"string"}},"required":["id","projectId","projectSurveyId","projectSurveyCampaignId","createdAt","answers"]},"PublicProjectSurveyResponseAnswer":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"content":{"type":"string"}},"required":["type","content"]},{"type":"object","properties":{"type":{"type":"string","const":"number"},"content":{"type":"integer","format":"int32"}},"required":["type","content"]},{"type":"object","properties":{"type":{"type":"string","const":"single_select"},"content":{"$ref":"#/components/schemas/PublicProjectSurveyResponseSelectOption"}},"required":["type","content"]},{"type":"object","properties":{"type":{"type":"string","const":"multi_select"},"content":{"type":"array","items":{"$ref":"#/components/schemas/PublicProjectSurveyResponseSelectOption"}}},"required":["type","content"]},{"type":"object","properties":{"type":{"type":"string","const":"matrix"},"content":{"type":"array","items":{"$ref":"#/components/schemas/PublicProjectSurveyResponseMatrixSubQuestion"}}},"required":["type","content"]}]},"PublicProjectSurveyResponseMatrixSubQuestion":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"selection":{"$ref":"#/components/schemas/PublicProjectSurveyResponseSelectOption"}},"required":["id","label","selection"]},"PublicProjectSurveyResponseSelectOption":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"otherChoiceText":{"type":["string","null"]},"position":{"type":["integer","null"],"format":"int32"}},"required":["id","label"]}}}}