Purchase Order Import
This document provides detailed instructions for filling out the Purchase Order CSV import templates based on the actual system implementation and V3 API specifications.
Overview​
The PO Import system supports CSV file uploads that get processed into JSON format for the V3 Purchase Orders API. Each CSV row represents one line item with its packaging details, and multiple rows can belong to the same Purchase Order (grouped by po_uid
).
Template Types Available​
- Items Template: For finished goods and products (entity_type: "item")
- Materials Template: For raw materials and components (entity_type: "material")
Field Specifications​
PO-Level Fields Details​
Same for both Items and Materials templates - use the table above for guidance.
Field Name | Required? | What to Enter | Example |
---|---|---|---|
custom_id | Required | Your original PO number from your system | opo_123 |
uid | Required | Unique identifier for this PO | abc-def-123-456 |
po_number | Required | PO number to store in Inspectorio (min 1 char) | PO-250901 |
po_type | Optional | Purchase order type from pre-configured list | po_type_1 |
po_source | Optional | Source of materials (domestic/international) | domestic |
po_status | Optional | Status (only "canceled" is supported) | canceled |
created_date | Optional | Creation date from your system (YYYY-MM-DD) | 2023-02-10 |
updated_date | Optional | Last updated date (YYYY-MM-DDTHH:MM:SSZ) | 2019-02-20T06:37:18Z |
delivery_date | Optional | Delivery/shipment start date (YYYY-MM-DD) | 2021-05-23 |
ship_end_date | Optional | Shipment end date (YYYY-MM-DDTHH:MM:SSZ) | 2021-05-30T00:00:00Z |
in_store_date | Optional | In store date (YYYY-MM-DDTHH:MM:SSZ) | 2021-06-01T00:00:00Z |
event_name | Optional | Corresponding event name from your system | Event 1 |
client_id | Optional | Local Custom ID of Brand/Retailer organization | client_1 |
factory_custom_id | Optional | Local Custom ID of Factory organization | factory_1 |
vendor_custom_id | Optional | Local Custom ID of Supplier organization (min 1 char) | vendor_1 |
commit_id | Optional | Commit ID of the purchase order | commit_id_1 |
commit_po_sequence | Optional | Commit PO sequence | commit_po_sequence_1 |
total_cost | Optional | Total PO cost (decimal with max 10 digits, 2 decimal places) | 2500.00 |
share_to_ids | Optional | Semicolon-separated shared organization IDs | sub_org_1;sub_org_2 |
Items Template - Field Guide​
Line Item Details​
Add one row for each item in your Purchase Order. Each line represents one item with its details.
Field Name | Required? | What to Enter | Example |
---|---|---|---|
line_item_custom_id | Required | Custom identifier for the product/item | item_123 |
line_item_entity_type | Required | Must be "item" for items template | item |
line_style_id | Optional | Style identifier | style_123 |
line_style_name | Optional | Style name/description | Classic T-Shirt |
line_product_category_id | Optional | Custom ID of product category | cat_123 |
line_product_line_id | Optional | Custom ID of product line | line_123 |
line_department_id | Optional | Custom ID of department | dept_123 |
line_class_id | Optional | Custom ID of class category | class_123 |
line_brand_id | Optional | Custom ID of brand category | brand_123 |
line_color | Conditional* | Item color (required for new items) | Blue |
line_size | Conditional* | Item size (required for new items) | M |
unit_cost | Optional | Cost per unit (decimal) | 12.50 |
shipment_term | Optional | Shipping terms | DDP |
quantity | Optional | Quantity ordered (min 1) | 100 |
Items Packaging Details​
Each Purchase Order must have at least one packaging detail. Choose between solid or assortment packaging.
Field Name | Required? | What to Enter | Example |
---|---|---|---|
packaging_type | Required | "solid" for single items or "assortment" for mixed packs | solid |
carton_quantity | Required | Number of cartons/boxes (min 1) | 20 |
assortment_id | Conditional* | Assortment ID (**required for assortment type) | assort_123 |
packaging_item_custom_id | Conditional* | Item custom ID (***required for solid type) | item_123 |
packaging_item_entity_type | Conditional* | Must be "item" (***required for solid type) | item |
case_pack_quantity | Conditional* | Units per carton (***required for solid type) | 5 |
Tips for Items Template:
- If your item already exists in the system, you may only need custom_id and entity_type
- For new items, include color and size for better identification
- Each PO must have at least one line and one packaging detail
- Use "solid" packaging for individual items, "assortment" for mixed packs
Materials Template - Field Guide​
Purchase Order Information​
Same as Items template - use the table above for guidance.
Material Line Details​
Add one row for each material in your Purchase Order. Materials use "material" as entity_type.
Field Name | Required? | What to Enter | Example |
---|---|---|---|
line_item_custom_id | Required | Custom identifier for the material | cotton_001 |
line_item_entity_type | Required | Must be "material" for materials template | material |
line_style_id | Optional | Leave empty for materials | |
line_style_name | Optional | Material name/description | Organic Cotton |
line_product_category_id | Optional | Custom ID of material category | fabric_cotton |
line_product_line_id | Optional | Custom ID of material line | textiles |
line_department_id | Optional | Custom ID of department | dept_123 |
line_class_id | Optional | Custom ID of material class | class_123 |
line_brand_id | Optional | Custom ID of material brand | brand_123 |
line_color | Optional | Material color (optional for materials) | Blue |
line_size | Optional | Material specification (optional) | M |
unit_cost | Optional | Cost per unit (decimal) | 12.50 |
shipment_term | Optional | Shipping terms | EXW |
quantity | Optional | Quantity ordered (min 1) | 100 |
Material Packaging Details​
Same structure as items packaging, but adapted for materials:
Field Name | Required? | What to Enter | Example |
---|---|---|---|
packaging_type | Required | "solid" for single materials or "assortment" for mixed | solid |
carton_quantity | Required | Number of packages/containers (min 1) | 50 |
packaging_item_custom_id | Conditional* | Material custom ID (*for solid type) | cotton_001 |
packaging_item_entity_type | Conditional* | Must be "material" (*for solid type) | material |
case_pack_quantity | Conditional* | Units per package (*for solid type) | 20 |
Tips for Materials Template:
- Materials don't require color and size (unlike items where they're conditional)
- Leave style_id empty for materials
- Use material-specific naming: cotton_001, fabric_cotton, textiles, etc.
- Focus on material specifications rather than style attributes
Additional Attributes (Optional)​
You can add custom attributes to your Purchase Order using key-value pairs:
Field Name | Required? | What to Enter | Example |
---|---|---|---|
additional_attr_1_key | Optional | The identifier of the attribute | attribute_1 |
additional_attr_1_value | Optional | The value (can be string, number, or array) | value_1 or 123 |