API Docs
Home
Home
Developer GuideAPI
StatusWebhooks
Developer GuideAPI
StatusWebhooks
  1. Online Product
  • Config
    • List Pickup Address
      GET
    • List Box Dimension
      GET
    • List vendor
      GET
    • List store
      GET
  • Online Product
    • Options
      • List category
      • List brand
    • Create Single Product
      POST
    • Create Product From Product Inventory
      POST
    • List product
      GET
    • Product detail
      GET
  • Product Inventory
    • Options
      • List Outbound Strategy
      • List Product Type
      • List Material
      • List Storage Method
    • List product inventory
      GET
    • Product inventory detail
      GET
    • Create single inventory product
      POST
  • Order
    • Shipping Service
      • Preview shipping prices
        • List shipping service
        • List available courier
      • List available courier from order
      • List shipping service of courier
    • Create order B2C
      POST
    • Create order B2B
      POST
    • List order
      GET
    • Order detail
      GET
    • Cancel order
      PATCH
  • Shipment
    • Create shipment auto
      POST
    • [Retail][Ship by self] Create shipment with item
      POST
    • Cancel shipment
      PATCH
    • List shipment
      GET
    • Shipment detail
      GET
    • List shipment of order
      GET
  • Shipment Inbound
    • Create shipment inbound
    • Cancel shipment inbound
    • List shipment inbound
    • Shipment inbound detail
    • Shipment inbound items
  • Order Return
    • List return order
    • Return order detail
    • Create return order
    • Cancel Return Order
  • Courier
    • List courier service integrated
    • List courier operate
    • List courier integrated
  • Address Directory
    • Province
    • District
    • Ward
  1. Online Product

Create Single Product

POST
/api/v1/public/products/create
Create a new product online to the system with detailed product information.
Notes
Make sure the Authorization token is valid.
sku must be unique across the platform.
All mandatory fields (like store, sku, name, price) must be filled correctly.

Request

Header Params

Body Params application/json

Examples

Responses

🟢200OK
application/json
Body

🟠400Bad Request
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/v1/public/products/create' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
  "store": {{store_id}},
  "sku": "{{$helpers.fromRegExp('\''/[A-Z0-9]{4}-[A-Z0-9]{4}/'\'')}}",
  "name": "{{$food.vegetable}}",
  "original_price": "{{$commerce.price(min=1000,max=10000000,locale='\''vi'\'')}}",
  "discounted_price": "{{$commerce.price(min=1000,max=10000000,locale='\''vi'\'')}}",
  "condition": "NEW",
  "status": 200,
  "weight": 100,
  "package_length": 10,
  "package_width": 15,
  "package_height": 11,
  "product_brand": {{brand_id}},
  "product_category": {{category_id}},
  "info": {
    "description": "{{$food.description}}"
  },
  "video_image": [
    {
      "image_url": "{{$image.url(width=200,height=200)}}",
      "video_url": null,
      "thumbnail_url": null,
      "duration": 0,
      "priority": 1
    },
    {
      "image_url": "{{$image.url(width=200,height=200)}}",
      "video_url": null,
      "thumbnail_url": null,
      "duration": 0,
      "priority": 0
    }
  ],
  "is_dangerous": false,
  "is_pre_order": false,
  "config": {
    "create_inventory_sku": true
  }
}'
Response Response Example
200 - Success
{
    "status_code": 200,
    "data": {
        "product_id": 36062
    },
    "error": false,
    "error_code": null,
    "log_id": null,
    "messages": "",
    "total": 1
}
Previous
List brand
Next
Create Product From Product Inventory
Built with