Update an Order
PUT/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
andexternal_ref
, modify theorder_number
andexternal_ref
values, or remove them by passing an empty value in theorder_number
andexternal_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.
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.
- 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
Path Parameters
The unique identifier of the order.
- application/json
Body
- OrdersAddressData
- OrdersCancelData
- OrdersFulfilledData
data object
Specifies a user-managed, optional field used as an alternative to the existing order_id. If provided, the order-number will be sent to Authorize.net instead of the order_id, and will appear as the invoice number in Authorize.net transactions.
Represents an optional external ID reference for an order. It can contain alphanumeric characters, special characters, and spaces, and is not required to be unique. The maximum allowed length is 64 characters. It can be used to include an external reference from a separate company system.
shipping_address objectrequired
Specifies the first name of the address holder.
Specifies the last name of the address holder.
Specifies the phone number of the address holder.
Specifies the company name.
Specifies the first line of the address.
Specifies the second line of the address.
Specifies the name of the city in the shipping address.
Specifies the county of the shipping address.
Specifies the state, province, or region of the shipping address.
Specifies the postcode or ZIP code of the address.
Specifies the country in the shipping address.
Specifies any instructions provided with the shipping address.
The status of the order. You can only update the status to cancelled
.
The type of the resource. You must use order.
Represents an optional external ID reference for an order. It can contain alphanumeric characters, special characters, and spaces, and is not required to be unique. The maximum allowed length is 64 characters. It can be used to include an external reference from a separate company system.
The shipping status of the order. You can only update the shipping status to fulfilled
.
The type of the resource. You must use order.
Represents an optional external ID reference for an order. It can contain alphanumeric characters, special characters, and spaces, and is not required to be unique. The maximum allowed length is 64 characters. It can be used to include an external reference from a separate company system.
Responses
- 200
- 401
OK
- application/json
- Schema
- Example (from schema)
Schema
data object
Specifies the type of object being returned. You must use order
.
Specifies a user-managed, optional field used as an alternative to the existing order_id
. If provided, the order-number will be sent to Authorize.net instead of the order_id
, and will appear as the invoice number in Authorize.net transactions.
An optional external ID reference for an order. It can contain alphanumeric characters, special characters, and spaces, and is not required to be unique. The maximum allowed length is 64 characters. It can be used to include an external reference from a separate company system.
Specifies the unique identifier of the order.
Specifies the status of the order, such as incomplete
, complete
, processing
, or cancelled
.
Specifies the status of the payment, such as unpaid
, authorized
, paid
, or refunded
.
Specifies the status of the shipment, such as fulfilled
or unfulfilled
.
Specifies if the order is anonymized.
meta object
timestamps object
The date this was created.
The date this was last updated.
with_tax object
The raw total of this cart.
The currency set for this cart.
The tax inclusive formatted total based on the currency.
without_tax object
The raw total of this cart.
The currency set for this cart.
The tax inclusive formatted total based on the currency.
tax object
The raw total of this cart.
The currency set for this cart.
The tax inclusive formatted total based on the currency.
discount object
The raw total of this cart.
The currency set for this cart.
The tax inclusive formatted total based on the currency.
paid object
The raw total of this cart.
The currency set for this cart.
The tax inclusive formatted total based on the currency.
authorized object
The raw total of this cart.
The currency set for this cart.
The tax inclusive formatted total based on the currency.
without_discount object
The raw total of this cart.
The currency set for this cart.
The tax inclusive formatted total based on the currency.
billing_address object
Company name of the billing recipient.
Specifies the country of the billing address.
Specifies the county of the billing address.
First name of the billing recipient.
Last name of the billing recipient.
First line of the billing address.
Second line of the billing address.
Postcode of the billing address.
Specifies state, province, or region of the billing address.
contact object
The email address of the contact.
The name of the contact.
shipping_address object
Company of the shipping recipient.
Specifies the country of the shipping address.
Specifies the county of the shipping address.
First name of the shipping recipient.
Last name of the shipping recipient.
First line of the shipping address.
Second line of the shipping address.
Post code of the shipping address.
Specifies the state, province, or region of the shipping address.
{
"data": {
"type": "string",
"order_number": "string",
"external_ref": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "string",
"payment": "string",
"shipping": "string",
"anonymized": true,
"meta": {
"timestamps": {
"created_at": "string"
},
"with_tax": {
"amount": 0,
"currency": "string",
"formatted": "string"
},
"without_tax": {
"amount": 0,
"currency": "string",
"formatted": "string"
},
"tax": {
"amount": 0,
"currency": "string",
"formatted": "string"
},
"discount": {
"amount": 0,
"currency": "string",
"formatted": "string"
},
"paid": {
"amount": 0,
"currency": "string",
"formatted": "string"
},
"authorized": {
"amount": 0,
"currency": "string",
"formatted": "string"
},
"without_discount": {
"amount": 0,
"currency": "string",
"formatted": "string"
}
},
"billing_address": {
"company_name": "string",
"country": "string",
"county": "string",
"first_name": "string",
"last_name": "string",
"line_1": "string",
"line_2": "string",
"postcode": "string",
"region": "string"
},
"contact": {
"email": "string",
"name": "string"
},
"shipping_address": {
"company_name": "string",
"country": "string",
"county": "string",
"first_name": "string",
"last_name": "string",
"line_1": "string",
"line_2": "string",
"postcode": "string",
"region": "string"
}
}
}
Unauthorized
- application/json
- Schema
- Example (from schema)
- Example
Schema
[
null
]
{
"errors": {
"status": 401,
"title": "Unauthorized"
}
}