LogicTrade API
  1. Product
LogicTrade API
  • Authentication
  • Pagination
  • Rate limits
  • Error codes
  • Changelog
  • Configuration Service
  • Endpoints
    • Authentication
      • Introspection
    • Customer
      • Authenticate a customer user account
      • List all customers
      • Retrieve a customer by id
      • Create a customer
      • Update a customer
      • Remove the customer
    • Supplier
      • List all suppliers
      • Retrieve a supplier by id
      • Create a supplier
      • Update a supplier
      • Remove the supplier
    • Product
      • Product
        • List all products
          GET
        • Retrieve a product by id
          GET
        • Create a product
          POST
        • Remove the products
          DELETE
        • Update a product
          PUT
        • Search products
          POST
        • List all variants
          GET
        • Retrieve a variant by id
          GET
        • Create a variant
          POST
        • Update a variant
          PUT
        • Delete a variant
          DELETE
      • Groups
        • List all product groups
      • Discount
        • List all discounts for products
        • Get all discounts for product by id
        • List all discounts for customers
        • Get all discounts for a customer by id
      • Stock
        • Get stock for products
        • Search stock for products
      • Prices
        • Get product prices
      • Descriptions
        • Get the descriptions for a product
      • References
        • Get the product references
      • Compositions
        • Get product compositions
      • Configurator
        • List all configuration steps
        • List all configuration step values
        • Get configuration step value image
        • List all product configuration steps
    • Quote
      • List all quotes
      • Retrieve a quote by id
      • Create a quote
      • Update a quote
    • Sales order
      • Lines
        • Create an order line
        • Retrieve an order line by id
        • Update an order line
        • Delete an order line
      • List all orders
      • Retrieve an orders by id
      • Create an order
      • Update an order
    • Invoice
      • List all invoices
      • Retrieve a invoice by id
      • Create a invoice
      • Update a invoice
    • Delivery
      • Get list of orders that can be delivered
      • Update the order with delivery information
    • Purchase order
      • List all purchase orders
      • Retrieve a purchase orders by id
      • Create a purchase order
      • Update a purchase order
  1. Product

Create a variant

POST
/rest/v1/products/{productId}/variants

Request

Authorization
Add parameter in header
api-key
Example:
api-key: ********************
Path Params

Body Params application/json

Example
{
    "description": "test variant",
    "number": "007",
    "webshopStartDate": "2025-07-17",
    "configuration": {
        "items": [
            {
                "optionBarcode": "9900000002244",
                "valueBarcode": "9900000002572"
            },
            {
                "optionBarcode": "9900000002367",
                "valueBarcode": "9900000003371"
            },
            {
                "optionBarcode": "9900000003098",
                "valueBarcode": "9900000003104"
            }
        ]
    }
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.logictrade.cloud/rest/v1/products//variants' \
--header 'api-key: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "description": "test variant",
    "number": "007",
    "webshopStartDate": "2025-07-17",
    "configuration": {
        "items": [
            {
                "optionBarcode": "9900000002244",
                "valueBarcode": "9900000002572"
            },
            {
                "optionBarcode": "9900000002367",
                "valueBarcode": "9900000003371"
            },
            {
                "optionBarcode": "9900000003098",
                "valueBarcode": "9900000003104"
            }
        ]
    }
}'

Responses

🟢200Success
application/json
Body

Example
{
    "id": 0,
    "number": "string",
    "description": "string",
    "invalid": true,
    "barcode": "string",
    "startDate": "2019-08-24T14:15:22Z",
    "endDate": "2019-08-24T14:15:22Z",
    "webshop": true,
    "webshopStartDate": "2019-08-24T14:15:22Z",
    "webshopEndDate": "2019-08-24T14:15:22Z",
    "configuration": {
        "id": 0,
        "items": [
            {
                "option": "string",
                "optionBarcode": "string",
                "optionCode": "string",
                "value": "string",
                "valueBarcode": "string",
                "valueCode": "string"
            }
        ]
    },
    "attributes": [
        {
            "id": 0,
            "group": {
                "code": "string",
                "name": "string"
            },
            "type": "string",
            "name": "string",
            "suffix": "string",
            "code": "string",
            "sequence": 0,
            "values": [
                {
                    "id": 0,
                    "code": "string",
                    "value": "string"
                }
            ]
        }
    ]
}
Modified at 2025-09-10 13:08:56
Previous
Retrieve a variant by id
Next
Update a variant