kiolyn-api-specs
Version:
120 lines (115 loc) • 3.06 kB
YAML
/promocode/{storeid}:
get:
tags:
- promoCode
description: Return all the promo codes belong to given store
operationId: listPromoCodes
security:
- bearerAuth: []
parameters:
- $ref#storeid: './parameters/storeid.yaml'
responses:
$ref#4xx: './responses/4xx.yaml'
200:
description: list of promo codes
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/PromoCode'
post:
tags:
- promoCode
description: Update/Create promo code
operationId: savePromoCode
security:
- bearerAuth: []
parameters:
- $ref#storeid: './parameters/storeid.yaml'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PromoCode'
responses:
$ref#4xx: './responses/4xx.yaml'
$ref#upsert: './responses/20x-upsert.yaml'
/promocode/{storeid}/{id}:
get:
tags:
- promoCode
description: Return the promo code with given id
operationId: loadPromoCode
security:
- bearerAuth: []
parameters:
- $ref#storeid: './parameters/storeid.yaml'
- $ref#id: './parameters/objectid.yaml'
responses:
$ref#4xx: './responses/4xx.yaml'
200:
description: promo code detail
content:
application/json:
schema:
type: object
properties:
value:
$ref: '#/components/schemas/PromoCode'
delete:
tags:
- promoCode
description: Delete a promo code with given id
operationId: deletePromoCode
security:
- bearerAuth: []
parameters:
- $ref#storeid: './parameters/storeid.yaml'
- $ref#id: './parameters/objectid.yaml'
responses:
$ref#4xx: './responses/4xx.yaml'
$ref#204: './responses/204.yaml'
/promocode/{storeid}/name/{name}:
get:
tags:
- promoCode
description: Return the promo code with given id
operationId: getWebOrderPromoCodeByName
security:
- bearerAuth: []
parameters:
- $ref#storeid: './parameters/storeid.yaml'
- name: name
in: path
required: true
description: The promo code name
schema:
type: string
responses:
$ref#4xx: './responses/4xx.yaml'
200:
description: promo code detail
content:
application/json:
schema:
$ref: '#/components/schemas/PromoCode'
/promocode/{storeid}/active:
get:
tags:
- promoCode
description: Return the promo code that are active to show instruction in web order
operationId: getActiveWebOrderPromoCode
security:
- bearerAuth: []
parameters:
- $ref#storeid: './parameters/storeid.yaml'
responses:
$ref#4xx: './responses/4xx.yaml'
200:
description: promo code detail
content:
application/json:
schema:
$ref: '#/components/schemas/PromoCode'