User Tools

Site Tools


webapi_swagger_documentation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
webapi_swagger_documentation [2020/05/06 13:43]
kevin
webapi_swagger_documentation [2020/05/25 11:25] (current)
kevin
Line 59: Line 59:
 ===== Known Limitations ===== ===== Known Limitations =====
  
-Prior to 6.2.2.175 released versions of the Web API had a maximum limit of 32 concurrent connections. This limit has been removed and is now limited by how much available memory (max 4GB as this is a 32 bit service) running the API. +Prior to 6.2.2.175 released versions of the Web API had a maximum limit of 32 concurrent connections. This limit has been removed and is now limited by how much available memory (max 4GB as this is a 32-bit service) running the API.
- +
-<note tip> +
-Due to the JSON parser that the Windward Web API uses, any '​%'​ characters inside of JSON strings can cause internal server errors. ​ The best practice is to scrub your JSON passed of these characters. +
-</​note>​+
  
 ===== Retrieving The Documentation ===== ===== Retrieving The Documentation =====
Line 122: Line 118:
 ===== What Version are you using? ===== ===== What Version are you using? =====
 Depending on the feature you may be looking for in an endpoint you may need to know what version you are running. ​ Depending on the feature you may be looking for in an endpoint you may need to know what version you are running. ​
- It is not uncommon ​to have a training and production WebAPI configured when testing new features. ​ Assuming the API is running and you are authenticated,​ you can access the application version using the TServerMethodsWebAPI and the Connect endpoint.+ It is common ​to have a training and production WebAPI configured when testing new features. ​ Assuming the API is running and you are authenticated,​ you can access the application version using the TServerMethodsWebAPI and the Connect endpoint.
   * http://​API_IP_ADDRESS:​API_PORT/​Windward/​WebAPI/​TServerMethodsWebAPI/​Connect   * http://​API_IP_ADDRESS:​API_PORT/​Windward/​WebAPI/​TServerMethodsWebAPI/​Connect
  
Line 227: Line 223:
 ===== Beta 6.2.7.x History ===== ===== Beta 6.2.7.x History =====
 There can be functionality available in our beta that will not be present in our released product. ​ Typically new enhancement work is completed in this release. There can be functionality available in our beta that will not be present in our released product. ​ Typically new enhancement work is completed in this release.
 +
   * Version 6.2.7.562 – April 28, 2020   * Version 6.2.7.562 – April 28, 2020
-    * [ TFS 34807 ] Fix for /​AddInventory endpoint in S5webapi not updating list price.+    * [ TFS 34807 ] Fix for /​AddInventory endpoint in S5webapi not updating list price. ​(Beta only)
   * Version 6.2.7.530 – March 25, 2020   * Version 6.2.7.530 – March 25, 2020
     * [ TFS 33670 / 58200 ] Web API Fix: eCommerceExport=Y filter was not working for /​InventoryChanges method     * [ TFS 33670 / 58200 ] Web API Fix: eCommerceExport=Y filter was not working for /​InventoryChanges method
Line 276: Line 273:
     * [56999] Added pagination to the Inventory, Virtual Inventory, Customer and A/P Bill endpoints to eliminate calls that exceed the maximum number of records that the S5WebAPISvc can handle.     * [56999] Added pagination to the Inventory, Virtual Inventory, Customer and A/P Bill endpoints to eliminate calls that exceed the maximum number of records that the S5WebAPISvc can handle.
  
-===== Troubleshooting ​=====+===== Common Errors/​Issues ​===== 
 + 
 +** Getting POS Failure! {"​error":"​Assertion failure (R:​\system5\projects\prgs\FullInvoice.pas,​ line 50886)"​} when pushing an order through WEB API .** 
 + 
 +Reasons :  
 +The JSON that is being used is invalid.  
 + 
 +Only 1 InvoiceLines Array is allowed. 
 +The Description must only have 255 characters MAXIMUM! The database will throw away anything longer.  
 +The Invoice Comment must not contain invalid characters. (Carriage Returns and Line Feeds) 
 + 
 +Additional information:​ 
 +You do not need to include the InvoiceCustomer / InvoiceShipTo unique numbers AND the InvoiceShipping / InvoiceBilling 
 +One or the other is all that is required. If you know the Unique Numbers, use them. The system will ignore the InvoiceShipping and InvoiceBilling data. 
 +If you don’t, then use the InvoiceShipping and InvoiceBilling. The system will look-up the Account records or create them. 
 + 
 +Here is what is should look like: 
 +<​code>​ 
 +
 +  "​Invoice":​ [ 
 +    { 
 +      "​InvoiceHeader":​ { 
 +        "​InvoiceSubTotal":​ 87, 
 +        "​InvoiceTaxTotal":​ 8.97, 
 +        "​InvoiceOrdered":​ "​2019-08-13T16:​15:​11.282Z",​ 
 +        "​InvoiceDate":​ "​2019-08-13T16:​15:​11.282Z",​ 
 +        "​InvoiceType":​ "​W",​ 
 +        "​InvoiceSubType":​ "​O",​ 
 +        "​InvoiceDepartment":​ 0, 
 +        "​InvoiceBookMonth":​ "​2019-08-13T16:​15:​11.282Z",​ 
 +        "​InvoiceCustomer":​ 31599, 
 +        "​InvoiceShipTo":​ 31599, 
 +        "​InvoiceSalesman":​ 1, 
 +        "​InvoiceComment":​ "This is a test order. Please do not process! Item 1: This is a delivered product. Delivery 321 elm street ​ 60607 Business. Product Name: Arrangement. Product Options: Color: Earth - 0, Size: Large - 20, Delivery: 60607 - 17. Recipient: TesterChicago,​ 3332221111, testerchicago@floodlightdesign.com. Card message: Hi, nnLook forward to you receiving these testing flowers.nnJoe. Delivery date 08/​31/​19."​ 
 +      }, 
 +      "​InvoiceTenders":​ [ 
 +        { 
 +          "​Type":​ "​O",​ 
 +          "​Amount":​ 95.92 
 +        } 
 +      ], 
 +      "​InvoiceLines":​ [ 
 +        { 
 +          "​PartUnique":​ 15868, 
 +          "​Ordered":​ 1, 
 +          "​Price":​ 50, 
 +          "​Description":​ "This is a test order. Please do not process!"​ 
 +        }, 
 +        { 
 +          "​Part":​ "​SHIPPING",​ 
 +          "​Ordered":​ 1, 
 +          "​Price":​ 17, 
 +          "​Description":​ "​SHIPPING/​DELIVERY"​ 
 +        } 
 +      ] 
 +    } 
 +  ], 
 +  "​ConnectionInfo":​ { 
 +    "​TerminalNumber":​ 0 
 +  } 
 +
 +</​code>​ 
 + 
 +You can prevent all of these problems by simply checking the JSON payload in a JSON editor like: 
 +https://​jsoneditoronline.org/​ 
 + 
 + 
 + 
 +** Adding Newline Feed on Invoice Comment ** 
 + 
 +In /addInvoice method, you can add Invoice Comment. In the parameter, look for this field "​InvoiceComment"​ and add your comment.  
 + 
 +To add a new line feed, add this \\n in the comment. 
 + 
 +** Access Violation when making API call ** 
 + 
 +When troubleshooting the s5webAPI if receiving an access violation when making and API call, XML may require re-installation.
  
-===Access Violation when making API call=== 
  
-When troubleshooting the s5webAPI if receiving an access violation when making and API call re-install XML. 
webapi_swagger_documentation.1588797797.txt.gz · Last modified: 2020/05/06 13:43 by kevin