Create a new product

POST /self/{shopId}/v2/products

Path parameters

Body

  • title string Required

    Title of the product

    Minimum length is 1, maximum length is 128.

  • shortDescription string | null

    Short Description of the product

    Maximum length is 128.

  • description string Required

    Description of the product

    Minimum length is 1, maximum length is 8096.

  • variants array[object] Required

    At least 1 variant is required

    Hide variants attributes Show variants attributes object
    • id integer(int64) | null

      Pass it only if you are editing the existing variant

    • title string | null

      Title of the variant

    • description string | null

      Description of the variant

    • shortDescription string | null

      Short Description of the variant

    • Additional properties are NOT allowed.

      Hide priceDetails attributes Show priceDetails attributes object
    • gateways array[object] | null

      Gateways available for this variant

      Hide gateways attributes Show gateways attributes object
      • gateway integer(int32)

        " The list of supported payment gateways. CoinbaseCommerce = 0 Stripe = 1 PayPal = 2 CashApp = 3 PayPalFf = 4 VirtualPayments = 5 Square = 6

        "

        Values are 0, 1, 2, 3, 4, 6, 7, 8, or 9.

      • rules object

        Additional properties are NOT allowed.

        Hide rules attribute Show rules attribute object
      • price object

        Additional properties are NOT allowed.

        Hide price attributes Show price attributes object
    • productType integer(int32)

      " Serials = 0 Dynamic = 2 Service = 3 If you choose serials, you need to provide only asSerials property If you choose dynamic, you need to provide only asDynamic property If you choose service, you need to provide only asService property"

      Values are 0, 2, or 3.

    • Additional properties are NOT allowed.

      Hide asDynamic attributes Show asDynamic attributes object
      • stock integer(int32) | null

        Minimum value is 0, maximum value is 2147483647.

      • externalUrl string | null
      • minAmount integer(int32) | null

        Minimum value is 1, maximum value is 2147483647.

      • maxAmount integer(int32) | null

        Minimum value is 1, maximum value is 2147483647.

      • isInternal boolean
    • Additional properties are NOT allowed.

      Hide asSerials attributes Show asSerials attributes object
    • Additional properties are NOT allowed.

      Hide asService attributes Show asService attributes object
      • stock integer(int32) | null

        Minimum value is 0, maximum value is 2147483647.

      • text string | null
      • minAmount integer(int32) | null

        Minimum value is 1, maximum value is 2147483647.

      • maxAmount integer(int32) | null

        Minimum value is 1, maximum value is 2147483647.

    • customerNote string | null

      This note will be visible to customer after purchase

    • redirectUrl string | null

      Customer will be redirected to this url after purchase

    • customFields array[object] | null

      Custom fields of the variant

      Hide customFields attributes Show customFields attributes object
    • warranty object

      Additional properties are NOT allowed.

      Hide warranty attributes Show warranty attributes object
    • Additional properties are NOT allowed.

      Hide discordSocialConnectSettings attributes Show discordSocialConnectSettings attributes object
      • enabled boolean Required

        Is Discord social connect enabled

      • required boolean Required

        Is Discord social connect required

      • Additional properties are NOT allowed.

        Hide beforePurchaseRequireRoles attributes Show beforePurchaseRequireRoles attributes object
      • Additional properties are NOT allowed.

        Hide beforePurchaseServer attributes Show beforePurchaseServer attributes object
      • Additional properties are NOT allowed.

        Hide afterPurchaseServer attributes Show afterPurchaseServer attributes object
  • path string Required

    Path/Slug of the product

    Minimum length is 1.

  • seo object Required

    Additional properties are NOT allowed.

    Hide seo attributes Show seo attributes object
    • metaTitle string | null

      Meta title of the product. If not provided, default shop seo settings will be used

    • metaDescription string | null

      Meta description of the product. If not provided, default shop seo settings will be used

  • unlisted boolean Required

    Is product unlisted

  • private boolean Required

    Is product private

  • onHold boolean Required

    Is product on hold

  • isInternal boolean | null

