﻿{
  "openapi": "3.0.2",
  "info": {
    "title": "API to allow for Requests and Publishing of PhPIDs and GSIDs",
    "description": "The UMC API supports management and publishing of PhPIDs and GSIDs as part of the ISO IDMP standard",
    "license": {
      "name": "Creative Commons Zero v1.0 Universal",
      "url": "http://spdx.org/licenses/CC0-1.0.html"
    },
    "version": "1.0.0",
    "contact": {
      "name": "Uppsala Monitoring Centre",
      "url": "http://www.who-umc.org"
    }
  },
  "externalDocs": {
    "url": "https://build.fhir.org/ig/Uppsala-Monitoring-Centre/WHO-UMC-IDMP-Service/CapabilityStatement/WHO-UMC-IDMP-service",
    "description": "FHIR CapabilityStatement"
  },
  "paths": {
    "/metadata": {
      "summary": "Access to the Server\u0027s Capability Statement",
      "description": "All FHIR Servers return a CapabilityStatement that describes what services they perform",
      "get": {
        "summary": "Return the server\u0027s capability statement",
        "operationId": "metadata",
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://build.fhir.org/fhir.schema.json#/definitions/OperationOutcome"
                }
              },
              "application/fhir+xml": {
                "schema": {
                  "$ref": "https://build.fhir.org/OperationOutcome.xsd"
                }
              }
            }
          },
          "200": {
            "description": "the capbility statement",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://build.fhir.org/fhir.schema.json#/definitions/CapabilityStatement"
                }
              },
              "application/fhir+xml": {
                "schema": {
                  "$ref": "https://build.fhir.org/CapabilityStatement.xsd"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/format"
          },
          {
            "$ref": "#/components/parameters/pretty"
          },
          {
            "$ref": "#/components/parameters/summary"
          },
          {
            "$ref": "#/components/parameters/elements"
          }
        ]
      }
    },
    "/Task": {
      "summary": "Manager for resources of type Task",
      "description": "The Manager for resources of type Task: provides services to manage the collection of all the Task instances",
      "get": {
        "summary": "Search all resources of type Task based on a set of criteria",
        "operationId": "searchTask",
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://build.fhir.org/fhir.schema.json#/definitions/OperationOutcome"
                }
              },
              "application/fhir+xml": {
                "schema": {
                  "$ref": "https://build.fhir.org/OperationOutcome.xsd"
                }
              }
            }
          },
          "200": {
            "description": "the resource being returned",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://build.fhir.org/fhir.schema.json#/definitions/Bundle"
                }
              },
              "application/fhir+xml": {
                "schema": {
                  "$ref": "https://build.fhir.org/Bundle.xsd"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/format"
          },
          {
            "$ref": "#/components/parameters/pretty"
          },
          {
            "$ref": "#/components/parameters/summary"
          },
          {
            "$ref": "#/components/parameters/elements"
          },
          {
            "name": "status",
            "in": "query",
            "description": "Status filter",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "_id",
            "in": "query",
            "description": "Comma-separated list of PhPID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "_elements",
            "in": "query",
            "description": "Limit elements returned in bundle",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number to return",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "_count",
            "in": "query",
            "description": "Page size",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "_format",
            "in": "query",
            "description": "Response format",
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "Create a new resource",
        "operationId": "createTask",
        "requestBody": {
          "description": "The new state of the resource",
          "required": true,
          "content": {
            "application/fhir+json": {
              "schema": {
                "$ref": "https://build.fhir.org/fhir.schema.json#/definitions/Task"
              }
            },
            "application/fhir+xml": {
              "schema": {
                "$ref": "https://build.fhir.org/Task.xsd"
              }
            }
          }
        },
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://build.fhir.org/fhir.schema.json#/definitions/OperationOutcome"
                }
              },
              "application/fhir+xml": {
                "schema": {
                  "$ref": "https://build.fhir.org/OperationOutcome.xsd"
                }
              }
            }
          },
          "200": {
            "description": "the resource being returned after being updated",
            "headers": {
              "ETag": {
                "description": "Version from Resource.meta.version as a weak ETag",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://build.fhir.org/fhir.schema.json#/definitions/Task"
                }
              },
              "application/fhir+xml": {
                "schema": {
                  "$ref": "https://build.fhir.org/Task.xsd"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/summary"
          },
          {
            "$ref": "#/components/parameters/format"
          },
          {
            "$ref": "#/components/parameters/pretty"
          },
          {
            "$ref": "#/components/parameters/elements"
          }
        ]
      }
    },
    "/Task/{rid}": {
      "summary": "Read/Write/etc resource instance of type Task",
      "description": "Access to services to manage the state of a single resource of type Task",
      "get": {
        "summary": "Read the current state of the resource",
        "operationId": "readTask",
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://build.fhir.org/fhir.schema.json#/definitions/OperationOutcome"
                }
              },
              "application/fhir+xml": {
                "schema": {
                  "$ref": "https://build.fhir.org/OperationOutcome.xsd"
                }
              }
            }
          },
          "200": {
            "description": "the resource being returned",
            "headers": {
              "ETag": {
                "description": "Version from Resource.meta.version as a weak ETag",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://build.fhir.org/fhir.schema.json#/definitions/Task"
                }
              },
              "application/fhir+xml": {
                "schema": {
                  "$ref": "https://build.fhir.org/Task.xsd"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/rid"
          },
          {
            "$ref": "#/components/parameters/summary"
          },
          {
            "$ref": "#/components/parameters/format"
          },
          {
            "$ref": "#/components/parameters/pretty"
          },
          {
            "$ref": "#/components/parameters/elements"
          }
        ]
      }
    },
    "/AdministrableProductDefinition": {
      "summary": "manage the collection of resources of type AdministrableProductDefinition",
      "description": "Access to services to manage the collection of all resources of type AdministrableProductDefinition",
      "get": {
        "summary": "Search all resources of type AdministrableProductDefinition based on a set of criteria",
        "operationId": "searchAdministrableProductDefinition",
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://build.fhir.org/fhir.schema.json#/definitions/OperationOutcome"
                }
              },
              "application/fhir+xml": {
                "schema": {
                  "$ref": "https://build.fhir.org/OperationOutcome.xsd"
                }
              }
            }
          },
          "200": {
            "description": "the resource being returned",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://build.fhir.org/fhir.schema.json#/definitions/Bundle"
                }
              },
              "application/fhir+xml": {
                "schema": {
                  "$ref": "https://build.fhir.org/Bundle.xsd"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/format"
          },
          {
            "$ref": "#/components/parameters/pretty"
          },
          {
            "$ref": "#/components/parameters/summary"
          },
          {
            "$ref": "#/components/parameters/elements"
          },
          {
            "name": "_id",
            "in": "query",
            "description": "Comma-separated list of PhPID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "_elements",
            "in": "query",
            "description": "Limit elements returned in bundle",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number to return",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "_count",
            "in": "query",
            "description": "Page size",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "_format",
            "in": "query",
            "description": "Response format",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/AdministrableProductDefinition/{rid}": {
      "summary": "Read/Write/etc resource instance of type AdministrableProductDefinition",
      "description": "Access to services to manage the state of a single resource of type AdministrableProductDefinition",
      "get": {
        "summary": "Read the current state of the resource",
        "operationId": "readAdministrableProductDefinition",
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://build.fhir.org/fhir.schema.json#/definitions/OperationOutcome"
                }
              },
              "application/fhir+xml": {
                "schema": {
                  "$ref": "https://build.fhir.org/OperationOutcome.xsd"
                }
              }
            }
          },
          "200": {
            "description": "the resource being returned",
            "headers": {
              "ETag": {
                "description": "Version from Resource.meta.version as a weak ETag",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://build.fhir.org/fhir.schema.json#/definitions/AdministrableProductDefinition"
                }
              },
              "application/fhir+xml": {
                "schema": {
                  "$ref": "https://build.fhir.org/AdministrableProductDefinition.xsd"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/rid"
          },
          {
            "$ref": "#/components/parameters/summary"
          },
          {
            "$ref": "#/components/parameters/format"
          },
          {
            "$ref": "#/components/parameters/pretty"
          },
          {
            "$ref": "#/components/parameters/elements"
          }
        ]
      }
    },
    "/MedicinalProductDefinition": {
      "summary": "manage the collection of resources of type MedicinalProductDefinition",
      "description": "Access to services to manage the collection of all resources of type MedicinalProductDefinition",
      "get": {
        "summary": "Search all resources of type MedicinalProductDefinition based on a set of criteria",
        "operationId": "searchMedicinalProductDefinition",
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://build.fhir.org/fhir.schema.json#/definitions/OperationOutcome"
                }
              },
              "application/fhir+xml": {
                "schema": {
                  "$ref": "https://build.fhir.org/OperationOutcome.xsd"
                }
              }
            }
          },
          "200": {
            "description": "the resource being returned",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://build.fhir.org/fhir.schema.json#/definitions/Bundle"
                }
              },
              "application/fhir+xml": {
                "schema": {
                  "$ref": "https://build.fhir.org/Bundle.xsd"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/format"
          },
          {
            "$ref": "#/components/parameters/pretty"
          },
          {
            "$ref": "#/components/parameters/summary"
          },
          {
            "$ref": "#/components/parameters/elements"
          },
          {
            "name": "phpid",
            "in": "query",
            "description": "PhPID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "_id",
            "in": "query",
            "description": "Comma-separated list of UMCProductID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "_elements",
            "in": "query",
            "description": "Limit elements returned in bundle",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number to return",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "_count",
            "in": "query",
            "description": "Page size",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "_format",
            "in": "query",
            "description": "Response format",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/MedicinalProductDefinition/{rid}": {
      "summary": "Read/Write/etc resource instance of type MedicinalProductDefinition",
      "description": "Access to services to manage the state of a single resource of type MedicinalProductDefinition",
      "get": {
        "summary": "Read the current state of the resource",
        "operationId": "readMedicinalProductDefinition",
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://build.fhir.org/fhir.schema.json#/definitions/OperationOutcome"
                }
              },
              "application/fhir+xml": {
                "schema": {
                  "$ref": "https://build.fhir.org/OperationOutcome.xsd"
                }
              }
            }
          },
          "200": {
            "description": "the resource being returned",
            "headers": {
              "ETag": {
                "description": "Version from Resource.meta.version as a weak ETag",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://build.fhir.org/fhir.schema.json#/definitions/MedicinalProductDefinition"
                }
              },
              "application/fhir+xml": {
                "schema": {
                  "$ref": "https://build.fhir.org/MedicinalProductDefinition.xsd"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/rid"
          },
          {
            "$ref": "#/components/parameters/summary"
          },
          {
            "$ref": "#/components/parameters/format"
          },
          {
            "$ref": "#/components/parameters/pretty"
          },
          {
            "$ref": "#/components/parameters/elements"
          }
        ]
      }
    },
    "/SubstanceDefinition": {
      "summary": "manage the collection of resources of type SubstanceDefinition",
      "description": "Access to services to manage the collection of all resources of type SubstanceDefinition",
      "get": {
        "summary": "Search all resources of type SubstanceDefinition based on a set of criteria",
        "operationId": "searchSubstanceDefinition",
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://build.fhir.org/fhir.schema.json#/definitions/OperationOutcome"
                }
              },
              "application/fhir+xml": {
                "schema": {
                  "$ref": "https://build.fhir.org/OperationOutcome.xsd"
                }
              }
            }
          },
          "200": {
            "description": "the resource being returned",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://build.fhir.org/fhir.schema.json#/definitions/Bundle"
                }
              },
              "application/fhir+xml": {
                "schema": {
                  "$ref": "https://build.fhir.org/Bundle.xsd"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/format"
          },
          {
            "$ref": "#/components/parameters/pretty"
          },
          {
            "$ref": "#/components/parameters/summary"
          },
          {
            "$ref": "#/components/parameters/elements"
          },
          {
            "name": "_id",
            "in": "query",
            "description": "Comma-separated list of GSID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "_elements",
            "in": "query",
            "description": "Limit elements returned in bundle",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number to return",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "_count",
            "in": "query",
            "description": "Page size",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "_format",
            "in": "query",
            "description": "Response format",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/SubstanceDefinition/{rid}": {
      "summary": "Read/Write/etc resource instance of type SubstanceDefinition",
      "description": "Access to services to manage the state of a single resource of type SubstanceDefinition",
      "get": {
        "summary": "Read the current state of the resource",
        "operationId": "readSubstanceDefinition",
        "responses": {
          "default": {
            "description": "Error, with details",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://build.fhir.org/fhir.schema.json#/definitions/OperationOutcome"
                }
              },
              "application/fhir+xml": {
                "schema": {
                  "$ref": "https://build.fhir.org/OperationOutcome.xsd"
                }
              }
            }
          },
          "200": {
            "description": "the resource being returned",
            "headers": {
              "ETag": {
                "description": "Version from Resource.meta.version as a weak ETag",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "https://build.fhir.org/fhir.schema.json#/definitions/SubstanceDefinition"
                }
              },
              "application/fhir+xml": {
                "schema": {
                  "$ref": "https://build.fhir.org/SubstanceDefinition.xsd"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/rid"
          },
          {
            "$ref": "#/components/parameters/summary"
          },
          {
            "$ref": "#/components/parameters/format"
          },
          {
            "$ref": "#/components/parameters/pretty"
          },
          {
            "$ref": "#/components/parameters/elements"
          }
        ]
      }
    }
  },
  "components": {
    "parameters": {
      "rid": {
        "name": "rid",
        "in": "path",
        "description": "id of the resource (\u003dResource.id)",
        "required": true,
        "allowEmptyValue": false,
        "style": "simple",
        "schema": {
          "type": "string"
        }
      },
      "hid": {
        "name": "hid",
        "in": "path",
        "description": "id of the history entry (\u003dResource.meta.versionId)",
        "required": true,
        "allowEmptyValue": false,
        "style": "simple",
        "schema": {
          "type": "string"
        }
      },
      "summary": {
        "name": "_summary",
        "in": "query",
        "description": "Requests the server to return a designated subset of the resource",
        "allowEmptyValue": true,
        "style": "form",
        "schema": {
          "type": "string",
          "enum": [
            "true",
            "text",
            "data",
            "count",
            "false"
          ]
        }
      },
      "format": {
        "name": "_format",
        "in": "query",
        "description": "Specify alternative response formats by their MIME-types (when a client is unable acccess accept: header)",
        "allowEmptyValue": true,
        "style": "form",
        "schema": {
          "type": "string",
          "format": "mime-type"
        }
      },
      "pretty": {
        "name": "_pretty",
        "in": "query",
        "description": "Ask for a pretty printed response for human convenience",
        "allowEmptyValue": true,
        "style": "form",
        "schema": {
          "type": "boolean"
        }
      },
      "elements": {
        "name": "_elements",
        "in": "query",
        "description": "Requests the server to return a collection of elements from the resource",
        "allowEmptyValue": true,
        "style": "form",
        "explode": false,
        "schema": {
          "type": "array",
          "format": "string",
          "items": {
            "format": "string"
          }
        }
      },
      "count": {
        "name": "_count",
        "in": "query",
        "description": "The maximum number of search results on a page. The server is not bound to return the number requested, but cannot return more",
        "schema": {
          "type": "number"
        }
      }
    }
  }
}