# Cancel a Load

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /services/api/rest/CancelLoad:
    post:
      summary: Cancel a Load
      deprecated: false
      description: >-
        This function will cancel a shipment. This request has no communication
        with the carrier. This function is not to be used when the shipment has
        been dispatched. 

        This will only cancel the shipment in Banyan.
      tags:
        - Version 2/Additional Offerings/Cancelling
      parameters:
        - name: Content-Type
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                AuthenticationData:
                  $ref: '#/components/schemas/Authentication%20Data'
                LoadID:
                  type: integer
                  description: Shipment's primary identifier (Banyan supplied)
              required:
                - AuthenticationData
                - LoadID
              x-apidog-orders:
                - AuthenticationData
                - LoadID
              x-apidog-ignore-properties: []
            example:
              AuthenticationData:
                Username: ''
                Password: ''
                ClientRefNum: ''
              LoadID: ''
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  LoadID:
                    type: integer
                    description: Shipment's primary identifier (Banyan supplied)
                  Success:
                    type: boolean
                    description: Indicates whether the load operation was successful or not
                  Error:
                    description: >-
                      If an error occurred during the load operation, this field
                      provides additional information about the error.
                    anyOf:
                      - $ref: '#/components/schemas/ErrorObject'
                      - type: 'null'
                x-apidog-orders:
                  - LoadID
                  - Success
                  - Error
                x-apidog-ignore-properties: []
              example:
                LoadID: 12345678
                Success: true
                Error: null
          headers: {}
          x-apidog-name: Success - OK
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  Message:
                    type: string
                required:
                  - Message
                x-apidog-orders:
                  - Message
                x-apidog-ignore-properties: []
              examples:
                '2':
                  summary: Load does not exist
                  value:
                    Message: Requested load does not exist.
                '3':
                  summary: No Access
                  value:
                    Message: Requested client does not have access to the load.
          headers: {}
          x-apidog-name: Bad Request
      security: []
      x-apidog-folder: Version 2/Additional Offerings/Cancelling
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/668040/apis/api-10126306-run
components:
  schemas:
    Authentication Data:
      type: object
      properties:
        Username:
          type: string
          description: Banyan Username
          x-apidog-mock: username
        Password:
          type: string
          description: Banyan Password
          x-apidog-mock: password
        ClientRefNum:
          type: string
          description: Client Reference Number - Used during multiple client integrations
          nullable: true
      required:
        - Username
        - Password
      x-apidog-orders:
        - Username
        - Password
        - ClientRefNum
      description: Banyan Credentials
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ErrorObject:
      type: object
      properties:
        Message:
          type: string
      required:
        - Message
      x-apidog-orders:
        - Message
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes: {}
servers:
  - url: https://ws.integration.banyantechnology.com
    description: Integration Env
security: []

```
