{
  "openapi": "3.0.1",
  "info": {
    "title": "BetterTrucks.Webhook.Gateway",
    "version": "1.0"
  },
  "paths": {
    "/webhook/on-fleet": {
      "get": {
        "tags": [
          "Webhook"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Webhook"
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/webhook/wayzim/events": {
      "post": {
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "name": "X-API-KEY",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScanEventDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ScanEventDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ScanEventDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/webhook/wayzim/containers": {
      "post": {
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "name": "X-API-KEY",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContainerDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ContainerDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ContainerDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/webhook/doordash": {
      "post": {
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": { }
            },
            "text/json": {
              "schema": { }
            },
            "application/*+json": {
              "schema": { }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/webhook/frayt": {
      "post": {
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "name": "X-API-KEY",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/webhook/vecino": {
      "post": {
        "tags": [
          "Webhook"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeliveryNotification"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DeliveryNotification"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DeliveryNotification"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/webhook/unis": {
      "post": {
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "name": "X-API-KEY",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StdEdiStatus"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/StdEdiStatus"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/StdEdiStatus"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/webhook/unis-pod": {
      "post": {
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "name": "X-API-KEY",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PodPayload"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PodPayload"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PodPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/webhook/aptus": {
      "post": {
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "name": "X-API-KEY",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/webhook/ameriship": {
      "post": {
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/webhook/promed": {
      "post": {
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "name": "X-API-KEY",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/webhook/optima": {
      "post": {
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "name": "X-API-KEY",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/webhook/uf-asn": {
      "post": {
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "name": "X-API-KEY",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/webhook/onward": {
      "post": {
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "name": "x-onward-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/webhook/orchestro/{key}": {
      "post": {
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/webhook/cainiao": {
      "post": {
        "tags": [
          "Webhook"
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/webhook/uds": {
      "post": {
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "name": "X-Signature-SHA256",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/webhook/deliverit": {
      "post": {
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "name": "X-API-KEY",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/webhook/shipx": {
      "post": {
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "name": "X-API-KEY",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ContainerDto": {
        "type": "object",
        "properties": {
          "parcelNumbers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "containerId": {
            "type": "string",
            "nullable": true
          },
          "sortCode": {
            "type": "string",
            "nullable": true
          },
          "sortDate": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "DeliveryNotification": {
        "type": "object",
        "properties": {
          "webhook_key": {
            "type": "string",
            "nullable": true
          },
          "customer_package_id": {
            "type": "string",
            "nullable": true
          },
          "customer_name": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "latitude": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "longitude": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "api_mode": {
            "type": "string",
            "nullable": true
          },
          "proof_of_delivery_url": {
            "type": "string",
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "nano_warehouse": {
            "$ref": "#/components/schemas/NanoWarehouse"
          }
        },
        "additionalProperties": false
      },
      "NanoWarehouse": {
        "type": "object",
        "properties": {
          "location_code": {
            "type": "string",
            "nullable": true
          },
          "location_name": {
            "type": "string",
            "nullable": true
          },
          "full_address": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PodPayload": {
        "type": "object",
        "properties": {
          "airbillno": {
            "type": "string",
            "nullable": true
          },
          "signatureurl": {
            "type": "string",
            "nullable": true
          },
          "podurls": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "delivdate": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "ScanEventDto": {
        "type": "object",
        "properties": {
          "barcode": {
            "type": "string",
            "nullable": true
          },
          "sortTime": {
            "type": "integer",
            "format": "int64"
          },
          "weight": {
            "type": "number",
            "format": "float"
          },
          "length": {
            "type": "integer",
            "format": "int32"
          },
          "width": {
            "type": "integer",
            "format": "int32"
          },
          "height": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "StdEdiStatus": {
        "type": "object",
        "properties": {
          "airbillno": {
            "type": "string",
            "nullable": true
          },
          "barcode": {
            "type": "string",
            "nullable": true
          },
          "fromAttnName": {
            "type": "string",
            "nullable": true
          },
          "fromCoName": {
            "type": "string",
            "nullable": true
          },
          "fromAddress1": {
            "type": "string",
            "nullable": true
          },
          "fromAddress2": {
            "type": "string",
            "nullable": true
          },
          "fromCity": {
            "type": "string",
            "nullable": true
          },
          "fromState": {
            "type": "string",
            "nullable": true
          },
          "fromZip": {
            "type": "string",
            "nullable": true
          },
          "toAttnName": {
            "type": "string",
            "nullable": true
          },
          "toCoName": {
            "type": "string",
            "nullable": true
          },
          "toAddress1": {
            "type": "string",
            "nullable": true
          },
          "toAddress2": {
            "type": "string",
            "nullable": true
          },
          "toCity": {
            "type": "string",
            "nullable": true
          },
          "toState": {
            "type": "string",
            "nullable": true
          },
          "toZip": {
            "type": "string",
            "nullable": true
          },
          "delivStatus": {
            "type": "string",
            "nullable": true
          },
          "locationCity": {
            "type": "string",
            "nullable": true
          },
          "locationState": {
            "type": "string",
            "nullable": true
          },
          "billingref": {
            "type": "string",
            "nullable": true
          },
          "billingref2": {
            "type": "string",
            "nullable": true
          },
          "billingref3": {
            "type": "string",
            "nullable": true
          },
          "billingref4": {
            "type": "string",
            "nullable": true
          },
          "alternateStatusCode": {
            "type": "string",
            "nullable": true
          },
          "alternateStatusCode2": {
            "type": "string",
            "nullable": true
          },
          "eventTimeStamp": {
            "type": "string",
            "format": "date-time"
          },
          "pkgWeight": {
            "type": "string",
            "nullable": true
          },
          "vendorId": {
            "type": "string",
            "nullable": true
          },
          "custId": {
            "type": "string",
            "nullable": true
          },
          "manifestId": {
            "type": "string",
            "nullable": true
          },
          "fromCountry": {
            "type": "string",
            "nullable": true
          },
          "toCountry": {
            "type": "string",
            "nullable": true
          },
          "locationZip": {
            "type": "string",
            "nullable": true
          },
          "delivSignatureName": {
            "type": "string",
            "nullable": true
          },
          "expectedDelivDate": {
            "type": "string",
            "nullable": true
          },
          "terminalId": {
            "type": "string",
            "nullable": true
          },
          "latitude": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "longitude": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "signatureurl": {
            "type": "string",
            "nullable": true
          },
          "podurls": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "delivdate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "isPodPayload": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      }
    }
  }
}