Body

  • title string Required

    Title of the product

    Minimum length is 1, maximum length is 128.

  • shortDescription string | null

    Short Description of the product

    Maximum length is 128.

  • description string Required

    Description of the product

    Minimum length is 1, maximum length is 8096.

  • variants array[object] Required

    At least 1 variant is required

    Hide variants attributes Show variants attributes object
    • id integer(int64) | null

      Pass it only if you are editing the existing variant

    • title string | null

      Title of the variant

    • description string | null

      Description of the variant

    • shortDescription string | null

      Short Description of the variant

    • Additional properties are NOT allowed.

      Hide priceDetails attributes Show priceDetails attributes object
    • gateways array[object] | null

      Gateways available for this variant

      Hide gateways attributes Show gateways attributes object
      • gateway integer(int32)

        " The list of supported payment gateways. CoinbaseCommerce = 0 Stripe = 1 PayPal = 2 CashApp = 3 PayPalFf = 4 VirtualPayments = 5 Square = 6

        "

        Values are 0, 1, 2, 3, 4, 6, 7, 8, or 9.

      • rules object

        Additional properties are NOT allowed.

        Hide rules attribute Show rules attribute object
      • price object

        Additional properties are NOT allowed.

        Hide price attributes Show price attributes object
    • productType integer(int32)

      " Serials = 0 Dynamic = 2 Service = 3 If you choose serials, you need to provide only asSerials property If you choose dynamic, you need to provide only asDynamic property If you choose service, you need to provide only asService property"

      Values are 0, 2, or 3.

    • Additional properties are NOT allowed.

      Hide asDynamic attributes Show asDynamic attributes object
      • stock integer(int32) | null

        Minimum value is 0, maximum value is 2147483647.

      • externalUrl string | null
      • minAmount integer(int32) | null

        Minimum value is 1, maximum value is 2147483647.

      • maxAmount integer(int32) | null

        Minimum value is 1, maximum value is 2147483647.

      • isInternal boolean
    • Additional properties are NOT allowed.

      Hide asSerials attributes Show asSerials attributes object
    • Additional properties are NOT allowed.

      Hide asService attributes Show asService attributes object
      • stock integer(int32) | null

        Minimum value is 0, maximum value is 2147483647.

      • text string | null
      • minAmount integer(int32) | null

        Minimum value is 1, maximum value is 2147483647.

      • maxAmount integer(int32) | null

        Minimum value is 1, maximum value is 2147483647.

    • customerNote string | null

      This note will be visible to customer after purchase

    • redirectUrl string | null

      Customer will be redirected to this url after purchase

    • customFields array[object] | null

      Custom fields of the variant

      Hide customFields attributes Show customFields attributes object
    • warranty object

      Additional properties are NOT allowed.

      Hide warranty attributes Show warranty attributes object
    • Additional properties are NOT allowed.

      Hide discordSocialConnectSettings attributes Show discordSocialConnectSettings attributes object
      • enabled boolean Required

        Is Discord social connect enabled

      • required boolean Required

        Is Discord social connect required

      • Additional properties are NOT allowed.

        Hide beforePurchaseRequireRoles attributes Show beforePurchaseRequireRoles attributes object
      • Additional properties are NOT allowed.

        Hide beforePurchaseServer attributes Show beforePurchaseServer attributes object
      • Additional properties are NOT allowed.

        Hide afterPurchaseServer attributes Show afterPurchaseServer attributes object
  • path string Required

    Path/Slug of the product

    Minimum length is 1.

  • seo object Required

    Additional properties are NOT allowed.

    Hide seo attributes Show seo attributes object
    • metaTitle string | null

      Meta title of the product. If not provided, default shop seo settings will be used

    • metaDescription string | null

      Meta description of the product. If not provided, default shop seo settings will be used

  • unlisted boolean Required

    Is product unlisted

  • private boolean Required

    Is product private

  • onHold boolean Required

    Is product on hold

  • isInternal boolean | null

