版本:202201
创建供应商
POST/openapi/2022-01/suppliers
使用提供的详情创建新供应商。
请求
- application/json
- 请求体
- 示例
请求体
supplier object必填
titlestring必填
supplier's name, must be unique within the store.
urlstring
{
"supplier": {
"title": "string",
"url": "string"
}
}
响应
- 200
- 422
- 500
200
- application/json
- 数据结构
- 示例
- Result
数据结构
supplier object
idstring
示例:
382453603865993516titlestring
示例:
example supplierurlstring
示例:
https://shoplazza.comcreated_atstring
示例:
2024-05-21T08:54:04Zupdated_atstring
示例:
2024-05-21T08:54:04Z{
"supplier": {
"id": "382453603865993516",
"title": "example supplier",
"url": "https://shoplazza.com",
"created_at": "2024-05-21T08:54:04Z",
"updated_at": "2024-05-21T08:54:04Z"
}
}
{
"supplier": {
"id": "382453603865993516",
"title": "example supplier",
"url": "https://shoplazza.com",
"created_at": "2024-05-21T08:54:04Z",
"updated_at": "2024-05-21T08:54:04Z"
}
}
422
- application/json
- 数据结构
- 示例
- duplicated supplier name
数据结构
errorsstring[]
{
"errors": [
"Duplicated supplier name"
]
}
{
"errors": [
"Duplicated supplier name"
]
}
500
- application/json
- 数据结构
- 示例
- Result
数据结构
errorsstring[]
{
"errors": [
"title is a required field"
]
}
{
"errors": [
"title is a required field"
]
}