Empty JSON being returned even though I have data in my account

test_shriiesh
I created 2 invoices in my FreeAgent account and then tried to fetch them
via api . I am getting a success message(code: 200) from server side and a
JSON string is being returned. But the string is empty, there is no data in
this string. i goes like :

{
“invoices”: []
}

My API request : https://api.sandbox.freeagent.com/v2/invoices
header: “Authorization: Bearer AccessToken”
Response:

HTTP/1.1 200 OK
X-request-id: ac2f783ec4d452420c0c5b82e3443ac4
Via: HTTP/1.1 GWA
X-host: web1
Access-control-allow-methods: DELETE, GET, HEAD, OPTIONS, POST, PUT
Access-control-max-age: 1728000
Access-control-expose-headers: Link
X-runtime: 0.091139
X-google-cache-control: remote-fetch
Server: nginx
Connection: keep-alive
Etag: “33893aed6ce6dc420d9e398e859c61af”
Link:
X-ua-compatible: IE=Edge,chrome=1
Cache-control: max-age=0, private, must-revalidate
Content-location: https://api.sandbox.freeagent.com/v2/invoices
Access-control-allow-headers: Accept, Authorization, Content-Type
Content-type: application/json; charset=utf-8
Access-control-allow-origin: *
X-rev: 673f1f

{
“invoices”: []
}

Timestamps of your requests (in GMT):

Mon, 02 Mar 2015 05:30:08 GMT

Which environment are you querying?: Sandbox

The problem is solved. I was fetching the data from my sandbox account
whereas my invoices were in my account on production version.On Monday, March 2, 2015 at 11:48:24 AM UTC+5:30, Shriiesh Sharma wrote:

test_shriiesh
I created 2 invoices in my FreeAgent account and then tried to fetch them
via api . I am getting a success message(code: 200) from server side and a
JSON string is being returned. But the string is empty, there is no data in
this string. i goes like :

{
“invoices”: []
}

My API request : https://api.sandbox.freeagent.com/v2/invoices
header: “Authorization: Bearer AccessToken”
Response:

HTTP/1.1 200 OK
X-request-id: ac2f783ec4d452420c0c5b82e3443ac4
Via: HTTP/1.1 GWA
X-host: web1
Access-control-allow-methods: DELETE, GET, HEAD, OPTIONS, POST, PUT
Access-control-max-age: 1728000
Access-control-expose-headers: Link
X-runtime: 0.091139
X-google-cache-control: remote-fetch
Server: nginx
Connection: keep-alive
Etag: “33893aed6ce6dc420d9e398e859c61af”
Link:
X-ua-compatible: IE=Edge,chrome=1
Cache-control: max-age=0, private, must-revalidate
Date: Mon, 02 Mar 2015 05:30:08 GMT
Content-location: https://api.sandbox.freeagent.com/v2/invoices
Access-control-allow-headers: Accept, Authorization, Content-Type
Content-type: application/json; charset=utf-8
Access-control-allow-origin: *
X-rev: 673f1f

{
“invoices”: []
}

Timestamps of your requests (in GMT):

Mon, 02 Mar 2015 05:30:08 GMT

Which environment are you querying?: Sandbox