Hi all,
I receive a 401 Unauthorized response when trying to create an new invoice with the JSON at the bottom. The URI’s used are valid/exist. I am using https://developers.google.com/oauthplayground/ to send the POST request to https://api.sandbox.freeagent.com/v2/invoices. Other POST or GET requests I have tried work but not this one. Anybody has an idea what the problem might be? What puzzles me particularly is that the response is 401.
{
"contact":"https://api.sandbox.freeagent.com/v2/contacts/72538",
"dated_on":"2011-08-29",
"due_on":"2011-09-28",
"reference":"001",
"currency":"GBP",
"exchange_rate":"1.0",
"net_value":"0.0",
"sales_tax_value":"0.0",
"total_value": "200.0",
"paid_value": "50.0",
"due_value": "150.0",
"status":"Draft",
"comments":"An example invoice comment.",
"omit_header":false,
"always_show_bic_and_iban": false,
"send_thank_you_emails":false,
"send_reminder_emails":false,
"send_new_invoice_emails": false,
"bank_account": "https://api.sandbox.freeagent.com/v2/bank_accounts/4956",
"payment_terms_in_days":30,
"category":"https://api.sandbox.freeagent.com/v2/categories/450",
"ec_status":"EC Goods",
"payment_methods": {
"paypal": true,
"stripe": false
},
"created_at":"2011-08-29T00:00:00Z",
"updated_at":"2011-08-29T00:00:00Z",
"invoice_items":[
{
"description":"Test InvoiceItem",
"item_type":"Hours",
"price":"0.0",
"quantity":"0.0"
}
]
}