Ometria · Schema

Order

Describes an Order record.

CompanyRetailCustomer Data PlatformAIMarketing

Properties

Name Type Description
@type string The value must be "order". This shows that this record represents an order object.
id string The order ID, max length: 36. If you exceed the character limit this field will pass validation but will appear truncated in Ometria.
timestamp string The date and time the order was placed on the site or in store. Follow ISO 8601 DateTime format with timezone offset YYYY-MM-DDThh:mm:ss+Z.
grand_total number The grand total of the order.
subtotal number The subtotal of this order after refunds have been taken.
discount number This value should be negative or 0. Not positive.
shipping number The shipping cost of this order.
tax number The tax of this order after refunds have been taken.
currency string The currency used for this order, must be 3 characters, upper case, e.g. GBP, USD. Follow ISO 4217. If left empty this field is set to 'null'.
web_id string The web ID passed through the JavaScript tracker - this is only required if the value is different to the id. max length: 32. If you exceed the character limit the field will pass validation but appea
status string Code representing the status of this order 'complete', 'pending', 'shipped' etc.
is_valid boolean Is this order considered valid and should be counted against revenue? Set to false to 'delete'.
customer object The details of the customer who placed the order.
lineitems array Array of [OrderLineItem](#definition-OrderLineItem) objects representing the items in this order.
ip_address string The IP address of the visitor who placed order (if known). max length: 64.
channel string Channel of this order. E.g., 'online', 'instore', 'amazon' etc.
store string Code representing the store the order was placed in. max length: 32
payment_method string Code representing payment method, max length: 32. If you exceed the character limit this field will pass validation but appear truncated in Ometria.
shipping_method string Code representing shipping method.
shipping_address object The address the customer used for shipping.
billing_address object The address the customer used for billing.
coupon_code string Coupon code applied to this order, max length: 128 characters. Pushed orders with a longer coupon code are rejected.
properties object Custom key / value pairs accessible in emails using this order object.
extra_identifiers arraynull Optional list of extra identifiers (such as a loyalty ID) as per your identity resolution configuration, e.g. `loyalty_id`. Custom identifiers must be configured for your account before you send them.
View JSON Schema on GitHub

JSON Schema

ometria-order-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ometria/json-schema/ometria-order-schema.json",
  "title": "Order",
  "description": "Describes an Order record.",
  "x-generated": "2026-10-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/ometria-swagger-openapi.json#/components/schemas/Order",
  "type": "object",
  "required": [
    "@type",
    "id",
    "timestamp",
    "grand_total",
    "subtotal",
    "currency"
  ],
  "properties": {
    "@type": {
      "type": "string",
      "description": "The value must be \"order\". This shows that this record represents an order object."
    },
    "id": {
      "type": "string",
      "description": "The order ID, max length: 36.\nIf you exceed the character limit this field will pass validation but will appear truncated in Ometria."
    },
    "timestamp": {
      "type": "string",
      "description": "The date and time the order was placed on the site or in store.\nFollow ISO 8601 DateTime format with timezone offset YYYY-MM-DDThh:mm:ss+Z.",
      "format": "date-time"
    },
    "grand_total": {
      "type": "number",
      "description": "The grand total of the order.",
      "format": "float"
    },
    "subtotal": {
      "type": "number",
      "description": "The subtotal of this order after refunds have been taken.",
      "format": "float"
    },
    "discount": {
      "type": "number",
      "description": "This value should be negative or 0. Not positive.",
      "format": "float"
    },
    "shipping": {
      "type": "number",
      "description": "The shipping cost of this order.",
      "format": "float"
    },
    "tax": {
      "type": "number",
      "description": "The tax of this order after refunds have been taken.",
      "format": "float"
    },
    "currency": {
      "type": "string",
      "description": "The currency used for this order, must be 3 characters, upper case, e.g. GBP, USD.\nFollow ISO 4217.\nIf left empty this field is set to 'null'.",
      "minLength": 3,
      "maxLength": 3
    },
    "web_id": {
      "type": "string",
      "description": "The web ID passed through the JavaScript tracker - this is only required if the value is different to the id.\nmax length: 32. If you exceed the character limit the field will pass validation but appear truncated in Ometria."
    },
    "status": {
      "type": "string",
      "description": "Code representing the status of this order 'complete', 'pending', 'shipped' etc."
    },
    "is_valid": {
      "type": "boolean",
      "description": "Is this order considered valid and should be counted against revenue? Set to false to 'delete'."
    },
    "customer": {
      "$ref": "#/$defs/OrderCustomer",
      "description": "The details of the customer who placed the order."
    },
    "lineitems": {
      "type": "array",
      "description": "Array of [OrderLineItem](#definition-OrderLineItem) objects representing the items in this order.",
      "items": {
        "$ref": "#/$defs/OrderLineItem"
      }
    },
    "ip_address": {
      "type": "string",
      "description": "The IP address of the visitor who placed order (if known).\nmax length: 64."
    },
    "channel": {
      "type": "string",
      "description": "Channel of this order. E.g., 'online', 'instore', 'amazon' etc.",
      "default": "online"
    },
    "store": {
      "type": "string",
      "description": "Code representing the store the order was placed in.\nmax length: 32"
    },
    "payment_method": {
      "type": "string",
      "description": "Code representing payment method, max length: 32.\nIf you exceed the character limit this field will pass validation but appear truncated in Ometria."
    },
    "shipping_method": {
      "type": "string",
      "description": "Code representing shipping method."
    },
    "shipping_address": {
      "$ref": "#/$defs/OrderAddress",
      "description": "The address the customer used for shipping."
    },
    "billing_address": {
      "$ref": "#/$defs/OrderAddress",
      "description": "The address the customer used for billing."
    },
    "coupon_code": {
      "description": "Coupon code applied to this order, max length: 128 characters. Pushed orders with a longer coupon code are rejected.",
      "type": "string"
    },
    "properties": {
      "description": "Custom key / value pairs accessible in emails using this order object.",
      "type": "object"
    },
    "extra_identifiers": {
      "type": [
        "array",
        "null"
      ],
      "description": "Optional list of extra identifiers (such as a loyalty ID) as per your identity resolution configuration, e.g. `loyalty_id`. Custom identifiers must be configured for your account before you send them. See <a href=\"https://support.ometria.com/hc/en-gb/articles/32595707442077-Custom-identifiers\">Custom identifiers</a> for the full format, multi-valued identifiers, and CSV usage.",
      "items": {
        "$ref": "#/$defs/ExtraIdentifier"
      }
    }
  },
  "$defs": {
    "ExtraIdentifier": {
      "title": "Extra Identifier",
      "type": "object",
      "description": "An additional identifier for a record, used to attach non-standard customer or record IDs (e.g. loyalty programme IDs, external CRM IDs). Records may carry multiple extra identifiers.",
      "required": [
        "type",
        "value"
      ],
      "properties": {
        "type": {
          "type": "string",
          "description": "The identifier type label. Must contain only lowercase letters and underscores (regex `^[a-z_]+$`), 1-255 characters. Will be coerced to lowercase on ingestion.",
          "minLength": 1,
          "maxLength": 255,
          "pattern": "^[a-z_]+$"
        },
        "value": {
          "type": "string",
          "description": "The identifier value (free-form string)."
        }
      }
    },
    "OrderAddress": {
      "type": "object",
      "description": "Describes an Address.",
      "properties": {
        "city": {
          "type": "string",
          "description": "The city or town for this address, max length: 32, lower case.\nFollow ISO 3166-1 alpha-2.\nIf you exceed the character limit this field will pass validation but appear truncated in Ometria.\nIf left empty this field is set to 'null'."
        },
        "state": {
          "type": "string",
          "description": "The state or county of the address, max length: 32, lower case.\nIf you exceed the character limit this field will pass validation but appear truncated in Ometria.\nIf left empty this field is set to 'null'."
        },
        "postcode": {
          "type": "string",
          "description": "The postcode or zipcode of the address, max length: 32, lower case.\nIf you exceed the character limit this field will pass validation but appear truncated in Ometria.\nIf left empty this field is set to 'null'."
        },
        "country_code": {
          "type": "string",
          "description": "The country for this address, must be 2 characters, upper case, e.g. 'GB'.\nFollow ISO 3166-1 alpha-2.\nIf left empty this field is set to 'null'.",
          "minLength": 2,
          "maxLength": 2
        }
      }
    },
    "OrderCustomer": {
      "type": "object",
      "description": "The details of the customer who placed the order.",
      "properties": {
        "id": {
          "type": "string",
          "description": "The <a href=\"https://ometria-api-reference.readme.io/docs/contacts-endpoint#customer-ids\" target=\"_blank\">customer's ID</a>, max length: 255.\nThis can be any unique identifier you use for your customers which you'd like to use for reporting in Ometria. It must not contain any personally identifiable information (name, email address etc.)"
        },
        "email": {
          "type": "string",
          "description": "The customer's email address, max length: 255, lower case.\nIf left empty this field is set to 'null'."
        },
        "firstname": {
          "type": "string",
          "description": "The customer's first name, max length: 64."
        },
        "lastname": {
          "type": "string",
          "description": "The customer's last name, max length: 64."
        },
        "phone_number": {
          "type": "string",
          "description": "The customer's phone number, in E.164/International format (e.g. starting \"+447...\")"
        }
      }
    },
    "OrderExtendedLineItemBaseTotal": {
      "type": "object",
      "description": "The totals of this lineitem represented in the base currency",
      "required": [
        "total"
      ],
      "properties": {
        "currency": {
          "type": "string",
          "description": "The currency of the base lineitem totals - as set for your account. Following ISO 4217",
          "minLength": 3,
          "maxLength": 3
        },
        "unit_price": {
          "type": "number",
          "description": "The value of the unit price in the base currency",
          "format": "float"
        },
        "discount": {
          "type": "number",
          "description": "The value of the discount on the lineitem in the base currency as a negative number",
          "format": "float"
        },
        "refunded": {
          "type": "number",
          "description": "The total price of refunded products in this line item.",
          "format": "float"
        },
        "subtotal": {
          "type": "number",
          "description": "The subtotal of this lineitem in the base currency (after refunded amounts have been taken into consideration).",
          "format": "float"
        },
        "tax": {
          "type": "number",
          "description": "The tax of this lineitem in the base currency (after refunded amounts have been taken into consideration).",
          "format": "float"
        },
        "total": {
          "type": "number",
          "description": "The total price of this line item in the base currency (after refunded amounts have been taken into consideration).",
          "format": "float"
        }
      }
    },
    "OrderExtendedLineItemLocalTotal": {
      "type": "object",
      "description": "The totals of this lineitem represented in the local currency",
      "required": [
        "total"
      ],
      "properties": {
        "currency": {
          "type": "string",
          "description": "The currency of the local lineitem totals. Following ISO 4217",
          "minLength": 3,
          "maxLength": 3
        },
        "unit_price": {
          "type": "number",
          "description": "The value of the unit price in the local currency",
          "format": "float"
        },
        "discount": {
          "type": "number",
          "description": "The value of any discount applied to the line item.\nThis value should be either a negative number, e.g. -`2.99` or `0`.",
          "format": "float"
        },
        "refunded": {
          "type": "number",
          "description": "The total price of refunded products in this line item.",
          "format": "float"
        },
        "subtotal": {
          "type": "number",
          "description": "The subtotal of this lineitem in the local currency (after refunded amounts have been taken into consideration).",
          "format": "float"
        },
        "tax": {
          "type": "number",
          "description": "The tax of this lineitem in the local currency (after refunded amounts have been taken into consideration).",
          "format": "float"
        },
        "total": {
          "type": "number",
          "description": "The total price of this lineitem in the local currency (after refunded amounts have been taken into consideration).",
          "format": "float"
        }
      }
    },
    "OrderExtendedLineItemTotals": {
      "type": "object",
      "description": "The totals of the lineitem. This can be used to express the order value in a base currency and a local currency.",
      "properties": {
        "base": {
          "$ref": "#/$defs/OrderExtendedLineItemBaseTotal"
        },
        "local": {
          "$ref": "#/$defs/OrderExtendedLineItemLocalTotal"
        }
      }
    },
    "OrderLineItem": {
      "type": "object",
      "description": "Describes an individual product line item added to an Order.",
      "required": [
        "product_id",
        "quantity",
        "unit_price"
      ],
      "properties": {
        "product_id": {
          "type": "string",
          "description": "The ID of the product."
        },
        "variant_id": {
          "type": "string",
          "description": "The ID of the <a href=\"https://ometria-api-reference.readme.io/docs/products-product-listings-and-product-variants\" target=\"_blank\">product variant</a> (if applicable), max length: 255"
        },
        "quantity": {
          "type": "integer",
          "description": "The number of products in the line item (not inclusive of any refunded items)."
        },
        "sku": {
          "type": "string",
          "description": "The SKU of the product in this line item, max length: 255.\nIf this field is left empty it will be set to 'null'."
        },
        "unit_price": {
          "type": "number",
          "description": "The unit price of the product in this line item.",
          "format": "float"
        },
        "quantity_refunded": {
          "type": "integer",
          "description": "The number of products refunded in the line item."
        },
        "refunded": {
          "type": "number",
          "description": "The total price of refunded products in this line item.",
          "format": "float"
        },
        "subtotal": {
          "type": "number",
          "description": "The subtotal of this line item after refunds have been taken.",
          "format": "float"
        },
        "tax": {
          "type": "number",
          "description": "The tax value of this line item after refunds have been taken.",
          "format": "float"
        },
        "total": {
          "type": "number",
          "description": "The total price of this line item after refunds amounts have been taken.",
          "format": "float"
        },
        "discount": {
          "type": "number",
          "description": "The value of any discount applied to the order.\nThis value should be either a negative number, e.g. -`2.99` or `0`.",
          "format": "float"
        },
        "is_on_sale": {
          "type": "boolean",
          "description": "Set to 'True' if the product was on sale when the order was placed."
        },
        "variant_options": {
          "type": "array",
          "description": "An array of OrderLineItemVariantOption objects.",
          "items": {
            "$ref": "#/$defs/OrderLineItemVariantOption"
          }
        },
        "totals": {
          "$ref": "#/$defs/OrderExtendedLineItemTotals"
        },
        "properties": {
          "description": "Custom key / value pairs accessible in emails using the related Order object.",
          "type": "object"
        }
      }
    },
    "OrderLineItemVariantOption": {
      "type": "object",
      "description": "Describes the configurable options attached to a Lineitem.",
      "required": [
        "type",
        "id",
        "label"
      ],
      "properties": {
        "type": {
          "type": "string",
          "description": "The type of the variant option."
        },
        "id": {
          "type": "string",
          "description": "The id of the variant option."
        },
        "label": {
          "type": "string",
          "description": "The label of the variant option."
        }
      }
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/ometria-order"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.