Skip to main content

Update Order

PUT 

https://embedded.runalloy.com/2024-03/one/commerce/orders/:orderId

Update order for a specified connection

Request

Path Parameters

    orderId stringrequired

    The order ID of the order item

Query Parameters

    credentialId stringrequired

    The ID of the credential.

Header Parameters

    Authorization stringrequired

    Default value: bearer YOUR_API_KEY

Body

    orderNumber string

    A string used to retrieve orders with a specific order number.

    orderStatus string

    A string used to retrieve orders with a specific order status.

    fulfillmentStatus string

    A string used to retrieve orders with a specific fulfillment status.

    totalShipping double

    A specific value used to retrieve orders with a matching shipping total.

    totalDiscount double

    A specific value used to retrieve orders with a matching discount total.

    totalTax double

    A specific value used to retrieve orders with a matching tax total.

    totalPrice double

    A specific value used to retrieve orders with a matching total price.

    currency string

    A string used to retrieve orders with a specific currency.

    lineItems

    object[]

    An array of objects, each representing a line item in the order.

  • Array [

  • productId string
    variantId string

    Most commerce platforms require this field to properly identify products

    title stringrequired
    price doublerequired
    unitCost string
    currency string
    sku string
    quantity int32required
  • ]

  • paymentStatus string

    A string used to retrieve orders with a specific payment status.

    billingAddress

    object

    An object representing the billing address of the customer.

    address1 stringrequired

    A string representing the first line of the billing address.

    address2 string

    An optional string representing additional address information.

    city stringrequired

    A string representing the city of the billing address.

    countryCode string

    A string representing the country code of the billing address.

    firstName stringrequired

    A string representing the first name of the person associated with the billing address.

    lastName stringrequired

    A string representing the last name of the person associated with the billing address.

    phone stringrequired

    A string representing the phone number associated with the billing address.

    region string

    A string representing the region (e.g. state, province) of the billing address.

    postalCode stringrequired

    A string representing the postal code of the billing address.

    shippingAddress

    object

    An object representing the shipping address of the customer.

    address1 stringrequired

    A string representing the first line of the billing address.

    address2 string

    An optional string representing additional address information.

    city stringrequired

    A string representing the city of the billing address.

    countryCode string

    A string representing the country code of the billing address.

    firstName string

    A string representing the first name of the person associated with the billing address.

    lastName stringrequired

    A string representing the last name of the person associated with the billing address.

    phone string

    A string representing the phone number associated with the billing address.

    region string

    A string representing the region (e.g. state, province) of the billing address.

    postalCode string

    A string representing the postal code of the billing address.

    customer

    object

    An object representing the customer who placed the order.

    customerId string

    A unique identifier for the customer.

    firstName string

    The first name of the customer.

    lastName string

    The last name of the customer.

    email stringrequired

    The email address of the customer.

    phone string

    The phone number of the customer.

    remoteFields json

    An object containing remote fields that are not supported by the common model. The keys are the names of the fields of the corresponding resource in the remote app, and the values can be strings, numbers, arrays or objects.

Responses

200

{
"order": {
"id": "00000000-0000-0000-0000-000000000000",
"remoteId": "2191357149242",
"orderStatus": "Active",
"lineItems": [
{
"quantity": 1,
"productId": "4463254208570",
"price": "1000.00",
"unitCost": "",
"currency": "USD",
"variantId": "31586061353018",
"title": "T-Shirt",
"sku": "shirt-01"
}
],
"orderNumber": "1001",
"paymentStatus": "Paid",
"customer": {
"customerId": "3046096732218",
"firstName": "Chase",
"lastName": "Red",
"phone": "",
"email": "chasered@runalloy.com"
},
"currency": "USD",
"totalPrice": "1000.00",
"totalDiscount": "0.00",
"totalShipping": "0.00",
"totalTax": "0.00",
"fulfillmentStatus": "unfulfilled",
"remoteCreatedAt": "2023-11-19T17:00:17.000Z",
"remoteUpdatedAt": "2023-11-19T17:00:17.000Z",
"remoteDeleted": false,
"createdAt": "2024-02-22T11:17:53.264Z",
"updatedAt": "2024-02-22T13:54:03.445Z"
}
}
curl -L -X PUT 'https://embedded.runalloy.com/2024-03/one/commerce/orders/:orderId' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"orderNumber": "string",
"orderStatus": "string",
"fulfillmentStatus": "string",
"totalShipping": 0,
"totalDiscount": 0,
"totalTax": 0,
"totalPrice": 0,
"currency": "string",
"lineItems": [
{
"productId": "string",
"variantId": "string",
"title": "string",
"price": 0,
"unitCost": "string",
"currency": "string",
"sku": "string",
"quantity": 0
}
],
"paymentStatus": "string",
"billingAddress": {
"address1": "string",
"address2": "string",
"city": "string",
"countryCode": "string",
"firstName": "string",
"lastName": "string",
"phone": "string",
"region": "string",
"postalCode": "string"
},
"shippingAddress": {
"address1": "string",
"address2": "string",
"city": "string",
"countryCode": "string",
"firstName": "string",
"lastName": "string",
"phone": "string",
"region": "string",
"postalCode": "string"
},
"customer": {
"customerId": "string",
"firstName": "string",
"lastName": "string",
"email": "string",
"phone": "string"
},
"remoteFields": "string"
}'
Request Collapse all
Base URL
https://embedded.runalloy.com/2024-03/one
Parameters
— pathrequired
— queryrequired
— headerrequired
Body
{
  "orderNumber": "string",
  "orderStatus": "string",
  "fulfillmentStatus": "string",
  "totalShipping": 0,
  "totalDiscount": 0,
  "totalTax": 0,
  "totalPrice": 0,
  "currency": "string",
  "lineItems": [
    {
      "productId": "string",
      "variantId": "string",
      "title": "string",
      "price": 0,
      "unitCost": "string",
      "currency": "string",
      "sku": "string",
      "quantity": 0
    }
  ],
  "paymentStatus": "string",
  "billingAddress": {
    "address1": "string",
    "address2": "string",
    "city": "string",
    "countryCode": "string",
    "firstName": "string",
    "lastName": "string",
    "phone": "string",
    "region": "string",
    "postalCode": "string"
  },
  "shippingAddress": {
    "address1": "string",
    "address2": "string",
    "city": "string",
    "countryCode": "string",
    "firstName": "string",
    "lastName": "string",
    "phone": "string",
    "region": "string",
    "postalCode": "string"
  },
  "customer": {
    "customerId": "string",
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "phone": "string"
  },
  "remoteFields": "string"
}
ResponseClear

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