LUCELAATELIER🔔

사진 올리기

전체 주소POST https://apis.lucela.kr/v1/direct/listings/{listing_id}/media경로POST /v1/direct/listings/{listing_id}/media
openapi.json
{
  "/v1/direct/listings/{listing_id}/media": {
    "post": {
      "tags": [
        "다이렉트 API"
      ],
      "summary": "사진 올리기",
      "description": "사진 한 장을 칸에(갤러리 칸마다 한 장 · 상세 20장 · 10MiB · multipart/form-data)",
      "operationId": "post_v1_direct_listings_listing_id_media",
      "security": [
        {
          "ApiKey": [],
          "DirectDelegation": []
        }
      ],
      "x-implementation-status": "AVAILABLE",
      "x-lucela-billing-unit": "과금 없음",
      "x-lucela-unit-weight": 0,
      "x-lucela-response-fields": "id · assetId · slot · galleryIndex · role · label · alt · origin · originLabel · width · height · state · warnings · url · srcSet[](w · url) · thumbUrl · exifStripped · overlap",
      "x-lucela-direct": true,
      "x-lucela-direct-command": "attachListingMedia",
      "responses": {
        "201": {
          "description": "성공 — 다이렉트 몸통 그대로",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {},
                  "assetId": {},
                  "slot": {},
                  "galleryIndex": {},
                  "role": {},
                  "label": {},
                  "alt": {},
                  "origin": {},
                  "originLabel": {},
                  "width": {},
                  "height": {},
                  "state": {},
                  "warnings": {},
                  "url": {},
                  "srcSet": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "w": {},
                        "url": {}
                      },
                      "required": [
                        "w",
                        "url"
                      ]
                    }
                  },
                  "thumbUrl": {},
                  "exifStripped": {},
                  "overlap": {}
                }
              }
            }
          }
        },
        "401": {
          "$ref": "#/components/responses/E401"
        },
        "403": {
          "$ref": "#/components/responses/E403"
        },
        "413": {
          "$ref": "#/components/responses/E413"
        },
        "429": {
          "$ref": "#/components/responses/E429"
        },
        "503": {
          "$ref": "#/components/responses/E503"
        }
      },
      "parameters": [
        {
          "name": "listing_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "X-Lucela-Upload-Purpose",
          "in": "header",
          "required": true,
          "schema": {
            "enum": [
              "PRODUCT_IMAGE",
              "PRIVATE_EVIDENCE"
            ]
          }
        }
      ],
      "requestBody": {
        "required": true,
        "content": {
          "multipart/form-data": {
            "schema": {
              "type": "object",
              "properties": {
                "slot": {
                  "description": "1 · 2 · 3 · DETAIL · PROOF"
                },
                "file": {
                  "description": "JPG · PNG · WebP",
                  "type": "string",
                  "format": "binary"
                },
                "origin": {
                  "description": "ACTUAL · MANUFACTURER · REFERENCE — 없으면 받지 않음"
                },
                "rightsDeclared": {
                  "description": "사진 사용권 선언 — 참이어야 받음"
                },
                "alt": {
                  "description": "사진 설명"
                },
                "proofCode": {
                  "description": "PROOF 칸 확인 번호"
                }
              },
              "required": [
                "slot",
                "file"
              ],
              "additionalProperties": false
            }
          }
        }
      }
    }
  }
}