Skip to Content
StoreOSv0.27.1
Core GraphQL APIReferenceMutations

Inventory__apply Technical Specification Template To Products

Copies the template's specifications into the given products. A product specification with the same key is replaced; other specifications are kept. Returns the number of products updated. Requires a signed-in staff user. Needs the `inventory__Product` `update` permission. Send the `x-tenant` header (the gateway sets it from your API key).

MUTATIONinventory__applyTechnicalSpecificationTemplateToProducts(productIds: [ID!]!, templateId: ID!): Int!

Copies the template's specifications into the given products. A product specification with the same key is replaced; other specifications are kept. Returns the number of products updated. Requires a signed-in staff user. Needs the inventory__Product update permission. Send the x-tenant header (the gateway sets it from your API key).

Arguments

productIds*[ID!]!
templateId*ID!

Returns

inventory__applyTechnicalSpecificationTemplateToProducts*Int!
Example Request
mutation Inventory__applyTechnicalSpecificationTemplateToProducts($productIds: [ID!]!, $templateId: ID!) {  inventory__applyTechnicalSpecificationTemplateToProducts(    productIds: $productIds    templateId: $templateId  )}
Variables
{  "productIds": [    "1"  ],  "templateId": "1"}
Example Response
{  "data": {    "inventory__applyTechnicalSpecificationTemplateToProducts": 10  }}