I'm trying to send a POST request to RMAProcSvc/RMADtls in Swagger, but I'm getting the error 'request is invalid'

I’ve created an RMA and I’m now trying to fill out the details header via the API. When I submit my payload in swagger, I’m getting ‘request is invalid’, which is very vague. I’ve done plenty of other post requests to different endpoints, so I’m not totally new to this. I’m at a loss though.

Here is my payload:

    "Company": "SIE",
    "OpenRMA": true,
    "OpenDtl": true,
    "RMANum": 5184,
    "ReturnReasonCode": "repair",
    "PartNum": "S-Evaluation",
    "LineDesc": "640i",
    "ReturnQty": 1,
    "ConNum": 4,
    "CustNum": 3842,
    "ShipToCustNum": 3842,
    "ECCComment": "This is a comment",
    "ShipToCustID": "S10003819",
    "ShipToName": "Test Name",
    "CustomerContactEMailAddress": "jane@company.com"

And here is the response body:

  "odata.error": {
    "code": "",
    "message": {
      "lang": "en-US",
      "value": "The request is invalid."
    "innererror": {
      "message": "entity : An error has occurred.\r\n",
      "type": "",
      "stacktrace": ""

I’ve tried deleting fields until it starts telling me a certain field is required. As far as I can tell, I have all the required fields.

You may have to add the header data in there as well when trying to update or add child records.

Could you possibly give me an example of that? What do you mean by header data?

Is it possible it wants the ShipToNum (nvarchar(14)) as well? Null is an acceptable value if that’s the one you want to use, I usually specify a ShipToCustNum along with the ShipToNum when dealing with ShipTo records.

I figured out I was missing a couple required fields: RevisionNum and ReturnQtyUOM. Also, the value for ReturnQty needed to be in quotes. Thanks for your help!

1 Like