サイクルカウント明細API (/cycle_count_lines)

概要

サイクルカウント明細APIを使用すると、カウントするアイテムの一覧を取得できます。 選択リストにアクセスするURLは次のとおりです。 https ://{your_instance_name}/api/cycle_count_lines

詳細については、サイクルカウントを参照してください。

アクション

動詞パスアクションDescription
GET/api/cycle_counts/:cycle_count_id/cycle_count_linesインデックスサイクルカウント明細を検索
GET/api/cycle_counts/:cycle_count_id/cycle_count_lines/:id表示サイクルカウント明細を表示
PUT/api/cycle_counts/:cycle_count_id/cycle_count_lines/:id更新/api/cycle_counts/:cycle_count_id/cycle_count_lines/:id
PATCH/api/cycle_counts/:cycle_count_id/cycle_count_lines/:id更新/api/cycle_counts/:cycle_count_id/cycle_count_lines/:id

Elements

要素説明必須一意許容値入力出力データタイプ
balance-quantity残高数量yes
decimal(30,6)
consumption-quantity消費数量単位の数量yes
yes
decimal(30,6)
作成日時CoupaがYYY-MM-DDTHH:MM:SS+HH:MMZの形式で自動的に作成しますyes
datetime
cycle-count-idサイクルカウントのCoupaの一意の識別子yes
整数
cycle-count-line-adjustmentsサイクルカウント明細の調整yes
CycleCountLineAdjustment
cycle-count-line-lots明細ロットyes
yes
CycleCountLineLot
discrepancy不一致yes
文字列
discrepancy-value不一致の値yes
decimal(30,6)
IDCoupaの一意の識別子yes
整数
inventory-balance在庫バランスyes
yes
InventoryBalance
アイテムアイテムyes
アイテム
non-voided-inventory-transactions在庫トランザクションyes
InventoryTransaction
on-hand-balanceスナップショット残高yes
文字列
order-quantity発注数量yes
yes
decimal(30,6)
quantityQuantityyes
yes
yes
decimal(30,6)
status明細のステータスyes
string(255)
uomUOMyes
数量単位
updated-atCoupaがYYY-MM-DDTHH:MM:SS+HH:MMZの形式で自動的に作成しますyes
datetime

呼び出しの例

IDで特定のサイクルカウント明細を取得するために作成できます

https ://{your_instance_name}/api/cycle_count_line? id ={id}を取得します。

