Struct Docs
Struct.PIM 4
Struct.PIM 4
  • Struct PIM Documentation
  • API Reference
  • Latest updates from Struct HQ
  • Latest updates in Documentation
  • Fundamental concepts
    • Get familiar with Struct PIM
    • Catalogues & categories
    • Products & variants
    • Attributes
    • Product structures
    • Identifiers
    • Global lists
    • Localization & segmentation
    • Revisions & changelog
    • Publications
    • Supplier onboarding portal
  • Tutorials
    • Helpful guides
      • How to search efficiently
      • How to use Import
        • How to import products
        • How to import data into a list property on entities
        • How to import categories
        • How to import with media
        • How to use File templates
    • Example projects
      • Working with the API
  • Integration
    • Integrate with Struct PIM
    • Web API
    • Webhooks
  • Media format
  • API Reference
    • Introduction
    • Endpoints
      • AssetFolders
      • Assets
      • AssetTypes
      • AttributeGroups
      • Attributes
      • AttributeScopes
      • Browse
      • BusinessUnits
      • Catalogues
      • Categories
      • Dimensions
      • Exports
      • EnrichmentInsightSetups
      • GlobalLists
      • Languages
      • Maintenance
      • Miscellaneous
      • Messaging
      • Permissions
      • Products
      • ProductStructures
      • Publications
      • Transactions
      • UserGroup
      • UserRoles
      • Users
      • VariantGroups
      • UserTasks
      • Variants
      • Webhooks
      • Workflows
      • Models
Powered by GitBook
On this page
  1. API Reference
  2. Endpoints

Variants

PreviousUserTasksNextWebhooks

Variants are sub elements of products that define different variations a product exist in, ex. different colors, sizes etc. Variants cannot exist on its own as they need to be attached to a product. Variants have defining attributes which defines the attributes variants of a product vary on, ex. color and size, with and length etc.

Get ids of all variants in the system

get

By default, ids for archived variants are not returned

Authorizations
Query parameters
includeArchivedbooleanOptional

Include archived variants

Default: false
Responses
200
OK
Responseinteger · int32[]
get
GET /v1/variants/ids HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

[
  1
]

Get basic model for a variant

get
Authorizations
Path parameters
idinteger · int32Required

Id of variant

Responses
200
OK
get
GET /v1/variants/{id} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

{
  "Id": 1,
  "Name": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "ProductId": 1,
  "SortOrder": 1,
  "VariantGroupId": 1,
  "VariantGroupSortOrder": 1,
  "Created": "2025-05-09T12:48:50.606Z",
  "CreatedBy": "text",
  "LastModified": "2025-05-09T12:48:50.606Z",
  "LastModifiedBy": "text",
  "IsArchived": true,
  "ArchiveReason": "123e4567-e89b-12d3-a456-426614174000",
  "ProductStructureUid": "123e4567-e89b-12d3-a456-426614174000",
  "DefiningAttributes": [
    "123e4567-e89b-12d3-a456-426614174000"
  ],
  "WorkflowStateUid": "123e4567-e89b-12d3-a456-426614174000",
  "BusinessUnits": [
    {
      "AccessPolicy": "text",
      "BusinessUnitUid": "123e4567-e89b-12d3-a456-426614174000"
    }
  ]
}

Delete a variant

delete
Authorizations
Path parameters
idinteger · int32Required

Id of variant to delete

Responses
200
OK
delete
DELETE /v1/variants/{id} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

No content

Get basic models for variants

get

No more than 5000 variants can be requested at a time. If no limit is provided, the default limit of 1000 will be used. By default, archived variants are not returned

Authorizations
Query parameters
includeArchivedbooleanOptionalDefault: false
limitinteger · int32OptionalDefault: 1000
afterIdinteger · int32Optional
Responses
200
OK
get
GET /v1/variants HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

{
  "Variants": [
    {
      "Id": 1,
      "Name": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "ProductId": 1,
      "SortOrder": 1,
      "VariantGroupId": 1,
      "VariantGroupSortOrder": 1,
      "Created": "2025-05-09T12:48:50.606Z",
      "CreatedBy": "text",
      "LastModified": "2025-05-09T12:48:50.606Z",
      "LastModifiedBy": "text",
      "IsArchived": true,
      "ArchiveReason": "123e4567-e89b-12d3-a456-426614174000",
      "ProductStructureUid": "123e4567-e89b-12d3-a456-426614174000",
      "DefiningAttributes": [
        "123e4567-e89b-12d3-a456-426614174000"
      ],
      "WorkflowStateUid": "123e4567-e89b-12d3-a456-426614174000",
      "BusinessUnits": [
        {
          "AccessPolicy": "text",
          "BusinessUnitUid": "123e4567-e89b-12d3-a456-426614174000"
        }
      ]
    }
  ],
  "Total": 1,
  "Remaining": 1,
  "LastId": 1
}

