# CreateAchievementAwardDocumentAsync

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /empeo/api/v1/achievements/award-document:
    post:
      summary: CreateAchievementAwardDocumentAsync
      deprecated: false
      description: ออกเอกสารมอบ Achievement ให้หลายผู้รับพร้อมกัน
      operationId: CreateAchievementAwardDocumentAsync
      tags:
        - empeo/Engagement/Achievement
        - Achievement
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AchievementAwardDocumentRequestBffModel'
            examples: {}
      responses:
        '200':
          description: Success response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ApiResultBffAchievementAwardDocumentResult
          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: 9jw8ISV4tryc9Iq11VDXU
                schemeIds:
                  - bearerAuth
            required: true
            use:
              id: 9jw8ISV4tryc9Iq11VDXU
            scopes:
              9jw8ISV4tryc9Iq11VDXU:
                bearerAuth: []
      x-codeSamples:
        - lang: cURL
          source: >
            curl -X POST
            "https://api.gofive.co.th/empeo/api/v1/achievements/award-document"
            \
              -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
              -H "Content-Type: application/json" \
              -d '{
                "companyName": "Acme",
                "achievementName": "Achievement Open API",
                "receiverEmployeeNo": ["EMP001", "EMP002"],
                "description": "Example",
                "isOfferToken": false,
                "offerTokenName": "",
                "offerTokenAmount": 0,
                "isOfferReward": false,
                "offerRewardName": "",
                "attachments": []
              }'
      x-apidog-folder: empeo/Engagement/Achievement
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/351895/apis/api-27378690-run
components:
  schemas:
    AchievementAwardDocumentRequestBffModel:
      type: object
      properties:
        companyName:
          type: string
          description: ชื่อบริษัทที่ใช้หา CompanyId
        achievementName:
          type: string
          description: ชื่อ Achievement (รองรับ Name/Name_EN)
        receiverEmployeeNo:
          type: array
          items:
            type: string
          description: รายชื่อพนักงานผู้รับ (EmployeeNo) ในบริษัทเดียวกัน
        description:
          type: string
          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)
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/EngageTransactionAttachmentModel'
          description: รายการไฟล์แนบ
      x-apidog-orders:
        - companyName
        - achievementName
        - receiverEmployeeNo
        - description
        - isOfferToken
        - offerTokenName
        - offerTokenAmount
        - isOfferReward
        - offerRewardName
        - attachments
      required:
        - companyName
        - achievementName
        - receiverEmployeeNo
        - description
        - isOfferToken
        - offerTokenAmount
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    EngageTransactionAttachmentModel:
      type: object
      properties:
        engageTransactionId:
          type: integer
          description: รหัสธุรกรรม (ถ้ามี)
        attachmentNo:
          type: integer
          description: ลำดับไฟล์แนบ
        attachmentMimeType:
          type: string
          description: MimeType ของไฟล์
        attachmentFilename:
          type: string
          description: ชื่อไฟล์
        attachmentSize:
          type: integer
          description: ขนาดไฟล์ (bytes)
        attachmentURL:
          type: string
          description: URL ไฟล์แนบ
        attachmentThumbnailURL:
          type: string
          description: URL thumbnail
      x-apidog-orders:
        - engageTransactionId
        - attachmentNo
        - attachmentMimeType
        - attachmentFilename
        - attachmentSize
        - attachmentURL
        - attachmentThumbnailURL
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ApiResultBffAchievementAwardDocumentResult:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
        errorList: &ref_1
          $ref: '#/components/schemas/AchievementAwardDocumentResultBffModel'
        totals:
          type: integer
          nullable: true
        data: *ref_1
      x-apidog-orders:
        - statusCode
        - message
        - error
        - errorList
        - totals
        - data
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    AchievementAwardDocumentResultBffModel:
      type: object
      properties:
        docNo:
          type: string
        documentStatus:
          type: integer
        totalReceivers:
          type: integer
      x-apidog-orders:
        - docNo
        - documentStatus
        - totalReceivers
      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: []

```