出力
<?xml version="1.0" encoding="UTF-8"?> 2<cycle-count-line> 3 <id type="integer">51</id> 4 <created-at type="dateTime">2022-06-25T15:20:12-07:00</created-at> 5 <updated-at type="dateTime">2022-06-25T15:20:12-07:00</updated-at> 6 <quantity nil="true"/> 7 <discrepancy type="integer">-10</discrepancy> 8 <status>pending</status> 9 <balance-quantity nil="true"/> 10 <order-quantity nil="true"/> 11 <discrepancy-value type="decimal">-10.00</discrepancy-value> 12 <consumption-quantity nil="true"/> 13 <cycle-count-id type="integer">13</cycle-count-id> 14 <on-hand-balance type="decimal">10.0</on-hand-balance> 15 <inventory-balance> 16 <id type="integer">51</id> 17 <created-at type="dateTime">2022-06-25T15:20:12-07:00</created-at> 18 <updated-at type="dateTime">2022-06-25T15:20:12-07:00</updated-at> 19 <quantity type="decimal">10.0</quantity> 20 <allocated type="decimal">0.0</allocated> 21 <available type="decimal">10.0</available> 22 <item> 23 <id type="integer">51</id> 24 <created-at type="dateTime">2022-06-25T15:20:12-07:00</created-at> 25 <updated-at type="dateTime">2022-06-25T15:20:12-07:00</updated-at> 26 <description>This is a sample item description that the user would see.</description> 27 <item-number>xxxx2</item-number> 28 <name>Coupa Demodata Product Name 2</name> 29 <active type="boolean">true</active> 30 <storage-quantity nil="true"/> 31 <consumption-quantity nil="true"/> 32 <image-url nil="true"/> 33 <external-image-url nil="true"/> 34 <manufacturer-part-number nil="true"/> 35 <manufacturer-name nil="true"/> 36 <item-type>Item</item-type> 37 <require-inspection nil="true"/> 38 <require-asset-tag nil="true"/> 39 <use-pack-weight nil="true"/> 40 <pack-qty nil="true"/> 41 <pack-weight nil="true"/> 42 <pack-uom-id nil="true"/> 43 <receive-catch-weight nil="true"/> 44 <allow-partial-quantity type="boolean">false</allow-partial-quantity> 45 <inventory-lot-tracking-enabled type="boolean">false</inventory-lot-tracking-enabled> 46 <inventory-lot-expiration-type>Not Required</inventory-lot-expiration-type> 47 <reorder-alerts type="array"/> 48 <commodity nil="true"/> 49 <receiving-form nil="true"/> 50 <uom> 51 <id type="integer">1</id> 52 <created-at type="dateTime">2022-06-25T14:01:05-07:00</created-at> 53 <updated-at type="dateTime">2022-06-25T14:01:05-07:00</updated-at> 54 <code>EA</code> 55 <name>Each</name> 56 <allowable-precision type="integer">0</allowable-precision> 57 <active type="boolean">true</active> 58 </uom> 59 <storage-uom nil="true"/> 60 <consumption-uom nil="true"/> 61 <tax-detail nil="true"/> 62 <updated-by> 63 <id type="integer">26</id> 64 <login>test_user1</login> 65 <employee-number nil="true"/> 66 <firstname>test1</firstname> 67 <lastname>user1</lastname> 68 <fullname>test1 user1</fullname> 69 <email>test_user1@coupa.com</email> 70 <salesforce-id nil="true"/> 71 <avatar-thumb-url nil="true"/> 72 </updated-by> 73 </item> 74 <warehouse> 75 <id type="integer">11</id> 76 <created-at type="dateTime">2022-06-25T15:20:12-07:00</created-at> 77 <updated-at type="dateTime">2022-06-25T15:20:12-07:00</updated-at> 78 <active-flag type="boolean">true</active-flag> 79 <description>Description of warehouse 1</description> 80 <name>Warehouse 1</name> 81 <currency> 82 <id type="integer">1</id> 83 <code>USD</code> 84 <decimals type="integer">2</decimals> 85 </currency> 86 <address> 87 <id type="integer">11</id> 88 <created-at type="dateTime">2022-06-25T15:20:11-07:00</created-at> 89 <updated-at type="dateTime">2022-06-25T15:20:11-07:00</updated-at> 90 <name nil="true"/> 91 <location-code nil="true"/> 92 <street1>1 Anywhere</street1> 93 <street2 nil="true"/> 94 <city>Oakland</city> 95 <state nil="true"/> 96 <postal-code>94607</postal-code> 97 <attention nil="true"/> 98 <active type="boolean">true</active> 99 <business-group-name nil="true"/> 100 <vat-number>VAT-456</vat-number> 101 <local-tax-number></local-tax-number> 102 <type nil="true"/> 103 <country> 104 <id type="integer">223</id> 105 <code>US</code> 106 <name>United States</name> 107 </country> 108 <vat-country> 109 <id type="integer">223</id> 110 <code>US</code> 111 <name>United States</name> 112 </vat-country> 113 </address> 114 <warehouse-type> 115 <id type="integer">11</id> 116 <created-at type="dateTime">2022-06-25T15:20:11-07:00</created-at> 117 <updated-at type="dateTime">2022-06-25T15:20:11-07:00</updated-at> 118 <name>Warehouse Type 1</name> 119 <description>Description for warehouse type 1</description> 120 </warehouse-type> 121 <warehouse-locations type="array"> 122 <warehouse-location> 123 <id type="integer">21</id> 124 <created-at type="dateTime">2022-06-25T15:20:12-07:00</created-at> 125 <updated-at type="dateTime">2022-06-25T15:20:12-07:00</updated-at> 126 <aisle>1</aisle> 127 <bin>1</bin> 128 <level>1</level> 129 <warehouse-id type="integer">11</warehouse-id> 130 <warehouse-name>Warehouse 1</warehouse-name> 131 </warehouse-location> 132 <warehouse-location> 133 <id type="integer">22</id> 134 <created-at type="dateTime">2022-06-25T15:20:12-07:00</created-at> 135 <updated-at type="dateTime">2022-06-25T15:20:12-07:00</updated-at> 136 <aisle>A001</aisle> 137 <bin>0001</bin> 138 <level>L001</level> 139 <warehouse-id type="integer">11</warehouse-id> 140 <warehouse-name>Warehouse 1</warehouse-name> 141 </warehouse-location> 142 </warehouse-locations> 143 </warehouse> 144 <warehouse-location> 145 <id type="integer">21</id> 146 <created-at type="dateTime">2022-06-25T15:20:12-07:00</created-at> 147 <updated-at type="dateTime">2022-06-25T15:20:12-07:00</updated-at> 148 <aisle>1</aisle> 149 <bin>1</bin> 150 <level>1</level> 151 <warehouse-id type="integer">11</warehouse-id> 152 <warehouse-name>Warehouse 1</warehouse-name> 153 </warehouse-location> 154 <uom> 155 <id type="integer">1</id> 156 <created-at type="dateTime">2022-06-25T14:01:05-07:00</created-at> 157 <updated-at type="dateTime">2022-06-25T14:01:05-07:00</updated-at> 158 <code>EA</code> 159 <name>Each</name> 160 <allowable-precision type="integer">0</allowable-precision> 161 <active type="boolean">true</active> 162 </uom> 163 <inventory-valuations type="array"> 164 <inventory-valuation> 165 <id type="integer">51</id> 166 <created-at type="dateTime">2022-06-25T15:20:12-07:00</created-at> 167 <updated-at type="dateTime">2022-06-25T15:20:12-07:00</updated-at> 168 <unit-price type="decimal">1.00</unit-price> 169 <total type="decimal">10.00</total> 170 <currency> 171 <id type="integer">1</id> 172 <code>USD</code> 173 <decimals type="integer">2</decimals> 174 </currency> 175 </inventory-valuation> 176 </inventory-valuations> 177 </inventory-balance> 178 <item> 179 <id type="integer">51</id> 180 <created-at type="dateTime">2022-06-25T15:20:12-07:00</created-at> 181 <updated-at type="dateTime">2022-06-25T15:20:12-07:00</updated-at> 182 <description>This is a sample item description that the user would see.</description> 183 <item-number>xxxx2</item-number> 184 <name>Coupa Demodata Product Name 2</name> 185 <active type="boolean">true</active> 186 <storage-quantity nil="true"/> 187 <consumption-quantity nil="true"/> 188 <image-url nil="true"/> 189 <external-image-url nil="true"/> 190 <manufacturer-part-number nil="true"/> 191 <manufacturer-name nil="true"/> 192 <item-type>Item</item-type> 193 <require-inspection nil="true"/> 194 <require-asset-tag nil="true"/> 195 <use-pack-weight nil="true"/> 196 <pack-qty nil="true"/> 197 <pack-weight nil="true"/> 198 <pack-uom-id nil="true"/> 199 <receive-catch-weight nil="true"/> 200 <allow-partial-quantity type="boolean">false</allow-partial-quantity> 201 <inventory-lot-tracking-enabled type="boolean">false</inventory-lot-tracking-enabled> 202 <inventory-lot-expiration-type>Not Required</inventory-lot-expiration-type> 203 <reorder-alerts type="array"/> 204 <commodity nil="true"/> 205 <receiving-form nil="true"/> 206 <uom> 207 <id type="integer">1</id> 208 <created-at type="dateTime">2022-06-25T14:01:05-07:00</created-at> 209 <updated-at type="dateTime">2022-06-25T14:01:05-07:00</updated-at> 210 <code>EA</code> 211 <name>Each</name> 212 <allowable-precision type="integer">0</allowable-precision> 213 <active type="boolean">true</active> 214 </uom> 215 <storage-uom nil="true"/> 216 <consumption-uom nil="true"/> 217 <tax-detail nil="true"/> 218 <updated-by> 219 <id type="integer">26</id> 220 <login>test_user1</login> 221 <employee-number nil="true"/> 222 <firstname>test1</firstname> 223 <lastname>user1</lastname> 224 <fullname>test1 user1</fullname> 225 <email>test_user1@coupa.com</email> 226 <salesforce-id nil="true"/> 227 <avatar-thumb-url nil="true"/> 228 </updated-by> 229 </item> 230 <uom> 231 <id type="integer">1</id> 232 <created-at type="dateTime">2022-06-25T14:01:05-07:00</created-at> 233 <updated-at type="dateTime">2022-06-25T14:01:05-07:00</updated-at> 234 <code>EA</code> 235 <name>Each</name> 236 <allowable-precision type="integer">0</allowable-precision> 237 <active type="boolean">true</active> 238 </uom> 239 <cycle-count-line-adjustments type="array"/> 240 <non-voided-inventory-transactions type="array"/> 241 <cycle-count-line-lots type="array"/> 242</cycle-count-line>