Body

  • title string Required

    Title of the product

    Minimum length is 1, maximum length is 128.

  • shortDescription string | null

    Short Description of the product

    Maximum length is 128.

  • description string Required

    Description of the product

    Minimum length is 1, maximum length is 8096.

  • variants array[object] Required

    At least 1 variant is required

    Hide variants attributes Show variants attributes object
    • id integer(int64) | null

      Pass it only if you are editing the existing variant

    • title string | null

      Title of the variant

    • description string | null

      Description of the variant

    • shortDescription string | null

      Short Description of the variant

    • Additional properties are NOT allowed.

      Hide priceDetails attributes Show priceDetails attributes object
    • gateways array[object] | null

      Gateways available for this variant

      Hide gateways attributes Show gateways attributes object
      • gateway integer(int32)

        " The list of supported payment gateways. CoinbaseCommerce = 0 Stripe = 1 PayPal = 2 CashApp = 3 PayPalFf = 4 VirtualPayments = 5 Square = 6

        "

        Values are 0, 1, 2, 3, 4, 6, 7, 8, or 9.

      • rules object

        Additional properties are NOT allowed.

        Hide rules attribute Show rules attribute object
      • price object

        Additional properties are NOT allowed.

        Hide price attributes Show price attributes object
    • productType integer(int32)

      " Serials = 0 Dynamic = 2 Service = 3 If you choose serials, you need to provide only asSerials property If you choose dynamic, you need to provide only asDynamic property If you choose service, you need to provide only asService property"

      Values are 0, 2, or 3.

    • Additional properties are NOT allowed.

      Hide asDynamic attributes Show asDynamic attributes object
      • stock integer(int32) | null

        Minimum value is 0, maximum value is 2147483647.

      • externalUrl string | null
      • minAmount integer(int32) | null

        Minimum value is 1, maximum value is 2147483647.

      • maxAmount integer(int32) | null

        Minimum value is 1, maximum value is 2147483647.

      • isInternal boolean
    • Additional properties are NOT allowed.

      Hide asSerials attributes Show asSerials attributes object
    • Additional properties are NOT allowed.

      Hide asService attributes Show asService attributes object
      • stock integer(int32) | null

        Minimum value is 0, maximum value is 2147483647.

      • text string | null
      • minAmount integer(int32) | null

        Minimum value is 1, maximum value is 2147483647.

      • maxAmount integer(int32) | null

        Minimum value is 1, maximum value is 2147483647.

    • customerNote string | null

      This note will be visible to customer after purchase

    • redirectUrl string | null

      Customer will be redirected to this url after purchase

    • customFields array[object] | null

      Custom fields of the variant

      Hide customFields attributes Show customFields attributes object
    • warranty object

      Additional properties are NOT allowed.

      Hide warranty attributes Show warranty attributes object
    • Additional properties are NOT allowed.

      Hide discordSocialConnectSettings attributes Show discordSocialConnectSettings attributes object
      • enabled boolean Required

        Is Discord social connect enabled

      • required boolean Required

        Is Discord social connect required

      • Additional properties are NOT allowed.

        Hide beforePurchaseRequireRoles attributes Show beforePurchaseRequireRoles attributes object
      • Additional properties are NOT allowed.

        Hide beforePurchaseServer attributes Show beforePurchaseServer attributes object
      • Additional properties are NOT allowed.

        Hide afterPurchaseServer attributes Show afterPurchaseServer attributes object
  • path string Required

    Path/Slug of the product

    Minimum length is 1.

  • seo object Required

    Additional properties are NOT allowed.

    Hide seo attributes Show seo attributes object
    • metaTitle string | null

      Meta title of the product. If not provided, default shop seo settings will be used

    • metaDescription string | null

      Meta description of the product. If not provided, default shop seo settings will be used

  • unlisted boolean Required

    Is product unlisted

  • private boolean Required

    Is product private

  • onHold boolean Required

    Is product on hold

  • isInternal boolean | null

Responses

