Get Profiles
API Endpointβ
All Social API operations use a single GraphQL endpoint:
https://api.travelgate.com
Overviewβ
Use allProfilesV2 to retrieve organization profile data in the Social API scope. This query helps you inspect profile attributes for Buyers and Sellers, including owner code, categories, and integration types.
Common Use Casesβ
- List Available Profiles: Retrieve profile records visible to your authenticated scope.
- Filter by Owner Organization: Retrieve profiles for one owner code (useful when you belong to more than one organization).
- Inspect Commercial Classification: Review buyer/seller categories and subcategories.
- Review Integration Type Signals: Check
buyerIntegrationTypeandsellerIntegrationTypevalues.
Authenticationβ
All Social API calls require JWT (JSON Web Token) authentication. Follow the Admin API Authentication Guide to obtain your bearer token and include it in all API requests.
Query Overviewβ
The Social API root field is social, and profile data is returned through allProfilesV2:
social {
allProfilesV2(where: { ownerCode: { equals: "example-owner" } }) {
edges {
node {
profileData {
...
}
}
}
}
}
Where Filterβ
The where input is optional.
ownerCode.equals: Filters profiles by owner organization code.
Use sample values (for example, example-owner) only as placeholders.
Requested Profile Fieldsβ
This page examples focus on these profileData fields:
nameowner.codewebsiteUrlsellerIntegrationTypebuyerIntegrationTypebuyerCategorysellerCategorybuyerSubCategorysellerSubCategory
Query Examplesβ
Example 1. Inline Filterβ
query {
social {
allProfilesV2(where: { ownerCode: { equals: "example-owner" } }) {
edges {
node {
profileData {
name
owner {
code
}
websiteUrl
sellerIntegrationType
buyerIntegrationType
buyerCategory
sellerCategory
buyerSubCategory
sellerSubCategory
}
}
}
}
}
}
Example 2. Query with Variablesβ
query GetProfiles($ownerCode: String!) {
social {
allProfilesV2(where: { ownerCode: { equals: $ownerCode } }) {
edges {
node {
profileData {
name
owner {
code
}
websiteUrl
sellerIntegrationType
buyerIntegrationType
buyerCategory
sellerCategory
buyerSubCategory
sellerSubCategory
}
}
}
}
}
}
{
"ownerCode": "example-owner"
}
Response Exampleβ
{
"data": {
"social": {
"allProfilesV2": {
"edges": [
{
"node": {
"profileData": {
"name": "Example Travel Company",
"owner": {
"code": "example-owner"
},
"websiteUrl": "https://example.com",
"sellerIntegrationType": null,
"buyerIntegrationType": ["HOTELX"],
"buyerCategory": "Travel Agency",
"sellerCategory": null,
"buyerSubCategory": "Online",
"sellerSubCategory": null
}
}
}
]
}
}
}
}
Response Considerationsβ
allProfilesV2follows a connection structure:edges -> node -> profileData.seller...andbuyer...fields can benulldepending on the organization profile.owner.codeidentifies the owner organization associated with the profile.buyerIntegrationTypeandsellerIntegrationTypemay return multiple values.
Troubleshooting Notesβ
- Empty results: Verify your JWT permissions and visibility scope for the requested owner code.
- Unexpected null fields: Some organizations may not expose both Buyer and Seller profile attributes.
- No owner filter applied: Omitting
wherereturns all profiles visible to your authenticated scope.