Discussion Forum: Thread 355821

 Author: GrayCityBricks View Messages Posted By GrayCityBricks
 Posted: Apr 2, 2024 19:43
 Subject: API example
 Viewed: 103 times
 Topic: Help
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

GrayCityBricks (606)

Location:  Germany, Schleswig-Holstein
Member Since Contact Type Status
Nov 28, 2016 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
Store: Gray City Bricks
Hello, I am interested in managing my inventory via api. Could you please provide
an example of a GET function, preferably in Python? Thank you very much.
 Author: ErwinNL View Messages Posted By ErwinNL
 Posted: Apr 3, 2024 02:33
 Subject: Re: API example
 Viewed: 44 times
 Topic: Help
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

ErwinNL (622)

Location:  Netherlands, Overijssel
Member Since Contact Type Status
Oct 27, 2019 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
Store: TheBug
In Inventories, GrayCityBricks writes:
  Hello, I am interested in managing my inventory via api. Could you please provide
an example of a GET function, preferably in Python? Thank you very much.

You can find an example code here, and I think there is also a GitHub repo.

https://www.bricklink.com/v3/api.page?page=auth

Getting inventory is just retrieving JSON data from this URL after authentication.

https://api.bricklink.com/api/store/v1/inventories/392783099

That is the easy part, authentication is the tricky one.

I haven't used Python in years, so I cannot give you a complete example of
that language.
 Author: ErwinNL View Messages Posted By ErwinNL
 Posted: Apr 3, 2024 02:48
 Subject: Re: API example
 Viewed: 60 times
 Topic: Help
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

ErwinNL (622)

Location:  Netherlands, Overijssel
Member Since Contact Type Status
Oct 27, 2019 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
Store: TheBug
In Inventories, ErwinNL writes:
  In Inventories, GrayCityBricks writes:
  Hello, I am interested in managing my inventory via api. Could you please provide
an example of a GET function, preferably in Python? Thank you very much.

You can find an example code here, and I think there is also a GitHub repo.

https://www.bricklink.com/v3/api.page?page=auth

Getting inventory is just retrieving JSON data from this URL after authentication.

https://api.bricklink.com/api/store/v1/inventories/392783099

That is the easy part, authentication is the tricky one.

I haven't used Python in years, so I cannot give you a complete example of
that language.

https://github.com/BrickBytes/bricklink_api
 Author: GrayCityBricks View Messages Posted By GrayCityBricks
 Posted: Apr 3, 2024 08:47
 Subject: Re: API example
 Viewed: 57 times
 Topic: Help
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

GrayCityBricks (606)

Location:  Germany, Schleswig-Holstein
Member Since Contact Type Status
Nov 28, 2016 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
Store: Gray City Bricks
Thank you very much. I'm going to try that.