POST /self/{shopId}/v2/products
curl \
 --request POST 'https://dev.sellpass.io/self/{shopId}/v2/products' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"title":"string","shortDescription":"string","description":"string","variants":[{"id":42,"title":"string","description":"string","shortDescription":"string","priceDetails":{"amount":42.0,"currency":"string"},"gateways":[{"gateway":0,"rules":{"blockVpn":true},"price":{"amount":42.0,"currency":"string"}}],"productType":0,"asDynamic":{"stock":42,"externalUrl":"string","minAmount":42,"maxAmount":42,"isInternal":true},"asSerials":{"delimiter":"string","serials":"string","minAmount":42,"maxAmount":42,"removeDuplicates":true},"asService":{"stock":42,"text":"string","minAmount":42,"maxAmount":42},"customerNote":"string","redirectUrl":"string","customFields":[{"id":42,"type":1,"name":"string","required":true,"valueString":"string","placeholder":"string","regex":"string","valueInt":42,"valueBool":true}],"warranty":{"text":"string","durationSeconds":42},"discordSocialConnectSettings":{"enabled":true,"required":true,"beforePurchaseRequireRoles":{"guildId":"string","roleIds":["string"]},"beforePurchaseServer":{"guildId":"string","roleIds":["string"]},"afterPurchaseServer":{"guildId":"string","roleIds":["string"]}}}],"path":"string","seo":{"metaTitle":"string","metaDescription":"string"},"unlisted":true,"private":true,"onHold":true,"isInternal":true}'
curl \
 --request POST 'https://dev.sellpass.io/self/{shopId}/v2/products' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: text/json"
