# Exports

Build and manage exports from the PIM system

## Create an export

> \#Available from v.3.10.12

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"Exports","description":"Build and manage exports from the PIM system"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Struct.App.Api.Models.EnrichmentInsight.EntityType":{"enum":[10,20,30,50],"type":"integer","description":"Enum representing each supported entity type in enrichment insights engine \n\n- `10` = **Category**: Category reference\n- `20` = **Product**: Product reference\n- `30` = **Variant**: Variant reference\n- `50` = **VariantGroup**: Variant group reference","format":"int32"},"Struct.App.Api.Models.Exports.ExportField":{"type":"object","properties":{"Uid":{"type":"string","description":"Unique id of field","nullable":true},"Name":{"type":"string","description":"Presented name of field","nullable":true}},"additionalProperties":false,"description":"Represents a field that can be exported"}}},"paths":{"/v1/exports/fields/{entityType}":{"get":{"tags":["Exports"],"summary":"Create an export","description":"#Available from v.3.10.12","parameters":[{"name":"entityType","in":"path","description":"Entity type to get fields for","required":true,"schema":{"$ref":"#/components/schemas/Struct.App.Api.Models.EnrichmentInsight.EntityType"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Struct.App.Api.Models.Exports.ExportField"}}}}}}}}}}
```

## Create an export

> \#Available from v.3.10.12

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"Exports","description":"Build and manage exports from the PIM system"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Struct.App.Api.Models.Exports.ExportModel":{"type":"object","properties":{"EntityType":{"$ref":"#/components/schemas/Struct.App.Api.Models.EnrichmentInsight.EntityType"},"EntityIds":{"type":"array","items":{"type":"integer","format":"int32"},"description":"The ids to export data for","nullable":true},"ExportSettings":{"$ref":"#/components/schemas/Struct.App.Api.Models.Exports.ExportSettings"}},"additionalProperties":false,"description":"Model defining export to build"},"Struct.App.Api.Models.EnrichmentInsight.EntityType":{"enum":[10,20,30,50],"type":"integer","description":"Enum representing each supported entity type in enrichment insights engine \n\n- `10` = **Category**: Category reference\n- `20` = **Product**: Product reference\n- `30` = **Variant**: Variant reference\n- `50` = **VariantGroup**: Variant group reference","format":"int32"},"Struct.App.Api.Models.Exports.ExportSettings":{"type":"object","properties":{"ExportSettingsType":{"type":"string","description":"Type of export settings","nullable":true,"readOnly":true}},"additionalProperties":false,"description":"Settings for an export"},"Struct.App.Api.Models.Exports.ExportResult":{"type":"object","properties":{"FileBytes":{"type":"string","description":"The actual file containing the exported data","format":"byte","nullable":true},"FileName":{"type":"string","description":"Name of the file","nullable":true},"FileExtension":{"type":"string","description":"Extension of the file","nullable":true},"MimeType":{"type":"string","description":"Mimetype of the file","nullable":true}},"additionalProperties":false,"description":"Result of an export"}}},"paths":{"/v1/exports/buildexport":{"post":{"tags":["Exports"],"summary":"Create an export","description":"#Available from v.3.10.12","requestBody":{"description":"Model defining the export to build","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Struct.App.Api.Models.Exports.ExportModel"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Struct.App.Api.Models.Exports.ExportResult"}}}}}}}}}
```
