Skip to end of metadata
Go to start of metadata

The GUID in these calls should be obtained from Login API


Endpoint URL

Based URL address depends on domain address on which the backend is deployed

Method

URL

POST{base url}/api/Document/SaveDocument

Query parameters

Type

Params

Values

HEADERGuid{GUID obtained from login call}
BODYDocumentTypecheck document type below
BODYcustomerId/supplierIddepends on what type of document select supplier id or client id should be given
BODYincidentTypeIdid of the incident type
BODYworkflowIdid of the workflow
BODYorderDateDate of the order
BODYattachedFilesarray of the attachments
BODYdetailLinesarray of the detail lines
BODYlineTypeline type of the line provided below
BODYglAccountId/inventoryItemIdAccountId if the line type is glAccount and inventoryItemId if line type is stk item
BODYdescriptiondescription of the line
BODYpriceprice of the line
BODYquantityquantity of the line
BODYtaxIdtax id of the line





Line type
GLAccount = 0
StkItem = 1
Document type
Purchase Order = 0
Cash Advance = 1
Expense Claim = 2
Return To Supplier = 3
Sales Order = 4
Credit Note = 7
Sales Order Quotation = 8


Example requests

https://backend/api/Document/SaveDocument

body call:

{
  "documentType"4,
  "customerId"5,
  "delMethodId"0,
  "incidentTypeID"7,
  "workflowId"5,
  "orderDate""2021-10-21T14:20:32.343Z",
  "attachedFiles": [],
  "detailLines": [
    {
      "lineType"0,
      "gLAccountId"1187,
      "description""DC - Delivery charges",  
      "price"1000,
      "quantity"1,
      "confirmedQty"1,
      "taxId"1,
      "projectId"1
    }
  ]
}

Example responses:


{
    "id"656,
    "message""new document saved id = 656",
    "orderNum""SO0029"
}

  • No labels