API to submit Issue Document. Supported methis are
GET, POST.
url: ~/issue_doc
Document header
list of material, per material is related with stock
list of allocation
document attributes: iss_doc_ref, send_to, delivery_date, type, status
shipping attributes: eta_date, ship_term
system attributes: sys_owner, sys_create_date, sys_lm_user, sys_lm_date
Other reference json schema:
object_document, object_style
{
"$id": "https://www.igarment.net/schema/json/v1-0/issue-doc.json",
"title": "Issue Document",
"type": "object",
"required": [ "reference", "type", "status" ],
"properties": {
"reference": { "$ref": "object-document.json#/$defs/reference" },
"type": { "enum": [ "T", "I", "R" ] },
"eta_date": { "type": "string", "format": "date" },
"ship_to_address": { "type": "string" },
"ship_method": { "type": "string" },
"delivery_note": { "type": "string" },
"status": { "enum": [ "", "S", "C" ] },
"system": { "$ref": "object-document.json#/$defs/system" },
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
// list of the document, per is from stock
"material_class": { "type": "string" },
"material_code": { "type": "string" },
"warehouse": { "type": "string" },
"lot_no": { "type": "string" },
"lot_ref": { "type": "string" },
"qty_unit": { "type": "string" },
"remark": { "type": "string" },
"assortments": { "$ref": "object-variance.json#/$defs/assortment" },
"distributions": {
"type": "array",
"items": {
"oneof": [ { "$ref": "object-variance.json#/$defs/variance" } ],
"type": "object",
"properties": {
"job_order": { "type": "string" },
"style": { "type": "string" },
"work_order_no": { "type": "string" },
"qty": { "type": "number" }
}
}
}
}
},
"required":[ "material_class", "material_code", "warehouse", "lot_no" ],
"minItems": 1
}
}
}
GET: ~/issue_doc/ISS-23-0144
{
"reference": {
"no": "document no",
"issue_date": "YYYY-MM-DD",
"party_code": "factory code defined in our system"
},
"type": "I --- issue, T --- transfer, R --- issue return",
"eta_date": "Expected arrive date, require format YYYY-MM-DD",
"ship_to_address": "delivery address",
"ship_method": "",
"delivery_note": "",
"status": " -- prepare, S --- shipped, C --- complete",
"system": {
"owner": "user code in our system",
"created_user": "user code in our system",
"created_date": "YYYY-MM-DDTHHThh:mm:ss",
"last_modified_user": "user code in our system",
"last_modified_date": "YYYY-MM-DDTHHThh:mm:ss"
},
"items": [
{
"material_class": "material class code in our system",
"material_code": "material code in our system",
"qty_unit": "unit code in our system",
"remark": "",
"lot_no": "purchase order no: itemno, should be same with stock no",
"warehouse": "warehouse code in our system",
"lot_ref": "",
"assortments": [
{
"color": "material color",
"size": "material size",
"qty": issue qty
},
...
],
"distributions": [
{
"color": "material color",
"size": "material size",
"job_order": "job order no",
"style": "job order style",
"qty": allocated qty,
"work_order_no": "workorderno:ext_no, if it is issued by work order"
},
...
]
},
...
]
}