UNPKG

kiolyn-api-specs

Version:
143 lines (137 loc) 3.42 kB
/store: get: tags: - store description: 1. If the current role is Merchant, then return all Stores belong to this Merchant. 2. If the current role is (Super)Admin, then return all Stores from all Merchant. **Note**: Not yet support for pagination. operationId: listStores parameters: - name: page in: query description: Page number schema: type: number - name: count in: query description: Total per page schema: type: number - name: query in: query description: Filter by name schema: type: string security: - bearerAuth: [] responses: $ref#4xx: './responses/4xx.yaml' 200: description: merchant account detail content: application/json: schema: type: array items: $ref: '#/components/schemas/Store' post: tags: - store description: Update/Create Store operationId: saveStore security: - bearerAuth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Store' responses: $ref#4xx: './responses/4xx.yaml' $ref#upsert: './responses/20x-upsert.yaml' /store/{storeid}: get: tags: - store description: Return the store with given ID operationId: loadStore security: - bearerAuth: [] parameters: - $ref#storeid: './parameters/storeid.yaml' responses: $ref#4xx: './responses/4xx.yaml' 200: description: the store detail content: application/json: schema: type: object properties: value: $ref: '#/components/schemas/Store' delete: tags: - store description: Delete the given store operationId: deleteStore security: - bearerAuth: [] parameters: - $ref#storeid: './parameters/storeid.yaml' responses: $ref#4xx: './responses/4xx.yaml' $ref#204: './responses/204.yaml' /store/{storeid}/import: post: tags: - store description: Create process import operationId: importStore parameters: - $ref#storeid: './parameters/storeid.yaml' security: - bearerAuth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/FormImportStore' responses: $ref#4xx: './responses/4xx.yaml' 200: description: response result import store process content: application/json: schema: $ref: '#/components/schemas/ResultImport' /store/{storeid}/logo: post: tags: - store description: upload store for a store operationId: uploadStoreLogo security: - bearerAuth: [] parameters: - $ref#storeid: './parameters/storeid.yaml' requestBody: content: multipart/form-data: schema: type: object properties: file: type: string format: binary responses: $ref#4xx: './responses/4xx.yaml' '200': description: uploaded image detail content: application/json: schema: $ref: '#/components/schemas/Image'