# Get Cost Center

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /empeo/api/v1/Payroll/cost-centers:
    post:
      summary: Get Cost Center
      deprecated: false
      description: ''
      tags:
        - empeo/Payroll
      parameters:
        - name: Content-Type
          in: header
          description: 'Accepted value: application/json'
          required: false
          example: application/json
          schema:
            type: string
        - name: Authorization
          in: header
          description: Authorization credential utilized in API requests
          required: false
          example: >-
            Bearer
            eyJhbGciOiJSUzI1NiIsImtpZCI6IkIwN0I2RTQ3QTU1MzkxOTdDQ0Y2NzlDNTVEODFFNDQ1RTE2NUQ2QkVSUzI1NiIsInR5cCI6ImF0K2p3dCIsIng1dCI6InNIdHVSNlZUa1pmTTlubkZYWUhrUmVGbDFyNCJ9.eyJuYmYiOjE3MTYzNDg3MTYsImV4cCI6MTcxNzY0NDcxNiwiaXNzIjoiaHR0cHM6Ly9kZXYudGtzLmNvLnRoL2lkZW50aXR5c2VydmVyMiIsImF1ZCI6WyJJTUMuQVBJIiwiVmVuaW8yLkFQSSIsIkdPRklWRS5BUEkiLCJDbGllbnRQb3J0YWwuQVBJIl0sImNsaWVudF9pZCI6IklNQyIsInN1YiI6ImY3OWY2NWZlLTQ1YzctNDM2OC1hOTM1LWVhNzc3NjJmNTljZSIsImF1dGhfdGltZSI6MTcxNjM0ODcxNiwiaWRwIjoibG9jYWwiLCJlbWFpbCI6ImRldi5uZXd0ZXN0QGhvdG1haWwuY29tIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiZGV2Lm5ld3Rlc3RAaG90bWFpbC5jb20iLCJuYW1lIjoiZGV2Lm5ld3Rlc3RAaG90bWFpbC5jb20iLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiQ2xpZW50SWQiOiJJTUMiLCJyb2xlIjoiIiwidXNlcm5hbWUiOiJkZXYubmV3dGVzdEBob3RtYWlsLmNvbSIsIkNvbXBhbnlJZCI6Ijk4NzY1NDkyNyIsInNpZCI6IkZFMTZGMzRFNEU0NzUzQUEyQTQ4MEZCOEFGQkJDRDdCIiwiaWF0IjoxNzE2MzQ4NzE2LCJzY29wZSI6WyJvcGVuaWQiLCJwcm9maWxlIiwiSU1DLkFQSSIsIlZlbmlvMi5BUEkiLCJHT0ZJVkUuQVBJIiwiQ2xpZW50UG9ydGFsLkFQSSIsIm9mZmxpbmVfYWNjZXNzIl0sImFtciI6WyJwd2QiXX0.a_k-26pvgraJwjRoZnaXoZFwP14kRz8PAjVjQahbcZilSnad8La0MB-yZG1nnTrlgskzDzcYYci6IGl1bElfhKTRHh3Ozrym1eWuXLlKBzzrOINISdf30Vp3eNrml8o5HujynpCo1nGPJJQM2oGTDqrt0JRFQeMK23-jBsL7goP76pE65QV03TRGGPhWPvKr_kD9QQkDQZD76z9e1QZ3W-oIEbQPtnHDAN-C4igEdymJQJ1YYZOFzlfi0ShPpb-AoNQi3ay8xMIzkxEJHLQRsRMUaQe7Emjgibb5QF9Km2k-bmc4jIvxnkw5r1Shn9apALUWMMQaLdBreb2NK-xVdQ
          schema:
            type: string
        - name: Ocp-Apim-Subscription-Key
          in: header
          description: Api subscription key get from the OpenAPI integration setting page
          required: false
          example: WPe123a9RKbcfLQNSztr45
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                companyName:
                  type: string
                year:
                  type: integer
                periodCalculateNo:
                  type: integer
              required:
                - companyName
                - year
                - periodCalculateNo
              x-apidog-orders:
                - companyName
                - year
                - periodCalculateNo
            example:
              CompanyName: empeo Dev Test
              Year: 2024
              PeriodCalculateNo: 1
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                  message:
                    type: string
                  totals:
                    type: integer
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        companyCode:
                          type: string
                          description: 'Company Code '
                        companyName:
                          type: string
                          description: Company Name
                        code:
                          type: string
                          description: Financial item code
                        financialItemName:
                          type: string
                          description: Financial item name
                        costCenter:
                          type: string
                          description: >-
                            Cost center from the organization in the employee
                            financial transaction list
                        amount:
                          type: number
                          description: >-
                            Amount of money in employee financial transaction
                            list
                        accountCode:
                          type: string
                          description: Financial item account groups code
                        accountCodeType:
                          type: string
                          description: Account type text (Vendor, Ledger, Employee)
                        debitCredit:
                          type: string
                          description: 1 = Debit, 2 =Credit
                        orgLevelTwoName:
                          type: string
                          description: >-
                            Thai name of organization level 2 in employee
                            financial transaction list
                        orgLevelTwoCostCenter:
                          type: string
                          description: >-
                            Cost center from the organization level 2 in the
                            employee financial transaction list
                        orgLevelThreeName:
                          type: string
                          description: >-
                            Thai name of organization level 3 in employee
                            financial transaction list
                        orgLevelThreeCostCenter:
                          type: string
                          description: >-
                            Cost center from the organization level 3 in the
                            employee financial transaction list
                        orgLevelFourName:
                          type: string
                          description: >-
                            Thai name of organization in employee financial
                            transaction list
                        orgLevelFourCostCenter:
                          type: string
                          description: >-
                            Cost center from the organization in the employee
                            financial transaction list
                      required:
                        - companyCode
                        - companyName
                        - code
                        - financialItemName
                        - orgLevelFourCostCenter
                        - amount
                        - accountCode
                        - accountCodeType
                        - debitCredit
                        - costCenter
                        - orgLevelTwoName
                        - orgLevelTwoCostCenter
                        - orgLevelThreeName
                        - orgLevelThreeCostCenter
                        - orgLevelFourName
                      x-apidog-orders:
                        - companyCode
                        - companyName
                        - code
                        - financialItemName
                        - orgLevelTwoName
                        - orgLevelTwoCostCenter
                        - orgLevelThreeName
                        - orgLevelThreeCostCenter
                        - orgLevelFourName
                        - orgLevelFourCostCenter
                        - costCenter
                        - amount
                        - accountCode
                        - accountCodeType
                        - debitCredit
                required:
                  - totals
                  - data
                  - statusCode
                x-apidog-orders:
                  - statusCode
                  - message
                  - totals
                  - data
              example:
                statusCode: 200
                message: OK
                totals: 2
                data:
                  - companyCode: '987654927'
                    companyName: empeo Dev Test
                    code: D12
                    financialItemName: หัก EPP
                    orgLevelTwoName: เทคโนโลยีสารสนเทศ
                    orgLevelTwoCostCenter: '21032'
                    orgLevelThreeName: Pegasus
                    orgLevelThreeCostCenter: ''
                    orgLevelFourName: Dev team P
                    orgLevelFourCostCenter: ''
                    costCenter: ''
                    amount: 120
                    accountCode: ''
                    accountCodeType: ''
                    debitCredit: Credit
                  - companyCode: '987654927'
                    companyName: empeo Dev Test
                    code: I02
                    financialItemName: ค่าล่วงเวลา
                    orgLevelTwoName: เทคโนโลยีสารสนเทศ
                    orgLevelTwoCostCenter: '21032'
                    orgLevelThreeName: Pegasus
                    orgLevelThreeCostCenter: ''
                    orgLevelFourName: Dev team P
                    orgLevelFourCostCenter: ''
                    costCenter: ''
                    amount: 12330
                    accountCode: ''
                    accountCodeType: ''
                    debitCredit: Debit
          headers: {}
          x-apidog-name: Success
      security:
        - bearerAuth: []
          x-apidog:
            schemeGroups:
              - id: uyL_cJmK7q60QJZRTi5ot
                schemeIds:
                  - bearerAuth
            required: true
            use:
              id: uyL_cJmK7q60QJZRTi5ot
            scopes:
              uyL_cJmK7q60QJZRTi5ot:
                bearerAuth: []
      x-apidog-folder: empeo/Payroll
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/351895/apis/api-7443590-run
components:
  schemas: {}
  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: []

```
