API to submit Sales Order. Supported methis are
GET.
url: ~/sales_order
Document Header
List or style, one per style
List of shipment, one per ship include assortment or packs
List of pack, one pack with assortment
Other reference json schema:
object_document, object_style, object_party
{
"$id": "https://www.igarment.net/schema/json/v1-0/sales-order.json",
"title": "Sales Order",
"type": "object",
"required": [ "reference", "styles" ],
"properties": {
// document header
"reference": { "$ref": "object-document.json#/$defs/reference" },
"party": { "$ref": "object-party.json#/$defs/party" },
"internal": { "$ref": "object-document.json#/$defs/internal" },
"pricing": { "$ref": "object-document.json#/$defs/pricing" },
"userdefs": { "$ref": "object-document.json#/$defs/userdefs" },
"system": { "$ref": "object-document.json#/$defs/system" },
"cutomer_po_ref": { "type": "string", "maxlength": 26 },
"customer_po_date": { "type": "string", "format": "date" },
"agent": { "type": "string", "maxlength": 5 },
"agent_commission_precent": { "type": "number" },
// list of style information in this order
"styles": {
"type": "array",
"items": {
"type": "object",
"allOf": [ { "$ref": "#/$defs/style_info" } ],
"properties": {
// assortment of article no
"articles": {
"type": "array",
"items": {
"type": "object",
"allOf": [ { "$ref": "object-variance.json#/$defs/variance" } ],
"properties": {
"article_no": { "type": "string" }
}
}
},
// list of shipping, may or may not include pack
"shipments": {
"type": "array",
"items": {
"type": "object",
"allOf": [ { "$ref": "#/$defs/ship_info" } ],
"properties": {
// assortment of ship, if has pack, no need input
"assortments": { "$ref": "object-variance.json#/$defs/assortment" },
//list of pack
"prepacks": {
"type": "object",
"properties": {
"pack_no": { "type": "integer", "exclusiveMinimum": 0 },
"pre_pack": { "type": "string" },
"buck_qty": { "type": "integer" },
"pack_assortments": { "$ref": "object-variance.json#/$defs/assortment" }
}
}
}
}
}
}
},
"required": [ "shipments" ],
"minItems": 1
}
},
"$def": {
"style_info": {
"type": "object",
"allof": [ { "$ref": "object-style.json#/$defs/style" } ],
"properties": {
"customer_style": { "type": "string", "maxLength": 24 },
"qty_unit": { "type": "string", "maxLength": 3 },
"prc_unit": { "type": "string", "maxLength": 3 },
"origin": { "type": "string", "maxLength": 3 },
"program_code": { "type": "string" }
}
},
"ship_info": {
"type": "object",
"properties": {
"ship_no": { "type": "integer", "exclusiveMinimum": 0 },
"ship_date": { "type": "string", "formate": "date" },
"ship_mode": { "type": "string" },
"port_load": { "type": "string", "maxlength": 3 },
"port_disc": { "type": "string", "maxlength": 3 },
"destination": { "type": "string", "maxlength": 3 },
"lot_ref_no": { "type": "string" },
"label": { "type": "string" },
"remark": { "type": "string" },
"userdefs": { "$ref": "object-document.json#/$defs/userdefs" },
"packing_method": {
"enum": [ 0, 1, 2, 3, 4 ]
}
}
}
}
}
document attributes: order_no, customer, iss_date, season, cur, ord_type, division, cust_po_ref, cust_po_date, status
system attributes: sys_owner, sys_create_date, sys_lm_user, sys_lm_date