ペイロード

XML:

ロット項目のないシンプルなライン
<?xml version="1.0" encoding="UTF-8"?> <cycle-count-line> <id type="integer">#{cycle_count_line.id}</id> <quantity type="integer">100</quantity> </cycle-count-line>
ロットアイテムを含む行、マルチUOMなし:
<?xml version="1.0" encoding="UTF-8"?> <cycle-count-line> <id type="integer">12</id> <cycle-count-line-lots type="array"> <cycle-count-line-lot> <quantity type="integer">10</quantity> <inventory-lot-id type="integer">#{balance_lot2.inventory_lot.id}</inventory-lot-id> </cycle-count-line-lot> <cycle-count-line-lot> <quantity type="integer">10</quantity> <inventory-lot-number >#{balance_lot1.inventory_lot.number}</inventory-lot-number> </cycle-count-line-lot> </cycle-count-line-lots> </cycle-count-line>
マルチUOMアイテムのライン
<?xml version="1.0" encoding="UTF-8"?> <cycle-count-line> <id type="integer">#{multi_uom_line.id}</id> <order-quantity type="integer">10</order-quantity> <consumption-quantity type="integer">10</consumption-quantity> </cycle-count-line>
ロット付きマルチUOM
<?xml version="1.0" encoding="UTF-8"?> <cycle-count-line> <id type="integer">21</id> <cycle-count-line-lots type="array"> <cycle-count-line-lot> <order-quantity type="integer">10</order-quantity> <consumption-quantity type="integer">10</consumption-quantity> <inventory-lot-id type="integer">12</inventory-lot-id> </cycle-count-line-lot> <cycle-count-line-lot> <order-quantity type="integer">10</order-quantity> <consumption-quantity type="integer">10</consumption-quantity> <inventory-lot-number >EXISTING_LOT_NUMBER</inventory-lot-number> </cycle-count-line-lot> </cycle-count-line-lots> </cycle-count-line>

JSON:

シンプルなライン
{" id ": #{cycle_count_line.id}," quantity ": 100}

ロット付きのシンプルな明細:
{" id ": #{cycle_count_line.id}," cycle_count_line_lots ":[{" quantity ": 10 ," inventory_lot_id ":"#{balance_lot.inventory_lot.id}"},{" quantity ": 10 ," inventory_lot_number ":"#{balance_lot.inventory_lot.number}"}]}

マルチユームアイテムのライン:
{" id ": #{multi_uom_line.id}," order_quantity ": 10 ," consumption_quantity ": 10}

マルチユームアイテムとロットサポートのライン:
{" id ": 12 ," cycle_count_line_lots ":[{" order_quantity ": 10 ," consumption_quantity ": 10 ," inventory_lot_id ":' existing - lot - id '},{" order_quantity ": 10 ," consumption_quantity ": 10 ," inventory_lot_number ":" existing - lot - number }"}]}