# Get Protection Bulletin rule
Gets a Protection Bulletin rule.
The information requested is not returned in the endpoint response. Instead, the information is sent in a [Bulletin rule event](https://developers.pismo.io/events/docs/bulletin-bulletin-rule-1).
**Note:** This endpoint takes an account token - an access token encoded with a Pismo account ID. Tokens can expire quickly, which can result in a 401 Unauthorized message.
# OpenAPI definition
```json
{
"openapi": "3.1.0",
"info": {
"title": "Card issuing - Protection Bulletin",
"version": "2.0.3",
"description": "Bulletin API endpoints",
"contact": {
"name": "API Support",
"url": "https://developers.pismo.io/support/"
},
"license": {
"name": "Copyright Pismo"
}
},
"servers": [
{
"url": "https://sandbox.pismolabs.io/protection-bulletin",
"description": "Sandbox API server for testing"
}
],
"security": [
{
"BearerAuth": []
}
],
"tags": [
{
"name": "Rules",
"description": "Endpoints to manage Protection Bulletin rules"
}
],
"components": {
"parameters": {
"AuthHeader": {
"in": "header",
"name": "Authorization",
"required": true,
"description": "Account token - an access token encoded with a Pismo account ID. Tokens can expire quickly, which can result in a 401 Unauthorized message.",
"schema": {
"type": "string",
"example": "Bearer eyJhbGci...IUzUx"
}
},
"ProgramIdPath": {
"name": "program_id",
"in": "path",
"description": "Pismo program ID.",
"required": true,
"schema": {
"type": "number",
"example": 8765
}
}
},
"schemas": {
"ErrorDetailMessageModel": {
"description": "Detailed information about the error.",
"type": "object",
"properties": {
"payload": {
"type": "array",
"description": "List of payload-related error details.",
"items": {
"$ref": "#/components/schemas/ErrorPayloadMessageModel"
}
},
"header": {
"type": "array",
"description": "List of header-related error details.",
"items": {
"$ref": "#/components/schemas/ErrorHeaderMessageModel"
}
},
"parameters": {
"type": "array",
"description": "List of parameter-related error details.",
"items": {
"$ref": "#/components/schemas/ErrorParameterMessageModel"
}
}
}
},
"ErrorHeaderMessageModel": {
"description": "Details about header-related errors.",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "Header name related to the error.",
"example": "x-field"
},
"message": {
"type": "string",
"description": "Error message for the header.",
"example": "Generic error"
}
}
},
"ErrorMessageModel": {
"title": "ErrorModel",
"type": "object",
"description": "API generic returned error.",
"properties": {
"code": {
"type": "string",
"description": "Error code."
},
"message": {
"type": "string",
"description": "Error description."
},
"http_status_code": {
"type": "integer",
"description": "HTTP status code."
},
"details": {
"$ref": "#/components/schemas/ErrorDetailMessageModel"
}
}
},
"ErrorParameterMessageModel": {
"description": "Details about parameter-related errors.",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "Parameter name related to the error.",
"example": "query_parameter"
},
"message": {
"type": "string",
"description": "Parameter error message"
}
}
},
"ErrorPayloadMessageModel": {
"description": "Details about payload-related errors.",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "Field name related to the error.",
"example": "field"
},
"message": {
"type": "string",
"description": "Error message for the field.",
"example": "Generic error"
}
}
}
},
"securitySchemes": {
"BearerAuth": {
"type": "http",
"scheme": "bearer",
"description": "Account token - token encoded with a Pismo account ID. Tokens can expire quickly, which can result in a **401 Unauthorized** error.\n",
"bearerFormat": "JWT"
}
},
"responses": {
"202": {
"description": "Accepted"
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorMessageModel"
},
"examples": {
"Missing or invalid Authorization header": {
"value": {
"code": "EBLT0005",
"message": "Missing or invalid Authorization header",
"http_status_code": 401
}
},
"Invalid Authorization header, missing account-id": {
"value": {
"code": "EBLT0006",
"message": "Invalid Authorization header, missing account-id",
"http_status_code": 401
}
},
"Invalid Authorization header, missing tenant": {
"value": {
"code": "EBLT0007",
"message": "Invalid Authorization header, missing tenant",
"http_status_code": 401
}
}
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorMessageModel"
},
"examples": {
"Something went wrong when try to process a request in another service": {
"value": {
"code": "EBLT9998",
"message": "Something went wrong when try to process a request in Programs API using ID: 123",
"http_status_code": 500
}
},
"Something went wrong, please try again later": {
"value": {
"code": "EBLT9999",
"message": "Something went wrong, please try again later",
"http_status_code": 500
}
}
}
}
}
},
"504": {
"description": "Gateway Timeout",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorMessageModel"
},
"examples": {
"Request timeout": {
"value": {
"code": "EBLT0001",
"message": "Request timeout",
"http_status_code": 504
}
}
}
}
}
},
"400GetSetup": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorMessageModel"
},
"examples": {
"Invalid param": {
"value": {
"code": "EBLT0004",
"message": "Invalid program_id param",
"http_status_code": 400
}
}
}
}
}
},
"404GetSetup": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorMessageModel"
},
"examples": {
"Programs API returned not found": {
"value": {
"code": "EBLT0009",
"message": "Programs API returned [Not found] using ID: {program_id}",
"http_status_code": 404
}
}
}
}
}
}
}
},
"paths": {
"/v1/bulletin/setup/{program_id}": {
"get": {
"summary": "Get Protection Bulletin rule",
"operationId": "get-v1-bulletin-rule",
"description": "Gets a Protection Bulletin rule.\n\nThe information requested is not returned in the endpoint response. Instead, the information is sent in a [Bulletin rule event](https://developers.pismo.io/events/docs/bulletin-bulletin-rule-1).\n\n**Note:** This endpoint takes an account token - an access token encoded with a Pismo account ID. Tokens can expire quickly, which can result in a 401 Unauthorized message.\n",
"tags": [
"Rules"
],
"parameters": [
{
"$ref": "#/components/parameters/AuthHeader"
},
{
"$ref": "#/components/parameters/ProgramIdPath"
}
],
"responses": {
"202": {
"$ref": "#/components/responses/202"
},
"400": {
"$ref": "#/components/responses/400GetSetup"
},
"401": {
"$ref": "#/components/responses/401"
},
"404": {
"$ref": "#/components/responses/404GetSetup"
},
"500": {
"$ref": "#/components/responses/500"
},
"504": {
"$ref": "#/components/responses/504"
}
}
}
}
}
}
```