# Create limit acceptance config by program Create a limit acceptance configuration for authorizations on the program level. This configuration applies to authorizations generated by operations defined in the provided processing code. This level is a more granular level than Org and can be used as a default configuration for all accounts in this program. There can be only one configuration by program. New creation attempts for the same program get a conflict response. At least one of the following objects is **required** in this request: - `network_authorization` - `platform_authorization` - `authorization` This configuration currently supports only the over-limit feature. See the [Over-limit fee](doc:over-limit-fee) guide for more information. # OpenAPI definition ```json { "openapi": "3.1.0", "info": { "title": "Core platform - Balance watcher", "description": "Balance watcher endpoints.", "contact": { "name": "API Support", "url": "https://developers.pismo.io/support/" }, "license": { "name": "Copyright Pismo" }, "version": "1.0.0" }, "servers": [ { "url": "https://sandbox.pismolabs.io/balance-watcher", "description": "Sandbox API server for testing" } ], "tags": [ { "name": "Limit acceptance configurations", "description": "Endpoints to support acceptance configuration operations" } ], "components": { "parameters": { "ProcessingCodePath": { "name": "processingCode", "in": "path", "schema": { "type": "string" }, "required": true, "description": "Processing code which defines the operation related to this acceptance configuration.", "example": "00AB01" }, "ProgramIdPath": { "name": "programId", "schema": { "type": "integer" }, "in": "path", "required": true, "description": "Program ID for this configuration.", "example": 7126354 } }, "schemas": { "AcceptanceRequest": { "type": "object", "description": "Acceptance configuration request", "properties": { "network_authorization": { "type": "object", "description": "Group of acceptance configurations related to the network authorization flow", "properties": { "over_limit": { "$ref": "#/components/schemas/Overlimit" }, "limit_refund": { "$ref": "#/components/schemas/LimitRefund" } } }, "platform_authorization": { "type": "object", "description": "Group of acceptance configurations related to the platform authorization flow", "properties": { "over_limit": { "$ref": "#/components/schemas/Overlimit" }, "limit_refund": { "$ref": "#/components/schemas/LimitRefund" } } }, "authorization": { "type": "object", "description": "Group of acceptance configurations related to the authorization flow", "properties": { "over_limit": { "$ref": "#/components/schemas/Overlimit" }, "limit_refund": { "$ref": "#/components/schemas/LimitRefund" } } } } }, "AcceptanceResponse": { "type": "object", "description": "Acceptance configuration response", "properties": { "network_authorization": { "type": "object", "description": "Group of acceptances related to the network authorization flow", "properties": { "over_limit": { "$ref": "#/components/schemas/Overlimit" }, "limit_refund": { "$ref": "#/components/schemas/LimitRefund" } } }, "platform_authorization": { "type": "object", "description": "Group of acceptances related to the platform authorization flow", "properties": { "over_limit": { "$ref": "#/components/schemas/Overlimit" }, "limit_refund": { "$ref": "#/components/schemas/LimitRefund" } } }, "authorization": { "type": "object", "description": "Group of acceptances related to the authorization flow", "properties": { "over_limit": { "$ref": "#/components/schemas/Overlimit" }, "limit_refund": { "$ref": "#/components/schemas/LimitRefund" } } } } }, "Error": { "type": "object", "properties": { "code": { "type": "string", "description": "Error code.", "example": "RCAPI-DOMAIN-VIOLATION" }, "message": { "type": "string", "description": "Error description.", "example": "RCAPI domain violation." } } }, "Overlimit": { "type": "object", "description": "Group of configurations related to the over-limit flow", "required": [ "enable" ], "properties": { "enable": { "type": "boolean", "description": "Flag to enable the over-limit feature.", "example": true } } }, "LimitRefund": { "type": "object", "description": "Group of configurations related to the limit refund flow", "required": [ "enable" ], "properties": { "enable": { "type": "boolean", "description": "Flag to enable the limit refund feature.", "example": true } } } }, "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "description": "Account access token. Tokens can expire quickly, which can result in an \"Unauthorized\" error.", "bearerFormat": "JWT" } } }, "security": [ { "BearerAuth": [] } ], "paths": { "/v1/acceptance/processing-code/{processingCode}/program/{programId}": { "parameters": [ { "$ref": "#/components/parameters/ProcessingCodePath" }, { "$ref": "#/components/parameters/ProgramIdPath" } ], "post": { "summary": "Create limit acceptance config by program", "description": "Create a limit acceptance configuration for authorizations on the program level. This configuration applies to authorizations generated by operations defined in the provided processing code.\n\nThis level is a more granular level than Org and can be used as a default configuration for all accounts in this program. There can be only one configuration by program. New creation attempts for the same program get a conflict response.\n\nAt least one of the following objects is **required** in this request:\n- `network_authorization` \n- `platform_authorization`\n- `authorization`\n\nThis configuration currently supports only the over-limit feature. See the [Over-limit fee](https://developers.pismo.io/pismo-docs/docs/over-limit-fee) guide for more information.\n", "operationId": "post-acceptance-by-program", "tags": [ "Limit acceptance configurations" ], "requestBody": { "description": "Create acceptance configuration request body", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AcceptanceRequest" } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AcceptanceResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "example": { "code": "BW0008", "message": "Invalid request." } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "example": { "code": "BW0031", "message": "Config creation by account unauthorized." } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "example": { "code": "BW0032", "message": "Config already exists." } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "example": { "code": "BW0007", "message": "An unexpected error happened." } } } } } } } } } ```