List the campaigns of an organization
Filtered, sorted and paged. Only campaigns the LaunchGood site lists publicly are served: active, completed, failed or completed-unpaid, not hidden and not archived. An organization that does not exist and one that is not public are the same 404. The campaigns are those of the organization's 3.0 accounts, merged in the requested order; offset and limit count positions in the merged order, before a campaign is left out, and hasMore is whether the merge has a row after the page. A page can hold fewer items than limit, even none: follow meta.hasMore, not the page length. offset plus limit cannot pass 9,999, a 400 says so. An organization with more than one 3.0 account is read account by account and merged, so for it the window is 1,000 rows: offset plus limit cannot pass 999, and the campaigns are those of its first 10 accounts, oldest link first. Needs a valid token. Which scope public reads require is still open.
oauth2AuthorizationBearer <token>OAuth 2.0 client-credentials grant. Scopes follow the ReBAC grammar {type}:{id}:...:{role}; a {placeholder} stands for an id.
id*stringThe organization id: the Organization.id that the organization:{organizationId}:... scopes name.
^[A-Za-z0-9_-]{1,64}$q?stringPart of the campaign name.
length <= 100status?array<>Keep only campaigns in these statuses. Omit for every status the public site lists; a status it does not list answers an empty page.
1 <= itemssort?stringField to sort by.
"end_date""name""status""funded_percentage""goal""pledged_amount""donation_count""end_date""created_date"sortDirection?stringDirection of the sort.
"desc""asc""desc"limit?integerPage size. A value above 100 is clamped to 100, not refused: meta.limit says the size that was applied. A value below 1 is a 400.
1 <= value25offset?integerRows to skip. Offsets above 10,000 are rejected: narrow the search instead.
0 <= value <= 100000A page of campaigns, with the count of each status.
application/json- response
data*array<>One page of results.
meta*curl -X GET 'https://api2.launchgood.com/organizations/clx9k2m4p0000abcd1234efgh/campaigns?status=active%2Ccompleted' \ -H 'Authorization: Bearer '{ "data": [ { "id": "48213", "slug": "clean-water-for-sana-a", "url": "http://example.com", "name": "Clean water for Sana'a", "status": "not_submitted", "categories": [ "food-water" ], "goal": { "amountMinor": 2500, "currency": "USD" }, "raised": { "amountMinor": 2500, "currency": "USD" }, "donationCount": 312, "fundedPercentage": 64, "daysLeft": 0, "zakatEligible": true, "zakatVerified": true, "country": "YE", "location": "Sana'a, Yemen", "latitude": -90, "longitude": -180, "imageUrl": "http://example.com", "creatorName": "string", "organization": { "id": "clx9k2m4p0000abcd1234efgh", "name": "Hope Relief Foundation" }, "startDate": "2019-08-24T14:15:22Z", "endDate": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z" } ], "meta": { "limit": 25, "offset": 0, "hasMore": true, "total": 120, "totalIsEstimate": false }}Get an organization GET
A public organization: a business organization that is active. One that does not exist and one that is not public (a personal, draft, pending, restricted, suspended or closed one) are the same 404: the answer does not say which. Needs a valid token. Which scope public reads require is still open.
Search organizations GET
Public organizations by name, optionally in one country. Needs a valid token. Which scope public reads require is still open. The id is the `Organization.id` of the `organization:{organizationId}:...` scopes. The search runs over the 3.0 accounts of organizations, so an account that belongs to no public organization is not listed. A page can hold fewer organizations than `limit`, even none: follow `meta.hasMore`, not the page length. Open: the 3.0 lookup this comes from requires `q`; it is optional here, and without it every organization is listed. `offset` plus `limit` cannot pass 9,999.