Creating an entity using POST
Creating a proposal with a materials list
POSThttps://ecc123456789012345.servicebus.windows.net/MyEbms/ABC/OData/ARQT
{
"B_ID": "DOEJOH",
"QT_DATE": "12/21/19",
"QUOTE": "12345.1",
"DESCR": "My new proposal,
"MEMO": "multi – line memo \r\nSo much can be written here and can be printed at the bottom of the invoice",
"Details":
[
{
"INVEN": "ADJWRE",
"DESCR": "Adjustable wrench, overriding the default EBMS description",
"M_QUAN": 5,
"UNIT": 10.99"
},
{
"INVEN": "MAT123",
"M_QUAN": 10,
"UNIT": 10.35,
"Materials":
[
{
"INVEN": "PART1",
"M_QUAN": 1,
"UNIT": 1.99"
},
{
"INVEN": "PART2",
"M_QUAN": 5,
"UNIT": 0.35
},
]
},
]
}
Binaries and images
POSThttps://ecc123456789012345.servicebus.windows.net/MyEbms/ABC/OData/INVENTRYIMAGES
{
"PAR_AID": "PG0B8S6BVH9A90R0",
"ORDER": "05",
"DETAIL":
{
"Value": ".....your BASE64 binary data....."
}
}
Uploading files
To upload a file, you need to specify the entity name and autoid of the entity. You can include a path to a subdirectory if needed (that directory will be created if it doesn't exist).
POSThttps://ecc123456789012345.servicebus.windows.net/MyEbms/ABC/OData/DirectoryFolder('ARCUST[TDEKTBN66P729HA1]/My subdirectory')/Model.Entities.Upload
{
"FileName": "filename.extension",
"File":
{
"Value": ".....your BASE64 binary data....."
}
}
To see the full directory structure of an entity, you can use a GET and $select on the entity itself (and expand as many levels of Contents as you want).
Gethttps://ecc123456789012345.servicebus.windows.net/MyEbms/ABC/OData/DirectoryFolder('ARCUST[TDEKTBN66P729HA1]')?$select=Key&$expand=Children($expand=Children($expand=Children)))
Sample output
{
"@odata.context": "https://ecc123456789012345.servicebus.windows.net/MyEbms/ABC/OData/$metadata#ARCUST(DirectoryFolder,DirectoryFolder(Key,Children(Children(Children())))))/$entity",
"DirectoryFolder": {
"Key": "ARCUST[TDEKTBN66P729HA1]",
"Children": [
{
"@odata.type": "#Model.Entities.DirectoryFolder",
"Guid": "56534134-414a-3646-4544-504632303030",
"Name": "New folder",
"Key": "ARCUST[TDEKTBN66P729HA1]/New folder",
"Children": [
{
"@odata.type": "#Model.Entities.DirectoryFile",
"Guid": "d41fcae2-c6b8-4aa8-a8c5-851033ea43b1",
"Name": "my text file.txt",
"Key": "ARCUST[TDEKTBN66P729HA1]/New folder/my text file.txt"
}
]
},
{
"@odata.type": "#Model.Entities.DirectoryFile",
"Guid": "9339f803-2204-45e8-a3a6-67c605b52500",
"Name": "my jpg photo.jpg",
"Key": "ARCUST[TDEKTBN66P729HA1]/my jpg photo.jpg"
}
]
}
}