# Bans

## GET /v1/stores/{storeId}/bans

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"bans"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"BanType":{"enum":["unknown","steam","ip","customer","customer_name","email"],"type":"string"},"BanDto":{"required":["created_at","created_by","enabled","id","identities","reason","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"reason":{"type":"string"},"enabled":{"type":"boolean"},"identities":{"type":"array","items":{"$ref":"#/components/schemas/BanIdentityDto"}},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":["null","string"],"format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"expires_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"BanIdentityDto":{"required":["ban_type","ban_type_value"],"type":"object","properties":{"ban_type":{"$ref":"#/components/schemas/BanType"},"ban_type_value":{"type":"string"}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/bans":{"get":{"tags":["bans"],"operationId":"Bans_GetBans","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"ban_type","in":"query","schema":{"$ref":"#/components/schemas/BanType"}},{"name":"ban_type_value","in":"query","schema":{"type":"string"}},{"name":"reason","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","description":"The maximum number of items to return in a single request.","schema":{"maximum":100,"minimum":1,"type":"integer","format":"int32"}},{"name":"after","in":"query","description":"Returns items after the specified ID.\nUsed for forward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"before","in":"query","description":"Returns items before the specified ID.\nUsed for backward pagination through results.","schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"asc","in":"query","description":"Determines the sort order of returned items.\nWhen true, items are returned in ascending order.\nWhen false, items are returned in descending order.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BanDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## POST /v1/stores/{storeId}/bans

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"bans"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpsertBanRequestDto":{"type":"object","properties":{"reason":{"type":["null","string"]},"identities":{"type":["null","array"],"items":{"$ref":"#/components/schemas/BanIdentityDto"}},"expires_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"BanIdentityDto":{"required":["ban_type","ban_type_value"],"type":"object","properties":{"ban_type":{"$ref":"#/components/schemas/BanType"},"ban_type_value":{"type":"string"}},"additionalProperties":false},"BanType":{"enum":["unknown","steam","ip","customer","customer_name","email"],"type":"string"},"BanDto":{"required":["created_at","created_by","enabled","id","identities","reason","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"reason":{"type":"string"},"enabled":{"type":"boolean"},"identities":{"type":"array","items":{"$ref":"#/components/schemas/BanIdentityDto"}},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":["null","string"],"format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"expires_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/bans":{"post":{"tags":["bans"],"operationId":"Bans_CreateBan","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertBanRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpsertBanRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpsertBanRequestDto"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BanDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/bans/{banId}

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"bans"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"BanDto":{"required":["created_at","created_by","enabled","id","identities","reason","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"reason":{"type":"string"},"enabled":{"type":"boolean"},"identities":{"type":"array","items":{"$ref":"#/components/schemas/BanIdentityDto"}},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":["null","string"],"format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"expires_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"BanIdentityDto":{"required":["ban_type","ban_type_value"],"type":"object","properties":{"ban_type":{"$ref":"#/components/schemas/BanType"},"ban_type_value":{"type":"string"}},"additionalProperties":false},"BanType":{"enum":["unknown","steam","ip","customer","customer_name","email"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/bans/{banId}":{"get":{"tags":["bans"],"operationId":"Bans_GetBan","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"banId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BanDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## DELETE /v1/stores/{storeId}/bans/{banId}

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"bans"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/bans/{banId}":{"delete":{"tags":["bans"],"operationId":"Bans_DeleteBan","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"banId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## PATCH /v1/stores/{storeId}/bans/{banId}

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"bans"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpsertBanRequestDto":{"type":"object","properties":{"reason":{"type":["null","string"]},"identities":{"type":["null","array"],"items":{"$ref":"#/components/schemas/BanIdentityDto"}},"expires_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"BanIdentityDto":{"required":["ban_type","ban_type_value"],"type":"object","properties":{"ban_type":{"$ref":"#/components/schemas/BanType"},"ban_type_value":{"type":"string"}},"additionalProperties":false},"BanType":{"enum":["unknown","steam","ip","customer","customer_name","email"],"type":"string"},"BanDto":{"required":["created_at","created_by","enabled","id","identities","reason","store_id"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"reason":{"type":"string"},"enabled":{"type":"boolean"},"identities":{"type":"array","items":{"$ref":"#/components/schemas/BanIdentityDto"}},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":["null","string"],"format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"expires_at":{"type":["null","string"],"format":"date-time"}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/bans/{banId}":{"patch":{"tags":["bans"],"operationId":"Bans_UpdateBan","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"banId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertBanRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpsertBanRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpsertBanRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BanDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## POST /v1/stores/{storeId}/bans/check

>

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"bans"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CheckForBanIDByIdentitiesRequestDto":{"required":["identities"],"type":"object","properties":{"identities":{"type":"array","items":{"$ref":"#/components/schemas/BanIdentityDto"}}},"additionalProperties":false},"BanIdentityDto":{"required":["ban_type","ban_type_value"],"type":"object","properties":{"ban_type":{"$ref":"#/components/schemas/BanType"},"ban_type_value":{"type":"string"}},"additionalProperties":false},"BanType":{"enum":["unknown","steam","ip","customer","customer_name","email"],"type":"string"},"CheckForBanIDByIdentitiesResponseDto":{"required":["is_banned"],"type":"object","properties":{"is_banned":{"type":"boolean"},"ban_id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/bans/check":{"post":{"tags":["bans"],"operationId":"Bans_CheckForBanByIdentities","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckForBanIDByIdentitiesRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/CheckForBanIDByIdentitiesRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CheckForBanIDByIdentitiesRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckForBanIDByIdentitiesResponseDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```
