Hi there
I’m trying to make a new project. The JSON is:
POST /v2/projects
{“project”:{“contact”:"/v2/contacts/167",“name”:“project
TEST”,“starts_on”:null,“ends_on”:null,“budget”:0,“is_ir35”:false,“contract_po_reference”:null,“status”:“Active”,“budget_units”:“Days”,“normal_billing_rate”:0,“hours_per_day”:0,“uses_project_invoice_sequence”:false,“currency”:“GBP”,“billing_period”:null,“url”:null,“updated_at”:"",“created_at”:""}}
(I’ve also tried “url”:"")
I get the following back:
{“errors”:{“error”:{“message”:“unknown attribute: url”}}}
What am I missing here? Is there a Ruby (or something else) sample I
can compare the over-the-wire stuff which is known to work, vrs the
docs?
I can post to /v2/contacts just fine:
{“contact”:{“locale”:“en”,“account_balance”:0,“organisation_name”:"",“first_name”:“Nic
TEST”,“last_name”:“Wise”,“email”:null,“phone_number”:null,“address1”:“17:04:10”,“town”:null,“region”:null,“postcode”:null,“address2”:null,“address3”:null,“contact_name_on_invoices”:false,“country”:null,“sales_tax_registration_number”:null,“uses_contact_invoice_sequence”:false,“url”:"",“updated_at”:"",“created_at”:""}}
response:
{“contact”:{“url”:“https://api.sandbox.freeagent.com/v2/contacts/248",“first_name”:"Nic
TEST”,“last_name”:“Wise”,“address1”:“17:04:10”,“contact_name_on_invoices”:false,“country”:“United
Kingdom”,“locale”:“en”,“account_balance”:“0.0”,“uses_contact_invoice_sequence”:false,“created_at”:“2012-05-27T16:04:04Z”,“updated_at”:“2012-05-27T16:04:04Z”}}
(on thing to keep in mind: they want that all (most?) .NET JSON
parsers work is that if I have a field, it will serialize it as
field:"" or field:null - NOT omit the field if it’s null or blank!!)
Also, shouldn’t the resulting url in both cases be /v2/contacts/248
not https://api.sandbox.freeagent.com/v2/contacts/248??
Any ideas?
Ta
Nic
Nic Wise
t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
b. http://www.fastchicken.co.nz/
Earnest: Self-employed? Track your business expenses and income.
Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p
mobileAgent (for FreeAgent): get your accounts in your pocket.
http://goo.gl/IuBU
Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2