POST api/VendorDocument
File must be encoded (base64) in the JSON request. Only one file can be submitted per request.
Request Information
URI Parameters
None.
Body Parameters
VendorDocumentName | Description | Type | Additional information |
---|---|---|---|
DocumentId |
Sedona internal autonumber for the Customer record |
integer |
None. |
CompanyId |
Value from Company table in the SedonaMaster; for security reasons, there is no lookup in the API for this value. |
integer |
Required |
VendorCode |
Foreign key from the AP_Vendor table |
string |
Required |
SecurityLevel |
If not set, defaults to 2. Possible values are: 1 - Everyone, 2 - Internal View Only, 3 - Management |
integer |
None. |
FileName |
Name of the file. If not specified, the file name will be set to the name of the file in the request (client's filename). |
string |
String length: inclusive between 0 and 255 |
FileData |
Set to a base64 encoding or leave blank if the file will be present in multipart MIME formatted request. |
Collection of byte |
None. |
DocumentType |
Value from SY_Document_Type table in the SedonaDocument database; cannot be set to N/A, but any value not in the SY_Document_Type table will be added |
string |
Required String length: inclusive between 0 and 25 |
UploadDate |
If not specified, set to the date and time of the upload. |
date |
None. |
UserDescription | string |
String length: inclusive between 0 and 50 |
|
UserCode |
The user making this change; defaults to UserCode value from config file if not set explicitly |
string |
String length: inclusive between 0 and 25 |
InvoiceNumber |
Value from AP_Invoice table; this is the Invoice_Number field, not the autonumber Invoice_Id |
string |
None. |
CheckId |
Foreign key from AP_Check table |
integer |
None. |
PurchaseOrderId |
Foreign key from AP_Purchase_Order table |
integer |
None. |
ReceiptId |
Foreign key from IN_Receipt table |
integer |
None. |
Reference1 | string |
String length: inclusive between 0 and 50 |
|
Reference2 | string |
String length: inclusive between 0 and 50 |
|
Reference3 | string |
String length: inclusive between 0 and 50 |
|
Reference4 | string |
String length: inclusive between 0 and 50 |
Request Formats
application/json, text/json
{ "DocumentId": 1, "CompanyId": 2, "VendorCode": "sample string 3", "SecurityLevel": 1, "FileName": "sample string 4", "FileData": "QEA=", "DocumentType": "sample string 5", "UploadDate": "2025-02-08T01:15:53.0563189-06:00", "UserDescription": "sample string 6", "UserCode": "sample string 7", "InvoiceNumber": "sample string 8", "CheckId": 1, "PurchaseOrderId": 1, "ReceiptId": 1, "Reference1": "sample string 9", "Reference2": "sample string 10", "Reference3": "sample string 11", "Reference4": "sample string 12" }
application/xml, text/xml
<VendorDocument xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SedonaServices.Models"> <CheckId>1</CheckId> <CompanyId>2</CompanyId> <DocumentId>1</DocumentId> <DocumentType>sample string 5</DocumentType> <FileData>QEA=</FileData> <FileName>sample string 4</FileName> <InvoiceNumber>sample string 8</InvoiceNumber> <PurchaseOrderId>1</PurchaseOrderId> <ReceiptId>1</ReceiptId> <Reference1>sample string 9</Reference1> <Reference2>sample string 10</Reference2> <Reference3>sample string 11</Reference3> <Reference4>sample string 12</Reference4> <SecurityLevel>1</SecurityLevel> <UploadDate>2025-02-08T01:15:53.0563189-06:00</UploadDate> <UserCode>sample string 7</UserCode> <UserDescription>sample string 6</UserDescription> <VendorCode>sample string 3</VendorCode> </VendorDocument>
application/x-www-form-urlencoded
Response Information
Resource Description
Collection of VendorDocumentName | Description | Type | Additional information |
---|---|---|---|
DocumentId |
Sedona internal autonumber for the Customer record |
integer |
None. |
CompanyId |
Value from Company table in the SedonaMaster; for security reasons, there is no lookup in the API for this value. |
integer |
Required |
VendorCode |
Foreign key from the AP_Vendor table |
string |
Required |
SecurityLevel |
If not set, defaults to 2. Possible values are: 1 - Everyone, 2 - Internal View Only, 3 - Management |
integer |
None. |
FileName |
Name of the file. If not specified, the file name will be set to the name of the file in the request (client's filename). |
string |
String length: inclusive between 0 and 255 |
FileData |
Set to a base64 encoding or leave blank if the file will be present in multipart MIME formatted request. |
Collection of byte |
None. |
DocumentType |
Value from SY_Document_Type table in the SedonaDocument database; cannot be set to N/A, but any value not in the SY_Document_Type table will be added |
string |
Required String length: inclusive between 0 and 25 |
UploadDate |
If not specified, set to the date and time of the upload. |
date |
None. |
UserDescription | string |
String length: inclusive between 0 and 50 |
|
UserCode |
The user making this change; defaults to UserCode value from config file if not set explicitly |
string |
String length: inclusive between 0 and 25 |
InvoiceNumber |
Value from AP_Invoice table; this is the Invoice_Number field, not the autonumber Invoice_Id |
string |
None. |
CheckId |
Foreign key from AP_Check table |
integer |
None. |
PurchaseOrderId |
Foreign key from AP_Purchase_Order table |
integer |
None. |
ReceiptId |
Foreign key from IN_Receipt table |
integer |
None. |
Reference1 | string |
String length: inclusive between 0 and 50 |
|
Reference2 | string |
String length: inclusive between 0 and 50 |
|
Reference3 | string |
String length: inclusive between 0 and 50 |
|
Reference4 | string |
String length: inclusive between 0 and 50 |
Response Formats
application/json, text/json
[ { "DocumentId": 1, "CompanyId": 2, "VendorCode": "sample string 3", "SecurityLevel": 1, "FileName": "sample string 4", "FileData": "QEA=", "DocumentType": "sample string 5", "UploadDate": "2025-02-08T01:15:53.0563189-06:00", "UserDescription": "sample string 6", "UserCode": "sample string 7", "InvoiceNumber": "sample string 8", "CheckId": 1, "PurchaseOrderId": 1, "ReceiptId": 1, "Reference1": "sample string 9", "Reference2": "sample string 10", "Reference3": "sample string 11", "Reference4": "sample string 12" }, { "DocumentId": 1, "CompanyId": 2, "VendorCode": "sample string 3", "SecurityLevel": 1, "FileName": "sample string 4", "FileData": "QEA=", "DocumentType": "sample string 5", "UploadDate": "2025-02-08T01:15:53.0563189-06:00", "UserDescription": "sample string 6", "UserCode": "sample string 7", "InvoiceNumber": "sample string 8", "CheckId": 1, "PurchaseOrderId": 1, "ReceiptId": 1, "Reference1": "sample string 9", "Reference2": "sample string 10", "Reference3": "sample string 11", "Reference4": "sample string 12" } ]
application/xml, text/xml
<ArrayOfVendorDocument xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SedonaServices.Models"> <VendorDocument> <CheckId>1</CheckId> <CompanyId>2</CompanyId> <DocumentId>1</DocumentId> <DocumentType>sample string 5</DocumentType> <FileData>QEA=</FileData> <FileName>sample string 4</FileName> <InvoiceNumber>sample string 8</InvoiceNumber> <PurchaseOrderId>1</PurchaseOrderId> <ReceiptId>1</ReceiptId> <Reference1>sample string 9</Reference1> <Reference2>sample string 10</Reference2> <Reference3>sample string 11</Reference3> <Reference4>sample string 12</Reference4> <SecurityLevel>1</SecurityLevel> <UploadDate>2025-02-08T01:15:53.0563189-06:00</UploadDate> <UserCode>sample string 7</UserCode> <UserDescription>sample string 6</UserDescription> <VendorCode>sample string 3</VendorCode> </VendorDocument> <VendorDocument> <CheckId>1</CheckId> <CompanyId>2</CompanyId> <DocumentId>1</DocumentId> <DocumentType>sample string 5</DocumentType> <FileData>QEA=</FileData> <FileName>sample string 4</FileName> <InvoiceNumber>sample string 8</InvoiceNumber> <PurchaseOrderId>1</PurchaseOrderId> <ReceiptId>1</ReceiptId> <Reference1>sample string 9</Reference1> <Reference2>sample string 10</Reference2> <Reference3>sample string 11</Reference3> <Reference4>sample string 12</Reference4> <SecurityLevel>1</SecurityLevel> <UploadDate>2025-02-08T01:15:53.0563189-06:00</UploadDate> <UserCode>sample string 7</UserCode> <UserDescription>sample string 6</UserDescription> <VendorCode>sample string 3</VendorCode> </VendorDocument> </ArrayOfVendorDocument>