Schemas / Commerce
rig.commerce.shipment
v1.0.0 · stable maturity: draft 7 fields 1 required
Fields
| Field | Type | Meaning | |
|---|---|---|---|
status |
enumpending · in-transit · delivered · returned · cancelled | required | pending / in-transit / delivered / returned / cancelled |
order |
entity | optional | Optional. The rig.commerce.order this ships |
carrier |
entity | optional | Optional. Organisation that carries it |
tracking |
string | optional | Optional. Tracking number as issued |
origin |
entity | optional | Optional. Place it left |
destination |
entity | optional | Optional. Place it is going |
shippedDate |
string | optional | Optional. Day it left, YYYY-MM-DD |
A box on its way. Format when present.
Field meanings follow schema.org ParcelDelivery. This schema is the consignment - not a carrier API, and not warehouse pick.
status is required.
Address and geo stay on the place entities. Lines are rig.commerce.shipment_line entities that point at this shipment. Do not put a lines array here. A second box is another entity.
JSON Schema
Resolves at https://rig.works/schemas/rig.commerce.shipment.schema.json —
raw file.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://rig.works/schemas/rig.commerce.shipment.schema.json",
"title": "rig.commerce.shipment",
"type": "object",
"additionalProperties": false,
"properties": {
"status": {
"type": "string",
"enum": [
"pending",
"in-transit",
"delivered",
"returned",
"cancelled"
]
},
"order": {
"$ref": "./_defs.schema.json#/$defs/entity"
},
"carrier": {
"$ref": "./_defs.schema.json#/$defs/entity"
},
"tracking": {
"$ref": "./_defs.schema.json#/$defs/string"
},
"origin": {
"$ref": "./_defs.schema.json#/$defs/entity"
},
"destination": {
"$ref": "./_defs.schema.json#/$defs/entity"
},
"shippedDate": {
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
"description": "ISO 8601 calendar date."
}
},
"required": [
"status"
],
"description": "A box on its way. Field meanings follow schema.org ParcelDelivery. Address stays on origin / destination places.",
"x-rig-maturity": "draft"
}