Get all identifiers and their internal ids for a specific identifier type

get
Authorizations
Path parameters
identifierAliasstringRequired

Alias of identifier type

Responses
200
OK
get
GET /v1/variants/identifiers/{identifierAlias} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

{
  "ANY_ADDITIONAL_PROPERTY": 1
}

Get the internal id of a variant based on its identifier

get
Authorizations
Path parameters
identifierAliasstringRequired

Alias of identifier type

identifierstringRequired

Identifier value

Responses
200
OK
Responseinteger · int32
get
GET /v1/variants/identifiers/{identifierAlias}/{identifier} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

1

Get attribute values for a variant

get
Authorizations
Path parameters
idinteger · int32Required

Id of variant

Query parameters
globalListValueReferencesOnlybooleanOptional

Indicate if only uids of referenced to global list values shall be returned instead of the materialized values

Default: false
Responses
200
OK
404
Not Found
get
GET /v1/variants/{id}/attributevalues HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
{
  "VariantId": 1,
  "Values": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  }
}

Get references to a variant

get

#Available from v.3.5.0

Authorizations
Path parameters
idinteger · int32Required

Id of variant

Responses
200
OK
get
GET /v1/variants/{id}/references HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

{
  "VariantId": 1,
  "ReferencingCategories": [
    {
      "EntityId": 1,
      "AttributeUid": "123e4567-e89b-12d3-a456-426614174000"
    }
  ],
  "ReferencingProducts": [
    {
      "EntityId": 1,
      "AttributeUid": "123e4567-e89b-12d3-a456-426614174000"
    }
  ],
  "ReferencingVariantGroups": [
    {
      "EntityId": 1,
      "AttributeUid": "123e4567-e89b-12d3-a456-426614174000"
    }
  ],
  "ReferencingVariants": [
    {
      "EntityId": 1,
      "AttributeUid": "123e4567-e89b-12d3-a456-426614174000"
    }
  ],
  "ReferencingAssets": [
    {
      "EntityId": 1,
      "AttributeUid": "123e4567-e89b-12d3-a456-426614174000"
    }
  ],
  "ReferencingGlobalListValues": [
    "123e4567-e89b-12d3-a456-426614174000"
  ]
}

Get all available query fields in the PIM installation

get
Authorizations
Responses
200
OK
get
GET /v1/variants/queryfields HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

[
  {
    "Uid": "text",
    "Name": "text",
    "SupportsSorting": true
  }
]

Get Enrichment Insights for a variant

get

#Available from v.3.5.0

Authorizations
Path parameters
idinteger · int32Required

Id of variant to get insights for

Responses
200
OK
get
GET /v1/variants/{id}/enrichmentinsights HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

[
  {
    "EnrichmentInsightSetupUid": "123e4567-e89b-12d3-a456-426614174000",
    "EntityId": 1,
    "Completeness": 1,
    "MissingData": [
      {
        "Type": "text",
        "DataReference": "text"
      }
    ],
    "Ignored": true
  }
]

Enable or disable an enrichment insight for a variant

patch

#Available from v.3.5.0

Authorizations
Path parameters
idinteger · int32Required

Id of variant

enrichmentInsightSetupUidstring · uuidRequired

Uid of enrichment insight to toggle ignore for

ignorebooleanRequired

Indicate whether to ignore the insight for the given enrichment insight and variant

Responses
200
OK
patch
PATCH /v1/variants/{id}/enrichmentinsights/{enrichmentInsightSetupUid}/{ignore} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

