0

I'm using Postman to test Quickbase API call - AddRecord. For someone reason, my POST request is generating an error 2. What do I need to correct?

AddRecord : (https://help.quickbase.com/api-guide/add_record.html)

Error 2 : (https://help.quickbase.com/api-guide/errorcodes.html)

I've tried using an apptoken in my call along with a usertoken. I've tried using FID instead of the field name. None my attempts to at a solution work.

<qdbapi>
  <usertoken>MyUserToken</usertoken>
  <field name="Last_Name">My Last Name</field>
  <field name="First_Name">My First Name</field>
</qdbapi>

POST-ing to url https://myurlname.quickbase.com/db/DBID

Headers are:

Content-Type: application/xml

QUICKBASE-ACTION: API_AddRecord

I expect to receive

<qdbapi>
 <action>API_AddRecord</action>
 <errcode>0</errcode>
 <errtext>No error</errtext>
 ...
</qdbapi>

but instead received

<qdbapi>
 <action>API_AddRecord</action>
 <errcode>2</errcode>
 <errtext>Invalid input</errtext>
</qdbapi>
prismo
  • 1,505
  • 2
  • 12
  • 26
  • Not Certain at the moment, but I believe the POST url needs to be in the format https://target_domain/db/target_dbid? and I don't see a ? on your post for the url. Small thing, I know, but it's like a missing ; in other languages. –  Sep 17 '19 at 17:47
  • For the Quick Base API, the "?" is not necessary unless you want to use URL parameters after the "?" instead of Headers and a Posting body. – Erich Wehrmann Sep 18 '19 at 12:51

2 Answers2

2

You info looks correct. I just attempted making an Add_Record using info similar data to your example and it worked for me. Here are some screen shots from my test:

Headers

Body

Erich Wehrmann
  • 464
  • 2
  • 11
0

It seems I was using the wrong target_db_id. Simply changing it to the correct db_id resolved my issue.

prismo
  • 1,505
  • 2
  • 12
  • 26