Skip to main content

Create a product

Creates a product that does not exist on the platform Corso is connected to. The handle identifies the product, so sending the same handle again updates it in place instead of creating a duplicate, and the response is a 200 rather than a 201. Every variant must carry at least one option or a sku, and all variants must use the same set of option names. Use the returned productId for subsequent reads, updates, and deletes.

Request Body
  • handle string required

    Possible values: non-empty

    The handle that identifies the product. This is the identity key: sending the same handle again updates the existing product instead of creating a duplicate. It must be unique among the products you create through this API, but may safely match the handle of a product synced from your platform.

  • title string

    The title of the product.

  • vendor string

    The vendor of the product.

  • productType string

    The product type.

  • storeId number

    The Corso ID of the store to create the product in. Some merchants may have multiple stores under a single API client_id, so this value is required when the access token grants access to more than one store.

  • tags string[]

    Possible values: Value must match regular expression ^[^,]*$

    The tags applied to the product. A tag cannot contain a comma.

  • status string

    Possible values: [active, archived, draft]

    The status of the product. Defaults to active.

  • imageUrl uri

    A publicly reachable http(s) image URL for the product. Corso stores the URL as given and does not re-host the image.

  • variants object[] required

    Possible values: >= 1

    The complete set of variants for the product. Any variant previously stored but omitted here is marked as removed.

  • Array [
  • barcode string

    The barcode, UPC, or ISBN for the variant.

  • options object[] required

    The option values that identify this variant, for example [{ "name": "Size", "value": "Small" }]. The order does not affect the variant's identity, but it is preserved, so send them in the order you want the variant's display name composed in. Send an empty array for a product with a single, unvaried variant.

  • Array [
  • name string required

    The name of the option.

  • value string required

    This variant's value for the option.

  • ]
  • sku string

    The stock keeping unit (SKU) for the variant.

  • grams integer

    The weight of the variant in whole grams.

  • price string

    Possible values: Value must match regular expression ^\d{1,8}(\.\d{1,2})?$

    The price of the variant, as a plain decimal amount without a currency symbol or thousands separators. Interpreted in the store's currency.

  • compareAtPrice string

    Possible values: Value must match regular expression ^\d{1,8}(\.\d{1,2})?$

    The compare-at (list) price of the variant.

  • unitCost string

    Possible values: Value must match regular expression ^\d{1,8}(\.\d{1,2})?$

    The cost of goods for the variant.

  • imageUrl uri

    A publicly reachable http(s) image URL for the variant. Corso stores the URL as given and does not re-host the image.

  • ]
Responses

OK. An existing product with this handle was updated.


Schema
  • productId number required

    The Corso ID of the product. Use this for all subsequent reads, updates, and deletes.

  • storeId number required

    The Corso ID of the store that the product belongs to.

  • handle string required

    The handle that identifies the product. Sending the same handle to POST /products updates this product rather than creating a new one.

  • title string

    The title of the product.

  • vendor string

    The vendor of the product.

  • productType string

    The product type.

  • tags string[]

    The tags applied to the product.

  • status string required

    Possible values: [active, archived, draft]

    The status of the product. Only active products are usable in Corso.

  • imageUrl string

    A publicly reachable image URL for the product. Corso stores the URL as given and does not re-host the image.

  • options object[]

    The options defined across the product's variants.

  • Array [
  • name string required

    The name of the option.

  • position number required

    The 1-based position of the option on the product, following the order the options were sent in.

  • values string[] required

    Every value used for this option across all variants.

  • ]
  • variants object[] required

    The variants of the product.

  • Array [
  • variantId number required

    The Corso ID of the variant.

  • options object[] required

    The option values that identify this variant. This combination is the variant's identity, so the variant keeps its variantId across writes for as long as the values are unchanged, no matter what order they are sent in. The order is preserved here and in the product's options, and determines how Corso composes the variant's display name.

  • Array [
  • name string required

    The name of the option.

  • value string required

    This variant's value for the option.

  • ]
  • sku string

    The stock keeping unit (SKU) for the variant.

  • barcode string

    The barcode, UPC, or ISBN for the variant.

  • grams number

    The weight of the variant in grams.

  • price string

    The price of the variant, in the store's currency.

  • compareAtPrice string

    The compare-at (list) price of the variant.

  • unitCost string

    The cost of goods for the variant.

  • imageUrl string

    A publicly reachable image URL for the variant. Corso stores the URL as given and does not re-host the image.

  • title string

    The variant title Corso derives from its option values, or the product title for a single-variant product.

  • displayName string

    The customer-facing name Corso shows for the variant.

  • displayPosition number

    The 1-based position of the variant, following the order the variants were sent in.

  • ]
  • createdOn date-time

    The date/time when the product was created in Corso.

  • updatedOn date-time

    The date/time when the product was last updated in Corso.

  • deletedOn date-time

    The date/time when the product was deleted, if it has been. A deleted product is still retrievable but is excluded from returns, exchanges, and search results.

Loading...