{
  "openapi": "3.0.1",
  "info": {
    "title": "Shipping Arrangements",
    "version": "9.1.20.0",
    "description": "Create and administer shipping arrangements.",
    "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-arrangements": {
      "get": {
        "tags": [
          "shipping-arrangements"
        ],
        "description": "Get a collection of shipping arrangements.",
        "operationId": "getShippingArrangements",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "description": "The shipping arrangement ID.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "storeId",
            "in": "query",
            "description": "The store ID.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "fulfillmentCenterId",
            "in": "query",
            "description": "The FulfillmentCenter ID.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "shippingModeId",
            "in": "query",
            "description": "The ShippingMode. NULL indicates this shipping arrangement can be used regardless of shipping mode.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "The time this shipping arrangement starts being effective. If STARTDATE is NULL, it means it begin effective from the beginning.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "The time this shipping arrangement stops being effective. If ENDDATE is NULL, it means it will effective forever once it has been started. If the EndDate expires, this shipping arrangement turns invalid and then shoppers could not add items to the cart with this shipping arrangement.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "trackingNumber",
            "in": "query",
            "description": "The tracking number.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "field1",
            "in": "query",
            "description": "Customizable.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "precedence",
            "in": "query",
            "description": "When more than one shipping arrangement (for the same Store and shipping mode) is effective at a particular time, the one with the highest precedence is used.",
            "schema": {
              "type": "number",
              "format": "double"
            }
          },
          {
            "name": "field2",
            "in": "query",
            "description": "Customizable.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "flags",
            "in": "query",
            "description": "The low order bit contains a flag as follows, 1 - restricted = If this flag is 1, then this shipping arrangement applies only to order items whose shipping Addresses match one of the shipping jurisdiction associated with this shipping arrangement. Otherwise, it applies to all order items.",
            "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 arrangements.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShippingArrangementCollection"
                },
                "example": {
                  "href": "https://10.190.66.207:8000/rest/admin/v2/shipping-arrangements?id=10501&storeId=2",
                  "items": [
                    {
                      "id": "10501",
                      "storeId": "2",
                      "fulfillmentCenterId": "11001",
                      "shippingModeId": null,
                      "startDate": "2016-10-01T16:00:00.001Z",
                      "endDate": null,
                      "trackingNumber": null,
                      "field1": null,
                      "precedence": 0,
                      "field2": null,
                      "flags": 0,
                      "links": {
                        "self": {
                          "href": "https://10.190.66.207:8000/rest/admin/v2/shipping-arrangements/10501"
                        }
                      }
                    }
                  ],
                  "count": "1"
                }
              }
            }
          },
          "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-arrangements"
        ],
        "description": "Create a shipping arrangement.",
        "operationId": "createShippingArrangement",
        "requestBody": {
          "description": "Shipping arrangements.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShippingArrangements"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "The operation was successful.",
            "content": {},
            "headers": {
              "Location": {
                "description": "The URI of the Shipping Arrangements.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "links": {
              "GetShippingArrangementsById": {
                "operationRef": "#/paths/~1shipping-arrangements~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-arrangements/{id}`.\n"
              },
              "DeleteShippingArrangementsById": {
                "operationRef": "#/paths/~1shipping-arrangements~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-arrangements/{id}`.\n"
              },
              "UpdateShippingArrangementsById": {
                "operationRef": "#/paths/~1shipping-arrangements~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-arrangements/{id}`.\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": "ShippingArrangement"
      }
    },
    "/shipping-arrangements/{id}": {
      "get": {
        "tags": [
          "shipping-arrangements"
        ],
        "description": "Get a shipping arrangement.",
        "operationId": "getShippingArrangementById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The shipping arrangement 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": "Shipping arrangements.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShippingArrangement"
                },
                "example": {
                  "id": "10501",
                  "storeId": "2",
                  "fulfillmentCenterId": "11001",
                  "shippingModeId": null,
                  "startDate": "2016-10-01T16:00:00.001Z",
                  "endDate": null,
                  "trackingNumber": null,
                  "field1": null,
                  "precedence": 0,
                  "field2": null,
                  "flags": 0,
                  "links": {
                    "self": {
                      "href": "https://10.190.66.207:8000/rest/admin/v2/shipping-arrangements/10501"
                    }
                  }
                }
              }
            }
          },
          "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-arrangements"
        ],
        "description": "Delete a shipping arrangement.",
        "operationId": "deleteShippingArrangementById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The shipping arrangement 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-arrangements"
        ],
        "description": "Update a shipping arrangement.",
        "operationId": "updateShippingArrangementById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The shipping arrangement ID.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Shipping arrangements.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShippingArrangements"
              },
              "example": {
                "id": "10501",
                "storeId": "2",
                "fulfillmentCenterId": "11001",
                "shippingModeId": null,
                "startDate": "2016-10-01T16:00:00.001Z",
                "endDate": null,
                "trackingNumber": null,
                "field1": null,
                "precedence": 0,
                "field2": null,
                "flags": 0
              }
            }
          },
          "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": "ShippingArrangement"
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "errorCode": {
            "type": "string",
            "description": "The error message code."
          },
          "errorMessage": {
            "type": "string",
            "description": "The error message."
          },
          "errorKey": {
            "type": "string",
            "description": "The error message key."
          },
          "errorParameters": {
            "type": "array",
            "description": "The arguments used to construct the error message.",
            "items": {
              "type": "object",
              "properties": {}
            }
          },
          "errorLevel": {
            "type": "string",
            "description": "The error level."
          },
          "errorHref": {
            "type": "string",
            "description": "The error hypertext reference."
          }
        },
        "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."
      },
      "ShippingArrangement": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The shipping arrangement ID.",
            "format": "int32"
          },
          "storeId": {
            "type": "integer",
            "description": "The store ID.",
            "format": "int32"
          },
          "fulfillmentCenterId": {
            "type": "integer",
            "description": "The FulfillmentCenter ID.",
            "format": "int32"
          },
          "shippingModeId": {
            "type": "integer",
            "nullable": true,
            "description": "The ShippingMode. NULL indicates this shipping arrangement can be used regardless of shipping mode.",
            "format": "int32"
          },
          "startDate": {
            "type": "string",
            "description": "The time this shipping arrangement starts being effective. If STARTDATE is NULL, it means it begin effective from the beginning.",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "nullable": true,
            "description": "The time this shipping arrangement stops being effective. If ENDDATE is NULL, it means it will effective forever once it has been started. If the EndDate expires, this shipping arrangement turns invalid and then shoppers could not add items to the cart with this shipping arrangement.",
            "format": "date-time"
          },
          "trackingNumber": {
            "type": "string",
            "nullable": true,
            "description": "The tracking number."
          },
          "field1": {
            "type": "string",
            "nullable": true,
            "description": "Customizable."
          },
          "precedence": {
            "type": "number",
            "description": "When more than one shipping arrangement (for the same Store and shipping mode) is effective at a particular time, the one with the highest precedence is used.",
            "format": "double"
          },
          "field2": {
            "type": "integer",
            "nullable": true,
            "description": "Customizable.",
            "format": "int32"
          },
          "flags": {
            "type": "integer",
            "description": "The low order bit contains a flag as follows, 1 - restricted = If this flag is 1, then this shipping arrangement applies only to order items whose shipping Addresses match one of the shipping jurisdiction associated with this shipping arrangement. Otherwise, it applies to all order items.",
            "format": "int32"
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "object",
                "properties": {
                  "href": {
                    "type": "string",
                    "description": "The URL of the link."
                  }
                },
                "description": "The self link."
              }
            }
          }
        },
        "description": "Shipping arrangements."
      },
      "ShippingArrangements": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The shipping arrangement ID.",
            "format": "int32"
          },
          "storeId": {
            "type": "integer",
            "description": "The store ID.",
            "format": "int32"
          },
          "fulfillmentCenterId": {
            "type": "integer",
            "description": "The FulfillmentCenter ID.",
            "format": "int32"
          },
          "shippingModeId": {
            "type": "integer",
            "nullable": true,
            "description": "The ShippingMode. NULL indicates this shipping arrangement can be used regardless of shipping mode.",
            "format": "int32"
          },
          "startDate": {
            "type": "string",
            "description": "The time this shipping arrangement starts being effective. If STARTDATE is NULL, it means it begin effective from the beginning.",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "nullable": true,
            "description": "The time this shipping arrangement stops being effective. If ENDDATE is NULL, it means it will effective forever once it has been started. If the EndDate expires, this shipping arrangement turns invalid and then shoppers could not add items to the cart with this shipping arrangement.",
            "format": "date-time"
          },
          "trackingNumber": {
            "type": "string",
            "nullable": true,
            "description": "The tracking number."
          },
          "field1": {
            "type": "string",
            "nullable": true,
            "description": "Customizable."
          },
          "precedence": {
            "type": "number",
            "description": "When more than one shipping arrangement (for the same Store and shipping mode) is effective at a particular time, the one with the highest precedence is used.",
            "format": "double"
          },
          "field2": {
            "type": "integer",
            "nullable": true,
            "description": "Customizable.",
            "format": "int32"
          },
          "flags": {
            "type": "integer",
            "description": "The low order bit contains a flag as follows, 1 - restricted = If this flag is 1, then this shipping arrangement applies only to order items whose shipping Addresses match one of the shipping jurisdiction associated with this shipping arrangement. Otherwise, it applies to all order items.",
            "format": "int32"
          }
        },
        "description": "Shipping arrangements."
      },
      "ShippingArrangementCollection": {
        "type": "object",
        "properties": {
          "href": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "description": "The total number of items.",
            "format": "int64"
          },
          "items": {
            "type": "array",
            "description": "The items.",
            "items": {
              "$ref": "#/components/schemas/ShippingArrangement"
            }
          }
        },
        "description": "A collection of shipping arrangements."
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "basicAuth": []
    }
  ],
  "x-components": {}
}
