iVendNextDevelopers Request a sandbox

Material Request

A store's request for goods, to be bought or moved from another store.

Area: Stock and stores · Why it is here: retail core · Fields: 22 · Submitted (booked) records: send docstatus: 1 to book it as you create it, or submit a draft with submit.

Read and write it

Every call runs as your app's own user, with its key in one header, at the retailer's own address. The user reads and writes only what its role allows: your app's user, and the rights the retailer gives it.

Read a list (only name unless you ask for fields):

curl -s "https://⟨site⟩/api/resource/Material%20Request?fields=%5B%22*%22%5D&limit_page_length=20" \
  -H "Authorization: token ⟨api key⟩:⟨api secret⟩"

Read one, with its tables:

curl -s "https://⟨site⟩/api/resource/Material%20Request/⟨name⟩" -H "Authorization: token ⟨api key⟩:⟨api secret⟩"

Create one (the required fields first), if your app's role may:

curl -s -X POST "https://⟨site⟩/api/resource/Material%20Request" -H "Authorization: token ⟨api key⟩:⟨api secret⟩" \
  -H "Content-Type: application/json" -d '{"naming_series": …, "material_request_type": …, "company": …, "transaction_date": …, "items": …}'

Change one with PUT /api/resource/Material%20Request/⟨name⟩ and the fields you change; a table sent there replaces its rows, so send its existing rows too. All the record calls and their answers: the API reference.

Samples that use it

s27_stock_alerts

Fields

Read from the product at POS 2.1.0.667 (till app 60147699c): its own fields, the fields iVendNext adds to it, and iVendNext's changes to any of them. Read-only fields are set by iVendNext; a hidden one is not on the form but can be read. Every record also has name (its id, in the address), owner, creation, modified, modified_by and docstatus (0 a draft, 1 submitted, 2 cancelled), all read-only.

Field Field name Type Required Read-only Hidden Links to
Series naming_series Select yes one of: MAT-MR-.YYYY.-
Title title Data yes
Purpose material_request_type Select yes one of: Purchase, Material Transfer, Material Issue, Manufacture, Customer Provided
Customer customer Link Customer
Company company Link yes Company
Transaction Date transaction_date Date yes
Required By schedule_date Date
Amended From amended_from Link yes Material Request
Scan Barcode scan_barcode Data
Set Source Warehouse set_from_warehouse Link Warehouse
Set Target Warehouse set_warehouse Link Warehouse
Items items Table yes Material Request Item
Terms tc_name Link Terms and Conditions
Terms and Conditions Content terms Text Editor
Status status Select yes one of: Draft, Submitted, Stopped, Cancelled, Pending, Partially Ordered, Partially Received, Ordered, Issued, Transferred, Received
% Ordered per_ordered Percent yes
Transfer Status transfer_status Select yes one of: Not Started, In Transit, Completed
% Received per_received Percent yes
Letter Head letter_head Link Letter Head
Print Heading select_print_heading Link Print Heading
Job Card job_card Link yes Job Card
Work Order work_order Link yes Work Order

Table: Material Request Item

The rows of items. Each row also has idx (its place), parent, parentfield and parenttype.

Field Field name Type Required Read-only Hidden Links to
Item Code item_code Link yes Item
Item Name item_name Data
Required By schedule_date Date yes
Description description Text Editor
Item Group item_group Link yes Item Group
Brand brand Link yes Brand
Image image Attach Image yes
Quantity qty Float yes
Stock UOM stock_uom Link yes yes UOM
Source Warehouse from_warehouse Link Warehouse
Target Warehouse warehouse Link Warehouse
UOM uom Link yes UOM
UOM Conversion Factor conversion_factor Float yes
Stock Qty stock_qty Float yes
Min Order Qty min_order_qty Float yes
Projected Qty projected_qty Float yes
Actual Qty actual_qty Float yes
Completed Qty ordered_qty Float yes
Received Qty received_qty Float yes
Rate rate Currency
Price List Rate price_list_rate Currency yes yes
Amount amount Currency yes
Expense Account expense_account Link Account
WIP Composite Asset wip_composite_asset Link Asset
Manufacturer manufacturer Link Manufacturer
Manufacturer Part Number manufacturer_part_no Data yes
BOM No bom_no Link BOM
Project project Link Project
Cost Center cost_center Link Cost Center
Lead Time Date lead_time_date Date yes
Sales Order sales_order Link yes Sales Order
Sales Order Item sales_order_item Data yes yes
Production Plan production_plan Link yes Production Plan
Material Request Plan Item material_request_plan_item Data yes
Job Card Item job_card_item Data yes
Page Break page_break Check

All record types · What you can use

This record type in the kit