{
  "openapi": "3.1.1",
  "info": {
    "title": "Velocity 360 client API",
    "description": "The Velocity 360 client API. Every call is made as one client, by an API key.\n\n**Authentication.** Send the key as `Authorization: Bearer <key>`. Keys are issued in the client portal under Users > API and webhooks, each with the scopes it may use.\n\n**Rate limits.** Each key has a per-minute limit. `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset` say where a key stands; past the limit the answer is 429.\n\n**Idempotency.** Send an `Idempotency-Key` header with a write. The same key and request within 24 hours returns the first answer and does the work once.\n\n**Errors.** Problem details (`application/problem+json`) with a stable `code`, such as `scope_missing` or `not_found`.",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.getvelocity360.com/"
    }
  ],
  "paths": {
    "/api/v1/client/items": {
      "get": {
        "tags": [
          "Client API"
        ],
        "summary": "List items",
        "description": "List the client's items by SKU, optionally by a search of SKU or name. Up to 500 a page (50 by default); pass the `next` cursor as `after` for the following page.\n\nRequires the `items:read` scope.",
        "operationId": "ClientListItems",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPageOfItemSummary"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, unknown, paused or revoked. `code`: `unauthorized`, `invalid_key`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs. `code`: `scope_missing`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The key's per-minute limit is used up. `code`: `rate_limited`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "items:read"
      },
      "post": {
        "tags": [
          "Client API"
        ],
        "summary": "Create or update an item",
        "description": "Create an item, or update the one with this SKU. Idempotent by SKU.\n\nRequires the `items:write` scope.",
        "operationId": "ClientUpsertItem",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "A unique value for this request. The same key and request within 24 hours returns the first response (`Idempotent-Replayed: true`) and does the work once.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientItemRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotent-Replayed": {
                "description": "`true` when this is the stored answer to an earlier request with the same key.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemDetail"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, unknown, paused or revoked. `code`: `unauthorized`, `invalid_key`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs. `code`: `scope_missing`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The key's per-minute limit is used up. `code`: `rate_limited`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "A request with this `Idempotency-Key` is still being processed, or the request conflicts with the current state. Retry after a moment. `code`: `idempotency_key_in_use`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "The request breaks a rule, or the `Idempotency-Key` was used for a different request. `code`: `idempotency_key_reused`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "items:write"
      }
    },
    "/api/v1/client/orders": {
      "get": {
        "tags": [
          "Client API"
        ],
        "summary": "List orders",
        "description": "The client's orders, every status unless one is named, in the order they last changed. Pass `updatedSince` to read what changed from a moment; start the next one a few minutes before the last change you read, since a save that committed late can carry an earlier time. Up to 200 a page (50 by default); pass `next` as `after`.\n\nRequires the `orders:read` scope.",
        "operationId": "ClientListOrders",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updatedSince",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPageOfOrderSummary"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, unknown, paused or revoked. `code`: `unauthorized`, `invalid_key`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs. `code`: `scope_missing`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The key's per-minute limit is used up. `code`: `rate_limited`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "orders:read"
      },
      "post": {
        "tags": [
          "Client API"
        ],
        "summary": "Create an order",
        "description": "Create an order. Idempotent by your external order id.\n\nRequires the `orders:write` scope.",
        "operationId": "ClientCreateOrder",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "A unique value for this request. The same key and request within 24 hours returns the first response (`Idempotent-Replayed: true`) and does the work once.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientOrderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotent-Replayed": {
                "description": "`true` when this is the stored answer to an earlier request with the same key.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientOrderView"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, unknown, paused or revoked. `code`: `unauthorized`, `invalid_key`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs. `code`: `scope_missing`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The key's per-minute limit is used up. `code`: `rate_limited`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "A request with this `Idempotency-Key` is still being processed, or the request conflicts with the current state. Retry after a moment. `code`: `idempotency_key_in_use`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "The request breaks a rule, or the `Idempotency-Key` was used for a different request. `code`: `idempotency_key_reused`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "orders:write"
      }
    },
    "/api/v1/client/shipments": {
      "get": {
        "tags": [
          "Client API"
        ],
        "summary": "List shipments",
        "description": "The client's shipments that have shipped, oldest first by when they shipped. Pass `shippedSince` to read what went out from a moment. Up to 200 a page (50 by default); pass `next` as `after`.\n\nRequires the `orders:read` scope.",
        "operationId": "ClientListShipments",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shippedSince",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPageOfClientShipmentSummary"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, unknown, paused or revoked. `code`: `unauthorized`, `invalid_key`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs. `code`: `scope_missing`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The key's per-minute limit is used up. `code`: `rate_limited`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "orders:read"
      }
    },
    "/api/v1/client/shipments/{number}": {
      "get": {
        "tags": [
          "Client API"
        ],
        "summary": "Get a shipment",
        "description": "One shipment by its number, as the order.shipped webhook carries it.\n\nRequires the `orders:read` scope.",
        "operationId": "ClientGetShipment",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientShipmentView"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, unknown, paused or revoked. `code`: `unauthorized`, `invalid_key`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs. `code`: `scope_missing`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The key's per-minute limit is used up. `code`: `rate_limited`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "orders:read"
      }
    },
    "/api/v1/client/asns": {
      "get": {
        "tags": [
          "Client API"
        ],
        "summary": "List ASNs",
        "description": "The client's ASNs in the order they last changed, optionally by status and expected days. Pass `updatedSince` to read what changed from a moment (start it a few minutes early). Up to 200 a page (50 by default); pass `next` as `after`.\n\nRequires the `receipts:read` scope.",
        "operationId": "ClientListAsns",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expectedFrom",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "expectedTo",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "updatedSince",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPageOfNoticeSummary"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, unknown, paused or revoked. `code`: `unauthorized`, `invalid_key`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs. `code`: `scope_missing`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The key's per-minute limit is used up. `code`: `rate_limited`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "receipts:read"
      },
      "post": {
        "tags": [
          "Client API"
        ],
        "summary": "Create an ASN",
        "description": "Announce a delivery of goods to the warehouse.\n\nRequires the `receipts:write` scope.",
        "operationId": "ClientCreateAsn",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "A unique value for this request. The same key and request within 24 hours returns the first response (`Idempotent-Replayed: true`) and does the work once.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientAsnRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotent-Replayed": {
                "description": "`true` when this is the stored answer to an earlier request with the same key.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientNoticeView"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, unknown, paused or revoked. `code`: `unauthorized`, `invalid_key`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs. `code`: `scope_missing`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The key's per-minute limit is used up. `code`: `rate_limited`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "A request with this `Idempotency-Key` is still being processed, or the request conflicts with the current state. Retry after a moment. `code`: `idempotency_key_in_use`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "The request breaks a rule, or the `Idempotency-Key` was used for a different request. `code`: `idempotency_key_reused`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "receipts:write"
      }
    },
    "/api/v1/client/inventory": {
      "get": {
        "tags": [
          "Client API"
        ],
        "summary": "Stock of every item",
        "description": "What the warehouse holds of each of the client's items, by SKU, summed over lots and places: on hand, allocated, available and on hand by status. LOST stock is left out; in-transit stock is on hand and never available. Items with nothing in stock are listed with zeros. Pass `warehouseId` for one warehouse. Up to 500 a page (50 by default); pass `next` as `after`.\n\nRequires the `inventory:read` scope.",
        "operationId": "ClientListInventory",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouseId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPageOfClientInventoryTotal"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, unknown, paused or revoked. `code`: `unauthorized`, `invalid_key`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs. `code`: `scope_missing`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The key's per-minute limit is used up. `code`: `rate_limited`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "inventory:read"
      }
    },
    "/api/v1/client/items/{sku}/inventory": {
      "get": {
        "tags": [
          "Client API"
        ],
        "summary": "Stock of an item",
        "description": "What the warehouse holds of one item, by SKU: by warehouse, lot (with its code and expiry) and status.\n\nRequires the `inventory:read` scope.",
        "operationId": "ClientInventory",
        "parameters": [
          {
            "name": "sku",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientInventoryView"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, unknown, paused or revoked. `code`: `unauthorized`, `invalid_key`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs. `code`: `scope_missing`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The key's per-minute limit is used up. `code`: `rate_limited`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "inventory:read"
      }
    },
    "/api/v1/client/orders/{number}": {
      "get": {
        "tags": [
          "Client API"
        ],
        "summary": "Get an order",
        "description": "One order by its number.\n\nRequires the `orders:read` scope.",
        "operationId": "ClientGetOrder",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientOrderView"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, unknown, paused or revoked. `code`: `unauthorized`, `invalid_key`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs. `code`: `scope_missing`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The key's per-minute limit is used up. `code`: `rate_limited`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "orders:read"
      },
      "patch": {
        "tags": [
          "Client API"
        ],
        "summary": "Change an order",
        "description": "Change the ship-to address or lines of an order that has not been released.\n\nRequires the `orders:write` scope.",
        "operationId": "ClientPatchOrder",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "A unique value for this request. The same key and request within 24 hours returns the first response (`Idempotent-Replayed: true`) and does the work once.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientOrderPatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotent-Replayed": {
                "description": "`true` when this is the stored answer to an earlier request with the same key.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientOrderView"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotent-Replayed": {
                "description": "`true` when this is the stored answer to an earlier request with the same key.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, unknown, paused or revoked. `code`: `unauthorized`, `invalid_key`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs. `code`: `scope_missing`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The key's per-minute limit is used up. `code`: `rate_limited`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "A request with this `Idempotency-Key` is still being processed, or the request conflicts with the current state. Retry after a moment. `code`: `idempotency_key_in_use`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "The request breaks a rule, or the `Idempotency-Key` was used for a different request. `code`: `idempotency_key_reused`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "orders:write"
      }
    },
    "/api/v1/client/orders/{number}/cancel": {
      "post": {
        "tags": [
          "Client API"
        ],
        "summary": "Cancel an order",
        "description": "Cancel an order that has not shipped.\n\nRequires the `orders:write` scope.",
        "operationId": "ClientCancelOrder",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "A unique value for this request. The same key and request within 24 hours returns the first response (`Idempotent-Replayed: true`) and does the work once.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientCancelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotent-Replayed": {
                "description": "`true` when this is the stored answer to an earlier request with the same key.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientOrderView"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotent-Replayed": {
                "description": "`true` when this is the stored answer to an earlier request with the same key.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, unknown, paused or revoked. `code`: `unauthorized`, `invalid_key`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs. `code`: `scope_missing`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The key's per-minute limit is used up. `code`: `rate_limited`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "A request with this `Idempotency-Key` is still being processed, or the request conflicts with the current state. Retry after a moment. `code`: `idempotency_key_in_use`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "The request breaks a rule, or the `Idempotency-Key` was used for a different request. `code`: `idempotency_key_reused`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "orders:write"
      }
    },
    "/api/v1/client/asns/{number}": {
      "get": {
        "tags": [
          "Client API"
        ],
        "summary": "Get an ASN",
        "description": "One ASN by its number.\n\nRequires the `receipts:read` scope.",
        "operationId": "ClientGetAsn",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientNoticeView"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, unknown, paused or revoked. `code`: `unauthorized`, `invalid_key`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs. `code`: `scope_missing`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The key's per-minute limit is used up. `code`: `rate_limited`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "receipts:read"
      }
    },
    "/api/v1/client/returns": {
      "post": {
        "tags": [
          "Client API"
        ],
        "summary": "Create a return",
        "description": "Ask to return goods from an order.\n\nRequires the `returns:write` scope.",
        "operationId": "ClientCreateReturn",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "A unique value for this request. The same key and request within 24 hours returns the first response (`Idempotent-Replayed: true`) and does the work once.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientReturnRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotent-Replayed": {
                "description": "`true` when this is the stored answer to an earlier request with the same key.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnClientView"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, unknown, paused or revoked. `code`: `unauthorized`, `invalid_key`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs. `code`: `scope_missing`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The key's per-minute limit is used up. `code`: `rate_limited`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "A request with this `Idempotency-Key` is still being processed, or the request conflicts with the current state. Retry after a moment. `code`: `idempotency_key_in_use`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "The request breaks a rule, or the `Idempotency-Key` was used for a different request. `code`: `idempotency_key_reused`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "returns:write"
      }
    },
    "/api/v1/client/returns/{number}": {
      "get": {
        "tags": [
          "Client API"
        ],
        "summary": "Get a return",
        "description": "One return by its number.\n\nRequires the `returns:read` scope.",
        "operationId": "ClientGetReturn",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnClientView"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, unknown, paused or revoked. `code`: `unauthorized`, `invalid_key`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs. `code`: `scope_missing`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The key's per-minute limit is used up. `code`: `rate_limited`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "returns:read"
      }
    },
    "/api/v1/client/invoices": {
      "get": {
        "tags": [
          "Client API"
        ],
        "summary": "List invoices",
        "description": "Issued invoices.\n\nRequires the `invoices:read` scope.",
        "operationId": "ClientListInvoices",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ClientInvoiceSummary"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, unknown, paused or revoked. `code`: `unauthorized`, `invalid_key`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs. `code`: `scope_missing`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The key's per-minute limit is used up. `code`: `rate_limited`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "invoices:read"
      }
    },
    "/api/v1/client/invoices/{number}": {
      "get": {
        "tags": [
          "Client API"
        ],
        "summary": "Get an invoice",
        "description": "One invoice by its number.\n\nRequires the `invoices:read` scope.",
        "operationId": "ClientGetInvoice",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientInvoiceView"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, unknown, paused or revoked. `code`: `unauthorized`, `invalid_key`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs. `code`: `scope_missing`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The key's per-minute limit is used up. `code`: `rate_limited`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "invoices:read"
      }
    },
    "/api/v1/client/webhooks/events": {
      "get": {
        "tags": [
          "Client API"
        ],
        "summary": "List webhook events",
        "description": "Events in order of sequence, for catching up after downtime. Pass `since` to continue from the last sequence seen.\n\nRequires the `orders:read` scope.",
        "operationId": "ClientWebhookEvents",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int64"
            }
          },
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the minute ends, in Unix seconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebhookEventView"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, unknown, paused or revoked. `code`: `unauthorized`, `invalid_key`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this operation needs. `code`: `scope_missing`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "The key's per-minute limit is used up. `code`: `rate_limited`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "description": "A stable machine code."
                    }
                  }
                }
              }
            }
          }
        },
        "x-required-scope": "orders:read"
      }
    }
  },
  "components": {
    "schemas": {
      "ApiPageOfClientInventoryTotal": {
        "required": [
          "data",
          "hasMore",
          "next"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientInventoryTotal"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "next": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiPageOfClientShipmentSummary": {
        "required": [
          "data",
          "hasMore",
          "next"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientShipmentSummary"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "next": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiPageOfItemSummary": {
        "required": [
          "data",
          "hasMore",
          "next"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ItemSummary"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "next": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiPageOfNoticeSummary": {
        "required": [
          "data",
          "hasMore",
          "next"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NoticeSummary"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "next": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiPageOfOrderSummary": {
        "required": [
          "data",
          "hasMore",
          "next"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderSummary"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "next": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AsnSource": {
        "enum": [
          "Portal",
          "Edi",
          "Api",
          "Manual",
          "Blind",
          "Transfer"
        ]
      },
      "AsnStatus": {
        "enum": [
          "Draft",
          "Expected",
          "Arrived",
          "Receiving",
          "Closed",
          "Cancelled"
        ]
      },
      "AttemptStatus": {
        "enum": [
          "Pending",
          "Succeeded",
          "Retrying",
          "Failed",
          "Cancelled"
        ]
      },
      "BillToAddress": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "line1": {
            "type": [
              "null",
              "string"
            ]
          },
          "line2": {
            "type": [
              "null",
              "string"
            ]
          },
          "city": {
            "type": [
              "null",
              "string"
            ]
          },
          "region": {
            "type": [
              "null",
              "string"
            ]
          },
          "postalCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "country": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ChargeCategory": {
        "enum": [
          "Receiving",
          "Putaway",
          "Storage",
          "OrderHandling",
          "Picking",
          "Packing",
          "Shipping",
          "Materials",
          "Kitting",
          "Services",
          "Returns",
          "Counting",
          "Accessorial",
          "Minimum",
          "DockTime",
          "CrossDock",
          "Unpick"
        ]
      },
      "ClientAsnLine": {
        "required": [
          "sku",
          "quantity"
        ],
        "type": "object",
        "properties": {
          "sku": {
            "type": "string"
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "lotCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "expiryDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "vendorSku": {
            "type": [
              "null",
              "string"
            ]
          },
          "serials": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "poNumber": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ClientAsnPallet": {
        "required": [
          "sscc",
          "lines"
        ],
        "type": "object",
        "properties": {
          "sscc": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientAsnLine"
            }
          },
          "forOrderNumber": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ClientAsnRequest": {
        "required": [
          "lines"
        ],
        "type": "object",
        "properties": {
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientAsnLine"
            }
          },
          "expectedArrivalDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "clientReference": {
            "type": [
              "null",
              "string"
            ]
          },
          "vendorName": {
            "type": [
              "null",
              "string"
            ]
          },
          "carrierName": {
            "type": [
              "null",
              "string"
            ]
          },
          "trackingReference": {
            "type": [
              "null",
              "string"
            ]
          },
          "containerNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "notes": {
            "type": [
              "null",
              "string"
            ]
          },
          "warehouseId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "pallets": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ClientAsnPallet"
            }
          }
        }
      },
      "ClientCancelRequest": {
        "required": [
          "reasonCode"
        ],
        "type": "object",
        "properties": {
          "reasonCode": {
            "type": "string"
          }
        }
      },
      "ClientCreditNoteLineView": {
        "required": [
          "description",
          "amount",
          "taxAmount"
        ],
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "taxAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "ClientCreditNoteView": {
        "required": [
          "number",
          "reason",
          "issuedAt",
          "total",
          "lines",
          "id"
        ],
        "type": "object",
        "properties": {
          "number": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "issuedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientCreditNoteLineView"
            }
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "pdfDocumentId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ClientDeclaredPalletView": {
        "required": [
          "id",
          "sscc",
          "contents",
          "received",
          "receiptId",
          "lpn",
          "receivedAt",
          "transfer",
          "forOrderNumber"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "sscc": {
            "type": [
              "null",
              "string"
            ]
          },
          "contents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeclaredContentView"
            }
          },
          "received": {
            "type": "boolean"
          },
          "receiptId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "lpn": {
            "type": [
              "null",
              "string"
            ]
          },
          "receivedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "transfer": {
            "type": "boolean"
          },
          "forOrderNumber": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ClientInventoryRow": {
        "required": [
          "warehouseId",
          "lotId",
          "status",
          "onHand",
          "allocated",
          "available"
        ],
        "type": "object",
        "properties": {
          "warehouseId": {
            "type": "string",
            "format": "uuid"
          },
          "lotId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "onHand": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "allocated": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "available": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "lotCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "expiryDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      },
      "ClientInventoryTotal": {
        "required": [
          "sku",
          "itemId",
          "uom",
          "onHand",
          "allocated",
          "available",
          "byStatus"
        ],
        "type": "object",
        "properties": {
          "sku": {
            "type": "string"
          },
          "itemId": {
            "type": "string",
            "format": "uuid"
          },
          "uom": {
            "type": "string"
          },
          "onHand": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "allocated": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "available": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "byStatus": {
            "type": "object",
            "additionalProperties": {
              "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
              "type": [
                "number",
                "string"
              ],
              "format": "double"
            }
          }
        }
      },
      "ClientInventoryView": {
        "required": [
          "sku",
          "itemId",
          "onHand",
          "available",
          "rows"
        ],
        "type": "object",
        "properties": {
          "sku": {
            "type": "string"
          },
          "itemId": {
            "type": "string",
            "format": "uuid"
          },
          "onHand": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "available": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientInventoryRow"
            }
          }
        }
      },
      "ClientInvoiceLineView": {
        "required": [
          "sequence",
          "category",
          "code",
          "description",
          "quantity",
          "unit",
          "rate",
          "amount",
          "taxAmount",
          "chargeCount"
        ],
        "type": "object",
        "properties": {
          "sequence": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "category": {
            "$ref": "#/components/schemas/ChargeCategory"
          },
          "code": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "unit": {
            "type": "string"
          },
          "rate": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "taxAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "chargeCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "basis": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RateBasis"
              }
            ]
          }
        }
      },
      "ClientInvoiceSummary": {
        "required": [
          "id",
          "number",
          "periodStart",
          "periodEnd",
          "status",
          "currency",
          "total",
          "creditedAmount",
          "amountDue",
          "issuedAt",
          "dueDate"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": [
              "null",
              "string"
            ]
          },
          "periodStart": {
            "type": "string",
            "format": "date"
          },
          "periodEnd": {
            "type": "string",
            "format": "date"
          },
          "status": {
            "$ref": "#/components/schemas/InvoiceStatus"
          },
          "currency": {
            "type": "string"
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "creditedAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "amountDue": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "issuedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "dueDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      },
      "ClientInvoiceView": {
        "required": [
          "id",
          "number",
          "periodStart",
          "periodEnd",
          "status",
          "currency",
          "subtotal",
          "taxAmount",
          "total",
          "creditedAmount",
          "amountDue",
          "issuedAt",
          "sentAt",
          "dueDate",
          "billTo",
          "poNumber",
          "notes",
          "rateCardVersions",
          "pdfDocumentId",
          "csvDocumentId",
          "lines",
          "creditNotes"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": [
              "null",
              "string"
            ]
          },
          "periodStart": {
            "type": "string",
            "format": "date"
          },
          "periodEnd": {
            "type": "string",
            "format": "date"
          },
          "status": {
            "$ref": "#/components/schemas/InvoiceStatus"
          },
          "currency": {
            "type": "string"
          },
          "subtotal": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "taxAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "creditedAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "amountDue": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "issuedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "sentAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "dueDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "billTo": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/BillToAddress"
              }
            ]
          },
          "poNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "notes": {
            "type": [
              "null",
              "string"
            ]
          },
          "rateCardVersions": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pdfDocumentId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "csvDocumentId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientInvoiceLineView"
            }
          },
          "creditNotes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientCreditNoteView"
            }
          },
          "voidedBy": {
            "type": [
              "null",
              "string"
            ]
          },
          "timezone": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ClientItemRequest": {
        "required": [
          "sku",
          "name"
        ],
        "type": "object",
        "properties": {
          "sku": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "baseUom": {
            "type": "string",
            "default": "EA"
          },
          "trackLot": {
            "type": "boolean",
            "default": false
          },
          "trackExpiry": {
            "type": "boolean",
            "default": false
          },
          "trackSerial": {
            "type": "boolean",
            "default": false
          },
          "packaging": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ClientPackaging"
            }
          }
        }
      },
      "ClientNoticeLineView": {
        "required": [
          "id",
          "lineNumber",
          "itemId",
          "sku",
          "itemName",
          "expectedQuantity",
          "declaredLotCode",
          "declaredExpiryDate",
          "receivedQuantity",
          "varianceQuantity",
          "varianceType",
          "vendorSku",
          "declaredSerials",
          "declaredSerialsReceived",
          "serialsNotDeclared",
          "declaredSerialsMissing",
          "poNumber",
          "uom"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "lineNumber": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "itemId": {
            "type": "string",
            "format": "uuid"
          },
          "sku": {
            "type": "string"
          },
          "itemName": {
            "type": "string"
          },
          "expectedQuantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "declaredLotCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "declaredExpiryDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "receivedQuantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "varianceQuantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "varianceType": {
            "$ref": "#/components/schemas/VarianceType"
          },
          "vendorSku": {
            "type": [
              "null",
              "string"
            ]
          },
          "declaredSerials": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "declaredSerialsReceived": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "serialsNotDeclared": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "declaredSerialsMissing": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "poNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "uom": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ClientNoticeReceipt": {
        "required": [
          "id",
          "number",
          "kind",
          "status",
          "startedAt",
          "closedAt",
          "lineCount",
          "palletCount"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/ReceiptKind"
          },
          "status": {
            "$ref": "#/components/schemas/ReceiptStatus"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "closedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lineCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "palletCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ClientNoticeView": {
        "required": [
          "id",
          "number",
          "clientId",
          "warehouseId",
          "source",
          "status",
          "expectedArrivalDate",
          "clientReference",
          "vendorName",
          "carrierName",
          "trackingReference",
          "containerNumber",
          "notes",
          "closedAt",
          "lines",
          "receipts",
          "declaredUnits",
          "purchaseOrders"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": "string"
          },
          "clientId": {
            "type": "string",
            "format": "uuid"
          },
          "warehouseId": {
            "type": "string",
            "format": "uuid"
          },
          "source": {
            "$ref": "#/components/schemas/AsnSource"
          },
          "status": {
            "$ref": "#/components/schemas/AsnStatus"
          },
          "expectedArrivalDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "clientReference": {
            "type": [
              "null",
              "string"
            ]
          },
          "vendorName": {
            "type": [
              "null",
              "string"
            ]
          },
          "carrierName": {
            "type": [
              "null",
              "string"
            ]
          },
          "trackingReference": {
            "type": [
              "null",
              "string"
            ]
          },
          "containerNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "notes": {
            "type": [
              "null",
              "string"
            ]
          },
          "closedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientNoticeLineView"
            }
          },
          "receipts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientNoticeReceipt"
            }
          },
          "declaredUnits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientDeclaredPalletView"
            }
          },
          "purchaseOrders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PurchaseOrderView"
            }
          }
        }
      },
      "ClientOrderLine": {
        "required": [
          "sku",
          "quantity"
        ],
        "type": "object",
        "properties": {
          "sku": {
            "type": "string"
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "externalLineId": {
            "type": [
              "null",
              "string"
            ]
          },
          "unitValue": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "ClientOrderPatch": {
        "type": "object",
        "properties": {
          "shipTo": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ClientShipTo"
              }
            ]
          },
          "shipToLocationCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "lines": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ClientOrderLine"
            }
          }
        }
      },
      "ClientOrderRequest": {
        "required": [
          "externalOrderId",
          "lines"
        ],
        "type": "object",
        "properties": {
          "externalOrderId": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientOrderLine"
            }
          },
          "shipTo": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ClientShipTo"
              }
            ]
          },
          "type": {
            "type": "string",
            "default": "Parcel"
          },
          "externalOrderNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestedService": {
            "type": [
              "null",
              "string"
            ]
          },
          "shipByDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "requestedShipDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "customerPoNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "shipToLocationCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "tags": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "notes": {
            "type": [
              "null",
              "string"
            ]
          },
          "giftMessage": {
            "type": [
              "null",
              "string"
            ]
          },
          "declaredValue": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "currency": {
            "type": [
              "null",
              "string"
            ]
          },
          "warehouseId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ClientOrderView": {
        "required": [
          "id",
          "number",
          "clientId",
          "warehouseId",
          "type",
          "source",
          "status",
          "onHold",
          "holdReasonCode",
          "priority",
          "orderedAt",
          "requestedShipDate",
          "shipByDate",
          "cancelAfterDate",
          "shipTo",
          "shipToLocationCode",
          "destinationWarehouseId",
          "customerPoNumber",
          "requestedService",
          "shipComplete",
          "allowBackorder",
          "declaredValue",
          "currency",
          "giftMessage",
          "packingInstructions",
          "notes",
          "tags",
          "salesChannelId",
          "externalOrderId",
          "externalOrderNumber",
          "cancelledAt",
          "cancelReasonCode",
          "shippedAt",
          "lines",
          "shipments",
          "bundles",
          "unmapped",
          "canCancel",
          "canChangeShipTo"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": "string"
          },
          "clientId": {
            "type": "string",
            "format": "uuid"
          },
          "warehouseId": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "$ref": "#/components/schemas/OrderType"
          },
          "source": {
            "$ref": "#/components/schemas/OrderSource"
          },
          "status": {
            "$ref": "#/components/schemas/OrderStatus"
          },
          "onHold": {
            "type": "boolean"
          },
          "holdReasonCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "priority": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "orderedAt": {
            "type": "string",
            "format": "date-time"
          },
          "requestedShipDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "shipByDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "cancelAfterDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "shipTo": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ShipToAddress"
              }
            ]
          },
          "shipToLocationCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "destinationWarehouseId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "customerPoNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestedService": {
            "type": [
              "null",
              "string"
            ]
          },
          "shipComplete": {
            "type": "boolean"
          },
          "allowBackorder": {
            "type": "boolean"
          },
          "declaredValue": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "currency": {
            "type": [
              "null",
              "string"
            ]
          },
          "giftMessage": {
            "type": [
              "null",
              "string"
            ]
          },
          "packingInstructions": {
            "type": [
              "null",
              "string"
            ]
          },
          "notes": {
            "type": [
              "null",
              "string"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "salesChannelId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "externalOrderId": {
            "type": [
              "null",
              "string"
            ]
          },
          "externalOrderNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "cancelledAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "cancelReasonCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "shippedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderLineView"
            }
          },
          "shipments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientShipmentSummary"
            }
          },
          "bundles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderBundleView"
            }
          },
          "unmapped": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UnmappedLineView"
            }
          },
          "canCancel": {
            "type": "boolean"
          },
          "canChangeShipTo": {
            "type": "boolean"
          },
          "heldAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "stockReleasedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "revision": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 0
          },
          "canEditLines": {
            "type": "boolean",
            "default": false
          },
          "holdDetail": {
            "type": [
              "null",
              "string"
            ]
          },
          "changes": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/OrderChangeView"
            }
          },
          "progress": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OrderProgressTimes"
              }
            ]
          }
        }
      },
      "ClientPackageLineView": {
        "required": [
          "orderLineId",
          "itemId",
          "sku",
          "itemName",
          "lotId",
          "lotCode",
          "quantity",
          "serials",
          "uom"
        ],
        "type": "object",
        "properties": {
          "orderLineId": {
            "type": "string",
            "format": "uuid"
          },
          "itemId": {
            "type": "string",
            "format": "uuid"
          },
          "sku": {
            "type": "string"
          },
          "itemName": {
            "type": [
              "null",
              "string"
            ]
          },
          "lotId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "lotCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "serials": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "uom": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ClientPackageView": {
        "required": [
          "id",
          "sequence",
          "kind",
          "status",
          "cartonTypeCode",
          "lengthMm",
          "widthMm",
          "heightMm",
          "weightG",
          "trackingNumber",
          "sscc",
          "lines"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "sequence": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "kind": {
            "$ref": "#/components/schemas/PackageKind"
          },
          "status": {
            "$ref": "#/components/schemas/PackageStatus"
          },
          "cartonTypeCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "lengthMm": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "widthMm": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "heightMm": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "weightG": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "trackingNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "sscc": {
            "type": [
              "null",
              "string"
            ]
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientPackageLineView"
            }
          }
        }
      },
      "ClientPackaging": {
        "required": [
          "level",
          "code",
          "quantityInBase",
          "lengthMm",
          "widthMm",
          "heightMm",
          "weightG"
        ],
        "type": "object",
        "properties": {
          "level": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "quantityInBase": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "lengthMm": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "widthMm": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "heightMm": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "weightG": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "gtin": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ClientReturnLine": {
        "required": [
          "sku",
          "quantity"
        ],
        "type": "object",
        "properties": {
          "sku": {
            "type": "string"
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "reasonCode": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ClientReturnRequest": {
        "required": [
          "lines"
        ],
        "type": "object",
        "properties": {
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientReturnLine"
            }
          },
          "orderNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "returnType": {
            "type": "string",
            "default": "CustomerReturn"
          },
          "reasonCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "trackingNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "carrier": {
            "type": [
              "null",
              "string"
            ]
          },
          "externalReturnId": {
            "type": [
              "null",
              "string"
            ]
          },
          "warehouseId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ClientShipmentSummary": {
        "required": [
          "id",
          "number",
          "mode",
          "status",
          "carrierCode",
          "serviceCode",
          "masterTrackingNumber",
          "packageCount",
          "shippedAt",
          "trackingNumbers"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": "string"
          },
          "mode": {
            "$ref": "#/components/schemas/ShipmentMode"
          },
          "status": {
            "$ref": "#/components/schemas/ShipmentStatus"
          },
          "carrierCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "serviceCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "masterTrackingNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "packageCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "shippedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "trackingNumbers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "orderNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "externalOrderNumber": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ClientShipmentView": {
        "required": [
          "id",
          "number",
          "orderId",
          "orderNumber",
          "clientId",
          "warehouseId",
          "mode",
          "status",
          "carrierCode",
          "serviceCode",
          "masterTrackingNumber",
          "proNumber",
          "bolNumber",
          "shipTo",
          "shippedAt",
          "packages",
          "freightTerms",
          "scac",
          "trailerNumber",
          "sealNumber"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": "string"
          },
          "orderId": {
            "type": "string",
            "format": "uuid"
          },
          "orderNumber": {
            "type": "string"
          },
          "clientId": {
            "type": "string",
            "format": "uuid"
          },
          "warehouseId": {
            "type": "string",
            "format": "uuid"
          },
          "mode": {
            "$ref": "#/components/schemas/ShipmentMode"
          },
          "status": {
            "$ref": "#/components/schemas/ShipmentStatus"
          },
          "carrierCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "serviceCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "masterTrackingNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "proNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "bolNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "shipTo": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ShipToAddress"
              }
            ]
          },
          "shippedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "packages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientPackageView"
            }
          },
          "freightTerms": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/FreightTerms"
              }
            ]
          },
          "scac": {
            "type": [
              "null",
              "string"
            ]
          },
          "trailerNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "sealNumber": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ClientShipTo": {
        "required": [
          "name",
          "line1",
          "city",
          "postalCode",
          "country"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "line1": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "postalCode": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "company": {
            "type": [
              "null",
              "string"
            ]
          },
          "line2": {
            "type": [
              "null",
              "string"
            ]
          },
          "region": {
            "type": [
              "null",
              "string"
            ]
          },
          "phone": {
            "type": [
              "null",
              "string"
            ]
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "residential": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "DeclaredContentView": {
        "required": [
          "itemId",
          "sku",
          "itemName",
          "quantity",
          "lotCode",
          "expiryDate"
        ],
        "type": "object",
        "properties": {
          "itemId": {
            "type": "string",
            "format": "uuid"
          },
          "sku": {
            "type": "string"
          },
          "itemName": {
            "type": "string"
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "lotCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "expiryDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "serials": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "DispositionAction": {
        "enum": [
          "RestockAvailable",
          "RestockHold",
          "Refurbish",
          "Scrap",
          "ReturnToClient",
          "AwaitClientDecision"
        ]
      },
      "DispositionStatus": {
        "enum": [
          "Pending",
          "Executed",
          "Overridden"
        ]
      },
      "FreightTerms": {
        "enum": [
          "Prepaid",
          "Collect",
          "ThirdParty",
          null
        ]
      },
      "Grade": {
        "enum": [
          "A",
          "B",
          "C",
          "D"
        ]
      },
      "HouseCoverItem": {
        "required": [
          "houseItemId",
          "sku",
          "name",
          "unitCost"
        ],
        "type": "object",
        "properties": {
          "houseItemId": {
            "type": "string",
            "format": "uuid"
          },
          "sku": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "unitCost": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "InvoiceStatus": {
        "enum": [
          "Draft",
          "Issued",
          "Sent",
          "Paid",
          "PartiallyPaid",
          "Void"
        ]
      },
      "ItemCustoms": {
        "required": [
          "itemId",
          "description",
          "hsCode",
          "origin"
        ],
        "type": "object",
        "properties": {
          "itemId": {
            "type": "string",
            "format": "uuid"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "hsCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "origin": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ItemDetail": {
        "required": [
          "summary",
          "packagings",
          "barcodes",
          "temperatureClass",
          "rotationRule"
        ],
        "type": "object",
        "properties": {
          "summary": {
            "$ref": "#/components/schemas/ItemSummary"
          },
          "packagings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PackagingSummary"
            }
          },
          "barcodes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "temperatureClass": {
            "$ref": "#/components/schemas/TemperatureClass"
          },
          "rotationRule": {
            "$ref": "#/components/schemas/RotationRule"
          },
          "freight": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ItemFreight"
              }
            ]
          },
          "coverFromHouse": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/HouseCoverItem"
              }
            ]
          },
          "materialUnitCost": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "declaredUnitValue": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "customs": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ItemCustoms"
              }
            ]
          }
        }
      },
      "ItemFreight": {
        "required": [
          "itemId",
          "nmfcNumber",
          "freightClass",
          "isHazmat",
          "hazmatClass",
          "unNumber",
          "hazmatShippingName",
          "packingGroup",
          "emergencyPhone"
        ],
        "type": "object",
        "properties": {
          "itemId": {
            "type": "string",
            "format": "uuid"
          },
          "nmfcNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "freightClass": {
            "type": [
              "null",
              "string"
            ]
          },
          "isHazmat": {
            "type": "boolean"
          },
          "hazmatClass": {
            "type": [
              "null",
              "string"
            ]
          },
          "unNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "hazmatShippingName": {
            "type": [
              "null",
              "string"
            ]
          },
          "packingGroup": {
            "type": [
              "null",
              "string"
            ]
          },
          "emergencyPhone": {
            "type": [
              "null",
              "string"
            ]
          },
          "hazmatDescription": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ItemStatus": {
        "enum": [
          "Draft",
          "Active",
          "Discontinued"
        ]
      },
      "ItemSummary": {
        "required": [
          "id",
          "clientId",
          "sku",
          "name",
          "status",
          "baseUom",
          "trackLot",
          "trackExpiry",
          "trackSerial",
          "isKit"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "clientId": {
            "type": "string",
            "format": "uuid"
          },
          "sku": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ItemStatus"
          },
          "baseUom": {
            "type": "string"
          },
          "trackLot": {
            "type": "boolean"
          },
          "trackExpiry": {
            "type": "boolean"
          },
          "trackSerial": {
            "type": "boolean"
          },
          "isKit": {
            "type": "boolean"
          },
          "serialCapture": {
            "$ref": "#/components/schemas/SerialCapture"
          },
          "serialMask": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "NoticeSummary": {
        "required": [
          "id",
          "number",
          "clientId",
          "warehouseId",
          "source",
          "status",
          "expectedArrivalDate",
          "clientReference",
          "vendorName",
          "lineCount",
          "linesReceived",
          "linesOver",
          "linesShort"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": "string"
          },
          "clientId": {
            "type": "string",
            "format": "uuid"
          },
          "warehouseId": {
            "type": "string",
            "format": "uuid"
          },
          "source": {
            "$ref": "#/components/schemas/AsnSource"
          },
          "status": {
            "$ref": "#/components/schemas/AsnStatus"
          },
          "expectedArrivalDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "clientReference": {
            "type": [
              "null",
              "string"
            ]
          },
          "vendorName": {
            "type": [
              "null",
              "string"
            ]
          },
          "lineCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "linesReceived": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "linesOver": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "linesShort": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "carrierName": {
            "type": [
              "null",
              "string"
            ]
          },
          "receiptCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 0
          },
          "latestReceiptId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "latestReceiptNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "poCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 0
          },
          "updatedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "OrderBundleView": {
        "required": [
          "id",
          "bundleId",
          "sku",
          "name",
          "quantity",
          "shipped",
          "cancelled",
          "externalLineId",
          "externalSku",
          "unitValue"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "bundleId": {
            "type": "string",
            "format": "uuid"
          },
          "sku": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "shipped": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "cancelled": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "externalLineId": {
            "type": [
              "null",
              "string"
            ]
          },
          "externalSku": {
            "type": [
              "null",
              "string"
            ]
          },
          "unitValue": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "requestedQuantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double",
            "default": 0
          }
        }
      },
      "OrderChangeView": {
        "required": [
          "at",
          "by",
          "text"
        ],
        "type": "object",
        "properties": {
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "by": {
            "type": [
              "null",
              "string"
            ]
          },
          "text": {
            "type": "string"
          }
        }
      },
      "OrderLineStatus": {
        "enum": [
          "Open",
          "Backordered",
          "Cancelled",
          "Shipped"
        ]
      },
      "OrderLineView": {
        "required": [
          "id",
          "lineNumber",
          "itemId",
          "sku",
          "itemName",
          "orderedQuantity",
          "orderedPackagingId",
          "allocatedQuantity",
          "pickedQuantity",
          "packedQuantity",
          "shippedQuantity",
          "cancelledQuantity",
          "requestedLotId",
          "minRemainingShelfLifeDays",
          "unitValue",
          "status",
          "externalLineId",
          "externalSku"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "lineNumber": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "itemId": {
            "type": "string",
            "format": "uuid"
          },
          "sku": {
            "type": "string"
          },
          "itemName": {
            "type": "string"
          },
          "orderedQuantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "orderedPackagingId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "allocatedQuantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "pickedQuantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "packedQuantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "shippedQuantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "cancelledQuantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "requestedLotId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "minRemainingShelfLifeDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "unitValue": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "status": {
            "$ref": "#/components/schemas/OrderLineStatus"
          },
          "externalLineId": {
            "type": [
              "null",
              "string"
            ]
          },
          "externalSku": {
            "type": [
              "null",
              "string"
            ]
          },
          "bundleLineId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "quantityPerBundle": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "uom": {
            "type": [
              "null",
              "string"
            ]
          },
          "waitingForPallet": {
            "type": "boolean",
            "default": false
          },
          "requestedQuantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double",
            "default": 0
          }
        }
      },
      "OrderProgressTimes": {
        "required": [
          "allocatedAt",
          "releasedAt",
          "pickedAt",
          "packedAt"
        ],
        "type": "object",
        "properties": {
          "allocatedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "releasedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "pickedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "packedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "OrderSource": {
        "enum": [
          "Shopify",
          "Amazon",
          "Portal",
          "Edi",
          "Api",
          "Manual",
          "Returns"
        ]
      },
      "OrderStatus": {
        "enum": [
          "Draft",
          "Open",
          "PartiallyAllocated",
          "Allocated",
          "Released",
          "Picking",
          "Picked",
          "Packing",
          "Packed",
          "PartiallyShipped",
          "Shipped",
          "Cancelled"
        ]
      },
      "OrderSummary": {
        "required": [
          "id",
          "number",
          "clientId",
          "warehouseId",
          "type",
          "source",
          "status",
          "onHold",
          "holdReasonCode",
          "priority",
          "orderedAt",
          "shipByDate",
          "requestedService",
          "externalOrderNumber",
          "shipToName",
          "lineCount",
          "linesShipped"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": "string"
          },
          "clientId": {
            "type": "string",
            "format": "uuid"
          },
          "warehouseId": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "$ref": "#/components/schemas/OrderType"
          },
          "source": {
            "$ref": "#/components/schemas/OrderSource"
          },
          "status": {
            "$ref": "#/components/schemas/OrderStatus"
          },
          "onHold": {
            "type": "boolean"
          },
          "holdReasonCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "priority": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "orderedAt": {
            "type": "string",
            "format": "date-time"
          },
          "shipByDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "requestedService": {
            "type": [
              "null",
              "string"
            ]
          },
          "externalOrderNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "shipToName": {
            "type": [
              "null",
              "string"
            ]
          },
          "lineCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "linesShipped": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "destinationWarehouseId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "heldAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "OrderType": {
        "enum": [
          "B2B",
          "Parcel",
          "Transfer"
        ]
      },
      "PackageKind": {
        "enum": [
          "Carton",
          "Pallet"
        ]
      },
      "PackageStatus": {
        "enum": [
          "Open",
          "Closed",
          "Labeled",
          "Shipped"
        ]
      },
      "PackagingLevel": {
        "enum": [
          "Base",
          "Inner",
          "Case",
          "Pallet"
        ]
      },
      "PackagingSummary": {
        "required": [
          "id",
          "level",
          "code",
          "quantityInBase",
          "lengthMm",
          "widthMm",
          "heightMm",
          "weightG",
          "gtin"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "level": {
            "$ref": "#/components/schemas/PackagingLevel"
          },
          "code": {
            "type": "string"
          },
          "quantityInBase": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "lengthMm": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "widthMm": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "heightMm": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "weightG": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "gtin": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "detail": {
            "type": [
              "null",
              "string"
            ]
          },
          "instance": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PurchaseOrderView": {
        "required": [
          "poNumber",
          "lines",
          "linesReceived",
          "linesOver",
          "linesShort"
        ],
        "type": "object",
        "properties": {
          "poNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "lines": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "linesReceived": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "linesOver": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "linesShort": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "RateBasis": {
        "enum": [
          "PerPallet",
          "PerCase",
          "PerUnit",
          "PerOrder",
          "PerLine",
          "PerPackage",
          "PerPalletDay",
          "PerCubicFootMonth",
          "PerLocationMonth",
          "PerHour",
          "Flat",
          "MarkupPercent",
          "CycleMinimum",
          "FixedPerPeriod",
          null
        ]
      },
      "ReceiptKind": {
        "enum": [
          "Standard",
          "Return"
        ]
      },
      "ReceiptStatus": {
        "enum": [
          "Open",
          "Closed",
          "Cancelled"
        ]
      },
      "ReturnClientView": {
        "required": [
          "id",
          "number",
          "clientId",
          "warehouseId",
          "source",
          "externalReturnId",
          "orderId",
          "orderNumber",
          "returnType",
          "reasonCode",
          "status",
          "inboundTrackingNumber",
          "inboundCarrier",
          "expiresAt",
          "notes",
          "receiptNumber",
          "receivedAt",
          "closedAt",
          "receivingClosedAt",
          "lines",
          "grades",
          "timezone"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": "string"
          },
          "clientId": {
            "type": "string",
            "format": "uuid"
          },
          "warehouseId": {
            "type": "string",
            "format": "uuid"
          },
          "source": {
            "$ref": "#/components/schemas/ReturnSource"
          },
          "externalReturnId": {
            "type": [
              "null",
              "string"
            ]
          },
          "orderId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "orderNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "returnType": {
            "$ref": "#/components/schemas/ReturnType"
          },
          "reasonCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/ReturnStatus"
          },
          "inboundTrackingNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "inboundCarrier": {
            "type": [
              "null",
              "string"
            ]
          },
          "expiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "notes": {
            "type": [
              "null",
              "string"
            ]
          },
          "receiptNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "receivedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "closedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "receivingClosedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturnLineView"
            }
          },
          "grades": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturnGradeClientView"
            }
          },
          "timezone": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ReturnGradeClientView": {
        "required": [
          "id",
          "returnLineId",
          "itemId",
          "sku",
          "quantity",
          "serials",
          "grade",
          "conditionReasonCode",
          "checklistAnswers",
          "notes",
          "photos",
          "action",
          "status",
          "waitsForClient",
          "gradedAt",
          "decisionNote"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "returnLineId": {
            "type": "string",
            "format": "uuid"
          },
          "itemId": {
            "type": "string",
            "format": "uuid"
          },
          "sku": {
            "type": "string"
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "serials": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "grade": {
            "$ref": "#/components/schemas/Grade"
          },
          "conditionReasonCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "checklistAnswers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "notes": {
            "type": [
              "null",
              "string"
            ]
          },
          "photos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturnPhotoClientView"
            }
          },
          "action": {
            "$ref": "#/components/schemas/DispositionAction"
          },
          "status": {
            "$ref": "#/components/schemas/DispositionStatus"
          },
          "waitsForClient": {
            "type": "boolean"
          },
          "gradedAt": {
            "type": "string",
            "format": "date-time"
          },
          "decisionNote": {
            "type": [
              "null",
              "string"
            ]
          },
          "held": {
            "type": "boolean",
            "default": false
          },
          "shipBack": {
            "type": [
              "null",
              "string"
            ]
          },
          "shipBackOrderNumber": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ReturnLineStatus": {
        "enum": [
          "Expected",
          "Received",
          "NotReceived",
          "Closed"
        ]
      },
      "ReturnLineView": {
        "required": [
          "id",
          "lineNumber",
          "itemId",
          "sku",
          "itemName",
          "orderLineId",
          "expectedQuantity",
          "receivedQuantity",
          "reasonCode",
          "status"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "lineNumber": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "itemId": {
            "type": "string",
            "format": "uuid"
          },
          "sku": {
            "type": "string"
          },
          "itemName": {
            "type": "string"
          },
          "orderLineId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "expectedQuantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "receivedQuantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "reasonCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/ReturnLineStatus"
          },
          "uom": {
            "type": "string",
            "default": ""
          }
        }
      },
      "ReturnPhotoClientView": {
        "required": [
          "id",
          "fileName",
          "contentType"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "fileName": {
            "type": [
              "null",
              "string"
            ]
          },
          "contentType": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ReturnSource": {
        "enum": [
          "Shopify",
          "Amazon",
          "Portal",
          "Api",
          "Manual",
          "Blind"
        ]
      },
      "ReturnStatus": {
        "enum": [
          "Expected",
          "Received",
          "Inspecting",
          "Closed",
          "Cancelled"
        ]
      },
      "ReturnType": {
        "enum": [
          "CustomerReturn",
          "RetailerReturn",
          "CarrierUndeliverable",
          "Recall"
        ]
      },
      "RotationRule": {
        "enum": [
          "FIFO",
          "FEFO",
          "LIFO",
          "None"
        ]
      },
      "SerialCapture": {
        "enum": [
          "None",
          "AtShipment",
          "AtReceipt"
        ],
        "default": "None"
      },
      "ShipmentMode": {
        "enum": [
          "Parcel",
          "LTL",
          "FTL",
          "Pickup",
          "Transfer"
        ]
      },
      "ShipmentStatus": {
        "enum": [
          "Open",
          "Packed",
          "Rated",
          "Labeled",
          "Staged",
          "Shipped",
          "Cancelled",
          "Voided"
        ]
      },
      "ShipToAddress": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "company": {
            "type": [
              "null",
              "string"
            ]
          },
          "line1": {
            "type": "string"
          },
          "line2": {
            "type": [
              "null",
              "string"
            ]
          },
          "city": {
            "type": "string"
          },
          "region": {
            "type": [
              "null",
              "string"
            ]
          },
          "postalCode": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "phone": {
            "type": [
              "null",
              "string"
            ]
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "residential": {
            "type": "boolean"
          },
          "erasedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "isComplete": {
            "type": "boolean"
          }
        }
      },
      "TemperatureClass": {
        "enum": [
          "Ambient",
          "Chilled",
          "Frozen"
        ]
      },
      "UnmappedLineView": {
        "required": [
          "id",
          "externalLineId",
          "externalVariantId",
          "externalSku",
          "title",
          "quantity",
          "unitValue"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "externalLineId": {
            "type": [
              "null",
              "string"
            ]
          },
          "externalVariantId": {
            "type": [
              "null",
              "string"
            ]
          },
          "externalSku": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": "string"
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "unitValue": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "VarianceType": {
        "enum": [
          "None",
          "Short",
          "Over"
        ]
      },
      "WebhookEventView": {
        "required": [
          "sequence",
          "eventId",
          "kind",
          "occurredAt",
          "deliveryStatus",
          "deliveredAt",
          "payload"
        ],
        "type": "object",
        "properties": {
          "sequence": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "eventId": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "deliveryStatus": {
            "$ref": "#/components/schemas/AttemptStatus"
          },
          "deliveredAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "payload": {
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "http",
        "description": "An API key from the client portal, Users > API and webhooks, sent as `Authorization: Bearer <key>`.",
        "scheme": "bearer"
      }
    }
  },
  "security": [
    {
      "ApiKey": [ ]
    }
  ],
  "tags": [
    {
      "name": "Client API"
    }
  ]
}