Importing Product Variant Patches
The Product Variant Patch endpoint can be used to update existing ProductVariants in a commercetools Project. The ProductVariant update data is represented by ProductVariantPatch and loaded in an ProductVariantPatchRequest, which is posted to import ProductVariantPatches.
To monitor an import status, use Get ImportSummary, Get ImportOperation, and Query ImportOperations.
Representations
ProductVariantPatchRequest
The request body to import ProductVariantPatches. The data to be imported are represented by ProductVariantPatch.
type String | "product-variant-patch" The product variant patch import resource type. |
patches Array of ProductVariantPatch | The product variant patches of this request. MaxItems:20 |
{"type" : "product-variant-patch","patches" : [ {"productVariant" : {"typeId" : "product-variant","key" : "red-t-shirt"},"attributes" : {"attribute-to-update" : {"type" : "boolean","value" : true},"attribute-to-delete" : "null"},"staged" : false} ]}
ProductVariantPatch
Representation for an update of a ProductVariant. Use this type to import updates for existing ProductVariants in a commercetools Project.
productVariant | The ProductVariant to which this patch is applied.
The Reference to the ProductVariant with which the ProductVariantPatch is associated.
If referenced ProductVariant does not exist, the |
attributes Attributes | Maps to |
staged Boolean | If true |
Import ProductVariantPatches
Creates a new import request for product variant patches
manage_products:{projectKey}
region String | The Region in which the Project is hosted. |
projectKey String | The commercetools Project key. |
importContainerKey String | The ImportContainer used to create the new resource |