No content

  • GETGet ids of all variants in the system
  • GETGet basic model for a variant
  • DELETEDelete a variant
  • PATCHUpdate a variant
  • POSTGet basic model for a range of variants
  • GETGet basic models for variants
  • POSTCreate new variants
  • DELETEDelete multiple variants
  • PATCHUpdate multiple variants
  • GETGet all identifiers and their internal ids for a specific identifier type
  • GETGet the internal id of a variant based on its identifier
  • POSTGet internal ids of multiple variants from their identifier
  • GETGet attribute values for a variant
  • POSTGet attribute values for multiple variants
  • GETGet references to a variant
  • POSTGet references to a batch of variants
  • POSTGet ids of variants matching certain criteria
  • POSTGet paged result of variants matching certain criteria. Result mapped with headers and item results
  • GETGet all available query fields in the PIM installation
  • GETGet Enrichment Insights for a variant
  • POSTGet Enrichment Insights for a batch of variants
  • POSTGet insights for a batch of variants and a specific Enrichment Insight
  • PATCHEnable or disable an enrichment insight for a variant
  • PATCHEnable or disable an enrichment insight for a batch of variants
  • POSTGet attributes which values are inherited from the product

Update a variant

patch
Authorizations
Path parameters
idinteger · int32Required

Id of variant

Body

Update model containing the updates to make on a variant. Note that properties with null values will be ignored and will not cause an update. This means you should only set properties that shall be updated on the variant

ProductIdinteger · int32 | nullableOptional

Id of product to move variant to

IsArchivedboolean | nullableOptional

Indicate whether the product shall be archived or un-archived

ArchiveReasonstring · uuid | nullableOptional

Reference to the archive reason when archiving variant (if IsArchived is true)

SortOrderinteger · int32 | nullableOptional

Sort order of variant compared to other variants of the product

VariantGroupSortOrderinteger · int32 | nullableOptional

Sort order of variant compared to other variants in same variant group

WorkflowStateUidstring · uuid | nullableOptional

Workflow state to set on the variant

Responses
200
OK
patch
PATCH /v1/variants/{id} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 333

{
  "ProductId": 1,
  "IsArchived": true,
  "ArchiveReason": "123e4567-e89b-12d3-a456-426614174000",
  "SortOrder": 1,
  "VariantGroupSortOrder": 1,
  "WorkflowStateUid": "123e4567-e89b-12d3-a456-426614174000",
  "BusinessUnits": [
    {
      "AccessPolicy": "text",
      "BusinessUnitUid": "123e4567-e89b-12d3-a456-426614174000"
    }
  ],
  "Values": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  }
}
200

OK

No content

Get basic model for a range of variants

post
Authorizations
Body
integer · int32[]Optional
Responses
200
OK
post
POST /v1/variants/batch HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 3

[
  1
]
200

OK

[
  {
    "Id": 1,
    "Name": {
      "ANY_ADDITIONAL_PROPERTY": "text"
    },
    "ProductId": 1,
    "SortOrder": 1,
    "VariantGroupId": 1,
    "VariantGroupSortOrder": 1,
    "Created": "2025-05-09T12:48:50.606Z",
    "CreatedBy": "text",
    "LastModified": "2025-05-09T12:48:50.606Z",
    "LastModifiedBy": "text",
    "IsArchived": true,
    "ArchiveReason": "123e4567-e89b-12d3-a456-426614174000",
    "ProductStructureUid": "123e4567-e89b-12d3-a456-426614174000",
    "DefiningAttributes": [
      "123e4567-e89b-12d3-a456-426614174000"
    ],
    "WorkflowStateUid": "123e4567-e89b-12d3-a456-426614174000",
    "BusinessUnits": [
      {
        "AccessPolicy": "text",
        "BusinessUnitUid": "123e4567-e89b-12d3-a456-426614174000"
      }
    ]
  }
]

Create new variants

post

A maximum of 5000 variants can be created in one request

Authorizations
Body

Model for creating a new variant

ProductIdinteger · int32Optional

Id of product to attach variant to

SortOrderinteger · int32 | nullableOptional

Sort order of variant compared to other variants of the product (when null, variant is placed after existing variants)

VariantGroupSortOrderinteger · int32 | nullableOptional

Sort order of variant compared to other variants in same variant group

WorkflowStateUidstring · uuid | nullableOptional

Workflow state to set on the variant

Responses
200
OK
Responseinteger · int32
400
Bad Request
post
POST /v1/variants HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 262

[
  {
    "ProductId": 1,
    "SortOrder": 1,
    "VariantGroupSortOrder": 1,
    "WorkflowStateUid": "123e4567-e89b-12d3-a456-426614174000",
    "BusinessUnits": [
      {
        "AccessPolicy": "text",
        "BusinessUnitUid": "123e4567-e89b-12d3-a456-426614174000"
      }
    ],
    "Values": {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    }
  }
]
1

