--- updatedAt: 2026-07-30T18:14:46.000Z agentTools: projectIndex: https://docs.rekaz.io/llms.txt --- # /api/public/subscriptions ## OpenAPI definition ```json { "openapi": "3.0.4", "info": { "title": "Rekaz Merchant Public API", "version": "v1" }, "servers": [ { "url": "https://platform.rekaz.io", "description": "Rekaz production" } ], "security": [ { "basicAuth": [], "tenantHeader": [] } ], "paths": { "/api/public/subscriptions": { "post": { "tags": [ "Subscription" ], "operationId": "createPublicSubscription", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSubscriptionForCustomerDto" } }, "text/json": { "schema": { "$ref": "#/components/schemas/CreateSubscriptionForCustomerDto" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/CreateSubscriptionForCustomerDto" } } } }, "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/CreateSubscriptionResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/CreateSubscriptionResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/CreateSubscriptionResponse" } } } } } } } }, "components": { "securitySchemes": { "basicAuth": { "type": "http", "scheme": "basic", "description": "Use the API key ID as the username and the API key secret as the password." }, "tenantHeader": { "type": "apiKey", "in": "header", "name": "__tenant", "description": "The Rekaz tenant ID." } }, "schemas": { "CreateSubscriptionForCustomerDto": { "required": [ "items" ], "type": "object", "properties": { "customerId": { "type": "string", "format": "uuid", "nullable": true }, "customerDetails": { "$ref": "#/components/schemas/DtosCustomerDetailsDto" }, "startAt": { "type": "string", "format": "date-time" }, "discount": { "$ref": "#/components/schemas/Discount" }, "branchId": { "type": "string", "format": "uuid", "nullable": true }, "items": { "minItems": 1, "type": "array", "items": { "$ref": "#/components/schemas/CreateSubscriptionItemDto" } }, "occurenceDays": { "type": "array", "items": { "$ref": "#/components/schemas/DayOfWeek" }, "nullable": true } }, "additionalProperties": false }, "CreateSubscriptionItemDto": { "type": "object", "properties": { "priceId": { "type": "string", "format": "uuid" }, "quantity": { "maximum": 4294967295, "minimum": 1, "type": "integer", "format": "int32" }, "customFields": { "type": "object", "additionalProperties": { "type": "string" } }, "loyaltyRewardId": { "type": "string", "format": "uuid", "nullable": true } }, "additionalProperties": false }, "CreateSubscriptionResponse": { "type": "object", "properties": { "invoiceId": { "type": "string", "format": "uuid", "nullable": true }, "paymentLink": { "type": "string", "nullable": true } }, "additionalProperties": false }, "CustomerType": { "enum": [ 1, 2 ], "type": "integer", "format": "int32", "x-enumNames": [ "Individuals", "Corporates" ] }, "DayOfWeek": { "enum": [ 0, 1, 2, 3, 4, 5, 6 ], "type": "integer", "format": "int32", "x-enumNames": [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ] }, "Discount": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/DiscountType" }, "value": { "type": "number", "format": "double" } }, "additionalProperties": false }, "DiscountType": { "enum": [ 0, 1 ], "type": "integer", "format": "int32", "x-enumNames": [ "Fixed", "Percentage" ] }, "DtosCustomerDetailsDto": { "required": [ "mobileNumber", "name" ], "type": "object", "properties": { "name": { "minLength": 1, "type": "string" }, "mobileNumber": { "minLength": 1, "type": "string" }, "email": { "type": "string", "format": "email", "nullable": true }, "type": { "$ref": "#/components/schemas/CustomerType" }, "companyName": { "type": "string", "nullable": true } }, "additionalProperties": false } } } } ```