Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Invalid /parcels response if results=1 parameter passed #58

Open
basiliscus opened this issue Mar 31, 2020 · 0 comments
Open

Invalid /parcels response if results=1 parameter passed #58

basiliscus opened this issue Mar 31, 2020 · 0 comments

Comments

@basiliscus
Copy link

basiliscus commented Mar 31, 2020

GET https://api.goshippo.com/parcels?results=1

Response:

{
   "next":"https://api.goshippo.com/parcels?results=1&page=2",
   "previous":null,
   "results":{
      "object_state":"VALID",
      "object_created":"2020-03-31T18:39:51.357Z",
      "object_updated":"2020-03-31T18:39:51.357Z",
      "object_id":"4f827b0741024ae2a7bcd4ea08155055",
      "object_owner":"info@ecwid.com",
      "template":null,
      "length":"5.0000",
      "width":"5.0000",
      "height":"5.0000",
      "distance_unit":"cm",
      "weight":"2.0000",
      "mass_unit":"lb",
      "value_amount":null,
      "value_currency":null,
      "metadata":"",
      "extra":{

      },
      "line_items":[

      ],
      "test":true
   }
}

The results element in the response must be a JSON-array, not an object.

If the results parameter was set to 2 or more, the response would be a JSON-array, as expected.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant