Version: 202201
Create Supplier
POST/openapi/2022-01/suppliers
Allows users to add a new supplier to the system.
Request
- application/json
- Body
- Example
Body
supplier objectrequired
titlestringrequired
supplier's name, must be unique within the store.
urlstring
{
"supplier": {
"title": "string",
"url": "string"
}
}
Responses
- 200
- 422
- 500
200
- application/json
- Schema
- Example
- Result
Schema
supplier object
idstring
Example:
382453603865993516titlestring
Example:
example supplierurlstring
Example:
https://shoplazza.comcreated_atstring
Example:
2024-05-21T08:54:04Zupdated_atstring
Example:
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
- Schema
- Example
- duplicated supplier name
Schema
errorsstring[]
{
"errors": [
"Duplicated supplier name"
]
}
{
"errors": [
"Duplicated supplier name"
]
}
500
- application/json
- Schema
- Example
- Result
Schema
errorsstring[]
{
"errors": [
"title is a required field"
]
}
{
"errors": [
"title is a required field"
]
}