Skip to content

procurement.ocds · v1 · government-procurement

Open Contracting releases

Available

Open Contracting Data Standard (OCDS) procurement releases from a national publisher with an open licence (UK Contracts Finder today), for a publication window and stage, optionally narrowed by keyword, buyer or supplier, in one normalised shape.

Input schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "publisher": {
      "default": "uk_contracts_finder",
      "type": "string",
      "enum": [
        "uk_contracts_finder"
      ]
    },
    "stage": {
      "default": "tender",
      "type": "string",
      "enum": [
        "planning",
        "tender",
        "award"
      ]
    },
    "publishedFrom": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "publishedTo": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "keyword": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120,
      "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
    },
    "buyer": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120,
      "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
    },
    "supplier": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120,
      "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
    },
    "limit": {
      "default": 10,
      "type": "integer",
      "minimum": 1,
      "maximum": 25
    }
  },
  "required": [
    "publishedFrom",
    "publishedTo"
  ],
  "additionalProperties": false
}
Output schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "const": "OCDS_RELEASES"
    },
    "request": {
      "type": "object",
      "properties": {
        "publisher": {
          "default": "uk_contracts_finder",
          "type": "string",
          "enum": [
            "uk_contracts_finder"
          ]
        },
        "stage": {
          "default": "tender",
          "type": "string",
          "enum": [
            "planning",
            "tender",
            "award"
          ]
        },
        "publishedFrom": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
        },
        "publishedTo": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
        },
        "keyword": {
          "type": "string",
          "minLength": 2,
          "maxLength": 120,
          "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
        },
        "buyer": {
          "type": "string",
          "minLength": 2,
          "maxLength": 120,
          "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
        },
        "supplier": {
          "type": "string",
          "minLength": 2,
          "maxLength": 120,
          "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
        },
        "limit": {
          "default": 10,
          "type": "integer",
          "minimum": 1,
          "maximum": 25
        }
      },
      "required": [
        "publisher",
        "stage",
        "publishedFrom",
        "publishedTo",
        "limit"
      ],
      "additionalProperties": false
    },
    "releases": {
      "minItems": 1,
      "maxItems": 25,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "ocid": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "releaseId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              },
              {
                "type": "null"
              }
            ]
          },
          "buyer": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "releaseDate": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}(?:[T ][0-9:.+-]+Z?)?$"
              },
              {
                "type": "null"
              }
            ]
          },
          "stage": {
            "maxItems": 6,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 40
            }
          },
          "suppliers": {
            "maxItems": 15,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        },
        "required": [
          "ocid",
          "releaseId",
          "title",
          "buyer",
          "releaseDate",
          "stage",
          "suppliers"
        ],
        "additionalProperties": false
      }
    },
    "scanned": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    },
    "windowFullyScanned": {
      "type": "boolean"
    },
    "source": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        },
        "retrievedAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "responseSha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "attribution": {
          "type": "string"
        },
        "licenceUrl": {
          "type": "string",
          "format": "uri"
        }
      },
      "required": [
        "url",
        "retrievedAt",
        "responseSha256",
        "attribution",
        "licenceUrl"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "kind",
    "request",
    "releases",
    "scanned",
    "windowFullyScanned",
    "source"
  ],
  "additionalProperties": false
}