{
  "openapi": "3.0.0",
  "servers": [
    {
      "description": "SwaggerHub API Auto Mocking",
      "url": "https://virtserver.swaggerhub.com/truckertools/cancelLoadTrack/1.0.0"
    },
    {
      "description": "Production Server",
      "url": "https://loadtracking.truckertools.com/loadtrackservice/cancelLoadTrack"
    }
  ],
  "info": {
    "description": "The Partner system can send a cancel request to the Load Track system. On receiving the request the Load Track system will cancel the Load Track if the last stop time has not passed yet.",
    "termsOfService": "https://www.truckertools.com/terms",
    "version": "1.0.0",
    "title": "Cancel Load Track",
    "contact": {
      "email": "integrations@truckertools.com"
    },
    "license": {
      "name": "Private",
      "url": "https://api.truckertools.com"
    }
  },
  "security": [],
  "paths": {
    "/loadtrackservice/cancelLoadTrack": {
      "post": {
        "summary": "Cancel a load track",
        "operationId": "cancelLoadTrack",
        "responses": {
          "200": {
            "$ref": "#/components/responses/cancelResponseSuccess"
          },
          "400": {
            "$ref": "#/components/responses/cancelResponseFail"
          }
        },
        "requestBody": {
          "$ref": "#/components/requestBodies/cancelLoadTrack"
        }
      }
    }
  },
  "components": {
    "schemas": {
      "cancelLoadTrack": {
        "type": "object",
        "required": [
          "partnerId",
          "loadTrackExternalId",
          "accountId"
        ],
        "properties": {
          "partnerId": {
            "type": "integer",
            "description": "This is a unique integer id that is assigned to the Partner system to identify the Partner system by the Load Track system. This has to be sent on each webservice call.",
            "format": "int64",
            "example": 101
          },
          "loadTrackExternalId": {
            "type": "string",
            "description": "The unique identifier of the Load in the Partner system. This is the same value that was sent as the loadTrackExternalId in the Create Load Track API call.",
            "example": "13384-1939-1919"
          },
          "accountId": {
            "type": "string",
            "description": "Unique identifier of the Agent in the Broker System that entered the Load Track. This accountId has to be encrypted with the shared secret of the partner. This shared secret will be shared during the integration process.",
            "minLength": 8,
            "example": "FJIS3939a9GNEAHNjazzIMFBA=="
          }
        }
      },
      "cancelResponseBody": {
        "type": "object",
        "required": [
          "status",
          "message"
        ],
        "properties": {
          "response": {
            "type": "object",
            "properties": {
              "status": {
                "type": "boolean",
                "description": "Success indicator.\n"
              },
              "message": {
                "type": "string",
                "description": "Status description",
                "example": "Load Track has been cancelled successfully"
              }
            }
          }
        }
      },
      "cancelResponseBodyFail": {
        "type": "object",
        "required": [
          "status",
          "message"
        ],
        "properties": {
          "response": {
            "type": "object",
            "properties": {
              "status": {
                "type": "boolean",
                "description": "Success indicator.\n",
                "example": false
              },
              "message": {
                "type": "string",
                "description": "Status description",
                "example": "No load track found."
              },
              "errorCode": {
                "type": "integer",
                "description": "Error code. Note these error codes are not the most useful. Use the status and message to identify problems.",
                "example": 200
              }
            }
          }
        }
      }
    },
    "responses": {
      "cancelResponseSuccess": {
        "description": "Cancel Response Body Success",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/cancelResponseBody"
            }
          }
        }
      },
      "cancelResponseFail": {
        "description": "Cancel Response Body Fail",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/cancelResponseBodyFail"
            }
          }
        }
      }
    },
    "requestBodies": {
      "cancelLoadTrack": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/cancelLoadTrack"
            }
          }
        },
        "required": true
      }
    }
  }
}