API Referencev1OrdersBy ID

Update order status

Update order or payment status. Orders are NOT created via API.

PATCH
/v1/orders/{id}
X-API-Key<token>

Per-store API key created in the dashboard at Settings > Developer > API Keys.

In: header

Path Parameters

id*string
Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "https://api.whatalo.com/v1/orders/472819365047" \  -H "Content-Type: application/json" \  -d '{}'
{
  "data": {
    "id": "819365047283",
    "order_number": 1042,
    "status": "pending",
    "payment_status": "pending",
    "payment_method": "cod",
    "shipping_method": "string",
    "currency": "COP",
    "customer_id": "365047281936",
    "customer_name": "Juan García",
    "customer_phone": "+573001234567",
    "customer_email": "[email protected]",
    "subtotal": 5000,
    "discount_amount": 0,
    "shipping_cost": 200,
    "tax_amount": 0,
    "total": 5200,
    "customer_notes": "string",
    "internal_notes": "string",
    "shipping_address": {
      "name": "string",
      "phone": "string",
      "address": "string",
      "city": "string",
      "province": "string",
      "country": "string",
      "postal_code": "string",
      "notes": "string"
    },
    "country_code": "string",
    "is_pending": true,
    "is_completed": true,
    "is_cancellable": true,
    "item_count": 0,
    "is_fully_paid": true,
    "completed_at": "string",
    "created_at": "string",
    "updated_at": "string",
    "items": [
      {
        "id": "string",
        "product_id": "string",
        "variant_id": "string",
        "product_name": "string",
        "variant_name": "string",
        "quantity": 0,
        "unit_price": 0,
        "total_price": 0,
        "created_at": "string"
      }
    ]
  }
}
{
  "error": {
    "code": "FEATURE_ACCESS_DENIED",
    "message": "\"Control de Inventario\" requiere un plan premium. Actualiza tu plan para acceder a esta función.",
    "details": {
      "feature": "inventory"
    }
  }
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request body",
    "details": [
      {
        "field": "string",
        "message": "string"
      }
    ]
  }
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request body",
    "details": [
      {
        "field": "string",
        "message": "string"
      }
    ]
  }
}