Discrepancy on HTTP Status Code for duplicates

Your documentation states that duplicates will throw a 422 status code, but I'm seeing in my testing that it is throwing a 400 instead with the following json response...

{"import_id":["A transaction with the same import_id already exists on the account."]}

I'll go ahead and plan for either one, but just letting you know that one of them (docs or API) needs to be changed.

3replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Thanks, Robert. I'll pass this along to one of our developers working on the API. 

  • Thanks Robert !  We removed the 422 response status awhile back but obviously did not remove it from the swagger spec as a possible response.   I'll get an update in to correct this.  For reference, if a transaction with the same import_id already exists, a 400 response status will be returned with detail indicating this condition.  

      • Robert
      • robertmiles3
      • 3 yrs ago
      • Reported - view

      Brady Sounds good, thanks. I'll remove the 422 case from my code.

Like Follow
  • Status Answered
  • 3 yrs agoLast active
  • 3Replies
  • 1249Views
  • 3 Following