Table of Contents
...
Section |
---|
Column |
---|
| Retrieving the database structure of a registerTo generate the various end-points Burti API relies on the database structure that Standard ERP exposes via the Export/import Format report in its' Technics module. When the report is run without specifying a register code, it will dump the database definitions of all the registers in the database. These are for example Invoices, Sales Orders, Deliveries and such. You will need to look up the register(-s) that you wish to expose via the API in this report and then separately export these to a text file. ExampleIn this example we show how to retrieve the database structure of the Orders register to use for creating its' API end-point. Step 1: Enter the keyword "Orders" in the search field of the report Step 2: Cycling through the search results pin-point the correct register and take note of its' code (ORVc). Step 3: Reopen to the Report Specification window using the cogwheel menu available in the upper-left hand corner of the window. Step 4: Enter the register code (ORVc in this example) in the field labeled "Vc (View Code)", set Media to File and press Run to save the definition in a file. |
Column |
---|
|
|
|
...
Write API - pending polishing
...
Entry point
All Write API is accessed via the following single entry-point URL:
Code Block |
---|
|
https://your.server.address/Web_JSON_UpdatingComposer.hal |
Writing records
API Expects a POST request with JSON formatted post data, all of the neccessary data should be inserted into the body instead
Info |
---|
Column |
---|
| Column |
---|
| Request: Code Block |
---|
language | bash |
---|
title | Simple record list retrieval using curl, also demonstrating the use of multiple requests in unsafe-one call |
---|
linenumbers | true |
---|
| curl "https://your.server.address/Web_JSON_UpdatingComposer.hal \
?token=security_token" |
|
Column |
---|
| POST Body data: Code Block |
---|
language | bash |
---|
title | Simple record list retrieval using curl, also demonstrating the use of multiple requests in unsafe-one call |
---|
linenumbers | true |
---|
| {
"0": {
"name": "WEB_JSON_ORVc_Save.hal",
"company": 1,
"data": {
"action": "insert",
"CustCode": "10101",
"OrdDate": "2024-04-15",
"matrix": [
{
"ArtCode": "16X20DAL",
"Quant": 1,
"Price": 26300.00
},
{
"ArtCode": "ABUS12829.L",
"Quant": 1,
"Price": 565.00,
"returnfull": "adsf"
}
]
}
},
"1": {
"name": "WEB_JSON_ORVc_Save.hal",
"company": 1,
"data": {
"action": "insert",
"CustCode": "10101",
"matrix": [
{
"ArtCode": "16X20DAL",
"Quant": 1,
"Price": 26300.00
},
{
"ArtCode": "ABUS12829.L",
"Quant": 1,
"Price": 565.00
}
]
}
}
} |
|
Column |
---|
| Successfull Response Code Block |
---|
language | bash |
---|
title | Simple record list retrieval using curl, also demonstrating the use of multiple requests in unsafe-one call |
---|
linenumbers | true |
---|
| {
"0": {
"sernr": 3900005,
"errors": [],
"warnings": []
},
"1": {
"sernr": 3900006,
"errors": [],
"warnings": []
}
} |
|
|
File Upload API - pending polishing
Entry point
All Write API is accessed via the following single entry-point URL:
Code Block |
---|
|
https://your.server.address/Web_JSON_UploadingComposer.hal |
Advanced Use
HAL hook functions
...
Section |
---|
Column |
---|
| Read APIFunctions are available in the register's Read interface's Tools file as previously mentioned. Function | Usage |
---|
AddInfoGeneral
| Allows to add any additional information in the response JSON. This will appear as the contents of the response block's addinfo JSON property | Options
| Allows to set specific options for this request block (e.g. things like JSON formatting options) | AddInfoRec
| Allows to add any additional information in the response JSON of specific records. This will appear as sibling data to the record's fields. If you wish to separate, you need to explicitly make a wrapping property. | AddInfoRow
| Allows to add any additional information in the response JSON of specific records rows. This will appear as sibling data to the row's fields. If you wish to separate, you need to explicitly make a wrapping property. | LoopTest
| Allows to add additional test conditions for record loops, that are more complex that checking agains a single value of a field | LoginTest
| Allows to add authentication logic that's specific to a register's API | NewExtra
| Allows to add extra information when retrieving a blank record template with the new parameter. |
|
Column |
---|
| Write APIFunctions are available in the register's Write interface's Tools file as previously mentioned. Function | Usage |
---|
SaveCheck
| Allows to add RecordCheck-like validations or even a full RecordCheck call | DeleteCheck
| Allows to add custom logic for validation record deletion | SaveWarnings
| Add custom warnings that do not fail the storing of record, but simply provide some warning-level feedback | SaveExtra
| Allows to perform additional actions when storing records | DownloadFileTest
| Allows to implement custom logic when determining whether attachment download is allowed for a record | UploadFileTest
| Allows to implement custom logic when determining whether attachment upload is allowed for a record | RemoveFileTest
| Allows to implement custom logic when determining whether attachment removal is allowed for a record | PasteValue
| Can add actions that should be run after setting a value for each or separate fields. This is similar to AfterEditField Window Actions |
|
|
...