# AttributeScopes

Attribute scopes are used to organize your attributes in different scopes, so you can easily work with collections of attributes based on their attribute scopes. If for example you want to render a table with all technical specifications for a product on your website, what are the technical specification attributes? By adding the technical specifications attributes to a specific attribute scope, your can easily find the collection of attributes to render in this table.

## GET /v1/attributescopes

> Get all attribute scopes in the system

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"AttributeScopes","description":"Attribute scopes are used to organize your attributes in different scopes, so you can easily work with collections of attributes based on their attribute scopes.\r\nIf for example you want to render a table with all technical specifications for a product on your website, what are the technical specification attributes? By adding the\r\ntechnical specifications attributes to a specific attribute scope, your can easily find the collection of attributes to render in this table."}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Struct.App.Api.Models.Attribute.AttributeScope":{"type":"object","properties":{"Uid":{"type":"string","description":"Unique id of scope","format":"uuid"},"Alias":{"type":"string","description":"Unique alias of scope used to be easily identifiable by humans","nullable":true}},"additionalProperties":false,"description":"Use attribute scopes to segment your attributes into different scopes for different purposes"}}},"paths":{"/v1/attributescopes":{"get":{"tags":["AttributeScopes"],"summary":"Get all attribute scopes in the system","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Struct.App.Api.Models.Attribute.AttributeScope"}}}}}}}}}}
```

## POST /v1/attributescopes

> Create an attribute scope

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"AttributeScopes","description":"Attribute scopes are used to organize your attributes in different scopes, so you can easily work with collections of attributes based on their attribute scopes.\r\nIf for example you want to render a table with all technical specifications for a product on your website, what are the technical specification attributes? By adding the\r\ntechnical specifications attributes to a specific attribute scope, your can easily find the collection of attributes to render in this table."}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Struct.App.Api.Models.Attribute.AttributeScope":{"type":"object","properties":{"Uid":{"type":"string","description":"Unique id of scope","format":"uuid"},"Alias":{"type":"string","description":"Unique alias of scope used to be easily identifiable by humans","nullable":true}},"additionalProperties":false,"description":"Use attribute scopes to segment your attributes into different scopes for different purposes"},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"Type":{"type":"string","nullable":true},"Title":{"type":"string","nullable":true},"Status":{"type":"integer","format":"int32","nullable":true},"Detail":{"type":"string","nullable":true},"Instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/v1/attributescopes":{"post":{"tags":["AttributeScopes"],"summary":"Create an attribute scope","requestBody":{"description":"Attribute scope to create","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Struct.App.Api.Models.Attribute.AttributeScope"}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## PUT /v1/attributescopes

> Update an attribute scope

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"AttributeScopes","description":"Attribute scopes are used to organize your attributes in different scopes, so you can easily work with collections of attributes based on their attribute scopes.\r\nIf for example you want to render a table with all technical specifications for a product on your website, what are the technical specification attributes? By adding the\r\ntechnical specifications attributes to a specific attribute scope, your can easily find the collection of attributes to render in this table."}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Struct.App.Api.Models.Attribute.AttributeScope":{"type":"object","properties":{"Uid":{"type":"string","description":"Unique id of scope","format":"uuid"},"Alias":{"type":"string","description":"Unique alias of scope used to be easily identifiable by humans","nullable":true}},"additionalProperties":false,"description":"Use attribute scopes to segment your attributes into different scopes for different purposes"},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"Type":{"type":"string","nullable":true},"Title":{"type":"string","nullable":true},"Status":{"type":"integer","format":"int32","nullable":true},"Detail":{"type":"string","nullable":true},"Instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/v1/attributescopes":{"put":{"tags":["AttributeScopes"],"summary":"Update an attribute scope","requestBody":{"description":"Attribute scope to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Struct.App.Api.Models.Attribute.AttributeScope"}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Delete an attribute scope

> Attribute scopes can only be deleted if no attributes reference the scope

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"AttributeScopes","description":"Attribute scopes are used to organize your attributes in different scopes, so you can easily work with collections of attributes based on their attribute scopes.\r\nIf for example you want to render a table with all technical specifications for a product on your website, what are the technical specification attributes? By adding the\r\ntechnical specifications attributes to a specific attribute scope, your can easily find the collection of attributes to render in this table."}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"Type":{"type":"string","nullable":true},"Title":{"type":"string","nullable":true},"Status":{"type":"integer","format":"int32","nullable":true},"Detail":{"type":"string","nullable":true},"Instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/v1/attributescopes":{"delete":{"tags":["AttributeScopes"],"summary":"Delete an attribute scope","description":"Attribute scopes can only be deleted if no attributes reference the scope","parameters":[{"name":"uid","in":"query","description":"Unique id of attribute scope to delete","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## GET /v1/attributescopes/{uid}

> Get a attribute scope from its uid

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"AttributeScopes","description":"Attribute scopes are used to organize your attributes in different scopes, so you can easily work with collections of attributes based on their attribute scopes.\r\nIf for example you want to render a table with all technical specifications for a product on your website, what are the technical specification attributes? By adding the\r\ntechnical specifications attributes to a specific attribute scope, your can easily find the collection of attributes to render in this table."}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Struct.App.Api.Models.Attribute.AttributeScope":{"type":"object","properties":{"Uid":{"type":"string","description":"Unique id of scope","format":"uuid"},"Alias":{"type":"string","description":"Unique alias of scope used to be easily identifiable by humans","nullable":true}},"additionalProperties":false,"description":"Use attribute scopes to segment your attributes into different scopes for different purposes"},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"Type":{"type":"string","nullable":true},"Title":{"type":"string","nullable":true},"Status":{"type":"integer","format":"int32","nullable":true},"Detail":{"type":"string","nullable":true},"Instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/v1/attributescopes/{uid}":{"get":{"tags":["AttributeScopes"],"summary":"Get a attribute scope from its uid","parameters":[{"name":"uid","in":"path","description":"Unique id of attribute scope to get","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Struct.App.Api.Models.Attribute.AttributeScope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## POST /v1/attributescopes/batch/attributes

> Get uids of attributes in scopes

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"AttributeScopes","description":"Attribute scopes are used to organize your attributes in different scopes, so you can easily work with collections of attributes based on their attribute scopes.\r\nIf for example you want to render a table with all technical specifications for a product on your website, what are the technical specification attributes? By adding the\r\ntechnical specifications attributes to a specific attribute scope, your can easily find the collection of attributes to render in this table."}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Struct.App.Api.Models.Attribute.AttributeScopeAttributesModel":{"type":"object","properties":{"AttributeScopeUids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Attribute scope uids to request attributes for","nullable":true}},"additionalProperties":false,"description":"Wrapper for attribute scope attributes batch query"}}},"paths":{"/v1/attributescopes/batch/attributes":{"post":{"tags":["AttributeScopes"],"summary":"Get uids of attributes in scopes","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Struct.App.Api.Models.Attribute.AttributeScopeAttributesModel"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string","format":"uuid"}}}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.struct.com/api-reference/endpoints/attributescopes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
