Appearance
/company/search
Search for companies by name, category, or supported products.
HTTP Request
POST https://api.q2open.io/v1/company/search
Arguments
Parameter | Description |
---|---|
products | Must be set to cardswap . |
query | Optional - The text string on which to search companies by name. |
category | Optional - Category type retrieved from the /company/categories endpoint. |
paginateResults | Optional - Boolean that enables returning paginated results. |
pageSize | Optional - Used with paginateResults to set page size (Max 100). |
pageNumber | Optional - Used with paginateResults to set which page of results gets returned in the data. |
sortBy | Optional - Choose how to sort the results. Values can be alpha , reverse-alpha , or default . Default sorts by popularity. |
Returns
A dictionary with a data
property that contains an array of company objects that match the provided search filters. If paginateResults is true, this also includes resultCount
which is the total count of matching companies.
Example Requests
shell
curl "https://api.q2open.io/v1/company/search" \
-H "Authorization: Bearer dc220490-e6ee-11e5-8a94-e7385a8d929e" \
-H "Content-Type: application/json" \
-d '{
"query": "Netflix"
"paginateResults": "true",
"pageSize": "25",
"pageNumber": "1",
"products": "['cardswap']"
}'
shell
curl "https://api.q2open.io/v1/company/search" \
-H "Authorization: Bearer dc220490-e6ee-11e5-8a94-e7385a8d929e" \
-H "Content-Type: application/json" \
-d '{
"category": "gas"
}'
shell
curl "https://api.q2open.io/v1/company/search" \
-H "Authorization: Bearer dc220490-e6ee-11e5-8a94-e7385a8d929e" \
-H "Content-Type: application/json" \
-d '{
"geo": {
"lat": 40.233845,
"lng": -111.65852
}
}'
Example Response
json
{
"data": [
{
"_id": "579b695decea110719b1874d",
"name": "Netflix",
"categories": ["streaming"],
"status": "operational",
"logo": {
"url": "https://s3.amazonaws.com/app-assets.unbill.io-primary/uploads/utility-provider-logos/7242937ba29042cce61a8e4745269fce.png",
"background": false,
"svg": {
"url": "https://s3.amazonaws.com/app-assets.unbill.io-primary/uploads/utility-provider-logos/7242937ba29042cce61a8e4745269fce.svg",
"color": "FF041F"
}
},
"requiredPayment": "bank",
"schedule": "on-due-date",
"auth": {
"urls": {
"login": "https://www.netflix.com/Login",
"signup": "https://www.netflix.com"
},
"loginFields": [{
"placeholder": "Username",
"formType": "text",
"name": "username",
"label": "Username"
}, {
"placeholder": "Password",
"formType": "password",
"name": "password",
"label": "Password"
}]
},
"geo": {
"lat": 30.70,
"lng": -95.53,
"state_short": "TX",
"state_long": "Texas",
"zipcode": "77340"
}
}
],
"resultCount": 1
}