ordersTemplates
Retrieves a paginated list of order templates. Order templates contain predefined enrichment data configurations that can be applied to orders for consistent processing workflows.
Required Permission
orders:read_b2b_templates
Access Control
- **Regular users**: Can only access templates from brands they have permissions for
- **Super admins**: Can access all templates across all brands
- **Brand requirement**: Non-admin users must have associated brands or specify a brand filter
Default Behavior
- Returns only active templates by default
- Results are paginated using GraphQL connection pattern
- Sorted by creation date (newest first)
Possible Errors
- **BrandNotSelectedError**: When non-admin users don't have associated brands
- **AuthorizationError**: When user lacks required permissions or brand access
ordersTemplates(
activeOnly: Boolean = true
after: String
before: String
brandId: ID
filters: B2BOrderTemplateFilterInput
first: Int
last: Int
): OrderTemplateConnection!
Arguments
ordersTemplates.activeOnly
● Boolean
scalar
Filter by active templates only.
ordersTemplates.after
● String
scalar
Returns the elements in the list that come after the specified cursor.
ordersTemplates.before
● String
scalar
Returns the elements in the list that come before the specified cursor.
ordersTemplates.brandId
● ID
scalar
Brand ID to filter templates by.
ordersTemplates.filters
● B2BOrderTemplateFilterInput
input
Filtering options for templates.
ordersTemplates.first
● Int
scalar
Returns the first _n_ elements from the list.
ordersTemplates.last
● Int
scalar
Returns the last _n_ elements from the list.
Type
OrderTemplateConnection
object
The connection type for OrderTemplate.