---
updatedAt: 2025-03-06T22:38:25.000Z
agentTools:
  projectIndex: https://developer.influence.io/llms.txt
---

# Update an order

Updates an order. If there is a place order earn rule, points will be awarded depending on financial status. If an order was previously awarded points, points will not be awarded twice for an order update. If the order status changes to refunded, points will be deducted from a customer depending on financial status settings in your Influence.io account.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Influence.io Platform API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://platform.api.influence.io"
    }
  ],
  "paths": {
    "/v1/orders/{orderId}": {
      "patch": {
        "summary": "Update an order",
        "description": "Updates an order. If there is a place order earn rule, points will be awarded depending on financial status. If an order was previously awarded points, points will not be awarded twice for an order update. If the order status changes to refunded, points will be deducted from a customer depending on financial status settings in your Influence.io account.",
        "parameters": [
          {
            "$ref": "#/components/parameters/orderIdPath"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "customerId",
                  "id"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "financialStatus": {
                    "$ref": "#/components/schemas/orderFinancialStatus"
                  },
                  "subtotal": {
                    "type": "string"
                  },
                  "total": {
                    "type": "string"
                  },
                  "refundSubtotal": {
                    "type": "string"
                  },
                  "refundTotal": {
                    "type": "string"
                  },
                  "lineItems": {
                    "$ref": "#/components/schemas/orderLineItems"
                  },
                  "discountCodes": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/discountCode"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/updatedOrder"
          },
          "404": {
            "description": "Order not found"
          }
        },
        "tags": [
          "order"
        ]
      }
    }
  },
  "components": {
    "parameters": {
      "orderIdPath": {
        "name": "orderId",
        "description": "Your internal order ID",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "updatedOrder": {
        "description": "The updated order.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "order": {
                  "$ref": "#/components/schemas/order"
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "order": {
        "title": "Order",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "shopId": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "total": {
            "type": "string",
            "description": "The sum of all line item prices, discounts, shipping, taxes, and tips in the shop currency. Must be positive."
          },
          "subtotal": {
            "type": "string",
            "description": "The price of the order in the shop currency after discounts but before shipping, duties, taxes, and tips."
          },
          "financialStatus": {
            "$ref": "#/components/schemas/orderFinancialStatus"
          },
          "pointsAwarded": {
            "type": "boolean"
          },
          "pointsAwardedAmount": {
            "type": "number"
          },
          "pointsRefunded": {
            "type": "boolean"
          },
          "pointsRefundedAmount": {
            "type": "number"
          },
          "orderName": {
            "type": "string"
          },
          "orderNumber": {
            "type": "string"
          },
          "externalId": {
            "type": "string"
          },
          "externalCreatedAt": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "orderFinancialStatus": {
        "title": "Order Financial Status",
        "type": "string",
        "enum": [
          "authorized",
          "expired",
          "paid",
          "partially_paid",
          "partially_refunded",
          "pending",
          "refunded",
          "voided"
        ]
      },
      "orderLineItems": {
        "title": "Order Line Items",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/orderLineItem"
        }
      },
      "orderLineItem": {
        "title": "Order Line Item",
        "type": "object",
        "properties": {
          "productId": {
            "type": "string"
          },
          "variantId": {
            "type": "string"
          },
          "quantity": {
            "type": "integer"
          },
          "price": {
            "type": "string",
            "description": "Unit price of the item before discounts have been applied."
          },
          "totalDiscount": {
            "type": "string",
            "description": "Total amount of discounts applied to the line item. e.g. \"3.49\""
          }
        }
      },
      "discountCode": {
        "title": "Order Discount Code",
        "type": "object",
        "required": [
          "code"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "amount": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "fixed",
              "percentage",
              "shipping"
            ]
          }
        }
      }
    },
    "securitySchemes": {
      "ApiTokenAuth": {
        "type": "apiKey",
        "name": "x-api-key",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "ApiTokenAuth": []
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```