Nyehandel
  1. Product
Nyehandel
  • Introduction
  • Getting started
  • Webhooks
  • API Reference
  • Order
    • Get order
      GET
    • Get orders
      GET
    • Create order
      POST
    • Deliver order
      POST
  • Shipping Method
    • Get Shipping methods
      GET
  • Product
    • Relation between products and variants
    • Get products
      GET
    • Update products batch
      PUT
    • Create products batch
      POST
    • Create product
      POST
    • Update product
      PUT
    • Create variant
      POST
    • Find product by sku or id
      GET
    • Delete product
      DELETE
  • Variant
    • Update variant batch
      PUT
    • Update variant
      PUT
    • Delete product variant
      DELETE
    • Find variant
      GET
  • Payment Method
    • Get Payment methods
      GET
  • Customer
    • Get Customer
      GET
    • Get Customers
      GET
    • Create Customer
      POST
  • Category
    • Create category
    • Update category
    • Get category
    • Delete category
    • Get categories
  • Currency
    • Get currencies
  • Headless
    • Pages
      • Get Page
      • Get Pages
    • Categories
      • Get Category
      • Get Pages
    • Startpage
    • System
  1. Product

Create product

POST
/products
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/products' \
--header 'X-Identifier: {{x_identifier}}' \
--header 'Authorization: Bearer {{token}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
    "status": "draft",
    "name": "namn 2024-09-03",
    "meta_title": "Metis titilus",
    "meta_description": "Metus deskriptus",
    "external_reference": "Ext reffe",
    "description": "produktbeskrivningen",
    "hs_code": "12312321",
    "country_of_origin": "SE",
    "vat_rate": 1200,
    "variants": [
        {
            "sku": "20240901-hej57ad39",
            "stock": "291",
            "weight": "2500",
            "stock_price": 10000,
            "purchase_price": 1000,
            "supplier_sku": "Lev-art-100",
            "gtin": "Gtion-valle",
            "prices": [
                {
                    "price": 15000,
                    "tier": 1,
                    "compare_price": 20000
                },
                {
                    "price": 14000,
                    "tier": 5,
                    "compare_price": 20000
                },
                {
                    "price": 14000,
                    "tier": 10,
                    "compare_price": 20000,
                    "currency_id": 1
                }
            ],
            "options": [
                {
                    "type": "Färg",
                    "value": "Blå"
                },
                {
                    "type": "Storlek",
                    "value": "S"
                }
            ]
        }
    ],
    "categories": [
        {
            "name": "Jul",
            "update_on_exists": false
        },
        {
            "name": "kaosdkasd",
            "external_identifier": "api-1",
            "update_on_exists": false
        },
        {
            "name": "hejsan",
            "external_identifier": "api-1",
            "update_on_exists": false
        }
    ],
    "type": "inventory_item"
}'
Response Response Example
{}

Request

Header Params
X-Identifier
string 
optional
Example:
{{x_identifier}}
Authorization
string 
optional
Example:
Bearer {{token}}
Accept
string 
optional
Example:
application/json
Content-Type
string 
optional
Example:
application/json
Body Params application/json
status
enum<string> 
optional
Allowed values:
draftpublishedinactivepending_retirementretired
meta_title
string  | null 
optional
meta_description
string  | null 
optional
name
string 
required
external_reference
string  | null 
optional
description
string  | null 
optional
short_description
string  | null 
optional
slug
string  | null 
optional
hs_code
string  | null 
optional
vat_rate
enum<integer> 
optional
Allowed values:
250012006000
variants
array [object {15}] 
required
sku
string 
required
prices
object 
optional
stock
integer  | null 
optional
weight
integer  | null 
optional
purchase_price
integer  | null 
optional
stock_price
integer  | null 
optional
package_size
integer  | null 
optional
supplier_sku
string  | null 
optional
gtin
string 
optional
storage_space
string 
optional
options
array [object {2}] 
optional
Required if more than one variant
always_orderable
boolean 
optional
positive_inventory_status
string 
optional
negative_inventory_status
string 
optional
vehicle_data
array [object {5}] 
optional
type
enum<string> 
required
Allowed values:
standardinventory_itempre_order_item
categories
array [object {3}]  | null 
optional
Set category or create if not found
name
string 
required
external_identifier
string  | null 
optional
update_on_exists
boolean 
optional
brand_name
string  | null 
optional
Set brand or create brand if not found
supplier_name
string  | null 
optional
Set supplier or create supplier if not found
attributes
array [object {4}] 
optional
key
string 
optional
value
string 
optional
is_featured
boolean 
optional
is_labeled
boolean 
optional
specifications
array [object {2}] 
optional
title
string 
optional
specifications
array [object {3}] 
optional
filter_tags
array[string] | null 
optional
images
array[string] | null 
optional
Examples

Responses

🟢200Success
application/json
Body
object {0}
Previous
Create products batch
Next
Update product
Built with