Skip to main content
POST
/
{shopId}
/
products
Create product
curl --request POST \
  --url http://staging.qshop.ng/apiv2/{shopId}/products \
  --header 'Content-Type: application/json' \
  --data '
{
  "attributes": [
    {
      "name": {
        "_id": "620230e20d148855678615ce",
        "name": "Colorer"
      },
      "options": [
        {
          "label": "Colorer",
          "name": "Space grey test-1"
        },
        {
          "label": "Colorer",
          "name": "Black test-1"
        }
      ]
    }
  ],
  "brand": "Toyota",
  "costPrice": null,
  "dimension": {
    "height": 7,
    "length": 30,
    "unit": "m",
    "width": 50
  },
  "name": "Toyota corolla",
  "price": 5000000,
  "tags": [
    "Cars"
  ],
  "type": "physical",
  "variants": [
    {
      "costPrice": 2900000,
      "isActive": false,
      "options": [
        {
          "label": "Colorer",
          "name": "Space grey test-1"
        }
      ],
      "price": 3100000,
      "stock": 5,
      "weight": {
        "unit": "kg",
        "value": 20000
      }
    },
    {
      "costPrice": null,
      "isActive": true,
      "options": [
        {
          "label": "Colorer",
          "name": "Black test-1"
        }
      ],
      "price": 3000000,
      "stock": 5,
      "weight": {
        "unit": "kg",
        "value": 20000
      }
    }
  ],
  "variantsInheritPrice": false,
  "weight": {
    "unit": "kg",
    "value": 20000
  }
}
'

Body

application/json
attributes
object[]
Example:
[
{
"name": {
"_id": "620230e20d148855678615ce",
"name": "Colorer"
},
"options": [
{
"label": "Colorer",
"name": "Space grey test-1"
},
{
"label": "Colorer",
"name": "Black test-1"
}
]
}
]
brand
string
Example:

"Toyota"

costPrice
unknown
dimension
object
name
string
Example:

"Toyota corolla"

price
number
Example:

5000000

tags
string[]
Example:
["Cars"]
type
string
Example:

"physical"

variants
object[]
Example:
[
{
"costPrice": 2900000,
"isActive": false,
"options": [
{
"label": "Colorer",
"name": "Space grey test-1"
}
],
"price": 3100000,
"stock": 5,
"weight": { "unit": "kg", "value": 20000 }
},
{
"costPrice": null,
"isActive": true,
"options": [
{
"label": "Colorer",
"name": "Black test-1"
}
],
"price": 3000000,
"stock": 5,
"weight": { "unit": "kg", "value": 20000 }
}
]
variantsInheritPrice
boolean
Example:

false

weight
object

Response

200 - undefined