---
agentTools:
  projectIndex: https://kentro.readme.io/llms.txt
---

# create new product(s)

If request contains one object in array, response will be sent after request is fully processed, if request has more then one object in array, call will be processed asynchronously and response will be sent without waiting for request to be processed.

# OpenAPI definition

```json
{
  "servers": [
    {
      "url": "https://api.kentro.dev",
      "description": "Sandbox"
    },
    {
      "url": "https://api.kentro.live",
      "description": "Production"
    }
  ],
  "info": {
    "title": "Channel API",
    "version": "1.149.3",
    "description": "Channel-centric management made simple. The Channel-API serves as your primary gateway to work with channel-specific resources like orders, customers, invoices, and products, all while maintaining a unified data format.",
    "termsOfService": "https://kentro.io/terms-and-conditions",
    "contact": {
      "name": "support",
      "url": "https://kentro.io/contact-us",
      "email": "support@kentro.io"
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "x-proxy-enabled": true,
    "proxy-enabled": true
  },
  "paths": {
    "/v1/channel/product/update-inventory-level": {
      "post": {
        "parameters": [
          {
            "in": "query",
            "required": false,
            "name": "idempotency",
            "schema": {
              "type": "string",
              "minimum": 7,
              "maximum": 50
            },
            "description": "Provide unique value with each request to avoid duplicated requests in case of network / connection failure"
          }
        ],
        "responses": {
          "201": {
            "description": "Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v1_channel_product_update-inventory-level_createResponse"
                }
              }
            }
          },
          "401": {
            "description": "Request is not authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The error name"
                    },
                    "message": {
                      "type": "string",
                      "description": "The error message"
                    },
                    "code": {
                      "type": "number",
                      "description": "An HTTP error code"
                    },
                    "className": {
                      "type": "string",
                      "description": "The full name of the error class"
                    },
                    "data": {
                      "type": "object",
                      "description": "Additional data to include in the error"
                    },
                    "errors": {
                      "type": "object",
                      "description": "Error object"
                    }
                  },
                  "required": [
                    "name",
                    "message",
                    "code",
                    "className",
                    "data",
                    "errors"
                  ],
                  "example": {
                    "name": "NotAuthenticated",
                    "message": "error message",
                    "code": 401,
                    "className": "not-authenticated",
                    "data": {
                      "key": "value"
                    },
                    "errors": {
                      "key": "value"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Request is forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The error name"
                    },
                    "message": {
                      "type": "string",
                      "description": "The error message"
                    },
                    "code": {
                      "type": "number",
                      "description": "An HTTP error code"
                    },
                    "className": {
                      "type": "string",
                      "description": "The full name of the error class"
                    },
                    "data": {
                      "type": "object",
                      "description": "Additional data to include in the error"
                    },
                    "errors": {
                      "type": "object",
                      "description": "Error object"
                    }
                  },
                  "required": [
                    "name",
                    "message",
                    "code",
                    "className",
                    "data",
                    "errors"
                  ],
                  "example": {
                    "name": "Forbidden",
                    "message": "error message",
                    "code": 403,
                    "className": "forbidden",
                    "data": {
                      "key": "value"
                    },
                    "errors": {
                      "key": "value"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Request method is not allowed on this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The error name"
                    },
                    "message": {
                      "type": "string",
                      "description": "The error message"
                    },
                    "code": {
                      "type": "number",
                      "description": "An HTTP error code"
                    },
                    "className": {
                      "type": "string",
                      "description": "The full name of the error class"
                    },
                    "data": {
                      "type": "object",
                      "description": "Additional data to include in the error"
                    },
                    "errors": {
                      "type": "object",
                      "description": "Error object"
                    }
                  },
                  "required": [
                    "name",
                    "message",
                    "code",
                    "className",
                    "data",
                    "errors"
                  ],
                  "example": {
                    "name": "MethodNotAllowed",
                    "message": "error message",
                    "code": 405,
                    "className": "method-not-allowed",
                    "data": {
                      "key": "value"
                    },
                    "errors": {
                      "key": "value"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Request is unprocessable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The error name"
                    },
                    "message": {
                      "type": "string",
                      "description": "The error message"
                    },
                    "code": {
                      "type": "number",
                      "description": "An HTTP error code"
                    },
                    "className": {
                      "type": "string",
                      "description": "The full name of the error class"
                    },
                    "data": {
                      "type": "object",
                      "description": "Additional data to include in the error"
                    },
                    "errors": {
                      "type": "object",
                      "description": "Error object"
                    }
                  },
                  "required": [
                    "name",
                    "message",
                    "code",
                    "className",
                    "data",
                    "errors"
                  ],
                  "example": {
                    "name": "Unprocessable",
                    "message": "error message",
                    "code": 422,
                    "className": "unprocessable",
                    "data": {
                      "key": "value"
                    },
                    "errors": {
                      "key": "value"
                    }
                  }
                }
              }
            }
          }
        },
        "description": "If request contains one object in array, response will be sent after request is fully processed, if request has more then one object in array, call will be processed asynchronously and response will be sent without waiting for request to be processed.",
        "summary": "create new product(s)",
        "tags": [
          "product"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/v1_channel_product_update-inventory-level_createRequest"
              }
            }
          }
        },
        "x-code-samples": [
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://api.kentro.dev/v1/channel/product/update-inventory-level',\n  qs: {idempotency: 'SOME_STRING_VALUE'},\n  headers: {'content-type': 'application/json'},\n  body: [\n    {\n      productObjectId: 'string',\n      location: 'string',\n      lotNumber: 'string',\n      available: 0,\n      allocated: 0\n    }\n  ],\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Python + Python3",
            "source": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.kentro.dev\")\n\npayload = \"[{\\\"productObjectId\\\":\\\"string\\\",\\\"location\\\":\\\"string\\\",\\\"lotNumber\\\":\\\"string\\\",\\\"available\\\":0,\\\"allocated\\\":0}]\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/v1/channel/product/update-inventory-level?idempotency=SOME_STRING_VALUE\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          },
          {
            "lang": "Ruby + Native",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.kentro.dev/v1/channel/product/update-inventory-level?idempotency=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"[{\\\"productObjectId\\\":\\\"string\\\",\\\"location\\\":\\\"string\\\",\\\"lotNumber\\\":\\\"string\\\",\\\"available\\\":0,\\\"allocated\\\":0}]\"\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "schemas": {
      "v1_channel_product_update-inventory-level_createRequest": {
        "type": "array",
        "items": {
          "additionalProperties": true,
          "type": "object",
          "properties": {
            "productObjectId": {
              "type": "string"
            },
            "location": {
              "type": "string",
              "description": "Location Object ID."
            },
            "lotNumber": {
              "type": "string",
              "description": "Product lot number."
            },
            "available": {
              "type": "number",
              "default": 0
            },
            "allocated": {
              "type": "number",
              "default": 0
            }
          },
          "required": [
            "productObjectId",
            "location",
            "available",
            "allocated"
          ]
        },
        "example": [
          {
            "productObjectId": "string",
            "location": "string",
            "lotNumber": "string",
            "available": 0,
            "allocated": 0
          }
        ]
      },
      "v1_channel_product_update-inventory-level_createResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "updated",
              "skipped"
            ]
          }
        },
        "required": [
          "status"
        ],
        "example": {
          "status": "updated"
        }
      }
    }
  },
  "openapi": "3.0.2",
  "_id": {
    "buffer": {
      "0": 98,
      "1": 224,
      "2": 225,
      "3": 31,
      "4": 13,
      "5": 239,
      "6": 112,
      "7": 0,
      "8": 20,
      "9": 48,
      "10": 103,
      "11": 238
    }
  }
}
```