Request Interface Web Service methods are used to implement UPI requests within WebTMA. The service uses JSON-formatted request and response messages to exchange data. All of the methods shown below use POST process to send and/or receive data to/from WebTMA.
The following documentation assumes you know the existing rules for UPI. This is merely a new source / destination for the data, otherwise all existing UPI rules apply.
In each call to either an Import or Export method, the correct Universal Interface Template Code for the corresponding transaction is required ("UISetupCode").
Authenticate JSON
This service method is used to generate an authentication token for use with the other service methods. The POST request must include a Content-Type header of “application/json”.
POST URL:
https://www.webtma.com/UIService/webservice/RequestInterface.svc/AuthenticateJson
REQUEST FORMAT:
{
"Username" : "user name",
"Password" : "password",
"Client" : "login client name"
}
RESPONSE Format:
{
"Success" : true,
"Message" : "User Authenticated.",
"Token" : "KU%2b7j2Lno92o%2bJ3J7IgvBKlnSzMpAuHh2NAqFWgnYytcyknP7ou5OP3O%2bxOVGEOV%2fkaE%2fqFvIM9cdXecfPeeu1%2broPnF",
"ExpDate" : "\/Date(1542814039490)\/"
}
Purchase Order Import
This service method is used to import Purchase Orders into WebTMA. The POST request must include a Content-Type header of “application/json” and a TMAAuth HTTP header with a valid authentication token from the Authenticate method.
POST URL:
https://www.webtma.com/UIService/webservice/RequestInterface.svc/UPIPurchaseOrderImport
REQUEST FORMAT:
{
"UISetupCode":"WSPO",
"PurchaseOrderList":[
{
"PurchaseOrderNumber":"XXXX",
"PurchaseOrderDate":"2020-09-09T00:00:00",
"VendorCode":"Home Depot",
"PurchaseOrderTypeCode":"GEN",
"PurchaseOrderTypeDescription":null,
"RequestorName":"John Smith",
"RequestorPhoneNumber":"818-897-6603",
"Email":"value",
"DepartmentCode":"TJS-DP",
"RepairCenterCode":"PP",
"Status":"value",
"CEARNumber": null,
"WarehouseCode":"Centrl",
"ProjectNumber": null,
"TaxName":"TJS",
"TaxRate": “10.0”,
"TaxRate2": null,
"Attention": null,
"Blanket": true,
"BlanketOrderLimit": null,
"IsClosed": false,
"PurchaseOrderComment": "value",
"ShipToDeliveryNote": "value",
"FreightAmount": “7.5”,
"PromiseDate": “01-01-2022”,
"Invoiced": “true”,
"TrackingNumber":"value",
"ShipMethod": "value",
"DateRequired":"2021-01-01T00:00:00",
"TechnicianID": "109",
"LineNumber": “1”,
"ItemCode": "value",
"ItemDescription": "value",
"LineQuantity": “10”,
"UnitCost": “12.0”,
"UnitOfMeasure": "value",
"AccountNumber":"A100-B100-C100-D100",
"IsTaxable": “false”,
"PreviouslyReceived": “0.0”,
"OTPTypeCode": "OTP",
"ChargeTypeCode": "C",
"LineComment": "value",
"ForeignDistribNumber": null,
"ForeignLineNumber": null,
"WorkOrderNumber" : "Base-10001",
"WorkOrderTaskCode": "12001",
"DistributionAccountNumber": "",
"DistributionQuantity": “1.0”,
"DistributionEmail":"value",
"DistributionComment": "value",
"PurchaseRequisitionNumber": "152626",
"DistributionNoCharge": “false”,
"UdfValues": [
{
"Name":"What is Purchase Order?",
Value":"XXX"},
{
"Name":"UDF More",
"Value":"XXX"
}
]
}
RESPONSE FORMAT:
{
"ErrorCode" : null,
"ErrorMessage" : null,
"Success" : true
}
Want to Know More?
Visit the WebTMA Help Page