You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

400 Bad Request When Adding Attachment to PR – Title Length Issue

in Integration 3 comments

Summary:

Hi

While adding an attachment to a Purchase Requisition via REST API below, we are getting a 400 Bad Request error when the file name is long:

POST /fscmRestApi/resources/11.13.18.05/purchaseRequisitions/{purchaseRequisitionsUniqID}/child/attachments

In the Title field, we are sending the file name:

26-00960-001___Enbridge_AMP_Integrity_Dig_AIA_Staking_-_April_2026___GV_Estimate.pdf.

Payload -

{
"DatatypeCode": "FILE",
"CategoryName": "TO_SUPPLIER",
"FileName": "new.txt",
"UploadedFileContentType": "text/plain",
"ContentRepositoryFileShared": "false",
"Title": "26-00960-001___Enbridge_AMP_Integrity_Dig_AIA_Staking_-_April_2026___GV_Estimate.pdf",
"Description": "Contract Template Questions",
"FileContents": "IFBsZWFzZSBjb3B5IFZlbmRvci5JbnNwZWN0aW9uQGVuYnJpZGdlLmNvbSBhbmQgTVBGaW5hbmNpYWxDb250cm9sc0BlbmJyaWRnZS5jb206ICB3aGVuIHN1Ym1pdHRpbmcgSW52b2ljZXMuIAogIENvbnRyYWN0b3Igc2hhbGwgYmUgY29tcGVuc2F0ZWQgb24gdGhlIGZvbGxvd2luZzogIFRpbWUgJmFtcDsgTWF0ZXJpYWwgU3RhbmRhcmQgYmFzaXMgCiAgTGFib3IgYW5kIEVxdWlwbWVudCBSYXRlIEVsZWN0aW9uOiAgVGhlIExhYm9yIGFuZCBFcXVpcG1lbnQgcmF0ZXMgaW4gdGhlIEFkZGVuZHVtcyBvZiB0aGUgQWdyZWVtZW50IAogIFN1cHBsaWVyIHRvIHByb3ZpZGUgcXVhbGl0eSBzdXJ2ZWlsbGFuY2UvaW5zcGVjdGlvbiBzZXJ2aWNlcyBmb3IgUE8jKjogIFRlc3QgUFVSLVhYWFgtWFhYWFhYIAogIEFsbCBhcHBsaWNhYmxlIGRvY3VtZW50cyBhbmQgaW5zcGVjdGlvbiBzY29wZSBhcmUgaW4gU2FsZXNmb3JjZSwgYXNzaWdubWVudCMgRU5CKjogIDEyMzE2NTc5OTk5IAogIEFsbCBJbnNwZWN0aW9uIHJlcG9ydHMgc2hhbGwgYmUgc3VibWl0dGVkIHZpYSBTYWxlc2ZvcmNlOiAgSW5zcGVjdGlvbiB0byBiZSBhY3Rpb25lZCBieSBTdXBwbGllciBhcyBwZXIgUFJKLVFNLVNUTkQtMDI0RlMgCiA=

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!