# CreateAchievementCardAsync

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /empeo/api/v1/achievements:
    post:
      summary: CreateAchievementCardAsync
      deprecated: false
      description: สร้าง Achievement Card
      operationId: CreateAchievementCardAsync
      tags:
        - empeo/Engagement/Achievement
        - Achievement
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAchievementCardBffModel'
            examples: {}
      responses:
        '200':
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResultBffAchievementCard'
          headers: {}
          x-apidog-name: ''
        '400':
          description: Bad Request
          content:
            application/json:
              schema: &ref_0
                $ref: '#/components/schemas/ApiResultBffString'
          headers: {}
          x-apidog-name: ''
        '403':
          description: Invalid access rights
          content:
            application/json:
              schema: *ref_0
          headers: {}
          x-apidog-name: ''
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema: *ref_0
          headers: {}
          x-apidog-name: ''
      security:
        - bearerAuth: []
          x-apidog:
            schemeGroups:
              - id: yIeEZ5bVfNxArDDkZZz1d
                schemeIds:
                  - bearerAuth
            required: true
            use:
              id: yIeEZ5bVfNxArDDkZZz1d
            scopes:
              yIeEZ5bVfNxArDDkZZz1d:
                bearerAuth: []
      x-codeSamples:
        - lang: cURL
          source: |
            curl -X POST "https://api.gofive.co.th/empeo/api/v1/achievements" \
              -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
              -H "Content-Type: application/json" \
              -d '{
                "companyName": "Acme",
                "name": "Achievement Open API",
                "categoryName": "General",
                "description": "Example",
                "coverUrl": "https://cdn.example.com/cover.png",
                "isActive": true,
                "isOfferToken": false,
                "offerTokenName": "",
                "offerTokenAmount": 0,
                "isOfferReward": false,
                "offerRewardName": ""
              }'
      x-apidog-folder: empeo/Engagement/Achievement
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/351895/apis/api-27378689-run
components:
  schemas:
    CreateAchievementCardBffModel:
      type: object
      properties:
        companyName:
          type: string
          description: ชื่อบริษัทที่ใช้หา CompanyId
        name:
          type: string
          description: ชื่อ Achievement ที่ต้องการสร้าง
        categoryName:
          type: string
          description: ชื่อหมวดหมู่ (รองรับ Name/Name_EN)
        description:
          type: string
          description: รายละเอียดของการ์ด
        coverUrl:
          type: string
          description: URL รูปหน้าปกของการ์ด
        isActive:
          type: boolean
          description: สถานะการใช้งานการ์ด
        isOfferToken:
          type: boolean
          description: เปิดใช้งานการให้ Token หรือไม่
        offerTokenName:
          type: string
          description: ชื่อ Token (รองรับ Name/Name_EN)
        offerTokenAmount:
          type: integer
          description: จำนวน Token ที่ให้
        isOfferReward:
          type: boolean
          description: เปิดใช้งานการให้ Reward หรือไม่
        offerRewardName:
          type: string
          description: ชื่อ Reward (รองรับ Name/Name_EN)
      x-apidog-orders:
        - companyName
        - name
        - categoryName
        - description
        - coverUrl
        - isActive
        - isOfferToken
        - offerTokenName
        - offerTokenAmount
        - isOfferReward
        - offerRewardName
      required:
        - companyName
        - name
        - categoryName
        - description
        - coverUrl
        - isActive
        - isOfferToken
        - isOfferReward
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ApiResultBffAchievementCard:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
        errorList: &ref_1
          $ref: '#/components/schemas/AchievementCardBffModel'
        totals:
          type: integer
          nullable: true
        data: *ref_1
      x-apidog-orders:
        - statusCode
        - message
        - error
        - errorList
        - totals
        - data
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    AchievementCardBffModel:
      type: object
      properties:
        achievementId:
          type: integer
        achievementName:
          type: string
        coverUrl:
          type: string
        description:
          type: string
        isActive:
          type: boolean
      x-apidog-orders:
        - achievementId
        - achievementName
        - coverUrl
        - description
        - isActive
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ApiResultBffString:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
        errorList:
          type: string
        totals:
          type: integer
          nullable: true
        data:
          type: string
      x-apidog-orders:
        - statusCode
        - message
        - error
        - errorList
        - totals
        - data
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes:
    bearerAuth:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: ใส่ JWT Token ในรูปแบบ Bearer {token}
    bearer:
      type: bearer
      scheme: bearer
servers:
  - url: https://api.gofive.co.th
    description: Production
security:
  - bearerAuth: []
    x-apidog:
      schemeGroups:
        - id: uyL_cJmK7q60QJZRTi5ot
          schemeIds:
            - bearerAuth
      required: true
      use:
        id: uyL_cJmK7q60QJZRTi5ot
      scopes:
        uyL_cJmK7q60QJZRTi5ot:
          bearerAuth: []

```
