-
Notifications
You must be signed in to change notification settings - Fork 1
κ΄λ¦¬
alicia edited this page Jan 2, 2020
·
13 revisions
Content-type : application/json
λ©μλ | κ²½λ‘ | 짧μμ€λͺ |
---|---|---|
POST | /management/register | μ λ¬κ° μν λ±λ‘ |
Request
body : form-data
λ³μ | νμ | μ€λͺ |
---|---|---|
images | File | ν맀μκ° λ±λ‘νλ μν |
{
"images": λ±λ‘ν μνμ΄λ―Έμ§λ€
"goodsName": "μνμ΄λ¦",
"sellerName": "ν맀μ μ΄λ¦",
"comment": "μν μμΈμ€λͺ
",
"color": "['μκΉ1','μκΉ2']",
"gender": "f",
"category": "μΉ΄ν
κ³ λ¦¬",
"price": "10000",
"grade": "10",
"size": "xxlg",
"condition": "9",
"style": "['μ€νμΌ1','μ€νμΌ2']"
}
Response
Success: μν λ±λ‘ μ±κ³΅
{
"code": 200,
"json": {
"success": true,
"message": "μν λ±λ‘μ μ±κ³΅νμμ΅λλ€.",
"data": {
"img": [
"https://fluff-s3.s3.ap-northeast-2.amazonaws.com/1577964428792.JPG",
"https://fluff-s3.s3.ap-northeast-2.amazonaws.com/1577964428796.md"
],
"_id": "5e0dd39080c19f2f9856ac26"
}
}
}
Fail: κΆνμμ μλ¬
{
"code": 400,
"json": {
"success": "false",
"message": "ν ν°μ΄ μμ΅λλ€."
}
}
Fail: κ°μ μ΄λ¦μΌλ‘ λ±λ‘λ μν μ‘΄μ¬μ
{
"code": "400",
"json": {
"success": "false",
"message": "μν λ±λ‘ λ°μ΄ν°λ₯Ό λ€ μ
λ ₯νμ§ μμμ΅λλ€."
}
}
Fail: μ λ‘λν νμΌ λ―Έλ±λ‘μ
{
"code": "400",
"json": {
"success": "false",
"message": "μ
λ‘λν νμΌμ΄ μμ΅λλ€."
}
}
Fail: μν λ±λ‘ μ€ν¨
{
"code": "500",
"json": {
"success": "false",
"message": "μν λ±λ‘μ μ€ν¨νμμ΅λλ€."
}
}
Context-type : application/json
λ©μλ | κ²½λ‘ | 짧μμ€λͺ |
---|---|---|
PUT | /management/update | μ λ¬κ° μν μμ |
Request
{
"goodsId": "μν μμ΄λ"
"goodsName": "μνμ΄λ¦",
"comment": "μ½λ©νΈ",
"color": "["orange","yellow"]",
"category": "μΉ΄ν
κ³ λ¦¬",
"price": "20000",
"gender": "f",
"size": "xl",
"condition": "10",
"style": "["style1","style2"]"
}
Response
Success: μν μμ μ±κ³΅
{
"code": "200",
"json": {
"success": "true",
"message": "μν μμ μ μ±κ³΅νμμ΅λλ€."
}
}
Fail: κΆνμμ μλ¬
{
"code": "400",
"json": {
"success": "false",
"message": "ν ν°μ΄ μμ΅λλ€."
}
}
Fail: μμ μ μν λͺ¨λ κ° λΆμΆ©μ‘± μλ¬
{
"code": "400",
"json": {
"success": "false",
"message": "μμ μ μν λͺ¨λ κ°λ€μ΄ μΆ©μ‘±λμ§ μμμ΅λλ€."
}
}
Fail: ν΄λΉμ μ μ μν μλ μλ¬
{
"code": "400",
"json": {
"success": "false",
"message": "ν΄λΉ μ μ μ μνμ΄ μλλλ€."
}
}
Fail: μμ ν μνμ΄ μμ λ
{
"code": "400",
"json": {
"success": "false",
"message": "μμ΄λλ₯Ό μ°Ύμ μ μμ΅λλ€."
}
}
Fail: μν μμ μ€ν¨
{
"code": "600",
"json": {
"success": "false",
"message": "μν μμ μ μ€ν¨νμμ΅λλ€."
}
}
Context-type : application/json
λ©μλ | κ²½λ‘ | 짧μμ€λͺ |
---|---|---|
DELETE | /management/delete | μ λ¬κ° μν μμ |
Request
{
"goodsId": "μνμμ΄λ"
}
Response
Success: μν μμ μ±κ³΅
{
"code": 200,
"json": {
"success": true,
"message": "μν μμ λ₯Ό μ±κ³΅νμμ΅λλ€."
}
}
Fail: ν΄λΉ μνμ΄ μ μ μ μνμ΄ μλ μλ¬
{
"code": 400,
"json": {
"success": false,
"message": "ν΄λΉ μ μ μ μνμ΄ μλλλ€."
}
}
Fail: μ‘΄μ¬νμ§ μλ μν μμ μ
{
"code": "400",
"json": {
"success": "false",
"message": "μμ΄λλ₯Ό μ°Ύμ μ μμ΅λλ€."
}
}
Fail: μν μμ μ€ν¨
{
"code": "400",
"json": {
"success": "false",
"message": "μν μμ λ₯Ό μ€ν¨νμμ΅λλ€."
}
}