# Spawn Delete Variants Job

Create a catalog variant bulk delete job to delete a batch of catalog variants.
Accepts up to 100 catalog variants per request. The maximum allowed payload size is 4MB.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`

**Scopes:**
`Catalogs Write`

# OpenAPI definition

```json
{
  "openapi": "3.0.2",
  "info": {
    "title": "Klaviyo API",
    "version": "2023-01-24",
    "description": "The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.",
    "contact": {
      "name": "Klaviyo Developer Experience Team",
      "email": "developers@klaviyo.com",
      "url": "https://developers.klaviyo.com"
    },
    "termsOfService": "https://www.klaviyo.com/legal/api-terms",
    "license": {
      "name": "License",
      "url": "https://www.klaviyo.com/legal"
    }
  },
  "paths": {
    "/api/catalog-variant-bulk-delete-jobs/": {
      "post": {
        "operationId": "spawn_delete_variants_job",
        "summary": "Spawn Delete Variants Job",
        "description": "Create a catalog variant bulk delete job to delete a batch of catalog variants.\nAccepts up to 100 catalog variants per request. The maximum allowed payload size is 4MB.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`\n\n**Scopes:**\n`Catalogs Write`",
        "parameters": [
          {
            "name": "revision",
            "in": "header",
            "required": true,
            "description": "API endpoint revision (format: YYYY-MM-DD[.suffix])",
            "schema": {
              "type": "string",
              "default": "2023-01-24"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostCatalogVariantDeleteJobResponse"
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/ClientError",
            "description": ""
          },
          "5XX": {
            "$ref": "#/components/responses/ServerError",
            "description": ""
          }
        },
        "tags": [
          "Catalogs"
        ],
        "x-klaviyo-ratelimit": {
          "burst": "75/s",
          "steady": "700/m"
        },
        "x-klaviyo-scopes": [
          "Catalogs Write"
        ],
        "x-klaviyo-pre-release": "None",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CatalogVariantDeleteJobCreateQuery"
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorSource": {
        "type": "object",
        "properties": {
          "pointer": {
            "type": "string",
            "example": "/data",
            "default": "/data",
            "description": "A pointer to the source of the error in the request payload."
          }
        },
        "required": [
          "pointer"
        ]
      },
      "CatalogJobErrorPayload": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "e4eebb08-b055-4a6f-bb13-c8cb69c9eb94",
            "description": "Unique identifier for the error.",
            "default": "e4eebb08-b055-4a6f-bb13-c8cb69c9eb94"
          },
          "code": {
            "type": "string",
            "example": "invalid",
            "description": "A code for classifying the error type.",
            "default": "invalid"
          },
          "title": {
            "type": "string",
            "example": "Invalid input",
            "description": "A high-level message about the error.",
            "default": "Invalid input"
          },
          "detail": {
            "type": "string",
            "example": "The payload provided in the request is invalid.",
            "description": "Specific details about the error.",
            "default": "The payload provided in the request is invalid."
          },
          "source": {
            "$ref": "#/components/schemas/ErrorSource",
            "description": "Additional information on the source of the error."
          }
        },
        "required": [
          "id",
          "code",
          "title",
          "detail",
          "source"
        ]
      },
      "CatalogVariantDeleteJobCreateQueryAsSubResource": {
        "type": "object",
        "required": [
          "type",
          "attributes"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "catalog-variant-bulk-delete-job"
            ]
          },
          "attributes": {
            "type": "object",
            "properties": {
              "variants": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CatalogVariantDeleteQueryAsSubResource"
                },
                "description": "Array of catalog variants to delete."
              }
            },
            "required": [
              "variants"
            ]
          }
        }
      },
      "CatalogVariantDeleteJobCreateQuery": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CatalogVariantDeleteJobCreateQueryAsSubResource"
          }
        }
      },
      "PostCatalogVariantDeleteJobResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "type",
              "attributes",
              "links"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "catalog-variant-bulk-delete-job"
                ]
              },
              "attributes": {
                "type": "object",
                "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",
                    "default": "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).",
                    "default": "2022-11-08T00:00:00"
                  },
                  "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.",
                    "default": 10
                  },
                  "completed_count": {
                    "type": "integer",
                    "example": 9,
                    "description": "The total number of operations that have been completed by the job.",
                    "default": 9
                  },
                  "failed_count": {
                    "type": "integer",
                    "example": 1,
                    "description": "The total number of operations that have failed as part of the job.",
                    "default": 1
                  },
                  "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).",
                    "default": "2022-11-08T00:00:00"
                  },
                  "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).",
                    "default": "2022-11-08T00:00:00"
                  },
                  "errors": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/CatalogJobErrorPayload"
                    },
                    "description": "Array of errors encountered during the processing of the job."
                  }
                },
                "required": [
                  "job_id",
                  "status",
                  "created_at",
                  "total_count"
                ]
              },
              "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": {
                "$ref": "#/components/schemas/ObjectLinks"
              }
            }
          }
        }
      },
      "CatalogVariantDeleteQueryAsSubResource": {
        "type": "object",
        "required": [
          "type",
          "id"
        ],
        "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`.",
            "default": "$custom:::$default:::SAMPLE-DATA-ITEM-1-VARIANT-MEDIUM"
          }
        }
      },
      "ObjectLinks": {
        "type": "object",
        "properties": {
          "self": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "self"
        ]
      }
    },
    "responses": {
      "ClientError": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "errors"
              ],
              "properties": {
                "errors": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "id",
                      "code",
                      "title",
                      "detail"
                    ],
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "code": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "detail": {
                        "type": "string"
                      },
                      "source": {
                        "type": "object",
                        "properties": {
                          "pointer": {
                            "type": "string"
                          },
                          "parameter": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Client Error"
      },
      "ServerError": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "errors"
              ],
              "properties": {
                "errors": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "id",
                      "code",
                      "title",
                      "detail"
                    ],
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "code": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "detail": {
                        "type": "string"
                      },
                      "source": {
                        "type": "object",
                        "properties": {
                          "pointer": {
                            "type": "string"
                          },
                          "parameter": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Server Error"
      }
    },
    "securitySchemes": {
      "Klaviyo-API-Key": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Private key authentication for /api/ endpoints is performed by setting the `Authorization` header to `Klaviyo-API-Key your-private-api-key`<br>For more information please visit https://developers.klaviyo.com/en/v2023-01-24/reference/api-overview#authentication",
        "x-default": "Klaviyo-API-Key your-private-api-key"
      }
    }
  },
  "servers": [
    {
      "url": "https://a.klaviyo.com",
      "description": "Production"
    }
  ],
  "security": [
    {
      "Klaviyo-API-Key": []
    }
  ],
  "tags": [
    {
      "name": "Catalogs",
      "description": "catalogs"
    }
  ],
  "x-readme": {
    "explorer-enabled": false,
    "proxy-enabled": true,
    "samples-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 99,
      "1": 209,
      "2": 144,
      "3": 188,
      "4": 105,
      "5": 115,
      "6": 190,
      "7": 0,
      "8": 46,
      "9": 217,
      "10": 40,
      "11": 67
    }
  }
}
```