v1

latestOpenAPI 3.0.02026-07-2455104.8 MB
Product

Create new product V1

Creates a new product.<br><br>

<h2>Warning: Multiple request body content types</h2> <p> Due to technical limitations, the information provided here may not display all available request body content types. We are currently working with our third-party documentation provider to address this issue. For a complete and accurate representation of the available content types, we recommend referring to the <a target="_blank" href="https://github.com/xentral/api-spec-public">full OpenAPI specification</a>. </p> <p> We apologize for any inconvenience caused and appreciate your understanding as we work to resolve this matter. </p> <h3>Available request content types:</h3> <ul> <li><b>application/json</b></li> <li>application/vnd.xentral.upsert+json</li> </ul>
post/api/v1/products

Request body

namestring

Name of the product.

numberstring

Number / SKU of the product.

descriptionstring

Description of the product.

shortDescriptionstring

Short description of the product.

customsTariffNumberstring

Customs tariff number of the product.

eanstring

EAN of the product.

internalCommentstring

Text only for internal information.

minimumOrderQuantityinteger

Numerical minimum order quantity of the product.

minimumStorageQuantityinteger

Numerical minimum storage quantity of the product.

serialNumbersMode'disabled' | 'user' | 'product' | 'productAndWarehouse'

4 different modes available if the product has serial numbers or not and how they are handled. For more information about the different modes have a look into our handbook.

disabledReasonstring nullable

Shows the reason why the product is locked when clicking into the product.

ageRating'' | '16' | '18'

Sets an age rating for the product. Currently only used for the shipping service provider DHL.

countryOfOriginstring nullable

Two-digit ISO country code for country of origin of the product.

regionOfOrigin'' | '01' | '02' | '03' | '04' | '05' | '06' | '07' | '08' | '09' | '10' | '11' | '12' | '13' | '14' | '15' | '16' | '99'

01 - Schleswig-Holstein, 02 - Hamburg, 03 - Niedersachsen, 04 - Bremen, 05 - Nordhrein-Westfalen, 06 - Hessen, 07 - Rheinland-Pfalz, 08 - Baden-Württemberg, 09 - Bayern, 10 - Saarland, 11 - Berlin, 12 - Brandenburg, 13 - Mecklenburg-Vorpommern, 14 - Sachsen, 15 - Sachsen-Anhalt, 16 - Thüringen, 99 - foreign origin

salesTax'standard' | 'reduced' | 'free'

Selection of three possible values for the sales tax of the product.

shopPriceDisplaystring float nullable

Only used by some online shops. For more information have a look into our handbook.

isShippingCostsProductboolean

Determines if a product is used as a shipping costs product. For more information have a look into our handbook.

isMatrixProductboolean

Determines if a product is a matrix product. For more information have a look into our handbook.

Example request

{
  "project": {
    "id": "1337"
  },
  "tags": [
    {
      "color": "ff0000"
    }
  ],
  "measurements": {
    "width": {
      "value": 20,
      "unit": "cm"
    },
    "height": {
      "value": 10,
      "unit": "cm"
    },
    "length": {
      "value": 30,
      "unit": "cm"
    },
    "weight": {
      "value": 2,
      "unit": "kg"
    },
    "netWeight": {
      "value": 1.5,
      "unit": "kg"
    }
  },
  "category": {
    "id": "1337"
  },
  "standardSupplier": {
    "id": "12345"
  },
  "defaultStorageLocation": {
    "id": "1337"
  },
  "calculatedPurchasePrice": {
    "price": {
      "amount": "13.37",
      "currency": "EUR"
    }
  },
  "freeFields": [
    {
      "id": "17",
      "value": "Sample Product"
    }
  ],
  "variantOf": {
    "id": "parent-product-98765"
  },
  "variants": [
    {
      "name": "OptionalName(overrides autogenerated)",
      "options": [
        {
          "name": "Cotton",
          "option": {
            "name": "Material"
          }
        },
        {
          "name": "M",
          "option": {
            "name": "Size"
          }
        },
        {
          "name": "NoLogo",
          "option": {
            "name": "Logo"
          }
        }
      ]
    }
  ]
}

Response

Resource successfully created response