OrderOrderLinesModificationUpdated
v0.0.1

OrderOrderLinesModificationUpdated

This event is triggered when an order lines modification has been updated, this will include when the operation is e.g. started, restarted, completed, or failed.

If only the final outcome events are desired, we recommend listening for OrderLinesModified, or OrderLinesModifiedFailed.

OrderOrderLinesModificationUpdated Schema (json)
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "OrderOrderLinesModificationChanged",
  "required": ["detail-type", "resources", "detail", "id", "source", "time", "region", "version", "account"],
  "type": "object",
  "properties": {
    "account": {
      "type": "string"
    },
    "detail": {
      "$ref": "#/definitions/Detail"
    },
    "detail-type": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "region": {
      "type": "string"
    },
    "resources": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "source": {
      "type": "string"
    },
    "time": {
      "format": "date-time",
      "type": "string"
    },
    "version": {
      "type": "string"
    }
  },
  "definitions": {
    "Detail": {
      "properties": {
        "data": {
          "$ref": "#/definitions/Data"
        },
        "metadata": {
          "$ref": "#/definitions/Metadata"
        }
      },
      "required": ["metadata", "data"],
      "type": "object"
    },
    "Metadata": {
      "type": "object",
      "required": ["awsRequestId"],
      "properties": {
        "awsRequestId": {
          "type": "string"
        },
        "isTruncated": {
          "type": "boolean"
        }
      }
    },
    "Data": {
      "$ref": "#/definitions/OrderOrderLinesModification"
    },
    "OrderOrderLinesModification": {
      "type": "object",
      "required": [
        "id",
        "orderId",
        "orderReference",
        "paymentProvider",
        "orderLines",
        "created",
        "updated",
        "restarts",
        "revision"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The order lines modification id"
        },
        "orderId": {
          "type": "string",
          "description": "The order id"
        },
        "orderReference": {
          "type": "string",
          "description": "The order short reference"
        },
        "paymentProvider": {
          "$ref": "#/definitions/ProviderStatus"
        },
        "shippingProvider": {
          "$ref": "#/definitions/ProviderStatus"
        },
        "giftCardProvider": {
          "$ref": "#/definitions/ProviderStatus"
        },
        "giftCardProductProvider": {
          "$ref": "#/definitions/ProviderStatus"
        },
        "voucherProvider": {
          "$ref": "#/definitions/ProviderStatus"
        },
        "promotionProvider": {
          "$ref": "#/definitions/ProviderStatus"
        },
        "bonusProvider": {
          "$ref": "#/definitions/ProviderStatus"
        },
        "orderLines": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/OrderLineModification"
          }
        },
        "reason": {
          "$ref": "#/definitions/Reason"
        },
        "created": {
          "type": "string",
          "format": "date-time",
          "description": "Created date for the order lines modification"
        },
        "updated": {
          "type": "string",
          "format": "date-time",
          "description": "Updated date for the order lines modification"
        },
        "started": {
          "type": "string",
          "format": "date-time",
          "description": "Started date for the order lines modification"
        },
        "completed": {
          "type": "string",
          "format": "date-time",
          "description": "Completed date for the order lines modification"
        },
        "failed": {
          "type": "string",
          "format": "date-time",
          "description": "Failed date for the order lines modification"
        },
        "restarted": {
          "type": "string",
          "format": "date-time",
          "description": "Restarted date for the order lines modification"
        },
        "restarts": {
          "description": "The number of restarts",
          "type": "integer"
        },
        "revision": {
          "description": "The revision number of the order lines modification",
          "type": "integer"
        }
      }
    },
    "ProviderStatus": {
      "type": "object",
      "required": ["providerId", "providerName"],
      "properties": {
        "providerId": {
          "type": "string",
          "description": "The id for the provider"
        },
        "providerName": {
          "type": "string",
          "description": "The name of the provider"
        },
        "status": {
          "$ref": "#/definitions/ProviderStatusLog"
        }
      }
    },
    "ProviderStatusLog": {
      "type": "object",
      "required": ["current", "history"],
      "properties": {
        "current": {
          "type": "string",
          "description": "The latest status for the provider"
        },
        "history": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ProviderStatusLogEntry"
          }
        }
      }
    },
    "ProviderStatusLogEntry": {
      "type": "object",
      "required": ["status", "timestamp", "type"],
      "properties": {
        "message": {
          "type": "string",
          "description": "Optional message for the status"
        },
        "errorMessage": {
          "type": "string",
          "description": "Optional error message from the provider"
        },
        "status": {
          "type": "string",
          "description": "The actual status"
        },
        "timestamp": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp for the status"
        },
        "type": {
          "type": "string",
          "description": "Status type"
        }
      }
    },
    "Reason": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "description": "Optional code for the reason, useful for BI tracking"
        },
        "cause": {
          "type": "string",
          "description": "Optional human readable cause for the reason"
        }
      }
    },
    "ModificationType": {
      "title": "ModificationType",
      "type": "string",
      "enum": ["CREATE", "UPDATE", "DELETE"]
    },
    "OrderLineModification": {
      "type": "object",
      "required": ["modificationType", "data"],
      "properties": {
        "modificationType": {
          "$ref": "#/definitions/ModificationType"
        },
        "data": {
          "oneOf": [
            {
              "$ref": "#/definitions/OrderLineModificationCreate"
            },
            {
              "$ref": "#/definitions/OrderLineModificationUpdate"
            },
            {
              "$ref": "#/definitions/OrderLineModificationDelete"
            }
          ]
        },
        "prev": {
          "$ref": "#/definitions/OrderLineModificationUpdatePrevious"
        }
      }
    },
    "OrderLineModificationCreate": {
      "type": "object",
      "required": [
        "id",
        "name",
        "description",
        "imageUrl",
        "quantity",
        "basePriceAmount",
        "salePriceAmount",
        "discountAmount",
        "taxPercentage",
        "taxPercentageDecimals",
        "totalPriceAmount",
        "totalDiscountAmount",
        "totalTaxAmount",
        "distributedTotalPriceAmount",
        "distributedTotalDiscountAmount",
        "distributedTotalTaxAmount"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The id for the created order line"
        },
        "name": {
          "type": "string",
          "description": "The name for the created order line"
        },
        "description": {
          "type": "string",
          "description": "The description for the created order line"
        },
        "productParentId": {
          "type": "string",
          "description": "Optional productParentId for the created order line"
        },
        "productVariantId": {
          "type": "string",
          "description": "Optional productVariantId for the created order line"
        },
        "taxGroupId": {
          "type": "string",
          "description": "Optional taxGroupId for the created order line"
        },
        "imageUrl": {
          "type": "string",
          "description": "The imageUrl for the created order line"
        },
        "options": {
          "$ref": "#/definitions/Options"
        },
        "campaign": {
          "$ref": "#/definitions/Campaign"
        },
        "quantity": {
          "type": "integer",
          "description": "The quantity of the created order line"
        },
        "basePriceAmount": {
          "type": "integer",
          "description": "Per unit base price of the created order line"
        },
        "salePriceAmount": {
          "type": "integer",
          "description": "Per unit sale price of the created order line"
        },
        "discountAmount": {
          "type": "integer",
          "description": "Calculated per unit discount amount of the order line `basePriceAmount` - `salePriceAmount`"
        },
        "taxPercentage": {
          "type": "integer",
          "description": "Tax percentage for the order line"
        },
        "taxPercentageDecimals": {
          "type": "integer",
          "description": "Optional number of decimals in `taxPercentage`. Default 2"
        },
        "totalPriceAmount": {
          "type": "integer",
          "description": "Total amount of the created order line"
        },
        "totalDiscountAmount": {
          "type": "integer",
          "description": "Total discount amount of the created order line"
        },
        "totalTaxAmount": {
          "type": "integer",
          "description": "Total tax amount for the order line"
        },
        "distributedTotalPriceAmount": {
          "type": "integer",
          "description": "Total amount of the created order line including distributed order discount"
        },
        "distributedTotalDiscountAmount": {
          "type": "integer",
          "description": "Total discount amount of the created order line including distributed order discount"
        },
        "distributedTotalTaxAmount": {
          "type": "integer",
          "description": "Total tax amount of the created order line based on `distributedTotalPriceAmount`"
        }
      }
    },
    "OrderLineModificationUpdatePrevious": {
      "allOf": [
        {
          "$ref": "#/definitions/OrderLineModificationUpdate"
        }
      ],
      "description": "Read only field containing the previous data"
    },
    "OrderLineModificationUpdate": {
      "type": "object",
      "required": ["id"],
      "properties": {
        "id": {
          "type": "string",
          "description": "The id for the updated order line"
        },
        "name": {
          "type": "string",
          "description": "Updated name for the order line"
        },
        "displayName": {
          "type": "string",
          "description": "Updated displayName for the order line"
        },
        "description": {
          "type": "string",
          "description": "Updated description for the order line"
        },
        "displayDescription": {
          "type": "string",
          "description": "Updated displayDescription for the order line"
        },
        "productParentId": {
          "type": "string",
          "description": "Updated productParentId for the order line"
        },
        "productVariantId": {
          "type": "string",
          "description": "Updated productVariantId for the order line"
        },
        "taxGroupId": {
          "type": "string",
          "description": "Updated taxGroupId for the order line"
        },
        "imageUrl": {
          "type": "string",
          "description": "Updated imageUrl for the order line"
        },
        "options": {
          "$ref": "#/definitions/Options"
        },
        "campaign": {
          "$ref": "#/definitions/Campaign"
        },
        "price": {
          "$ref": "#/definitions/OrderLineModificationUpdatePrice"
        }
      }
    },
    "OrderLineModificationUpdatePrice": {
      "type": "object",
      "required": [
        "quantity",
        "basePriceAmount",
        "salePriceAmount",
        "discountAmount",
        "taxPercentage",
        "taxPercentageDecimals",
        "totalPriceAmount",
        "totalDiscountAmount",
        "totalTaxAmount",
        "distributedTotalPriceAmount",
        "distributedTotalTaxAmount",
        "distributedTotalDiscountAmount"
      ],
      "properties": {
        "quantity": {
          "type": "integer",
          "description": "Updated quantity of the order line"
        },
        "basePriceAmount": {
          "type": "integer",
          "description": "Updated per unit base price of the created order line"
        },
        "salePriceAmount": {
          "type": "integer",
          "description": "Updated per unit sale price of the created order line"
        },
        "discountAmount": {
          "type": "integer",
          "description": "Updated per unit discount amount of the order line"
        },
        "taxPercentage": {
          "type": "integer",
          "description": "Updated per tax percentage of the order line"
        },
        "taxPercentageDecimals": {
          "type": "integer",
          "description": "Updated per tax percentage decimals of the order line"
        },
        "totalPriceAmount": {
          "type": "integer",
          "description": "Updated total price amount of the order line"
        },
        "totalDiscountAmount": {
          "type": "integer",
          "description": "Updated total discount amount of the order line"
        },
        "totalTaxAmount": {
          "type": "integer",
          "description": "Updated total tax amount of the order line"
        },
        "distributedTotalPriceAmount": {
          "type": "integer",
          "description": "Updated total price amount including distributed order discounts of the order line"
        },
        "distributedTotalTaxAmount": {
          "type": "integer",
          "description": "Updated total tax amount including distributed order discounts of the order line"
        },
        "distributedTotalDiscountAmount": {
          "type": "integer",
          "description": "Updated total discount amount including distributed order discounts of the order line"
        }
      }
    },
    "OrderLineModificationDelete": {
      "type": "object",
      "required": [
        "id",
        "name",
        "displayName",
        "description",
        "displayDescription",
        "imageUrl",
        "quantity",
        "basePriceAmount",
        "salePriceAmount",
        "discountAmount",
        "taxPercentage",
        "taxPercentageDecimals",
        "totalPriceAmount",
        "totalDiscountAmount",
        "totalTaxAmount",
        "distributedTotalPriceAmount",
        "distributedTotalDiscountAmount",
        "distributedTotalTaxAmount"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The id for the deleted order line"
        },
        "name": {
          "type": "string",
          "description": "The name for the deleted order line"
        },
        "displayName": {
          "type": "string",
          "description": "The display name for the deleted order line"
        },
        "description": {
          "type": "string",
          "description": "The description for the deleted order line"
        },
        "displayDescription": {
          "type": "string",
          "description": "The display description for the deleted order line"
        },
        "productParentId": {
          "type": "string",
          "description": "Optional productParentId for the deleted order line"
        },
        "productVariantId": {
          "type": "string",
          "description": "Optional productVariantId for the deleted order line"
        },
        "taxGroupId": {
          "type": "string",
          "description": "Optional taxGroupId for the deleted order line"
        },
        "imageUrl": {
          "type": "string",
          "description": "The imageUrl for the deleted order line"
        },
        "options": {
          "$ref": "#/definitions/Options"
        },
        "campaign": {
          "$ref": "#/definitions/Campaign"
        },
        "quantity": {
          "type": "integer",
          "description": "The quantity of the deleted order line"
        },
        "basePriceAmount": {
          "type": "integer",
          "description": "Per unit base price of the deleted order line"
        },
        "salePriceAmount": {
          "type": "integer",
          "description": "Per unit sale price of the deleted order line"
        },
        "discountAmount": {
          "type": "integer",
          "description": "Calculated per unit discount amount of the deleted order line `basePriceAmount` - `salePriceAmount`"
        },
        "taxPercentage": {
          "type": "integer",
          "description": "Tax percentage for the deleted order line"
        },
        "taxPercentageDecimals": {
          "type": "integer",
          "description": "Optional number of decimals in `taxPercentage`. Default 2"
        },
        "totalPriceAmount": {
          "type": "integer",
          "description": "Total price amount of the deleted order line"
        },
        "totalDiscountAmount": {
          "type": "integer",
          "description": "Total discount amount of the deleted order line"
        },
        "totalTaxAmount": {
          "type": "integer",
          "description": "Total tax amount for the deleted order line"
        },
        "distributedTotalPriceAmount": {
          "type": "integer",
          "description": "Total amount of the deleted order line including distributed order discount"
        },
        "distributedTotalDiscountAmount": {
          "type": "integer",
          "description": "Total discount amount of the deleted order line including distributed order discount"
        },
        "distributedTotalTaxAmount": {
          "type": "integer",
          "description": "Total tax amount of the deleted order line based on `distributedTotalPriceAmount`"
        }
      }
    },
    "Options": {
      "type": ["object", "null"],
      "description": "Order line options",
      "patternProperties": {
        "^[A-Za-z0-9_-]{1,40}$": {
          "type": "string",
          "maxLength": 256
        }
      },
      "additionalProperties": false,
      "maxProperties": 10
    },
    "Campaign": {
      "type": "object",
      "required": ["campaignId", "name", "campaignGroupId"],
      "properties": {
        "campaignId": {
          "type": "string",
          "description": "The campaign id"
        },
        "name": {
          "type": "string",
          "description": "The name of the campaign"
        },
        "campaignGroupId": {
          "type": "string",
          "description": "The campaign group id"
        }
      }
    }
  }
}
Last updated on 2026/3/3