Discussion Forum: Thread 338037

 Author: InanimateReason View Messages Posted By InanimateReason
 Posted: Apr 12, 2023 10:57
 Subject: Bricklink API Parameters failing for subsets
 Viewed: 71 times
 Topic: Technical Issues
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

InanimateReason (3456)

Location:  USA, Georgia
Member Since Contact Type Status
Oct 8, 2006 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
Seller Ships to My Country Store: Inanimate Reason
If I call the api without any query params, I get expected responses from the
Bricklink API.

e.g. https://api.bricklink.com/api/store/v1/items/set/9644-1/subsets

However, if I add any of color_id, box, instruction, break_minifigs, break_subsets,
I get a 200 response but no response body. Header says content length is 104
bytes so that jives with the missing body.

e.g.
https://api.bricklink.com/api/store/v1/items/set/9644-1/subsets?instruction=true
https://api.bricklink.com/api/store/v1/items/set/7644-1/subsets?instruction=true&break_minifigs=false

I am following examples at https://www.bricklink.com/v3/api.page?page=get-subsets

I tried urlencoding the query string and sent
https://api.bricklink.com/api/store/v1/items/set/9644-1/subsets?instruction%3Dtrue%26break_minifigs%3Dtrue
but get the same result.

This is my own code.

Does anyone have a working example or suggestions?

Bill
 Author: Stellar View Messages Posted By Stellar
 Posted: Apr 12, 2023 14:18
 Subject: Re: Bricklink API Parameters failing for subsets
 Viewed: 38 times
 Topic: Technical Issues
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

Stellar (3504)

Location:  Spain, Comunidad Valenciana
Member Since Contact Type Status
Sep 24, 2015 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
Seller Ships to My Country Store: Stellar Bricks
BrickLink Discussions Moderator (?)
In Technical Issues, InanimateReason writes:
  If I call the api without any query params, I get expected responses from the
Bricklink API.

e.g. https://api.bricklink.com/api/store/v1/items/set/9644-1/subsets

However, if I add any of color_id, box, instruction, break_minifigs, break_subsets,
I get a 200 response but no response body. Header says content length is 104
bytes so that jives with the missing body.

e.g.
https://api.bricklink.com/api/store/v1/items/set/9644-1/subsets?instruction=true
https://api.bricklink.com/api/store/v1/items/set/7644-1/subsets?instruction=true&break_minifigs=false

I am following examples at https://www.bricklink.com/v3/api.page?page=get-subsets

I tried urlencoding the query string and sent
https://api.bricklink.com/api/store/v1/items/set/9644-1/subsets?instruction%3Dtrue%26break_minifigs%3Dtrue
but get the same result.

This is my own code.

Does anyone have a working example or suggestions?

Bill

It works fine for me:
 
 Author: InanimateReason View Messages Posted By InanimateReason
 Posted: Apr 12, 2023 17:41
 Subject: Re: Bricklink API Parameters failing for subsets
 Viewed: 22 times
 Topic: Technical Issues
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

InanimateReason (3456)

Location:  USA, Georgia
Member Since Contact Type Status
Oct 8, 2006 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
Seller Ships to My Country Store: Inanimate Reason
Weird. I'll have to dig into it a bit more.

Thanks for checking.
 Author: InanimateReason View Messages Posted By InanimateReason
 Posted: Apr 13, 2023 08:09
 Subject: Re: Bricklink API Parameters failing for subsets
 Viewed: 25 times
 Topic: Technical Issues
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

InanimateReason (3456)

Location:  USA, Georgia
Member Since Contact Type Status
Oct 8, 2006 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
Seller Ships to My Country Store: Inanimate Reason
Turns out I was forgetting to send the query params to the OAuth function. It
was failing when I added the params to any call but was always fine without them.

I would have caught it earlier given a more obvious response but getting back
a 200 code kept me from looking at that.

Thanks again for your response.

In Technical Issues, Stellar writes:
  
It works fine for me: