{
  "swagger": "2.0",
  "info": {
    "title": "Självavstängning",
    "version": "v1"
  },
  "paths": {
    "/api/blocking-info/{actorId}": {
      "post": {
        "tags": [
          "BlockingInfo"
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "actorId",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/BlockingInfoRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/BlockingInfoResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/EmptyResult"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/EmptyResult"
            }
          }
        }
      }
    },
    "/api/marketing-single-subjectid/{actorId}": {
      "post": {
        "tags": [
          "MarketingInfo"
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "actorId",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/BlockingInfoRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/BlockingInfoResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/EmptyResult"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/EmptyResult"
            }
          }
        }
      }
    },
    "/api/marketing-subjectid/{actorId}": {
      "post": {
        "tags": [
          "MarketingInfo"
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "actorId",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/MarketingSubjectIdRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/MarketingResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/EmptyResult"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/EmptyResult"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "BlockingInfoRequest": {
      "type": "object",
      "required": [
        "requestId",
        "subjectId"
      ],
      "properties": {
        "requestId": {
          "type": "string",
          "maxLength": 50,
          "minLength": 0
        },
        "subjectId": {
          "type": "string",
          "description": "Personnummer att kontrollera (YYYYMMDDNNNN)",
          "maxLength": 12,
          "minLength": 12
        }
      },
      "additionalProperties": false
    },
    "BlockingInfoResponse": {
      "type": "object",
      "required": [
        "requestId",
        "responseId"
      ],
      "properties": {
        "isBlocked": {
          "type": "boolean",
          "description": "Är sökt personnummer blockerat"
        },
        "requestId": {
          "type": "string",
          "description": "Unik identifierare från licenshavare",
          "maxLength": 50,
          "minLength": 1
        },
        "responseId": {
          "type": "string",
          "description": "Unik identifierare från Spelinspektionen",
          "maxLength": 50,
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "EmptyResult": {
      "type": "object",
      "additionalProperties": false
    },
    "MarketingResponse": {
      "type": "object",
      "required": [
        "allowedItemIds",
        "requestId",
        "responseId"
      ],
      "properties": {
        "requestId": {
          "type": "string",
          "maxLength": 50,
          "minLength": 1
        },
        "responseId": {
          "type": "string",
          "maxLength": 50,
          "minLength": 1
        },
        "allowedItemIds": {
          "type": "array",
          "maxItems": 10000,
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "MarketingSubjectIdRequest": {
      "type": "object",
      "required": [
        "items",
        "requestId"
      ],
      "properties": {
        "requestId": {
          "type": "string",
          "maxLength": 50,
          "minLength": 0
        },
        "items": {
          "type": "array",
          "maxItems": 10000,
          "minItems": 1,
          "items": {
            "$ref": "#/definitions/MarketingSubjectIdRequestItem"
          }
        }
      },
      "additionalProperties": false
    },
    "MarketingSubjectIdRequestItem": {
      "type": "object",
      "required": [
        "itemId",
        "subjectId"
      ],
      "properties": {
        "itemId": {
          "type": "string",
          "maxLength": 50,
          "minLength": 0
        },
        "subjectId": {
          "type": "string",
          "maxLength": 12,
          "minLength": 12
        }
      },
      "additionalProperties": false
    }
  },
  "securityDefinitions": {
    "Token": {
      "type": "apiKey",
      "name": "authorization",
      "in": "header"
    }
  },
  "security": [
    {
      "Token": [ ]
    }
  ],
  "tags": [
    {
      "name": "BlockingInfo"
    },
    {
      "name": "MarketingInfo"
    }
  ]
}