Skip to main content

productAddAttributes

Create and process an asynchronous operation that sets new products attributes for the provided product.

Process Notifications​

Use the response processId to get notifications via processStatusSubscription subscription. Use the provided productId to listen to product notification sent via 'productUpdates' subscription when product attributes are registered.

Process Tracking​

Use the processStatus query with the response processId to retrieve process status.

Example:​

{
status: 'COMPLETED',
statusMessage: 'Product attributes added successfully'
}

Authentication Requirements​

Requires authentication and 'products:add_attribute' permission.

Validation Rules​

  • Product must exist
  • Product attribute definition must exist
  • Product attribute should not exist
  • At least one product attribute is required.

Possible Errors​

  • **Authentication Error**: User not authenticated or lacks permissions
  • **Validation Error**: Any validation rule is violated
productAddAttributes(
input: AddProductAttributesInput!
): AsynchronousActionResponse!

Arguments​

productAddAttributes.input ● AddProductAttributesInput! non-null input common​

Parameters for AddProductAttributes

Type​

AsynchronousActionResponse object common​

Asynchronous action response type