Discussion Forum: Thread 351771

 Author: OurBricks View Messages Posted By OurBricks
 Posted: Dec 21, 2023 16:10
 Subject: API to update Status of Placed Order
 Viewed: 59 times
 Topic: Related Software
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

OurBricks (10819)

Location:  USA, Wisconsin
Member Since Contact Type Status
Mar 15, 2004 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
Store: Rix Brix
Has anyone had success using the Update Order Status API call to update the status
of a Placed order? I'm trying to use almost the exact same code that
I use to update the status of Received orders, but I keep getting a "The
remote server returned an error: (404) Not Found." error.
 Author: hedgehog_bricks View Messages Posted By hedgehog_bricks
 Posted: Dec 21, 2023 19:02
 Subject: Re: API to update Status of Placed Order
 Viewed: 33 times
 Topic: Related Software
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

hedgehog_bricks (1850)

Location:  United Kingdom, England
Member Since Contact Type Status
Nov 29, 2008 Member Does Not Allow Contact Seller
Buying Privileges - OKSelling Privileges - OK
Store Closed Store: Hedgehog Bricks
In Related Software, OurBricks writes:
  Has anyone had success using the Update Order Status API call to update the status
of a Placed order? I'm trying to use almost the exact same code that
I use to update the status of Received orders, but I keep getting a "The
remote server returned an error: (404) Not Found." error.

It works fine for me, using PUT https://api.bricklink.com/api/store/v1/orders/12345678/status

where 12345678 is the order number.

Make sure you're using the PUT method.

The body should look like

{
"field": "status",
"value": "PACKED"
}

replacing "PACKED" with the status you want.

Jonathan
 Author: kaat View Messages Posted By kaat
 Posted: Dec 24, 2023 13:59
 Subject: Re: API to update Status of Placed Order
 Viewed: 22 times
 Topic: Related Software
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

kaat (8649)

Location:  Netherlands, Zuid-Holland
Member Since Contact Type Status
Jul 19, 2016 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
Store: ilovebricks.nl
In Related Software, hedgehog_bricks writes:
  In Related Software, OurBricks writes:
  Has anyone had success using the Update Order Status API call to update the status
of a Placed order? I'm trying to use almost the exact same code that
I use to update the status of Received orders, but I keep getting a "The
remote server returned an error: (404) Not Found." error.

It works fine for me, using PUT https://api.bricklink.com/api/store/v1/orders/12345678/status

where 12345678 is the order number.

Make sure you're using the PUT method.

The body should look like

{
"field": "status",
"value": "PACKED"
}

replacing "PACKED" with the status you want.

Jonathan

Hi Jonathan,

Does this work for you with an order that you placed in another store? What you
describe works, but only for orders that are placed in my store. That is most
likely what OurBricks also experiences. The exact same code for an order I placed
in another store returns a RESOURCE_NOT_FOUND. Sounds like a bug.

Kaat
 Author: 1001bricks View Messages Posted By 1001bricks
 Posted: Dec 24, 2023 15:23
 Subject: (Cancelled)
 Viewed: 20 times
 Topic: Related Software
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

1001bricks (52270)

Location:  France, Provence-Alpes-Côte d'Azur
Member Since Contact Type Status
Sep 6, 2005 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
Store: 1001bricks
(Cancelled)
 Author: 1001bricks View Messages Posted By 1001bricks
 Posted: Dec 24, 2023 15:24
 Subject: Re: API to update Status of Placed Order
 Viewed: 28 times
 Topic: Related Software
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

1001bricks (52270)

Location:  France, Provence-Alpes-Côte d'Azur
Member Since Contact Type Status
Sep 6, 2005 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
Store: 1001bricks
  Hi Jonathan,

Does this work for you with an order that you placed in another store? What you
describe works, but only for orders that are placed in my store. That is most
likely what OurBricks also experiences. The exact same code for an order I placed
in another store returns a RESOURCE_NOT_FOUND. Sounds like a bug.

