Skip to main content

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 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

Path Parameters

    orderID stringrequired

    The unique identifier of the order.

Body

    data object
    oneOf
    order_number string

    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.

    external_ref string

    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
    first_name string

    Specifies the first name of the address holder.

    last_name string

    Specifies the last name of the address holder.

    phone_number string

    Specifies the phone number of the address holder.

    company_name string

    Specifies the company name.

    line_1 string

    Specifies the first line of the address.

    line_2 string

    Specifies the second line of the address.

    city string

    Specifies the name of the city in the shipping address.

    county string

    Specifies the county of the shipping address.

    region string

    Specifies the state, province, or region of the shipping address.

    postcode string

    Specifies the postcode or ZIP code of the address.

    country string

    Specifies the country in the shipping address.

    instructions string

    Specifies any instructions provided with the shipping address.

Responses

OK

Schema
    data object
    type string

    Specifies the type of object being returned. You must use order.

    order_number string

    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.

    external_ref string

    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.

    id uuid

    Specifies the unique identifier of the order.

    status string

    Specifies the status of the order, such as incomplete, complete, processing, or cancelled.

    payment string

    Specifies the status of the payment, such as unpaid, authorized, paid, or refunded.

    shipping string

    Specifies the status of the shipment, such as fulfilled or unfulfilled.

    anonymized boolean

    Specifies if the order is anonymized.

    meta object
    timestamps object
    created_at string

    The date this was created.

    updated_at

    The date this was last updated.

    with_tax object
    amount number

    The raw total of this cart.

    currency string

    The currency set for this cart.

    formatted string

    The tax inclusive formatted total based on the currency.

    without_tax object
    amount number

    The raw total of this cart.

    currency string

    The currency set for this cart.

    formatted string

    The tax inclusive formatted total based on the currency.

    tax object
    amount number

    The raw total of this cart.

    currency string

    The currency set for this cart.

    formatted string

    The tax inclusive formatted total based on the currency.

    discount object
    amount number

    The raw total of this cart.

    currency string

    The currency set for this cart.

    formatted string

    The tax inclusive formatted total based on the currency.

    paid object
    amount number

    The raw total of this cart.

    currency string

    The currency set for this cart.

    formatted string

    The tax inclusive formatted total based on the currency.

    authorized object
    amount number

    The raw total of this cart.

    currency string

    The currency set for this cart.

    formatted string

    The tax inclusive formatted total based on the currency.

    without_discount object
    amount number

    The raw total of this cart.

    currency string

    The currency set for this cart.

    formatted string

    The tax inclusive formatted total based on the currency.

    billing_address object
    company_name string

    Company name of the billing recipient.

    country stringrequired

    Specifies the country of the billing address.

    county string

    Specifies the county of the billing address.

    first_name stringrequired

    First name of the billing recipient.

    last_name stringrequired

    Last name of the billing recipient.

    line_1 stringrequired

    First line of the billing address.

    line_2 string

    Second line of the billing address.

    postcode stringrequired

    Postcode of the billing address.

    region stringrequired

    Specifies state, province, or region of the billing address.

    contact object
    email string

    The email address of the contact.

    name string

    The name of the contact.

    shipping_address object
    company_name string

    Company of the shipping recipient.

    country stringrequired

    Specifies the country of the shipping address.

    county string

    Specifies the county of the shipping address.

    first_name stringrequired

    First name of the shipping recipient.

    last_name stringrequired

    Last name of the shipping recipient.

    line_1 stringrequired

    First line of the shipping address.

    line_2 string

    Second line of the shipping address.

    postcode stringrequired

    Post code of the shipping address.

    region stringrequired

    Specifies the state, province, or region of the shipping address.

Loading...