openapi: 3.2.0 info: title: Hostfully Promo Codes API license: name: Apache 2.0 url: https://www.hostfully.com/ version: v3.0.1 servers: - url: https://sandbox-api.hostfully.com security: - JWT-Authentication: [] - Agency-API-key: [] tags: - name: PromoCodes paths: /api/v3.3/promo-codes: get: tags: - PromoCodes description: Fetches promo codes by provided filter operationId: getAll_15 parameters: - name: propertiesUids in: query required: false schema: uniqueItems: true type: array items: type: string default: [] - name: statuses in: query required: false schema: uniqueItems: true type: array items: type: string enum: - ACTIVE - EXPIRED - REDEEMED - DELETED default: [] - name: from in: query required: false schema: type: string example: '2026-04-20T11:52:36' example: '2025-01-01T00:00:00' - name: to in: query required: false schema: type: string example: '2026-04-20T11:52:36' example: '2025-01-10T23:59:59' - name: sort in: query required: false schema: type: string enum: - SORT_BY_CODE - SORT_BY_STATUS - SORT_BY_TYPE - SORT_BY_VALUE - SORT_BY_CURRENCY - SORT_BY_SINGLE_USAGE - SORT_BY_VALID_FROM_DATE_TIME - SORT_BY_VALID_TO_DATE_TIME - SORT_BY_EXPIRATION_DATE_TIME - SORT_BY_CREATED_DATE - name: sortDirection in: query required: false schema: type: string enum: - ASC - DESC - name: _cursor in: query description: Cursor for pagination required: false schema: type: string description: Cursor for pagination - name: _limit in: query description: Limit for pagination required: false schema: type: string description: Limit for pagination responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PromoCodeResponseWrapper' summary: Get all 15 x-summary-source: derived post: tags: - PromoCodes operationId: post_12 requestBody: content: application/json: schema: $ref: '#/components/schemas/PromoCodeApi3AddingDto' required: true responses: '200': description: OK content: '*/*': schema: $ref: '#/components/schemas/PromoCodeApiResponseWrapper' summary: Post 12 x-summary-source: derived /api/v3.3/promo-codes/{promoCodeUid}: get: tags: - PromoCodes operationId: getOne_9 parameters: - name: promoCodeUid in: path required: true schema: type: string responses: '200': description: OK content: '*/*': schema: $ref: '#/components/schemas/PromoCodeApiResponseWrapper' summary: Get one 9 x-summary-source: derived delete: tags: - PromoCodes operationId: delete_11 parameters: - name: promoCodeUid in: path required: true schema: type: string responses: '200': description: OK content: '*/*': schema: type: object summary: Delete 11 x-summary-source: derived components: schemas: PromoCodeApi3Dto: type: object properties: uid: type: string code: type: string status: type: string enum: - ACTIVE - EXPIRED - REDEEMED - DELETED type: type: string enum: - AMOUNT - PERCENT value: type: number currency: type: string enum: - AED - ARS - AUD - BGN - BHD - BRL - CAD - CHF - CLP - CNY - COP - CZK - DKK - DOP - EUR - GBP - GTQ - HKD - HUF - IDR - IKR - ILS - INR - JPY - KES - KRW - MXN - MYR - NOK - NONE - NZD - PEN - PHP - PLN - RON - RUB - SEK - SGD - THB - TRY - TWD - USD - UYU - VEF - VND - VUV - JOD - SAR - EGP - ZAR - TTD - BBD - CVE - AWG - MAD - PYG singleUsage: type: boolean validFromZonedDateTime: type: string format: date-time validToZonedDateTime: type: string format: date-time expirationZonedDateTime: type: string format: date-time validFromUTCDateTime: type: string example: '2026-04-20T11:52:36' validToUTCDateTime: type: string example: '2026-04-20T11:52:36' expirationUTCDateTime: type: string example: '2026-04-20T11:52:36' propertyUid: type: string agencyUid: type: string PromoCodeApi3AddingDto: required: - expirationDate - name - type - validFromDate - validToDate - value type: object properties: propertyUid: type: string singleUse: type: boolean currency: type: string enum: - AED - ARS - AUD - BGN - BHD - BRL - CAD - CHF - CLP - CNY - COP - CZK - DKK - DOP - EUR - GBP - GTQ - HKD - HUF - IDR - IKR - ILS - INR - JPY - KES - KRW - MXN - MYR - NOK - NONE - NZD - PEN - PHP - PLN - RON - RUB - SEK - SGD - THB - TRY - TWD - USD - UYU - VEF - VND - VUV - JOD - SAR - EGP - ZAR - TTD - BBD - CVE - AWG - MAD - PYG name: type: string type: type: string enum: - AMOUNT - PERCENT value: type: number validFromDate: type: string example: '2026-04-20T11:52:36' validToDate: type: string example: '2026-04-20T11:52:36' expirationDate: type: string example: '2026-04-20T11:52:36' PromoCodeResponseWrapper: type: object properties: promoCodes: type: array items: $ref: '#/components/schemas/PromoCodeApi3Dto' _metadata: $ref: '#/components/schemas/Api3ResponseMetadata' _paging: $ref: '#/components/schemas/Api3ResponsePaging' Api3ResponseMetadata: type: object properties: count: type: integer format: int32 totalCount: type: integer format: int32 Api3ResponsePaging: type: object properties: _limit: type: integer format: int32 _nextCursor: type: string PromoCodeApiResponseWrapper: type: object properties: promoCode: $ref: '#/components/schemas/PromoCodeApi3Dto' securitySchemes: JWT-Authentication: type: apiKey description: OAuth Access Token name: Authorization in: header Agency-API-key: type: apiKey description: API Key name: X-HOSTFULLY-APIKEY in: header externalDocs: description: Hostfully Documentation url: https://dev.hostfully.com/v3.0/reference x-readme: explorer-enabled: true proxy-enabled: true