Skip to main content

Update an Order

PUT 

https://useast.api.elasticpath.com/v2/orders/:orderID

You can only update custom data, shipping, shipping_address, and status of orders. All other settings in the order object are immutable.

This endpoint allows you to:

  • Update an order number and external reference: You can update an existing order that does not have an order_number and external_ref, modify the order_number and external_ref values, or remove them by passing an empty value in the order_number and external_ref fields.
  • Cancel an order: You can cancel an order only if it has not been fulfilled.
  • Fulfill an order: You can fulfill a paid order only.
caution

You can update shipping, shipping_address, and status of an order only if the order is not fulfilled. You can use the refund API to refund an order only if the payment status is paid. Canceling an order does not automatically refund a payment. You must refund the orders manually.

note
  • This request is only accessible to client credentials token users with Seller Admin role.
  • Non client credentials token users cannot access this endpoint. See Permissions.
  • The order_number will appear as the invoice number in Authorize.net transactions.

Request

Responses

OK

Authorization: http

name: bearerAuthtype: httpscheme: bearer
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "https://useast.api.elasticpath.com/v2/orders/:orderID");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"data\": {\n \"order_number\": \"string\",\n \"external_ref\": \"string\",\n \"shipping_address\": {\n \"first_name\": \"string\",\n \"last_name\": \"string\",\n \"phone_number\": \"string\",\n \"company_name\": \"string\",\n \"line_1\": \"string\",\n \"line_2\": \"string\",\n \"city\": \"string\",\n \"county\": \"string\",\n \"region\": \"string\",\n \"postcode\": \"string\",\n \"country\": \"string\",\n \"instructions\": \"string\"\n }\n }\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://useast.api.elasticpath.com
Auth
Parameters
— pathrequired
Body
{
  "data": {
    "order_number": "string",
    "external_ref": "string",
    "shipping_address": {
      "first_name": "string",
      "last_name": "string",
      "phone_number": "string",
      "company_name": "string",
      "line_1": "string",
      "line_2": "string",
      "city": "string",
      "county": "string",
      "region": "string",
      "postcode": "string",
      "country": "string",
      "instructions": "string"
    }
  }
}
ResponseClear

Click the Send API Request button above and see the response here!

We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies.