Schemas / Commerce

rig.commerce.order

v1.0.0 · stable maturity: draft 4 fields 3 required

Fields

FieldTypeMeaning
buyer entity required Person or organisation that buys
seller entity required Person or organisation that sells
status enumdraft · placed · paid · fulfilled · cancelled required draft / placed / paid / fulfilled / cancelled
identifier string optional Optional. Order number as issued

A sale between a buyer and a seller. Format when present.

Field meanings follow schema.org Order. This schema is the order header - not a cart, not a payment, and not the line items.

buyer, seller, and status are required.

Lines are rig.commerce.order_line entities that point at this order. Do not put a lines array here. The bill is a rig.commerce.invoice. The box is a rig.commerce.shipment. The payment that settled the bill sets rig.finance.payment invoice.

JSON Schema

Resolves at https://rig.works/schemas/rig.commerce.order.schema.json — raw file.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rig.works/schemas/rig.commerce.order.schema.json",
  "title": "rig.commerce.order",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "buyer": {
      "$ref": "./_defs.schema.json#/$defs/entity"
    },
    "seller": {
      "$ref": "./_defs.schema.json#/$defs/entity"
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "placed",
        "paid",
        "fulfilled",
        "cancelled"
      ]
    },
    "identifier": {
      "$ref": "./_defs.schema.json#/$defs/string"
    }
  },
  "required": [
    "buyer",
    "seller",
    "status"
  ],
  "description": "A sale header. Field meanings follow schema.org Order. Lines are rig.commerce.order_line entities.",
  "x-rig-maturity": "draft"
}

Seen in

record-shop.json