AccountRight UI has the ability to attach a document against Spend Money Transactions with an aid of the InTray service. We are introducing a new endpoint In order to extend this feature to the Public AccountRight API.
Endpoint Details
Introducing a /Banking/SpendMoneyTxn/{Spend_Money_UID}/Attachment endpoint which supports GET/POST/DELETE requests. .
POST Request
A POST request can be made to attach a document to a Spend Money Transaction. Only one document per request is supported.
If you have more than one document to attach, call this method for each document. A document needs to be in a base 64 encoded format and less than 3MB in size. Accepted forms are: PDF, TIFF, JPG, JPEG, X-MS-PNG and PNG.
Endpoint:
/Banking/SpendMoneyTxn/{Spend_Money_UID}/Attachment
Request Body:
The required fields are below:
Attachment | Array |
OriginalFileName | String |
FileBase64Content | String |
Request example:
{
"Attachments": [
{
"OriginalFileName": "Reece.pdf",
"FileBase64Content": "J..KJH"
}
]
}
GET Request
A GET request can be made to read documents attached to a Spend Money.
Endpoint:
/Banking/SpendMoneyTxn/{Spend_Money_UID}/Attachment
Response Example:
UID |
Guid(36) |
SpendMoneyTxn UID |
Attachment |
Array |
|
UID |
Guid(36) |
A unique id for the document using for |
OriginalFileName |
String |
Uploaded document original filename |
ThumbnailUri |
String |
A s3 pre-signed url using for getting uploaded document thumbnail. The uri will expire after 1-2 minutes. |
FileUri |
String |
Same as above |
URI |
String |
URI to get a single document |
RowVersion |
String |
“0” |
URI |
String |
URI to get a list of documents |
RowVersion |
String |
“0” |
{
"UID": "1b934060-1001-4db5-a791-b7766add2ca5",
"Attachments": [
{
"UID": "7bd92e9e-1fde-4feb-bf5a-427cc0759b59",
"OriginalFileName": "SettingUpEssentials.pdf",
"ThumbnailUri": "https://production-alexandria-trinity-myob-bucke.. ",
"FileUri": "https://production-alexandria-trinity-myob-bucke..",
"FileBase64Content": null,
"URI": "https://ar1.api.myob.com/accountright/10bead1..",
"RowVersion": "0"
}
],
"URI": "https://ar1.api.myob.com/accountright/10bead1..",
"RowVersion": "0"
}
DELETE Request
A DELETE request can be made to remove an attached document on a Spend Money. If you have more than one document to remove, call this method for each document.
Endpoint:
/Banking/SpendMoneyTxn/{Spend_Money_UID}/Attachment/{attachment_uid}
Response Code Example:
200 OK
Comments
0 comments
Article is closed for comments.