VTEX B2B GraphQL icon

VTEX B2B GraphQL

Interact with VTEX B2B Organizations GraphQL API

Actions15

Cost Center → Get

AI-generated

Summary

Retrieves a single cost center by its ID from the VTEX B2B GraphQL API.

Inputs

  • costCenterId (required) — The ID of the cost center to retrieve.

Output shape

a single cost center object containing id, name, organization, and addresses (array of addressId and addressType)

The response includes id, name, organization, and addresses fields; addresses may be empty or contain address objects.

Examples

Example 1: Fetch cost center with ID 456

Set Resource to Cost Center, Operation to Get, and provide costCenterId = 456

Example 2: Use default pagination for getMany

Set Resource to Cost Center, Operation to Get Many, and optionally configure Page and Page Size

Example 3: Create a cost center

Switch Operation to Create and fill Custom Query and Variables with a mutation

Discussion