Remote Cost Center Allocations API

The Cost Center Allocations API from Remote — 2 operation(s) for cost center allocations.

OpenAPI Specification

remote-cost-center-allocations-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Remote Address Details Cost Center Allocations API
  version: 0.1.0
servers:
- url: https://gateway.remote.com/
  variables: {}
- url: https://gateway.remote-sandbox.com/
  variables: {}
security:
- OAuth2: []
tags:
- name: Cost Center Allocations
paths:
  /v1/employments/{employment_id}/cost-center-allocations:
    get:
      callbacks: {}
      deprecated: false
      description: 'Lists the cost center allocations for an employment. Each allocation includes the cost center,

        the allocated percentage, and its effective period. An employment with no cost center assigned

        returns an empty list.


        Use the `status` query parameter to return only `active`, `scheduled`, or `expired` allocations.

        When omitted, all allocations are returned.



        ## Scopes


        | Category | Read only Scope | Write only Scope (read access implicit) |

        |---|---|---|

        | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) |

        '
      operationId: get_v1_employments_employment_id_cost-center-allocations
      parameters:
      - description: Employment ID
        example: 93t3j-employment-id-9suej43
        in: path
        name: employment_id
        required: true
        schema:
          type: string
      - description: Filters allocations by status. When omitted, allocations of every status are returned.
        example: active
        in: query
        name: status
        required: false
        schema:
          enum:
          - active
          - scheduled
          - expired
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCostCenterAllocationsResponse'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
          description: Unprocessable Entity
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
          description: Unprocessable Entity
      security:
      - CustomerAPIToken:
        - https://gateway.remote.com/company.manage
        - employment:read
        - employment:write
        - employments
        - all:write
        - all:read
        OAuth2AuthorizationCode:
        - https://gateway.remote.com/company.manage
        - employment:read
        - employment:write
        - employments
        - all:write
        - all:read
      summary: List cost center allocations for an employment
      tags:
      - Cost Center Allocations
  /v1/company/{company_id}/cost-center-allocations:
    get:
      callbacks: {}
      deprecated: false
      description: 'Lists all employments under a company with their cost center allocations, grouped by employment.

        Each entry includes the employment''s legal entity IDs and the list of cost center allocations

        assigned to it, with each allocation''s cost center, allocated percentage, and effective period.

        Employments with no cost center allocations are included with an empty list.


        Use the `status` query parameter to return only `active`, `scheduled`, or `expired` allocations.

        When omitted, all allocations are returned.



        ## Scopes


        | Category | Read only Scope | Write only Scope (read access implicit) |

        |---|---|---|

        | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) |

        '
      operationId: get_v1_company_company_id_cost-center-allocations
      parameters:
      - description: Company ID
        example: 93t3j-company-id-9suej43
        in: path
        name: company_id
        required: true
        schema:
          type: string
      - description: Filters allocations by status. When omitted, allocations of every status are returned.
        example: active
        in: query
        name: status
        required: false
        schema:
          enum:
          - active
          - scheduled
          - expired
          type: string
      - description: Starts fetching records after the given page
        example: 1
        in: query
        name: page
        required: false
        schema:
          default: 1
          minimum: 1
          type: integer
      - description: Number of items per page
        example: 20
        in: query
        name: page_size
        required: false
        schema:
          default: 20
          maximum: 100
          minimum: 1
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCompanyCostCenterAllocationsResponse'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
          description: Forbidden
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
          description: Unprocessable Entity
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
          description: Unprocessable Entity
      security:
      - CustomerAPIToken:
        - https://gateway.remote.com/company.manage
        - employment:read
        - employment:write
        - employments
        - all:write
        - all:read
        OAuth2AuthorizationCode:
        - https://gateway.remote.com/company.manage
        - employment:read
        - employment:write
        - employments
        - all:write
        - all:read
      summary: List cost center allocations for a company
      tags:
      - Cost Center Allocations
