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. 

    Reply Like
  • 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.  

    Reply Like
      • Robert
      • robertmiles3
      • 1 yr ago
      • Reported - view

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

      Reply Like
Like Follow
  • Status Answered
  • 1 yr agoLast active
  • 3Replies
  • 1225Views
  • 3 Following