{
  "openapi": "3.0.1",
  "info": {
    "title": "Shipping Modes",
    "version": "9.1.20.0",
    "description": "Create and administer the shipping modes.",
    "x-introduced": "9.1.0.0"
  },
  "servers": [
    {
      "url": "https://{hostname}:{port}/rest/admin/v2",
      "variables": {
        "port": {
          "default": "443",
          "enum": [
            "443",
            "8000"
          ]
        },
        "hostname": {
          "default": "localhost",
          "enum": [
            "localhost",
            "test.hcl.com"
          ]
        }
      }
    }
  ],
  "paths": {
    "/shipping-modes": {
      "get": {
        "tags": [
          "shipping-modes"
        ],
        "description": "Get a collection of Shipping Modes.",
        "operationId": "getShippingModes",
        "parameters": [
          {
            "name": "searchString",
            "in": "query",
            "description": "Limits search results to only include shipping modes that match the value of this parameter. Searches are case-insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "description": "The Shipping Mode ID.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "carrier",
            "in": "query",
            "description": "A shipping carrier identifier. The company that provides shipping services from a fulfillment center to a customer.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "field1",
            "in": "query",
            "description": "An additional description. A brief description of the shipping mode and the carrier.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "field2",
            "in": "query",
            "description": "Estimated delivery time description. For example, 1 to 3 business days, 2-3 days etc.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "trackingName",
            "in": "query",
            "description": "Reserved for HCL Internal use.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trackingURL",
            "in": "query",
            "description": "The URL address that customers can use to find out more about the status of their shipment. For example, www.xyzcarrier.com.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trackingSocksHost",
            "in": "query",
            "description": "Reserved for HCL Internal use.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trackingSocksPort",
            "in": "query",
            "description": "Reserved for HCL Internal use.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "trackingIcon",
            "in": "query",
            "description": "Reserved for HCL Internal use.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trackingInquiryType",
            "in": "query",
            "description": "Reserved for HCL Internal use.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "markForDelete",
            "in": "query",
            "description": "Limits search results to include only codes that are marked for delete (1) or not marked for delete (0) or both (0 and 1). If no value is specified, codes that are not marked for delete are returned.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "storeId",
            "in": "query",
            "description": "The unique numeric ID for identifying the store.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "shippingCode",
            "in": "query",
            "description": "A character string that uniquely identifies this shipping mode, unique for the StoreEntity.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "The position within the resulting dataset where the query begins returning item records. If the offset is \"5\", the records that returned begin with the sixth record that matches the query parameters. If the offset is \"0\", the records that are returned begin with the first record that matches the query parameters.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of records to return.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "The comma-separated set of properties to be returned. If no properties are specified, all properties are returned.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "description": "The comma-separated set of related resources referenced in the links to be returned. If no related resources are specified, no related resources are returned.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "The comma-separated set of properties which controls the order of the items being listed, prefixed by either (-) to sort by descending order, or optionally (+) to sort by ascending order. For example, sort=name,-d which means, order the items based on the name value in ascending order, then by the id value in descending order.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A collection of Shipping Modes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShippingModeCollection"
                },
                "example": {
                  "href": "https://10.190.66.207:8000/rest/admin/v2/shipping-modes?id=10501&id=12501&storeId=1&shippingCode=Mail,",
                  "items": [
                    {
                      "id": "10501",
                      "carrier": "Mail",
                      "field1": "null",
                      "field2": "null",
                      "trackingName": "null",
                      "trackingURL": "null",
                      "trackingSocksHost": "null",
                      "trackingSocksPort": "null",
                      "trackingIcon": "null",
                      "trackingInquiryType": "null",
                      "markForDelete": "0",
                      "storeId": "1",
                      "shippingCode": "Mail",
                      "links": {
                        "descriptions": {
                          "href": "https://10.190.66.207:8000/rest/admin/v2/shipping-modes/10501/descriptions"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "There was a client error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "500": {
            "description": "There was a server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "shipping-modes"
        ],
        "description": "Create a shipping mode.",
        "operationId": "createShippingMode",
        "requestBody": {
          "description": "A Shipping Mode.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShippingMode"
              },
              "example": {
                "id": "10501",
                "carrier": "Mail",
                "field1": "null",
                "field2": "null",
                "trackingName": "null",
                "trackingURL": "null",
                "trackingSocksHost": "null",
                "trackingSocksPort": "null",
                "trackingIcon": "null",
                "trackingInquiryType": "null",
                "markForDelete": "0",
                "storeId": "1",
                "shippingCode": "Mail"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "The operation was successful.",
            "content": {},
            "headers": {
              "Location": {
                "description": "The URI of the shipping-modes.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "links": {
              "GetShippingModesById": {
                "operationRef": "#/paths/~1shipping-modes~1{id}/get",
                "parameters": {
                  "id": "$request.body#/id"
                },
                "description": "The `id` value used in the request body can be used as the `id` parameter in `GET /shipping-modes/{id}`.\n"
              },
              "DeleteShippingModesById": {
                "operationRef": "#/paths/~1shipping-modes~1{id}/delete",
                "parameters": {
                  "id": "$request.body#/id"
                },
                "description": "The `id` value used in the request body can be used as the `id` parameter in `DELETE /shipping-modes/{id}`.\n"
              },
              "UpdateShippingModesById": {
                "operationRef": "#/paths/~1shipping-modes~1{id}/patch",
                "parameters": {
                  "id": "$request.body#/id"
                },
                "description": "The `id` value used in the request body can be used as the `id` parameter in `PATCH /shipping-modes/{id}`.\n"
              },
              "GetShippingModeDescriptionById": {
                "operationRef": "#/paths/~1shipping-modes~1{id}~1descriptions/get",
                "parameters": {
                  "id": "$request.body#/id"
                },
                "description": "The `id` value used in the request body can be used as the `id` parameter in `GET /shipping-modes/{id}/descriptions`.\n"
              }
            }
          },
          "400": {
            "description": "There was a client error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "500": {
            "description": "There was a server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "ShippingMode"
      }
    },
    "/shipping-modes/{id}": {
      "get": {
        "tags": [
          "shipping-modes"
        ],
        "description": "Get a shipping mode.",
        "operationId": "getShippingModeById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The Shipping Mode ID.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "The comma-separated set of properties to be returned. If no properties are specified, all properties are returned.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "description": "The comma-separated set of related resources referenced in the links to be returned. If no related resources are specified, no related resources are returned.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "The comma-separated set of properties which controls the order of the items being listed, prefixed by either (-) to sort by descending order, or optionally (+) to sort by ascending order. For example, sort=name,-d which means, order the items based on the name value in ascending order, then by the id value in descending order.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A Shipping Mode.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShippingMode"
                },
                "example": {
                  "id": "10501",
                  "carrier": "Mail",
                  "field1": "null",
                  "field2": "null",
                  "trackingName": "null",
                  "trackingURL": "null",
                  "trackingSocksHost": "null",
                  "trackingSocksPort": "null",
                  "trackingIcon": "null",
                  "trackingInquiryType": "null",
                  "markForDelete": "0",
                  "storeId": "1",
                  "shippingCode": "Mail",
                  "links": {
                    "descriptions": {
                      "href": "https://10.190.66.207:8000/rest/admin/v2/shipping-modes/10501/descriptions"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "There was a client error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {}
          },
          "500": {
            "description": "There was a server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "shipping-modes"
        ],
        "description": "Delete a shipping mode.",
        "operationId": "deleteShippingModeById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The Shipping Mode ID.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The operation was successful.",
            "content": {}
          },
          "400": {
            "description": "There was a client error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {}
          },
          "500": {
            "description": "There was a server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "shipping-modes"
        ],
        "description": "Update a shipping mode.",
        "operationId": "updateShippingModeById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The Shipping Mode ID.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "A Shipping Mode.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShippingModes"
              },
              "example": {
                "id": "10501",
                "carrier": "Mail",
                "field1": "null",
                "field2": "null",
                "trackingName": "null",
                "trackingURL": "null",
                "trackingSocksHost": "null",
                "trackingSocksPort": "null",
                "trackingIcon": "null",
                "trackingInquiryType": "null",
                "markForDelete": "0",
                "storeId": "1",
                "shippingCode": "Mail"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The operation was successful.",
            "content": {}
          },
          "400": {
            "description": "There was a client error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {}
          },
          "500": {
            "description": "There was a server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "ShippingMode"
      }
    },
    "/shipping-modes/{id}/descriptions": {
      "get": {
        "tags": [
          "shipping-modes"
        ],
        "operationId": "getDescriptionsOfShippingMode",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The Shipping Mode ID.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "The position within the resulting dataset where the query begins returning item records. If the offset is \"5\", the records that returned begin with the sixth record that matches the query parameters. If the offset is \"0\", the records that are returned begin with the first record that matches the query parameters.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of records to return.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "The comma-separated set of properties to be returned. If no properties are specified, all properties are returned.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "description": "The comma-separated set of related resources referenced in the links to be returned. If no related resources are specified, no related resources are returned.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "The comma-separated set of properties which controls the order of the items being listed, prefixed by either (-) to sort by descending order, or optionally (+) to sort by ascending order. For example, sort=name,-d which means, order the items based on the name value in ascending order, then by the id value in descending order.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A collection of Shipping Mode Descriptions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShippingModeDescriptionCollection"
                },
                "example": {
                  "count": 0,
                  "items": [
                    {
                      "shippingModeId": 10501,
                      "languageId": -1,
                      "description": "Mail",
                      "field1": null,
                      "field2": "mail"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "There was a client error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "500": {
            "description": "There was a server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Link": {
        "type": "object",
        "properties": {
          "href": {
            "type": "string",
            "description": "The URL of the link.",
            "format": "uri"
          }
        },
        "description": "Links to related resources."
      },
      "Error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "The error message code."
          },
          "message": {
            "type": "string",
            "description": "The error message."
          },
          "messageKey": {
            "type": "string",
            "description": "The error message key."
          },
          "messageArguments": {
            "type": "array",
            "description": "The arguments used to construct the error message.",
            "items": {
              "type": "object",
              "properties": {}
            }
          },
          "correlationId": {
            "type": "string",
            "description": "The unique identifier for the request."
          },
          "locale": {
            "type": "string",
            "description": "The locale of the error message."
          }
        },
        "description": "The error message item model."
      },
      "ErrorResponseContainer": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string",
            "description": "The request identifier."
          },
          "errors": {
            "type": "array",
            "description": "The errors.",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "The error message model."
      },
      "ShippingMode": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The Shipping Mode ID.",
            "format": "int32"
          },
          "carrier": {
            "type": "string",
            "description": "A shipping carrier identifier. The company that provides shipping services from a fulfillment center to a customer."
          },
          "field1": {
            "type": "string",
            "nullable": true,
            "description": "An additional description. A brief description of the shipping mode and the carrier."
          },
          "field2": {
            "type": "integer",
            "nullable": true,
            "description": "Estimated delivery time description. For example, 1 to 3 business days, 2-3 days etc.",
            "format": "int32"
          },
          "trackingName": {
            "type": "string",
            "nullable": true,
            "description": "Reserved for HCL Internal use."
          },
          "trackingURL": {
            "type": "string",
            "nullable": true,
            "description": "The URL address that customers can use to find out more about the status of their shipment. For example, www.xyzcarrier.com."
          },
          "trackingSocksHost": {
            "type": "string",
            "nullable": true,
            "description": "Reserved for HCL Internal use."
          },
          "trackingSocksPort": {
            "type": "integer",
            "nullable": true,
            "description": "Reserved for HCL Internal use.",
            "format": "int32"
          },
          "trackingIcon": {
            "type": "string",
            "nullable": true,
            "description": "Reserved for HCL Internal use."
          },
          "trackingInquiryType": {
            "type": "string",
            "nullable": true,
            "description": "Reserved for HCL Internal use."
          },
          "markForDelete": {
            "type": "integer",
            "description": "Indicates that the shipping mode has been deleted. 0 = No. 1 = Yes.",
            "format": "int32"
          },
          "storeId": {
            "type": "integer",
            "description": "The unique numeric ID for identifying the store.",
            "format": "int32"
          },
          "shippingCode": {
            "type": "string",
            "description": "A character string that uniquely identifies this shipping mode, unique for the store."
          },
          "links": {
            "type": "object",
            "properties": {
              "descriptions": {
                "type": "object",
                "properties": {
                  "href": {
                    "type": "string",
                    "description": "The URL of the link."
                  }
                },
                "description": ""
              }
            },
            "description": "Links to related resources."
          }
        },
        "description": "A Shipping Mode."
      },
      "ShippingModes": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The Shipping Mode ID.",
            "format": "int32"
          },
          "carrier": {
            "type": "string",
            "description": "A shipping carrier identifier. The company that provides shipping services from a fulfillment center to a customer."
          },
          "field1": {
            "type": "string",
            "nullable": true,
            "description": "An additional description. A brief description of the shipping mode and the carrier."
          },
          "field2": {
            "type": "integer",
            "nullable": true,
            "description": "Estimated delivery time description. For example, 1 to 3 business days, 2-3 days etc.",
            "format": "int32"
          },
          "trackingName": {
            "type": "string",
            "nullable": true,
            "description": "Reserved for HCL Internal use."
          },
          "trackingURL": {
            "type": "string",
            "nullable": true,
            "description": "The URL address that customers can use to find out more about the status of their shipment. For example, www.xyzcarrier.com."
          },
          "trackingSocksHost": {
            "type": "string",
            "nullable": true,
            "description": "Reserved for HCL Internal use."
          },
          "trackingSocksPort": {
            "type": "integer",
            "nullable": true,
            "description": "Reserved for HCL Internal use.",
            "format": "int32"
          },
          "trackingIcon": {
            "type": "string",
            "nullable": true,
            "description": "Reserved for HCL Internal use."
          },
          "trackingInquiryType": {
            "type": "string",
            "nullable": true,
            "description": "Reserved for HCL Internal use."
          },
          "markForDelete": {
            "type": "integer",
            "description": "Indicates that the shipping mode has been deleted. 0 = No. 1 = Yes.",
            "format": "int32"
          },
          "storeId": {
            "type": "integer",
            "description": "The unique numeric ID for identifying the store.",
            "format": "int32"
          },
          "shippingCode": {
            "type": "string",
            "description": "A character string that uniquely identifies this shipping mode, unique for the store."
          }
        },
        "description": "A Shipping Mode."
      },
      "ShippingModeCollection": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "description": "The total number of items.",
            "format": "int64"
          },
          "items": {
            "type": "array",
            "description": "The items.",
            "items": {
              "$ref": "#/components/schemas/ShippingMode"
            }
          }
        },
        "description": "A collection of Shipping Modes."
      },
      "ShippingModeDescription": {
        "type": "object",
        "properties": {
          "shippingModeId": {
            "type": "integer",
            "description": "The Shipping Mode ID.",
            "format": "int32"
          },
          "languageId": {
            "type": "integer",
            "description": "The Language ID.",
            "format": "int32"
          },
          "description": {
            "type": "string",
            "description": "A brief description of the shipping mode, suitable for display to a customer for selection. For example, XYZ Carrier, Overnight shipping mode."
          },
          "field1": {
            "type": "string",
            "nullable": true,
            "description": "Customizable."
          },
          "field2": {
            "type": "string",
            "description": "Customizable."
          }
        },
        "description": "A Shipping Mode Description."
      },
      "ShippingModeDescriptionCollection": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "description": "The total number of items.",
            "format": "int64"
          },
          "items": {
            "type": "array",
            "description": "The items.",
            "items": {
              "$ref": "#/components/schemas/ShippingModeDescription"
            }
          }
        },
        "description": "A collection of Shipping Mode Descriptions."
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "basicAuth": []
    }
  ],
  "x-components": {}
}
