跳到主要内容
版本:202201

创建商品图片

POST 

/openapi/2022-01/products/:product_id/images

使用提供的详情创建新的商品图片。

请求

Path参数

    product_id string必填

    商品 ID。

请求体

    image object
    positionint32

    The position of the image. Must be greater than 0 if provided.

    srcstring必填

    The relative URL of the image.

    altstring

    The alt text of the image.

    widthint32

    The width of the image in pixels. Must be greater than 0 if provided.

    heightint32

    The height of the image in pixels. Must be greater than 0 if provided.

响应

200

数据结构
    image object
    idstring
    示例: 91d032e7-bbc8-47e4-8668-9ba6fe714de6
    product_idstring
    示例: 636a07da-39eb-4829-bde9-b65fae1c28b0
    positioninteger
    默认值: 0
    示例: 1
    srcstring
    示例: //cdn.shoplazza.com/efd33b921cacd5311a32dd03a9bc8740.png
    widthinteger
    默认值: 0
    示例: 1588
    heightinteger
    默认值: 0
    示例: 2246
    altstring
    示例:
    created_atstring
    示例: 2024-04-08T07:13:28Z
    updated_atstring
    示例: 2024-04-08T07:13:28Z