Canix Transfer Destinations API

The Transfer Destinations API from Canix — 2 operation(s) for transfer destinations.

OpenAPI Specification

canix-transfer-destinations-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Canix Transfer Destinations 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: Transfer Destinations
paths:
  /transfer_destinations:
    get:
      tags:
      - Transfer Destinations
      summary: GetTransferDestinations
      description: Return Transfer Destinations
      operationId: GetTransferDestinations
      parameters:
      - $ref: '#/components/parameters/limitParam'
      - $ref: '#/components/parameters/offsetParam'
      - $ref: '#/components/parameters/orderByParam'
      - $ref: '#/components/parameters/whereParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TransferDestination'
        '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'
  /transfer_destinations/{transfer_destination_id}:
    get:
      tags:
      - Transfer Destinations
      summary: GetTransferDestination
      description: Get Transfer Destination by ID
      operationId: GetTransferDestinationById
      parameters:
      - name: transfer_destination_id
        in: path
        description: Transfer Destination ID
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransferDestination'
        '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'
components:
  parameters:
    offsetParam:
      name: offset
      in: query
      description: Offset for the returned records (optional)
      schema:
        type: integer
        default: 0
        example: 20
    whereParam:
      name: where
      in: query
      description: 'Filter results using SQL-like WHERE clause syntax (optional).


        **Supported operators**: =, >, <, >=, <=, BETWEEN, IN, LIKE, AND, OR


        **Supported patterns**:

        - Equality: `status=''Active''`

        - Comparison: `updated_at >= ''2024-01-01''`

        - Range: `id BETWEEN 1 AND 10000`

        - List: `status IN (''Active'', ''Pending'')`

        - Pattern: `sku LIKE ''ABC%''`

        - Compound: `facility_id=123 AND is_active=true`

        '
      schema:
        type: string
        example: status='Active' AND updated_at >= '2024-01-01'
    orderByParam:
      name: order_by
      in: query
      description: Order-by clause, in SQL format (optional)
      schema:
        type: string
        example: id desc
    limitParam:
      name: limit
      in: query
      description: Max number of records to return (optional). Cannot exceed 2000
      required: false
      style: form
      schema:
        type: integer
        default: 2000
        example: 100
  responses:
    403AccessDenied:
      description: Access denied
    404NotFound:
      description: The specified resource was not found
    400BadRequest:
      description: Bad request
    401NotAuthenticated:
      description: Not authenticated
    500ServerError:
      description: Server error
  schemas:
    LabTestInfo:
      type: object
      properties:
        testing_facility_name:
          type: string
          description: Name of the facility where the testing was conducted.F
        testing_facility_license:
          type: string
          description: License number of the testing facility.
      required:
      - testing_facility_name
      - testing_facility_license
    Location:
      title: Location
      required:
      - id
      - name
      properties:
        id:
          type: integer
          example: 123
        name:
          type: string
          example: Pro System
        sqft:
          type: number
          example: 14.4
        num_lights:
          type: integer
          example: 42
        parent_location:
          $ref: '#/components/schemas/ParentLocation'
        updated_at:
          type: string
          example: 2018-11-06 08:00:00+00:00
        is_active:
          type: boolean
          example: true
    DestinationPackage:
      title: Destination Package
      required:
      - id
      type: object
      properties:
        id:
          type: integer
        tag:
          type: string
        weight:
          type: number
        weight_unit:
          type: string
        item:
          $ref: '#/components/schemas/IdName'
    SourcePackage:
      title: Source Package
      required:
      - id
      type: object
      properties:
        id:
          type: integer
        tag:
          type: string
        weight:
          type: number
        weight_unit:
          type: string
        item:
          $ref: '#/components/schemas/IdName'
    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'
    ItemType:
      title: ItemType
      required:
      - id
      - name
      - facility_id
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        quantity_type:
          type: string
        requires_strain:
          type: boolean
        requires_unit_volume:
          type: boolean
        requires_unit_weight:
          type: boolean
        requires_unit_thc_weight:
          type: boolean
        requires_unit_cbd_weight:
          type: boolean
        requires_unit_cbd_percent:
          type: boolean
        requires_unit_thc_percent:
          type: boolean
        requires_public_ingredients:
          type: boolean
        requires_administration_method:
          type: boolean
        requires_serving_size:
          type: boolean
        requires_supply_duration_days:
          type: boolean
        requires_number_of_doses:
          type: boolean
        updated_at:
          type: string
          example: 2018-11-06 08:00:00+00:00
    TestResultValue:
      title: TestResultValue
      type: object
      properties:
        value:
          type: number
          format: double
          example: 0.17501406232422
        measure:
          type: string
          enum:
          - mg
          - mg/g
          - mg/serving
          - percent
          example: mg/g
    IdName:
      title: IdName
      type: object
      properties:
        id:
          type: number
        name:
          type: string
    CrossStrain:
      title: Cross Strain
      required:
      - id
      - name
      properties:
        id:
          type: integer
        name:
          type: string
          example: Lemon Skunk
          description: Strain name
        notes:
          type: string
          example: Terpenes .63%
          description: Notes
        sku:
          type: string
          example: BIOJJ
          description: SKU
        testing_status:
          type: string
          example: InHouse
          description: 'Testing status: InHouse, ThirdParty, None, NA'
        indica_percent:
          type: number
          example: 45.0
          description: Indica Percentage
        sativa_percent:
          type: number
          example: 55.0
          description: Sativa Percentage
    Item:
      title: Item
      required:
      - id
      - name
      - facility_id
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        is_active:
          type: boolean
        item_type:
          type: string
        brand:
          $ref: '#/components/schemas/IdName'
        product_id:
          type: integer
          description: ID of the active Product this item belongs to, if any
        product_brand:
          $ref: '#/components/schemas/IdName'
        quantity_type:
          type: string
        sku:
          type: string
        current_standard_cost:
          $ref: '#/components/schemas/ItemStandardCost'
        accounting_inventory_type:
          type: string
        notes:
          type: string
        facility_id:
          type: integer
        strain:
          $ref: '#/components/schemas/Strain'
        type:
          $ref: '#/components/schemas/ItemType'
        sub_type:
          $ref: '#/components/schemas/ItemSubType'
        weight_unit:
          type: string
        unit_weight:
          type: number
        unit_weight_unit:
          type: string
        case_quantity:
          type: string
        case_quantity_unit:
          type: string
        unit_cbd_weight:
          type: number
        unit_cbd_weight_unit:
          type: string
        unit_thc_weight:
          type: number
        unit_thc_weight_unit:
          type: string
        unit_cbd_percent:
          type: number
        unit_thc_percent:
          type: number
        description:
          type: string
        serving_size:
          type: number
        number_of_doses:
          type: number
        public_ingredients:
          type: string
        supply_duration_days:
          type: number
        administration_method:
          type: string
        allergens:
          type: string
        transfer_source_license:
          type: string
          description: Facility license number of the originating facility. Non-editable.
        bills_of_materials:
          type: array
          items:
            type: object
            properties:
              url:
                type: string
              name:
                type: string
              package_weight:
                type: number
              unit:
                type: string
        sage_item:
          type: object
          properties:
            external_id:
              type: string
            name:
              type: string
        leaflink_item:
          type: object
          properties:
            external_id:
              type: string
            name:
              type: string
        dutchie_product:
          type: object
          properties:
            external_id:
              type: string
            name:
              type: string
        phenotype:
          type: string
        total_for_sale:
          type: number
          description: Total quantity marked as available to sell
        ordered:
          type: number
          description: Total quantity ordered from in-progress sales orders
        backordered:
          type: number
          description: Total quantity backordered from in-progress sales orders
        unordered:
          type: number
          description: Quantity available to sell minus ordered quantity (minimum 0)
        updated_at:
          type: string
          example: 2018-11-06 08:00:00+00:00
      example:
        id: 7036
        name: Blue Dream - Trim
        sku: '22657'
        current_standard_costing:
          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'
        is_active: true
        facility_id: 14
        type:
          id: 884
          name: Clone - Cutting
          quantity_type: CountBased
          product_category: Plants
        sub_type: null
        brand: null
        product_id: 512
        product_brand: null
        quantity_type: CountBased
        notes: ''
        accounting_inventory_type: raw_materials
        strain: null
        weight_unit: Each
        unit_weight: 10
        unit_weight_unit: Grams
        case_quantity: 100
        case_unit: Each
        description: Clone
        allergens: Can s 2
        transfer_source_license: '1234567890'
        bills_of_materials:
        - url: https://www.app.canix.com/inventory/non-cannabis/bill-of-materials/123
          name: Bill of Materials
          package_weight: 10
          unit: g
        sage_item:
          external_id: '1234567890'
          name: Sage Item
        leaflink_item: null
        dutchie_product: null
        phenotype: Indica
        total_for_sale: 100
        ordered: 25
        backordered: 10
        unordered: 75
        updated_at: '2021-03-16T23:49:03.175Z'
    Brand:
      title: Brand
      required:
      - id
      - name
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        updated_at:
          type: string
          example: 2018-11-06 08:00:00+00:00
    Strain:
      title: Strain
      required:
      - id
      - name
      properties:
        id:
          type: integer
        name:
          type: string
          example: Lemon Skunk
          description: Strain name
        notes:
          type: string
          example: Terpenes .63%
          description: Notes
        sku:
          type: string
          example: BIOJJ
          description: SKU
        testing_status:
          type: string
          example: InHouse
          description: 'Testing status: InHouse, ThirdParty, None, NA'
        indica_percent:
          type: number
          example: 45.0
          description: Indica Percentage
        sativa_percent:
          type: number
          example: 55.0
          description: Sativa Percentage
        cross_strains:
          type: array
          description: Cross strains
          items:
            $ref: '#/components/schemas/CrossStrain'
    ItemSubType:
      title: ItemSubType
      required:
      - id
      - name
      - weight_unit
      - item_category
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        weight_unit:
          type: string
        category:
          $ref: '#/components/schemas/ItemType'
        updated_at:
          type: string
          example: 2018-11-06 08:00:00+00:00
    ParentLocation:
      title: Parent Location
      required:
      - id
      - name
      properties:
        id:
          type: integer
          example: 123
        name:
          type: string
          example: Pro System
        sqft:
          type: number
          example: 14.4
        num_lights:
          type: integer
          example: 42
        updated_at:
          type: string
          example: 2018-11-06 08:00:00+00:00
        is_active:
          type: boolean
          example: true
    Package:
      title: Package
      required:
      - id
      type: object
      properties:
        id:
          type: integer
        tag:
          type: string
        is_active:
          type: boolean
        is_testing_package:
          type: boolean
          description: Whether the package is flagged as a testing (lab sample) package.
        status:
          type: string
        item:
          $ref: '#/components/schemas/Item'
        weight:
          type: number
        original_weight:
          type: number
        weight_unit:
          type: string
        packaged_date:
          type: string
        production_batch_date:
          type:
          - string
          - 'null'
          format: date
          description: The production batch date for the package.
        expiration_date:
          type: string
        received_date:
          type: string
        location:
          $ref: '#/components/schemas/Location'
        production_batch:
          type: string
        lot_id:
          type: string
        cultivation_tax:
          type: number
        available_for_sale:
          type: boolean
        cannabis_cogs:
          type: number
        non_cannabis_inventory_cogs:
          type: number
        source_packages:
          type: array
          items:
            $ref: '#/components/schemas/SourcePackage'
        destination_packages:
          type: array
          items:
            $ref: '#/components/schemas/DestinationPackage'
        source_facility:
          type: string
          description: Originating facility license number
        source_facility_name:
          type: string
          description: Originating facility name
        source_harvests:
          type: string
        notes:
          type: string
        brand:
          $ref: '#/components/schemas/Brand'
        lab_test_url:
          type: string
          description: URL to the latest lab test if it exists
          example: https://www.lab.com/lab-test/123456
        coa_url:
          type:
          - string
          - 'null'
          description: URL to the Certificate of Analysis (COA) document. Returns either a direct URL or a presigned S3 URL (valid for 24 hours) if available.
          example: https://s3.amazonaws.com/bucket/coa/abc123.pdf?X-Amz-Signature=...
        test_results:
          $ref: '#/components/schemas/TestResults'
        cogs:
          type: object
          example:
            labor: 10.0
            non_cannabis: 120.0
            cannabis: 30.0
            total: 160.0
        original_cogs:
          type: object
          description: COGS values at the time the package was created (before any later adjustments).
          example:
            labor: 10.0
            non_cannabis: 120.0
            cannabis: 30.0
            total: 160.0
        manufacturing_run:
          type:
          - object
          - 'null'
          description: Only returned by the show endpoint (GET /packages/{id}). Populated when the package is an output of a manufacturing run; null otherwise.
          properties:
            id:
              type: integer
            name:
              type: string
            status:
              type: string
            start_date:
              type:
              - string
              - 'null'
              format: date
            end_date:
              type:
              - string
              - 'null'
              format: date
            facility_id:
              type: integer
        updated_at:
          type: string
          example: 2018-11-06 08:00:00+00:00
        tested_package_tag:
          type: string
          description: Tag identifying the package that has been tested
        test_status:
          type: string
          description: Status of the test (e.g., passed, failed, pending)
        test_date:
          type: string
          format: date
          description: Date when the test was conducted
        lab_test_info:
          $ref: '#/components/schemas/LabTestInfo'
    TestResults:
      title: TestResults
      type: object
      properties:
        thc:
          type: array
          items:
            $ref: '#/components/schemas/TestResultValue'
          example:
          - value: 12.345
            measure: percent
          - value: 0.12345
            measure: mg/g
          - value: 5.6789
            measure: mg
        cbd:
          type: array
          items:
            $ref: '#/components/schemas/TestResultValue'
          example:
          - value: 34.567
            measure: percent
          - value: 2.3456
            measure: mg/g
          - value: 9.1234
            measure: mg
        cbn:
          type: array
          items:
            $ref: '#/components/schemas/TestResultValue'
        cbg:
          type: array
          items:
            $ref: '#/components/schemas/TestResultValue'
        cbga:
          type: array
          items:
            $ref: '#/components/schemas/TestResultValue'
        cbc:
          type: array
          items:
            $ref: '#/components/schemas/TestResultValue'
        cbca:
          type: array
          items:
            $ref: '#/components/schemas/TestResultValue'
        cbda:
          type: array
          items:
            $ref: '#/components/schemas/TestResultValue'
        thca:
          type: array
          items:
            $ref: '#/components/schemas/TestResultValue'
        delta_8_thc:
          type: array
          items:
            $ref: '#/components/schemas/TestResultValue'
        delta_9_thc:
          type: array
          items:
            $ref: '#/components/schemas/TestResultValue'
        delta_9_thca:
          type: array
          items:
            $ref: '#/components/schemas/TestResultValue'
        delta_8_thca:
          type: array
          items:
            $ref: '#/components/schemas/TestResultValue'
        thcv:
          type: array
          items:
            $ref: '#/components/schemas/TestResultValue'
        thcva:
          type: array
          items:
            $ref: '#/components/schemas/TestResultValue'
        total_cbd:
          type: array
          items:
            $ref: '#/components/schemas/TestResultValue'
        total_cbg:
          type: array
          items:
            $ref: '#/components/schemas/TestResultValue'
        total_delta_9_thc:
          type: array
          items:
            $ref: '#/components/schemas/TestResultValue'
        total_thc:
          type: array
          items:
            $ref: '#/components/schemas/TestResultValue'
        total_cannabinoid:
          type: array
          items:
            $ref: '#/components/schemas/TestResultValue'
        test_status:
          type: string
          description: Status of the test (e.g., passed, failed, pending)
        tested_package_tag:
          type: string
          description: Tag identifying the package that has been tested
        test_date:
          type: string
          format: date
          description: Date when the test was conducted
        terpenes:
          type: object
          properties:
            measure:
              type: string
              example: percent
            top_three:
              type: string
              example:
                beta_myrcene: '0.05104502943'
                delta_limonene: '0.04842733428'
                linalool: '0.01920111092'
            values:
              type: string
              example:
                nerol: '0.0'
                cedrol: '0.0'
                guaiol: '0.0'
                borneol: '0.00097078668'
                camphor: '0.0'
                menthol: '0.0060455321'
                3_carene: '0.0'
                camphene: '0.0014924041'
                geraniol: '0.00146493673'
                linalool: '0.01920111092'
                pulegone: '0.0'
                sabinene: '0.0'
                farnesene: '0.0'
                valencene: '0.0'
                eucalyptol: '0.0'
                isoborneol: '0.0'
                isopulegol: '0.0'
                l_fenchone: '0.00107440035'
                beta_pinene: '0.00758444019'
                cis_ocimene: '0.0'
                terpinolene: '0.0008523121'
                alpha_pinene: '0.00507601301'
                beta_myrcene: '0.05104502943'
                alpha_cedrene: '0.0'
                cis_nerolidol: '0.0'
                trans_ocimene: '0.0'
                alpha_humulene: '0.00563652811'
                delta_limonene: '0.04842733428'
                alpha_bisabolol: '0.00210912557'
                alpha_terpineol: '0.0'
                gamma_terpinene: '0.0'
                gamma_terpineol: '0.0'
                geranyl_acetate: '0.0'
                trans_nerolidol: '0.0'
                sabinene_hydrate: '0.0'
                alpha_phellandrene: '0.0'
                beta_caryophyllene: '0.01474344681'
                caryophyllene_oxide: '0.00080207704'
                endo_fenchyl_alcohol: '0.00415234658'
    PackageTransfer:
      title: Package Transfer
      required:
      - id
      - facility_id
      properties:
        package:
          $ref: '#/components/schemas/Package'
        status:
          type: string
        sale_price:
          type: number
          example: 12.34
        shipped_weight:
          type: number
          example: 10.0
        shipped_weight_unit:
          type: string
          example: Grams
        received_weight:
          type: number
          example: 10.0
        received_weight_unit:
          type: string
          example: Grams
        updated_at:
          type: string
          example: 2018-11-06 08:00:00+00:00
    TransferDestination:
      title: Transfer Destination
      required:
      - id
      properties:
        id:
          type: integer
          example: 123
        destination_facility:
          type: string
          example: 401-N0909
        transfer_type:
          type: string
          example: Affilliated
        route:
          type: string
          example: 55
        departure_time:
          type: string
          example: 2018-11-06 08:00:00+00:00
        contents:
          type: array
          items:
            $ref: '#/components/schemas/PackageTransfer'
        updated_at:
          type: string
          example: 2018-11-06 08:00:00+00:00
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY