Actions15
Organization → Get
AI-generatedSummary
Retrieve an organization by its ID using the VTEX B2B GraphQL API.
Inputs
- resource — The selected VTEX B2B resource type (e.g., Organization, Cost Center, User).
- operation — The GraphQL operation to perform (e.g., Get, Get Many, Create, Update, Delete).
- organizationId (required) — ID of the organization, required for operations that need it.
- costCenterId (required) — ID of the cost center, required for relevant operations.
- userId (required) — ID of the user, required for relevant operations.
- customQuery — Custom GraphQL mutation query; leave empty to use default templates.
- variables — JSON object containing variables for the GraphQL mutation.
- page — Page number for paginated queries (e.g., getMany). Default is 1.
- pageSize — Number of items per page for paginated queries (e.g., getMany). Default is 25.
Output shape
A single record representing the requested entity (e.g., organization details) or an error object
Pagination metadata included for getMany; custom queries may return varying fields.
Examples
Example 1: Fetch organization details by ID
resource=organization; operation=get; organizationId=12345
Example 2: List organizations with pagination
resource=organization; operation=getMany; page=1; pageSize=10
Example 3: Create a new organization using a custom mutation
resource=organization; operation=create; customQuery=mutation { createOrganization(input: { name: 'Test Corp' } ) { id } }; variables={input:{name:'Test Corp'}}