Curosa
Supplier Portal API Reference New

Core resources

品牌

在 Curosa 平台上为您产品创建和管理品牌

概览

Brands(品牌)接口允许您创建和管理与产品关联的品牌。在创建产品时,您可以通过名称引用品牌。品牌还可以包含一个可选的图片(如 Logo),该图片可能会与您的产品一起在平台上显示。

身份验证

所有接口都需要身份验证。请在 Authorization 请求头中包含您的 API 令牌。有关获取令牌的更多信息,请参阅 身份验证指南


列出所有品牌

检索与您账户关联的所有品牌列表。

接口: GET https://curosa.com/api/v1/brands

请求

curl --location 'https://curosa.com/api/v1/brands' \
--header 'Authorization: Bearer YOUR_API_TOKEN'

响应

成功时返回 200 OK,并在 data 数组中包含所有品牌:

{
    "data": [
        {
            "id": 1,
            "name": "Demo Brand",
            "description": "A brand used for demo purposes",
            "image": null
        }
    ]
}

响应字段:

字段 类型 描述
id integer 品牌的唯一标识符
name string 品牌的显示名称
description string|null 品牌的可选描述
image string|null 品牌图片(如 Logo)的 URL,如果未设置则为 null

创建品牌

创建一个新品牌。

接口: POST https://curosa.com/api/v1/brands

请求

curl --location 'https://curosa.com/api/v1/brands' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
    "name": "Demo Brand",
    "description": "A brand used for demo purposes"
}'

请求体:

字段 类型 必填 描述
name string 品牌的显示名称
description string 品牌的可选描述

响应

成功时返回 201 Created

{
    "message": "Brand created successfully",
    "brand_id": 3,
    "name": "Demo Brand",
    "description": "A brand used for demo purposes",
    "image": null
}

更新品牌

通过 ID 更新现有品牌。

接口: PUT https://curosa.com/api/v1/brands/{id}

请求

curl --location --request PUT 'https://curosa.com/api/v1/brands/3' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
    "name": "Updated Brand Name",
    "description": "Updated description"
}'

路径参数:

参数 类型 描述
id integer 要更新的品牌 ID

请求体:

字段 类型 必填 描述
name string 更新后的品牌显示名称
description string 更新后的品牌描述

删除品牌

通过 ID 删除品牌。

接口: DELETE https://curosa.com/api/v1/brands/{id}

请求

curl --location --request DELETE 'https://curosa.com/api/v1/brands/3' \
--header 'Authorization: Bearer YOUR_API_TOKEN'

路径参数:

参数 类型 描述
id integer 要删除的品牌 ID

在产品中使用品牌

在创建产品时,通过 name 引用品牌:

{
    "sku": "DEMO001",
    "name": "Demo Product",
    "brand": "Demo Brand"
}

速率限制

所有品牌接口的速率限制为 每小时 3,600 次请求。当前的限制额度和剩余请求数会在响应头中通过 x-ratelimit-limitx-ratelimit-remaining 返回。