---
title: Create a product
slug: create-a-product
docTags: 
createdAt: 2026-04-17T07:48:39.600Z
---

{
  "id": "wNj60kO9aNrpzdiPKAvN7",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.archbee.com/v2/products",
    "servers": [
      {
        "url": "https://api.archbee.com/v2/products",
        "description": "Production server"
      },
      {
        "url": "https://staging-api.archbee.com/v2/products",
        "description": "Staging server"
      },
      {
        "url": "https://{region}.api.archbee.com/{version}/products",
        "description": "Regional server with variables"
      }
    ],
    "name": "Create a product",
    "description": "<p>Creates a new product. The request body uses <code>oneOf</code> with a discriminator\nto accept different product types (physical, digital, subscription).</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "schema": [],
          "complexItems": [
            {
              "name": "object",
              "schema": [
                {
                  "name": "name",
                  "kind": "required",
                  "type": "string",
                  "description": "",
                  "example": "Wireless Headphones",
                  "minLength": 1,
                  "maxLength": 200
                },
                {
                  "name": "description",
                  "kind": "optional",
                  "type": "string",
                  "description": "",
                  "example": "",
                  "maxLength": 2000
                },
                {
                  "name": "price",
                  "kind": "required",
                  "type": "number<double>",
                  "description": "",
                  "example": 79.99,
                  "format": "double",
                  "minimum": 0
                },
                {
                  "name": "currency",
                  "kind": "required",
                  "type": "string",
                  "description": "",
                  "example": "USD",
                  "pattern": "^[A-Z]{3}$"
                },
                {
                  "name": "category",
                  "kind": "required",
                  "type": "string<electronics | clothing | books | home | sports>",
                  "description": "",
                  "example": "",
                  "enum": [
                    "electronics",
                    "clothing",
                    "books",
                    "home",
                    "sports"
                  ]
                },
                {
                  "name": "productType",
                  "kind": "required",
                  "type": "string",
                  "description": "Discriminator field for product type",
                  "example": ""
                },
                {
                  "name": "tags",
                  "kind": "optional",
                  "type": "array",
                  "description": "",
                  "example": "[\"wireless\",\"audio\"]",
                  "itemType": "string",
                  "customType": "string[]",
                  "itemExample": "",
                  "itemDefault": ""
                },
                {
                  "name": "productType",
                  "kind": "optional",
                  "type": "string<physical>",
                  "description": "",
                  "example": "",
                  "enum": [
                    "physical"
                  ]
                },
                {
                  "name": "weight",
                  "kind": "required",
                  "type": "number<float>",
                  "description": "Weight in kilograms",
                  "example": 0.25,
                  "format": "float",
                  "minimum": 0
                },
                {
                  "name": "dimensions",
                  "kind": "optional",
                  "type": "object",
                  "description": "Product dimensions in centimeters",
                  "example": "",
                  "schema": [
                    {
                      "name": "length",
                      "kind": "optional",
                      "type": "number<float>",
                      "description": "",
                      "example": "",
                      "format": "float",
                      "minimum": 0
                    },
                    {
                      "name": "width",
                      "kind": "optional",
                      "type": "number<float>",
                      "description": "",
                      "example": "",
                      "format": "float",
                      "minimum": 0
                    },
                    {
                      "name": "height",
                      "kind": "optional",
                      "type": "number<float>",
                      "description": "",
                      "example": "",
                      "format": "float",
                      "minimum": 0
                    }
                  ]
                },
                {
                  "name": "shippingClass",
                  "kind": "optional",
                  "type": "string<standard | oversized | fragile | hazardous>",
                  "description": "",
                  "example": "",
                  "default": "standard",
                  "enum": [
                    "standard",
                    "oversized",
                    "fragile",
                    "hazardous"
                  ]
                }
              ],
              "modelRef": "#/components/schemas/PhysicalProduct",
              "customType": "PhysicalProduct"
            },
            {
              "name": "object",
              "schema": [
                {
                  "name": "name",
                  "kind": "required",
                  "type": "string",
                  "description": "",
                  "example": "Wireless Headphones",
                  "minLength": 1,
                  "maxLength": 200
                },
                {
                  "name": "description",
                  "kind": "optional",
                  "type": "string",
                  "description": "",
                  "example": "",
                  "maxLength": 2000
                },
                {
                  "name": "price",
                  "kind": "required",
                  "type": "number<double>",
                  "description": "",
                  "example": 79.99,
                  "format": "double",
                  "minimum": 0
                },
                {
                  "name": "currency",
                  "kind": "required",
                  "type": "string",
                  "description": "",
                  "example": "USD",
                  "pattern": "^[A-Z]{3}$"
                },
                {
                  "name": "category",
                  "kind": "required",
                  "type": "string<electronics | clothing | books | home | sports>",
                  "description": "",
                  "example": "",
                  "enum": [
                    "electronics",
                    "clothing",
                    "books",
                    "home",
                    "sports"
                  ]
                },
                {
                  "name": "productType",
                  "kind": "required",
                  "type": "string",
                  "description": "Discriminator field for product type",
                  "example": ""
                },
                {
                  "name": "tags",
                  "kind": "optional",
                  "type": "array",
                  "description": "",
                  "example": "[\"wireless\",\"audio\"]",
                  "itemType": "string",
                  "customType": "string[]",
                  "itemExample": "",
                  "itemDefault": ""
                },
                {
                  "name": "productType",
                  "kind": "optional",
                  "type": "string<digital>",
                  "description": "",
                  "example": "",
                  "enum": [
                    "digital"
                  ]
                },
                {
                  "name": "downloadUrl",
                  "kind": "required",
                  "type": "string<uri>",
                  "description": "",
                  "example": "https://cdn.example.com/files/ebook-123.pdf",
                  "format": "uri"
                },
                {
                  "name": "fileSizeBytes",
                  "kind": "required",
                  "type": "integer<int64>",
                  "description": "",
                  "example": 15728640,
                  "format": "int64",
                  "minimum": 1
                },
                {
                  "name": "fileFormat",
                  "kind": "optional",
                  "type": "string<pdf | epub | mp3 | mp4 | zip>",
                  "description": "",
                  "example": "pdf",
                  "enum": [
                    "pdf",
                    "epub",
                    "mp3",
                    "mp4",
                    "zip"
                  ]
                },
                {
                  "name": "licenseType",
                  "kind": "optional",
                  "type": "string<single_use | multi_device | commercial>",
                  "description": "",
                  "example": "",
                  "default": "single_use",
                  "enum": [
                    "single_use",
                    "multi_device",
                    "commercial"
                  ]
                }
              ],
              "modelRef": "#/components/schemas/DigitalProduct",
              "customType": "DigitalProduct"
            },
            {
              "name": "object",
              "schema": [
                {
                  "name": "name",
                  "kind": "required",
                  "type": "string",
                  "description": "",
                  "example": "Wireless Headphones",
                  "minLength": 1,
                  "maxLength": 200
                },
                {
                  "name": "description",
                  "kind": "optional",
                  "type": "string",
                  "description": "",
                  "example": "",
                  "maxLength": 2000
                },
                {
                  "name": "price",
                  "kind": "required",
                  "type": "number<double>",
                  "description": "",
                  "example": 79.99,
                  "format": "double",
                  "minimum": 0
                },
                {
                  "name": "currency",
                  "kind": "required",
                  "type": "string",
                  "description": "",
                  "example": "USD",
                  "pattern": "^[A-Z]{3}$"
                },
                {
                  "name": "category",
                  "kind": "required",
                  "type": "string<electronics | clothing | books | home | sports>",
                  "description": "",
                  "example": "",
                  "enum": [
                    "electronics",
                    "clothing",
                    "books",
                    "home",
                    "sports"
                  ]
                },
                {
                  "name": "productType",
                  "kind": "required",
                  "type": "string",
                  "description": "Discriminator field for product type",
                  "example": ""
                },
                {
                  "name": "tags",
                  "kind": "optional",
                  "type": "array",
                  "description": "",
                  "example": "[\"wireless\",\"audio\"]",
                  "itemType": "string",
                  "customType": "string[]",
                  "itemExample": "",
                  "itemDefault": ""
                },
                {
                  "name": "productType",
                  "kind": "optional",
                  "type": "string<subscription>",
                  "description": "",
                  "example": "",
                  "enum": [
                    "subscription"
                  ]
                },
                {
                  "name": "billingPeriod",
                  "kind": "required",
                  "type": "string<weekly | monthly | quarterly | yearly>",
                  "description": "",
                  "example": "monthly",
                  "enum": [
                    "weekly",
                    "monthly",
                    "quarterly",
                    "yearly"
                  ]
                },
                {
                  "name": "trialDays",
                  "kind": "optional",
                  "type": "integer<int32>",
                  "description": "",
                  "example": 14,
                  "default": 0,
                  "format": "int32",
                  "minimum": 0,
                  "maximum": 365
                },
                {
                  "name": "features",
                  "kind": "optional",
                  "type": "array",
                  "description": "",
                  "example": "[\"Unlimited access\",\"Priority support\",\"Custom integrations\"]",
                  "itemType": "string",
                  "customType": "string[]",
                  "itemExample": "",
                  "itemDefault": ""
                }
              ],
              "modelRef": "#/components/schemas/SubscriptionProduct",
              "customType": "SubscriptionProduct"
            }
          ],
          "complexType": "oneOf",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "bearerAuth",
          "name": "bearerAuth",
          "kind": "optional",
          "type": "http",
          "description": "<p>HTTP Bearer token authentication (JWT)</p>",
          "scheme": "bearer"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "201",
        "description": "Product created successfully",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Full product response (uses allOf with ID and timestamps)",
            "customType": "Product",
            "schema": [
              {
                "name": "id",
                "kind": "optional",
                "type": "integer<int64>",
                "readOnly": true,
                "description": "",
                "example": 42,
                "format": "int64"
              },
              {
                "name": "createdAt",
                "kind": "optional",
                "type": "string<date-time>",
                "readOnly": true,
                "description": "",
                "example": "",
                "format": "date-time"
              },
              {
                "name": "updatedAt",
                "kind": "optional",
                "type": "string<date-time>",
                "readOnly": true,
                "description": "",
                "example": "",
                "format": "date-time"
              }
            ],
            "modelRef": "#/components/schemas/Product",
            "complexItems": [
              {
                "name": "object",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "readOnly": true,
                    "description": "",
                    "example": 42,
                    "format": "int64"
                  },
                  {
                    "name": "createdAt",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "readOnly": true,
                    "description": "",
                    "example": "",
                    "format": "date-time"
                  },
                  {
                    "name": "updatedAt",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "readOnly": true,
                    "description": "",
                    "example": "",
                    "format": "date-time"
                  }
                ]
              },
              {
                "name": "object",
                "schema": []
              }
            ],
            "complexType": "allOf",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Bad request — invalid input or missing required fields",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"code\":\"BAD_REQUEST\",\"message\":\"The request body is invalid\",\"details\":[{\"field\":\"email\",\"message\":\"must be a valid email address\",\"code\":\"INVALID_FORMAT\"}]}",
            "description": "Standard error response",
            "customType": "Error",
            "schema": [
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": "Machine-readable error code",
                "example": "VALIDATION_ERROR"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Human-readable error message",
                "example": "The request body contains invalid fields"
              },
              {
                "name": "details",
                "kind": "optional",
                "type": "array",
                "description": "Detailed validation errors (when applicable)",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "field",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "email"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "must be a valid email address"
                  },
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "INVALID_FORMAT"
                  }
                ]
              },
              {
                "name": "requestId",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "Correlation ID for support inquiries",
                "example": "",
                "format": "uuid"
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "422",
        "description": "Unprocessable entity — validation failed",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"code\":\"VALIDATION_ERROR\",\"message\":\"The request body failed validation\",\"details\":[{\"field\":\"price\",\"message\":\"must be greater than 0\",\"code\":\"INVALID_VALUE\"},{\"field\":\"name\",\"message\":\"must be between 1 and 200 characters\",\"code\":\"INVALID_LENGTH\"}]}",
            "description": "Standard error response",
            "customType": "Error",
            "schema": [
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": "Machine-readable error code",
                "example": "VALIDATION_ERROR"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Human-readable error message",
                "example": "The request body contains invalid fields"
              },
              {
                "name": "details",
                "kind": "optional",
                "type": "array",
                "description": "Detailed validation errors (when applicable)",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "field",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "email"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "must be a valid email address"
                  },
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "INVALID_FORMAT"
                  }
                ]
              },
              {
                "name": "requestId",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "Correlation ID for support inquiries",
                "example": "",
                "format": "uuid"
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "cnGWTxiOCBHp04BbdJZi7",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.archbee.com/v2/products \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"name\": \"Wireless Headphones\",\n     \"price\": 79.99,\n     \"currency\": \"USD\",\n     \"category\": \"\",\n     \"productType\": \"\",\n     \"weight\": 0.25,\n     \"shippingClass\": \"standard\"\n     }'"
        },
        {
          "id": "v9LnG9MM6RIHCX6Thm5me",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"name\": \"Wireless Headphones\",\n   \"price\": 79.99,\n   \"currency\": \"USD\",\n   \"category\": \"\",\n   \"productType\": \"\",\n   \"weight\": 0.25,\n   \"shippingClass\": \"standard\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.archbee.com/v2/products\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "__FvL4CDxPXcGYrYoiUS4",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.archbee.com/v2/products\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"name\": \"Wireless Headphones\",\n   \"price\": 79.99,\n   \"currency\": \"USD\",\n   \"category\": \"\",\n   \"productType\": \"\",\n   \"weight\": 0.25,\n   \"shippingClass\": \"standard\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "RemWdl-QpjcqPvGiTuHzU",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.archbee.com/v2/products\"\n\npayload = json.dumps({\n   \"name\": \"Wireless Headphones\",\n   \"price\": 79.99,\n   \"currency\": \"USD\",\n   \"category\": \"\",\n   \"productType\": \"\",\n   \"weight\": 0.25,\n   \"shippingClass\": \"standard\"\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "cnGWTxiOCBHp04BbdJZi7"
    },
    "results": {
      "languages": [
        {
          "id": "fV6FSyZK1SV_t9zyscDaD",
          "language": "201",
          "code": "// Product created successfully\n{\n  \"id\": 42,\n  \"createdAt\": \"\",\n  \"updatedAt\": \"\"\n}"
        },
        {
          "id": "xQJIjVuOCWGNOYrqEdhCu",
          "language": "400",
          "code": "// Bad request — invalid input or missing required fields\n{\n  \"code\": \"VALIDATION_ERROR\",\n  \"message\": \"The request body contains invalid fields\",\n  \"details\": [\n    {\n      \"field\": \"email\",\n      \"message\": \"must be a valid email address\",\n      \"code\": \"INVALID_FORMAT\"\n    }\n  ],\n  \"requestId\": \"\"\n}"
        },
        {
          "id": "2uuiRvnXDgW3pthvL_pE-",
          "language": "422",
          "code": "// Unprocessable entity — validation failed\n{\n  \"code\": \"VALIDATION_ERROR\",\n  \"message\": \"The request body contains invalid fields\",\n  \"details\": [\n    {\n      \"field\": \"email\",\n      \"message\": \"must be a valid email address\",\n      \"code\": \"INVALID_FORMAT\"\n    }\n  ],\n  \"requestId\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "fV6FSyZK1SV_t9zyscDaD"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}