Canix Standard Costs API

The Standard Costs API from Canix — 1 operation(s) for standard costs.

OpenAPI Specification

canix-standard-costs-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Canix Standard Costs API
  x-logo:
    url: https://assets.website-files.com/5ee52a0f4be6ffc2aaeb52cd/5ee52a0f4be6ff20e7eb534f_canix-logo.svg
    backgroundColor: '#FFFFFF'
    altText: Canix logo
  description: '# Introduction

    This API documentation describes the endpoints used by third-party developers to get Canix data for their account.

    # Authentication

    Canix API uses API Keys for authentication. You can generate an API key on our [API page](https://app.canix.com/company/api), and on your API requests use the `X-API-KEY` header with the API key value you generated.

    We strongly recommend using a secrets manager. Plain text files like dotenv lead to accidental costly leaks. Use [Doppler](https://doppler.com/) or similar options for a developer friendly experience. AWS and Google Cloud have native solutions as well.'
  contact:
    name: Canix Support
    url: https://help.canix.com/
    email: help@canix.com
  version: 1.3.10
servers:
- url: https://api.canix.com/api/v1
  variables: {}
security:
- ApiKeyAuth: []
tags:
- name: Standard Costs
paths:
  /standard_costs/{standard_cost_id}:
    get:
      tags:
      - Standard Costs
      summary: GetStandardCost
      description: Get details of a specific Standard Cost
      operationId: GetStandardCost
      parameters:
      - name: standard_cost_id
        in: path
        description: ID of Standard Cost to retrieve
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemStandardCost'
        '401':
          $ref: '#/components/responses/401NotAuthenticated'
        '403':
          $ref: '#/components/responses/403AccessDenied'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500ServerError'
    put:
      tags:
      - Standard Costs
      summary: UpdateStandardCost
      description: __CALLING THIS ENDPOINT WILL MODIFY YOUR DATA IRREVERSIBLY. ONLY CALL THIS ON SANDBOX DATA DURING DEVELOPMENT/CODING/TESTING.__
      operationId: UpdateStandardCost
      parameters:
      - name: standard_cost_id
        in: path
        description: ID of Standard Cost to update
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        description: Update an existing Standard Cost
        content:
          application/json:
            schema:
              type: object
              required:
              - cost
              - start_date
              properties:
                cost:
                  type: number
                  format: float
                  example: 10.5
                  description: The standard cost amount
                start_date:
                  type: string
                  format: date
                  example: '2024-02-03'
                  description: Start date for the standard cost
                end_date:
                  type: string
                  format: date
                  example: '2024-03-03'
                  description: Optional end date for the standard cost
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemStandardCost'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401NotAuthenticated'
        '403':
          $ref: '#/components/responses/403AccessDenied'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500ServerError'
    delete:
      tags:
      - Standard Costs
      summary: DeleteStandardCost
      description: '__CALLING THIS ENDPOINT WILL MODIFY YOUR DATA IRREVERSIBLY. ONLY CALL THIS ON SANDBOX DATA DURING DEVELOPMENT/CODING/TESTING.__


        Delete a specific Standard Cost

        '
      operationId: DeleteStandardCost
      parameters:
      - name: standard_cost_id
        in: path
        description: ID of Standard Cost to delete
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Standard Cost successfully deleted
        '401':
          $ref: '#/components/responses/401NotAuthenticated'
        '403':
          $ref: '#/components/responses/403AccessDenied'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500ServerError'
components:
  responses:
    400BadRequest:
      description: Bad request
    401NotAuthenticated:
      description: Not authenticated
    403AccessDenied:
      description: Access denied
    404NotFound:
      description: The specified resource was not found
    500ServerError:
      description: Server error
  schemas:
    ItemStandardCost:
      title: ItemStandardCost
      required:
      - id
      - standard_cost_amount
      - standard_cost_currency
      - start_date
      properties:
        id:
          type: integer
          example: 123
        standard_cost_amount:
          type: number
          example: 12.1111
        standard_cost_currency:
          type: string
          example: USD
        start_date:
          type: string
          example: '2023-04-19'
        end_date:
          type: string
          example: '2023-05-19'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY