> ## Documentation Index
> Fetch the complete documentation index at: https://developers-partners.delivered.co.kr/llms.txt
> Use this file to discover all available pages before exploring further.

# 상품 재고 수정

> 
            상품 재고 수정 API 입니다.
            상품의 재고 수량과 품절 여부를 Bulk로 갱신합니다. 1회 요청 시 1~100건까지 처리합니다.
            상품에 옵션이 있는 경우 productOption[]으로 옵션별 재고도 함께 갱신할 수 있습니다.

            응답은 부분 성공 모델입니다.
            - successCount: 갱신 성공한 상품 수
            - failureCount: 실패한 상품 수
            - failures[]: 실패한 상품별 상세 (shopProductId, errorCode, message)
              실패가 있어도 HTTP 200으로 응답하므로, 클라이언트는 failures[]를 반드시 확인해야 합니다.
        



## OpenAPI

````yaml /api-reference/global-link-api.json POST /open-api/v1/global-link/products/stock-updates
openapi: 3.0.1
info:
  title: Global Link Open API
  description: '-'
  version: 1.0.0
servers:
  - url: https://gw-staging.delivered.co.kr/global-ship
    description: 테스트 환경
  - url: https://auth.delivered.co.kr/global-ship
    description: 운영 환경
security:
  - Authorization: []
tags:
  - name: 글로벌링크 상품
    description: 글로벌링크 상품
paths:
  /open-api/v1/global-link/products/stock-updates:
    post:
      tags:
        - Global Link Product
      summary: 글로벌링크 상품 재고/품절 업데이트
      description: |2-

                    상품 재고 수정 API 입니다.
                    상품의 재고 수량과 품절 여부를 Bulk로 갱신합니다. 1회 요청 시 1~100건까지 처리합니다.
                    상품에 옵션이 있는 경우 productOption[]으로 옵션별 재고도 함께 갱신할 수 있습니다.

                    응답은 부분 성공 모델입니다.
                    - successCount: 갱신 성공한 상품 수
                    - failureCount: 실패한 상품 수
                    - failures[]: 실패한 상품별 상세 (shopProductId, errorCode, message)
                      실패가 있어도 HTTP 200으로 응답하므로, 클라이언트는 failures[]를 반드시 확인해야 합니다.
                
      operationId: updateProductStocks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GlobalLinkProductStockUpdateRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/GlobalLinkProductStockUpdateResponse'
components:
  schemas:
    GlobalLinkProductStockUpdateRequest:
      required:
        - products
      type: object
      properties:
        products:
          maxItems: 100
          minItems: 1
          type: array
          description: 재고 갱신 대상 상품 목록 (1회 요청당 1~100건)
          items:
            $ref: '#/components/schemas/StockUpdateProduct'
    GlobalLinkProductStockUpdateResponse:
      required:
        - failureCount
        - failures
        - successCount
      type: object
      properties:
        successCount:
          type: integer
          description: 재고 갱신 성공한 상품 수
          format: int32
          example: 98
        failureCount:
          type: integer
          description: 재고 갱신 실패한 상품 수
          format: int32
          example: 2
        failures:
          type: array
          description: 실패한 상품 상세 목록. failureCount가 0이면 빈 배열
          items:
            $ref: '#/components/schemas/FailedProduct'
    StockUpdateProduct:
      required:
        - isSoldOut
        - shopProductId
        - stockQuantity
      type: object
      properties:
        shopProductId:
          type: string
          description: 파트너사 상품 ID
          example: product-001
        stockQuantity:
          type: integer
          description: 재고 수량
          format: int32
          example: 250
        isSoldOut:
          type: boolean
          description: 품절 여부
          example: false
        productOption:
          type: array
          description: 옵션별 재고 갱신 목록. 옵션이 없는 상품이면 null
          items:
            $ref: '#/components/schemas/StockUpdateProductOption'
      description: 재고 갱신 대상 상품 목록 (1회 요청당 1~100건)
    FailedProduct:
      required:
        - errorCode
        - message
        - shopProductId
      type: object
      properties:
        shopProductId:
          type: string
          description: 실패한 상품의 판매처 상품 ID
          example: product-001
        errorCode:
          type: string
          description: 실패 사유 코드
          example: INVALID_PRICE
        message:
          type: string
          description: 실패 사유 메시지
          example: 할인가가 원가보다 큽니다
      description: 실패한 상품 상세 목록. failureCount가 0이면 빈 배열
    StockUpdateProductOption:
      required:
        - shopOptionId
        - stockQuantity
      type: object
      properties:
        shopOptionId:
          type: string
          description: 파트너사의 옵션 ID
          example: opt-001
        stockQuantity:
          type: integer
          description: 옵션별 재고 수량
          format: int32
          example: 50
      description: 옵션별 재고 갱신 목록. 옵션이 없는 상품이면 null
  securitySchemes:
    Authorization:
      type: apiKey
      description: 발급받은 시크릿 키
      name: Authorization
      in: header

````