Documentation
Feedback
Guides
API Reference

API Reference
Filter By
Post
Get
Put
Delete
Patch

Organization Units API

The Organization Units API enables you to manage B2B functionalities in your VTEX store, focusing on users and organization units. This API provides endpoints for managing users, organization units, and their associated scopes.

This feature is only available for stores using B2B Buyer Portal, which is currently available to select accounts.

Index

Users

Organization Units

Scopes

Common parameters

Parameter name Description Type
accountName Name of the VTEX account. Used as part of the URL. Server variable.
environment Environment to use. Used as part of the URL. Server variable.
VtexIdclientAutCookie User token, valid for 24 hours. Authentication header.

Endpoints

Users

SummaryMethodPath
Get user scopesGET/api/organization-units/v1/users/{userId}/scopes
Get user's organization unitGET/api/organization-units/v1/{userId}/unit

Units

SummaryMethodPath
Create organization unitPOST/api/organization-units/v1
Search organization unitsGET/api/organization-units/v1
Get organization unitGET/api/organization-units/v1/{organizationUnitId}
Delete organization unitDELETE/api/organization-units/v1/{organizationUnitId}
Rename organization unitPATCH/api/organization-units/v1/{organizationUnitId}
Get all children organization unitsGET/api/organization-units/v1/{organizationUnitId}/children
Get root organization unitsGET/api/organization-units/v1/roots
Move organization unitPUT/api/organization-units/v1/{organizationUnitId}/path
Add user to organization unitPOST/api//vtexid/organization-units/{organizationUnitId}/users
Remove users from organization unitDELETE/api//vtexid/organization-units/{organizationUnitId}/users
List users from organization unitGET/api//vtexid/organization-units/{organizationUnitId}/users
Find all organization units with scope valueGET/api/organization-units/v1/scope/{scope}/value/{scopeValue}

Scopes

SummaryMethodPath
Get organization unit scopesGET/api/organization-units/v1/{organizationUnitId}/scopes
Delete all scopes from organization unitDELETE/api/organization-units/v1/{organizationUnitId}/scopes
Create organization unit scopePOST/api/organization-units/v1/{organizationUnitId}/scopes/{scope}
Update organization unit scopePUT/api/organization-units/v1/{organizationUnitId}/scopes/{scope}
Delete organization unit scopeDELETE/api/organization-units/v1/{organizationUnitId}/scopes/{scope}
Remove values from organization unit scopeDELETE/api/organization-units/v1/{organizationUnitId}/scopes/{scope}/remove

Loading API specification...