Delete multiple variants

delete
Authorizations
Body
integer · int32[]Optional
Responses
200
OK
delete
DELETE /v1/variants HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 3

[
  1
]
200

OK

No content

Update multiple variants

patch
Authorizations
Body

Update model for a variant

VariantIdinteger · int32Optional

Id of variant to update

Responses
200
OK
patch
PATCH /v1/variants HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 365

[
  {
    "VariantId": 1,
    "UpdateModel": {
      "ProductId": 1,
      "IsArchived": true,
      "ArchiveReason": "123e4567-e89b-12d3-a456-426614174000",
      "SortOrder": 1,
      "VariantGroupSortOrder": 1,
      "WorkflowStateUid": "123e4567-e89b-12d3-a456-426614174000",
      "BusinessUnits": [
        {
          "AccessPolicy": "text",
          "BusinessUnitUid": "123e4567-e89b-12d3-a456-426614174000"
        }
      ],
      "Values": {
        "ANY_ADDITIONAL_PROPERTY": "anything"
      }
    }
  }
]
200

OK

No content

Get internal ids of multiple variants from their identifier

post
Authorizations
Body

Provide an identifier alias along with an array of identifiers to get the internal entity ids matching those identifiers

IdentifierAliasstring | nullableOptional

The alias of the identifier

Identifiersstring[] | nullableOptional

Array of identifiers to return internal ids for

Responses
200
OK
post
POST /v1/variants/batch/identifiers HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 49

{
  "IdentifierAlias": "text",
  "Identifiers": [
    "text"
  ]
}
200

OK

{
  "ANY_ADDITIONAL_PROPERTY": 1
}

Get attribute values for multiple variants

post

No more than 5000 variants can be requested at a time.

Authorizations
Body

Define which categories to fetch data for and what data to fetch

VariantIdsinteger · int32[] | nullableOptional

Ids of products to return

IncludeValuesinteger · enumOptional

Defines which attribute values to return

Possible values:
Scopesstring[] | nullableOptional

If IncludeValues is Scopes, define which scopes to return values for here

Aliasesstring[] | nullableOptional

If IncludeValues is Aliases, define aliases of the attributes to include values for

Uidsstring · uuid[] | nullableOptional

If IncludeValues is Uids, define uids of the attributes to include values for

LimitToCultureCodesstring[] | nullableOptional

Only return values for specific languages

LimitToSegmentsstring[] | nullableOptional

Only return values for specific dimension segments

GlobalListValueReferencesOnlybooleanOptional

Indicate if only uids of referenced to global list values shall be returned instead of the materialized values

FromTimestampstring · date-time | nullableOptional

Get attribute values back in time

Responses
200
OK
post
POST /v1/variants/batch/attributevalues HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 259

{
  "VariantIds": [
    1
  ],
  "IncludeValues": 1,
  "Scopes": [
    "text"
  ],
  "Aliases": [
    "text"
  ],
  "Uids": [
    "123e4567-e89b-12d3-a456-426614174000"
  ],
  "LimitToCultureCodes": [
    "text"
  ],
  "LimitToSegments": [
    "text"
  ],
  "GlobalListValueReferencesOnly": true,
  "FromTimestamp": "2025-05-09T12:48:50.606Z"
}
200

OK

[
  {
    "VariantId": 1,
    "Values": {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    }
  }
]

Get references to a batch of variants

post

#Available from v.3.5.0 No more than 5000 values can be requested at a time.

Authorizations
Body
integer · int32[]Optional
Responses
200
OK
post
POST /v1/variants/batch/references HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 3

[
  1
]
200

OK

[
  {
    "VariantId": 1,
    "ReferencingCategories": [
      {
        "EntityId": 1,
        "AttributeUid": "123e4567-e89b-12d3-a456-426614174000"
      }
    ],
    "ReferencingProducts": [
      {
        "EntityId": 1,
        "AttributeUid": "123e4567-e89b-12d3-a456-426614174000"
      }
    ],
    "ReferencingVariantGroups": [
      {
        "EntityId": 1,
        "AttributeUid": "123e4567-e89b-12d3-a456-426614174000"
      }
    ],
    "ReferencingVariants": [
      {
        "EntityId": 1,
        "AttributeUid": "123e4567-e89b-12d3-a456-426614174000"
      }
    ],
    "ReferencingAssets": [
      {
        "EntityId": 1,
        "AttributeUid": "123e4567-e89b-12d3-a456-426614174000"
      }
    ],
    "ReferencingGlobalListValues": [
      "123e4567-e89b-12d3-a456-426614174000"
    ]
  }
]