Kaat

If it's confirmed to be the case, and IMHO as it's a Seller API or was
built in this idea (see TOS: Registered sellers of the Website ( "BrickLink
Sellers" ) may register to the API.
) then it simply doesn't work
- by design - when you're using it "as a buyer" or for a
Placed order.
 Author: OurBricks View Messages Posted By OurBricks
 Posted: Dec 25, 2023 17:18
 Subject: Re: API to update Status of Placed Order
 Viewed: 25 times
 Topic: Related Software
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

OurBricks (10819)

Location:  USA, Wisconsin
Member Since Contact Type Status
Mar 15, 2004 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
Store: Rix Brix
The reason I wanted to use the API to set the status (only Received or Completed)
of an order as a Buyer, is that I'm adding an enhancement to the Brick Seller
software that allows a seller to "Part Out" an order they placed with
a different seller and then set the order status to Completed after the Part
Out is done.

I completely agree that only a seller should be able to update the status for
an order to the other status values, but a buyer that is also a seller should
be able to set the status of a placed order to Received or Completed (as they
can via the BrickLink website).

I assume that the developers of the BrickLink API never thought there would be
a need to update the status of a placed order via the API.

In Related Software, 1001bricks writes:
  
  Hi Jonathan,

Does this work for you with an order that you placed in another store? What you
describe works, but only for orders that are placed in my store. That is most
likely what OurBricks also experiences. The exact same code for an order I placed
in another store returns a RESOURCE_NOT_FOUND. Sounds like a bug.

Kaat

If it's confirmed to be the case, and IMHO as it's a Seller API or was
built in this idea (see TOS: Registered sellers of the Website ( "BrickLink
Sellers" ) may register to the API.
) then it simply doesn't work
- by design - when you're using it "as a buyer" or for a
Placed order.
 Author: 1001bricks View Messages Posted By 1001bricks
 Posted: Dec 25, 2023 19:21
 Subject: Re: API to update Status of Placed Order
 Viewed: 22 times
 Topic: Related Software
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

1001bricks (52270)

Location:  France, Provence-Alpes-Côte d'Azur
Member Since Contact Type Status
Sep 6, 2005 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
Store: 1001bricks
  I assume that the developers of the BrickLink API never thought there would be
a need to update the status of a placed order via the API.

Again, it's been probably developed as a seller API, so it may not work with
Placed orders.

Much more, it seems to me the problem you've could be:
https://en.wikipedia.org/wiki/XY_problem

In short, I wouldn't count on a BrickLink status (and wouldn't change
it), but would implement an internal flag for done/undone, or any other solution.

In other words, don't make BrickLink work another way, better manage it differently
yourself?

Good luck!
 Author: ghyde View Messages Posted By ghyde
 Posted: Dec 23, 2023 14:45
 Subject: Re: API to update Status of Placed Order
 Viewed: 37 times
 Topic: Related Software
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

ghyde (203)

Location:  Australia, Queensland
Member Since Contact Type Status Collage
May 10, 2003 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
View Collage Pic
Store: Far North Bricks
In Related Software, OurBricks writes:
  Has anyone had success using the Update Order Status API call to update the status
of a Placed order? I'm trying to use almost the exact same code that
I use to update the status of Received orders, but I keep getting a "The
remote server returned an error: (404) Not Found." error.

The API handling code should be able to interpret whether the order should be
paid using PayPal Onsite. If the API tries to update the order and it is a PayPal
Onsite payment, and the buyer did not pay using PayPal Onsite, for example the
buyer sent the payment to the seller's PayPal address via the PayPal website
but not using the BrickLink payment link on their Orders Received page, then
the API handler should flag that as an issue to the seller and inform them that
they need to contact the buyer to resolve this issue.

It is a legal requirement that BrickLink collect taxes on orders when required
to do so, it is tax evasion if this payment is not collected by BrickLink.

Cheers ...

ghyde