{
  "openapi": "3.0.1",
  "info": {
    "title": "Export Health Certificate Reference Data API - UAT",
    "description": "This API enables traders to check reference data needed for export health certificates. This is the first step towards enabling digital integration for moving agri-food goods.",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://tst-gateway.trade.azure.defra.cloud/trade-sci-reference-data/uat/v1"
    }
  ],
  "paths": {
    "/border-control-post": {
      "get": {
        "tags": [
          "BorderControlPost"
        ],
        "summary": "Find Border Control Posts in Reference Data.",
        "description": "Find Border Control Posts in Reference Data.",
        "operationId": "get-border-control-post",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "description": "Filter by Name containing value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "description": "Filter by Id containing value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "schemaName",
            "in": "query",
            "description": "Filter by SchemaName containing value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "Format - int64. Page number to return.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "Format - int64. Number of items per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Request failed validation. Errors can be found in the response body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommonProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
                  "title": "Not Found",
                  "status": 404,
                  "traceId": "00-11dc1a21a6bc20489d3009fb27d57b87-ddc5556eac52a943-00",
                  "errors": { }
                }
              }
            }
          },
          "200": {
            "description": "Paged result of Border Control Posts.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BorderControlPostPagedResult"
                },
                "example": {
                  "data": [
                    {
                      "id": {
                        "id": "GBBRS1",
                        "name": "Bristol",
                        "schemaName": "BorderControlPosts"
                      },
                      "name": "Bristol"
                    }
                  ],
                  "records": 1,
                  "pageNumber": 1,
                  "pageSize": 10,
                  "totalRecords": 1,
                  "totalPages": 1
                }
              }
            }
          }
        }
      }
    },
    "/certifier": {
      "get": {
        "tags": [
          "Certifier"
        ],
        "summary": "Find Certifier details in Reference Data.",
        "description": "Find Certifier details in Reference Data.",
        "operationId": "get-certifier",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "description": "Filter by Name containing value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "postcode",
            "in": "query",
            "description": "Filter by Postcode containing value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "Format - int64. Page number to return.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "Format - int64. Number of items per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Request failed validation. Errors can be found in the response body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommonProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
                  "title": "Not Found",
                  "status": 404,
                  "traceId": "00-11dc1a21a6bc20489d3009fb27d57b87-ddc5556eac52a943-00",
                  "errors": { }
                }
              }
            }
          },
          "200": {
            "description": "Paged result of Certifier details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartyPagedResult"
                },
                "example": {
                  "data": [
                    {
                      "name": "Nikolaus Nerney",
                      "address": {
                        "postCode": "GU324PJ",
                        "lineOne": "5553 Bobwhite Junction",
                        "lineTwo": "Way Road",
                        "lineThree": "Autumn Leaf Town",
                        "lineFour": "United Kingdom"
                      }
                    }
                  ],
                  "records": 1,
                  "pageNumber": 1,
                  "pageSize": 10,
                  "totalRecords": 1,
                  "totalPages": 1
                }
              }
            }
          }
        }
      }
    },
    "/country": {
      "get": {
        "tags": [
          "Country"
        ],
        "summary": "Find Country details in Reference Data.",
        "description": "Find Country details in Reference Data.",
        "operationId": "get-country",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "description": "Filter by Id containing value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Filter by Name containing value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "Format - int64. Page number to return.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "Format - int64. Number of items per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Request failed validation. Errors can be found in the response body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommonProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
                  "title": "Not Found",
                  "status": 404,
                  "traceId": "00-11dc1a21a6bc20489d3009fb27d57b87-ddc5556eac52a943-00",
                  "errors": { }
                }
              }
            }
          },
          "200": {
            "description": "Paged result of Country details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountryPagedResult"
                },
                "example": {
                  "data": [
                    {
                      "countryId": {
                        "id": "AD",
                        "name": "Andorra",
                        "schemaId": "ISO3166",
                        "agencyId": "ISO",
                        "language": "en"
                      },
                      "countrySubDivisionId": [
                        {
                          "id": "AD-07",
                          "name": "Andorra la Vella",
                          "schemaId": "ISO3166-2",
                          "agencyId": "ISO",
                          "language": "en"
                        }
                      ]
                    }
                  ],
                  "records": 1,
                  "pageNumber": 1,
                  "pageSize": 10,
                  "totalRecords": 1,
                  "totalPages": 1
                }
              }
            }
          }
        }
      }
    },
    "/metadata": {
      "get": {
        "tags": [
          "DatasetMetadata"
        ],
        "summary": "Retrieve a list of Export Health Certificate Reference Data metadata.",
        "description": "Retrieve a list of Export Health Certificate Reference Data metadata.",
        "operationId": "get-metadata",
        "responses": {
          "200": {
            "description": "Result of Export Health Certificate Reference Data end points.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DatasetMetadata"
                  }
                },
                "example": [
                  {
                    "name": "Certifiers",
                    "description": "Certifiers for EHCO applications",
                    "_links": [
                      {
                        "href": "https://gateway.trade.defra.gov.uk/trade-sci-reference-data/dev/v1/certifier",
                        "rel": "certifier",
                        "method": "GET"
                      }
                    ]
                  },
                  {
                    "name": "Transport Means",
                    "description": "Reference data for Transport Means",
                    "_links": [
                      {
                        "href": "https://gateway.trade.defra.gov.uk/trade-sci-reference-data/dev/v1/transport-means",
                        "rel": "transport-means",
                        "method": "GET"
                      }
                    ]
                  },
                  {
                    "name": "Measurement Temperature",
                    "description": "Reference data for Measurement Temperatures",
                    "_links": [
                      {
                        "href": "https://gateway.trade.defra.gov.uk/trade-sci-reference-data/dev/v1/measurement-temperature",
                        "rel": "measurement-temperature",
                        "method": "GET"
                      }
                    ]
                  },
                  {
                    "name": "Measurement Weight",
                    "description": "Reference data for Measurement Weights",
                    "_links": [
                      {
                        "href": "https://gateway.trade.defra.gov.uk/trade-sci-reference-data/dev/v1/measurement-weight",
                        "rel": "measurement-weight",
                        "method": "GET"
                      }
                    ]
                  },
                  {
                    "name": "Border Control Post",
                    "description": "Reference data for Border Control Posts",
                    "_links": [
                      {
                        "href": "https://gateway.trade.defra.gov.uk/trade-sci-reference-data/dev/v1/border-control-post",
                        "rel": "border-control-post",
                        "method": "GET"
                      }
                    ]
                  },
                  {
                    "name": "Package Type",
                    "description": "Reference data for Package Types",
                    "_links": [
                      {
                        "href": "https://gateway.trade.defra.gov.uk/trade-sci-reference-data/dev/v1/package-type",
                        "rel": "package-type",
                        "method": "GET"
                      }
                    ]
                  },
                  {
                    "name": "Country",
                    "description": "Reference data for countries and sub-divisions",
                    "_links": [
                      {
                        "href": "https://gateway.trade.defra.gov.uk/trade-sci-reference-data/dev/v1/country",
                        "rel": "country",
                        "method": "GET"
                      }
                    ]
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Request failed validation. Errors can be found in the response body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommonProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
                  "title": "Not Found",
                  "status": 404,
                  "traceId": "00-11dc1a21a6bc20489d3009fb27d57b87-ddc5556eac52a943-00",
                  "errors": { }
                }
              }
            }
          }
        }
      }
    },
    "/measurement-temperature": {
      "get": {
        "tags": [
          "MeasurementTemperature"
        ],
        "summary": "Find Measurement Temperature details in Reference Data.",
        "description": "Find Measurement Temperature details in Reference Data.",
        "operationId": "get-measurement-temperature",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "description": "Filter by Name containing value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "description": "Filter by Description containing value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code",
            "in": "query",
            "description": "Filter by Code containing value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "Format - int64. Page number to return.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "Format - int64. Number of items per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Request failed validation. Errors can be found in the response body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommonProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
                  "title": "Not Found",
                  "status": 404,
                  "traceId": "00-11dc1a21a6bc20489d3009fb27d57b87-ddc5556eac52a943-00",
                  "errors": { }
                }
              }
            }
          },
          "200": {
            "description": "Paged result of Measurement Temperature data.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferenceDataResultPagedResult"
                },
                "example": {
                  "data": [
                    {
                      "code": "S2G",
                      "name": "Short name/description reference data",
                      "description": "Long description describing reference data",
                      "language": "en"
                    }
                  ],
                  "records": 1,
                  "pageNumber": 1,
                  "pageSize": 10,
                  "totalRecords": 1,
                  "totalPages": 1
                }
              }
            }
          }
        }
      }
    },
    "/measurement-weight": {
      "get": {
        "tags": [
          "MeasurementWeight"
        ],
        "summary": "Find Measurement Weight in Reference Data.",
        "description": "Find Measurement Weight in Reference Data.",
        "operationId": "get-measurement-weight",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "description": "Filter by Name containing value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "description": "Filter by Description containing value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code",
            "in": "query",
            "description": "Filter by Code containing value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "Format - int64. Page number to return.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "Format - int64. Number of items per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Request failed validation. Errors can be found in the response body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommonProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
                  "title": "Not Found",
                  "status": 404,
                  "traceId": "00-11dc1a21a6bc20489d3009fb27d57b87-ddc5556eac52a943-00",
                  "errors": { }
                }
              }
            }
          },
          "200": {
            "description": "Paged result of Measurement Weight.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferenceDataResultPagedResult"
                },
                "example": {
                  "data": [
                    {
                      "code": "S2G",
                      "name": "Short name/description reference data",
                      "description": "Long description describing reference data",
                      "language": "en"
                    }
                  ],
                  "records": 1,
                  "pageNumber": 1,
                  "pageSize": 10,
                  "totalRecords": 1,
                  "totalPages": 1
                }
              }
            }
          }
        }
      }
    },
    "/package-type": {
      "get": {
        "tags": [
          "PackageType"
        ],
        "summary": "Find Package Types in Reference Data.",
        "description": "Find Package Types in Reference Data.",
        "operationId": "get-package-type",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "description": "Filter by Name containing value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "description": "Filter by Id containing value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "Format - int64. Page number to return.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "Format - int64. Number of items per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Request failed validation. Errors can be found in the response body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommonProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
                  "title": "Not Found",
                  "status": 404,
                  "traceId": "00-11dc1a21a6bc20489d3009fb27d57b87-ddc5556eac52a943-00",
                  "errors": { }
                }
              }
            }
          },
          "200": {
            "description": "Paged result of Package Types.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PackagePagedResult"
                },
                "example": {
                  "data": [
                    {
                      "type": {
                        "id": "43",
                        "name": "Bag, super bulk",
                        "language": "en"
                      }
                    }
                  ],
                  "records": 1,
                  "pageNumber": 1,
                  "pageSize": 10,
                  "totalRecords": 1,
                  "totalPages": 1
                }
              }
            }
          }
        }
      }
    },
    "/transport-means": {
      "get": {
        "tags": [
          "TransportMeans"
        ],
        "summary": "Find Transport Means in Reference Data.",
        "description": "Find Transport Means in Reference Data.",
        "operationId": "get-transport-means",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "description": "Filter by Name containing value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "description": "Filter by Description containing value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code",
            "in": "query",
            "description": "Filter by Code containing value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "Format - int64. Page number to return.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "Format - int64. Number of items per page.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Request failed validation. Errors can be found in the response body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommonProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
                  "title": "Not Found",
                  "status": 404,
                  "traceId": "00-11dc1a21a6bc20489d3009fb27d57b87-ddc5556eac52a943-00",
                  "errors": { }
                }
              }
            }
          },
          "200": {
            "description": "Paged result of Transport Means.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferenceDataResultPagedResult"
                },
                "example": {
                  "data": [
                    {
                      "code": "S2G",
                      "name": "Short name/description reference data",
                      "description": "Long description describing reference data",
                      "language": "en"
                    }
                  ],
                  "records": 1,
                  "pageNumber": 1,
                  "pageSize": 10,
                  "totalRecords": 1,
                  "totalPages": 1
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CommonProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "A URI reference [RFC3986] that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using HTML [W3C.REC-html5-20141028]).  When this member is not present, its value is assumed to be \"about:blank\"."
          },
          "title": {
            "type": "string",
            "description": "A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see[RFC7231], Section 3.4)."
          },
          "status": {
            "type": "integer",
            "description": "The HTTP status code([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.",
            "format": "int32"
          },
          "detail": {
            "type": "string",
            "description": "A human-readable explanation specific to this occurrence of the problem."
          },
          "instance": {
            "type": "string",
            "description": "A URI reference that identifies the specific occurrence of the problem.It may or may not yield further information if dereferenced."
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Errors associated with the request.",
            "readOnly": true
          }
        },
        "additionalProperties": { },
        "description": "Common API problem format for describing system and user error HTTP API responses based on https://tools.ietf.org/html/rfc7807."
      },
      "TradeIdentifier": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "A character string to identify and distinguish uniquely, one instance of an object in an identification scheme from all other objects within the same scheme."
          },
          "name": {
            "type": "string",
            "description": "A character string (letters, figures or symbols) that for brevity and/or language independence may be used to represent or replace a definitive value or text of an Attribute."
          },
          "schemaId": {
            "type": "string",
            "description": "The identification of the identification scheme."
          },
          "schemaName": {
            "type": "string",
            "description": "The name of the identification scheme."
          },
          "agencyId": {
            "type": "string",
            "description": "The identification of the agency that maintains the identification scheme."
          },
          "agencyName": {
            "type": "string",
            "description": "The name of the agency that maintains the identification scheme."
          },
          "versionId": {
            "type": "string",
            "description": "The Version of the identification scheme."
          },
          "uniformResourceId": {
            "type": "string",
            "description": "The Uniform Resource Identifier that identifies where the identification scheme data is located."
          },
          "schemaUniformResourceId": {
            "type": "string",
            "description": "The Uniform Resource Identifier that identifies where the identification scheme is located."
          },
          "language": {
            "type": "string",
            "description": "The identifier of the language used in the corresponding text string.",
            "example": "EN"
          }
        },
        "additionalProperties": false,
        "description": "A character string to identify and distinguish uniquely, one instance of an object in an identification scheme \r\nfrom all other objects in the same scheme together with relevant supplementary information.A character string \r\nto identify and distinguish uniquely, one instance of an object in an identification scheme from all other \r\nobjects in the same scheme together with relevant supplementary information."
      },
      "BorderControlPost": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/TradeIdentifier"
          },
          "name": {
            "type": "string",
            "description": "Name of the BCP."
          }
        },
        "additionalProperties": false,
        "description": "Border control post information."
      },
      "BorderControlPostPagedResult": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BorderControlPost"
            },
            "description": "Specified page within the data set."
          },
          "records": {
            "type": "integer",
            "description": "Number of records in the current page.",
            "format": "int64",
            "example": "1.0"
          },
          "pageNumber": {
            "type": "integer",
            "description": "Page number.",
            "format": "int64",
            "example": "1.0"
          },
          "pageSize": {
            "type": "integer",
            "description": "Page size.",
            "format": "int64",
            "example": "10.0"
          },
          "totalRecords": {
            "type": "integer",
            "description": "Total number of records across all pages.",
            "format": "int64",
            "example": "1.0"
          },
          "totalPages": {
            "type": "integer",
            "description": "Total number of pages.",
            "format": "int64",
            "readOnly": true,
            "example": "1.0"
          }
        },
        "additionalProperties": false,
        "description": "Paginated response from the API."
      },
      "Coordinates": {
        "type": "object",
        "properties": {
          "latitude": {
            "type": "number",
            "description": "Latitude.",
            "format": "double",
            "example": 51.509865
          },
          "longitude": {
            "type": "number",
            "description": "Longitude.",
            "format": "double",
            "example": -0.118092
          }
        },
        "additionalProperties": false,
        "description": "Geographic co-ordinates."
      },
      "What3Words": {
        "type": "object",
        "properties": {
          "wordOne": {
            "type": "string",
            "description": "Word one.",
            "example": ""
          },
          "wordTwo": {
            "type": "string",
            "description": "Word two.",
            "example": ""
          },
          "wordThree": {
            "type": "string",
            "description": "Word three.",
            "example": ""
          }
        },
        "additionalProperties": false,
        "description": "What 3 Words location identifier details."
      },
      "Country": {
        "type": "object",
        "properties": {
          "countryId": {
            "$ref": "#/components/schemas/TradeIdentifier"
          },
          "countrySubDivisionId": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TradeIdentifier"
            },
            "description": "ISO country sub division code identifier."
          },
          "market": {
            "type": "string",
            "description": "The trading market / block the country is part of."
          }
        },
        "additionalProperties": false,
        "description": "Country details."
      },
      "Address": {
        "type": "object",
        "properties": {
          "postCode": {
            "type": "string",
            "description": "Postcode."
          },
          "coordinates": {
            "$ref": "#/components/schemas/Coordinates"
          },
          "what3Words": {
            "$ref": "#/components/schemas/What3Words"
          },
          "unlocode": {
            "type": "string",
            "description": "United Nations Code for Trade and Transport Locations."
          },
          "lineOne": {
            "type": "string",
            "description": "Address line one."
          },
          "lineTwo": {
            "type": "string",
            "description": "Address line two."
          },
          "lineThree": {
            "type": "string",
            "description": "Address line three."
          },
          "lineFour": {
            "type": "string",
            "description": "Address line four."
          },
          "lineFive": {
            "type": "string",
            "description": "Address line five."
          },
          "city": {
            "type": "string",
            "description": "City."
          },
          "country": {
            "$ref": "#/components/schemas/Country"
          },
          "approvalNumber": {
            "$ref": "#/components/schemas/TradeIdentifier"
          }
        },
        "additionalProperties": false,
        "description": "Address details."
      },
      "PersonName": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Title.",
            "example": "Mr"
          },
          "givenName": {
            "type": "string",
            "description": "Given / first name.",
            "example": "Steven"
          },
          "middleNames": {
            "type": "string",
            "description": "Middle names.",
            "example": "John"
          },
          "surname": {
            "type": "string",
            "description": "Surname / last name.",
            "example": "Smith"
          }
        },
        "additionalProperties": false,
        "description": "Structured name for a person."
      },
      "ContactDetail": {
        "type": "object",
        "properties": {
          "phoneNumber": {
            "type": "string",
            "description": "Contact telephone number."
          },
          "emailAddress": {
            "type": "string",
            "description": "Contact email address."
          }
        },
        "additionalProperties": false,
        "description": "Person contact detail."
      },
      "Person": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Unstructured / preferred name as text.",
            "example": ""
          },
          "fullName": {
            "$ref": "#/components/schemas/PersonName"
          },
          "contactDetail": {
            "$ref": "#/components/schemas/ContactDetail"
          },
          "certification": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TradeIdentifier"
            },
            "description": "Details of the certifications the representative holds if applicable."
          }
        },
        "additionalProperties": false,
        "description": "Persons details."
      },
      "Party": {
        "type": "object",
        "properties": {
          "uid": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TradeIdentifier"
            },
            "description": "Identifier the party is known by."
          },
          "name": {
            "type": "string",
            "description": "Name of the party.",
            "example": ""
          },
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "contact": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Person"
            },
            "description": "Details of relevant persons at the Party."
          },
          "specifiedPerson": {
            "$ref": "#/components/schemas/Person"
          }
        },
        "additionalProperties": false,
        "description": "The definition of a responsible party in the chain."
      },
      "PartyPagedResult": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Party"
            },
            "description": "Specified page within the data set."
          },
          "records": {
            "type": "integer",
            "description": "Number of records in the current page.",
            "format": "int64",
            "example": "1.0"
          },
          "pageNumber": {
            "type": "integer",
            "description": "Page number.",
            "format": "int64",
            "example": "1.0"
          },
          "pageSize": {
            "type": "integer",
            "description": "Page size.",
            "format": "int64",
            "example": "10.0"
          },
          "totalRecords": {
            "type": "integer",
            "description": "Total number of records across all pages.",
            "format": "int64",
            "example": "1.0"
          },
          "totalPages": {
            "type": "integer",
            "description": "Total number of pages.",
            "format": "int64",
            "readOnly": true,
            "example": "1.0"
          }
        },
        "additionalProperties": false,
        "description": "Paginated response from the API."
      },
      "CountryPagedResult": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Country"
            },
            "description": "Specified page within the data set."
          },
          "records": {
            "type": "integer",
            "description": "Number of records in the current page.",
            "format": "int64",
            "example": "1.0"
          },
          "pageNumber": {
            "type": "integer",
            "description": "Page number.",
            "format": "int64",
            "example": "1.0"
          },
          "pageSize": {
            "type": "integer",
            "description": "Page size.",
            "format": "int64",
            "example": "10.0"
          },
          "totalRecords": {
            "type": "integer",
            "description": "Total number of records across all pages.",
            "format": "int64",
            "example": "1.0"
          },
          "totalPages": {
            "type": "integer",
            "description": "Total number of pages.",
            "format": "int64",
            "readOnly": true,
            "example": "1.0"
          }
        },
        "additionalProperties": false,
        "description": "Paginated response from the API."
      },
      "ResourceLink": {
        "type": "object",
        "properties": {
          "href": {
            "type": "string",
            "description": "Uniform Resource Identifier of the resource being linked to."
          },
          "rel": {
            "type": "string",
            "description": "Relationship of the resource."
          },
          "method": {
            "type": "string",
            "description": "HTTP method to use when calling the resource."
          }
        },
        "additionalProperties": false,
        "description": "Hypermedia as the Engine of Application State (HATEOAS) resource link."
      },
      "DatasetMetadata": {
        "type": "object",
        "properties": {
          "_links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceLink"
            },
            "description": "Hypermedia as the Engine of Application State (HATEOAS) links to related resources."
          },
          "name": {
            "type": "string",
            "description": "Reference Data name.",
            "example": "Name"
          },
          "description": {
            "type": "string",
            "description": "Description.",
            "example": "Summary description"
          }
        },
        "additionalProperties": false,
        "description": "Reference Data meta-data."
      },
      "ReferenceDataResult": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Code supplied from source"
          },
          "name": {
            "type": "string",
            "description": "Name"
          },
          "description": {
            "type": "string",
            "description": "Description"
          },
          "language": {
            "type": "string",
            "description": "Language, defaults to EN"
          }
        },
        "additionalProperties": false
      },
      "ReferenceDataResultPagedResult": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReferenceDataResult"
            },
            "description": "Specified page within the data set."
          },
          "records": {
            "type": "integer",
            "description": "Number of records in the current page.",
            "format": "int64",
            "example": "1.0"
          },
          "pageNumber": {
            "type": "integer",
            "description": "Page number.",
            "format": "int64",
            "example": "1.0"
          },
          "pageSize": {
            "type": "integer",
            "description": "Page size.",
            "format": "int64",
            "example": "10.0"
          },
          "totalRecords": {
            "type": "integer",
            "description": "Total number of records across all pages.",
            "format": "int64",
            "example": "1.0"
          },
          "totalPages": {
            "type": "integer",
            "description": "Total number of pages.",
            "format": "int64",
            "readOnly": true,
            "example": "1.0"
          }
        },
        "additionalProperties": false,
        "description": "Paginated response from the API."
      },
      "Measure": {
        "type": "object",
        "properties": {
          "value": {
            "type": "number",
            "description": "The numeric value determined by measuring an object.",
            "format": "double"
          },
          "unit": {
            "type": "string",
            "description": "Type of unit describing the measure."
          },
          "version": {
            "type": "string",
            "description": "The version of the measure unit code list."
          },
          "measureNote": {
            "type": "string",
            "description": "Information or additional detail regarding the measure."
          }
        },
        "additionalProperties": false,
        "description": "A numeric value determined by measuring an object along with the specified unit of measure."
      },
      "Package": {
        "type": "object",
        "properties": {
          "level": {
            "$ref": "#/components/schemas/TradeIdentifier"
          },
          "type": {
            "$ref": "#/components/schemas/TradeIdentifier"
          },
          "itemQuantity": {
            "$ref": "#/components/schemas/Measure"
          },
          "nominalGrossWeight": {
            "$ref": "#/components/schemas/Measure"
          },
          "nominalGrossVolume": {
            "$ref": "#/components/schemas/Measure"
          }
        },
        "additionalProperties": false,
        "description": "A physical package for a trade line item."
      },
      "PackagePagedResult": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Package"
            },
            "description": "Specified page within the data set."
          },
          "records": {
            "type": "integer",
            "description": "Number of records in the current page.",
            "format": "int64",
            "example": "1.0"
          },
          "pageNumber": {
            "type": "integer",
            "description": "Page number.",
            "format": "int64",
            "example": "1.0"
          },
          "pageSize": {
            "type": "integer",
            "description": "Page size.",
            "format": "int64",
            "example": "10.0"
          },
          "totalRecords": {
            "type": "integer",
            "description": "Total number of records across all pages.",
            "format": "int64",
            "example": "1.0"
          },
          "totalPages": {
            "type": "integer",
            "description": "Total number of pages.",
            "format": "int64",
            "readOnly": true,
            "example": "1.0"
          }
        },
        "additionalProperties": false,
        "description": "Paginated response from the API."
      }
    },
    "securitySchemes": {
      "apiKeyHeader": {
        "type": "apiKey",
        "name": "Ocp-Apim-Subscription-Key",
        "in": "header"
      },
      "apiKeyQuery": {
        "type": "apiKey",
        "name": "subscription-key",
        "in": "query"
      },
      "oauth2OAuth-Server": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://login.microsoftonline.com/c9d74090-b4e6-4b04-981d-e6757a160812/oauth2/v2.0/token",
            "scopes": {
              "api://tst-futuretrade-ext.defra.gov.uk/.default": ""
            }
          }
        }
      }
    }
  }
}