Requires write_product_listings access scope.
For more info, refer to:
PUT https://{handle}.myshopline.com/admin/openapi/v20260301/product_listings/:product_listing_id.json
handle : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is open001.myshopline.com , the store handle is open001 .
Path Parameters
  • product_listing_id string required
    Product ID
    Example: 16057039432335097907370282
Request Headers
  • Content-Type string required
    The field must be set to the fixed value application/json; charset=utf-8.
  • Authorization string required
    The access token for the API resource. Refer to App authorization to obtain the access token, and then pass the obtained token in the Bearer format.
    Example:
    Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
Request Body
  • product_listingobject
    Product information
  • product_id string
    Product ID
    Example: 16057039432335097907370282
Status Codes
For the complete list of codes and messages, see Http status code.

Response Headers
  • traceId
    A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise.
Response Body
  • product_listingobject
    Product list
  • handle string
    Global unique Product handle
    Example: product-handle
  • updated_at string
    Product update time
    Example: 2022-12-06T15:13:50+08:00
  • vendor string
    vendor
    Example: Shopline
  • imagesobject[]
    Product main image listing
  • src string
    Image src
    Example: https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png
  • alt string
    Image alt
    Example: This is a image alt
  • published_at string
    Time to post to the online store
    Example: 2022-12-06T15:13:50+08:00
  • template_path string
    template path
    Example: templates/products/detail.json
  • published_scope string
    Set the release scope, when the value is "web", it means an online store
    Example: web
  • status string
    Product status ; activated- on shelves , deactivated- off shelves , archived- filing
    Example: active
  • subtitle string
    Product summary
    Example: This is a subtitle
  • variantsobject[]
    Variant list
  • option1 string
    The variant corresponds to the value of the option1
    Example: Red
  • product_id string
    Product ID
    Example: 16057039432335097907370282
  • weight string
    Weight
    Example: 0.5
  • inventory_item_id string
    Inventory item ID
    Example: 5703943240925324252
  • option5 string
    The variant corresponds to the value of the option5
  • imageobject
    variant picture
  • alt string
    Image alt
    Example: This is a image alt
  • src string
    Image src
    Example: https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png
  • inventory_tracker boolean
    Track inventory or not
    Example: true
  • option2 string
    The variant corresponds to the value of the option2
    Example: L
  • id string
    Variant id
    Example: 18057039432358082693350282
  • price string
    selling price
    Example: 90
  • title string
    Variant title
    Example: Red/L
  • compare_at_price string
    Original price
    Example: 100
  • option3 string
    The variant corresponds to the value of the option3
  • option4 string
    The variant corresponds to the value of the option4
  • barcode string
    barcode
    Example: B000000001
  • sku string
    Sku code , ready-to-ship
    Example: T00000001
  • weight_unit string
    Weight units : g , kg , lb , oz , zh_kg
    Example: g
  • inventory_policy string
    Oversold strategy: deny - Oversold is not allowed, continue - Oversold is allowed
    Example: deny
  • inventory_quantity integer
    Inventory summary for all locations
    Example: 100
  • spu string
    SPU coce
    Example: S0000000001
  • created_at string
    Product created time
    Example: 2022-12-06T15:13:50+08:00
  • optionsobject[]
    List of option
  • values_images map
    The image of option value
    Example: {}
  • id string
    Option id
    Example: 16157850264851626133440282
  • name string
    Option name
    Example: Color
  • product_id string
    Product ID
    Example: 16057039432335097907370282
  • values array
    List of option value
    Example: ["[\"Red\", \"Green\", \"White”]"]
  • tags string
    Product tag
    Example: tag1, tag2
  • product_id string
    Product ID
    Example: 16057039432335097907370282
  • body_html string
    Pproduct description
    Example: This is the product description
  • title string
    Product title
    Example: This is a title
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301

ParamOptions

path required
header required

Body

required
{
  "product_listing": {
    "product_id": "16057039432335097907370282"
  }
}

Language

curl --request PUT \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301/product_listings/product_listing_id.json \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw' \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'accept: application/json'
Examples
Add Product
Request
{
"product_listing": {
"product_id": "16060878769549874798573144"
}
}
Response
{
"product_listing": {
"spu": "S000000001",
"status": "active",
"published_at": "2023-08-28T11:37:32+08:00",
"images": [
{
"alt": "This is a alt",
"src": "https://img-va.myshopline.com/image/store/2001026666/1653474941510/c4845f8f7cd84ff18f082eaf9c05b820.webp?w=1024&h=1024"
}
],
"template_path": "templates/products/detail.html",
"updated_at": "2023-08-28T19:18:17+08:00",
"body_html": "<p>This is a desription</p>",
"product_id": "16060878769549874798573144",
"tags": "T shirt,Spring",
"variants": [
{
"weight": "10.00",
"inventory_policy": "continue",
"product_id": "16060878769549874798573144",
"inventory_quantity": 580,
"option2": "White",
"weight_unit": "g",
"image": {
"alt": "This is a alt",
"src": "https://img-va.myshopline.com/image/store/2001026666/1653474941510/c4845f8f7cd84ff18f082eaf9c05b820.webp?w=1024&h=1024"
},
"compare_at_price": "120.00",
"inventory_item_id": "6087876956094755808",
"price": "100.00",
"option1": "L",
"title": "L · White",
"barcode": "T00000001",
"id": "18060878769553398013993144",
"inventory_tracker": true,
"sku": "S00000000101"
}
],
"created_at": "2023-08-28T11:37:32+08:00",
"options": [
{
"id": "16160878769553398014013144",
"name": "Size",
"product_id": "16060878769549874798573144",
"values": [
"L"
],
"values_images": {}
},
{
"values": [
"White"
],
"values_images": {},
"id": "16160878769553398014043144",
"name": "Color",
"product_id": "16060878769549874798573144"
}
],
"vendor": "Shopline",
"handle": "my-product-2",
"published_scope": "web",
"subtitle": "This is a subtitle",
"title": "My Product 2"
}
}
Was this article helpful to you?