curl \
 --request POST 'https://dev.sellpass.io/self/{shopId}/v2/products' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/*+json"
Request examples
{
  "title": "string",
  "shortDescription": "string",
  "description": "string",
  "variants": [
    {
      "id": 42,
      "title": "string",
      "description": "string",
      "shortDescription": "string",
      "priceDetails": {
        "amount": 42.0,
        "currency": "string"
      },
      "gateways": [
        {
          "gateway": 0,
          "rules": {
            "blockVpn": true
          },
          "price": {
            "amount": 42.0,
            "currency": "string"
          }
        }
      ],
      "productType": 0,
      "asDynamic": {
        "stock": 42,
        "externalUrl": "string",
        "minAmount": 42,
        "maxAmount": 42,
        "isInternal": true
      },
      "asSerials": {
        "delimiter": "string",
        "serials": "string",
        "minAmount": 42,
        "maxAmount": 42,
        "removeDuplicates": true
      },
      "asService": {
        "stock": 42,
        "text": "string",
        "minAmount": 42,
        "maxAmount": 42
      },
      "customerNote": "string",
      "redirectUrl": "string",
      "customFields": [
        {
          "id": 42,
          "type": 1,
          "name": "string",
          "required": true,
          "valueString": "string",
          "placeholder": "string",
          "regex": "string",
          "valueInt": 42,
          "valueBool": true
        }
      ],
      "warranty": {
        "text": "string",
        "durationSeconds": 42
      },
      "discordSocialConnectSettings": {
        "enabled": true,
        "required": true,
        "beforePurchaseRequireRoles": {
          "guildId": "string",
          "roleIds": [
            "string"
          ]
        },
        "beforePurchaseServer": {
          "guildId": "string",
          "roleIds": [
            "string"
          ]
        },
        "afterPurchaseServer": {
          "guildId": "string",
          "roleIds": [
            "string"
          ]
        }
      }
    }
  ],
  "path": "string",
  "seo": {
    "metaTitle": "string",
    "metaDescription": "string"
  },
  "unlisted": true,
  "private": true,
  "onHold": true,
  "isInternal": true
}
Request examples
{
  "title": "string",
  "shortDescription": "string",
  "description": "string",
  "variants": [
    {
      "id": 42,
      "title": "string",
      "description": "string",
      "shortDescription": "string",
      "priceDetails": {
        "amount": 42.0,
        "currency": "string"
      },
      "gateways": [
        {
          "gateway": 0,
          "rules": {
            "blockVpn": true
          },
          "price": {
            "amount": 42.0,
            "currency": "string"
          }
        }
      ],
      "productType": 0,
      "asDynamic": {
        "stock": 42,
        "externalUrl": "string",
        "minAmount": 42,
        "maxAmount": 42,
        "isInternal": true
      },
      "asSerials": {
        "delimiter": "string",
        "serials": "string",
        "minAmount": 42,
        "maxAmount": 42,
        "removeDuplicates": true
      },
      "asService": {
        "stock": 42,
        "text": "string",
        "minAmount": 42,
        "maxAmount": 42
      },
      "customerNote": "string",
      "redirectUrl": "string",
      "customFields": [
        {
          "id": 42,
          "type": 1,
          "name": "string",
          "required": true,
          "valueString": "string",
          "placeholder": "string",
          "regex": "string",
          "valueInt": 42,
          "valueBool": true
        }
      ],
      "warranty": {
        "text": "string",
        "durationSeconds": 42
      },
      "discordSocialConnectSettings": {
        "enabled": true,
        "required": true,
        "beforePurchaseRequireRoles": {
          "guildId": "string",
          "roleIds": [
            "string"
          ]
        },
        "beforePurchaseServer": {
          "guildId": "string",
          "roleIds": [
            "string"
          ]
        },
        "afterPurchaseServer": {
          "guildId": "string",
          "roleIds": [
            "string"
          ]
        }
      }
    }
  ],
  "path": "string",
  "seo": {
    "metaTitle": "string",
    "metaDescription": "string"
  },
  "unlisted": true,
  "private": true,
  "onHold": true,
  "isInternal": true
}
Request examples
{
  "title": "string",
  "shortDescription": "string",
  "description": "string",
  "variants": [
    {
      "id": 42,
      "title": "string",
      "description": "string",
      "shortDescription": "string",
      "priceDetails": {
        "amount": 42.0,
        "currency": "string"
      },
      "gateways": [
        {
          "gateway": 0,
          "rules": {
            "blockVpn": true
          },
          "price": {
            "amount": 42.0,
            "currency": "string"
          }
        }
      ],
      "productType": 0,
      "asDynamic": {
        "stock": 42,
        "externalUrl": "string",
        "minAmount": 42,
        "maxAmount": 42,
        "isInternal": true
      },
      "asSerials": {
        "delimiter": "string",
        "serials": "string",
        "minAmount": 42,
        "maxAmount": 42,
        "removeDuplicates": true
      },
      "asService": {
        "stock": 42,
        "text": "string",
        "minAmount": 42,
        "maxAmount": 42
      },
      "customerNote": "string",
      "redirectUrl": "string",
      "customFields": [
        {
          "id": 42,
          "type": 1,
          "name": "string",
          "required": true,
          "valueString": "string",
          "placeholder": "string",
          "regex": "string",
          "valueInt": 42,
          "valueBool": true
        }
      ],
      "warranty": {
        "text": "string",
        "durationSeconds": 42
      },
      "discordSocialConnectSettings": {
        "enabled": true,
        "required": true,
        "beforePurchaseRequireRoles": {
          "guildId": "string",
          "roleIds": [
            "string"
          ]
        },
        "beforePurchaseServer": {
          "guildId": "string",
          "roleIds": [
            "string"
          ]
        },
        "afterPurchaseServer": {
          "guildId": "string",
          "roleIds": [
            "string"
          ]
        }
      }
    }
  ],
  "path": "string",
  "seo": {
    "metaTitle": "string",
    "metaDescription": "string"
  },
  "unlisted": true,
  "private": true,
  "onHold": true,
  "isInternal": true
}
Response examples (200)
{
  "data": 42,
  "message": "string",
  "errors": [
    "string"
  ],
  "log": "string"
}
Response examples (200)
{
  "data": 42,
  "message": "string",
  "errors": [
    "string"
  ],
  "log": "string"
}