Use PUT APIs to update an existing resource:
The difference between the POST and PUT APIs can be observed in request URIs:
http://<Domain name>:<PORT>/api/[VERSION_NO]/lu/<LU Name>/<iid>/<TABLE_NAME>&token=<API Key>&[format=json/xml]
| Component | Description | Mandatory | Example | Default | | ------------- | --------------------------------------------- | ------------- | ---------------- | -------------- | | Domain name | Domain name | Y | localhost | | | PORT | PORT | Y | 3213 | | | api | API | Y | api | | | VERSION_NO | Version number | N | V1.4 | Latest version | | LU Name | Logical unit name or COMMON for common tables | Y | CUSTOMER COMMON | | | Iid | Instance Id | Y | 1 | | | TABLE_NAME | Table name for data creation | Y | PAYMENT | | | token | Token name | Y | | | | format | Response format | Y | JSON/XML/CSV | JSON |
Example:
http://localhost:3213/api/v1.0/lu/CUSTOMER/1/INVOICE?token=ABC
Update data on CUSTOMER LU instance id 1, CUSTOMER table
Request Body
{
"row" : {"LAST_NAME":"TEST1"},
"where":"CUSTOMER=1 or ADDRESS='Betsey'"
}
http://<Domain name>:<PORT>/api/[VERSION_NO]/COMMON/<COMMON TABLE NAME>&token=<API Key>&[format=json/xml]
| Component | Description | Mandatory | Example | Default | | ----------------- | ---------------------------- | ------------- | ------------- | ----------- | | Domain name | Domain name | Y | localhost | | | PORT | PORT | Y | 3213 | | | api | API | Y | api | | | COMMON | Specify that scope is common | Y | COMMON | | | COMMON TABLE NAME | Common table name | N | ADDRESSES | | | token | API key | Y | | | | format | Response format | Y | JSON/XML | JSON |
Example:
http://localhost:3213/api/v1.0/COMMON?CITIES&token=ABC
Update data in common ADDRESSES table
Request Body
{
"row" : {"ADDRESS_NAME":"YOQNEAM"} ,
"where":"ADDRESS_ID=3"
}
http://<Domain name>:<PORT>/api/[VERSION_NO]/{<Customized Web-Service name>?token=<API Key>&[format=json/xml]
Parameters should be populated in the body in the following structure:
{
“parameter name 1”:”value”,
“parameter name 2”:”value”
}
| Component | Description | Mandatory | Example | Default | | --------------------------- | -------------------------------------- | ------------- | ------------- | -------------- | | Domain name | Domain name | Y | localhost | | | PORT | PORT | Y | 3213 | | | Api | API | Y | api | | | VERSION_NO | Version number | N | V1.4 | Latest version | | Customized Web-Service name | Name of the Web Service to be executed | Y | Orders | | | Format | Response format | Y | JSON/XML | JSON |
| Parameter | Mandatory | Value | | ------------------------- | ------------- | ----------------------------------------------------------- | | Token | Y | API key | | Accept | Y | Json/XML/CSV | | Any additional parameters | N | Parameter=value& Can be provided on both URL and header |
Example:
http://localhost:3213/api/v1.0/Orders/1/Open?token=ABC&format=json
In the body request put:
{
"i_order_id": "1",
"i_order_status": "Open"
}
Call Web Service Orders and bring the output structure in JSON format according to input parameters i_order_id = 1 and i_order_status=Open
Use PUT APIs to update an existing resource:
The difference between the POST and PUT APIs can be observed in request URIs:
http://<Domain name>:<PORT>/api/[VERSION_NO]/lu/<LU Name>/<iid>/<TABLE_NAME>&token=<API Key>&[format=json/xml]
| Component | Description | Mandatory | Example | Default | | ------------- | --------------------------------------------- | ------------- | ---------------- | -------------- | | Domain name | Domain name | Y | localhost | | | PORT | PORT | Y | 3213 | | | api | API | Y | api | | | VERSION_NO | Version number | N | V1.4 | Latest version | | LU Name | Logical unit name or COMMON for common tables | Y | CUSTOMER COMMON | | | Iid | Instance Id | Y | 1 | | | TABLE_NAME | Table name for data creation | Y | PAYMENT | | | token | Token name | Y | | | | format | Response format | Y | JSON/XML/CSV | JSON |
Example:
http://localhost:3213/api/v1.0/lu/CUSTOMER/1/INVOICE?token=ABC
Update data on CUSTOMER LU instance id 1, CUSTOMER table
Request Body
{
"row" : {"LAST_NAME":"TEST1"},
"where":"CUSTOMER=1 or ADDRESS='Betsey'"
}
http://<Domain name>:<PORT>/api/[VERSION_NO]/COMMON/<COMMON TABLE NAME>&token=<API Key>&[format=json/xml]
| Component | Description | Mandatory | Example | Default | | ----------------- | ---------------------------- | ------------- | ------------- | ----------- | | Domain name | Domain name | Y | localhost | | | PORT | PORT | Y | 3213 | | | api | API | Y | api | | | COMMON | Specify that scope is common | Y | COMMON | | | COMMON TABLE NAME | Common table name | N | ADDRESSES | | | token | API key | Y | | | | format | Response format | Y | JSON/XML | JSON |
Example:
http://localhost:3213/api/v1.0/COMMON?CITIES&token=ABC
Update data in common ADDRESSES table
Request Body
{
"row" : {"ADDRESS_NAME":"YOQNEAM"} ,
"where":"ADDRESS_ID=3"
}
http://<Domain name>:<PORT>/api/[VERSION_NO]/{<Customized Web-Service name>?token=<API Key>&[format=json/xml]
Parameters should be populated in the body in the following structure:
{
“parameter name 1”:”value”,
“parameter name 2”:”value”
}
| Component | Description | Mandatory | Example | Default | | --------------------------- | -------------------------------------- | ------------- | ------------- | -------------- | | Domain name | Domain name | Y | localhost | | | PORT | PORT | Y | 3213 | | | Api | API | Y | api | | | VERSION_NO | Version number | N | V1.4 | Latest version | | Customized Web-Service name | Name of the Web Service to be executed | Y | Orders | | | Format | Response format | Y | JSON/XML | JSON |
| Parameter | Mandatory | Value | | ------------------------- | ------------- | ----------------------------------------------------------- | | Token | Y | API key | | Accept | Y | Json/XML/CSV | | Any additional parameters | N | Parameter=value& Can be provided on both URL and header |
Example:
http://localhost:3213/api/v1.0/Orders/1/Open?token=ABC&format=json
In the body request put:
{
"i_order_id": "1",
"i_order_status": "Open"
}
Call Web Service Orders and bring the output structure in JSON format according to input parameters i_order_id = 1 and i_order_status=Open