{
  "openapi": "3.1.1",
  "info": {
    "title": "SendTo Wallet API",
    "description": "Apple Wallet passes for Afaq systems. Every call sends X-Api-Key. See docs/API-CONTRACT.md.",
    "version": "v1"
  },
  "paths": {
    "/api/v1/catalog": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [ ]
      }
    },
    "/api/v1/passes": {
      "post": {
        "tags": [
          "Passes"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "1-200 printable ASCII. The same key and body within 24 h returns the first answer without doing it again; the same key with another body is 422.",
            "schema": {
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePassRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PassResponse"
                }
              }
            }
          },
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "X-Api-Key missing, unknown or revoked"
          },
          "429": {
            "description": "This key's per-minute limit; Retry-After says when"
          },
          "422": {
            "description": "Idempotency-Key reused with another request"
          }
        }
      }
    },
    "/api/v1/passes/batch": {
      "post": {
        "tags": [
          "Passes"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "1-200 printable ASCII. The same key and body within 24 h returns the first answer without doing it again; the same key with another body is 422.",
            "schema": {
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchCreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "X-Api-Key missing, unknown or revoked"
          },
          "429": {
            "description": "This key's per-minute limit; Retry-After says when"
          },
          "422": {
            "description": "Idempotency-Key reused with another request"
          }
        }
      }
    },
    "/api/v1/passes/{serial}": {
      "get": {
        "tags": [
          "Passes"
        ],
        "parameters": [
          {
            "name": "serial",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PassInfoResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "X-Api-Key missing, unknown or revoked"
          },
          "429": {
            "description": "This key's per-minute limit; Retry-After says when"
          }
        }
      },
      "patch": {
        "tags": [
          "Passes"
        ],
        "parameters": [
          {
            "name": "serial",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePassRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdatePassResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "X-Api-Key missing, unknown or revoked"
          },
          "429": {
            "description": "This key's per-minute limit; Retry-After says when"
          }
        }
      }
    },
    "/api/v1/passes/by-ref/{externalRef}": {
      "get": {
        "tags": [
          "Passes"
        ],
        "parameters": [
          {
            "name": "externalRef",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PassInfoResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "X-Api-Key missing, unknown or revoked"
          },
          "429": {
            "description": "This key's per-minute limit; Retry-After says when"
          }
        }
      }
    },
    "/api/v1/passes/{serial}/void": {
      "post": {
        "tags": [
          "Passes"
        ],
        "parameters": [
          {
            "name": "serial",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "1-200 printable ASCII. The same key and body within 24 h returns the first answer without doing it again; the same key with another body is 422.",
            "schema": {
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdatePassResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "X-Api-Key missing, unknown or revoked"
          },
          "429": {
            "description": "This key's per-minute limit; Retry-After says when"
          },
          "422": {
            "description": "Idempotency-Key reused with another request"
          }
        }
      }
    },
    "/api/v1/passes/{serial}/restore": {
      "post": {
        "tags": [
          "Passes"
        ],
        "parameters": [
          {
            "name": "serial",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdatePassResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "X-Api-Key missing, unknown or revoked"
          },
          "429": {
            "description": "This key's per-minute limit; Retry-After says when"
          }
        }
      }
    },
    "/api/v1/passes/{serial}/stamps": {
      "post": {
        "tags": [
          "Passes"
        ],
        "parameters": [
          {
            "name": "serial",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "1-200 printable ASCII. The same key and body within 24 h returns the first answer without doing it again; the same key with another body is 422.",
            "schema": {
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StampsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StampsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "X-Api-Key missing, unknown or revoked"
          },
          "429": {
            "description": "This key's per-minute limit; Retry-After says when"
          },
          "422": {
            "description": "Idempotency-Key reused with another request"
          }
        }
      }
    },
    "/api/v1/passes/{serial}/link": {
      "get": {
        "tags": [
          "Passes"
        ],
        "parameters": [
          {
            "name": "serial",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "linkTtlHours",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "X-Api-Key missing, unknown or revoked"
          },
          "429": {
            "description": "This key's per-minute limit; Retry-After says when"
          }
        }
      }
    },
    "/api/v1/templates": {
      "get": {
        "tags": [
          "Templates"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TemplateResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "X-Api-Key missing, unknown or revoked"
          },
          "429": {
            "description": "This key's per-minute limit; Retry-After says when"
          }
        }
      },
      "post": {
        "tags": [
          "Templates"
        ],
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "X-Api-Key missing, unknown or revoked"
          },
          "429": {
            "description": "This key's per-minute limit; Retry-After says when"
          }
        }
      }
    },
    "/api/v1/templates/{code}": {
      "get": {
        "tags": [
          "Templates"
        ],
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "X-Api-Key missing, unknown or revoked"
          },
          "429": {
            "description": "This key's per-minute limit; Retry-After says when"
          }
        }
      },
      "patch": {
        "tags": [
          "Templates"
        ],
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "X-Api-Key missing, unknown or revoked"
          },
          "429": {
            "description": "This key's per-minute limit; Retry-After says when"
          }
        }
      },
      "delete": {
        "tags": [
          "Templates"
        ],
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "X-Api-Key missing, unknown or revoked"
          },
          "429": {
            "description": "This key's per-minute limit; Retry-After says when"
          }
        }
      }
    },
    "/api/v1/templates/{code}/brand": {
      "put": {
        "tags": [
          "Templates"
        ],
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BrandRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrandSavedResponse"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrandSavedResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "X-Api-Key missing, unknown or revoked"
          },
          "429": {
            "description": "This key's per-minute limit; Retry-After says when"
          }
        }
      }
    },
    "/api/v1/templates/{code}/assets/{fileName}": {
      "put": {
        "tags": [
          "Templates"
        ],
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fileName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "image/png": {
              "schema": {
                "type": "string",
                "format": "byte"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "X-Api-Key missing, unknown or revoked"
          },
          "429": {
            "description": "This key's per-minute limit; Retry-After says when"
          }
        }
      },
      "get": {
        "tags": [
          "Templates"
        ],
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fileName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "X-Api-Key missing, unknown or revoked"
          },
          "429": {
            "description": "This key's per-minute limit; Retry-After says when"
          }
        }
      },
      "delete": {
        "tags": [
          "Templates"
        ],
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fileName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "X-Api-Key missing, unknown or revoked"
          },
          "429": {
            "description": "This key's per-minute limit; Retry-After says when"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "BackFieldDto": {
        "required": [
          "key",
          "label",
          "value"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": [
              "null",
              "string"
            ]
          },
          "value": {
            "type": "string"
          },
          "secondLabel": {
            "type": [
              "null",
              "string"
            ]
          },
          "secondValue": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "additionalProperties": false
      },
      "BarcodeDto": {
        "required": [
          "message",
          "format",
          "altText"
        ],
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "format": {
            "type": "string"
          },
          "altText": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "additionalProperties": false
      },
      "BatchCreateRequest": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreatePassRequest"
            }
          }
        },
        "additionalProperties": false
      },
      "BatchCreateResponse": {
        "required": [
          "created",
          "failed",
          "conflicts",
          "blocked",
          "total",
          "items"
        ],
        "type": "object",
        "properties": {
          "created": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "failed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "conflicts": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "blocked": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BatchItemResult"
            }
          }
        },
        "additionalProperties": false
      },
      "BatchItemResult": {
        "required": [
          "index",
          "status"
        ],
        "type": "object",
        "properties": {
          "index": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "serialNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "type": "string"
          },
          "errors": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "downloadUrl": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "additionalProperties": false
      },
      "BrandRequest": {
        "required": [
          "organizationName"
        ],
        "type": "object",
        "properties": {
          "organizationName": {
            "type": "string"
          },
          "logoText": {
            "type": [
              "null",
              "string"
            ]
          },
          "backgroundColor": {
            "type": [
              "null",
              "string"
            ]
          },
          "foregroundColor": {
            "type": [
              "null",
              "string"
            ]
          },
          "labelColor": {
            "type": [
              "null",
              "string"
            ]
          },
          "phone": {
            "type": [
              "null",
              "string"
            ]
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "website": {
            "type": [
              "null",
              "string"
            ]
          },
          "backValues": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "string"
            }
          },
          "primaryLanguage": {
            "type": [
              "null",
              "string"
            ]
          },
          "secondLanguage": {
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": [
              "null",
              "boolean"
            ]
          }
        },
        "additionalProperties": false
      },
      "BrandResponse": {
        "required": [
          "organizationName",
          "backValues",
          "primaryLanguage",
          "isActive",
          "assetFileNames",
          "issuedPasses"
        ],
        "type": "object",
        "properties": {
          "organizationName": {
            "type": "string"
          },
          "logoText": {
            "type": [
              "null",
              "string"
            ]
          },
          "backgroundColor": {
            "type": [
              "null",
              "string"
            ]
          },
          "foregroundColor": {
            "type": [
              "null",
              "string"
            ]
          },
          "labelColor": {
            "type": [
              "null",
              "string"
            ]
          },
          "phone": {
            "type": [
              "null",
              "string"
            ]
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "website": {
            "type": [
              "null",
              "string"
            ]
          },
          "backValues": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "primaryLanguage": {
            "type": "string"
          },
          "secondLanguage": {
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": "boolean"
          },
          "assetFileNames": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "issuedPasses": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "updatedAt": {
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "BrandSavedResponse": {
        "required": [
          "template",
          "created",
          "affectedIssuedPasses",
          "devicesQueued"
        ],
        "type": "object",
        "properties": {
          "template": {
            "$ref": "#/components/schemas/TemplateResponse"
          },
          "created": {
            "type": "boolean"
          },
          "affectedIssuedPasses": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "devicesQueued": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "CreatePassRequest": {
        "required": [
          "templateCode"
        ],
        "type": "object",
        "properties": {
          "templateCode": {
            "type": "string"
          },
          "externalRef": {
            "type": [
              "null",
              "string"
            ]
          },
          "serialNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "fields": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "backFields": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/BackFieldDto"
            }
          },
          "barcode": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/BarcodeDto"
              }
            ]
          },
          "relevantDate": {
            "format": "date-time"
          },
          "relevantPeriods": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/RelevantPeriodDto"
            }
          },
          "expirationDate": {
            "format": "date-time"
          },
          "locations": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/LocationDto"
            }
          },
          "semantics": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SemanticsDto"
              }
            ]
          },
          "overrides": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OverridesDto"
              }
            ]
          },
          "groupingIdentifier": {
            "type": [
              "null",
              "string"
            ]
          },
          "returnMode": {
            "type": "string"
          },
          "linkTtlHours": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "GeoDto": {
        "required": [
          "latitude",
          "longitude"
        ],
        "type": "object",
        "properties": {
          "latitude": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "longitude": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "LinkResponse": {
        "required": [
          "serialNumber",
          "downloadUrl",
          "shape",
          "linkExpiresAt",
          "voided",
          "note"
        ],
        "type": "object",
        "properties": {
          "serialNumber": {
            "type": "string"
          },
          "downloadUrl": {
            "type": "string"
          },
          "shape": {
            "type": "string"
          },
          "linkExpiresAt": {
            "format": "date-time"
          },
          "voided": {
            "type": "boolean"
          },
          "note": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "LocalizedName": {
        "required": [
          "ar",
          "en"
        ],
        "type": "object",
        "properties": {
          "ar": {
            "type": "string"
          },
          "en": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "LocationDto": {
        "required": [
          "latitude",
          "longitude",
          "relevantText",
          "maxDistance"
        ],
        "type": "object",
        "properties": {
          "latitude": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "longitude": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "relevantText": {
            "type": [
              "null",
              "string"
            ]
          },
          "maxDistance": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "OverridesDto": {
        "type": "object",
        "properties": {
          "backgroundColor": {
            "type": [
              "null",
              "string"
            ]
          },
          "foregroundColor": {
            "type": [
              "null",
              "string"
            ]
          },
          "labelColor": {
            "type": [
              "null",
              "string"
            ]
          },
          "logoText": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "additionalProperties": false
      },
      "PassInfoResponse": {
        "required": [
          "serialNumber",
          "passTypeIdentifier",
          "templateCode",
          "status",
          "voided",
          "isExpired",
          "createdAt",
          "lastModified",
          "fields",
          "webServiceEnabled",
          "registeredDevices"
        ],
        "type": "object",
        "properties": {
          "serialNumber": {
            "type": "string"
          },
          "passTypeIdentifier": {
            "type": "string"
          },
          "externalRef": {
            "type": [
              "null",
              "string"
            ]
          },
          "templateCode": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "voided": {
            "type": "boolean"
          },
          "isExpired": {
            "type": "boolean"
          },
          "expirationDate": {
            "format": "date-time"
          },
          "createdAt": {
            "format": "date-time"
          },
          "lastModified": {
            "format": "date-time"
          },
          "restoredAt": {
            "format": "date-time"
          },
          "fields": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "barcodeMessage": {
            "type": [
              "null",
              "string"
            ]
          },
          "barcodeFormat": {
            "type": [
              "null",
              "string"
            ]
          },
          "relevantDate": {
            "format": "date-time"
          },
          "webServiceEnabled": {
            "type": "boolean"
          },
          "registeredDevices": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "PassResponse": {
        "required": [
          "serialNumber",
          "passTypeIdentifier",
          "downloadUrl",
          "linkExpiresAt",
          "updatesEnabled"
        ],
        "type": "object",
        "properties": {
          "serialNumber": {
            "type": "string"
          },
          "passTypeIdentifier": {
            "type": "string"
          },
          "downloadUrl": {
            "type": "string"
          },
          "linkExpiresAt": {
            "format": "date-time"
          },
          "expiresAt": {
            "format": "date-time"
          },
          "updatesEnabled": {
            "type": "boolean"
          },
          "pkPassBase64": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "additionalProperties": false
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "detail": {
            "type": [
              "null",
              "string"
            ]
          },
          "instance": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "additionalProperties": false
      },
      "RelevantPeriodDto": {
        "required": [
          "date",
          "startDate",
          "endDate"
        ],
        "type": "object",
        "properties": {
          "date": {
            "format": "date-time"
          },
          "startDate": {
            "format": "date-time"
          },
          "endDate": {
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "SeatDto": {
        "required": [
          "seatSection",
          "seatRow",
          "seatNumber"
        ],
        "type": "object",
        "properties": {
          "seatSection": {
            "type": [
              "null",
              "string"
            ]
          },
          "seatRow": {
            "type": [
              "null",
              "string"
            ]
          },
          "seatNumber": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "additionalProperties": false
      },
      "SemanticsDto": {
        "type": "object",
        "properties": {
          "eventType": {
            "type": [
              "null",
              "string"
            ]
          },
          "eventName": {
            "type": [
              "null",
              "string"
            ]
          },
          "venueName": {
            "type": [
              "null",
              "string"
            ]
          },
          "venueRegionName": {
            "type": [
              "null",
              "string"
            ]
          },
          "venueRoom": {
            "type": [
              "null",
              "string"
            ]
          },
          "eventStartDate": {
            "format": "date-time"
          },
          "eventEndDate": {
            "format": "date-time"
          },
          "venueLocation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/GeoDto"
              }
            ]
          },
          "seats": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/SeatDto"
            }
          }
        },
        "additionalProperties": false
      },
      "StampsRequest": {
        "required": [
          "action"
        ],
        "type": "object",
        "properties": {
          "action": {
            "type": "string"
          },
          "count": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "StampsResponse": {
        "required": [
          "serialNumber",
          "stamps",
          "total",
          "full",
          "lastModified",
          "devicesQueued",
          "webServiceEnabled"
        ],
        "type": "object",
        "properties": {
          "serialNumber": {
            "type": "string"
          },
          "stamps": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "full": {
            "type": "boolean"
          },
          "lastModified": {
            "format": "date-time"
          },
          "devicesQueued": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "webServiceEnabled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "TemplateResponse": {
        "required": [
          "code",
          "kind",
          "style",
          "passTypeIdentifier",
          "description",
          "isActive",
          "backgroundColor",
          "foregroundColor",
          "labelColor",
          "fieldLayoutJson",
          "assetFileNames",
          "voidedNotice"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "style": {
            "type": "string"
          },
          "passTypeIdentifier": {
            "type": "string"
          },
          "name": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/LocalizedName"
              }
            ]
          },
          "family": {
            "type": [
              "null",
              "string"
            ]
          },
          "organizationName": {
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "sharingProhibited": {
            "type": "boolean"
          },
          "backgroundColor": {
            "type": "string"
          },
          "foregroundColor": {
            "type": "string"
          },
          "labelColor": {
            "type": "string"
          },
          "logoText": {
            "type": [
              "null",
              "string"
            ]
          },
          "fieldLayoutJson": {
            "type": "string"
          },
          "assetFileNames": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "voidedNotice": {
            "type": "string"
          },
          "voidedAlert": {
            "type": [
              "null",
              "string"
            ]
          },
          "brand": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/BrandResponse"
              }
            ]
          },
          "updatedAt": {
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "UpdatePassRequest": {
        "type": "object",
        "properties": {
          "fields": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "string"
            }
          },
          "barcode": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/BarcodeDto"
              }
            ]
          },
          "relevantDate": {
            "format": "date-time"
          },
          "expirationDate": {
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "UpdatePassResponse": {
        "required": [
          "serialNumber",
          "lastModified",
          "devicesQueued",
          "webServiceEnabled"
        ],
        "type": "object",
        "properties": {
          "serialNumber": {
            "type": "string"
          },
          "lastModified": {
            "format": "date-time"
          },
          "devicesQueued": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "webServiceEnabled": {
            "type": "boolean"
          },
          "restored": {
            "type": [
              "null",
              "boolean"
            ]
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "description": "stw_ followed by the key; one per system, several may be live.",
        "name": "X-Api-Key",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "ApiKey": [ ]
    }
  ],
  "tags": [
    {
      "name": "Catalog"
    },
    {
      "name": "Passes"
    },
    {
      "name": "Templates"
    }
  ]
}