{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://aha.is/schemas/woocommerce-plugin/order-status.request.schema.json",
  "title": "Aha -> plugin order delivery status",
  "description": "Body of POST wp-json/aha-is-for-woocommerce/v1/orders/status. The request carries the hmac-spec headers, signed with the Connect order key, and X-Aha-Event-Id: status_<aha_order_id>_<status>. The plugin adds a private order note. DELIVERED also completes an order that is not completed, cancelled, refunded or failed.",
  "type": "object",
  "additionalProperties": false,
  "required": ["aha_order_id", "status", "occurred_at"],
  "properties": {
    "aha_order_id": {
      "description": "The aha_order_id of an order that POST wp-json/aha-is-for-woocommerce/v1/orders created.",
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "status": {
      "description": "Aha delivery status.",
      "type": "string",
      "enum": ["RECEIVED", "PREPARING", "PICKUP_READY", "EN_ROUTE", "DELIVERED"]
    },
    "occurred_at": {
      "description": "ISO 8601 time when the status changed on Aha.",
      "type": "string",
      "format": "date-time"
    }
  }
}
