edit_order: Edit the data associated with an order

Description Usage Arguments Details Examples

View source: R/Marketplace.R

Description

Edit the data associated with an order

Usage

1
2
3
4
5
edit_order(
  order_id,
  token,
  options = list()
)

Arguments

order_id

The ID of the order you are fetching

token

Token object obtained from authorize() or a string containing your personal access token

options

(optional) Parameters, see Details

Details

Edit the data associated with an order. Authentication as the seller is required. The response contains a next_status key – an array of valid next statuses for this order, which you can display to the user in (for example) a dropdown control. This also renders your application more resilient to any future changes in the order status logic. Changing the order status using this resource will always message the buyer with:

1
_Seller changed status from Old Status to New Status_

and does not provide a facility for including a custom message along with the change. For more fine-grained control, use the Add a new message resource, which allows you to simultaneously add a message and change the order status. If the order status is neither cancelled, Payment Received, nor Shipped, you can change the shipping. Doing so will send an invoice to the buyer and set the order status to Invoice Sent. (For that reason, you cannot set the shipping and the order status in the same request.)

Examples

1
2
token <- authorize("key", "secret")
edit_order(1, token)

Pascallio/discogsAPI documentation built on Dec. 31, 2020, 3:27 p.m.