Legacy Knowledge Base
公開されました Sep. 10, 2025

Patch APIを使用しても製品のステータスが更新されない。

Written By

Pooja Bhambani

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

問題

  • PATCH APIは、製品のワークフローのステータスを更新していない。
  • 再現するための手順
    1.
    ヘッドレスAPI(リクエストは添付)で商品を作成する。
    2. UIで製品のステータスを確認する(ドラフトステータスとして表示されている)。
    3. 作成した商品のレスポンスを取得するために、Get APIを使用します。 (GET /v1.0/products/{id})
    4. Patch APIに移動し、プロダクトIDとGet APIのレスポンスを入力します。 また、ワークフローの以下のステータスを変更します:
    "workflowStatusInfo": {
      "code": 0,
      "label": "approved",
      "label_i18n": "Approved"
    }
    5. 再度、商品の状態を確認する。
    期待される動作 製品のステータスを「承認」に変更する必要があります。
    実際の行動 製品のステータスは変更されていない。

Environment

  • Liferay DXP 7.3
  • Commerce 3.0

解決策

  • PATCH APIは製品の入稿にのみ使用します。 そこで、 、製品承認のために適切なユーザーに通知を送信します。
  • 製品のワークフローのステータスを更新するには、以下の手順で行う必要があります。
    1. 最初のPOSTで、製品を「DRAFT」ステータスで作成します。
    2. PATCHを使用して製品を更新する(製品のステータスが「保留」になり、ユーザーに通知が送られる)。

追加情報

Did this article resolve your issue ?

Legacy Knowledge Base