Back to KlaviyoSpawn Update Variants Job
Create a catalog variant bulk update job to update a batch of catalog variants.\nAccepts up to 100 catalog variants per request. The maximum allowed payload size is 4MB.
Rate limits:
Burst: 75/s
Steady: 700/m
\n\nScopes:\nCatalogs Write
Input
type: object
properties:
parameters:
type: object
properties:
revision:
type: string
default: '2023-02-22'
description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])'
required:
- revision
title: Parameters
data:
type: object
required:
- data
properties:
data:
type: object
required:
- type
- attributes
properties:
type:
type: string
enum:
- catalog-variant-bulk-update-job
attributes:
type: object
required:
- variants
properties:
variants:
type: array
description: Array of catalog variants to update.
items:
type: object
required:
- type
- id
- attributes
properties:
type:
type: string
enum:
- catalog-variant
id:
type: string
example: $custom:::$default:::SAMPLE-DATA-ITEM-1-VARIANT-MEDIUM
description: >-
The catalog variant ID is a compound ID (string), with
format: `{integration}:::{catalog}:::{external_id}`.
Currently, the only supported integration type is
`$custom`, and the only supported catalog is `$default`.
attributes:
type: object
properties:
title:
type: string
example: Ocean Blue Shirt (Sample) Variant Medium
description: The title of the catalog item variant.
description:
type: string
example: >-
Ocean blue cotton shirt with a narrow collar and
buttons down the front and long sleeves. Comfortable
fit and titled kaleidoscope patterns.
description: A description of the catalog item variant.
sku:
type: string
example: OBS-MD
description: The SKU of the catalog item variant.
inventory_policy:
type: integer
enum:
- 0
- 1
- 2
description: >-
This field controls the visibility of this catalog
item variant in product feeds/blocks. This field
supports the following values:\n`1`: a product will
not appear in dynamic product recommendation feeds
and blocks if it is out of stock.\n`0` or `2`: a
product can appear in dynamic product recommendation
feeds and blocks regardless of inventory quantity.\n
example: 2
inventory_quantity:
type: number
example: 25
description: >-
The quantity of the catalog item variant currently
in stock.
price:
type: number
example: 42
description: >-
This field can be used to set the price on the
catalog item variant, which is what gets displayed
for the item variant when included in emails. For
most price-update use cases, you will also want to
update the `price` on any parent items using the
[Update Catalog Item
Endpoint](https://developers.klaviyo.com/en/reference/update_catalog_item).
url:
type: string
example: https://via.placeholder.com/150
description: >-
URL pointing to the location of the catalog item
variant on your website.
image_full_url:
type: string
example: https://via.placeholder.com/300
description: >-
URL pointing to the location of a full image of the
catalog item variant.
image_thumbnail_url:
type: string
example: https://via.placeholder.com/150
description: >-
URL pointing to the location of an image thumbnail
of the catalog item variant.
images:
type: array
example:
- https://via.placeholder.com/150
description: >-
List of URLs pointing to the locations of images of
the catalog item variant.
items:
type: string
custom_metadata:
type: object
example:
Top Pick: true
description: >-
Flat JSON blob to provide custom metadata about the
catalog item variant. May not exceed 100kb.
published:
type: boolean
example: true
description: >-
Boolean value indicating whether the catalog item
variant is published.
title: Data
Output
type: object
required:
- data
properties:
data:
type: object
required:
- type
- attributes
- links
properties:
type:
type: string
enum:
- catalog-variant-bulk-update-job
attributes:
type: object
required:
- job_id
- status
- created_at
- total_count
properties:
job_id:
type: string
description: Unique identifier for retrieving the job. Generated by Klaviyo.
status:
type: string
enum:
- cancelled
- complete
- processing
- queued
description: Status of the asynchronous job.
example: processing
created_at:
type: string
format: date-time
example: '2022-11-08T00:00:00'
description: >-
The date and time the job was created in ISO 8601 format
(YYYY-MM-DDTHH:MM:SS.mmmmmm).
total_count:
type: integer
example: 10
description: >-
The total number of operations to be processed by the job. See
`completed_count` for the job's current progress.
completed_count:
type: integer
example: 9
description: >-
The total number of operations that have been completed by the
job.
failed_count:
type: integer
example: 1
description: >-
The total number of operations that have failed as part of the
job.
completed_at:
type: string
format: date-time
example: '2022-11-08T00:00:00'
description: >-
Date and time the job was completed in ISO 8601 format
(YYYY-MM-DDTHH:MM:SS.mmmmmm).
expires_at:
type: string
format: date-time
example: '2022-11-08T00:00:00'
description: >-
Date and time the job expires in ISO 8601 format
(YYYY-MM-DDTHH:MM:SS.mmmmmm).
errors:
type: array
description: Array of errors encountered during the processing of the job.
items:
type: object
required:
- id
- code
- title
- detail
- source
properties:
id:
type: string
example: e4eebb08-b055-4a6f-bb13-c8cb69c9eb94
description: Unique identifier for the error.
code:
type: string
example: invalid
description: A code for classifying the error type.
title:
type: string
example: Invalid input
description: A high-level message about the error.
detail:
type: string
example: The payload provided in the request is invalid.
description: Specific details about the error.
source:
type: object
required:
- pointer
properties:
pointer:
type: string
example: /data
default: /data
description: >-
A pointer to the source of the error in the request
payload.
relationships:
type: object
properties:
variants:
type: object
required:
- data
properties:
data:
type: array
items:
type: object
required:
- type
- id
properties:
type:
type: string
enum:
- catalog-variant
id:
type: string
links:
type: object
required:
- self
properties:
self:
type: string
format: uri