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 Product From Product Inventory

POST
/api/v1/public/products/for-sale
Create a product for sale (publish online) based on an existing product from the inventory system.
Behavior Notes:
The API fetches the product details from inventory by product_inventory ID and uses it to create a sellable product listing in the specified store.
The new product may be created in a "Pending" (status = 100) state, requiring additional info or activation before going live.
Ensure the inventory item has all the necessary information for publishing (e.g., SKU, pricing, images).
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/v1/public/products/for-sale' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
  "store": {{store_id}},
  "product_inventory": {{id_product_inventory}}
}'
Response Response Example
200 - Success
{
  "status_code": 200,
  "data": {
    "product_id": 38403,
    "product_inventory_id": 37026
  },
  "error": false,
  "error_code": null,
  "log_id": null,
  "messages": "",
  "total": 1
}

Request

Header Params
Authorization
string 
required
Default:
{{your_api_key_here}}
Body Params application/json
store
integer 
required
The ID of the store where the product will be listed.
product_inventory
integer 
required
The ID of the product in inventory to be converted into a sellable product.
Examples

Responses

🟢200Success
application/json
Body
status_code
integer 
optional
data
object 
optional
product_id
integer 
optional
product_inventory_id
integer 
optional
error
boolean 
optional
error_code
string 
optional
log_id
integer 
optional
messages
string 
optional
total
integer 
optional
🟠400Bad Request
Previous
Create Single Product
Next
List product
Built with