Business Units API
-
Get profile info of business unit
Get company profile information for a specific business unit.
HTTP method: GET
Authentication: API Key
URL: https://api.trustpilot.com/v1/business-units/{businessUnitId}/profileinfo
Parameters
-
businessUnitId, Required string
The id of the business unit.
Example: .../v1/business-units/{businessUnitId}/profileinfo
curl -X GET "https://api.trustpilot.com/v1/business-units/{businessUnitId}/profileinfo" \-H "apikey: YOUR-API-KEY-HERE"Response
{"links": [{"href": "<Url for the resource>","method": "<Http method for the resource>","rel": "<Description of the relation>"}],"isSubscriber": true,"email": "john@trustpilot.com","phone": "+45 11 22 33 44","companyName": "Trustpilot","address": {"street": "Sesame street, 1","city": "The Shire","postcode": "WD24 7NE","country": "UK","countryCode": "UK"},"description": {"header": "About Trustpilot","text": "Trustpilot is a review platform."},"socialmedia": {"facebook": null,"linkedin": null,"twitter": null,"googleplus": null,"youtube": null,"instagram": null},"facebookPageId": 123456789,"facebookPageUrl": "https://www.facebook.com/facebook","isFacebookActivated": true,"isCommentsEnabled": true,"isIncentivisingUsers": false,"isClaimed": true} -
-
Get a business unit's web links
This method gets links to the business unit's public profile page on Trustpilot.
HTTP method: GET
Authentication: API Key
URL: https://api.trustpilot.com/v1/business-units/{businessUnitId}/web-links
Parameters
-
businessUnitId, Required string
The id of the business unit.
Example: .../v1/business-units/{businessUnitId}/web-links
-
locale, Required string
The locale to use when generating web links.
Example: ?locale={locale}
curl -X GET "https://api.trustpilot.com/v1/business-units/{businessUnitId}/web-links" \-G \--data-urlencode "locale=example" \-H "apikey: YOUR-API-KEY-HERE"Response
{"links": [{"href": "<Url for the resource>","method": "<Http method for the resource>","rel": "<Description of the relation>"}],"locale": "da-DK","profileUrl": "http://www.trustpilot.dk/review/www.trustpilot.com","evaluateUrl": "http://www.trustpilot.dk/evaluate/www.trustpilot.com","evaluateEmbedUrl": "http://www.trustpilot.dk/evaluate/embed/www.trustpilot.com"} -
-
Get images of business unit
Get the company profile image for a specific business unit.
HTTP method: GET
Authentication: API Key
URL: https://api.trustpilot.com/v1/business-units/{businessUnitId}/images
Parameters
-
businessUnitId, Required string
The id of the business unit.
Example: .../v1/business-units/{businessUnitId}/images
curl -X GET "https://api.trustpilot.com/v1/business-units/{businessUnitId}/images" \-H "apikey: YOUR-API-KEY-HERE"Response
{"links": [{"href": "<Url for the resource>","method": "<Http method for the resource>","rel": "<Description of the relation>"}],"profileImage": {"image57x43": {"url": "<Url for the image>","width": "<Image width>","height": "<Image height>"},"image118x89": {"url": "<Url for the image>","width": "<Image width>","height": "<Image height>"},"image198x149": {"url": "<Url for the image>","width": "<Image width>","height": "<Image height>"}}} -
-
Get business unit company logo
Get the company logo for a specific business unit.
HTTP method: GET
Authentication: API Key
URL: https://api.trustpilot.com/v1/business-units/{businessUnitId}/images/logo
Parameters
-
businessUnitId, Required string
The id of the business unit.
Example: .../v1/business-units/{businessUnitId}/images/logo
curl -X GET "https://api.trustpilot.com/v1/business-units/{businessUnitId}/images/logo" \-H "apikey: YOUR-API-KEY-HERE"Response
{"links": [{"href": "<Url for the resource>","method": "<Http method for the resource>","rel": "<Description of the relation>"}],"logoUrl": null} -
-
Get business unit company promotion box
Get the company promotion box for a specific business unit.
HTTP method: GET
Authentication: API Key
URL: https://api.trustpilot.com/v1/business-units/{businessUnitId}/images/promotion-box
Parameters
-
businessUnitId, Required string
The id of the business unit.
Example: .../v1/business-units/{businessUnitId}/images/promotion-box
curl -X GET "https://api.trustpilot.com/v1/business-units/{businessUnitId}/images/promotion-box" \-H "apikey: YOUR-API-KEY-HERE"Response
{"promotionBoxUrl": null} -
-
Get business unit company header
Get the company header for a specific business unit.
HTTP method: GET
Authentication: API Key
URL: https://api.trustpilot.com/v1/business-units/{businessUnitId}/images/header
Parameters
-
businessUnitId, Required string
The id of the business unit.
Example: .../v1/business-units/{businessUnitId}/images/header
curl -X GET "https://api.trustpilot.com/v1/business-units/{businessUnitId}/images/header" \-H "apikey: YOUR-API-KEY-HERE"Response
{"headerUrl": null} -
-
Search for business units
This method searches for business units, even if you only know part of the name. For example, search results for "Trustpilot" would show "trustpilot.com", among others.
HTTP method: GET
Authentication: API Key
URL: https://api.trustpilot.com/v1/business-units/search
Parameters
-
query, Required string
The search term to use. This will be used to search for identifying name and referring names.
Example: ?query={query}
-
country, Optional string
The 2 letter country code for the preferred country code
Example: ?country={country}
-
page, Optional integer
The page to retrieve. If the page number requested is higher than the available number of pages an empty array will be returned.
Example: ?page={page}
-
perpage, Optional integer
The number of results to display per page.
Example: ?perpage={perpage}
curl -X GET "https://api.trustpilot.com/v1/business-units/search" \-G \--data-urlencode "query=example" \-H "apikey: YOUR-API-KEY-HERE"Response
{"links": [{"href": null,"method": null,"rel": null}],"businessUnits": [{"id": null,"displayName": null,"name": {"identifying": null,"referring": [null]},"link": [{"href": null,"method": null,"rel": null}]}]} -
-
List categories for business unit
Get a list of categories for a business unit.
HTTP method: GET
Authentication: API Key
URL: https://api.trustpilot.com/v1/business-units/{businessUnitId}/categories
Parameters
-
businessUnitId, Required string
The id of the business unit to list categories for.
Example: .../v1/business-units/4bf2b69100006400050ce5ee/categories
-
country, Optional string
Specify country using ISO 3166-1-alpha-2.
Example: ?country=US
-
locale, Optional string
The locale to get translated category names for.
Example: ?locale=en-US
curl -X GET "https://api.trustpilot.com/v1/business-units/{businessUnitId}/categories" \-H "apikey: YOUR-API-KEY-HERE"Response
{"categories": [{"categoryId": null,"displayName": null,"name": null,"isPrimary": false,"ranking": {"position": 0,"cardinality": 0},"source": null,"relevance": 0}],"predictedTopCategory": {}} -
-
Get a business unit's reviews (paginate)
Paginate through a business unit's reviews using a pageToken.
HTTP method: GET
Authentication: API Key
URL: https://api.trustpilot.com/v1/business-units/{businessUnitId}/all-reviews
Parameters
-
pageToken, Optional string
A previously returned page token representing part of the larger set of results to view.
Example: ?pageToken={pageToken}
-
businessUnitId, Required string
Example: .../v1/business-units/507f191e810c19729de860ea/all-reviews
curl -X GET "https://api.trustpilot.com/v1/business-units/{businessUnitId}/all-reviews" \-H "apikey: YOUR-API-KEY-HERE"Response
{"reviews": [{"id": null,"stars": 0,"title": null,"text": null,"language": null,"createdAt": "2023-01-01T12:00:00Z","updatedAt": "2023-01-01T12:00:00Z","experiencedAt": "2023-01-01T12:00:00Z","isVerified": false,"companyReply": {"text": "This is our reply.","createdAt": "2013-09-07T13:37:00","updatedAt": "2013-09-07T13:37:00"},"consumer": {"displayLocation": "Frederiksberg DK","displayName": "John Doe","id": "507f191e810c19729de860ea"},"location": {"id": "43f51215-a1fc-4c60-b6dd-e4afb6d7b831","name": "Pilestraede 58"}}],"nextPageToken": "MjAxMy0wNS0wM1QxMDowMzo0MS4wMDBafDUxODM4YjdkMDAwMDY0MDAwMjQ0MTQyZA"} -
-
Business unit private reviews
This method shows all the reviews written about the business unit, including consumer email and Order ID.
HTTP method: GET
Authentication: Business user OAuth Token
URL: https://api.trustpilot.com/v1/private/business-units/{businessUnitId}/reviews
Parameters
-
businessUnitId, Required string
The id of the business unit.
Example: .../v1/private/business-units/507f191e810c19729de860ea/reviews
-
stars, Optional array
Filter by reviews with a specific number of stars.
Example: ?stars=5
-
language, Optional array
Filter by reviews with only a specific language.
Example: ?language=en
-
page, Optional integer
The page to retrieve. If the page number requested is higher than the available number of pages an empty array will be returned.
Example: ?page=1
-
internalLocationId, Optional string
Filter by reviews with a specific location.
Example: ?internalLocationId=1cd4d195-1f61-4c4c-8425-81385dd6e55a
-
perPage, Optional integer
The number of reviews to retrieve per page.
Example: ?perPage=3
-
orderBy, Optional array
The order in which the results should be sorted. Valid values are: createdat.asc, createdat.desc, stars.asc and stars.desc
Example: ?orderBy=createdat.asc
-
tagGroup, Optional string
Filtering reviews on Tag group
Example: ?tagGroup=Group Name
-
tagValue, Optional string
Filtering reviews on Tag value
Example: ?tagValue=Tag Name
-
ignoreTagValueCase, Optional boolean
Ignore tag value case
Example: ?ignoreTagValueCase=true
-
responded, Optional boolean
Filter reviews by responded state.
Example: ?responded=true
-
referenceId, Optional string
Filter reviews by reference Id.
Example: ?referenceId=1234
-
referralEmail, Optional string
Filter reviews by referral email.
Example: ?referralEmail=me@example.com
-
reported, Optional boolean
Filter reviews by reported state.
Example: ?reported=true
-
startDateTime, Optional string
Filter reviews by datetime range. If no time is specified than time is implicit 00:00:00
Example: ?startDateTime=2013-09-07T13:37:00
-
endDateTime, Optional string
Filter reviews by datetime range. If no time is specified than time is implicit 00:00:00
Example: ?endDateTime=2013-09-07T13:37:00
-
source, Optional string
Filter reviews by source.
Example: ?source=Trustpilot
-
username, Optional string
Filter reviews by user name.
Example: ?username=Vlad
-
findReviewer, Optional string
Filter reviews by Find Reviewer requests (contacted or not contacted).
Example: ?findReviewer=notContacted
curl -X GET "https://api.trustpilot.com/v1/private/business-units/{businessUnitId}/reviews" \-H "Authorization: Bearer YOUR-ACCESS-TOKEN"Response
{"reviews": [{"status": "active","reportData": {"source": "Trustpilot","publicComment": "This review contains sensitive information.","createdAt": "2013-09-07T13:37:00","reasons": ["sensitiveInformation","consumerIsCompetitor"],"reason": "consumer_is_competitor","reviewVisibility": "hidden"},"findReviewer": {"isEligible": true,"requests": [{"id": "8e3a531e-f8e8-4d63-8d4c-187dc1408ed9","created": "2013-09-07T13:37:00","status": "Pending","businessUserMessage": "Hi! We're having trouble finding you in our records, can you provide us with a reference number? Thanks!","consumerResponse": {"submittedAt": "2013-09-07T13:37:00","name": "John Doe","email": "john.doe@gmail.com","address": "123 Fake St.","phoneNumber": "555-1234","referenceId": "GZ12345","message": "Hi, I've provided my reference number."}}]},"referenceId": "12345","referralEmail": "my@email.com","language": "da","links": [{"href": "<Url for the resource>","method": "<Http method for the resource>","rel": "<Description of the relation>"}],"title": "My review","businessUnit": {"identifyingName": "trustpilot.com","displayName": "Trustpilot","id": "507f191e810c19729de860ea","links": [{"href": "<Url for the resource>","method": "<Http method for the resource>","rel": "<Description of the relation>"}]},"location": {"id": "43f51215-a1fc-4c60-b6dd-e4afb6d7b831","name": "Pilestraede 58","urlFormattedName": "Pilestraede58","externalId": "Location#123"},"text": "This shop is great.","companyReply": {"text": "This is our reply.","createdAt": "2013-09-07T13:37:00","updatedAt": "2013-09-07T13:37:00","authorBusinessUserId": "507f191e810c19729de860ea","authorBusinessUserName": "John Doe"},"source": "Organic","tags": [{"group": "Generic","value": "Tag value"}],"isVerified": true,"stars": 5,"updatedAt": "2013-09-07T13:37:00","experiencedAt": "2013-09-07T13:37:00","numberOfLikes": 10,"consumer": {"displayLocation": "Frederiksberg, DK","numberOfReviews": 1,"displayName": "John Doe","id": "507f191e810c19729de860ea","links": [{"href": "<Url for the resource>","method": "<Http method for the resource>","rel": "<Description of the relation>"}]},"id": "507f191e810c19729de860ea","createdAt": "2013-09-07T13:37:00","complianceLabels": [null],"countsTowardsTrustScore": false,"countsTowardsLocationTrustScore": false,"invitation": {"businessUnitId": "507f191e810c19729de860ea"},"businessUnitHistory": [{"businessUnitId": "507f191e810c19729de860ea","identifyingName": "example.com","displayName": "Example Inc.","changeDate": "2013-09-07T13:37:00"}],"reviewVerificationLevel": "invited"}],"links": [{"href": "<Url for the resource>","method": "<Http method for the resource>","rel": "<Description of the relation>"}]} -
-
Get a business unit's reviews
This method gets all the reviews written about the business unit.
HTTP method: GET
Authentication: API Key
URL: https://api.trustpilot.com/v1/business-units/{businessUnitId}/reviews
Parameters
-
businessUnitId, Required string
The id of the business unit.
Example: .../v1/business-units/507f191e810c19729de860ea/reviews
-
stars, Optional array
Filter by reviews with a specific number of stars.
Example: ?stars=5
-
language, Optional array
Filter by reviews with only a specific language.
Example: ?language=en
-
internalLocationId, Optional string
Filter by reviews with only a specific location.
Example: ?internalLocationId=f994ac75-2f51-456a-9be9-ec30eadae778
-
page, Optional integer
The page to retrieve. If the page number requested is higher than the available number of pages an empty array will be returned.
Example: ?page=1
-
perPage, Optional integer
The number of reviews to retrieve per page.
Example: ?perPage=3
-
orderBy, Optional array
The order in which the results should be sorted. Valid values are: createdat.asc, createdat.desc, stars.asc and stars.desc
Example: ?orderBy=stars.desc
-
tagGroup, Optional string
Filtering reviews on Tag group
Example: ?tagGroup=Group Name
-
tagValue, Optional string
Filtering reviews on Tag value
Example: ?tagValue=Tag Name
-
responded, Optional boolean
Filter reviews by responded state.
Example: ?responded=true
-
includeReportedReviews, Optional boolean
Include reported reviews.
Example: ?includeReportedReviews=true
curl -X GET "https://api.trustpilot.com/v1/business-units/{businessUnitId}/reviews" \-H "apikey: YOUR-API-KEY-HERE"Response
{"links": [{"href": "<Url for the resource>","method": "<Http method for the resource>","rel": "<Description of the relation>"}],"reviews": [{"id": null,"stars": 0,"title": null,"text": null,"language": null,"createdAt": "2023-01-01T12:00:00Z","experiencedAt": "2023-01-01T12:00:00Z","updatedAt": "2023-01-01T12:00:00Z","numberOfLikes": 0,"isVerified": false,"source": null,"status": null,"companyReply": {"text": "This is our reply.","createdAt": "2013-09-07T13:37:00","updatedAt": "2013-09-07T13:37:00","authorBusinessUserId": "507f191e810c19729de860ea","authorBusinessUserName": "John Doe"},"consumer": {"displayLocation": "Frederiksberg, DK","numberOfReviews": 1,"displayName": "John Doe","id": "507f191e810c19729de860ea","links": [{"href": "<Url for the resource>","method": "<Http method for the resource>","rel": "<Description of the relation>"}]},"businessUnit": {"identifyingName": "trustpilot.com","displayName": "Trustpilot","id": "507f191e810c19729de860ea","links": [{"href": "<Url for the resource>","method": "<Http method for the resource>","rel": "<Description of the relation>"}]},"location": {"id": "43f51215-a1fc-4c60-b6dd-e4afb6d7b831","name": "Pilestraede 58","urlFormattedName": "Pilestraede58"},"countsTowardsTrustScore": false,"countsTowardsLocationTrustScore": false,"links": [{"href": "<Url for the resource>","method": "<Http method for the resource>","rel": "<Description of the relation>"}],"reportData": {"source": "Trustpilot","publicComment": "This review contains sensitive information.","createdAt": "2013-09-07T13:37:00","reasons": ["sensitiveInformation","consumerIsCompetitor"],"reason": "consumer_is_competitor","reviewVisibility": "hidden"},"complianceLabels": [null],"invitation": {"businessUnitId": "507f191e810c19729de860ea"},"businessUnitHistory": [{"businessUnitId": "507f191e810c19729de860ea","identifyingName": "example.com","displayName": "Example Inc.","changeDate": "2013-09-07T13:37:00"}],"reviewVerificationLevel": null}]} -