components:
  schemas:
    ParameterError:
      example:
        code: invalid_param
        message: Invalid parameter
        param: employment_id
      properties:
        code:
          description: An error code that describes the nature of the error.
          type: string
        message:
          description: A developer friendly error message that gives details on what the error was and how it may be remedied.
          type: string
        param:
          description: The parameter that lead to the error message.
          type: string
      required:
      - code
      - message
      - param
      title: ParameterError
      type: object
    ListCompanyCostCenterAllocationsResponse:
      description: Response schema listing many employments
      example:
        current_page: 1
        employments:
        - bill_to_legal_entity_id: 93t3j-bill-to-legal-entity-id-9suej43
          cost_center_allocations:
          - cost_center:
              code: GTM-001
              name: GTM - Sales
              slug: 93t3j-cost-center-id-9suej43
            effective_from: '2026-01-01'
            effective_to: null
            id: 663e0b79-c893-45ff-a1b2-f6dcabc098b5
            percentage: 100.0
            status: active
          employment_id: 93t3j-employment-id-9suej43
          engaged_by_legal_entity_id: 93t3j-engaged-by-legal-entity-id-9suej43
        total_count: 1
        total_pages: 1
      properties:
        data:
          properties:
            current_page:
              description: The current page among all of the total_pages
              type: integer
            employments:
              items:
                $ref: '#/components/schemas/EmploymentWithCostCenterAllocations'
              type: array
            total_count:
              description: The total number of records in the result
              type: integer
            total_pages:
              description: The total number of pages the user can go through
              type: integer
          type: object
      title: ListCompanyCostCenterAllocationsResponse
      type: object
    CostCenter:
      additionalProperties: false
      description: The cost center an employment is allocated to.
      example:
        code: GTM-001
        name: GTM - Sales
        slug: 93t3j-cost-center-id-9suej43
      properties:
        code:
          description: Cost center code. Typically used as the join key to an external general ledger.
          nullable: true
          type: string
        name:
          description: Cost center name.
          type: string
        slug:
          description: Unique identifier of the cost center.
          type: string
      required:
      - name
      - code
      - slug
      title: CostCenter
      type: object
    ForbiddenResponse:
      description: Returned when the authenticated user or token does not have permission to perform the requested action. Check that the token has the required OAuth2 scopes and that the user has the necessary role.
      example:
        message: Forbidden
      properties:
        message:
          pattern: Forbidden
          type: string
      required:
      - message
      title: ForbiddenResponse
      type: object
    UnprocessableEntityResponse:
      anyOf:
      - properties:
          errors:
            type: object
        required:
        - errors
        type: object
      - properties:
          message:
            oneOf:
            - type: string
            - $ref: '#/components/schemas/ParameterError'
            - items:
                $ref: '#/components/schemas/ParameterError'
              title: ParameterErrors
              type: array
            - $ref: '#/components/schemas/ActionError'
            - items:
                $ref: '#/components/schemas/ActionError'
              title: ActionErrors
              type: array
        required:
        - message
        type: object
      example:
        errors:
          some_field:
          - is invalid
      title: UnprocessableEntityResponse
      type: object
    NotFoundResponse:
      description: Returned when the requested resource does not exist or is not accessible with the current authentication credentials.
      example:
        message: '{resource} not found'
      properties:
        message:
          description: A message indicating which resource was not found.
          pattern: Not Found
          type: string
      title: NotFoundResponse
      type: object
    BadRequestResponse:
      description: Returned when the request is malformed or contains invalid parameters. The message may be a simple string or a structured object with a code and detailed message.
      example:
        message: invalid {resource}
      oneOf:
      - properties:
          message:
            description: A human-readable error message describing what was wrong with the request.
            type: string
        required:
        - message
        type: object
      - properties:
          message:
            properties:
              code:
                type: string
              message:
                type: string
            required:
            - code
            - message
            type: object
        type: object
      title: BadRequestResponse
      type: object
    TooManyRequestsResponse:
      description: Returned when the API rate limit has been exceeded (HTTP 429). Wait before retrying. Check the `Retry-After` response header for the recommended wait time.
      example:
        message: Too many requests
      properties:
        message:
          pattern: Too many requests
          type: string
      title: TooManyRequestsResponse
      type: object
    CostCenterAllocation:
      additionalProperties: false
      description: A cost center allocation for an employment, including the allocated percentage and effective period.
      example:
        cost_center:
          code: GTM-001
          name: GTM - Sales
          slug: 93t3j-cost-center-id-9suej43
        effective_from: '2026-01-01'
        effective_to: null
        id: 663e0b79-c893-45ff-a1b2-f6dcabc098b5
        percentage: 100.0
        status: active
      properties:
        cost_center:
          $ref: '#/components/schemas/CostCenter'
        effective_from:
          description: Date the allocation becomes effective.
          format: date
          nullable: true
          type: string
        effective_to:
          description: Date the allocation stops being effective.
          format: date
          nullable: true
          type: string
        id:
          description: Unique identifier of the cost center allocation.
          example: 663e0b79-c893-45ff-a1b2-f6dcabc098b5
          format: uuid
          title: UuidSlug
          type: string
        percentage:
          description: Percentage of the employment's cost allocated to this cost center (0-100).
          format: float
          type: number
        status:
          description: Allocation status, derived from the effective period.
          enum:
          - active
          - scheduled
          - expired
          type: string
      required:
      - id
      - cost_center
      - percentage
      - effective_from
      - effective_to
      - status
      title: CostCenterAllocation
      type: object
    EmploymentWithCostCenterAllocations:
      additionalProperties: false
      description: An employment under the company with its cost center allocations.
      example:
        bill_to_legal_entity_id: 93t3j-bill-to-legal-entity-id-9suej43
        cost_center_allocations:
        - cost_center:
            code: GTM-001
            name: GTM - Sales
            slug: 93t3j-cost-center-id-9suej43
          effective_from: '2026-01-01'
          effective_to: null
          id: 663e0b79-c893-45ff-a1b2-f6dcabc098b5
          percentage: 100.0
          status: active
        employment_id: 93t3j-employment-id-9suej43
        engaged_by_legal_entity_id: 93t3j-engaged-by-legal-entity-id-9suej43
      properties:
        bill_to_legal_entity_id:
          description: Unique identifier of the legal entity this employment is billed to.
          nullable: true
          type: string
        cost_center_allocations:
          description: The cost center allocations for this employment.
          items:
            $ref: '#/components/schemas/CostCenterAllocation'
          type: array
        employment_id:
          description: Unique identifier of the employment.
          type: string
        engaged_by_legal_entity_id:
          description: Unique identifier of the legal entity that employs this employment.
          nullable: true
          type: string
      required:
      - employment_id
      - cost_center_allocations
      title: EmploymentWithCostCenterAllocations
      type: object
    ListCostCenterAllocationsResponse:
      description: Response listing the cost center allocations for an employment.
      example:
        data:
          cost_center_allocations:
          - cost_center:
              code: GTM-001
              name: GTM - Sales
              slug: 93t3j-cost-center-id-9suej43
            effective_from: '2026-01-01'
            effective_to: null
            id: 663e0b79-c893-45ff-a1b2-f6dcabc098b5
            percentage: 100.0
            status: active
      properties:
        data:
          additionalProperties: false
          properties:
            cost_center_allocations:
              items:
                $ref: '#/components/schemas/CostCenterAllocation'
              type: array
          required:
          - cost_center_allocations
          type: object
      required:
      - data
      title: ListCostCenterAllocationsResponse
      type: object
    ActionError:
      properties:
        action:
          description: The action that lead to the error message.
          type: string
        code:
          description: An error code that describes the nature of the error.
          type: string
        message:
          description: A developer friendly error message that gives details on what the error was and how it may be remedied.
          type: string
      required:
      - code
      - message
      - action
      title: ActionError
      type: object
  securitySchemes:
    BasicAuth:
      description: 'Authenticate using the basic authentication for partners.


        Use the CLIENT_ID as login and CLIENT_SECRET as password.

        '
      scheme: basic
      type: http
    ClientToken:
      description: 'Authenticate a partner using only the the provided `client_token`.


        This authentication method only allows accessing marketing endpoints.

        '
      scheme: bearer
      type: http
    CustomerAPIToken:
      description: 'Authenticate using API Key generated by the customer in their Integration Settings page.

        '
      scheme: bearer
      type: http
    OAuth2:
      description: 'Authenticate using OAuth 2.0 protocol.

        '
      flows:
        authorizationCode:
          authorizationUrl: /auth/oauth2/authorize
          scopes:
            company_department:read: company_department:read
            webhook:write: webhook:write
            magic_link:write: magic_link:write
            offboarding:write: offboarding:write
            custom_field:write: custom_field:write
            address:write: address:write
            expense:read: expense:read
            employment:write: employment:write
            identity_verification:write: identity_verification:write
            timesheet:write: timesheet:write
            travel_letter:write: travel_letter:write
            incentive:read: incentive:read
            personal_detail:read: personal_detail:read
            invoices:write: invoices:write
            work_authorization:write: work_authorization:write
            timeoff:write: timeoff:write
            company_structure:read: company_structure:read
            benefit_renewal:write: benefit_renewal:write
            benefit_offer:read: benefit_offer:read
            employment_documents: employment_documents
            onboarding:write: onboarding:write
            payroll_run:read: payroll_run:read
            risk_reserve:write: risk_reserve:write
            invoices: invoices
            resignation_letter:read: resignation_letter:read
            resignation:read: resignation:read
            convert_currency:read: convert_currency:read
            employments: employments
            probation_document:read: probation_document:read
            company_admin: company_admin
            payroll: payroll
            help_center_article:read: help_center_article:read
            timesheet:read: timesheet:read
            custom_field_value:write: custom_field_value:write
            company_currencies:read: company_currencies:read
            payslip:read: payslip:read
            pay_item:write: pay_item:write
            resignation:write: resignation:write
            custom_field:read: custom_field:read
            payroll_calendar:read: payroll_calendar:read
            contract_amendment:write: contract_amendment:write
            offboarding:read: offboarding:read
            timeoff:read: timeoff:read
            probation_document:write: probation_document:write
            country:read: country:read
            webhook:read: webhook:read
            company_department:write: company_department:write
            company_manager:read: company_manager:read
            pay_item:read: pay_item:read
            contract_amendment:read: contract_amendment:read
            company:read: company:read
            sso_configuration:write: sso_configuration:write
            benefit_offer:write: benefit_offer:write
            contract_eligibility:write: contract_eligibility:write
            benefit_renewal:read: benefit_renewal:read
            background_check:read: background_check:read
            custom_field_value:read: custom_field_value:read
            expense:write: expense:write
            identity_verification:read: identity_verification:read
            address:read: address:read
            document:write: document:write
            time_and_attendance: time_and_attendance
            employment_payments: employment_payments
            form:read: form:read
            work_authorization:read: work_authorization:read
            invoices:read: invoices:read
            incentive:write: incentive:write
            employment:read: employment:read
            contract:read: contract:read
            company_manager:write: company_manager:write
            travel_letter:read: travel_letter:read
            document:read: document:read
            sso_configuration:read: sso_configuration:read
          tokenUrl: /auth/oauth2/token
        clientCredentials:
          scopes:
            company:read: company:read
            company:write: company:write
            company_admin: company_admin
            company_management: company_management
            convert_currency:read: convert_currency:read
            country:read: country:read
            employment_documents: employment_documents
            employment_payments: employment_payments
            employments: employments
            help_center_article:read: help_center_article:read
            invoices: invoices
            payroll: payroll
            payroll_calendar:read: payroll_calendar:read
            pricing_plan:read: pricing_plan:read
            pricing_plan:write: pricing_plan:write
            time_and_attendance: time_and_attendance
            webhook:read: webhook:read
            webhook:write: webhook:write
          tokenUrl: /auth/oauth2/token
      type: oauth2
    OAuth2Assertion:
      description: 'Authenticate as the employee using the `urn:ietf:params:oauth:grant-type:jwt-bearer` grant in the OAuth2 protocol.

        '
      flows:
        clientCredentials:
          scopes:
            address:read: address:read
            address:write: address:write
            bank_account:read: bank_account:read
            bank_account:write: bank_account:write
            document:read: document:read
            document:write: document:write
            emergency_contact:read: emergency_contact:read
            emergency_contact:write: emergency_contact:write
            employment_documents: employment_documents
            employment_payments: employment_payments
            employments: employments
            expense:read: expense:read
            incentive:read: incentive:read
            payroll: payroll
            payslip:read: payslip:read
            personal_detail:read: personal_detail:read
            personal_detail:write: personal_detail:write
            time_and_attendance: time_and_attendance
            timeoff:read: timeoff:read
            timeoff:write: timeoff:write
            timesheet:read: timesheet:read
          tokenUrl: /auth/oauth2/token
          x-assertionType: urn:ietf:params:oauth:client-assertion-type:jwt-bearer
      type: oauth2
    OAuth2AuthorizationCode:
      description: 'Authenticate as the token authorizer using `authorization_code` / `refresh_token` grants in the OAuth 2.0 protocol.

        '
      flows:
        authorizationCode:
          authorizationUrl: /auth/oauth2/authorize
          refreshUrl: /auth/oauth2/token
          scopes:
            company_department:read: company_department:read
            webhook:write: webhook:write
            magic_link:write: magic_link:write
            offboarding:write: offboarding:write
            custom_field:write: custom_field:write
            address:write: address:write
            expense:read: expense:read
            employment:write: employment:write
            identity_verification:write: identity_verification:write
            timesheet:write: timesheet:write
            travel_letter:write: travel_letter:write
            incentive:read: incentive:read
            personal_detail:read: personal_detail:read
            invoices:write: invoices:write
            work_authorization:write: work_authorization:write
            timeoff:write: timeoff:write
            company_structure:read: company_structure:read
            benefit_renewal:write: benefit_renewal:write
            benefit_offer:read: benefit_offer:read
            employment_documents: employment_documents
            onboarding:write: onboarding:write
            payroll_run:read: payroll_run:read
            risk_reserve:write: risk_reserve:write
            invoices: invoices
            resignation_letter:read: resignation_letter:read
            resignation:read: resignation:read
            convert_currency:read: convert_currency:read
            employments: employments
            probation_document:read: probation_document:read
            company_admin: company_admin
            payroll: payroll
            help_center_article:read: help_center_article:read
            timesheet:read: timesheet:read
            custom_field_value:write: custom_field_value:write
            company_currencies:read: company_currencies:read
            payslip:read: payslip:read
            pay_item:write: pay_item:write
            resignation:write: resignation:write
            custom_field:read: custom_field:read
            payroll_calendar:read: payroll_calendar:read
            contract_amendment:write: contract_amendment:write
            offboarding:read: offboarding:read
            timeoff:read: timeoff:read
            probation_document:write: probation_document:write
            country:read: country:read
            webhook:read: webhook:read
            company_department:write: company_department:write
            company_manager:read: company_manager:read
            pay_item:read: pay_item:read
            contract_amendment:read: contract_amendment:read
            company:read: company:read
            sso_configuration:write: sso_configuration:write
            benefit_offer:write: benefit_offer:write
            contract_eligibility:write: contract_eligibility:write
            benefit_renewal:read: benefit_renewal:read
            background_check:read: background_check:read
            custom_field_value:read: custom_field_value:read
            expense:write: expense:write
            identity_verification:read: identity_verification:read
            address:read: address:read
            document:write: document:write
            time_and_attendance: time_and_attendance
            employment_payments: employment_payments
            form:read: form:read
            work_authorization:read: work_authorization:read
            invoices:read: invoices:read
            incentive:write: incentive:write
            employment:read: employment:read
            contract:read: contract:read
            company_manager:write: company_manager:write
            travel_letter:read: travel_letter:read
            document:read: document:read
            sso_configuration:read: sso_configuration:read
          tokenUrl: /auth/oauth2/token
      type: oauth2
    OAuth2ClientCredentials:
      description: 'Authenticate using `client_credentials` grant in the OAuth 2.0 protocol.

        '
      flows:
        clientCredentials:
          scopes:
            company:read: company:read
            company:write: company:write
            company_admin: company_admin
            company_management: company_management
            convert_currency:read: convert_currency:read
            country:read: country:read
            employment_documents: employment_documents
            employment_payments: employment_payments
            employments: employments
            help_center_article:read: help_center_article:read
            invoices: invoices
            payroll: payroll
            payroll_calendar:read: payroll_calendar:read
            pricing_plan:read: pricing_plan:read
            pricing_plan:write: pricing_plan:write
            time_and_attendance: time_and_attendance
            webhook:read: webhook:read
            webhook:write: webhook:write
          tokenUrl: /auth/oauth2/token
      type: oauth2