openapi: 3.1.0 info: title: purchases-api Merchants API version: '1.0' servers: - url: https://sandboxpurchasesapi.connexpay.com security: - sec0: [] tags: - name: Merchants paths: /api/v1/Merchants/{merchantGuid}/UserDefinedParameterDefinition: post: summary: Create User Defined Parameter description: Use this endpoint to create User Defined Parameters to associate with your PayOuts. operationId: create-user-defined-parameter parameters: - name: Content-Type in: header description: '"application/json"' schema: type: string - name: Authorization in: header description: 'Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."' schema: type: string - name: merchantGuid in: path description: The client identifier assigned by ConnexPay. schema: type: string required: true requestBody: content: application/json: schema: type: object required: - name - idDataType properties: name: type: string description: Required field defining the name of the User Defined Parameter being created. Alphanumerics and special characters are allowed. idDataType: type: integer description: 'Required field defining the data type of the User Defined Parameter being created. Allowed values and corresponding definition are as follows: 1 = Integer, 2 = Decimal, 3 = String, 4 = DataTime.' format: int32 maxLength: type: integer description: Field defining the maximum length allowed for the created User Defined Parameter. Required when the idDataType is String and the value must be an integer between 1 and 100. format: int32 IsFilterable: type: boolean description: Field to determine if the User Defined Parameter being created will be filterable in the PayIns & PayOuts table in ConnexPay Bridge. default: 'false' examples: Create User Defined Parameter Example: value: name: User Defined Parameter idDataType: 3 maxLength: 100 responses: '201': description: '201' content: application/json: examples: Created: value: "{\n \"idUserDefinedParameterDefinition\": 0,\n \"idMerchant\": 0,\n \"name\": \"User Defined Parameter\",\n \"idDataType\": 3,\n \"maxLength\": 100,\n \"guid\": \"00000000-0000-0000-0000-000000000000\",\n \"isDeleted\": false\n}" schema: type: object properties: idUserDefinedParameterDefinition: type: integer example: 0 default: 0 idMerchant: type: integer example: 0 default: 0 name: type: string example: User Defined Parameter idDataType: type: integer example: 3 default: 0 maxLength: type: integer example: 100 default: 0 guid: type: string example: 00000000-0000-0000-0000-000000000000 isDeleted: type: boolean example: false default: true '400': description: '400' content: application/json: examples: Bad Request - Invalid value for DateType or Max Length must be between 1 and 100: value: '{}' schema: type: object properties: {} '403': description: '403' content: application/json: examples: Forbidden - User does not have access to this merchant: value: '{}' schema: type: object properties: {} '409': description: '409' content: application/json: examples: Conflict - A User Defined param definition with this Name already exists: value: '{}' schema: type: object properties: {} deprecated: false tags: - Merchants /api/v1/Merchants/{merchantGuid}/UserDefinedParameterDefinition/{userDefinedParameterDefinitionGuid}: put: summary: Update User Defined Parameter description: Use this endpoint to update a previously created User Defined Parameter. Only the name and maximum length may be updated. operationId: update-user-defined-parameter parameters: - name: Content-Type in: header description: '"application/json"' schema: type: string - name: Authorization in: header description: 'Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."' schema: type: string - name: merchantGuid in: path description: The client identifier assigned by ConnexPay. schema: type: string required: true - name: userDefinedParameterDefinitionGuid in: path description: The unique identifier of the User Defined Parameter to update. schema: type: string required: true requestBody: content: application/json: schema: type: object required: - name properties: name: type: string description: Required field defining the updated name of the User Defined Parameter. Alphanumerics and special characters are allowed. idDataType: type: integer description: The idDataType cannot be updated and will be ignored if present in the request. format: int32 maxLength: type: integer description: Field defining the maximum length allowed for the updated User Defined Parameter. Required when the idDataType is String and the value must be an integer between 1 and 100. format: int32 isFilterable: type: boolean default: 'false' description: Field to determine if the User Defined Parameter being created will be filterable in the PayIns & PayOuts table in ConnexPay Bridge. examples: Update User Defined Parameter Example: value: name: User Defined Parameter idDataType: 3 maxLength: 100 responses: '204': description: '204' content: application/json: examples: No content: value: '{}' schema: type: object properties: {} '400': description: '400' content: application/json: examples: Bad Request - Invalid value for Name or Max Length must be between 1 and 100: value: '{}' schema: type: object properties: {} '403': description: '403' content: application/json: examples: Foribdden - User does not have access to this merchant: value: '{}' schema: type: object properties: {} deprecated: false tags: - Merchants delete: summary: Delete User Defined Parameter description: Use this endpoint to delete a created User Defined Parameters. Once a User Defined Parameter has been used with a PayOut or EmailTemplate, it may not be deleted. operationId: delete-user-defined-parameter parameters: - name: Content-Type in: header description: '"application/json"' schema: type: string - name: Authorization in: header description: 'Token. Eg: "Bearer eHSN5rTBzqDozgAAlN1UlTMVuIT1zSiAZWCo6E..."' schema: type: string - name: merchantGuid in: path description: The client identifier assigned by ConnexPay. schema: type: string required: true - name: userDefinedParameterDefinitionGuid in: path description: The unique identifier of the User Defined Parameter to be deleted. schema: type: string required: true responses: '204': description: '204' content: application/json: examples: No content: value: '{}' schema: type: object properties: {} '400': description: '400' content: application/json: examples: Bad Request: value: '{}' schema: type: object properties: {} '403': description: '403' content: application/json: examples: Forbidden - User does not have access to this merchant: value: '{}' schema: type: object properties: {} deprecated: false requestBody: content: application/json: schema: {} examples: Delete User Defined Parameter Example: value: {} tags: - Merchants components: securitySchemes: sec0: type: http scheme: basic x-readme: headers: - key: Authorization value: Basic explorer-enabled: false proxy-enabled: true x-readme-fauxas: true