charity APIv1.2.0

getCharityOrgs

GET
/charity_org
This call is used to search for supported charitable organizations. It allows users to search for a specific charitable organization, or for multiple charitable organizations, from a particular charitable domain and/or geographical region, or by using search criteria.

The call returns paginated search results containing the charitable organizations that match the specified criteria.

Input

Resource URI (production)

GET https://api.ebay.com/commerce/charity/v1/charity_org?

URI parameters

ParameterTypeDescription
qstringA query string that matches the keywords in name, mission statement, or description.

Occurrence: Optional

registration_idsarray of stringA comma-separated list of charitable organization registration IDs.

Note: Do not specify this parameter for query-based searches. Specify either the q or registration_ids parameter, but not both.

Maximum Limit: 20

Occurrence: Optional

limitstringThe number of items, from the result set, returned in a single page.

Valid Values: 1-100

Default: 20

Occurrence: Optional

offsetstringThe number of items that will be skipped in the result set. This is used with the limit field to control the pagination of the output.

For example, if the offset is set to 0 and the limit is set to 10, the method will retrieve items 1 through 10 from the list of items returned. If the offset is set to 10 and the limit is set to 10, the method will retrieve items 11 through 20 from the list of items returned.

Valid Values: 0-10,000

Default: 0

Occurrence: Optional

HTTP request headers

All requests made to eBay REST operations require you to provide the Authorization HTTP header for authentication authorization.

HeaderTypeDescription
X-EBAY-C-MARKETPLACE-IDstringA header used to specify the eBay marketplace ID.

Valid Values: EBAY_GB and EBAY_US

Occurrence: Required

OAuth scope

This request requires an access token created with the client credentials grant flow, using one or more scopes from the following list (please check your Application Keys page for a list of OAuth scopes available to your application):

https://api.ebay.com/oauth/api_scope

See OAuth access tokens for more information.

Output

HTTP response headers

Output container/fieldTypeDescription
charityOrgsarray of CharityOrgThe list of charitable organizations that match the search criteria.

Occurrence: Conditional

charityOrgs.charityOrgIdstringThe ID of the charitable organization.

Occurrence: Always

charityOrgs.descriptionstringThe description of the charitable organization.

Occurrence: Conditional

charityOrgs.locationLocationThe location details of the charitable organization.

Occurrence: Conditional

charityOrgs.location.addressAddressThe address of the charitable organization.

Occurrence: Conditional

charityOrgs.location.address.citystringThe city of the charitable organization.

Occurrence: Conditional

charityOrgs.location.address.stateOrProvincestringThe state or province of the charitable organization.

Occurrence: Conditional

charityOrgs.location.address.postalCodestringThe postal code of the charitable organization.

Occurrence: Conditional

charityOrgs.location.address.countryCountryCodeEnumThe two-letter ISO 3166 standard of the country of the address.

Occurrence: Conditional

charityOrgs.location.geoCoordinatesGeoCoordinatesThe geo-coordinates of the charitable organization.

Occurrence: Conditional

charityOrgs.location.geoCoordinates.latitudenumberThe latitude component of the geographic coordinate.

Occurrence: Conditional

charityOrgs.location.geoCoordinates.longitudenumberThe longitude component of the geographic coordinate.

Occurrence: Conditional

charityOrgs.logoImageImageThe logo of the charitable organization.

Occurrence: Conditional

charityOrgs.logoImage.heightstringThe height of the logo image.

Occurrence: Conditional

charityOrgs.logoImage.imageUrlstringThe URL to the logo image location.

Occurrence: Conditional

charityOrgs.logoImage.widthstringThe width of the logo image.

Occurrence: Conditional

charityOrgs.missionStatementstringThe mission statement of the charitable organization.

Occurrence: Conditional

charityOrgs.namestringThe name of the charitable organization.

Occurrence: Always

charityOrgs.registrationIdstringThe registration ID for the charitable organization. For the US marketplace, this is the EIN.

Occurrence: Conditional

charityOrgs.websitestringThe link to the website for the charitable organization.

Occurrence: Conditional

hrefstringThe relative path to the current set of results.

Occurrence: Always

limitintegerThe number of items, from the result set, returned in a single page.

Valid Values: 1-100

Default: 20

Occurrence: Conditional

nextstringThe relative path to the next set of results.

Occurrence: Conditional

offsetintegerThe number of items that will be skipped in the result set. This is used with the limit field to control the pagination of the output.

For example, if the offset is set to 0 and the limit is set to 10, the method will retrieve items 1 through 10 from the list of items returned. If the offset is set to 10 and the limit is set to 10, the method will retrieve items 11 through 20 from the list of items returned.

Valid Values: 0-10,000

Default: 0

Occurrence: Conditional

prevstringThe relative path to the previous set of results.

Occurrence: Conditional

totalintegerThe total number of matches for the search criteria.

Occurrence: Conditional

HTTP status codes

This call can return one of the following HTTP status codes. For an overview of the status codes, see HTTP status codes in Using eBay RESTful APIs.

StatusMeaning
200OK
400Bad Request
500Internal Server Error

Error codes

For more on errors, plus the codes of other common errors, see Handling errors.

CodeDomainCategoryMeaning
165000API_CHARITYAPPLICATIONThere was a problem with an eBay internal system or process. Contact eBay developer support for assistance.
165001API_CHARITYREQUESTInvalid, missing or unsupported marketplace. Please refer to documentation.
165003API_CHARITYREQUESTThe specified limit is invalid. Maximum value supported is 100.
165004API_CHARITYREQUESTThe specified offset is invalid.
165005API_CHARITYREQUESTPlease specify registration_ids OR query text for the search.

Warnings

Samples

New to making API calls? Please see Making a Call.

Note: Identifiers, such as order IDs or user IDs, and personal data in these samples might be anonymized or may no longer be active on eBay. If necessary, substitute current, relevant eBay data in your requests.

Sample 1: Search for Charitable Organizations by Query

This sample retrieves paginated search results containing the charitable organizations that match the query string.

Input

The inputs are the q and limit URI parameters. There is no payload with this request.
GET
https://api.ebay.com/commerce/charity/v1/charity_org/?q=red cross&limit=3

Output

If the call is successful, three charitable organizations matching the specified criteria will be returned.

Sample 2: Search for Charitable Organizations by Registration ID

This sample retrieves paginated search results containing the charitable organizations that match the registration IDs.

Input

The input is the registration_ids URI parameter. There is no payload with this request.
GET
https://api.ebay.com/commerce/charity/v1/charity_org/?registration_ids=340709901

Output

If the call is successful, the charitable organization matching the specified registration ID will be returned.