Imports and Exports
This handles importing and exporting data from CSV files. In the request, the name parameter should be replaced by the case-sensitive default name of the CSV import/export with "-" replacing any spaces. Example: Sales Order Details -> Sales-Order-Details
Related guide: Imports and Exports
Import data via CSV
Import data via our CSV methods. Set the request Content-Type to either text/plain or text/csv. In the request, the name parameter should be replaced by the case-sensitive default name of the CSV import/export with "-" replacing any spaces. Example: Sales Order Details -> Sales-Order-Details
Attributes
No attributes.
POST /api/import/:name
curl --location \
--request POST '<YOUR SERVER>/api/import/:name' \
--header 'Content-Type: text/plain' \
--header 'Authorization: Bearer <TOKEN>' \
--data-raw '"header1","header2","header3"
"data11","data12","data13"
"data21","data22","data23"'
RESPONSE
Import data via JSON
Import data via our CSV methods, but in JSON format. Set the request Content-Type to application/json. In the request, the name parameter should be replaced by the case-sensitive default name of the CSV import/export with "-" replacing any spaces. Example: Sales Order Details -> Sales-Order-Details
Attributes
No attributes.
POST /api/import/:name
curl --location \
--request POST '<YOUR SERVER>/api/import/:name' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <TOKEN>' \
--data-raw '[
["header1", "header2", "header3"],
["data11", "data12", "data13"],
["data21", "data22", "data23"]
]'
RESPONSE
Execute data query
Execute a data query against the database using SQL. Set content type of the request to application/sql
Attributes
No attributes.
GET /api/data-query
curl --location \ --request GET '<YOUR SERVER>/api/data-query' \ --header 'Content-Type: application/sql' \ --header 'Authorization: Bearer <TOKEN>' \ --data-raw 'SELECT id, num FROM so WHERE statusId = 10'
RESPONSE
[
{
"id": 30,
"num": "S10040"
}
]
Execute data query
Execute a data query against the database using SQL.
Parameters
-
query stringSQL to be run.
Attributes
No attributes.
GET /api/data-query
curl --location \ --request GET '<YOUR SERVER>/api/data-query' \ --header 'Authorization: Bearer <TOKEN>'
RESPONSE
[
{
"id": 30,
"num": "S10040"
}
]
