User Tools

Site Tools


en:api_docstatus

This is an old revision of the document!


Table of Contents

Document status

API to submit Document Status. Supported methods are GET, PUT.

Note: this API has some details need to improve.

url: ~/document_status/<document_type>

JSON Schema

Other reference json schema: object_document

{
  "$id": "https://www.igarment.net/schema/json/v1-0/document_status",
  "title": "Document Status",
  "type": "object",
  "properties": {
      "reference": {
          "type": "object",
          "properties": {
            "type":     { "enum": [ "purchase_order", "sales_order", "work_order" ] }, // document type
            "order_no": { "type": "string" }                              // document no
          }
      },
      "status": {
          "$ref": "object-document.json#/$defs/status"
      }
  }

}

Example

PUT: ~/jdoc/document_status/purchase_order/FPO%2F00190

1. Set status = confirmed

{
  "reference": {
      "order_no": "FPO/00190",
      "type": "purchase_order"
  },
  "status": {
      "status_date": "2024-11-22T00:00:00",
      "status_remark": "",
      "status_by": "USER",
      "status_code": "confirmed"
  }
}

2. Clear status

{
  "reference": {
      "order_no": "FPO/00190",
      "type": "purchase_order"
  },
  "status": {}
}
en/api_docstatus.1780641389.txt.gzip · Last modified: by administrator