User Tools

Site Tools


en:api_po_receive

Purchase Order Receive

API to submit Purchase Receive. Supported methods are GET, PUT, POST, DELETE.

url: ~/purchase_receive

JSON Schema

Other reference json schema: object_document, object_style

{
  "$id": "https://www.igarment.net/schema/json/v1-0/purchase-receive.json",
  "Title": "Purchase Receive Notice",
  "type": "object",
  "properties": {
      "reference":        { "$ref": "object-document.json#/$defs/reference" },
      "purchase_order":   { "type": "string" },
      "material_class":   { "type": "string" },
      "material_code":    { "type": "string" },
      "permission_entry": { "type": "string" },
      "redirect_to":      { "type": "string" },
      "warehouse":        { "type": "string" }, // directly received to factory, warehouse should be blank
      "lot_no":           { "type": "string" }, // default purchase order no:item no
      "lot_ref":          { "type": "string" },
      "userdefs":         { "$ref": "object-document.json#/$defs/userdefs" },
      "qty_unit":         { "type": "string" },
      "qty":              { "type": "number" },
      "ata_date":         { "type": "string", "format": "date" },
      "remark":           { "type": "string" },
      "assortments":      { "$ref": "object-variance.json#/$defs/assortment" },  // color & size should not be repeat
        "distributions":    { "$ref": "object-variance.json#/$defs/distribution" } // color & size should not be repeat
  }
}

Example

GET ~/purchase_receive/00001/PO220824-0002/00/00-0001

{
  "reference": {
      "no": "PO220824-0002",
      "issue_date": "2022-08-24T00:00:00",
      "party_code": "00001"
  },
  "purchase_order": "PO22/00018",
  "warehouse": "001",
  "redirect_to": "",
  "lot_no": "PO22/00018:001",
  "lot_ref": "",
  "qty_unit": "M",
  "qty": 101.0,
  "supp_inv": "",
  "remark": "",
  "created_user": "USER",
  "last_modified_user": "USER",
  "userdefs": [],
  "material_class": "00",
  "material_code": "00-0001",
  "assortments": [
      {
          "color": "",
          "size": "",
          "qty": 100.0
      },
      {
          "color": "123:123",
          "size": "",
          "qty": 1.0
      }
  ],
  "distributions": [
      {
          "job_order": "ALLI-0015",
          "style": "FP6222CY",
          "color": "",
          "size": "",
          "qty": 80.0
      }
  ]
}
en/api_po_receive.txt · Last modified: by administrator