{"openapi":"3.0.1","info":{"title":"funds","version":"1.2.0.2345"},"servers":[{"url":"https://api.pushpay.com/"}],"paths":{"/v1/organization/{organizationKey}/funds":{"get":{"tags":["funds"],"summary":"List organization funds","description":"Returns a list of organization funds filtered by status.\r\n\r\nNote: Unfiltered requests will return organization funds of Status = Open.","operationId":"getOrganizationFunds","parameters":[{"name":"organizationKey","in":"path","description":"The unique key of the organization - a case-sensitive series of characters","required":true,"schema":{"type":"string"}},{"name":"fundStatus","in":"query","description":"Only include funds with the specified status (All, Open or Closed). If status is not explicitly set then only funds with status 'Open' will be returned.","required":true,"schema":{"type":"string","enum":["All","Closed","Open"]}}],"responses":{"200":{"description":"success","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/FundListRepresentation"}}}},"400":{"description":"The server will not process the request due to a client error","content":{}},"401":{"description":"Request failed because the client was not authorized to perform this action","content":{}},"404":{"description":"Could not find resource","content":{}},"429":{"description":"Request was throttled due to too many requests from this client or IP address","content":{}}}},"post":{"tags":["funds"],"summary":"Open new organization fund","operationId":"openFund","parameters":[{"name":"organizationKey","in":"path","description":"The unique key of the organization - a case-sensitive series of characters","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/CreateFundModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/CreateFundModel"}}},"required":true},"responses":{"200":{"description":"success","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/FundRepresentation"}}}},"201":{"description":"Request was successful","content":{}},"400":{"description":"The server will not process the request due to a client error","content":{}},"401":{"description":"Request failed because the client was not authorized to perform this action","content":{}},"429":{"description":"Request was throttled due to too many requests from this client or IP address","content":{}}},"x-codegen-request-body-name":"model"}},"/v1/organization/{organizationKey}/fund/{fundKey}":{"get":{"tags":["funds"],"summary":"Get organization fund","description":"Returns a single organization fund identified by its fund key","operationId":"getOrganizationFund","parameters":[{"name":"organizationKey","in":"path","description":"The unique key of the organization - a case-sensitive series of characters","required":true,"schema":{"type":"string"}},{"name":"fundKey","in":"path","description":"The unique key of the fund - a case-sensitive series of characters","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/FundRepresentation"}}}},"400":{"description":"The server will not process the request due to a client error","content":{}},"401":{"description":"Request failed because the client was not authorized to perform this action","content":{}},"404":{"description":"Could not find resource","content":{}},"429":{"description":"Request was throttled due to too many requests from this client or IP address","content":{}}}},"put":{"tags":["funds"],"summary":"Update existing organization fund","description":"Updates the info for a fund belonging to an organization.","operationId":"updateFund","parameters":[{"name":"organizationKey","in":"path","description":"The unique key of the organization - a case-sensitive series of characters","required":true,"schema":{"type":"string"}},{"name":"fundKey","in":"path","description":"The unique key of the fund - a case-sensitive series of characters","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/EditFundModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/EditFundModel"}}},"required":true},"responses":{"200":{"description":"success","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/FundRepresentation"}}}},"400":{"description":"The server will not process the request due to a client error","content":{}},"401":{"description":"Request failed because the client was not authorized to perform this action","content":{}},"404":{"description":"Could not find resource","content":{}},"429":{"description":"Request was throttled due to too many requests from this client or IP address","content":{}}},"x-codegen-request-body-name":"model"},"delete":{"tags":["funds"],"summary":"Delete a fund belonging to an organization.","operationId":"deleteFund","parameters":[{"name":"organizationKey","in":"path","description":"The unique key of the organization - a case-sensitive series of characters","required":true,"schema":{"type":"string"}},{"name":"fundKey","in":"path","description":"The unique key of the fund - a case-sensitive series of characters","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Request was successful","content":{}},"400":{"description":"The server will not process the request due to a client error","content":{}},"401":{"description":"Request failed because the client was not authorized to perform this action","content":{}},"404":{"description":"Could not find resource","content":{}},"429":{"description":"Request was throttled due to too many requests from this client or IP address","content":{}}}},"patch":{"tags":["funds"],"summary":"Change the status of a fund belonging to an organization","description":"Changes the status of a fund belonging to an organization.","operationId":"changeFundStatus","parameters":[{"name":"organizationKey","in":"path","description":"The unique key of the organization - a case-sensitive series of characters","required":true,"schema":{"type":"string"}},{"name":"fundKey","in":"path","description":"The unique key of the fund - a case-sensitive series of characters","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/ChangeFundStatusModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/ChangeFundStatusModel"}}},"required":true},"responses":{"200":{"description":"success","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/FundRepresentation"}}}},"400":{"description":"The server will not process the request due to a client error","content":{}},"401":{"description":"Request failed because the client was not authorized to perform this action","content":{}},"404":{"description":"Could not find resource","content":{}},"429":{"description":"Request was throttled due to too many requests from this client or IP address","content":{}}},"x-codegen-request-body-name":"model"}},"/v1/merchant/{merchantKey}/funds":{"get":{"tags":["funds"],"summary":"List funds visible on a merchant in order and the default fund, if set","description":"Returns an ordered list of funds visible on a merchant listing and the default fund (if one is set).","operationId":"getMerchantListingFunds","parameters":[{"name":"merchantKey","in":"path","description":"The unique key of the merchant - a case-sensitive series of characters","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"success","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/MerchantFundsRepresentation"}}}},"400":{"description":"The server will not process the request due to a client error","content":{}},"401":{"description":"Request failed because the client was not authorized to perform this action","content":{}},"404":{"description":"Could not find resource","content":{}},"429":{"description":"Request was throttled due to too many requests from this client or IP address","content":{}}}}}},"components":{"schemas":{"ChangeFundStatusModel":{"type":"object","properties":{"status":{"type":"string","enum":["Closed","Open"]}}},"FundRepresentation":{"required":["_links","code","key","name","notes","status","taxDeductible"],"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"code":{"type":"string"},"taxDeductible":{"type":"boolean"},"notes":{"type":"string"},"status":{"type":"string","enum":["Closed","Open"]},"_links":{"type":"array","items":{"$ref":"#/components/schemas/Link"}}}},"EditFundModel":{"required":["code","name","notes","taxDeductible"],"type":"object","properties":{"name":{"type":"string"},"notes":{"type":"string"},"code":{"type":"string"},"taxDeductible":{"type":"boolean"}}},"FundListRepresentation":{"required":["_links","items"],"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/FundRepresentation"}},"_links":{"type":"array","items":{"$ref":"#/components/schemas/Link"}}}},"CreateFundModel":{"required":["code","name","notes","taxDeductible"],"type":"object","properties":{"name":{"type":"string"},"notes":{"type":"string"},"code":{"type":"string"},"taxDeductible":{"type":"boolean"}}},"MerchantFundsRepresentation":{"required":["_links","defaultFund","funds"],"type":"object","properties":{"defaultFund":{"$ref":"#/components/schemas/FundRepresentation"},"funds":{"type":"array","items":{"$ref":"#/components/schemas/FundRepresentation"}},"_links":{"type":"array","items":{"$ref":"#/components/schemas/Link"}}}},"Link":{"required":["href","isTemplated","rel","title"],"type":"object","properties":{"rel":{"type":"string"},"href":{"type":"string"},"title":{"type":"string"},"isTemplated":{"type":"boolean"}}}}},"x-original-swagger-version":"2.0"}