{
  "openapi": "3.0.1",
  "info": {
    "title": "Asen API",
    "version": "1.0"
  },
  "paths": {
    "/api/v1/AddShipment": {
      "post": {
        "tags": [
          "AddShipment"
        ],
        "parameters": [
          {
            "name": "apiKey",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddShipmentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AddShipmentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AddShipmentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AddShipmentResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddShipmentResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddShipmentResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/AddShipment/01": {
      "post": {
        "tags": [
          "AddShipment"
        ],
        "parameters": [
          {
            "name": "apiKey",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddShipmentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AddShipmentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AddShipmentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AddShipmentResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddShipmentResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddShipmentResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/Orders/01": {
      "post": {
        "tags": [
          "Orders"
        ],
        "parameters": [
          {
            "name": "apiKey",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrdersRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/OrdersRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/OrdersRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Test/v1/TestAddShipment": {
      "post": {
        "tags": [
          "TestAddShipment"
        ],
        "parameters": [
          {
            "name": "apiKey",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddShipmentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AddShipmentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AddShipmentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AddShipmentResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddShipmentResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddShipmentResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/Test/v1/TestOrders": {
      "post": {
        "tags": [
          "TestOrders"
        ],
        "parameters": [
          {
            "name": "apiKey",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrdersRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/OrdersRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/OrdersRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OrdersResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrdersResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrdersResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AddShipmentRequest": {
        "required": [
          "City",
          "Country",
          "Currency",
          "ExternalNumber",
          "PackageCount",
          "Phone",
          "Street",
          "Value",
          "ZipCode"
        ],
        "type": "object",
        "properties": {
          "ExternalNumber": {
            "minLength": 1,
            "type": "string"
          },
          "Name": {
            "type": "string",
            "description": "First and Last Name",
            "nullable": true
          },
          "CompanyName": {
            "type": "string",
            "nullable": true
          },
          "Street": {
            "minLength": 1,
            "type": "string"
          },
          "City": {
            "minLength": 1,
            "type": "string"
          },
          "ZipCode": {
            "minLength": 1,
            "type": "string"
          },
          "Country": {
            "minLength": 1,
            "type": "string"
          },
          "Phone": {
            "minLength": 1,
            "type": "string"
          },
          "Email": {
            "type": "string",
            "nullable": true
          },
          "PackageCount": {
            "type": "integer",
            "format": "int32"
          },
          "VariableSymbol": {
            "type": "string",
            "nullable": true
          },
          "COD": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "Value": {
            "type": "number",
            "format": "double"
          },
          "Currency": {
            "minLength": 1,
            "type": "string"
          },
          "Weight": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "Cubage": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "DueDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "IsCOD": {
            "type": "boolean",
            "nullable": true
          },
          "IsDisposal": {
            "type": "boolean",
            "nullable": true
          },
          "IsFloorDelivery": {
            "type": "boolean",
            "nullable": true
          },
          "IsPremium": {
            "type": "boolean",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "Note": {
            "type": "string",
            "nullable": true
          },
          "EAN": {
            "type": "string",
            "nullable": true
          },
          "Depo": {
            "type": "string",
            "nullable": true
          },
          "AddressRaw": {
            "type": "string",
            "nullable": true
          },
          "Packages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PackageRequest"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AddShipmentResponse": {
        "required": [
          "City",
          "Country",
          "Currency",
          "ExternalNumber",
          "PackageCount",
          "Phone",
          "Street",
          "Value",
          "ZipCode"
        ],
        "type": "object",
        "properties": {
          "ExternalNumber": {
            "minLength": 1,
            "type": "string"
          },
          "Name": {
            "type": "string",
            "description": "First and Last Name",
            "nullable": true
          },
          "CompanyName": {
            "type": "string",
            "nullable": true
          },
          "Street": {
            "minLength": 1,
            "type": "string"
          },
          "City": {
            "minLength": 1,
            "type": "string"
          },
          "ZipCode": {
            "minLength": 1,
            "type": "string"
          },
          "Country": {
            "minLength": 1,
            "type": "string"
          },
          "Phone": {
            "minLength": 1,
            "type": "string"
          },
          "Email": {
            "type": "string",
            "nullable": true
          },
          "PackageCount": {
            "type": "integer",
            "format": "int32"
          },
          "VariableSymbol": {
            "type": "string",
            "nullable": true
          },
          "COD": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "Value": {
            "type": "number",
            "format": "double"
          },
          "Currency": {
            "minLength": 1,
            "type": "string"
          },
          "Weight": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "Cubage": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "DueDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "IsCOD": {
            "type": "boolean",
            "nullable": true
          },
          "IsDisposal": {
            "type": "boolean",
            "nullable": true
          },
          "IsFloorDelivery": {
            "type": "boolean",
            "nullable": true
          },
          "IsPremium": {
            "type": "boolean",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "Note": {
            "type": "string",
            "nullable": true
          },
          "EAN": {
            "type": "string",
            "nullable": true
          },
          "Depo": {
            "type": "string",
            "nullable": true
          },
          "AddressRaw": {
            "type": "string",
            "nullable": true
          },
          "Packages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PackageRequest"
            },
            "nullable": true
          },
          "AsenNumber": {
            "type": "string",
            "nullable": true
          },
          "Zpl": {
            "type": "string",
            "nullable": true
          },
          "TrackingUrl": {
            "type": "string",
            "nullable": true
          },
          "ErrorMessage": {
            "type": "string",
            "nullable": true
          },
          "PackagesResponse": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PackageResponse"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OrderRequest": {
        "type": "object",
        "properties": {
          "ExternalNumber": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OrderResponse": {
        "type": "object",
        "properties": {
          "ExternalNumber": {
            "type": "string",
            "nullable": true
          },
          "ErrorMessage": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OrdersRequest": {
        "type": "object",
        "properties": {
          "orders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderRequest"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OrdersResponse": {
        "type": "object",
        "properties": {
          "AcceptedOrders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderResponse"
            },
            "nullable": true
          },
          "RejectedOrders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderResponse"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PackageRequest": {
        "type": "object",
        "properties": {
          "ExternalPackageNumber": {
            "type": "string",
            "nullable": true
          },
          "Weight": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "Cubage": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "packageType": {
            "type": "string",
            "description": "paleta, bez obalu, krabice",
            "nullable": true
          },
          "InternalPackageNumber": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PackageResponse": {
        "type": "object",
        "properties": {
          "ExternalPackageNumber": {
            "type": "string",
            "nullable": true
          },
          "Weight": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "Cubage": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "packageType": {
            "type": "string",
            "description": "paleta, bez obalu, krabice",
            "nullable": true
          },
          "InternalPackageNumber": {
            "type": "string",
            "nullable": true
          },
          "AsenPackageNumber": {
            "type": "string",
            "nullable": true
          },
          "Zpl": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    }
  }
}