To Insert and Update data we have 2 ways
- Insert or Update Single Object
- Insert or Update List of Objects
* Standard json format: is available for all client, especially client not using our support library like Apis - light and easy to use
**Non-standard json format: is still in json format but have some additional special properties processed by our DAL or OM, this json is usually generated by our lib : Winbooks.Serializer . Suitable for client using our DAL and OM dll to perform complicated task
A. Insert Single Object
This function is used for inserting single data object in API
a. Using HTTP
|
In .NET, for making body content, client could use WinbooksConverter
Serialize by WinbooksConverter
|
And this is the result we'll include in the body content of request ,
non-standard json format
|
or if client not using our serializer , we could make it more simple
standard json
|
**Note : For standard json in single object, json string could contain Id/code of object . If not contains, we will get id/code from url
With multiple objects, each json member in json array must have id/code
If the request is successful, the result will be as below with status code 201.
b. Using Winbooks.Apis.Services
|
B. Insert List of Objects
This function is used to Insert or Update a list of objects.
a. Using HTTP
|
In .NET & C#, client could use WinbooksConverter to create the body content
Convert list of Winbooks objects to JSON
|
If client not using our converter, standard json string will be like this
Standard json with multiple object
|
**Note :With multiple objects, each json member in json array must have id/code
b. Using Winbooks.Apis.Services
Insert list Of Customers
|