Get ids of variants matching certain criteria

post
Authorizations
Body

Search model used for searching products or variants in PIM

IncludeArchivedbooleanOptional

Include archived items in result

Responses
200
OK
Responseinteger · int32[]
post
POST /v1/variants/search HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 59

{
  "IncludeArchived": true,
  "QueryModel": {
    "BooleanOperator": 0
  }
}
200

OK

[
  1
]

Get paged result of variants matching certain criteria. Result mapped with headers and item results

post
Authorizations
Body

Extended search model used for searching products or variants in PIM with support for paging and sorting

Pageinteger · int32Optional
PageSizeinteger · int32 | nullableOptional
FieldUidsstring[] | nullableOptional
SortByFieldUidstring | nullableOptional
SortDescendingboolean | nullableOptional
IncludeArchivedbooleanOptional

Include archived items in result

Responses
200
OK
post
POST /v1/variants/search/paged HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 148

{
  "Page": 1,
  "PageSize": 1,
  "FieldUids": [
    "text"
  ],
  "SortByFieldUid": "text",
  "SortDescending": true,
  "IncludeArchived": true,
  "QueryModel": {
    "BooleanOperator": 0
  }
}
200

OK

{
  "TotalHits": 1,
  "Page": 1,
  "PageSize": 1,
  "TotalPages": 1,
  "ItemListHeaders": [
    {
      "FieldUid": "text",
      "FieldName": "text",
      "FieldType": "text",
      "SupportsSearching": true,
      "SupportsSorting": true
    }
  ],
  "ListItems": [
    {
      "Id": 1,
      "ShownValues": [
        "text"
      ]
    }
  ]
}

Get Enrichment Insights for a batch of variants

post

#Available from v.3.5.0

Authorizations
Body
integer · int32[]Optional
Responses
200
OK
post
POST /v1/variants/batch/enrichmentinsights HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 3

[
  1
]
200

OK

[
  {
    "EnrichmentInsightSetupUid": "123e4567-e89b-12d3-a456-426614174000",
    "EntityId": 1,
    "Completeness": 1,
    "MissingData": [
      {
        "Type": "text",
        "DataReference": "text"
      }
    ],
    "Ignored": true
  }
]

Get insights for a batch of variants and a specific Enrichment Insight

post

#Available from v.3.5.0

Authorizations
Path parameters
enrichmentInsightUidstring · uuidRequired

Uid of enrichment insight to get for batch of variants

Body
integer · int32[]Optional
Responses
200
OK
Responseinteger · int32
post
POST /v1/variants/batch/enrichmentinsights/{enrichmentInsightUid} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 3

[
  1
]
200

OK

1

Enable or disable an enrichment insight for a batch of variants

patch

#Available from v.3.5.0

Authorizations
Path parameters
enrichmentInsightSetupUidstring · uuidRequired

Uid of enrichment insight to toggle ignore for

ignorebooleanRequired

Indicate whether to ignore the insight for the given enrichment insight and variants

Body
integer · int32[]Optional
Responses
200
OK
patch
PATCH /v1/variants/batch/enrichmentinsights/{enrichmentInsightSetupUid}/{ignore} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 3

[
  1
]
200

OK

No content

Get attributes which values are inherited from the product

post

A maximum of 1000 products can be requested in one request

Authorizations
Body

Request model for getting inheritedAttributes for a list of products

ProductIdsinteger · int32[] | nullableOptional

The product ids to get inherited attributes for

InheritedAttributesstring · uuid[] | nullableOptional

The attribute uids to get inherited attributes for

Responses
200
OK
post
POST /v1/variants/inheritedAttributeValues HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 81

{
  "ProductIds": [
    1
  ],
  "InheritedAttributes": [
    "123e4567-e89b-12d3-a456-426614174000"
  ]
}
200

OK

[
  {
    "ProductId": 1,
    "VariantId": 1,
    "InheritedAttributes": [
      "123e4567-e89b-12d3-a456-426614174000"
    ]
  }
]