Codat · Schema

Commerce: Location

The Location datatype holds information on the geographic location at which stocks of products may be held, as referenced in the Products data type. A Location also holds information on geographic locations where orders were placed, as referenced in the Orders data type.

Unified_API
View JSON Schema on GitHub

JSON Schema

codat-commercelocation-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/CommerceLocation",
  "title": "Commerce: Location",
  "type": "object",
  "description": "The Location datatype holds information on the geographic location at which stocks of products may be held, as referenced in the Products data type.\n\nA Location also holds information on geographic locations where orders were placed, as referenced in the Orders data type.",
  "allOf": [
    {
      "$ref": "#/components/schemas/CommerceOrder/allOf/0"
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "description": "Name of this location",
          "type": "string"
        },
        "address": {
          "description": "Address associated with the location",
          "$ref": "#/components/schemas/CommerceAddress"
        }
      }
    },
    {
      "$ref": "#/components/schemas/CommerceOrder/allOf/3"
    }
  ],
  "definitions": {
    "locationRef": {
      "type": "object",
      "description": "Reference to the geographic location where the order was placed.",
      "properties": {
        "id": {
          "description": "The unique identitifer of the location being referenced.",
          "type": "string",
          "examples": [
            "13d946f0-c5d5-42bc-b092-97ece17923ab",
            "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2",
            7110701885,
            "EILBDVJVNUAGVKRQ"
          ]
        },
        "name": {
          "description": "Name of the location being referenced.",
          "type": "string"
        }
      },
      "required": [
        "id"
      ]
    }
  },
  "examples": [
    {
      "id": "15",
      "name": "London Warehouse",
      "address": {
        "type": "Inventory",
        "line1": "Warner House",
        "line2": "98 Theobald's Road",
        "city": "London",
        "region": "",
        "country": "United Kingdom",
        "postalCode": "WC1X 8WB"
      },
      "modifiedDate": "2020-08-12T14:37:37",
      "sourceModifiedDate": "2020-08-12T14:37:37"
    }
  ]
}