> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crosoftware.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Connection

> Create a new hauler connection.



## OpenAPI

````yaml /spec/oas.yaml post /haulers/{hauler_uuid}/connections
openapi: 3.0.3
info:
  title: CRO Software API
  version: 2.x
  description: >-
    REST API for the CRO Software waste management and logistics platform.
    Authenticate via OAuth2 (client_credentials or authorization_code). All
    requests require a Bearer token and an X-Tenant-Id header.
servers:
  - url: https://api.crosoftware.com/v0
    description: Production
security: []
paths:
  /haulers/{hauler_uuid}/connections:
    post:
      tags:
        - Haulers
      summary: Create Connection
      description: Create a new hauler connection.
      operationId: haulers_create_connection
      parameters:
        - name: hauler_uuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: Third party hauler identifier.
        - name: x-api-version
          in: header
          required: false
          schema:
            type: string
            description: Version identifier (date format).
        - name: x-tenant-id
          in: header
          required: false
          schema:
            type: integer
            format: int64
            description: >-
              Tenant identifier. Contact [CRO
              Software](https://crosoftwaresolutions.com/) for more info if you
              don't already have this id. See [list tenant
              ids](/docs/requests/tenants_list_tenants) for info on listing the
              tenants you have access to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateHaulerConnectionRequestModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThirdPartyHaulerConnectionModel'
      security:
        - oauth2:
            - api
components:
  schemas:
    CreateHaulerConnectionRequestModel:
      type: object
      description: Create third party hauler connection request model.
      properties:
        tenant_code:
          type: string
          description: Confirmation code for hauler creation.
      required:
        - tenant_code
    ThirdPartyHaulerConnectionModel:
      type: object
      description: Third party hauler connection profile.
      properties:
        approved_by:
          type: integer
          format: int64
          description: Approved by.
        approved_on:
          type: string
          format: date-time
          description: Approval date.
        denied_on:
          type: string
          format: date-time
          description: Denial date.
        is_approved:
          type: boolean
          description: Approved record state.
        location_id:
          type: integer
          format: int64
          description: Location identifier.
        provider_id:
          type: integer
          format: int64
          description: Bin provider identifier.
        provider_name:
          type: string
          description: Name (free text).
        requested_on:
          type: string
          format: date-time
          description: Requested date.
        third_party_hauler_id:
          type: string
          format: uuid
          description: Third party hauler identifier.
      required:
        - approved_by
        - approved_on
        - denied_on
        - is_approved
        - location_id
        - provider_id
        - provider_name
        - requested_on
        - third_party_hauler_id
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: REPLACE_WITH_AUTH_BASE_URL/oauth2/token
          scopes:
            api: General API access
            webhook: Webhook management
        authorizationCode:
          authorizationUrl: REPLACE_WITH_AUTH_BASE_URL/oauth2/auth
          tokenUrl: REPLACE_WITH_AUTH_BASE_URL/oauth2/token
          scopes:
            api: General API access
            webhook: Webhook management

````