Power BI Connector for Smaregi

Build 26.0.9770

Shipments

Returns a list of shipment records for goods sent to suppliers, such as returns and promotional items.

テーブル固有の情報

SELECT

本製品 は Smaregi API を使用してWHERE 句条件を処理します。すべてのカラムは=、!=、>、<、>=、<= 演算子によるサーバー側フィルタリングをサポートし、文字列型のカラムはLIKE もサポートします。IN 演算子、およびdate/datetime 型のカラムに対するLIKE 演算子は、クライアント側で処理されます。

例えば、次のクエリはサーバー側で処理されます:

SELECT * FROM Shipments WHERE ShipmentId = 5

SELECT RecipientId, RecipientName FROM Shipments

INSERT

Shipments を追加するには、ShipmentStoreId、RecipientType、RecipientName、ShipmentDivision、ShipmentDate、Status およびDetailAggregate フィールドを指定します。

一時テーブルを使用する場合:

INSERT INTO ShipmentDetails#TEMP (productId, quantity) VALUES (84, 1)
INSERT INTO ShipmentDetails#TEMP (productId, quantity) VALUES (83, 1)
INSERT INTO Shipments (ShipmentStoreId, RecipientType, RecipientName, ShipmentDivision, ShipmentDate, Status, DetailAggregate) VALUES (1, 3, 'TestName3113', 2, '2057-07-20', 0, 'ShipmentDetails#TEMP')

集計を使用する場合:

INSERT INTO Shipments (ShipmentStoreId, RecipientType, RecipientName, ShipmentDivision, ShipmentDate, Status, DetailAggregate) VALUES (1, 3, 'TestName3113', 2, '2057-07-20', 0, '    {
      "table_name": "ShipmentDetail",
      "rows": [
        {
          "productId": "65",
          "quantity": "3"
        }
      ]
    }
')

UPSERT

このテーブルでは、UPSERT はサポートされていません。

UPDATE

Smaregi はRecipientType、RecipientId、RecipientName、ShipmentDivision、ShipmentDate、Status、IdentificationNo、Token およびDetailAggregate カラムの更新を許可します。

UPDATE Shipments SET IdentificationNo = '333543' WHERE ShipmentId = 5

Note: UPDATE クエリでDetailAggregate カラムに加えられた変更は、ShipmentDetails ビューに反映されます。

一時テーブルを使用する場合:

INSERT INTO ShipmentDetails#TEMP (ShipmentId, productId, quantity) VALUES (9, 7, 1)
INSERT INTO ShipmentDetails#TEMP (ShipmentId, productId, quantity) VALUES (9, 8, 1)
UPDATE Shipments SET DetailAggregate = 'ShipmentDetails#TEMP' WHERE ShipmentId = 9

集計を使用する場合:

UPDATE Shipments SET DetailAggregate = '    {
      "table_name": "ShipmentDetail",
      "rows": [
        {
          "shipmentId": "9",
          "productId": "7",
          "quantity": "1"
        }
      ]
    }
'  WHERE ShipmentId = 21

DELETE

Shipments を削除するには、ShipmentId を指定します。

DELETE FROM Shipments WHERE ShipmentId = 4

Bulk DELETE


INSERT INTO Shipments#TEMP (ShipmentId) VALUES (2)
INSERT INTO Shipments#TEMP (ShipmentId) VALUES (3)
DELETE FROM Shipments WHERE EXISTS SELECT ShipmentId FROM Shipments#TEMP

Columns

Name Type ReadOnly References Description
ShipmentId [KEY] Integer False

ShipmentStoreId Integer False

RecipientType Integer False

RecipientId Integer False

RecipientName String False

ShipmentDivision String False

ShipmentDate Date False

Memo String False

Status Integer False

ApprovalStatus Integer False

ApprovalDateTime Datetime True

IdentificationNo String False

Modified Datetime True

Token String False

DetailAggregate String False

A JSON aggregate of details associated with the shipment.

Copyright (c) 2026 CData Software, Inc. - All rights reserved.
Build 26.0.9770