{
  "openapi": "3.0.1",
  "info": {
    "title": "Codewolf Control API Reference",
    "description": "Codewolf API Support for Control Application",
    "version": "V1"
  },
  "paths": {
    "/account": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get account profile",
        "description": "Retrieves your account profile information including branding, tax settings, and shipping preferences.",
        "responses": {
          "200": {
            "description": "Account profile retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_AccountProfile"
                }
              }
            }
          },
          "401": {
            "description": "User is not authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Account not found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/account/address": {
      "patch": {
        "tags": [
          "Account"
        ],
        "summary": "Update entity (company) address",
        "description": "Updates the entity (company) street address associated with this account.\r\nThis is a partial update — only fields provided in the request will be updated.\r\nRequires CustomerAdmin or SuperUser role.",
        "requestBody": {
          "description": "Address fields to update (partial update)",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_UpdateEntityAddressRequest"
                  }
                ],
                "description": "Request to update the entity (company) address for a customer account.\r\nAll fields are optional — only non-null fields will be updated (PATCH semantics)."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_UpdateEntityAddressRequest"
                  }
                ],
                "description": "Request to update the entity (company) address for a customer account.\r\nAll fields are optional — only non-null fields will be updated (PATCH semantics)."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_UpdateEntityAddressRequest"
                  }
                ],
                "description": "Request to update the entity (company) address for a customer account.\r\nAll fields are optional — only non-null fields will be updated (PATCH semantics)."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_UpdateEntityAddressRequest"
                  }
                ],
                "description": "Request to update the entity (company) address for a customer account.\r\nAll fields are optional — only non-null fields will be updated (PATCH semantics)."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Address updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_EntityAddressDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request data",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "User is not authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No entity address found for this account",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/account/user": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get current user profile",
        "description": "Retrieves your user profile information including contact details, preferences, and notification settings.",
        "responses": {
          "200": {
            "description": "User profile retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_AccountUserInfo"
                }
              }
            }
          },
          "401": {
            "description": "User is not authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      },
      "patch": {
        "tags": [
          "Account"
        ],
        "summary": "Update current user profile (self-service)",
        "description": "Updates your own user profile information. This is a partial update - only fields\r\nprovided in the request will be updated.\r\n            \r\n**Editable fields:**\r\n- FirstName, LastName\r\n- EmailAddress\r\n- Phone, Mobile\r\n- Address fields (StreetAddress, AddressLine2, Suburb, City, State, PostalCode, Country)\r\n            \r\n**Profile vs Address Updates:**\r\n- You can update profile fields (name, email, phone) independently without providing address fields\r\n- You can update address fields independently without providing profile fields\r\n- Or update both together in a single request\r\n            \r\n**Note:** Username cannot be changed after user creation.",
        "requestBody": {
          "description": "User details to update (partial update)",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_UpdateUserRequest"
                  }
                ],
                "description": "Request to update an existing customer user (partial update)"
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_UpdateUserRequest"
                  }
                ],
                "description": "Request to update an existing customer user (partial update)"
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_UpdateUserRequest"
                  }
                ],
                "description": "Request to update an existing customer user (partial update)"
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_UpdateUserRequest"
                  }
                ],
                "description": "Request to update an existing customer user (partial update)"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "User profile updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_AccountUserInfo"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request data",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "User is not authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/account/users": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get list of users in organization",
        "description": "Retrieves a paginated list of all users in your organization. Only available to customer administrators.\r\nSupports filtering by active status, text search, sorting, and pagination.",
        "parameters": [
          {
            "name": "includeInactive",
            "in": "query",
            "description": "Include inactive users (default: false)",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number, 1-based (default: 1)",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "Number of records per page (default: 50)",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "description": "Column to sort by (default: LastName). Valid values: LastName, FirstName, UserName, Email, LastLoginUtc, LoginCount",
            "schema": {
              "type": "string",
              "default": "LastName"
            }
          },
          {
            "name": "sortDirection",
            "in": "query",
            "description": "Sort direction: ASC or DESC (default: ASC)",
            "schema": {
              "type": "string",
              "default": "ASC"
            }
          },
          {
            "name": "textFilter",
            "in": "query",
            "description": "Optional text filter to search username, first name, last name, or email",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User list retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedDataOf1Codewolf_Ctrl_Api_Dto_Api_AccountUserSummary"
                }
              }
            }
          },
          "401": {
            "description": "User is not authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "User does not have admin privileges",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Create a new user in your organization",
        "description": "Creates a new user within the authenticated customer's organization.\r\nOnly available to customer administrators.\r\n            \r\n**Required fields:**\r\n- FirstName, LastName\r\n- EmailAddress (must be unique)\r\n- UserName (must be unique, alphanumeric and @ only)\r\n- Phone\r\n- City, PostalCode\r\n            \r\n**Optional fields:**\r\n- Mobile\r\n- StreetAddress, AddressLine2, Suburb, State\r\n- Country (defaults to tenant's configured country if not provided)",
        "requestBody": {
          "description": "User details for creation",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_CreateUserRequest"
                  }
                ],
                "description": "Request to create a new customer user"
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_CreateUserRequest"
                  }
                ],
                "description": "Request to create a new customer user"
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_CreateUserRequest"
                  }
                ],
                "description": "Request to create a new customer user"
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_CreateUserRequest"
                  }
                ],
                "description": "Request to create a new customer user"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "User created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_AccountUserInfo"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request data or username already exists",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "User is not authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "User does not have CustomerAdmin role",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/account/users/{userId}": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get specific user details by user ID.\r\nValidates that the user belongs to the authenticated customer's organization.",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "User ID to retrieve",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the user details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_AccountUserInfo"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - user not authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - user does not have CustomerAdmin role",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found - user does not exist or does not belong to the customer",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      },
      "patch": {
        "tags": [
          "Account"
        ],
        "summary": "Update an existing user in your organization",
        "description": "Updates an existing user within the authenticated customer's organization.\r\nOnly available to customer administrators. This is a partial update - only fields\r\nprovided in the request will be updated.\r\n            \r\n**Editable fields:**\r\n- FirstName, LastName\r\n- EmailAddress\r\n- Phone, Mobile\r\n- Address fields (StreetAddress, AddressLine2, Suburb, City, State, PostalCode, Country)\r\n            \r\n**Profile vs Address Updates:**\r\n- You can update profile fields (name, email, phone) independently without providing address fields\r\n- You can update address fields independently without providing profile fields\r\n- Or update both together in a single request\r\n            \r\n**Note:** Username cannot be changed after user creation.",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "User ID to update",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "User details to update (partial update)",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_UpdateUserRequest"
                  }
                ],
                "description": "Request to update an existing customer user (partial update)"
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_UpdateUserRequest"
                  }
                ],
                "description": "Request to update an existing customer user (partial update)"
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_UpdateUserRequest"
                  }
                ],
                "description": "Request to update an existing customer user (partial update)"
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_UpdateUserRequest"
                  }
                ],
                "description": "Request to update an existing customer user (partial update)"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "User updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_AccountUserInfo"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request data",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "User is not authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "User does not have CustomerAdmin role",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "User not found or does not belong to the customer",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Deactivate (soft delete) a user in your organization",
        "description": "Deactivates a user within the authenticated customer's organization.\r\nOnly available to customer administrators.\r\n            \r\n**Important Notes:**\r\n- This is a soft delete (sets Active = false). The user record is preserved for audit history.\r\n- Deactivated users cannot log in.\r\n- Deactivated users will no longer appear in active user lists.",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "User ID to deactivate",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "User deactivated successfully"
          },
          "401": {
            "description": "User is not authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "User does not have CustomerAdmin role",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "User not found or does not belong to the customer",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/account/transactions": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get payment transaction history",
        "description": "Retrieves a paginated list of payment transactions for the authenticated customer.\r\nIncludes card details (masked), amounts, and transaction status.",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number, 1-based (default: 1)",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "Number of records per page (default: 20)",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "description": "Column to sort by (default: Id). Valid values: Id, CreatedAt, CompletedAt, AmountSettlement",
            "schema": {
              "type": "string",
              "default": "Id"
            }
          },
          {
            "name": "sortDirection",
            "in": "query",
            "description": "Sort direction: ASC or DESC (default: DESC)",
            "schema": {
              "type": "string",
              "default": "DESC"
            }
          },
          {
            "name": "completedOnly",
            "in": "query",
            "description": "Filter to show only completed transactions (default: false)",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "textFilter",
            "in": "query",
            "description": "Optional text filter to search transaction details",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Transaction list retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedDataOf1Codewolf_Ctrl_Api_Dto_Api_PaymentTransaction"
                }
              }
            }
          },
          "401": {
            "description": "User is not authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/account/shipment-settings": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get shipment settings",
        "description": "Retrieves shipment configuration for your organization.",
        "responses": {
          "200": {
            "description": "Shipment settings retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_ShipmentSettings"
                }
              }
            }
          },
          "401": {
            "description": "User is not authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Customer config not found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      },
      "patch": {
        "tags": [
          "Account"
        ],
        "summary": "Update shipment settings",
        "description": "Updates shipment configuration for your organization.",
        "requestBody": {
          "description": "Updated shipment settings",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_UpdateShipmentSettings"
                  }
                ],
                "description": "Model for updating customer shipment settings.\r\nAll fields are optional - only provided fields will be updated."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_UpdateShipmentSettings"
                  }
                ],
                "description": "Model for updating customer shipment settings.\r\nAll fields are optional - only provided fields will be updated."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_UpdateShipmentSettings"
                  }
                ],
                "description": "Model for updating customer shipment settings.\r\nAll fields are optional - only provided fields will be updated."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_UpdateShipmentSettings"
                  }
                ],
                "description": "Model for updating customer shipment settings.\r\nAll fields are optional - only provided fields will be updated."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Shipment settings updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_ShipmentSettings"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request data",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "User is not authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Customer config not found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/account/tax-certificates": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get tax exemption certificates",
        "description": "Retrieves a list of all tax exemption certificates for the authenticated customer.\r\nReturns only active (non-deleted) certificates by default. Set includeDeleted=true to view deleted certificates.",
        "parameters": [
          {
            "name": "includeDeleted",
            "in": "query",
            "description": "Include deleted certificates in results (default: false)",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tax certificates retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_TaxCertificate"
                  }
                }
              }
            }
          },
          "401": {
            "description": "User is not authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Create a new tax exemption certificate",
        "description": "Creates a new tax exemption certificate with file upload.\r\n            \r\n**Important Notes:**\r\n- Only one active certificate per state is allowed. Creating a new certificate for a state will archive the existing one.\r\n- ExemptionType must be one of: \"Resale\", \"Direct Pay Permit\", \"Ag/Industrial/Manufacturing\", \"Non-Profit\"\r\n- ExemptionState must be a two-letter uppercase state code (e.g., \"CA\", \"TX\")\r\n- BusinessName typically matches the customer's company name\r\n- Certificate file is REQUIRED (PDF, JPG, PNG) - this is the legal document proving the exemption\r\n            \r\n**Request Format:** multipart/form-data",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "BusinessName",
                  "CertificateFile",
                  "ExemptionNumber",
                  "ExemptionState",
                  "ExemptionType",
                  "Name"
                ],
                "type": "object",
                "properties": {
                  "Name": {
                    "maxLength": 255,
                    "type": "string",
                    "description": "Contact name on certificate"
                  },
                  "BusinessName": {
                    "maxLength": 255,
                    "type": "string",
                    "description": "Business name on certificate (usually matches account name)"
                  },
                  "ExemptionNumber": {
                    "maxLength": 100,
                    "type": "string",
                    "description": "Certificate/exemption number"
                  },
                  "EmployerIdentificationNumber": {
                    "maxLength": 50,
                    "type": "string",
                    "description": "Employer Identification Number (EIN/Tax ID) - optional"
                  },
                  "BusinessEntityId": {
                    "maxLength": 50,
                    "type": "string",
                    "description": "Business entity ID - optional"
                  },
                  "LicenseExpiryDate": {
                    "type": "string",
                    "description": "License expiry date - optional",
                    "format": "date-time"
                  },
                  "ExemptionType": {
                    "maxLength": 100,
                    "type": "string",
                    "description": "Type of exemption (e.g., \"Resale\", \"Manufacturing\", \"Non-Profit\")"
                  },
                  "ExemptionState": {
                    "maxLength": 50,
                    "type": "string",
                    "description": "State where exemption applies (e.g., \"CA\", \"TX\")\r\nTwo-letter state code or \"Other\""
                  },
                  "CertificateFile": {
                    "type": "string",
                    "description": "Certificate file upload: a PDF, JPG or PNG of up to 25 MB",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "Name": {
                  "style": "form"
                },
                "BusinessName": {
                  "style": "form"
                },
                "ExemptionNumber": {
                  "style": "form"
                },
                "EmployerIdentificationNumber": {
                  "style": "form"
                },
                "BusinessEntityId": {
                  "style": "form"
                },
                "LicenseExpiryDate": {
                  "style": "form"
                },
                "ExemptionType": {
                  "style": "form"
                },
                "ExemptionState": {
                  "style": "form"
                },
                "CertificateFile": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Certificate created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_TaxCertificate"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request data or validation error",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "User is not authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/Assets/{assetTag}": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Gets an individual Assets information",
        "description": "SuperUser callers additionally receive an `attributes` object holding the asset's\r\nfree-form AssetAttributes name/value pairs. For any other caller the key is omitted entirely.",
        "parameters": [
          {
            "name": "assetTag",
            "in": "path",
            "description": "A valid AssetTag",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_AssetDtos_AssetDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Api_Support_AssetDtos_AssetExtendedDto"
                    }
                  ],
                  "description": "Describes an Asset Dtos"
                }
              },
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_AssetDtos_AssetDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Api_Support_AssetDtos_AssetExtendedDto"
                    }
                  ],
                  "description": "Describes an Asset Dtos"
                }
              },
              "text/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_AssetDtos_AssetDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Api_Support_AssetDtos_AssetExtendedDto"
                    }
                  ],
                  "description": "Describes an Asset Dtos"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      },
      "patch": {
        "tags": [
          "Assets"
        ],
        "summary": "Patch asset details",
        "parameters": [
          {
            "name": "assetTag",
            "in": "path",
            "description": "The asset tag to update",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The patch data containing fields to update. Only non-null fields are updated.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_PatchAssetDto"
                  }
                ],
                "description": "DTO for patching asset details"
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_PatchAssetDto"
                  }
                ],
                "description": "DTO for patching asset details"
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_PatchAssetDto"
                  }
                ],
                "description": "DTO for patching asset details"
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_PatchAssetDto"
                  }
                ],
                "description": "DTO for patching asset details"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Asset details updated successfully",
            "content": {
              "text/plain": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_AssetDtos_AssetDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Api_Support_AssetDtos_AssetExtendedDto"
                    }
                  ],
                  "description": "Describes an Asset Dtos"
                }
              },
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_AssetDtos_AssetDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Api_Support_AssetDtos_AssetExtendedDto"
                    }
                  ],
                  "description": "Describes an Asset Dtos"
                }
              },
              "text/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_AssetDtos_AssetDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Api_Support_AssetDtos_AssetExtendedDto"
                    }
                  ],
                  "description": "Describes an Asset Dtos"
                }
              }
            }
          },
          "404": {
            "description": "Asset not found",
            "content": {
              "text/plain": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Assets": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Gets all of the Assets",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "The page number",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "The size of the Page in rows",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 25
            }
          },
          {
            "name": "sortColumn",
            "in": "query",
            "description": "Column to sort by",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Enums_AssetSortColumn"
                }
              ],
              "default": "AssetTag"
            }
          },
          {
            "name": "sortDirection",
            "in": "query",
            "description": "Sort direction (ascending or descending)",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Enums_SortDirection"
                }
              ],
              "default": "Ascending"
            }
          },
          {
            "name": "includeProcesses",
            "in": "query",
            "description": "(optional)If passed, can contain a list of Process codes to include (comma separated)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "excludeProcesses",
            "in": "query",
            "description": "(optional)If passed, can contain a list of Process codes to exclude (comma separated)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "description": "(optional)Matches assets whose indexed text contains every word given, in any order. Longer words match as a prefix; short words must match a whole word. Mid-word fragments do not match.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "isArchived",
            "in": "query",
            "description": "(optional)If true, returns only archived assets. If false, only non-archived. If omitted, returns both.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "priceCodeContains",
            "in": "query",
            "description": "(optional)Comma-separated case-insensitive substrings. Asset is included if its PriceCode contains ANY of them. NULL PriceCodes are excluded.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "priceCodeNotContains",
            "in": "query",
            "description": "(optional)Comma-separated case-insensitive substrings. Asset is included if its PriceCode contains NONE of them, including assets with NULL PriceCode.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeLastUsed",
            "in": "query",
            "description": "(optional)When true, each asset carries the date and job number it was last used on. Implied when sorting by LastUsed. When omitted, neither field is returned.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PagedDataOf1Codewolf_Ctrl_Api_Dtos_Api_AssetListDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedDataOf1Codewolf_Ctrl_Api_Dtos_Api_AssetListDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedDataOf1Codewolf_Ctrl_Api_Dtos_Api_AssetListDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "Assets"
        ],
        "summary": "Mint a new Codewolf asset directly (server-to-server). Mirrors the asset-creation side of POST /Jobs/shop\r\nPriceCode lines, minus the job. When `externalArtworkUrl` is supplied, an artwork-download message is\r\nqueued and the file is attached to the asset asynchronously by a background worker. Alternatively the caller\r\ncan POST the bytes directly to `/Assets/{assetTag}/files`.",
        "parameters": [
          {
            "name": "X-Application-Name",
            "in": "header",
            "description": "Optional caller identifier, mirrors the X-Application-Name header used by /Jobs/shop",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Create-asset payload (customer id, price code, attributes, optional external artwork url, etc.)",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_CreateAssetRequestDto"
                  }
                ],
                "description": "Request body for POST /Assets — mint a new Codewolf asset directly (no job).\r\nThe asset is built from the same PriceCode shape that `/Jobs/shop` consumes\r\nfor job lines, minus everything that is jobline-specific."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_CreateAssetRequestDto"
                  }
                ],
                "description": "Request body for POST /Assets — mint a new Codewolf asset directly (no job).\r\nThe asset is built from the same PriceCode shape that `/Jobs/shop` consumes\r\nfor job lines, minus everything that is jobline-specific."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_CreateAssetRequestDto"
                  }
                ],
                "description": "Request body for POST /Assets — mint a new Codewolf asset directly (no job).\r\nThe asset is built from the same PriceCode shape that `/Jobs/shop` consumes\r\nfor job lines, minus everything that is jobline-specific."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_CreateAssetRequestDto"
                  }
                ],
                "description": "Request body for POST /Assets — mint a new Codewolf asset directly (no job).\r\nThe asset is built from the same PriceCode shape that `/Jobs/shop` consumes\r\nfor job lines, minus everything that is jobline-specific."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_CreateAssetResponseDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_CreateAssetResponseDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_CreateAssetResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Assets/global": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Gets all of the Global Assets",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "The page number",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "The size of the Page in rows",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 25
            }
          },
          {
            "name": "sortColumn",
            "in": "query",
            "description": "Column to sort by",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Enums_AssetSortColumn"
                }
              ],
              "default": "AssetTag"
            }
          },
          {
            "name": "sortDirection",
            "in": "query",
            "description": "Sort direction (ascending or descending)",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Enums_SortDirection"
                }
              ],
              "default": "Ascending"
            }
          },
          {
            "name": "includeProcesses",
            "in": "query",
            "description": "(optional)If passed, can contain a list of Process codes to include (comma separated)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "excludeProcesses",
            "in": "query",
            "description": "(optional)If passed, can contain a list of Process codes to exclude (comma separated)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "description": "(optional)Matches assets whose indexed text contains every word given, in any order. Longer words match as a prefix; short words must match a whole word. Mid-word fragments do not match.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "isArchived",
            "in": "query",
            "description": "(optional)If true, returns only archived assets. If false, only non-archived. If omitted, returns both.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "priceCodeContains",
            "in": "query",
            "description": "(optional)Comma-separated case-insensitive substrings. Asset is included if its PriceCode contains ANY of them. NULL PriceCodes are excluded.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "priceCodeNotContains",
            "in": "query",
            "description": "(optional)Comma-separated case-insensitive substrings. Asset is included if its PriceCode contains NONE of them, including assets with NULL PriceCode.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeLastUsed",
            "in": "query",
            "description": "(optional)When true, each asset carries the date and job number it was last used on. Implied when sorting by LastUsed. When omitted, neither field is returned. A global asset reports a value only to a customer caller, since it has no owner of its own.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PagedDataOf1Codewolf_Ctrl_Api_Dtos_Api_AssetListDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedDataOf1Codewolf_Ctrl_Api_Dtos_Api_AssetListDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedDataOf1Codewolf_Ctrl_Api_Dtos_Api_AssetListDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Assets/types": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Gets all of the Asset Types",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_AssetDtos_AssetTypeDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_AssetDtos_AssetTypeDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_AssetDtos_AssetTypeDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Assets/{assetTag}/files": {
      "post": {
        "tags": [
          "Assets"
        ],
        "summary": "Upload files to asset's assetFiles directory",
        "parameters": [
          {
            "name": "assetTag",
            "in": "path",
            "description": "The asset tag also known as asset code (e.g., WE12345)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    }
                  }
                }
              },
              "encoding": {
                "files": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_FileUploadResponseDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_SaveSepsResponseDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_SaveSepsUrlResponseDto"
                    }
                  ],
                  "description": "Response DTO for file upload operations to assetFiles."
                }
              },
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_FileUploadResponseDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_SaveSepsResponseDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_SaveSepsUrlResponseDto"
                    }
                  ],
                  "description": "Response DTO for file upload operations to assetFiles."
                }
              },
              "text/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_FileUploadResponseDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_SaveSepsResponseDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_SaveSepsUrlResponseDto"
                    }
                  ],
                  "description": "Response DTO for file upload operations to assetFiles."
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Get all files associated with an asset",
        "parameters": [
          {
            "name": "assetTag",
            "in": "path",
            "description": "The asset tag also known as asset code (e.g., WE12345)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_AssetFilesResponseDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_AssetFilesResponseDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_AssetFilesResponseDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Assets/{assetTag}/files/customer": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Get an asset's current customer file.",
        "description": "Returns the guid to send as `If-Match` when replacing the customer file. An asset normally has one\r\ncustomer file; when it has several, all are listed newest first and any of them may be named in\r\n`If-Match`, and the replace archives them all. When the asset has exactly one customer file its guid is\r\nalso in the `ETag` header.",
        "parameters": [
          {
            "name": "assetTag",
            "in": "path",
            "description": "The asset tag, for example WE12345.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The asset's current customer files. Empty when it has none.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_AssetCustomerFilesResult"
                }
              }
            }
          },
          "400": {
            "description": "The asset tag is blank. The body lists the problem with its error code and names the field in `data.property`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Interfaces_IValidationError"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not allowed to read customer files.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The asset does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The asset's files could not be read."
          }
        }
      },
      "post": {
        "tags": [
          "Assets"
        ],
        "summary": "Upload an asset's customer file, replacing the one it has.",
        "description": "Send one file in the multipart part named `file`. It is stored as the asset tag followed by\r\n`_customer` and the uploaded file's extension, for example `WE12345_customer.ai`, whatever the\r\nuploaded file is called. The extension must be one the asset upload allows.\r\n<br>\r\nThe asset's current customer file is replaced even when the new file has a different extension, so the asset\r\nis left with exactly one customer file. Every replaced customer file is kept as an archived file. No other\r\nfile on the asset changes.\r\n<br>\r\nTo replace an existing customer file, send its guid in the `If-Match` header, for example\r\n`If-Match: \"0b6f7c2e-5a41-4f7e-9d0a-3c1e2f4b8a77\"`. The guid is returned by\r\n`GET /Assets/{assetTag}/files/customer`, and in the `ETag` header and body of the previous upload. Without\r\n`If-Match`, the upload is accepted only when the asset has no customer file.\r\n",
        "parameters": [
          {
            "name": "assetTag",
            "in": "path",
            "description": "The asset tag, for example WE12345.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "The guid of the customer file being replaced, quoted or bare. Required when the asset has a customer file.\r\nA weak tag, `*` or a list of values is refused with 400.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "file"
                ],
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The file is stored and is the asset's current customer file. Its guid is also in the `ETag` header, as the token for the next If-Match.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_AssetCustomerFileResult"
                }
              }
            }
          },
          "400": {
            "description": "A blank asset tag, a body that is not a readable multipart form, no file, more than one file, a file without an extension or of a type that is not allowed, or an If-Match that does not name exactly one file by its guid. The body lists the problem with its error code and names the field in `data.property`. Nothing was changed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Interfaces_IValidationError"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not allowed to replace customer files.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The asset does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Files cannot be stored on this asset, because its tag has no number or it has no process. Nothing was changed.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "412": {
            "description": "If-Match does not name the asset's current customer file, including when there is none. Nothing was changed.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "428": {
            "description": "The asset has a customer file and If-Match was not sent. Nothing was changed.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The customer file could not be replaced. When the current customer file could not be archived it is unchanged. When the new file could not be stored after the archive, the asset may be left with no customer file: check `GET /Assets/{assetTag}/files/customer` before retrying, and retry without `If-Match` if it lists none.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/Assets/{assetCode}/jobs": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Get the jobs that use an asset",
        "description": "Returns both active and closed jobs. A customer caller gets their own customer's jobs only; a SuperUser gets every\r\ncustomer's jobs. Jobs are matched on the job's customer, not on the customer the asset belongs to.\r\n            \r\nActive jobs (dateOut is null) come first, followed by completed jobs, most recently shipped first.",
        "parameters": [
          {
            "name": "assetCode",
            "in": "path",
            "description": "The asset code to search for, for example WE12345.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The jobs that use the asset. Empty when there are none.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_AssetJobsResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "The asset code is blank.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated, or is a customer caller with no customer on their token.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not allowed to read an asset's jobs.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The jobs could not be read."
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Boms/{bomCode}/items": {
      "post": {
        "tags": [
          "BomItems"
        ],
        "summary": "Adds an item to a BOM's composition.",
        "description": "Adding a garment generates the BOM's size run from that garment's size set. A BOM can only\r\ncarry one garment, so a second one is refused rather than merged.",
        "parameters": [
          {
            "name": "bomCode",
            "in": "path",
            "description": "The BOM's own code. Unlike the read endpoints, a variant code is not accepted here.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The asset code to add, and optionally where it sits on the garment.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_AddBomItemRequest"
                  }
                ],
                "description": "Add an item to a BOM's composition."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_AddBomItemRequest"
                  }
                ],
                "description": "Add an item to a BOM's composition."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_AddBomItemRequest"
                  }
                ],
                "description": "Add an item to a BOM's composition."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_AddBomItemRequest"
                  }
                ],
                "description": "Add an item to a BOM's composition."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_BomItemResultDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Boms/{bomCode}/items/{itemId}": {
      "patch": {
        "tags": [
          "BomItems"
        ],
        "summary": "Edits an item's position on the garment.",
        "description": "An item's asset code is not editable: it is what decides the item's process and, for a\r\ngarment, the BOM's size run. Remove the item and add the correct one instead.",
        "parameters": [
          {
            "name": "bomCode",
            "in": "path",
            "description": "The BOM's own code. Unlike the read endpoints, a variant code is not accepted here.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "The item to edit. It must belong to the BOM the route names.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "The position to set. An empty string clears it.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_PatchBomItemRequest"
                  }
                ],
                "description": "Edit a BOM item. `position` is the only editable field: an item's asset code is what\r\ndecides its process and its size run, so changing it would orphan or contradict the run. Remove\r\nthe item and add the correct one instead."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_PatchBomItemRequest"
                  }
                ],
                "description": "Edit a BOM item. `position` is the only editable field: an item's asset code is what\r\ndecides its process and its size run, so changing it would orphan or contradict the run. Remove\r\nthe item and add the correct one instead."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_PatchBomItemRequest"
                  }
                ],
                "description": "Edit a BOM item. `position` is the only editable field: an item's asset code is what\r\ndecides its process and its size run, so changing it would orphan or contradict the run. Remove\r\nthe item and add the correct one instead."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_PatchBomItemRequest"
                  }
                ],
                "description": "Edit a BOM item. `position` is the only editable field: an item's asset code is what\r\ndecides its process and its size run, so changing it would orphan or contradict the run. Remove\r\nthe item and add the correct one instead."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Api_Support_BomDtos_BomDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Api_Support_BomDtos_BomExtendedDto"
                    }
                  ],
                  "description": "describes a BOM (Bill of Materials) Lookup Item"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "BomItems"
        ],
        "summary": "Removes an item from a BOM's composition.",
        "description": "Removing the BOM's last garment also removes its size run — the response carries the BOM so\r\nthe caller can see that, which is why this returns the BOM rather than an empty 204.",
        "parameters": [
          {
            "name": "bomCode",
            "in": "path",
            "description": "The BOM's own code. Unlike the read endpoints, a variant code is not accepted here.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "The item to remove. It must belong to the BOM the route names.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Api_Support_BomDtos_BomDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Api_Support_BomDtos_BomExtendedDto"
                    }
                  ],
                  "description": "describes a BOM (Bill of Materials) Lookup Item"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Boms/{bomCode}": {
      "get": {
        "tags": [
          "Boms"
        ],
        "summary": "Gets an individual BOM's information, by its BOM code or by any of its variant codes.",
        "parameters": [
          {
            "name": "bomCode",
            "in": "path",
            "description": "The BOM code (e.g. \"BOM10042\") or one of the BOM's variant codes (e.g. \"BOM10042-M\").",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeItems",
            "in": "query",
            "description": "When true, returns the BOM's composition on `items` — the garment plus its branding\r\nlines, each with its asset code, process code and position on the garment. Omitted (null)\r\nby default so the default response shape is unchanged.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "includeArchived",
            "in": "query",
            "description": "When true, an archived (inactive) BOM is returned, and its inactive variants are included.\r\nHard-deleted BOMs are never returned. Defaults to false.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Api_Support_BomDtos_BomDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Api_Support_BomDtos_BomExtendedDto"
                    }
                  ],
                  "description": "describes a BOM (Bill of Materials) Lookup Item"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      },
      "patch": {
        "tags": [
          "Boms"
        ],
        "summary": "Edits a BOM's fields. Also archives and restores it, through `active`.",
        "description": "An omitted or null property leaves its field untouched; an empty string clears it. Title and\r\nrange cannot be cleared. An archived BOM accepts every field, not only `active` — it is\r\nthe BOM's items and variants that are frozen while it is archived, not the BOM itself.",
        "parameters": [
          {
            "name": "bomCode",
            "in": "path",
            "description": "The BOM's own code. Unlike the read endpoints, a variant code is not accepted here.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The fields to change. Every property is optional; at least one is required.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_PatchBomRequest"
                  }
                ],
                "description": "Edit a BOM's fields. Every property is optional; an absent or null property leaves the field\r\nuntouched, and an empty string clears it. At least one property must be supplied."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_PatchBomRequest"
                  }
                ],
                "description": "Edit a BOM's fields. Every property is optional; an absent or null property leaves the field\r\nuntouched, and an empty string clears it. At least one property must be supplied."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_PatchBomRequest"
                  }
                ],
                "description": "Edit a BOM's fields. Every property is optional; an absent or null property leaves the field\r\nuntouched, and an empty string clears it. At least one property must be supplied."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_PatchBomRequest"
                  }
                ],
                "description": "Edit a BOM's fields. Every property is optional; an absent or null property leaves the field\r\nuntouched, and an empty string clears it. At least one property must be supplied."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Api_Support_BomDtos_BomDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Api_Support_BomDtos_BomExtendedDto"
                    }
                  ],
                  "description": "describes a BOM (Bill of Materials) Lookup Item"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Boms": {
      "get": {
        "tags": [
          "Boms"
        ],
        "summary": "Get the BOMs available to the logged-on user's customer.",
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "description": "Substring matched against the BOM code or any variant code.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeItems",
            "in": "query",
            "description": "When true, returns each BOM's composition on `items`. Opt-in because it is a second\r\nquery and fans the response out across every item of every BOM returned.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "includeArchived",
            "in": "query",
            "description": "When true, archived (inactive) BOMs are included, along with their inactive variants.\r\nHard-deleted BOMs are never returned. Defaults to false.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/Codewolf_Api_Support_BomDtos_BomDto"
                      },
                      {
                        "$ref": "#/components/schemas/Codewolf_Api_Support_BomDtos_BomExtendedDto"
                      }
                    ],
                    "description": "describes a BOM (Bill of Materials) Lookup Item"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "Boms"
        ],
        "summary": "Creates a BOM owned by the calling customer.",
        "description": "The BOM's code is generated by the database and returned on the response; it cannot be\r\nsupplied. Retrying a timed-out create produces a second BOM — there is no natural key to\r\ndetect the duplicate on, so a client must not retry this call automatically.",
        "requestBody": {
          "description": "The BOM's title, range and optional description, SKU and active flag.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_CreateBomRequest"
                  }
                ],
                "description": "Create a BOM. Ownership binds from the token, so there is no customer field anywhere on this\r\ntype, and no `code` — BOM.Code is a computed column read back from the created row."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_CreateBomRequest"
                  }
                ],
                "description": "Create a BOM. Ownership binds from the token, so there is no customer field anywhere on this\r\ntype, and no `code` — BOM.Code is a computed column read back from the created row."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_CreateBomRequest"
                  }
                ],
                "description": "Create a BOM. Ownership binds from the token, so there is no customer field anywhere on this\r\ntype, and no `code` — BOM.Code is a computed column read back from the created row."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_CreateBomRequest"
                  }
                ],
                "description": "Create a BOM. Ownership binds from the token, so there is no customer field anywhere on this\r\ntype, and no `code` — BOM.Code is a computed column read back from the created row."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Api_Support_BomDtos_BomDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Api_Support_BomDtos_BomExtendedDto"
                    }
                  ],
                  "description": "describes a BOM (Bill of Materials) Lookup Item"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Boms/ranges": {
      "get": {
        "tags": [
          "Boms"
        ],
        "summary": "CW-4323: Get the distinct set of BOM ranges (with counts) for the Shopify Import BOMs page.\r\nIntended for tenant staff — restricted to the ShopAdmin role. Results are sorted alphabetically.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_BomRangeDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Boms/shop-boms": {
      "get": {
        "tags": [
          "Boms"
        ],
        "summary": "CW-4323: Get all active, non-deleted BOMs in the given range shaped as Shopify products for\r\nthe Shopify Import BOMs page. Variants are ordered by the BOM's first-stock-BOMItem SizeSet.\r\nRestricted to the ShopAdmin role.",
        "parameters": [
          {
            "name": "range",
            "in": "query",
            "description": "The BOM range name. Required — must not be empty or whitespace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_ShopBomDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Boms/{bomCode}/image": {
      "post": {
        "tags": [
          "Boms"
        ],
        "summary": "Uploads the BOM's image, replacing any existing one.",
        "description": "The request is `multipart/form-data` carrying one part named `file`. JPEG and PNG\r\nonly, decided from the file's bytes rather than its name or its declared type. Maximum\r\n5,242,880 bytes, and the image must not decode above 8,000 by 8,000 pixels or 40 megapixels.\r\nThe stored name is generated by the server, so the uploaded filename is not preserved.",
        "parameters": [
          {
            "name": "bomCode",
            "in": "path",
            "description": "The BOM's own code. Unlike the read endpoints, a variant code is not accepted here.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "file"
                ],
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Api_Support_BomDtos_BomDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Api_Support_BomDtos_BomExtendedDto"
                    }
                  ],
                  "description": "describes a BOM (Bill of Materials) Lookup Item"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Client Error",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "415": {
            "description": "Client Error",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "Boms"
        ],
        "summary": "Removes the BOM's image.",
        "parameters": [
          {
            "name": "bomCode",
            "in": "path",
            "description": "The BOM's own code. Unlike the read endpoints, a variant code is not accepted here.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Api_Support_BomDtos_BomDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Api_Support_BomDtos_BomExtendedDto"
                    }
                  ],
                  "description": "describes a BOM (Bill of Materials) Lookup Item"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Boms/{bomCode}/variants/{variantId}": {
      "patch": {
        "tags": [
          "BomVariants"
        ],
        "summary": "Edits a variant's customer SKU and its availability.",
        "description": "A variant's code and size are generated from the garment's size set and are not editable —\r\nthe order path keys on the size, so changing it would break existing orders. Setting\r\n`active` to false stops the size being returned by the default read and stops it being\r\norderable; the response to this call still shows it, so the change is visible.",
        "parameters": [
          {
            "name": "bomCode",
            "in": "path",
            "description": "The BOM's own code. Unlike the read endpoints, a variant code is not accepted here.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "variantId",
            "in": "path",
            "description": "The variant to edit. It must belong to the BOM the route names.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "The fields to change. At least one is required.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_PatchBomVariantRequest"
                  }
                ],
                "description": "Edit a BOM variant. A variant's `code` and `size` are generated from the garment's size\r\nset and are not editable — editing either would break the order path, which keys on size."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_PatchBomVariantRequest"
                  }
                ],
                "description": "Edit a BOM variant. A variant's `code` and `size` are generated from the garment's size\r\nset and are not editable — editing either would break the order path, which keys on size."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_PatchBomVariantRequest"
                  }
                ],
                "description": "Edit a BOM variant. A variant's `code` and `size` are generated from the garment's size\r\nset and are not editable — editing either would break the order path, which keys on size."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_PatchBomVariantRequest"
                  }
                ],
                "description": "Edit a BOM variant. A variant's `code` and `size` are generated from the garment's size\r\nset and are not editable — editing either would break the order path, which keys on size."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Api_Support_BomDtos_BomDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Api_Support_BomDtos_BomExtendedDto"
                    }
                  ],
                  "description": "describes a BOM (Bill of Materials) Lookup Item"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Jobs/{jobNumber}/approve": {
      "post": {
        "tags": [
          "CustomerJobActions"
        ],
        "summary": "Approve a job, optionally agreeing a ship date and leaving a note.",
        "description": "Every field is optional: an empty body approves the job as it stands. Approving a job that\r\nis already approved succeeds and changes nothing.",
        "parameters": [
          {
            "name": "jobNumber",
            "in": "path",
            "description": "The job to approve.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "The optional ship date, note and date decision.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_ApproveJobRequest"
                  }
                ],
                "description": "What a customer sends when approving a job. Every field is optional - an empty body approves\r\nthe job as it stands."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_ApproveJobRequest"
                  }
                ],
                "description": "What a customer sends when approving a job. Every field is optional - an empty body approves\r\nthe job as it stands."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_ApproveJobRequest"
                  }
                ],
                "description": "What a customer sends when approving a job. Every field is optional - an empty body approves\r\nthe job as it stands."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_ApproveJobRequest"
                  }
                ],
                "description": "What a customer sends when approving a job. Every field is optional - an empty body approves\r\nthe job as it stands."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The job is approved. Check `alreadyApproved` to see whether this request changed anything, and `noteRecorded` to see whether a supplied note was kept.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_ApproveJobResponse"
                }
              }
            }
          },
          "400": {
            "description": "The ship date has passed, the note is too long, or the date decision is not recognised.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No such job, or the job does not belong to the calling customer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The job cannot be approved in its current state, or it is awaiting a payment.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed."
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Jobs/{jobNumber}/change-request": {
      "post": {
        "tags": [
          "CustomerJobActions"
        ],
        "summary": "Ask for changes to a job, with an explanation and any supporting files.",
        "description": "Send as multipart form data. Attachments are optional - the comment alone is a complete\r\nrequest. Repeating a request that has already been made succeeds and changes nothing.\r\nThe comment may run to 2000 characters. Attachments must be PDF, PNG, JPEG, AI, EPS or\r\nCorelDRAW: up to 10 files, 25 MB each, and 50 MB for the request as a whole. The combined\r\nlimit can refuse an upload whose files are each within the single-file limit.",
        "parameters": [
          {
            "name": "jobNumber",
            "in": "path",
            "description": "The job the request is about.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "comment": {
                    "type": "string"
                  },
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    }
                  }
                }
              },
              "encoding": {
                "comment": {
                  "style": "form"
                },
                "files": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The request is recorded. Check `alreadyRequested` to see whether this request changed anything, and each entry in `files` for whether that attachment was stored.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_ChangeRequestResponse"
                }
              }
            }
          },
          "400": {
            "description": "The comment is missing or too long, an attachment is too large, too numerous, or not a PDF, PNG, JPEG, AI, EPS or CDR, or none of the attachments could be stored. A request whose body exceeds the size the endpoint accepts is rejected here too. When no attachment could be stored, the message names the files to replace.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No such job, or the job does not belong to the calling customer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The job cannot be changed in its current state.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "The request body is larger than the endpoint accepts.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed."
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Jobs/{jobNumber}/stock-complete": {
      "post": {
        "tags": [
          "CustomerJobActions"
        ],
        "summary": "Mark a job's stock complete once some of it has arrived.",
        "description": "Only a job whose stock status is \"Partial Stock\", and which is not yet in production,\r\nfinished or cancelled, can be marked. The job's customer contact is\r\nemailed to confirm the stock is complete. Marking stock incomplete again is not available\r\nto customers.",
        "parameters": [
          {
            "name": "jobNumber",
            "in": "path",
            "description": "The job to mark. Must be a positive number.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The job's stock is now complete.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_MarkStockCompleteResponse"
                }
              }
            }
          },
          "400": {
            "description": "The job number is not a positive number.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not a customer user.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No such job, or the job does not belong to the calling customer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The job's stock cannot be marked complete. `reason` is `no_stock` when none of the stock has arrived, `already_stock_complete` when it is already complete, or `job_past_approval` when the job is already in production, finished or cancelled. Nothing was changed.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed."
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/customers": {
      "post": {
        "tags": [
          "CustomerSignup"
        ],
        "summary": "Create a wholesale customer and the user signing up for it.",
        "description": "The account is set up with this account's default wholesale settings for the address's country:\r\nprice tier, currency, tax, payment terms, payment mode, account manager, location and the delivery\r\noptions it is offered. The user signs in with their email address and has no\r\npassword until one is set, so set one straight after this call. No email is sent.\r\n            \r\nIf an active user already signs in with the email address, nothing is created and the response\r\nis 409 with that user's customer. Checking first with `POST /customers/search/many` lets the\r\nsignup form say so before the customer fills it in.",
        "requestBody": {
          "description": "The person, business and address.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_CreateCustomerRequest"
                  }
                ],
                "description": "A new wholesale customer and the person signing up for it. The account is set up with the\r\ntenant's default wholesale settings. If an active user already signs in with the email address,\r\nnothing is created and the call returns 409."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_CreateCustomerRequest"
                  }
                ],
                "description": "A new wholesale customer and the person signing up for it. The account is set up with the\r\ntenant's default wholesale settings. If an active user already signs in with the email address,\r\nnothing is created and the call returns 409."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_CreateCustomerRequest"
                  }
                ],
                "description": "A new wholesale customer and the person signing up for it. The account is set up with the\r\ntenant's default wholesale settings. If an active user already signs in with the email address,\r\nnothing is created and the call returns 409."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_CreateCustomerRequest"
                  }
                ],
                "description": "A new wholesale customer and the person signing up for it. The account is set up with the\r\ntenant's default wholesale settings. If an active user already signs in with the email address,\r\nnothing is created and the call returns 409."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The customer and user were created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_CreateCustomerResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is incomplete or invalid. Each error names the field in `data.property`.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not allowed to create customers.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "An active user already signs in with this email address. Nothing was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_CustomerEmailInUseResponse"
                }
              }
            }
          },
          "500": {
            "description": "The customer could not be created. Nothing was kept."
          },
          "503": {
            "description": "Other signups are in progress. Nothing was created; retry after the `Retry-After` seconds."
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Inwards": {
      "get": {
        "tags": [
          "Inwards"
        ],
        "summary": "List inwards records with optional filters, newest first unless `afterId` is given.",
        "description": "A customer's credentials list that customer's deliveries. Tenant staff credentials list the\r\ndeliveries of every customer.",
        "parameters": [
          {
            "name": "allocated",
            "in": "query",
            "description": "false = unallocated (job=0), true = allocated (job>0)",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "dateFrom",
            "in": "query",
            "description": "Filter by delivery date from (ISO 8601)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "dateTo",
            "in": "query",
            "description": "Filter by delivery date to (ISO 8601)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by status name (e.g. \"Arrived\")",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobNumber",
            "in": "query",
            "description": "Return only the deliveries assigned to this job. From a customer's credentials, a job\r\nbelonging to another customer returns an empty page rather than an error — the endpoint\r\ndoes not disclose whether a job number it cannot show you exists. Tenant staff credentials\r\nsee the deliveries on any customer's job, narrowed by `customerId` when it is given.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "customerId",
            "in": "query",
            "description": "Return only this customer's deliveries. Honoured for tenant staff credentials only; from a\r\ncustomer's credentials it is ignored and the customer's own deliveries are returned. A\r\nvalue that is not a positive whole number is ignored from any caller.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "afterId",
            "in": "query",
            "description": "Return only the deliveries with an id above this one, oldest first. A caller that polls\r\nfor new deliveries passes the highest id it has already seen, and repeats the call with the\r\nlast id of each page until a page comes back empty, so no delivery is skipped.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-based, default 1)",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "Items per page (default 20, max 100)",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_InwardsListResponseDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Inwards"
        ],
        "summary": "Create a new inwards record.",
        "description": "A customer's credentials create a delivery for that customer. Tenant staff credentials must\r\nname the customer in `customerId`; a missing or unknown customer is a 400.",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_CreateInwardsRequest"
                  }
                ],
                "description": "Payload for POST /Inwards."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_CreateInwardsRequest"
                  }
                ],
                "description": "Payload for POST /Inwards."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_CreateInwardsRequest"
                  }
                ],
                "description": "Payload for POST /Inwards."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_CreateInwardsRequest"
                  }
                ],
                "description": "Payload for POST /Inwards."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_CreateInwardsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/Inwards/{id}": {
      "get": {
        "tags": [
          "Inwards"
        ],
        "summary": "Get a single inwards record (header + items).",
        "description": "A customer's credentials read that customer's deliveries only; another customer's delivery\r\nis reported as not found. Tenant staff credentials read any delivery.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_InwardsDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_PatchInwardsResponseDto"
                    }
                  ],
                  "description": "Detailed representation of an inwards record including items."
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Inwards"
        ],
        "summary": "Allocate an inwards record to a job, or clear its allocation.",
        "description": "A customer's credentials change that customer's deliveries only. Tenant staff credentials\r\nchange any delivery; the job must belong to the customer the delivery belongs to.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Inwards record id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Job number to allocate to; null or 0 clears the allocation",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_PatchInwardsRequest"
                  }
                ],
                "description": "Payload for PATCH /Inwards/{id}."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_PatchInwardsRequest"
                  }
                ],
                "description": "Payload for PATCH /Inwards/{id}."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_PatchInwardsRequest"
                  }
                ],
                "description": "Payload for PATCH /Inwards/{id}."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_PatchInwardsRequest"
                  }
                ],
                "description": "Payload for PATCH /Inwards/{id}."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated inwards record, with the affected job's recomputed stock status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_PatchInwardsResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "jobNumber is negative, names a job that is not the delivery's customer's, or names a job that\r\nis not in a state allowing stock changes — on either the job gaining the delivery or the one\r\nlosing it",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Interfaces_IValidationError"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Inwards record not found for this caller",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/Jobs/{jobNumber}/dispatch": {
      "post": {
        "tags": [
          "JobDispatch"
        ],
        "summary": "Dispatch a job with the shipments that carried it.",
        "description": "Records each shipment's tracking, adds the freight charge where one is due, takes any payment owing from the\r\ncustomer's saved card, moves the job to Dispatched and sends its invoice. A job whose customer is not invoiced\r\nis closed instead.\r\n            \r\nThe request can be repeated safely. A tracking number the job already has is not recorded again, and a job\r\nthat is already dispatched only gains the shipments it does not have yet. A request made while another\r\ndispatch of the same job is running is refused with `dispatch_in_progress` and can be retried.",
        "parameters": [
          {
            "name": "jobNumber",
            "in": "path",
            "description": "The job to dispatch.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "The shipments and the system reporting them.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_JobDispatchRequest"
                  }
                ],
                "description": "A request to dispatch a job: the shipments that carried it and the system reporting them."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_JobDispatchRequest"
                  }
                ],
                "description": "A request to dispatch a job: the shipments that carried it and the system reporting them."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_JobDispatchRequest"
                  }
                ],
                "description": "A request to dispatch a job: the shipments that carried it and the system reporting them."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_JobDispatchRequest"
                  }
                ],
                "description": "A request to dispatch a job: the shipments that carried it and the system reporting them."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The job is dispatched (or closed, for a customer that is not invoiced), or was already dispatched and any new shipments are recorded. `warnings` lists anything that still needs a person's attention.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_JobDispatchResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid, or a `shipmentId` is not an open shipment of the job. `errors` lists each message under the part of the request it is about, and `validationMessages` gives each message with its numeric code. A missing or unreadable body is answered with the standard problem response instead.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller does not hold the JobDispatcher role.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No such job.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The job was not dispatched. `reason` says why and `status` gives the job's current status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_JobDispatchRefusalResponse"
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed; it can be retried."
          },
          "503": {
            "description": "The payment gateway did not confirm whether the customer's saved card was charged, so the job was not dispatched and the customer was not asked to pay. Its shipments are recorded. Repeat the same request after the `Retry-After` seconds; it settles the charge without charging twice."
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Jobs/{jobNumber}/dispatch/staff": {
      "post": {
        "tags": [
          "JobDispatch"
        ],
        "summary": "Dispatch a job as the signed-in staff member, once its shipments are recorded.",
        "description": "Checks that the job can be dispatched, takes any payment owing from the customer's saved card, moves the job to\r\nDispatched and sends its invoice from the staff member. A job whose customer is not invoiced is closed instead.\r\nEvery line must already have its job line type and an actual quantity above zero; nothing on the lines is changed.\r\n            \r\nThe staff member must hold one of the roles the tenant allows to dispatch, when it names any, and none of the roles\r\nit bars from dispatching. Their roles are read when the request is made, so a role granted or removed since they\r\nsigned in applies at once. A job created as a credit of another job also needs credit jobs enabled, the Job Credit\r\nAdmin role, and credit information on every line.\r\n            \r\nWhen payment cannot be taken, the job waits for payment, which can move it to Payment Issue, the customer is asked\r\nto pay, and `warningText` holds the tenant's payment warning to show. The request has no body.",
        "parameters": [
          {
            "name": "jobNumber",
            "in": "path",
            "description": "The job to dispatch.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The job is dispatched, or closed for a customer that is not invoiced. `warnings` and `warningText` describe anything that still needs attention, and `emailsSent` and `mailResults` report the dispatch emails the request sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_JobStaffDispatchResponse"
                }
              }
            }
          },
          "400": {
            "description": "The job number is not a positive whole number. `errors` lists the message under `jobNumber`, and `validationMessages` gives it with its numeric code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller does not hold the CtrlUser role, is not signed in as a user, or is not a user whose roles can be read.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No such job.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The job was not dispatched. `reason` says why, `status` gives the job's current status, `warningText` any text to show, and `lineIds` the lines concerned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_JobStaffDispatchRefusalResponse"
                }
              }
            }
          },
          "500": {
            "description": "The request could not be completed; it can be retried."
          },
          "503": {
            "description": "The payment gateway did not confirm whether the customer's saved card was charged, so the job was not dispatched and the customer was not asked to pay. Repeat the request after the `Retry-After` seconds; it settles the charge without charging twice."
          }
        }
      }
    },
    "/Jobs/{jobNumber}/files": {
      "get": {
        "tags": [
          "JobFiles"
        ],
        "summary": "Get the files held against a job - proofs, packing slips and generic job files - or, on request, the\r\ncurrent worksheet of each of its lines.",
        "description": "With `fileType` omitted, this returns the three job file upload types only: proofs, packing slips and\r\ngeneric job files. Worksheets are returned only when `fileType=worksheet` is asked for. Other files\r\nthat may be filed against a job internally - scans, redraws, reprints and photos - are out of scope\r\nand are never returned here.\r\n            \r\nPacking slips attached to a specific shipment are included alongside job-level files. Each\r\ncarries the `shipmentId` it belongs to; a job-level packing slip has a null `shipmentId`.\r\n            \r\n**Worksheets (`fileType=worksheet`).** One row per job line that has a current worksheet, carrying\r\nthe `jobLineId` it belongs to. A line's current worksheet is the file staff open for that line now:\r\nuploaded to the line, or copied to it from another line. A replaced or deleted worksheet is never\r\nreturned. A worksheet shared by several lines is returned once per line, with the same `guid`.\r\n`createdDate` is when the file was uploaded; for a worksheet copied from another line that is the\r\noriginal upload, which may be months earlier and on another job's line, not when the worksheet was\r\nattached to this line.\r\n            \r\nWorksheet responses also carry `unservedWorksheetJobLineIds`: the job's lines that reference a\r\nworksheet this API cannot serve - one kept in an older worksheet format the API cannot read, or a\r\nreference to a file that is missing, deleted or not a worksheet. For a caller scoped to one customer it\r\nalso lists lines whose worksheet was uploaded to another customer's job line, or whose originating job\r\nline cannot be identified; those worksheets are not returned to that caller. Staff may still see\r\ninstructions for those lines in Control. The list covers the whole job and is the same on every page;\r\nit is empty when every referenced worksheet is served. A line in neither `data` nor that list has no\r\nworksheet that matches `fileStatus`. `fileStatus` filters on the worksheet file's own status, and\r\n`fileStatus=Deleted` always returns no worksheet rows, because a deleted worksheet is never current.\r\n`jobLineId` and `unservedWorksheetJobLineIds` are absent from every other row and response.\r\n            \r\nWorksheets cannot be uploaded or replaced through this API: `POST /Jobs/{jobNumber}/files/{fileType}`\r\ndoes not accept `worksheet`.\r\n            \r\n`cdnUrl` is a short-lived pre-signed download URL, issued only for `Active` files.\r\n`Archived` and `Deleted` files are returned as metadata with no URL. `cdnUrlExpires` is the\r\nmoment the URL stops working; it is null when no URL was issued, and also when the file lives\r\nin a bucket that serves permanent public URLs carrying no lease. Use the link soon after fetching\r\nthe list: storage clocks can differ by up to 15 minutes, so a link can stop working before\r\n`cdnUrlExpires`. Fetch the list again well before that time rather than at it, and treat a refusal\r\nfrom storage as an expired link.\r\n            \r\nResults are newest first. Paging is 1-based; a page beyond the last returns an empty `data`\r\narray with the true totals rather than repeating the last page.\r\n            \r\nThis endpoint replaces the undocumented `GET /Files/list/Job/{bucket}/{jobNumber}` and\r\n`GET /files/secure/...` pair for job files. Those remain routable but are not part of the\r\npublished surface and may change without notice.",
        "parameters": [
          {
            "name": "jobNumber",
            "in": "path",
            "description": "The job to list files for.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "fileType",
            "in": "query",
            "description": "Restrict to one file type. Omit for proofs, packing slips and generic files. Worksheets are returned\r\nonly when `fileType=worksheet`.",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Enums_JobFileListType"
                }
              ]
            }
          },
          {
            "name": "fileStatus",
            "in": "query",
            "description": "Statuses to include. Defaults to Active and Archived.",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Enums_FileStatus"
                }
              ],
              "default": "Active, Archived"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "1-based page number.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "Rows per page, maximum 100.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested page of job files.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_JobFilesResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid paging or filter values.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "No credential supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Authenticated, but the role is not permitted to read job files.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The job does not exist, or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The ownership lookup or file query failed. Deliberately surfaced rather than reported as an empty or missing job."
          }
        }
      }
    },
    "/Jobs/{jobNumber}/joblines": {
      "post": {
        "tags": [
          "JobLines"
        ],
        "summary": "Add one line to a placed job.",
        "description": "`line` takes exactly the shape of an item on POST /Jobs - a stock, external-garment,\r\n            asset or price-code line - and is priced the same way, from the customer's pricing; `price`\r\n            is not accepted. A price-code line needs `externalArtworkUrl`. A bill of materials cannot be\r\n            added. A member the item's type does not define is ignored, as on POST /Jobs.\r\n            <br>\r\n            To group the line under an existing stock or external-garment line, send that line as\r\n            `parentJobLineId`; the new line follows its existing children. `groupHead` and\r\n            `group` are not accepted here - use the bulk endpoint to add a new group. Keeping a group\r\n            coherent (a decoration's quantity against its garment's) is the caller's to manage.\r\n            <br>\r\n            The job's status decides whether lines can be added now; GET /Jobs/{jobNumber} reports it as\r\n            `permissions.canAddLines`. After proofing, the first change moves the job to Change\r\n            Requested and later changes are added to that request. The response can carry more lines\r\n            than were sent - a setup line, a discount - and the job total can change.\r\n            ",
        "parameters": [
          {
            "name": "jobNumber",
            "in": "path",
            "description": "The job.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "The ETag from your last read of the job. Required; `*` is refused.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The line to add.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_AddJobLineRequest"
                  }
                ],
                "description": "One line to add to a placed job."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_AddJobLineRequest"
                  }
                ],
                "description": "One line to add to a placed job."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_AddJobLineRequest"
                  }
                ],
                "description": "One line to add to a placed job."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_AddJobLineRequest"
                  }
                ],
                "description": "One line to add to a placed job."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The line was added. The new ETag is in the `ETag` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobDto"
                }
              }
            }
          },
          "400": {
            "description": "The request was refused. `errors` lists each message under the part of the request it names; `validationMessages` gives each message's numeric `errorCode`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated with a bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller cannot change job lines.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No such job, or the job does not belong to the calling customer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The job's lines cannot be changed in its current status, or the line it would go under is in production.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "412": {
            "description": "The job has changed since it was read. Read it again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "428": {
            "description": "If-Match is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      },
      "patch": {
        "tags": [
          "JobLines"
        ],
        "summary": "Change existing lines of a placed job.",
        "description": "A stock line takes `sizeQuantities`; an external-garment line `sizeQuantities`,\r\n`garment` and `description`; an asset line `quantity`, `garment` and\r\n`comment`. `sizeQuantities` replaces the whole breakdown, and a sized line's quantity\r\nis its total, so `quantity` may be sent on one only as that total. A field left out is\r\nunchanged. Any other field - a price, a code, a reference - is refused with the field named.\r\n<br>\r\nA line whose quantity changes is repriced at today's price for its new quantity; a change\r\nthat keeps the quantity keeps the price. Discount, setup and tax are recalculated, so the job\r\ntotal can change. A line that is scheduled, ganged or in production cannot be changed, and its\r\n`permissions.canEdit` says so. A request that changes nothing returns the job unchanged\r\nand raises no change request.\r\n<br>\r\nAfter proofing, the first change moves the job to Change Requested and later changes are added\r\nto that request. 412 means the job changed since it was read - its details, its lines or its\r\nshipments; read it again and re-apply. Only GET /Jobs/{jobNumber} and the line endpoints return an\r\nETag, so read the job again after any other change to it. At most 100 lines per request.\r\n",
        "parameters": [
          {
            "name": "jobNumber",
            "in": "path",
            "description": "The job.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "The ETag from your last read of the job. Required; `*` is refused.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The changes.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_UpdateJobLinesRequest"
                  }
                ],
                "description": "Changes to existing lines of a placed job, applied together or not at all."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_UpdateJobLinesRequest"
                  }
                ],
                "description": "Changes to existing lines of a placed job, applied together or not at all."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_UpdateJobLinesRequest"
                  }
                ],
                "description": "Changes to existing lines of a placed job, applied together or not at all."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_UpdateJobLinesRequest"
                  }
                ],
                "description": "Changes to existing lines of a placed job, applied together or not at all."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The lines were changed. The new ETag is in the `ETag` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobDto"
                }
              }
            }
          },
          "400": {
            "description": "The request was refused. `errors` lists each message under the part of the request it names; `validationMessages` gives each message's numeric `errorCode`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated with a bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller cannot change job lines.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No such job, or the job does not belong to the calling customer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The job's lines cannot be changed in its current status, or a line is in production.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "412": {
            "description": "The job has changed since it was read. Read it again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "428": {
            "description": "If-Match is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "JobLines"
        ],
        "summary": "Remove lines from a placed job.",
        "description": "Name the lines in `jobLineIds`, at most 100. A line that heads a group can be removed only\r\ntogether with every line grouped under it. A removed line's setup and reset lines go with it when\r\nno other line for the same asset remains on the job; otherwise they stay on the job, grouped\r\nunder the first remaining line for that asset. The last line can be removed, leaving the job\r\nwith none. A line that is scheduled, ganged or in production cannot be removed, and its\r\n`permissions.canRemove` says so.",
        "parameters": [
          {
            "name": "jobNumber",
            "in": "path",
            "description": "The job.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "The ETag from your last read of the job. Required; `*` is refused.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The lines to remove.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_RemoveJobLinesRequest"
                  }
                ],
                "description": "Lines to remove from a placed job, applied together or not at all."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_RemoveJobLinesRequest"
                  }
                ],
                "description": "Lines to remove from a placed job, applied together or not at all."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_RemoveJobLinesRequest"
                  }
                ],
                "description": "Lines to remove from a placed job, applied together or not at all."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_RemoveJobLinesRequest"
                  }
                ],
                "description": "Lines to remove from a placed job, applied together or not at all."
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The lines were removed. The new ETag is in the `ETag` header."
          },
          "400": {
            "description": "The request was refused. `errors` lists each message under the part of the request it names; `validationMessages` gives each message's numeric `errorCode`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated with a bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller cannot change job lines.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No such job, or the job does not belong to the calling customer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The job's lines cannot be changed in its current status, or a line is in production.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "412": {
            "description": "The job has changed since it was read. Read it again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "428": {
            "description": "If-Match is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Jobs/{jobNumber}/joblines-bulk": {
      "post": {
        "tags": [
          "JobLines"
        ],
        "summary": "Add several lines to a placed job in one request.",
        "description": "Each entry is an add as on POST /Jobs/{jobNumber}/joblines, and the request is applied in full\r\nor not at all. Within the request, `groupHead` and `group` group new lines exactly as\r\nthey do on POST /Jobs: a group's head and every line in it must be in the request, and a new\r\ngroup is placed after the job's existing groups. An entry may instead name an existing line as\r\n`parentJobLineId`, but not both. At most 100 lines per request.",
        "parameters": [
          {
            "name": "jobNumber",
            "in": "path",
            "description": "The job.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "The ETag from your last read of the job. Required; `*` is refused.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The lines to add.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_AddJobLinesRequest"
                  }
                ],
                "description": "Several lines to add to a placed job in one request, applied together or not at all."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_AddJobLinesRequest"
                  }
                ],
                "description": "Several lines to add to a placed job in one request, applied together or not at all."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_AddJobLinesRequest"
                  }
                ],
                "description": "Several lines to add to a placed job in one request, applied together or not at all."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_AddJobLinesRequest"
                  }
                ],
                "description": "Several lines to add to a placed job in one request, applied together or not at all."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The lines were added. The new ETag is in the `ETag` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobDto"
                }
              }
            }
          },
          "400": {
            "description": "The request was refused. `errors` lists each message under the part of the request it names; `validationMessages` gives each message's numeric `errorCode`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated with a bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller cannot change job lines.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No such job, or the job does not belong to the calling customer.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The job's lines cannot be changed in its current status, or a line named as a parent is in production.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "412": {
            "description": "The job has changed since it was read. Read it again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "428": {
            "description": "If-Match is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Jobs/{jobNumber}": {
      "get": {
        "tags": [
          "Jobs"
        ],
        "summary": "Get the full Job information",
        "description": "The response carries an `ETag` header. Send it as `If-Match` when changing the job's\r\nlines. `permissions.canEditLines` and `permissions.canAddLines` say whether the\r\nlines can be changed now, and each line's `permissions` whether that line can be changed\r\nor removed. Stock and external-garment lines carry `sizeQuantities`; it is null on every\r\nother line.",
        "parameters": [
          {
            "name": "jobNumber",
            "in": "path",
            "description": "A Job Number",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      },
      "patch": {
        "tags": [
          "Jobs"
        ],
        "summary": "Patch job details",
        "parameters": [
          {
            "name": "jobNumber",
            "in": "path",
            "description": "The job number to update",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "The patch data containing fields to update. Only non-null fields are updated. The locationCode field is SuperUser-only.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_PatchJobDto"
                  }
                ],
                "description": "DTO for patching job details"
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_PatchJobDto"
                  }
                ],
                "description": "DTO for patching job details"
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_PatchJobDto"
                  }
                ],
                "description": "DTO for patching job details"
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_PatchJobDto"
                  }
                ],
                "description": "DTO for patching job details"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Job details updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid location code (does not exist, inactive, or virtual)",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Job is locked for editing, or a non-SuperUser supplied locationCode (see response body for reason)",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Job not found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Jobs/delivery-options": {
      "get": {
        "tags": [
          "Jobs"
        ],
        "summary": "Get delivery options available to customer",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Interfaces_IDeliveryOption"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Jobs/earliest-ship-date": {
      "get": {
        "tags": [
          "Jobs"
        ],
        "summary": "Get calculated shipping date based on process codes",
        "description": "Calculates the earliest shipping date using a centralized function.\r\nThis ensures consistency with job creation and handles all business rules including:\r\n- Cutoff time logic (orders after cutoff start next day)\r\n- Timezone conversions based on customer location\r\n- Weekend and holiday exclusions\r\n- Location-specific leadtime settings\r\n- Process-based leadtime calculations\r\n            \r\nReturns date exclusions for calendar blocking in the UI.",
        "parameters": [
          {
            "name": "processCodes",
            "in": "query",
            "description": "Optional comma-separated process codes (e.g., \"PR,WE\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Shipping date calculated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_ShippingDateResponseDto"
                }
              }
            }
          },
          "401": {
            "description": "User is not authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "User not found or no shipping date available",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Jobs": {
      "post": {
        "tags": [
          "Jobs"
        ],
        "summary": "Create a job",
        "parameters": [
          {
            "name": "X-Application-Name",
            "in": "header",
            "description": "An Valid OriginCode value (this will be validated)",
            "schema": {
              "type": "string",
              "default": "API"
            }
          },
          {
            "name": "X-Integration-Partner",
            "in": "header",
            "description": "Optional. Identifies the integration partner that created the job. Values that are not recognised are ignored.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The job candidate",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobCandidate"
                  },
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_ShopJobs_ShopJobCandidate"
                  },
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_ShopifyJobs_CustomerShopJobCandidate"
                  }
                ],
                "description": "Job class to enable the creation of jobs from the web API"
              }
            },
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobCandidate"
                  },
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_ShopJobs_ShopJobCandidate"
                  },
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_ShopifyJobs_CustomerShopJobCandidate"
                  }
                ],
                "description": "Job class to enable the creation of jobs from the web API"
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobCandidate"
                  },
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_ShopJobs_ShopJobCandidate"
                  },
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_ShopifyJobs_CustomerShopJobCandidate"
                  }
                ],
                "description": "Job class to enable the creation of jobs from the web API"
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobCandidate"
                  },
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_ShopJobs_ShopJobCandidate"
                  },
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_ShopifyJobs_CustomerShopJobCandidate"
                  }
                ],
                "description": "Job class to enable the creation of jobs from the web API"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_ReturnDtos_CreateJobReturnDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_ReturnDtos_CreateShopJobReturnDto"
                    }
                  ],
                  "description": "Returns the information from a successful Job Creation to the caller"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Jobs/{jobNumber}/artwork": {
      "post": {
        "tags": [
          "Jobs"
        ],
        "summary": "Upload Artwork for a Job",
        "parameters": [
          {
            "name": "jobNumber",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_UploadArtworkResult"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Jobs/{jobNumber}/files/{fileType}": {
      "post": {
        "tags": [
          "Jobs"
        ],
        "summary": "Upload files for a Job (proof, packing slip, or generic files)",
        "description": "A packing slip or proof upload replaces the job's current file of that type, and the replaced file is kept as\r\nan archived file. A generic upload adds a file and replaces nothing.\r\n<br>\r\nTo replace a packing slip or proof only while it is still the file you last saw, send its guid in the\r\n`If-Match` header, for example `If-Match: \"0b6f7c2e-5a41-4f7e-9d0a-3c1e2f4b8a77\"`. For a packing\r\nslip, the guid is the `guid` of the `GET /Jobs/{jobNumber}/files` entry whose `shipmentId` is\r\nnull. It is also returned in the `ETag` header of the previous upload. When the named file is no longer\r\ncurrent, the upload is refused with 412 and nothing changes. A request that sends `If-Match` must carry\r\nexactly one file.\r\n<br>\r\nA customer user, meaning a caller holding neither the SuperUser nor the CustomerAdmin role, may upload\r\ngeneric files and packing slips, one packing slip per request. A customer user must send `If-Match` to\r\nreplace an existing packing slip, and is refused with 428 without it. `If-Match` has no effect on\r\ngeneric files.\r\n<br>\r\nA successful single-file packing slip or proof upload returns the new file's guid in the `ETag` header.\r\n",
        "parameters": [
          {
            "name": "jobNumber",
            "in": "path",
            "description": "The job number to upload files for",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "fileType",
            "in": "path",
            "description": "The type of file being uploaded (generic, proof, packingslip)",
            "required": true,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Enums_JobFileType"
                }
              ],
              "description": "Specifies the type of file associated with a job."
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "Optional. The guid of the packing slip or proof being replaced, quoted or bare. A weak tag, `*` or a\r\nlist of values is refused with 400. Ignored for generic files.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The files were stored. For a packing slip or proof, the stored file is now current and its guid is the token for the next If-Match.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_UploadJobFileResult"
                }
              }
            }
          },
          "400": {
            "description": "No files were provided, answered with a plain message. Or, answered with problem details: If-Match does not name exactly one file by its guid, or several files were sent where one packing slip or proof is expected.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "A customer user uploading a proof or an unrecognised file type.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The job does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "412": {
            "description": "If-Match does not name the job's current packing slip or proof, including when there is none. Nothing was changed.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "428": {
            "description": "A customer user sent no If-Match and the job already has a packing slip. Nothing was changed.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The current packing slip or proof could not be replaced and is unchanged. Retry the upload.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Jobs/{jobNumber}/shipments/{shipmentId}/files/packingslip": {
      "post": {
        "tags": [
          "Jobs"
        ],
        "summary": "Upload a packing slip for one shipment of a job",
        "description": "A packing slip describes what is in a box, so it belongs to a consignment rather than to the\r\nwhole job - a job that ships to three addresses needs three slips.\r\n`shipmentId` comes from the matching entry of `shippingAddresses` on\r\nGET /Jobs/{jobNumber}.\r\n<br>\r\nUploading replaces this shipment's current slip, archiving the previous one. Only that\r\nshipment is affected - a sibling shipment's slip is left untouched, as is any slip held\r\nagainst the job itself by the job-level endpoint POST /Jobs/{jobNumber}/files/packingslip,\r\nwhich continues to work unchanged.\r\n<br>\r\nTo replace the slip only while it is still the file you last saw, send its guid in the `If-Match`\r\nheader, for example `If-Match: \"0b6f7c2e-5a41-4f7e-9d0a-3c1e2f4b8a77\"`. The guid is the `guid` of\r\nthe `GET /Jobs/{jobNumber}/files` packing slip entry whose `shipmentId` is this shipment. It is\r\nalso returned in the `ETag` header of the previous upload. When the named file is no longer this\r\nshipment's current slip, the upload is refused with 412 and nothing changes.\r\n<br>\r\nA customer user, meaning a caller holding neither the SuperUser nor the CustomerAdmin role, must send\r\n`If-Match` to replace an existing slip, and is refused with 428 without it. A first slip needs no\r\nheader.\r\n<br>\r\nThe file must be a single PDF of up to 25 MB, with a name ending in `.pdf`.\r\n",
        "parameters": [
          {
            "name": "jobNumber",
            "in": "path",
            "description": "The job the shipment belongs to",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "shipmentId",
            "in": "path",
            "description": "Which shipment the slip belongs to",
            "required": true,
            "schema": {
              "maximum": 2147483647,
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "Optional. The guid of the shipment's packing slip being replaced, quoted or bare. A weak tag, `*` or a\r\nlist of values is refused with 400.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Packing slip uploaded for the shipment. It is now the shipment's current slip, and its guid is returned in the ETag header as the token for the next If-Match.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_UploadJobFileResult"
                }
              }
            }
          },
          "400": {
            "description": "No file, more than one file, a file that is not a PDF, is over 25 MB or has a name that does not end in .pdf, a body that is not multipart/form-data, or shipmentId is not a positive number. Or, answered with problem details: If-Match does not name exactly one file by its guid.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Job not found, or the supplied shipmentId is not a shipment of this job",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "412": {
            "description": "If-Match does not name the shipment's current packing slip, including when it has none. Nothing was changed.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Client Error",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "428": {
            "description": "A customer user sent no If-Match and the shipment already has a packing slip. Nothing was changed.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The packing slip could not be stored. Retry the upload."
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Jobs/active": {
      "get": {
        "tags": [
          "Jobs"
        ],
        "summary": "Get active jobs for the current customer (by default excludes Closed and Cancelled jobs)",
        "parameters": [
          {
            "name": "excludeJobNumber",
            "in": "query",
            "description": "Optional job number to exclude from results",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-based)",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "Page size (default 20, max 100)",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          },
          {
            "name": "searchText",
            "in": "query",
            "description": "Free-text search across the job's number, order number, description, client, tags, delivery\r\noption, location, gang codes, asset tags and garments. Each word is matched separately as a prefix, so a job is\r\nreturned only when every word matches something on it; the words do not have to appear\r\ntogether or in the order given.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeClosedJobs",
            "in": "query",
            "description": "Include closed jobs in results. Cancelled jobs are never included",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "sortColumn",
            "in": "query",
            "description": "Column to sort by. Defaults to the order group sequence when an order group is supplied, otherwise the job number.",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Enums_ActiveJobSortColumn"
                }
              ]
            }
          },
          {
            "name": "sortDirection",
            "in": "query",
            "description": "Direction to sort in. When omitted, results are newest first, except when sorting by order group sequence, which runs in sequence order.",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Enums_SortDirection"
                }
              ]
            }
          },
          {
            "name": "orderGroup",
            "in": "query",
            "description": "Optional order group to restrict results to",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customerUserId",
            "in": "query",
            "description": "Optional Customer User (job owner) to narrow the results to - the customer's own user the\r\njob belongs to, not the Control staff member who keyed it in. Narrowing happens server-side,\r\nso totalCount, totalPages and paging describe the narrowed set. Must be a user of the\r\ncalling customer; anything else is rejected with 400 rather than silently ignored.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_PagedActiveJobsDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "customerUserId is not a user of the calling customer",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Jobs/{jobNumber}/history": {
      "get": {
        "tags": [
          "Jobs"
        ],
        "summary": "Get history of a job",
        "parameters": [
          {
            "name": "jobNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer"
                      },
                      "date": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "eventDetail": {
                        "type": "string"
                      },
                      "recordLogTypeId": {
                        "type": "integer"
                      },
                      "recordLogType": {
                        "type": "string"
                      },
                      "user": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Jobs/{jobNumber}/comment": {
      "post": {
        "tags": [
          "Jobs"
        ],
        "summary": "Add a comment to a job's history",
        "parameters": [
          {
            "name": "jobNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_AddJobCommentDto"
                  }
                ]
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_AddJobCommentDto"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_AddJobCommentDto"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_AddJobCommentDto"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/Jobs/{jobNumber}/shipping": {
      "patch": {
        "tags": [
          "Jobs"
        ],
        "summary": "Patch the shipping/delivery details of one shipment on a job",
        "description": "A job can carry several shipments, each with its own address and delivery method.\r\nUse `shipmentId` in the body to say which one to update - the value comes from\r\nthe matching entry of `shippingAddresses` on GET /Jobs/{jobNumber}. It may be\r\nomitted when the job has exactly one shipment. On a job with more than one it is\r\nrequired: an unidentified patch is rejected with 400 rather than resolved by guesswork.\r\nThe route form PATCH /Jobs/{jobNumber}/shipping/{shipmentId} is equivalent.",
        "parameters": [
          {
            "name": "jobNumber",
            "in": "path",
            "description": "The job number to update",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "The patch data containing shipping fields to update. Only non-null fields are updated.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_PatchJobShippingDto"
                  }
                ],
                "description": "DTO for patching job shipping/delivery details"
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_PatchJobShippingDto"
                  }
                ],
                "description": "DTO for patching job shipping/delivery details"
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_PatchJobShippingDto"
                  }
                ],
                "description": "DTO for patching job shipping/delivery details"
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_PatchJobShippingDto"
                  }
                ],
                "description": "DTO for patching job shipping/delivery details"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Job shipping details updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobDto"
                }
              }
            }
          },
          "400": {
            "description": "The job has several shipments and no shipmentId was supplied (see response body)",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Job is locked for editing (see response body for reason)",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Job not found, or the supplied shipmentId is not on this job",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Jobs/{jobNumber}/shipping/{shipmentId}": {
      "patch": {
        "tags": [
          "Jobs"
        ],
        "summary": "Patch the shipping/delivery details of a specific shipment on a job",
        "description": "Route form of PATCH /Jobs/{jobNumber}/shipping. Identical behaviour, with the target\r\nshipment named on the URL instead of in the body. If the body also carries a\r\n`shipmentId`, the two must agree - a mismatch is rejected with 400 rather than\r\none silently winning.",
        "parameters": [
          {
            "name": "jobNumber",
            "in": "path",
            "description": "The job number to update",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "shipmentId",
            "in": "path",
            "description": "The shipment to update, from shippingAddresses[].shipmentId on GET /Jobs/{jobNumber}",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "The patch data containing shipping fields to update. Only non-null fields are updated.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_PatchJobShippingDto"
                  }
                ],
                "description": "DTO for patching job shipping/delivery details"
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_PatchJobShippingDto"
                  }
                ],
                "description": "DTO for patching job shipping/delivery details"
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_PatchJobShippingDto"
                  }
                ],
                "description": "DTO for patching job shipping/delivery details"
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_PatchJobShippingDto"
                  }
                ],
                "description": "DTO for patching job shipping/delivery details"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Job shipping details updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobDto"
                }
              }
            }
          },
          "400": {
            "description": "The body carries a different shipmentId than the route (see response body)",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Job is locked for editing (see response body for reason)",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Job not found, or the supplied shipmentId is not on this job",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Jobs/{jobNumber}/cancel": {
      "post": {
        "tags": [
          "Jobs"
        ],
        "summary": "Cancel a job. Cancelling an already-cancelled job returns success.",
        "parameters": [
          {
            "name": "jobNumber",
            "in": "path",
            "description": "The job number to cancel",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Job cancelled successfully (or was already cancelled)"
          },
          "404": {
            "description": "Job not found or user not authorized to view this job",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Job cannot be cancelled in its current status",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Jobs/{jobNumber}/cancel-with-refund": {
      "post": {
        "tags": [
          "Jobs"
        ],
        "summary": "Cancel an order and refund the captured payment, scoped to the authenticated customer.\r\nReturns 404 if the job does not exist, belongs to another customer (no existence leak),\r\nor has only a soft-deleted payment allocation (protective — never blind production-cancel).\r\nA job with no payment allocation at all is cancelled (nothing to refund).\r\nReturns 409 if the job is no longer cancellable.\r\nReturns 200 with action `\"cancelled\"` | `\"refunded\"` | `\"already_reversed\"` on success.",
        "description": "Sibling of M:Codewolf.Ctrl.Api.Controllers.JobsController.CancelJob(System.Int32,System.Threading.CancellationToken). The difference:\r\n`POST /Jobs/{jobNumber}/cancel` cancels production only (no refund);\r\n`POST /Jobs/{jobNumber}/cancel-with-refund` cancels production AND\r\nrefunds the captured payment via the cancel/refund engine.",
        "parameters": [
          {
            "name": "jobNumber",
            "in": "path",
            "description": "The customer's job number.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cancel/refund successful, or idempotent in-flight replay (already_reversed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_CustomerJobCancelResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Job not found, not owned by the caller, or has only a soft-deleted payment allocation.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Job is no longer cancellable.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server Error"
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Jobs/gangs/{gangNumber}/joblines": {
      "get": {
        "tags": [
          "Jobs"
        ],
        "summary": "Get all joblines associated with a gang by gang number and optional suffix.",
        "parameters": [
          {
            "name": "gangNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_GangJoblineDto"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Jobs/{jobNumber}/shipments": {
      "post": {
        "tags": [
          "JobShipments"
        ],
        "summary": "Add a shipment to an existing job",
        "description": "A job can be delivered to more than one address. Each destination is a shipment, with\r\nits own address, delivery method and tracking. This adds one to a job that already\r\nexists; the shipments created with the job are untouched.\r\n<br>\r\nSupply a `deliveryMethod` from GET /Jobs/delivery-options. If it identifies a\r\ncollection, the shipment is created without a delivery address and the address fields\r\nare ignored. Otherwise `streetAddress`, `city` and `countryCodeISO2` are\r\nrequired.\r\n<br>\r\nAdding a shipment does not change the price of the job. No line is added and no freight\r\nis calculated - a carrier charge reaches the job when a shipping label is bought for a\r\nshipment, not when the shipment is created. The new shipment also carries no job lines:\r\nlines belong to the job, not to a shipment, so there is nothing to allocate and the\r\nrequest does not name any.\r\n<br>\r\nThe job's own delivery option is set to this shipment's delivery method.\r\n<br>\r\nNote for callers that patch shipping: once a job has more than one shipment, a\r\nPATCH /Jobs/{jobNumber}/shipping without a `shipmentId` is rejected, because it\r\ncan no longer be resolved to a single shipment. Adding a shipment therefore changes how\r\nthose calls behave on this job. Always patch by id -\r\nPATCH /Jobs/{jobNumber}/shipping/{shipmentId}.\r\n",
        "parameters": [
          {
            "name": "jobNumber",
            "in": "path",
            "description": "The job to add the shipment to",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "The shipment to create",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_CreateJobShipmentDto"
                  }
                ],
                "description": "A new shipment to add to an existing job."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_CreateJobShipmentDto"
                  }
                ],
                "description": "A new shipment to add to an existing job."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_CreateJobShipmentDto"
                  }
                ],
                "description": "A new shipment to add to an existing job."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_CreateJobShipmentDto"
                  }
                ],
                "description": "A new shipment to add to an existing job."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Shipment created. The body is the new shipment; it also appears in shippingAddresses on GET /Jobs/{jobNumber}",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_ShippingAddress"
                }
              }
            }
          },
          "400": {
            "description": "The delivery method is unknown, or a delivery shipment is missing address fields. The body lists each problem as an errorCode and message.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Job is locked for editing (see response body for reason)",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Job not found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Jobs/{jobNumber}/shipments/{shipmentId}": {
      "delete": {
        "tags": [
          "JobShipments"
        ],
        "summary": "Remove a shipment from a job",
        "description": "Removes one of a job's shipments along with its delivery address. The other shipments\r\nare untouched.\r\n<br>\r\nA shipment that already has a shipping label cannot be removed here, because the label\r\nwould remain live with the carrier - it would still ship and still be charged for. Void\r\nthe label first, then remove the shipment.\r\n<br>\r\nA job must keep at least one shipment, so removing the last one is refused. A shipment\r\nalready marked complete is also refused.\r\n<br>\r\nRemoving a shipment does not change the price of the job. Only a shipment with no\r\nlabel can be removed, and a job's freight charge belongs to the label.\r\n",
        "parameters": [
          {
            "name": "jobNumber",
            "in": "path",
            "description": "The job the shipment belongs to",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "shipmentId",
            "in": "path",
            "description": "The shipment to remove, from shippingAddresses[].shipmentId on GET /Jobs/{jobNumber}",
            "required": true,
            "schema": {
              "maximum": 2147483647,
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Shipment removed"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Job is locked for editing (see response body for reason)",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Job not found, or the supplied shipmentId is not a shipment of this job",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The shipment has a shipping label, is complete, or is the job's only shipment (see response body)",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Lookups/process-codes": {
      "get": {
        "tags": [
          "Lookups"
        ],
        "summary": "Get list of available process codes",
        "description": "Returns a list of manufacturing process codes available to you, ordered by rank (ascending).",
        "responses": {
          "200": {
            "description": "Successfully retrieved process codes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_ProcessCodeDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Access denied - user lacks required role",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "An error occurred",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Lookups/job-statuses": {
      "get": {
        "tags": [
          "Lookups"
        ],
        "summary": "Get list of available process codes",
        "description": "Returns a list of manufacturing process codes available to you, ordered by rank (ascending).",
        "responses": {
          "200": {
            "description": "Successfully retrieved process codes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobStatusDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "An error occurred",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/Lookups/countries": {
      "get": {
        "tags": [
          "Lookups"
        ],
        "summary": "Get list of available countries",
        "description": "Returns a list of countries available for address selection, along with the tenant's default country.",
        "responses": {
          "200": {
            "description": "Successfully retrieved countries",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_CountryListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "An error occurred",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Lookups/countries/{countryCode}/states": {
      "get": {
        "tags": [
          "Lookups"
        ],
        "summary": "Get list of states/provinces for a country",
        "description": "Returns a list of states/provinces/regions for the specified country code.\r\nSome countries may return an empty list if they don't have administrative divisions.",
        "parameters": [
          {
            "name": "countryCode",
            "in": "path",
            "description": "ISO 3166-1 alpha-2 country code (e.g., US, NZ, GB)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved states",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StateListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "An error occurred",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Lookups/size-sets": {
      "get": {
        "tags": [
          "Lookups"
        ],
        "summary": "Get list of available size templates for inwards/sizing operations.",
        "responses": {
          "200": {
            "description": "Successfully retrieved size sets",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_InwardsSizeSetDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "An error occurred",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/Lookups/inwards-statuses": {
      "get": {
        "tags": [
          "Lookups"
        ],
        "summary": "Get list of available inwards statuses.",
        "responses": {
          "200": {
            "description": "Successfully retrieved inwards statuses",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_InwardsStatusDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "An error occurred",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/account/payment-methods": {
      "get": {
        "tags": [
          "PaymentMethods"
        ],
        "summary": "Get saved payment method",
        "description": "Returns the most recent non-deleted credit card token for the authenticated customer.\r\nCard numbers are masked for security (e.g., ****1234).",
        "responses": {
          "200": {
            "description": "Payment method retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_PaymentMethod"
                }
              }
            }
          },
          "404": {
            "description": "No payment method found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "User is not authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "PaymentMethods"
        ],
        "summary": "Complete a token save transaction",
        "description": "Completes any pending token save transaction. Works with all payment gateways.\r\n            \r\nUse cases:\r\n- For Elements flow: Called after stripe.confirmCardSetup() succeeds\r\n- For hosted flows: Can be used for manual completion if callback failed\r\n            \r\nVerifies the transaction status with the gateway and saves the payment method.",
        "requestBody": {
          "description": "Request containing the transaction ID",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_CompleteTokenSaveRequest"
                  }
                ],
                "description": "Request to complete a token save transaction."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_CompleteTokenSaveRequest"
                  }
                ],
                "description": "Request to complete a token save transaction."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_CompleteTokenSaveRequest"
                  }
                ],
                "description": "Request to complete a token save transaction."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_CompleteTokenSaveRequest"
                  }
                ],
                "description": "Request to complete a token save transaction."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Transaction completed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_CompleteTokenSaveResponse"
                }
              }
            }
          },
          "400": {
            "description": "Transaction failed or invalid state",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Transaction not found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "User is not authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/account/payment-methods/initiate/{paymentGateway}": {
      "post": {
        "tags": [
          "PaymentMethods"
        ],
        "summary": "Initiate token save using embedded Elements flow",
        "description": "Creates a SetupIntent and returns the clientSecret and publishableKey for use with\r\nthe payment gateway's JavaScript SDK (e.g., Stripe.js Elements). This provides an\r\nembedded card collection experience without redirecting to a hosted payment page.\r\n            \r\nCurrently supported gateways: stripe\r\n            \r\nThe currency selects which payment gateway the card is saved with; when omitted, the\r\norganisation's accounting currency is used, and the requested gateway must be the one\r\nthat handles that currency. A customer may hold one saved card per gateway. If a card\r\nis already saved with the selected gateway, this returns 400 Bad Request and the\r\nexisting card must be deleted before a new one can be added.",
        "parameters": [
          {
            "name": "paymentGateway",
            "in": "path",
            "description": "Payment gateway name (e.g., \"stripe\")",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "description": "Currency the saved card will be billed in, as a 3-letter ISO 4217 code. Defaults to the organisation's accounting currency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "SetupIntent created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_InitiateElementsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Payment method already exists, invalid request, or unsupported gateway",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "User is not authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/account/payment-methods/{id}": {
      "delete": {
        "tags": [
          "PaymentMethods"
        ],
        "summary": "Delete payment method",
        "description": "Deletes (soft delete) the specified payment method.\r\nThe payment method must belong to the authenticated customer.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Payment method GUID to delete",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payment method deleted successfully"
          },
          "404": {
            "description": "Payment method not found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "User is not authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/PriceCodes/{priceCode}": {
      "get": {
        "tags": [
          "PriceCodes"
        ],
        "summary": "Gets the priceCodes for the current Customer",
        "parameters": [
          {
            "name": "priceCode",
            "in": "path",
            "description": "The Price Code to find",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dgX",
            "in": "query",
            "description": "(optional)Needed if the PriceCode has additional MetaData requirements",
            "schema": {
              "type": "number",
              "format": "double",
              "default": 0
            }
          },
          {
            "name": "dgY",
            "in": "query",
            "description": "(optional)Needed if the PriceCode has additional MetaData requirements",
            "schema": {
              "type": "number",
              "format": "double",
              "default": 0
            }
          },
          {
            "name": "stitches",
            "in": "query",
            "description": "(optional)Needed if the PriceCode has additional MetaData requirements",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Pricing_PriceCodeDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/PriceCodes/price-codes": {
      "get": {
        "tags": [
          "PriceCodes"
        ],
        "summary": "Gets the priceCodes for the current Customer",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "The page number",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "The size of the Page in rows",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 25
            }
          },
          {
            "name": "filter",
            "in": "query",
            "description": "(optional)If supplied will filter the search results",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Pricing_PriceCodeDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/PriceCodes/processes": {
      "get": {
        "tags": [
          "PriceCodes"
        ],
        "summary": "Get list of pricing processes from the Pricing database",
        "description": "Returns all processes from the Pricing database Process table, ordered by SheetRank.",
        "responses": {
          "200": {
            "description": "Successfully retrieved pricing processes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_PricingProcessesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Access denied - user lacks required permissions",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "An error occurred",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/pricing/price-tiers/{tierCode}/categories": {
      "get": {
        "tags": [
          "PriceTierPricing"
        ],
        "summary": "List the processes and categories a price tier shows, with the tier's setup and reset charges.",
        "description": "Processes and categories the tier's filters exclude are left out, as are categories with no units. Processes\r\nare ordered by code and keep an empty list when they have no categories; categories are in price sheet order.\r\nThe stock items process is listed without its categories, which are priced per stock code.",
        "parameters": [
          {
            "name": "tierCode",
            "in": "path",
            "description": "The tier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The processes with their categories.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_PriceTierProcessDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "The tier code is not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not allowed to manage pricing.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "There is no tier with that code.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The categories could not be read."
          }
        }
      }
    },
    "/pricing/price-tiers/{tierCode}/categories/{categoryCode}/charges": {
      "put": {
        "tags": [
          "PriceTierPricing"
        ],
        "summary": "Set a category's setup and reset charges in a price tier.",
        "description": "Both charges and both flags are replaced; a blank charge is stored as 0. The charges are added when the tier has\r\nnone set for the category yet.",
        "parameters": [
          {
            "name": "tierCode",
            "in": "path",
            "description": "The tier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "categoryCode",
            "in": "path",
            "description": "The category.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The charges.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_SavePriceTierChargesRequest"
                  }
                ],
                "description": "A category's setup and reset charges in a tier. A blank charge means 0."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_SavePriceTierChargesRequest"
                  }
                ],
                "description": "A category's setup and reset charges in a tier. A blank charge means 0."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_SavePriceTierChargesRequest"
                  }
                ],
                "description": "A category's setup and reset charges in a tier. A blank charge means 0."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_SavePriceTierChargesRequest"
                  }
                ],
                "description": "A category's setup and reset charges in a tier. A blank charge means 0."
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The charges were saved."
          },
          "400": {
            "description": "The codes or charges are invalid. Each error names the field in `data.property`.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not allowed to manage pricing, or has no user name to record the change against.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "There is no tier or category with that code.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Another save or delete held the tier; nothing was written. Retry after the Retry-After seconds."
          },
          "500": {
            "description": "The charges could not be saved."
          }
        }
      }
    },
    "/pricing/price-tiers/{tierCode}/categories/{categoryCode}/prices": {
      "get": {
        "tags": [
          "PriceTierPricing"
        ],
        "summary": "Get a category's prices in a price tier: each unit with its quantity bands.",
        "description": "A band's price is a price per item for a UNIT band and a markup percentage for a MARKUP band. Each band carries\r\nthe amounts of the category's extra charges on it.",
        "parameters": [
          {
            "name": "tierCode",
            "in": "path",
            "description": "The tier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "categoryCode",
            "in": "path",
            "description": "The category.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The category's units and bands.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_PriceTierPricesDto"
                }
              }
            }
          },
          "400": {
            "description": "The codes are not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not allowed to manage pricing.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "There is no tier or category with that code, or the tier's filters exclude the category.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The prices could not be read."
          }
        }
      },
      "put": {
        "tags": [
          "PriceTierPricing"
        ],
        "summary": "Change the prices of some of a category's quantity bands in a price tier.",
        "description": "Every listed band's price, min charge and listed extra charges are replaced, all or none; quantity ranges are not\r\nchanged. A blank min charge or extra charge is stored as 0.",
        "parameters": [
          {
            "name": "tierCode",
            "in": "path",
            "description": "The tier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "categoryCode",
            "in": "path",
            "description": "The category.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The new prices.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_UpdatePriceTierPricesRequest"
                  }
                ],
                "description": "New prices for some of a category's existing bands in a tier. Quantity ranges are not changed."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_UpdatePriceTierPricesRequest"
                  }
                ],
                "description": "New prices for some of a category's existing bands in a tier. Quantity ranges are not changed."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_UpdatePriceTierPricesRequest"
                  }
                ],
                "description": "New prices for some of a category's existing bands in a tier. Quantity ranges are not changed."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_UpdatePriceTierPricesRequest"
                  }
                ],
                "description": "New prices for some of a category's existing bands in a tier. Quantity ranges are not changed."
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The prices were saved."
          },
          "400": {
            "description": "The codes or prices are invalid. Each error names the field in `data.property`, e.g. `bands[2].price`.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not allowed to manage pricing, or has no user name to record the change against.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "There is no tier with that code.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "A band or extra charge is not, or is no longer, the category's in this tier. Reload and try again.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Another save or delete held the tier; nothing was written. Retry after the Retry-After seconds."
          },
          "500": {
            "description": "The prices could not be saved."
          }
        }
      }
    },
    "/pricing/price-tiers": {
      "get": {
        "tags": [
          "PriceTiers"
        ],
        "summary": "List price tiers, a page at a time.",
        "description": "Active and inactive tiers, ordered by code. Read the next page while `hasNext` is true.",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "The page, starting at 1. Defaults to 1; anything lower reads page 1, and a page past the last holds no tiers.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "Tiers per page, at most 200. Defaults to 20; a larger size is cut to 200.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The page of tiers, with the number of tiers and pages in all.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IPagedDataOf1Codewolf_Ctrl_Api_Dto_PriceTierDto"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not allowed to manage pricing.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The tiers could not be read."
          }
        }
      }
    },
    "/pricing/price-tiers/{tierCode}": {
      "put": {
        "tags": [
          "PriceTiers"
        ],
        "summary": "Change a price tier's description, active flag and notes.",
        "description": "All three values are replaced; blank text is stored as none. An inactive tier is no longer offered but keeps\r\nits prices.",
        "parameters": [
          {
            "name": "tierCode",
            "in": "path",
            "description": "The tier to change.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The new values.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_UpdatePriceTierRequest"
                  }
                ],
                "description": "The values of a price tier that can be changed."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_UpdatePriceTierRequest"
                  }
                ],
                "description": "The values of a price tier that can be changed."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_UpdatePriceTierRequest"
                  }
                ],
                "description": "The values of a price tier that can be changed."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_UpdatePriceTierRequest"
                  }
                ],
                "description": "The values of a price tier that can be changed."
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "The tier was changed."
          },
          "400": {
            "description": "The code or values are invalid. Each error names the field in `data.property`.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not allowed to manage pricing, or has no user name to record the change against.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "There is no tier with that code.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Another save or delete held the tier; nothing was written. Retry after the Retry-After seconds."
          },
          "500": {
            "description": "The tier could not be changed."
          }
        }
      },
      "delete": {
        "tags": [
          "PriceTiers"
        ],
        "summary": "Delete a price tier with all its prices, charges and stitch discounts. This cannot be undone.",
        "description": "The default tier cannot be deleted.",
        "parameters": [
          {
            "name": "tierCode",
            "in": "path",
            "description": "The tier to delete.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The tier was deleted."
          },
          "400": {
            "description": "The code is not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not allowed to manage pricing, or has no user name to record the change against.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "There is no tier with that code.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The tier is the default tier.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Another save or delete held the tier; nothing was written. Retry after the Retry-After seconds."
          },
          "500": {
            "description": "The tier could not be deleted."
          }
        }
      }
    },
    "/pricing/price-tiers/{tierCode}/copies": {
      "post": {
        "tags": [
          "PriceTiers"
        ],
        "summary": "Copy a price tier to a new active tier, changing its prices by percentages.",
        "description": "The new tier gets the source tier's setup and reset charges, quantity band prices, extra charges, stitch\r\ndiscounts and filters. Per-unit prices, markup percentages, setups and resets each change by their own\r\npercentage (negative lowers them); minimum charges change too when `markupMinCharges` is true. Setups or\r\nresets can instead be turned off in the new tier. The caller is recorded as the tier's creator.",
        "parameters": [
          {
            "name": "tierCode",
            "in": "path",
            "description": "The tier to copy.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The new tier and the changes.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_CopyPriceTierRequest"
                  }
                ],
                "description": "A new tier made from an existing one, with its prices changed by percentages. A blank percentage means 0."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_CopyPriceTierRequest"
                  }
                ],
                "description": "A new tier made from an existing one, with its prices changed by percentages. A blank percentage means 0."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_CopyPriceTierRequest"
                  }
                ],
                "description": "A new tier made from an existing one, with its prices changed by percentages. A blank percentage means 0."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_CopyPriceTierRequest"
                  }
                ],
                "description": "A new tier made from an existing one, with its prices changed by percentages. A blank percentage means 0."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The tier was copied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_CopyPriceTierResponse"
                }
              }
            }
          },
          "400": {
            "description": "The values are invalid, or the new code is taken, including by another copy that finished while this one waited. Each error names the field in `data.property`.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not allowed to manage pricing, or has no user name to record the change against.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "There is no tier with the code to copy.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Another save or delete held the tier to copy, or another copy to the same new code was still running; nothing was written. Retry after the Retry-After seconds."
          },
          "500": {
            "description": "The tier could not be copied."
          }
        }
      }
    },
    "/promocode/validate/{code}": {
      "get": {
        "tags": [
          "PromoCodes"
        ],
        "summary": "Validate promo code",
        "description": "Validates a promo code for the authenticated customer.\r\nChecks if the code exists, is active, not expired, and hasn't exceeded usage limits (overall or per-customer).\r\nOptionally validates that the promo code is applicable to specific process codes.\r\n            \r\nReturns:\r\n- isValid: Whether the promo code can be used\r\n- promoCode: The promo code that was validated\r\n- discount: Discount amount (cents if isFixed=true, percentage if isFixed=false)\r\n- isFixed: true for fixed amount discount, false for percentage discount\r\n- message: Error message if not valid (expired, max uses reached, not applicable to process, etc.)",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "description": "Promo code to validate",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "processCodes",
            "in": "query",
            "description": "Optional comma-separated list of process codes (e.g., \"Embroidery,Printing\") from ProcessRank.Process",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Promo code validation result returned successfully (check isValid field)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_ValidatePromocodeResponse"
                }
              }
            }
          },
          "401": {
            "description": "User is not authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/quotes": {
      "post": {
        "tags": [
          "QuoteCreate"
        ],
        "summary": "Create a quote for a customer, priced from the price list.",
        "description": "Each decoration is priced at each of its garment's quantities, at the quote's price tier: a price code from the\r\nprice list, using the stitch count or size it is priced by; an asset from its own prices, or its time charge\r\nspread over the quantity. A quoted price sent for a quantity replaces the list price; the list price is kept\r\nalongside it. The listed setup charge always comes from the price list or the asset; a setup charge sent\r\nreplaces only the setup charge quoted.\r\n<br>\r\nThe quote is recorded as created by the person the API key or token was issued to, who must be a staff user\r\nwith an approved, unlocked intranet login. It is not sent to the customer.\r\n",
        "requestBody": {
          "description": "The quote to create.",
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_CreateQuoteDto"
                  }
                ],
                "description": "A quote to create."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The quote was created. The Location header is the address that reads it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_CreatedQuoteDto"
                }
              }
            }
          },
          "400": {
            "description": "The quote was not created. The body lists each problem with its error code and names the field in `data.property`: no body; a customer that is unknown or not active; a contact that is not the customer's; an unknown price tier; no garments or too many; quantities that are missing, below 1, repeated or too many; too many decorations; an unknown decoration type; an item code that is missing, unknown or has no prices at the tier; a detail the price code does not take or whose value is out of range; a quoted price for a quantity the garment does not have, repeated, or out of range; a setup charge out of range; or text too long. A body that is not valid JSON, or a value of the wrong type, is refused with the standard validation problem body instead.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Interfaces_IValidationError"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated. A request with a body that is not JSON, or not valid JSON, is refused with 415 or 400 before the caller is checked.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not allowed to create quotes: the caller does not hold the CtrlUser role, is a service account or an API key issued to no user, or the user has no active staff login, or that login is not approved or is locked out.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The body was sent with a content type other than JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The quote could not be created. Usually nothing was saved, but if the failure came as the save was being completed the quote may exist: look for it before sending the request again."
          },
          "503": {
            "description": "The database did not save the quote in time or abandoned it. Nothing was saved; send the same request again."
          }
        }
      }
    },
    "/account/shipment-addresses": {
      "get": {
        "tags": [
          "ShipmentAddresses"
        ],
        "summary": "Get a page of saved shipment addresses",
        "description": "Returns the addresses the authenticated customer can ship to: the customer's own addresses,\r\naddresses saved against its users, and addresses used on its previous jobs, with duplicates removed.",
        "parameters": [
          {
            "name": "term",
            "in": "query",
            "description": "Case-insensitive text the address's mailing label must contain. Empty returns every address.",
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "description": "Sort order, case-insensitive. Default (or default) groups by address source, then mailing label A-Z;\r\n            Alpha (alpha, alpha-asc) is mailing label A-Z; AlphaDesc (alpha-desc) is mailing label Z-A;\r\n            Date (date, date-asc) is date entered, oldest first; DateDesc (date-desc) is date entered, newest first.\r\n            Any other value returns 400.",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Enums_ShipmentAddressSortBy"
                }
              ],
              "description": "Sort orders available when listing a customer's shipment addresses.",
              "default": "Default"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number to return, starting at 1.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "Addresses per page, 1-50. Defaults to 20.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of shipment addresses",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedDataOf1Codewolf_Ctrl_Api_Dto_Api_ShipmentAddressDto"
                }
              }
            }
          },
          "400": {
            "description": "A query parameter is invalid",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller has no customer context, or does not have one of the allowed roles",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Stock/{code}": {
      "get": {
        "tags": [
          "Stock"
        ],
        "summary": "Get a List of stock and its variants",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "description": "A stock Code or stock variant code",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includePricing",
            "in": "query",
            "description": "",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "variantSortColumn",
            "in": "query",
            "description": "",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Enums_VariantSortColumn"
                }
              ],
              "default": "VariantCode"
            }
          },
          {
            "name": "variantSortDirection",
            "in": "query",
            "description": "",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Enums_SortDirection"
                }
              ],
              "default": "Ascending"
            }
          },
          {
            "name": "includeArchived",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Stocks_StockDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/Stock": {
      "get": {
        "tags": [
          "Stock"
        ],
        "summary": "Get a List of stock and its variants",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "The page number",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "The size of the Page in rows",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 25
            }
          },
          {
            "name": "filter",
            "in": "query",
            "description": "(optional)If supplied will filter the search results",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includePricing",
            "in": "query",
            "description": "",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "stockSortColumn",
            "in": "query",
            "description": "",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Enums_StockSortColumn"
                }
              ],
              "default": "StockCode"
            }
          },
          {
            "name": "stockSortDirection",
            "in": "query",
            "description": "",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Enums_SortDirection"
                }
              ],
              "default": "Ascending"
            }
          },
          {
            "name": "variantSortColumn",
            "in": "query",
            "description": "",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Enums_VariantSortColumn"
                }
              ],
              "default": "VariantCode"
            }
          },
          {
            "name": "variantSortDirection",
            "in": "query",
            "description": "",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Enums_SortDirection"
                }
              ],
              "default": "Ascending"
            }
          },
          {
            "name": "markets",
            "in": "query",
            "description": "CW-4317: optional comma-separated list of market codes (e.g. \"US,NZ\"). When\r\nsupplied, only stock items with at least one ACTIVE shipping configuration\r\ncovering ANY of the listed markets are returned (OR semantics). Input is\r\ntrimmed, uppercased, and de-duplicated. Omitted or empty => no market filter\r\n(existing behaviour). The filter is applied at the SQL level so pagination\r\nstays correct.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code",
            "in": "query",
            "description": "Optional exact match against a stock code or any of its variant codes. Matched exactly\r\nand not trimmed, so leading whitespace is significant; a value over the maximum code\r\nlength returns 400. Combined with filter when both are supplied.\r\nBecause a code is not guaranteed unique across stock codes and variant codes, this may\r\nreturn more than one item.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "in": "query",
            "description": "When true, retired stock and its variants are included. Defaults to false. Stock hidden\r\nfrom the API by configuration is never returned, regardless of this setting.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Stocks_StockDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "token": [ ]
          }
        ]
      }
    },
    "/pricing/stock-gateway/addendums/{tierCode}": {
      "get": {
        "tags": [
          "StockGatewayPricing"
        ],
        "summary": "Reads a price tier's Stock Gateway pricing addendum: its default rule and supplier overrides, the suppliers\r\nand supplier tiers it can name, and the latest run.",
        "parameters": [
          {
            "name": "tierCode",
            "in": "path",
            "description": "The price tier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The addendum; its rule is null when the tier has none yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingAddendumDto"
                }
              }
            }
          },
          "400": {
            "description": "The tier code is blank",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not a super user, admin or price admin",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The price tier does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                }
              }
            }
          },
          "503": {
            "description": "A pricing change held the addendum too long to read; the same request can be sent again",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "StockGatewayPricing"
        ],
        "summary": "Saves a price tier's Stock Gateway pricing addendum, replacing its supplier overrides, and requests the\r\nAPPLY run that writes the tier's prices. When an APPLY run is already waiting to start, that run picks the\r\nchange up and is returned instead.",
        "description": "Send back as `expectedUpdatedAt` the `rule.updatedAt` the addendum was read with, exactly as it was\r\nreceived, or null when the tier had no addendum. When someone else has saved the tier's addendum since, nothing\r\nis saved and the answer is 409; read the addendum again before saving. The APPLY run is processed only while\r\nStock Gateway ingestion is on for the tenant; until then it waits to start.",
        "parameters": [
          {
            "name": "tierCode",
            "in": "path",
            "description": "The price tier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The default rule, the supplier overrides and the last save they were read with",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_SaveStockGatewayPricingAddendumRequestDto"
                  }
                ],
                "description": "A price tier's Stock Gateway pricing addendum to save."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_SaveStockGatewayPricingAddendumRequestDto"
                  }
                ],
                "description": "A price tier's Stock Gateway pricing addendum to save."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_SaveStockGatewayPricingAddendumRequestDto"
                  }
                ],
                "description": "A price tier's Stock Gateway pricing addendum to save."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_SaveStockGatewayPricingAddendumRequestDto"
                  }
                ],
                "description": "A price tier's Stock Gateway pricing addendum to save."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "It was saved; the APPLY run that will write the prices, with `updatedAt`, the addendum's new last save",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingSavedRunDto"
                }
              }
            }
          },
          "400": {
            "description": "The addendum is not valid; `messages` lists every reason",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not signed in, or has no name to record the change under",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not a super user, admin or price admin",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The price tier does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                }
              }
            }
          },
          "409": {
            "description": "The tier's addendum was changed by someone else since `expectedUpdatedAt`; nothing was saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                }
              }
            }
          },
          "503": {
            "description": "Another pricing change was in progress; nothing was saved and the same request can be sent again",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                }
              }
            }
          },
          "500": {
            "description": "The server's supplier tier configuration could not be read or is not valid; nothing was saved",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/pricing/stock-gateway/addendums/{tierCode}/copy": {
      "post": {
        "tags": [
          "StockGatewayPricing"
        ],
        "summary": "Copies a price tier's saved Stock Gateway pricing addendum - its default rule and supplier overrides - to\r\nother tiers, replacing any addendum they have, and requests the APPLY run that writes their prices. Every\r\ntier is stored, or none is. When an APPLY run is already waiting to start, that run picks the change up and\r\nis returned instead.",
        "description": "The APPLY run is processed only while Stock Gateway ingestion is on for the tenant; until then it waits to start.",
        "parameters": [
          {
            "name": "tierCode",
            "in": "path",
            "description": "The price tier whose addendum is copied",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The tiers to copy it to, at most 200",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_CopyStockGatewayPricingAddendumRequestDto"
                  }
                ],
                "description": "The price tiers a tier's Stock Gateway pricing addendum is to be copied to."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_CopyStockGatewayPricingAddendumRequestDto"
                  }
                ],
                "description": "The price tiers a tier's Stock Gateway pricing addendum is to be copied to."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_CopyStockGatewayPricingAddendumRequestDto"
                  }
                ],
                "description": "The price tiers a tier's Stock Gateway pricing addendum is to be copied to."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_CopyStockGatewayPricingAddendumRequestDto"
                  }
                ],
                "description": "The price tiers a tier's Stock Gateway pricing addendum is to be copied to."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "It was copied; the APPLY run that will write the prices",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingRunDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingSavedRunDto"
                    }
                  ],
                  "description": "A requested or completed Stock Gateway pricing run."
                }
              }
            }
          },
          "400": {
            "description": "The copy is not valid, for example it names more than 200 tiers; `messages` lists every reason",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not signed in, or has no name to record the change under",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not a super user, admin or price admin",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The price tier being copied does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                }
              }
            }
          },
          "409": {
            "description": "The tier has no saved addendum to copy, or its addendum changed while it was being copied; nothing was copied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                }
              }
            }
          },
          "503": {
            "description": "Another pricing change was in progress; nothing was copied and the same request can be sent again",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                }
              }
            }
          },
          "500": {
            "description": "The server's supplier tier configuration could not be read or is not valid; nothing was copied",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/pricing/stock-gateway/tiers": {
      "get": {
        "tags": [
          "StockGatewayPricing"
        ],
        "summary": "Lists every active price tier, with whether each already has a Stock Gateway pricing addendum.",
        "responses": {
          "200": {
            "description": "The tiers, by tier code",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingTierSummaryDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The caller is not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not a super user, admin or price admin",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/pricing/stock-gateway/runs": {
      "post": {
        "tags": [
          "StockGatewayPricing"
        ],
        "summary": "Requests a Stock Gateway pricing run: APPLY writes the prices of every tier with an addendum, PREVIEW\r\ncomputes them without writing. When a run of that kind is already waiting to start, that run is returned\r\ninstead.",
        "description": "The run is processed only while Stock Gateway ingestion is on for the tenant; until then it waits to start.",
        "requestBody": {
          "description": "The kind of run, and the tier that prompted it",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_RequestStockGatewayPricingRunRequestDto"
                  }
                ],
                "description": "A Stock Gateway pricing run to request."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_RequestStockGatewayPricingRunRequestDto"
                  }
                ],
                "description": "A Stock Gateway pricing run to request."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_RequestStockGatewayPricingRunRequestDto"
                  }
                ],
                "description": "A Stock Gateway pricing run to request."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_RequestStockGatewayPricingRunRequestDto"
                  }
                ],
                "description": "A Stock Gateway pricing run to request."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The run, waiting for the ingestion service",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingRunDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingSavedRunDto"
                    }
                  ],
                  "description": "A requested or completed Stock Gateway pricing run."
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid; `messages` lists every reason",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not signed in, or has no name to record the request under",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not a super user, admin or price admin",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The price tier does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                }
              }
            }
          },
          "503": {
            "description": "Another pricing change was in progress; no run was requested and the same request can be sent again",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                }
              }
            }
          }
        }
      }
    },
    "/pricing/stock-gateway/runs/{runId}": {
      "get": {
        "tags": [
          "StockGatewayPricing"
        ],
        "summary": "Reads a Stock Gateway pricing run: its status, its counts and, once it has finished, what it did or would do.",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "description": "The run",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The run",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingRunDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingSavedRunDto"
                    }
                  ],
                  "description": "A requested or completed Stock Gateway pricing run."
                }
              }
            }
          },
          "400": {
            "description": "The run id is below 1",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not a super user, admin or price admin",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The run does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                }
              }
            }
          }
        }
      }
    },
    "/stock/gateway/regions": {
      "get": {
        "tags": [
          "StockGatewaySetup"
        ],
        "summary": "Lists the Stock Gateway regions the tenant can connect to. Only regions that have a gateway are listed.",
        "responses": {
          "200": {
            "description": "The regions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayRegionDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The caller is not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not a super user or admin",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The saved settings could not be read",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                    }
                  ],
                  "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
                }
              }
            }
          }
        }
      }
    },
    "/stock/gateway/connection": {
      "get": {
        "tags": [
          "StockGatewaySetup"
        ],
        "summary": "Reads how the Stock Gateway connection is set up. The API key is never returned, only\r\nwhether one is saved and its last four characters.",
        "responses": {
          "200": {
            "description": "The connection's status, which says when the saved settings could not be read, when the saved region is no\r\nlonger available, and when nothing is saved yet but the site already calls its own default gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayConnectionStatusDto"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not a super user or admin",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "StockGatewaySetup"
        ],
        "summary": "Saves the region and API key the tenant connects with. Saving never starts or stops ingestion.",
        "requestBody": {
          "description": "The region, and the API key unless only the region is changing",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_SaveStockGatewayConnectionRequestDto"
                  }
                ],
                "description": "The region and API key to connect to the Stock Gateway with."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_SaveStockGatewayConnectionRequestDto"
                  }
                ],
                "description": "The region and API key to connect to the Stock Gateway with."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_SaveStockGatewayConnectionRequestDto"
                  }
                ],
                "description": "The region and API key to connect to the Stock Gateway with."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_SaveStockGatewayConnectionRequestDto"
                  }
                ],
                "description": "The region and API key to connect to the Stock Gateway with."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "It was saved",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                    }
                  ],
                  "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid, for example the key holds spaces or no key was given and none is saved",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                    }
                  ],
                  "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
                }
              }
            }
          },
          "401": {
            "description": "The caller is not signed in, or has no name to record the change under",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not a super user or admin",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The region is not available",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                    }
                  ],
                  "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
                }
              }
            }
          },
          "409": {
            "description": "Nothing was changed. The message says which: another Stock Gateway change was in progress, or the save\r\nfailed (try again as it is); the saved settings changed while this was being saved (reload and try again);\r\na supplier still holds a trade account (the message names them; disconnect those accounts first) and either\r\na different region is already saved, or no region and key are saved yet and the gateway address the host is\r\nconfigured with differs from the chosen region's; or the saved settings could not be read",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                    }
                  ],
                  "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
                }
              }
            }
          }
        }
      }
    },
    "/stock/gateway/connection/test": {
      "post": {
        "tags": [
          "StockGatewaySetup"
        ],
        "summary": "Tests a Stock Gateway connection, with the region and key given or, when they are omitted,\r\nthe saved ones. Nothing is saved.",
        "requestBody": {
          "description": "The region and key to test; the body may be omitted to test the saved connection",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_TestStockGatewayConnectionRequestDto"
                  }
                ],
                "description": "The values to test a Stock Gateway connection with. Anything omitted is taken from the saved connection."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_TestStockGatewayConnectionRequestDto"
                  }
                ],
                "description": "The values to test a Stock Gateway connection with. Anything omitted is taken from the saved connection."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_TestStockGatewayConnectionRequestDto"
                  }
                ],
                "description": "The values to test a Stock Gateway connection with. Anything omitted is taken from the saved connection."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_TestStockGatewayConnectionRequestDto"
                  }
                ],
                "description": "The values to test a Stock Gateway connection with. Anything omitted is taken from the saved connection."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What the test found, whether or not the connection worked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayConnectionTestDto"
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid, for example the key holds spaces",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                    }
                  ],
                  "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
                }
              }
            }
          },
          "401": {
            "description": "The caller is not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not a super user or admin",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The region is not available",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                    }
                  ],
                  "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
                }
              }
            }
          },
          "409": {
            "description": "The saved settings could not be read, so the test was not run",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                    }
                  ],
                  "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
                }
              }
            }
          }
        }
      }
    },
    "/stock/gateway/ingestion": {
      "put": {
        "tags": [
          "StockGatewaySetup"
        ],
        "summary": "Starts or stops Stock Gateway ingestion for the tenant. Once started it runs on its normal\r\nschedule; starting it does not run an import straight away.",
        "requestBody": {
          "description": "Whether ingestion should run",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_SetStockGatewayIngestionRequestDto"
                  }
                ],
                "description": "Switches Stock Gateway ingestion on or off."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_SetStockGatewayIngestionRequestDto"
                  }
                ],
                "description": "Switches Stock Gateway ingestion on or off."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_SetStockGatewayIngestionRequestDto"
                  }
                ],
                "description": "Switches Stock Gateway ingestion on or off."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_SetStockGatewayIngestionRequestDto"
                  }
                ],
                "description": "Switches Stock Gateway ingestion on or off."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "It was switched",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                    }
                  ],
                  "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                    }
                  ],
                  "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
                }
              }
            }
          },
          "401": {
            "description": "The caller is not signed in, or has no name to record the change under",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not a super user or admin",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Nothing was changed. The message says which: no available region and API key are saved yet; the saved\r\nsettings could not be read; they changed while this was being saved (reload and try again); or the save\r\nfailed (try again as it is)",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                    }
                  ],
                  "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
                }
              }
            }
          }
        }
      }
    },
    "/stock/gateway/suppliers/{supplierKey}": {
      "put": {
        "tags": [
          "StockGatewaySupplier"
        ],
        "summary": "Switches ingestion of a gateway supplier on or off and pairs it with a Control supplier, or\r\nunpairs it when no Control supplier is given. Pairing it with a different Control supplier, or unpairing\r\nit, disconnects its trade account. Ingestion may be switched on before the supplier's stock code prefix and\r\ncategory are saved; nothing is imported for it until they are.",
        "parameters": [
          {
            "name": "supplierKey",
            "in": "path",
            "description": "The gateway supplier's key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Whether to ingest it, and the Control supplier its stock is created under",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_SetStockGatewaySupplierIngestRequestDto"
                  }
                ],
                "description": "Switches ingestion of one gateway supplier on or off and pairs it with a Control supplier."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_SetStockGatewaySupplierIngestRequestDto"
                  }
                ],
                "description": "Switches ingestion of one gateway supplier on or off and pairs it with a Control supplier."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_SetStockGatewaySupplierIngestRequestDto"
                  }
                ],
                "description": "Switches ingestion of one gateway supplier on or off and pairs it with a Control supplier."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_SetStockGatewaySupplierIngestRequestDto"
                  }
                ],
                "description": "Switches ingestion of one gateway supplier on or off and pairs it with a Control supplier."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "It was changed; the body carries the supplier as the supplier list now shows it, and a message when its\r\ntrade account was disconnected. The supplier is null when it could not be read back in time; the change\r\nwas still made, so reload the supplier list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid, for example ingestion was switched on without a Control supplier",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                    }
                  ],
                  "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
                }
              }
            }
          },
          "401": {
            "description": "The caller is not signed in, or has no name to record the change under",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not a super user or admin",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "There is no such Control supplier, or the gateway does not offer the supplier in the saved region",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                }
              }
            }
          },
          "409": {
            "description": "It was refused, for example because the Control supplier is inactive, is already paired with another\r\ngateway supplier, the gateway refused the request, no usable region and API key are saved yet, the saved\r\nsettings could not be read, the pairing was changed by someone else meanwhile (reload and try again), or\r\nanother Stock Gateway change was in progress (try again as it is). When the supplier's trade account was\r\ndisconnected on the gateway but the pairing could not then be saved, the message says so",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                }
              }
            }
          },
          "502": {
            "description": "The gateway did not answer, or answered without a result, and the pairing was not changed. When it was disconnecting the supplier's trade\r\naccount, whether that account was disconnected is unknown; trying again is safe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                }
              }
            }
          }
        }
      }
    },
    "/stock/gateway/suppliers/{supplierKey}/settings": {
      "get": {
        "tags": [
          "StockGatewaySupplier"
        ],
        "summary": "Reads how a gateway supplier's stock is turned into Control stock, and the Control supplier the settings\r\nbelong to. Send that Control supplier back when saving them.",
        "parameters": [
          {
            "name": "supplierKey",
            "in": "path",
            "description": "The gateway supplier's key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The settings, with the Control supplier they were read from",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPairedSupplierSettingsDto"
                }
              }
            }
          },
          "400": {
            "description": "The supplier key is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                    }
                  ],
                  "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
                }
              }
            }
          },
          "401": {
            "description": "The caller is not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not a super user or admin",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No Control supplier is paired with the gateway supplier",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                    }
                  ],
                  "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "StockGatewaySupplier"
        ],
        "summary": "Saves how a gateway supplier's stock is turned into Control stock. Settings not listed here\r\nare left as they are.",
        "parameters": [
          {
            "name": "supplierKey",
            "in": "path",
            "description": "The gateway supplier's key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The settings, and the Control supplier the settings read returned for them",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_SaveStockGatewaySupplierSettingsRequestDto"
                  }
                ],
                "description": "A gateway supplier's settings to save, with the Control supplier they were loaded for."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_SaveStockGatewaySupplierSettingsRequestDto"
                  }
                ],
                "description": "A gateway supplier's settings to save, with the Control supplier they were loaded for."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_SaveStockGatewaySupplierSettingsRequestDto"
                  }
                ],
                "description": "A gateway supplier's settings to save, with the Control supplier they were loaded for."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_SaveStockGatewaySupplierSettingsRequestDto"
                  }
                ],
                "description": "A gateway supplier's settings to save, with the Control supplier they were loaded for."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "They were saved; the body carries the `settingsVersion` to send with the next save",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid, or a setting is not accepted; the body says which",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                    }
                  ],
                  "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
                }
              }
            }
          },
          "401": {
            "description": "The caller is not signed in, or has no name to record the change under",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not a super user or admin",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No Control supplier is paired with the gateway supplier",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                }
              }
            }
          },
          "409": {
            "description": "They were refused, for example because the gateway supplier is now paired with a different Control\r\nsupplier than the one they were read from, someone else saved the supplier's settings after the\r\n`settingsVersion` sent was read, or the supplier's settings were changed by someone else during the save\r\n(reload and try again); another Stock Gateway change was in progress (try again as it is); the supplier's\r\nstored settings cannot be updated; or the saved settings could not be read",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                }
              }
            }
          }
        }
      }
    },
    "/stock/gateway/suppliers/{supplierKey}/account": {
      "post": {
        "tags": [
          "StockGatewaySupplier"
        ],
        "summary": "Connects a gateway supplier's trade account, so its prices and stock are read as the\r\ntenant sees them. The credentials go straight to the gateway; they are never stored or returned.\r\nAn account already connected for the supplier is replaced and disconnected.",
        "parameters": [
          {
            "name": "supplierKey",
            "in": "path",
            "description": "The gateway supplier's key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The account's label and credentials",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_ConnectStockGatewaySupplierAccountRequestDto"
                  }
                ],
                "description": "The trade account to connect a gateway supplier with. The credentials go straight to the gateway\r\nand are never stored or returned by Control."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_ConnectStockGatewaySupplierAccountRequestDto"
                  }
                ],
                "description": "The trade account to connect a gateway supplier with. The credentials go straight to the gateway\r\nand are never stored or returned by Control."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_ConnectStockGatewaySupplierAccountRequestDto"
                  }
                ],
                "description": "The trade account to connect a gateway supplier with. The credentials go straight to the gateway\r\nand are never stored or returned by Control."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_ConnectStockGatewaySupplierAccountRequestDto"
                  }
                ],
                "description": "The trade account to connect a gateway supplier with. The credentials go straight to the gateway\r\nand are never stored or returned by Control."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "It was connected; the message says whether a replaced account was disconnected",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                    }
                  ],
                  "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid, for example a credential has no name or value",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                    }
                  ],
                  "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
                }
              }
            }
          },
          "401": {
            "description": "The caller is not signed in, or has no name to record the change under",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not a super user or admin",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No Control supplier is paired with the gateway supplier",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                    }
                  ],
                  "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
                }
              }
            }
          },
          "409": {
            "description": "The gateway refused the account, no usable region and API key are saved yet, or the saved settings could\r\nnot be read. Refused too when the gateway connected the account but it could not be recorded: the region\r\nwas changed meanwhile (reload and connect it again), another Stock Gateway change was in progress (try again\r\nas it is), or the save failed. The account is then disconnected again on the gateway it was made on, and\r\nthe message says so, or says to ask Codewolf to remove it when that failed too",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                    }
                  ],
                  "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
                }
              }
            }
          },
          "502": {
            "description": "The gateway did not answer, or answered without a result. It may still have connected the account without\r\nit being recorded here; the message says what to do before trying again",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                    }
                  ],
                  "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "StockGatewaySupplier"
        ],
        "summary": "Disconnects a gateway supplier's trade account, and any earlier account the gateway could not\r\ndisconnect before.",
        "parameters": [
          {
            "name": "supplierKey",
            "in": "path",
            "description": "The gateway supplier's key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "It was disconnected, or the gateway had already dropped it",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                    }
                  ],
                  "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
                }
              }
            }
          },
          "400": {
            "description": "The supplier key is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                    }
                  ],
                  "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
                }
              }
            }
          },
          "401": {
            "description": "The caller is not signed in, or has no name to record the change under",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not a super user or admin",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No Control supplier is paired with the gateway supplier",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                    }
                  ],
                  "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
                }
              }
            }
          },
          "409": {
            "description": "No account is connected, the gateway refused to disconnect it, no usable region and API key are saved\r\nyet, or the saved settings could not be read; the account is still connected. When the gateway did\r\ndisconnect it but it could not be cleared here, for example because another Stock Gateway change was in\r\nprogress, the message starts by saying it was disconnected on the gateway, and Disconnect can be tried\r\nagain as it is",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                    }
                  ],
                  "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
                }
              }
            }
          },
          "502": {
            "description": "The gateway did not answer, or answered without a result, so whether it disconnected the account is\r\nunknown. Disconnect is safe to try again: disconnecting an account the gateway has already dropped succeeds",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                    }
                  ],
                  "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
                }
              }
            }
          }
        }
      }
    },
    "/stock/gateway/suppliers/{supplierKey}/import": {
      "put": {
        "tags": [
          "StockGatewaySupplierImport"
        ],
        "summary": "Switches the scheduled import of a paired gateway supplier's catalogue on or off, keeping its pairing.\r\nWhile a supplier's import is off its existing stock can be matched and renamed, and its stock is not priced.",
        "parameters": [
          {
            "name": "supplierKey",
            "in": "path",
            "description": "The gateway supplier's key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Whether to import",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_SetStockGatewaySupplierImportRequestDto"
                  }
                ],
                "description": "Switches the import of one paired gateway supplier on or off, keeping its pairing."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_SetStockGatewaySupplierImportRequestDto"
                  }
                ],
                "description": "Switches the import of one paired gateway supplier on or off, keeping its pairing."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_SetStockGatewaySupplierImportRequestDto"
                  }
                ],
                "description": "Switches the import of one paired gateway supplier on or off, keeping its pairing."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_SetStockGatewaySupplierImportRequestDto"
                  }
                ],
                "description": "Switches the import of one paired gateway supplier on or off, keeping its pairing."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "It was changed; the body carries the supplier as the supplier list now shows it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                    }
                  ],
                  "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
                }
              }
            }
          },
          "401": {
            "description": "The caller is not signed in, or has no name to record the change under",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not a super user, admin or stock admin",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The gateway does not offer the supplier in the saved region",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                }
              }
            }
          },
          "409": {
            "description": "It was refused, for example because no Control supplier is paired with it, its settings are not complete,\r\nthe saved settings could not be read, or another Stock Gateway change was in progress",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                }
              }
            }
          },
          "502": {
            "description": "The gateway did not answer, and nothing was changed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                }
              }
            }
          }
        }
      }
    },
    "/stock/gateway/suppliers": {
      "get": {
        "tags": [
          "StockGatewaySupplierList"
        ],
        "summary": "Lists the gateway suppliers in the connected region, what each offers, whether it is\r\ningested, the Control supplier it is paired with and how its last run ended. Paired suppliers\r\nthe gateway no longer offers here are listed too, so they can be unpaired.",
        "responses": {
          "200": {
            "description": "The gateway suppliers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSetupDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The caller is not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not a super user or admin",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "No usable region and API key are saved yet, the saved settings could not be read, or the gateway refused\r\nthe request",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                    }
                  ],
                  "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
                }
              }
            }
          },
          "502": {
            "description": "The gateway did not answer",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto"
                    },
                    {
                      "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto"
                    }
                  ],
                  "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
                }
              }
            }
          }
        }
      }
    },
    "/stock/gateway/control-suppliers": {
      "get": {
        "tags": [
          "StockGatewaySupplierList"
        ],
        "summary": "Lists the Control suppliers a gateway supplier can be paired with, and the gateway supplier\r\neach is already paired with.",
        "responses": {
          "200": {
            "description": "The Control suppliers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayControlSupplierDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The caller is not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not a super user or admin",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/stock/gateway/settings-options": {
      "get": {
        "tags": [
          "StockGatewaySupplierList"
        ],
        "summary": "Lists the Control values a supplier's import settings can refer to: the stock categories that have a\r\ncategory code (for the default category and the category map) and the size sets (for the one-size set).",
        "responses": {
          "200": {
            "description": "The stock categories and size sets",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySettingsOptionsDto"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not a super user or admin",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/stock/gateway/ingestion-health": {
      "get": {
        "tags": [
          "StockGatewaySupplierList"
        ],
        "summary": "Reports how Stock Gateway ingestion is doing: whether it is switched on, whether the gateway accepts the API\r\nkey, and for each paired supplier how its sync, catalogue, stock import, image copy and pricing are doing,\r\nwith its recent runs and the most common reasons behind any gaps.",
        "description": "Each area is `Correct`, `Gaps` (running, but something was left out), `Failing` (failed, overdue,\r\nor the API key was rejected) or `NotRunning`. When ingestion is not switched on, every area is\r\n`NotRunning`. The result is reused for about two minutes; `generatedAt` says when it was worked out.",
        "parameters": [
          {
            "name": "refresh",
            "in": "query",
            "description": "True to work the health out again now rather than return the recent one; one worked out in the last 10\r\nseconds is still returned.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The ingestion health",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayIngestionHealthDto"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not a super user or admin",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/stock/import/suppliers": {
      "get": {
        "tags": [
          "StockImport"
        ],
        "summary": "Lists the suppliers whose catalogues can be turned into stock, and how each is configured.",
        "responses": {
          "200": {
            "description": "The suppliers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Controllers_StockImportSupplierDto"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "StockImport"
        ],
        "summary": "Creates stock for every supplier whose stock import is enabled.",
        "description": "Reports what would be created without creating it. One report is returned per supplier\r\nconsidered, including those whose configuration stopped them running. Writing is the\r\nworker's job, not this endpoint's.",
        "responses": {
          "200": {
            "description": "One report per supplier considered",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockImportReport"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/stock/import/suppliers/{supplierId}": {
      "post": {
        "tags": [
          "StockImport"
        ],
        "summary": "Creates stock for one supplier from its mirrored catalogue.",
        "description": "Reports what would be created without creating it, so a supplier's whole range can be\r\nreviewed before it is written. Writing is the worker's job, not this endpoint's.",
        "parameters": [
          {
            "name": "supplierId",
            "in": "path",
            "description": "The supplier to import",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "What the run would do",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockImportReport"
                }
              }
            }
          },
          "409": {
            "description": "The supplier is not configured for stock import, or its configuration is unusable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockImportReport"
                }
              }
            }
          }
        }
      }
    },
    "/stock/import/suppliers/{supplierId}/adopt": {
      "post": {
        "tags": [
          "StockImport"
        ],
        "summary": "Matches stock already held for a supplier to its mirrored catalogue.",
        "description": "Run this before a supplier's first import. Stock entered by hand carries no gateway\r\nidentifier, so without it the import treats the supplier's whole range as new and\r\ncreates a second copy of it. Reports what it would match unless\r\ndryRun is set to false. It only matches where exactly one candidate\r\nexists on each side; everything else is reported for a person to settle.",
        "parameters": [
          {
            "name": "supplierId",
            "in": "path",
            "description": "The supplier whose existing stock should be matched",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "dryRun",
            "in": "query",
            "description": "False to write the links. Defaults to true, which writes nothing.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "What was matched, or would be",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockAdoptionReport"
                }
              }
            }
          },
          "409": {
            "description": "The supplier is not configured, its catalogue is not mirrored yet, or links were asked for\r\nwhile its import is switched on (the worker is then writing its stock, so only a dry run is allowed)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockAdoptionReport"
                }
              }
            }
          }
        }
      }
    },
    "/stock/import/suppliers/{supplierId}/size-resolution": {
      "get": {
        "tags": [
          "StockImport"
        ],
        "summary": "Reports which of a supplier's stock sizes, linked to its Stock Gateway catalogue, do not match\r\nexactly one size the supplier offers.",
        "description": "Stock for a linked size is read from the gateway variant it matches. A size listed here matches\r\nno gateway variant, or several, so its stock is read by its supplier SKU instead, which usually\r\nfinds nothing. Every linked size is counted, active or not; the listed sizes come a page at a\r\ntime, active sizes first.",
        "parameters": [
          {
            "name": "supplierId",
            "in": "path",
            "description": "The supplier to check",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "The page of unresolved sizes to return, starting at 1",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "How many unresolved sizes to return on a page; at most 200",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "How many linked sizes were checked and resolved, and one page of those that did not resolve",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySizeResolutionDto"
                }
              }
            }
          },
          "400": {
            "description": "The supplier id or page is not a positive number, or the page size is not between 1 and 200",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The caller is not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not allowed to manage stock imports",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The supplier is unknown or does not source stock from the Stock Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/stock/{stockItemId}/shipping": {
      "get": {
        "tags": [
          "StockItemShipping"
        ],
        "summary": "Get all active shipping configurations for a stock item.",
        "parameters": [
          {
            "name": "stockItemId",
            "in": "path",
            "description": "The stock item ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of shipping configurations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockItemShippingDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid stock item ID",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "StockItemShipping"
        ],
        "summary": "Create a new shipping configuration for a stock item.",
        "parameters": [
          {
            "name": "stockItemId",
            "in": "path",
            "description": "The stock item ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "The shipping configuration to create",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockItemShippingCreateDto"
                  }
                ],
                "description": "Request DTO for creating a new stock item shipping configuration."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockItemShippingCreateDto"
                  }
                ],
                "description": "Request DTO for creating a new stock item shipping configuration."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockItemShippingCreateDto"
                  }
                ],
                "description": "Request DTO for creating a new stock item shipping configuration."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockItemShippingCreateDto"
                  }
                ],
                "description": "Request DTO for creating a new stock item shipping configuration."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Shipping configuration created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockItemShippingDto"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/stock/{stockItemId}/shipping/{id}": {
      "get": {
        "tags": [
          "StockItemShipping"
        ],
        "summary": "Get a single shipping configuration for a stock item.",
        "parameters": [
          {
            "name": "stockItemId",
            "in": "path",
            "description": "The stock item ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "The shipping configuration ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The shipping configuration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockItemShippingDto"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "StockItemShipping"
        ],
        "summary": "Update an existing shipping configuration for a stock item.",
        "parameters": [
          {
            "name": "stockItemId",
            "in": "path",
            "description": "The stock item ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "The shipping configuration ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "The updated shipping configuration",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockItemShippingUpdateDto"
                  }
                ],
                "description": "Request DTO for updating an existing stock item shipping configuration.\r\nStockItemId is immutable and identified via the route."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockItemShippingUpdateDto"
                  }
                ],
                "description": "Request DTO for updating an existing stock item shipping configuration.\r\nStockItemId is immutable and identified via the route."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockItemShippingUpdateDto"
                  }
                ],
                "description": "Request DTO for updating an existing stock item shipping configuration.\r\nStockItemId is immutable and identified via the route."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockItemShippingUpdateDto"
                  }
                ],
                "description": "Request DTO for updating an existing stock item shipping configuration.\r\nStockItemId is immutable and identified via the route."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Shipping configuration updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockItemShippingDto"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Shipping configuration not found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "StockItemShipping"
        ],
        "summary": "Soft-delete a shipping configuration for a stock item.\r\nSets the Active flag to false. The record is not physically deleted.",
        "parameters": [
          {
            "name": "stockItemId",
            "in": "path",
            "description": "The stock item ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "The shipping configuration ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Shipping configuration deleted successfully"
          },
          "404": {
            "description": "Shipping configuration not found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/stock/shipping": {
      "get": {
        "tags": [
          "StockItemShipping"
        ],
        "summary": "Get all active stock item shipping configurations for a specific market.\r\nPrimary query used by Integrate for fetching all shipping metadata for a region.",
        "parameters": [
          {
            "name": "market",
            "in": "query",
            "description": "The market code (e.g., US, AU, NZ, UK)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of stock item shipping configurations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockItemShippingDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Market is required",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/stock/matching/suppliers/{supplierId}/run": {
      "post": {
        "tags": [
          "StockMatching"
        ],
        "summary": "Runs every matching stage for one supplier: duplicates, exact code, colour name and\r\nalias, then the AI judge on what is left when AI stock matching is switched on.",
        "description": "Reports what it would do unless dryRun is false. A dry run does not ask\r\nthe AI, so it costs no tokens, and it counts the items a real run would send. When the AI\r\nis not used, the result says why (`MODULE_DISABLED`, `NO_API_KEY` or `PREVIEW`)\r\nand the rule-based stages still run.",
        "parameters": [
          {
            "name": "supplierId",
            "in": "path",
            "description": "The supplier to match",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "dryRun",
            "in": "query",
            "description": "False to save proposals and write links. Defaults to true.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "What the run did, or would do",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockMatchRunResultDto"
                }
              }
            }
          },
          "400": {
            "description": "The supplier id is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The supplier is not configured, or writes were asked for while its import is switched on",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockMatchRunResultDto"
                }
              }
            }
          }
        }
      }
    },
    "/stock/matching/suppliers/{supplierId}/candidates": {
      "get": {
        "tags": [
          "StockMatching"
        ],
        "summary": "Lists a supplier's candidates, with each old item's variants and each proposed\r\nproduct's colourways.",
        "parameters": [
          {
            "name": "supplierId",
            "in": "path",
            "description": "The supplier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Only candidates with this status; all when omitted",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockMatchStatus"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The candidates",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockMatchCandidate"
                  }
                }
              }
            }
          },
          "400": {
            "description": "The supplier id is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The supplier does not source stock from the Stock Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/stock/matching/candidates/{id}/approve": {
      "post": {
        "tags": [
          "StockMatching"
        ],
        "summary": "Approves one pending candidate, optionally with the reviewer's own product or colours.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The candidate",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "The override and Exo confirmation; omit the body to approve as proposed",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_ApproveStockMatchCandidateRequestDto"
                  }
                ],
                "description": "A reviewer's approval of one candidate."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_ApproveStockMatchCandidateRequestDto"
                  }
                ],
                "description": "A reviewer's approval of one candidate."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_ApproveStockMatchCandidateRequestDto"
                  }
                ],
                "description": "A reviewer's approval of one candidate."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_ApproveStockMatchCandidateRequestDto"
                  }
                ],
                "description": "A reviewer's approval of one candidate."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What the approval did",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockMatchDecisionResult"
                }
              }
            }
          },
          "400": {
            "description": "The candidate id is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The caller has no name to record the decision under",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "There is no such candidate",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockMatchDecisionResult"
                }
              }
            }
          },
          "409": {
            "description": "The approval was refused, for example because the Exo check was not confirmed; the\r\nresult says why",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockMatchDecisionResult"
                }
              }
            }
          }
        }
      }
    },
    "/stock/matching/candidates/{id}/reject": {
      "post": {
        "tags": [
          "StockMatching"
        ],
        "summary": "Rejects one candidate. The same proposal is not made again for its subject.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The candidate",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "Why it was rejected; the body may be omitted",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_RejectStockMatchCandidateRequestDto"
                  }
                ],
                "description": "A reviewer's rejection of one candidate."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_RejectStockMatchCandidateRequestDto"
                  }
                ],
                "description": "A reviewer's rejection of one candidate."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_RejectStockMatchCandidateRequestDto"
                  }
                ],
                "description": "A reviewer's rejection of one candidate."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_RejectStockMatchCandidateRequestDto"
                  }
                ],
                "description": "A reviewer's rejection of one candidate."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "It was rejected",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockMatchDecisionResult"
                }
              }
            }
          },
          "400": {
            "description": "The candidate id or the reason is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The caller has no name to record the decision under",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "There is no such candidate",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockMatchDecisionResult"
                }
              }
            }
          },
          "409": {
            "description": "It cannot be rejected in its current status; the result says why",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockMatchDecisionResult"
                }
              }
            }
          }
        }
      }
    },
    "/stock/matching/candidates/approve": {
      "post": {
        "tags": [
          "StockMatching"
        ],
        "summary": "Approves several pending candidates as proposed, each on its own.",
        "description": "One result is returned per distinct id, including those that were refused, so the\r\nreviewer can see which rows still need attention.",
        "requestBody": {
          "description": "The candidate ids and the Exo confirmation",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_ApproveStockMatchCandidatesRequestDto"
                  }
                ],
                "description": "A reviewer's approval of several candidates as proposed."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_ApproveStockMatchCandidatesRequestDto"
                  }
                ],
                "description": "A reviewer's approval of several candidates as proposed."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_ApproveStockMatchCandidatesRequestDto"
                  }
                ],
                "description": "A reviewer's approval of several candidates as proposed."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_ApproveStockMatchCandidatesRequestDto"
                  }
                ],
                "description": "A reviewer's approval of several candidates as proposed."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "One result per candidate",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockMatchDecisionResult"
                  }
                }
              }
            }
          },
          "400": {
            "description": "No ids, too many ids, or an id that is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The caller has no name to record the decisions under",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/stock/matching/candidates/reject": {
      "post": {
        "tags": [
          "StockMatching"
        ],
        "summary": "Rejects several candidates, each on its own and for the same reason. A rejected candidate leaves\r\nthe stock as it is, and the same proposal is not made again for its subject.",
        "description": "One result is returned per distinct id, including those that could not be rejected in their\r\ncurrent status, so the reviewer can see which rows still need attention.",
        "requestBody": {
          "description": "The candidate ids and the reason",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_RejectStockMatchCandidatesRequestDto"
                  }
                ],
                "description": "A reviewer's rejection of several candidates, all for the same reason."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_RejectStockMatchCandidatesRequestDto"
                  }
                ],
                "description": "A reviewer's rejection of several candidates, all for the same reason."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_RejectStockMatchCandidatesRequestDto"
                  }
                ],
                "description": "A reviewer's rejection of several candidates, all for the same reason."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_RejectStockMatchCandidatesRequestDto"
                  }
                ],
                "description": "A reviewer's rejection of several candidates, all for the same reason."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "One result per candidate",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockMatchDecisionResult"
                  }
                }
              }
            }
          },
          "400": {
            "description": "No ids, too many ids, an id that is not valid, or a reason that is too long",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The caller has no name to record the decisions under",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/stock/matching/suppliers/{supplierId}/map": {
      "get": {
        "tags": [
          "StockMatching"
        ],
        "summary": "Reads a supplier's permanent old-to-new stock code map.",
        "parameters": [
          {
            "name": "supplierId",
            "in": "path",
            "description": "The supplier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The map rows",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockCodeMapEntry"
                  }
                }
              }
            }
          },
          "400": {
            "description": "The supplier id is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The supplier does not source stock from the Stock Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/stock/matching/suppliers/{supplierId}/products": {
      "get": {
        "tags": [
          "StockMatching"
        ],
        "summary": "Searches a supplier's mirrored catalogue by style code or title, ignoring case, so a\r\nreviewer can choose a different product or match an item nothing was proposed for.",
        "description": "Only that supplier's own products are returned. Colourways have the same shape as a\r\ncandidate's product colourways.",
        "parameters": [
          {
            "name": "supplierId",
            "in": "path",
            "description": "The supplier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Text the style code or title contains; omit it to list the first products",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "take",
            "in": "query",
            "description": "The most products to return, 20 by default and at most 50",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The products, best match first, with their colourways",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockMatchProductDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "The supplier id or the search text is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The supplier does not source stock from the Stock Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/stock/onboarding/suppliers/{supplierId}/preview": {
      "post": {
        "tags": [
          "StockOnboarding"
        ],
        "summary": "Reports what onboarding the supplier would do: the stock it would link, the AI matches waiting for review it\r\nwould approve automatically, the codes it would change, the review candidates it would leave, and what the\r\nimport would create. Writes nothing and calls no AI.",
        "parameters": [
          {
            "name": "supplierId",
            "in": "path",
            "description": "The supplier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "bestGuess",
            "in": "query",
            "description": "Previews a best-guess run, with how many review candidates each rule would settle; allowed while the\r\nsupplier's import is on",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "What onboarding would do, and what it would leave not done with why",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockOnboardingReport"
                }
              }
            }
          },
          "400": {
            "description": "The supplier id is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The supplier is not configured, its import can run (switch its Import off first, unless previewing a best\r\nguess), or another run for it is in progress; `configurationErrors` says which",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockOnboardingReport"
                }
              }
            }
          }
        }
      }
    },
    "/stock/onboarding/suppliers/{supplierId}/run": {
      "post": {
        "tags": [
          "StockOnboarding"
        ],
        "summary": "Onboards the supplier: matching (with the AI judge when AI stock matching is on and asked for), the rename\r\nof every linked item and variant still on an old code, the history pass, then the import of what no existing\r\nstock claims. Every step commits as it goes, so a run that stops part-way can be run again.",
        "parameters": [
          {
            "name": "supplierId",
            "in": "path",
            "description": "The supplier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Whether to use the AI judge, the Exo confirmation for a supplier managed in Exo, and whether to onboard on a\r\nbest guess",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockOnboardingRunRequestDto"
                  }
                ],
                "description": "How to onboard a supplier."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockOnboardingRunRequestDto"
                  }
                ],
                "description": "How to onboard a supplier."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockOnboardingRunRequestDto"
                  }
                ],
                "description": "How to onboard a supplier."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockOnboardingRunRequestDto"
                  }
                ],
                "description": "How to onboard a supplier."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What was done, and everything not done with why",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockOnboardingReport"
                }
              }
            }
          },
          "400": {
            "description": "The supplier id is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "No reviewer could be identified",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Refused, as for the preview; a best guess is not refused for an import that can run, but is when that import\r\ncould not be switched off. `configurationErrors` says why",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockOnboardingReport"
                }
              }
            }
          }
        }
      }
    },
    "/stock/retirement/suppliers/{supplierId}/run": {
      "post": {
        "tags": [
          "StockRetirement"
        ],
        "summary": "Applies every approved or deferred retirement for one supplier.",
        "description": "Reports what it would do unless dryRun is false. Stock still on an\r\nopen job, or held for an Exo-managed supplier without the Exo check confirmed, is\r\ndeferred with the reason and retried on the next run.",
        "parameters": [
          {
            "name": "supplierId",
            "in": "path",
            "description": "The supplier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "dryRun",
            "in": "query",
            "description": "False to write. Defaults to true, which writes nothing.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One action per candidate, done or planned",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockRetirementReport"
                }
              }
            }
          },
          "400": {
            "description": "The supplier id is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The supplier is not configured, or writes were asked for while its import is switched on",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockRetirementReport"
                }
              }
            }
          }
        }
      }
    },
    "/stock/retirement/suppliers/{supplierId}/rename": {
      "post": {
        "tags": [
          "StockRetirement"
        ],
        "summary": "Renames a supplier's stock items that are linked to Stock Gateway products, and their variants linked to\r\ncolourways, to the codes the supplier's import gives them, and rewrites every stored reference to the old codes.",
        "description": "Reports what it would do unless dryRun is false. Matching renames stock as it links it; this\r\nrenames linked stock it left on its old codes. An item takes the supplier's stock code prefix followed by the\r\nproduct's style code, and a variant the prefix followed by the colourway's own code.\r\n            \r\nEach item and its variants change in one transaction, with their price list row, every job line of every job,\r\nopen or closed, committed stock, BOMs, quote and cart stock lines, reprints and the code map. A variant whose\r\nExo code is blank keeps its old code as its Exo code, so external SKUs and gateway stock levels do not change.\r\nThe stock level ledger, the record log of the jobs, quotes and stock using the codes, and the scheduler's copies\r\nof those jobs are then rewritten in batches; rows too long for their column with the new code are left and\r\ncounted. Old codes still resolve for orders and stock lookups that carry them, and price codes built from an old\r\nitem code still price.\r\n            \r\nAn item or variant is refused when other stock, deleted or not, or another price list row already holds its new\r\ncode, when another rename in the run would take it, or when an asset tag or another process uses it; that stock\r\nneeds the Replaced handling instead. Stock whose code other stock shares, stock already renamed once, items whose\r\nprice list row a price tier would show differently, and variants linked to no colourway are left alone. An item\r\nleft alone holds its variants back with it. Every rename for a supplier whose stock is managed in Exo is deferred\r\nuntil exoChecked confirms the new codes were checked there, and renames are deferred while stock\r\nprices are being written. A supplier whose custom external SKU format, or custom single-size SKU format, includes\r\nthe stock code is not renamed.\r\n            \r\nThe report lists every item and variant code changed, the rows rewritten per table, and, per table, the\r\nreferences still naming an old code; after a run that writes, each should be 0. Shopify stores selling the stock\r\nneed their products synced again, and the accounting system needs the new codes before jobs carrying them are\r\ninvoiced.",
        "parameters": [
          {
            "name": "supplierId",
            "in": "path",
            "description": "The supplier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "dryRun",
            "in": "query",
            "description": "False to write. Defaults to true, which writes nothing.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "exoChecked",
            "in": "query",
            "description": "True to confirm the new codes were checked in Exo, for an Exo-managed supplier",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One action per linked item and its variants, done or planned, and the codes changed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockCodeRenameReport"
                }
              }
            }
          },
          "400": {
            "description": "The supplier id is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The supplier is not configured, has no valid stock code prefix, has a custom external SKU format or\r\ncustom single-size SKU format that includes the stock code, or another run for it is in progress",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockCodeRenameReport"
                }
              }
            }
          }
        }
      }
    },
    "/stock/retirement/suppliers/{supplierId}/rename/history": {
      "post": {
        "tags": [
          "StockRetirement"
        ],
        "summary": "Rewrites the history that still names a code a supplier's stock was changed from: the stock level ledger, the\r\nrecord log of the jobs, quotes and stock using the codes, the scheduler's copies of those jobs, and legacy quote\r\nand art extra lines. Then counts the references to old codes left in every table.",
        "description": "Reports what it would do unless dryRun is false. Renaming runs this pass itself; run it again\r\nwhen a pass was stopped or failed. Only rows written before each code changed are rewritten. Legacy art extra\r\nlines carry no date, so they are matched on the exact code and left when other stock now holds it; legacy quotes\r\nare rewritten only when dated more than a day before the change. A code is replaced only where it stands whole,\r\nnever inside a longer code, and rows that would be too long for their column, or that name a code changed to\r\nmore than one code, are left and counted.",
        "parameters": [
          {
            "name": "supplierId",
            "in": "path",
            "description": "The supplier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "dryRun",
            "in": "query",
            "description": "False to write. Defaults to true, which writes nothing.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The rows rewritten and left per table, and the references left",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockCodeHistoryReport"
                }
              }
            }
          },
          "400": {
            "description": "The supplier id is not valid",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The supplier is not configured, or another run for it is in progress",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockCodeHistoryReport"
                }
              }
            }
          }
        }
      }
    },
    "/tags/types": {
      "get": {
        "tags": [
          "Tags"
        ],
        "summary": "List the types of entity a tag can be put on.",
        "description": "Each type says which id identifies an entity of that type in `GET` and `POST /tags/{tagType}/{entityId}`.",
        "responses": {
          "200": {
            "description": "The types that take tags.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_TagTypeDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not allowed to read tags.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The types could not be read."
          }
        }
      }
    },
    "/tags/handles": {
      "get": {
        "tags": [
          "Tags"
        ],
        "summary": "List the users who can be named in a tag.",
        "description": "A tag names a user when one of its words is the user's handle: `@` followed by their login. A named user\r\nwhose login is approved and not locked out is notified when the tag is added. The list also holds users whose\r\nlogin is unapproved or locked out; naming one of them stores the tag but notifies nobody. Handles are returned\r\nin alphabetical order.",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "description": "Returns only handles that start with this text, ignoring case. The leading `@` is optional.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "The page to return, a whole number from 1. Defaults to 1.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "How many handles a page holds, a whole number from 1 to 200. Defaults to 50.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of handles. Empty when no handle matches.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IPagedDataOf1Codewolf_Ctrl_Api_Dto_TagHandleDto"
                }
              }
            }
          },
          "400": {
            "description": "`page` or `pageSize` is not a whole number in range. The body lists the problem with its error code and names the field in `data.property`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Interfaces_IValidationError"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not allowed to read tags.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The users could not be read."
          }
        }
      }
    },
    "/tags/{tagType}/{entityId}": {
      "get": {
        "tags": [
          "Tags"
        ],
        "summary": "Get the tags on a job, quote, inwards delivery, asset or stock item.",
        "description": "Tags are returned oldest first. Tags that recorded no time come first, in the order they were added. A tag\r\nadded with `POST` is written shortly after the request is accepted, so it may not be listed straight away.",
        "parameters": [
          {
            "name": "tagType",
            "in": "path",
            "description": "The type of entity: one of the types listed by `GET /tags/types`, in any case.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entityId",
            "in": "path",
            "description": "The entity's id, a positive whole number. `GET /tags/types` says which id each type uses.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The entity's tags. Empty when it has none.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Tags_TagDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "The type does not take tags, or the id is not a positive whole number. The body lists the problem with its error code and names the field in `data.property`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Interfaces_IValidationError"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not allowed to read tags.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "There is no entity of that type with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The tags could not be read."
          }
        }
      },
      "post": {
        "tags": [
          "Tags"
        ],
        "summary": "Add a tag to a job, quote, inwards delivery, asset or stock item.",
        "description": "The tag is recorded against the person the API key or token was issued to, who must be a staff user allowed\r\nto add tags to that type of entity. A key issued to no user and a service account name nobody, so they cannot\r\nadd tags.\r\n<br>\r\nThe tag is queued and written shortly afterwards, so `GET /tags/{tagType}/{entityId}` may not list it\r\nstraight away. It is stored in lower case with leading and trailing spaces removed. Adding a tag the entity\r\nalready has changes nothing and is still accepted.\r\n<br>\r\nA word that starts with `@` and matches a handle from `GET /tags/handles` names that user. The user\r\nis notified when their login is approved and not locked out. Only `tag` is read from the body.\r\n",
        "parameters": [
          {
            "name": "tagType",
            "in": "path",
            "description": "The type of entity: one of the types listed by `GET /tags/types`, in any case.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entityId",
            "in": "path",
            "description": "The entity's id, a positive whole number. `GET /tags/types` says which id each type uses.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The tag to add.",
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_AddTagDto"
                  }
                ],
                "description": "A tag to add."
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The tag is queued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_TagAcceptedDto"
                }
              }
            }
          },
          "400": {
            "description": "The type does not take tags, the id is not a positive whole number, the tag is missing or blank, or the tag is longer than 250 characters. The body lists each problem with its error code and names the field in `data.property`. A body that is not valid JSON is refused with the standard validation problem body instead. Nothing was queued.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Interfaces_IValidationError"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not allowed to add this tag: the caller is a service account or an API key issued to no user, the user has no active staff login, that login is not approved or is locked out, or the user's settings, as they stand when the request is made, do not allow them to add tags to this type of entity. Nothing was queued.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "There is no entity of that type with that id. Nothing was queued.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "415": {
            "description": "The body was sent with a content type other than JSON. Nothing was queued.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "The tag could not be queued."
          }
        }
      }
    },
    "/tags/{tagType}/{entityId}/{tagId}": {
      "delete": {
        "tags": [
          "Tags"
        ],
        "summary": "Remove a tag from a job, quote, inwards delivery, asset or stock item.",
        "description": "The removal is recorded against the person the API key or token was issued to, who must be a staff user allowed\r\nto remove tags from that type of entity. A key issued to no user and a service account name nobody, so they\r\ncannot remove tags. A protected tag, one whose `isProtected` is true in `GET /tags/{tagType}/{entityId}`,\r\ncannot be removed.\r\n<br>\r\nThe removal is queued and carried out shortly afterwards, so `GET /tags/{tagType}/{entityId}` may still list\r\nthe tag straight away. A tag that is already gone is not found. Two requests that remove the same tag at the same\r\ntime can both be accepted; the tag is removed once.\r\n<br>\r\nThe request is checked in this order, and the first failure is returned: the caller's credentials and access to\r\nthe tag routes (401, 403); the route values (400); whether the caller may remove tags from this type of entity\r\n(403); the entity and the tag (404); whether the tag is protected (409). The request has no body.\r\n",
        "parameters": [
          {
            "name": "tagType",
            "in": "path",
            "description": "The type of entity: one of the types listed by `GET /tags/types`, in any case.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entityId",
            "in": "path",
            "description": "The entity's id, a positive whole number. `GET /tags/types` says which id each type uses.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tagId",
            "in": "path",
            "description": "The tag's id, a positive whole number: the `id` of the tag in `GET /tags/{tagType}/{entityId}`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "The removal is queued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_TagRemovalAcceptedDto"
                }
              }
            }
          },
          "400": {
            "description": "The type does not take tags, or the entity id or the tag id is not a positive whole number. An id that is not a number, such as `abc`, is refused here rather than as not found. The body lists each problem with its error code and names the field in `data.property`. Nothing was queued.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Interfaces_IValidationError"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller is not allowed to remove this tag: the caller may not use the tag routes, is a service account or an API key issued to no user, the user has no active staff login, that login is not approved or is locked out, or the user's settings, as they stand when the request is made, do not allow them to remove tags from this type of entity. Nothing was queued.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "There is no entity of that type with that id, or the entity has no tag with that id. Nothing was queued.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The tag is protected, so it cannot be removed. The body holds the problem with its error code and names `tagId` in `data.property`. Nothing was queued.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Interfaces_IValidationError"
                  }
                }
              }
            }
          },
          "500": {
            "description": "The removal could not be queued."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Codewolf_Api_Support_AssetDtos_AssetExtendedDto": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_AssetDtos_AssetDto"
          }
        ],
        "properties": {
          "customerId": {
            "type": "integer",
            "description": "Customer Id",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Extends the AssetDto to include the CustomerId for SuperUser users who make the call"
      },
      "Codewolf_Api_Support_BomDtos_BomDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "BOM Id",
            "format": "int32"
          },
          "bomCode": {
            "type": "string",
            "description": "The code which identifies the BOM",
            "nullable": true
          },
          "title": {
            "type": "string",
            "description": "The BOM's title. Sourced from the BOM.Title column (previously BOM.Description before CW-4323).\r\nThis is the short descriptive name of the BOM used as the Shopify product title.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Plain-text description of the BOM. Sourced from the BOM.Description column (added in CW-4323).\r\nManually edited on the BOM edit page or auto-filled from the stock garment's StockSpecifications\r\nwhen the first stock item is added. Null if never populated.",
            "nullable": true
          },
          "range": {
            "type": "string",
            "description": "The range the BOM belongs to",
            "nullable": true
          },
          "customerSku": {
            "type": "string",
            "description": "Customer SKU code (if applicable)",
            "nullable": true
          },
          "active": {
            "type": "boolean",
            "description": "Whether the BOM is active. An archived (Active = false) BOM is excluded from the reads by\r\ndefault and is returned only when the caller asks for archived rows explicitly. Added in\r\nCW-4664 so a consumer can tell an archived BOM from an active one — previously an archived\r\nBOM simply vanished from the response with no way to distinguish it from one that never\r\nexisted. Hard-deleted BOMs (Deleted = 1) are never returned under any flag."
          },
          "imageUrl": {
            "type": "string",
            "description": "Absolute CDN URL for the BOM's image, or null when the BOM has no image uploaded.\r\nExample: \"https://tenant-domain.example.com/cdn/boms/UjHmCJKgOu\". Added in CW-4664.\r\nShares the URL shape and the underlying EntityFile lookup with `ShopBomDto.ImageUrl`.",
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Api_Support_BomDtos_BomItemDto"
            },
            "description": "The BOM's composition — the garment plus its branding lines. Populated only when the caller\r\nrequests it (`?includeItems=true`); `null` otherwise, so the default response shape\r\nis unchanged for existing consumers and the list endpoint does not fan out to one row per\r\nitem across thousands of BOMs. Added in CW-4664.",
            "nullable": true
          },
          "bomVariants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Api_Support_BomDtos_BomVariantDto"
            },
            "description": "The variants of this BOM (normally relates to sizes of the BOM)",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "describes a BOM (Bill of Materials) Lookup Item"
      },
      "Codewolf_Api_Support_BomDtos_BomExtendedDto": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Api_Support_BomDtos_BomDto"
          }
        ],
        "properties": {
          "customerId": {
            "type": "integer",
            "description": "Customer Id",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Extends the BomDto to include the CustomerId - for when the call comes in from a SuperUser"
      },
      "Codewolf_Api_Support_BomDtos_BomItemDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The BOM item's id. Stable, and the handle a future write endpoint would use to address a\r\nsingle item for edit or removal.",
            "format": "int32"
          },
          "assetCode": {
            "type": "string",
            "description": "The asset or stock variant code for this component. For the garment this is the stock\r\nvariant code; for a branding line it is the asset code.",
            "nullable": true
          },
          "isStockItem": {
            "type": "boolean",
            "description": "True for the garment, false for a branding line. There is at most one active stock item on\r\na BOM, and it is the item that determines the BOM's size run."
          },
          "processCode": {
            "type": "string",
            "description": "The process applied by this component (for example `STOCK` for the garment, or the\r\ndecoration process for a branding line). Derived from the asset code by the\r\n`tr_SetProcessCode` trigger.",
            "nullable": true
          },
          "position": {
            "type": "string",
            "description": "Where the component sits on the garment — for example \"Left chest\". Null on the garment\r\nitself and on any branding line where a position was never recorded.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One component of a BOM — either the garment or one of the branding lines applied to it.\r\nReturned on `BomDto.Items` when the caller passes `?includeItems=true`. Added in\r\nCW-4664 so a consumer can render a BOM as a product rather than as a code and a size list,\r\nand so a proof can be generated from the components and their positions."
      },
      "Codewolf_Api_Support_BomDtos_BomVariantDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The BOM variant's own identifier. Additive to the read surface: the variant write endpoint\r\naddresses a variant by this id, and there is no other way for a caller to obtain it.",
            "format": "int32"
          },
          "bomVariantCode": {
            "type": "string",
            "description": "The BOM variant code - relating to size variants",
            "nullable": true
          },
          "size": {
            "type": "string",
            "description": "The BOM Variant Size\r\nNOTE: if the Size string is equal to \"Qty\" then this implies it is one size fits all and the Qty should just be assigned",
            "nullable": true
          },
          "customerVariantSku": {
            "type": "string",
            "description": "Customer Variant SKU code (if applicable)",
            "nullable": true
          },
          "active": {
            "type": "boolean",
            "description": "Whether this variant is active. Added in CW-4664. A BOM with no active variants is not\r\norderable, and before this field a consumer could not tell such a BOM apart from one that\r\nnever had a size run — the variant join filtered inactive rows out silently. Inactive\r\nvariants are returned only when the caller asks for archived rows explicitly."
          }
        },
        "additionalProperties": false,
        "description": "defines the Variant of a BOM (this normally relates to size variants)"
      },
      "Codewolf_Ctrl_Api_Controllers_StockImportSupplierDto": {
        "type": "object",
        "properties": {
          "supplierId": {
            "type": "integer",
            "description": "The supplier's id.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "The supplier's name.",
            "nullable": true
          },
          "supplierKey": {
            "type": "string",
            "description": "The key its catalogue is mirrored under.",
            "nullable": true
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether stock creation is turned on for this supplier."
          },
          "stockCodePrefix": {
            "type": "string",
            "description": "The prefix added to the front of the supplier's own style codes.",
            "nullable": true
          },
          "defaultCategoryCode": {
            "type": "string",
            "description": "The stock category used when nothing more specific applies.",
            "nullable": true
          },
          "mappedCategoryCount": {
            "type": "integer",
            "description": "How many of the supplier's own categories are mapped to Control categories.",
            "format": "int32"
          },
          "importMappedCategoriesOnly": {
            "type": "boolean",
            "description": "Whether stock is created only for products in the supplier categories that are mapped."
          },
          "oneSizeSetId": {
            "type": "integer",
            "description": "The size set used for a product sold in a single size.",
            "format": "int32",
            "nullable": true
          },
          "createMissingSizeSets": {
            "type": "boolean",
            "description": "Whether the import may create a size set that does not yet exist."
          },
          "splitLargeSizes": {
            "type": "boolean",
            "description": "Whether a style's dearer, largest sizes are split into their own stock item."
          },
          "configurationValid": {
            "type": "boolean",
            "description": "Whether the configuration is usable as it stands."
          },
          "configurationErrors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What is wrong with the configuration, when anything is.",
            "nullable": true
          },
          "exoManaged": {
            "type": "boolean",
            "description": "Whether the supplier's stock is managed in Exo, so retiring or renaming it needs Exo checked first."
          }
        },
        "additionalProperties": false,
        "description": "A supplier whose catalogue can be turned into stock, and how it is configured."
      },
      "Codewolf_Ctrl_Api_Dto_AddJobCommentDto": {
        "type": "object",
        "properties": {
          "comment": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_Ctrl_Api_Dto_AddJobLineRequest": {
        "type": "object",
        "properties": {
          "parentJobLineId": {
            "type": "integer",
            "description": "Optional. The line the new line is grouped under: a stock or external-garment line on the\r\nsame job that heads its group and is not yet in production. The new line is placed after\r\nthat line's existing children. Cannot be combined with `groupHead` or `group`.",
            "format": "int32",
            "nullable": true
          },
          "line": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobLineBaseGrouping"
              },
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobLineBom"
              },
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobLineExternalGarment"
              },
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobLinePriceCode"
              },
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobLineStock"
              },
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_ReturnDtos_JobLineAsset"
              }
            ],
            "description": "Abstract class for a basic Job Line",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One line to add to a placed job."
      },
      "Codewolf_Ctrl_Api_Dto_AddJobLinesRequest": {
        "type": "object",
        "properties": {
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_AddJobLineRequest"
            },
            "description": "The lines to add, at most 100. Within the request, `groupHead` and `group` group\r\nnew lines as they do on POST /Jobs; a group's head and children must all be in the request.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Several lines to add to a placed job in one request, applied together or not at all."
      },
      "Codewolf_Ctrl_Api_Dto_AddTagDto": {
        "type": "object",
        "properties": {
          "tag": {
            "type": "string",
            "description": "The tag text, at most 250 characters once leading and trailing spaces are removed. It is stored in lower\r\ncase. A word that starts with @ and matches a user's login names that user.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A tag to add."
      },
      "Codewolf_Ctrl_Api_Dto_Api_AccountProfile": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Customer ID",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Customer name (for reference)",
            "nullable": true
          },
          "priceTierCode": {
            "type": "string",
            "description": "Customer's pricing tier code",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "Currency code for transactions",
            "nullable": true
          },
          "taxRateType": {
            "type": "string",
            "description": "Tax rate type (e.g., \"GST\", \"VAT\", \"Sales Tax\")",
            "nullable": true
          },
          "taxRate": {
            "type": "number",
            "description": "Tax rate percentage (null if using TaxJar or tax exempt)",
            "format": "double",
            "nullable": true
          },
          "taxSystemTaxExempt": {
            "type": "boolean",
            "description": "Whether customer is tax exempt"
          },
          "taxSystemTaxExemptReason": {
            "type": "string",
            "description": "Reason for tax exemption (if applicable)",
            "nullable": true
          },
          "showPayNow": {
            "type": "boolean",
            "description": "Whether to show \"Pay Now\" option"
          },
          "creditCardRequired": {
            "type": "boolean",
            "description": "Whether credit card is required for orders"
          },
          "shipmentCarriersCSV": {
            "type": "string",
            "description": "Comma-separated list of available shipment carriers",
            "nullable": true
          },
          "excludeShipmentsCsv": {
            "type": "string",
            "description": "Comma-separated list of excluded shipment types",
            "nullable": true
          },
          "courierAccountCode": {
            "type": "string",
            "description": "Customer's courier account code (if shipping on own account)",
            "nullable": true
          },
          "courierSiteID": {
            "type": "string",
            "description": "Courier site ID",
            "nullable": true
          },
          "crmId": {
            "type": "string",
            "description": "External CRM system ID (for reference only)",
            "nullable": true
          },
          "accountManagerName": {
            "type": "string",
            "description": "Account manager full name (FirstName LastName format)",
            "nullable": true
          },
          "accountManagerEmail": {
            "type": "string",
            "description": "Account manager email address",
            "nullable": true
          },
          "tierLast12Months": {
            "type": "string",
            "description": "Customer tier based on last 12 months of activity",
            "nullable": true
          },
          "paymentTermDays": {
            "type": "integer",
            "description": "Gets or sets the number of days allowed for payment after an invoice is issued.",
            "format": "int32",
            "nullable": true
          },
          "paymentTermType": {
            "type": "string",
            "description": "Gets or sets the type of payment terms (e.g., \"Net\", \"Due on Receipt\").",
            "nullable": true
          },
          "entityAddress": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_EntityAddressDto"
              }
            ],
            "description": "Entity (company) street address associated with this account",
            "nullable": true
          },
          "taxCertificates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_TaxCertificate"
            },
            "description": "List of tax exemption certificates for this account",
            "nullable": true
          },
          "paymentMode": {
            "type": "string",
            "description": "Payment mode for this customer (e.g., \"credit_card_required\", \"pay_up_front\").\r\nDetermines checkout behaviour for retail integrations.",
            "nullable": true
          },
          "paymentMethods": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_PaymentMethod"
            },
            "description": "List of saved payment methods for this account",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Account profile information for authenticated customer users.\r\nRead-only company/organization-level data.\r\nMatches what customers can currently see in the secure portal."
      },
      "Codewolf_Ctrl_Api_Dto_Api_AccountUserInfo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "User ID",
            "format": "int32"
          },
          "guid": {
            "type": "string",
            "description": "User GUID",
            "format": "uuid"
          },
          "customerId": {
            "type": "integer",
            "description": "Customer/account ID this user belongs to",
            "format": "int32"
          },
          "customerName": {
            "type": "string",
            "description": "Customer/company name",
            "nullable": true
          },
          "userName": {
            "type": "string",
            "description": "Login username",
            "nullable": true
          },
          "firstName": {
            "type": "string",
            "description": "First name",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "description": "Last name",
            "nullable": true
          },
          "emailAddress": {
            "type": "string",
            "description": "Email address",
            "nullable": true
          },
          "active": {
            "type": "boolean",
            "description": "Whether user is active (can log in)"
          },
          "phone": {
            "type": "string",
            "description": "Phone number",
            "nullable": true
          },
          "mobile": {
            "type": "string",
            "description": "Mobile number",
            "nullable": true
          },
          "streetAddress": {
            "type": "string",
            "description": "Street address line 1",
            "nullable": true
          },
          "addressLine2": {
            "type": "string",
            "description": "Street address line 2",
            "nullable": true
          },
          "suburb": {
            "type": "string",
            "description": "Suburb/neighborhood",
            "nullable": true
          },
          "city": {
            "type": "string",
            "description": "City",
            "nullable": true
          },
          "state": {
            "type": "string",
            "description": "State/province",
            "nullable": true
          },
          "postalCode": {
            "type": "string",
            "description": "Postal/ZIP code",
            "nullable": true
          },
          "country": {
            "type": "string",
            "description": "Country",
            "nullable": true
          },
          "locationID": {
            "type": "integer",
            "description": "Location ID (if multi-location enabled)",
            "format": "int32",
            "nullable": true
          },
          "locationName": {
            "type": "string",
            "description": "Location name (if multi-location enabled)",
            "nullable": true
          },
          "defaultPage": {
            "type": "string",
            "description": "Default landing page URL",
            "nullable": true
          },
          "orderNumberPrefix": {
            "type": "string",
            "description": "Custom order number prefix (max 5 chars)",
            "nullable": true
          },
          "receiveEmails": {
            "type": "boolean",
            "description": "Receive general emails"
          },
          "promotionRecipient": {
            "type": "boolean",
            "description": "Receive promotional emails"
          },
          "receiveInvoice": {
            "type": "boolean",
            "description": "Receive invoice emails"
          },
          "receiveInwards": {
            "type": "boolean",
            "description": "Receive inward shipment notifications"
          },
          "textNotifyProof": {
            "type": "boolean",
            "description": "SMS notification when job proof sent"
          },
          "textNotifyDispatch": {
            "type": "boolean",
            "description": "SMS notification when job dispatched"
          },
          "usernameLoginOnly": {
            "type": "boolean",
            "description": "Whether this user logs in with username only (email is shared with another user)"
          },
          "lastLogin": {
            "type": "string",
            "description": "Last login timestamp (UTC)",
            "format": "date-time",
            "nullable": true
          },
          "loginCount": {
            "type": "integer",
            "description": "Total login count",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Complete user profile information for authenticated user.\r\nExcludes sensitive fields like passwords and internal role flags."
      },
      "Codewolf_Ctrl_Api_Dto_Api_AccountUserSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "User ID",
            "format": "int32"
          },
          "guid": {
            "type": "string",
            "description": "User GUID",
            "format": "uuid"
          },
          "userName": {
            "type": "string",
            "description": "Login username",
            "nullable": true
          },
          "firstName": {
            "type": "string",
            "description": "First name",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "description": "Last name",
            "nullable": true
          },
          "emailAddress": {
            "type": "string",
            "description": "Email address",
            "nullable": true
          },
          "active": {
            "type": "boolean",
            "description": "Whether user is active (can log in)"
          },
          "locationName": {
            "type": "string",
            "description": "Location name (if multi-location enabled)",
            "nullable": true
          },
          "usernameLoginOnly": {
            "type": "boolean",
            "description": "Whether this user logs in with username only (email is shared with another user)"
          },
          "lastLogin": {
            "type": "string",
            "description": "Last login timestamp (UTC)",
            "format": "date-time",
            "nullable": true
          },
          "loginCount": {
            "type": "integer",
            "description": "Total login count",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Lightweight user summary for list view (GET /account/users).\r\nProvides essential user information for administrative user management."
      },
      "Codewolf_Ctrl_Api_Dto_Api_CompleteTokenSaveRequest": {
        "required": [
          "transactionId"
        ],
        "type": "object",
        "properties": {
          "transactionId": {
            "minLength": 1,
            "type": "string",
            "description": "Transaction ID from the initiate response.",
            "example": "12345"
          }
        },
        "additionalProperties": false,
        "description": "Request to complete a token save transaction."
      },
      "Codewolf_Ctrl_Api_Dto_Api_CompleteTokenSaveResponse": {
        "type": "object",
        "properties": {
          "transactionId": {
            "type": "string",
            "description": "Transaction ID that was completed.",
            "nullable": true,
            "example": "12345"
          },
          "status": {
            "type": "string",
            "description": "Transaction status: \"completed\", \"failed\", or \"cancelled\".",
            "nullable": true,
            "example": "completed"
          },
          "isSuccess": {
            "type": "boolean",
            "description": "Whether the transaction was successful.",
            "example": true
          },
          "message": {
            "type": "string",
            "description": "Human-readable status message.",
            "nullable": true,
            "example": "Payment method saved successfully"
          },
          "paymentMethod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_PaymentMethod"
              }
            ],
            "description": "The saved payment method details (if successful).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response from completing a token save transaction."
      },
      "Codewolf_Ctrl_Api_Dto_Api_EntityAddressDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Entity address ID",
            "format": "int32"
          },
          "streetAddress": {
            "type": "string",
            "description": "Street address (line 1)",
            "nullable": true
          },
          "addressLine2": {
            "type": "string",
            "description": "Address line 2",
            "nullable": true
          },
          "city": {
            "type": "string",
            "description": "City",
            "nullable": true
          },
          "state": {
            "type": "string",
            "description": "State/province abbreviation (e.g., \"CA\", \"NY\")",
            "nullable": true
          },
          "stateFull": {
            "type": "string",
            "description": "Full state/province name (e.g., \"California\", \"New York\")",
            "nullable": true
          },
          "postalCode": {
            "type": "string",
            "description": "Postal/ZIP code",
            "nullable": true
          },
          "countryCode": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code (e.g., \"US\", \"NZ\")",
            "nullable": true
          },
          "countryName": {
            "type": "string",
            "description": "Full country name",
            "nullable": true
          },
          "contactName": {
            "type": "string",
            "description": "Contact name",
            "nullable": true
          },
          "organisation": {
            "type": "string",
            "description": "Organisation name",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "description": "Phone number",
            "nullable": true
          },
          "emailAddress": {
            "type": "string",
            "description": "Email address",
            "nullable": true
          },
          "addressSummaryOneLine": {
            "type": "string",
            "description": "One-line summary of the full address",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Entity (company) address associated with a customer account.\r\nRead from the EntityAddress table where RelatedToEntityType = 'CUSTOMER'."
      },
      "Codewolf_Ctrl_Api_Dto_Api_FreightRateDto": {
        "type": "object",
        "properties": {
          "carrier": {
            "type": "string",
            "description": "Carrier code (e.g. \"FedEx\", \"UPS\"). Null for the global default row.",
            "nullable": true
          },
          "carrierName": {
            "type": "string",
            "description": "Carrier display name (e.g. \"FedEx\", \"DEFAULT\").",
            "nullable": true
          },
          "service": {
            "type": "string",
            "description": "Service code (e.g. \"fedex_2day\"). Null when not applicable.",
            "nullable": true
          },
          "serviceName": {
            "type": "string",
            "description": "Service display name (e.g. \"FedEx 2Day®\"). Null when not applicable.",
            "nullable": true
          },
          "package": {
            "type": "string",
            "description": "Package code (e.g. \"YOUR_PACKAGING\"). \"DEFAULT\" for default package. Null when not applicable.",
            "nullable": true
          },
          "packageName": {
            "type": "string",
            "description": "Package display name. Null when not applicable.",
            "nullable": true
          },
          "chargeType": {
            "type": "string",
            "description": "Charge type: \"markup_on_order\" (percentage of order value) or \"fixed_per_package\".",
            "nullable": true
          },
          "value": {
            "type": "number",
            "description": "Rate value (percentage or fixed amount).",
            "format": "double"
          },
          "minimum": {
            "type": "number",
            "description": "Minimum charge (null if none).",
            "format": "double",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean",
            "description": "True if this rate is inherited from system/tenant defaults (read-only).\r\nFalse if this is a customer-specific override (editable/deletable)."
          }
        },
        "additionalProperties": false,
        "description": "Freight rate rule from the cascaded view: system defaults → tenant defaults → customer overrides."
      },
      "Codewolf_Ctrl_Api_Dto_Api_InitiateElementsResponse": {
        "type": "object",
        "properties": {
          "transactionId": {
            "type": "string",
            "description": "Transaction ID for completing the token save.\r\nUse this with POST /account/payment-methods to complete the transaction.",
            "nullable": true,
            "example": "12345"
          },
          "clientSecret": {
            "type": "string",
            "description": "Client secret for the SetupIntent.\r\nPass this to the payment gateway's JavaScript SDK to confirm the card setup.",
            "nullable": true,
            "example": "seti_1234567890_secret_abcdefghij"
          },
          "publishableKey": {
            "type": "string",
            "description": "Publishable key for initializing the payment gateway's JavaScript SDK.",
            "nullable": true,
            "example": "pk_test_1234567890abcdef"
          },
          "gatewayProvider": {
            "type": "string",
            "description": "Payment gateway provider name.",
            "nullable": true,
            "example": "Stripe"
          }
        },
        "additionalProperties": false,
        "description": "Response from initiating an Elements-based token save transaction.\r\nContains the clientSecret and publishableKey for the payment gateway's JavaScript SDK."
      },
      "Codewolf_Ctrl_Api_Dto_Api_PaymentMethod": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Token ID (GUID)",
            "format": "uuid"
          },
          "gatewayProvider": {
            "type": "string",
            "description": "Gateway provider name (e.g., \"Stripe\", \"PaymentExpress\", \"Windcave\")",
            "nullable": true
          },
          "cardName": {
            "type": "string",
            "description": "Card type (e.g., \"Visa\", \"Mastercard\", \"Amex\")",
            "nullable": true
          },
          "cardNumber": {
            "type": "string",
            "description": "Masked card number (e.g., \"****1234\")",
            "nullable": true
          },
          "cardExpiry": {
            "type": "string",
            "description": "Card expiry (MM/YY format)",
            "nullable": true
          },
          "cardHolderName": {
            "type": "string",
            "description": "Cardholder name",
            "nullable": true
          },
          "dateCreatedUtc": {
            "type": "string",
            "description": "When card was added",
            "format": "date-time"
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether this is the default payment method"
          }
        },
        "additionalProperties": false,
        "description": "Saved payment method (credit card token) information (read-only)"
      },
      "Codewolf_Ctrl_Api_Dto_Api_PaymentTransaction": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Transaction ID",
            "format": "int32"
          },
          "gatewayType": {
            "type": "string",
            "description": "Payment gateway provider (e.g., \"Stripe\", \"PaymentExpress\", \"Windcave\")",
            "nullable": true
          },
          "transactionStatus": {
            "type": "string",
            "description": "Transaction status (e.g., \"Completed\", \"Pending\", \"Failed\", \"Cancelled\")",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "description": "When transaction was created",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "description": "When transaction completed (null if pending/failed)",
            "format": "date-time",
            "nullable": true
          },
          "cardName": {
            "type": "string",
            "description": "Card type (e.g., \"Visa\", \"Mastercard\", \"Amex\")",
            "nullable": true
          },
          "cardNumber": {
            "type": "string",
            "description": "Masked card number (e.g., \"****1234\")",
            "nullable": true
          },
          "cardExpiry": {
            "type": "string",
            "description": "Card expiry (MM/YY format)",
            "nullable": true
          },
          "currencySettlement": {
            "type": "string",
            "description": "Settlement currency code (e.g., \"USD\", \"NZD\", \"GBP\")",
            "nullable": true
          },
          "amountSettlement": {
            "type": "number",
            "description": "Settlement amount",
            "format": "double"
          },
          "merchantEntityType": {
            "type": "string",
            "description": "Entity type this transaction is for (e.g., \"JOB\", \"CUSTOMER\")",
            "nullable": true
          },
          "merchantEntityId": {
            "type": "integer",
            "description": "Related entity ID (e.g., Job ID if transaction is for a job payment)",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Payment transaction history record (read-only)"
      },
      "Codewolf_Ctrl_Api_Dto_Api_ReceiverPaysSettings": {
        "type": "object",
        "properties": {
          "billingAccountNumber": {
            "type": "string",
            "description": "Customer's carrier account number for third-party billing.",
            "nullable": true
          },
          "billingPostalCode": {
            "type": "string",
            "description": "Billing postal code for the carrier account.",
            "nullable": true
          },
          "billingCountryCode": {
            "type": "string",
            "description": "Billing country code (e.g., \"US\", \"NZ\").",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Third-party billing (receiver pays) configuration."
      },
      "Codewolf_Ctrl_Api_Dto_Api_ShipmentAddressDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Address ID",
            "format": "int32"
          },
          "guid": {
            "type": "string",
            "description": "Address unique identifier",
            "format": "uuid"
          },
          "organisation": {
            "type": "string",
            "description": "Organisation name",
            "nullable": true
          },
          "contactName": {
            "type": "string",
            "description": "Contact name",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "description": "Phone number",
            "nullable": true
          },
          "phone2": {
            "type": "string",
            "description": "Secondary phone number",
            "nullable": true
          },
          "mobile": {
            "type": "string",
            "description": "Mobile phone number",
            "nullable": true
          },
          "emailAddress": {
            "type": "string",
            "description": "Email address",
            "nullable": true
          },
          "streetAddress": {
            "type": "string",
            "description": "Street address (line 1)",
            "nullable": true
          },
          "addressLine2": {
            "type": "string",
            "description": "Address line 2",
            "nullable": true
          },
          "suburb": {
            "type": "string",
            "description": "Suburb or dependent locality",
            "nullable": true
          },
          "city": {
            "type": "string",
            "description": "City",
            "nullable": true
          },
          "state": {
            "type": "string",
            "description": "State/province abbreviation (e.g., \"CA\", \"NY\")",
            "nullable": true
          },
          "stateFull": {
            "type": "string",
            "description": "Full state/province name (e.g., \"California\", \"New York\")",
            "nullable": true
          },
          "postalCode": {
            "type": "string",
            "description": "Postal/ZIP code",
            "nullable": true
          },
          "countryCode": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code (e.g., \"US\", \"NZ\")",
            "nullable": true
          },
          "countryName": {
            "type": "string",
            "description": "Full country name",
            "nullable": true
          },
          "mailingLabel": {
            "type": "string",
            "description": "Multi-line mailing label for the address",
            "nullable": true
          },
          "addressSummaryOneLine": {
            "type": "string",
            "description": "One-line summary of the full address",
            "nullable": true
          },
          "dateEnteredUtc": {
            "type": "string",
            "description": "Date and time (UTC) the address was entered",
            "format": "date-time"
          },
          "lastUsedUtc": {
            "type": "string",
            "description": "Most recent date an address with this mailing label was entered.",
            "format": "date-time",
            "nullable": true
          },
          "source": {
            "type": "string",
            "description": "Where the address came from: CUSTOMER (the customer's own address), CUSTOMERUSER\r\n(an address saved against one of the customer's users) or JOB (an address used on a previous job)",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "An address the customer can ship to: one of the customer's own addresses, an address\r\nsaved against one of its users, or an address previously used on one of its jobs."
      },
      "Codewolf_Ctrl_Api_Dto_Api_ShipmentSettings": {
        "type": "object",
        "properties": {
          "availableCarriers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Carriers available to this customer.\r\nIf customer has no restrictions, this contains all carrier options.",
            "nullable": true
          },
          "carrierOptions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "All carrier options available for selection (carrier names).",
            "nullable": true
          },
          "receiverPays": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_ReceiverPaysSettings"
              }
            ],
            "description": "Third-party billing configuration for customer's own carrier account.",
            "nullable": true
          },
          "showCustomerAddressOnLabel": {
            "type": "boolean",
            "description": "Whether to show customer's address as return address on shipping labels."
          },
          "handlingFee": {
            "type": "number",
            "description": "Handling fee amount.\r\nNote: Automatically set to 0 when receiverPays is enabled.",
            "format": "double"
          },
          "applyHandlingFeeInsteadOfFreight": {
            "type": "boolean",
            "description": "If true, handling fee replaces freight charges.\r\nNote: Automatically set to true when receiverPays is enabled."
          },
          "jobComment": {
            "type": "string",
            "description": "Default comment that appears on jobs for shipping department.",
            "nullable": true
          },
          "availableShipmentTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Shipment type codes available for this customer.\r\nDerived from ExcludeShipmentsCsv (inverted logic).\r\nEmpty array means all shipment types are available.",
            "nullable": true
          },
          "shipmentTypeOptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_ShipmentType"
            },
            "description": "All shipment type options available for selection.",
            "nullable": true
          },
          "freightRates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_FreightRateDto"
            },
            "description": "Freight rate rules with cascading defaults (read-only).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Customer shipment settings - company-level shipping configuration."
      },
      "Codewolf_Ctrl_Api_Dto_Api_ShipmentType": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Shipment type code.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Display name for the shipment type.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Shipment type with code and display name."
      },
      "Codewolf_Ctrl_Api_Dto_Api_TaxCertificate": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Tax certificate ID",
            "format": "int32"
          },
          "customerId": {
            "type": "integer",
            "description": "Customer ID (always matches authenticated customer)",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Contact name on certificate",
            "nullable": true
          },
          "businessName": {
            "type": "string",
            "description": "Business name on certificate",
            "nullable": true
          },
          "exemptionNumber": {
            "type": "string",
            "description": "Certificate/exemption number",
            "nullable": true
          },
          "employerIdentificationNumber": {
            "type": "string",
            "description": "Employer Identification Number (EIN/Tax ID) - optional",
            "nullable": true
          },
          "businessEntityId": {
            "type": "string",
            "description": "Business entity ID - optional",
            "nullable": true
          },
          "licenseExpiryDate": {
            "type": "string",
            "description": "License expiry date (null if no expiry)",
            "format": "date-time",
            "nullable": true
          },
          "exemptionType": {
            "type": "string",
            "description": "Type of exemption (e.g., \"Resale\", \"Manufacturing\", \"Non-Profit\")",
            "nullable": true
          },
          "exemptionState": {
            "type": "string",
            "description": "State where exemption applies (e.g., \"CA\", \"TX\")",
            "nullable": true
          },
          "fileName": {
            "type": "string",
            "description": "Uploaded certificate file name (null if no file uploaded)",
            "nullable": true
          },
          "hasFile": {
            "type": "boolean",
            "description": "Whether a certificate file has been uploaded",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "description": "When this certificate was created",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "description": "When this certificate was last updated",
            "format": "date-time"
          },
          "entityFileId": {
            "type": "integer",
            "format": "int32"
          },
          "cdnUrl": {
            "type": "string",
            "nullable": true
          },
          "fileStatus": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Enums_FileStatus"
              }
            ]
          },
          "fileStatusDescription": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false,
        "description": "Full tax exemption certificate details"
      },
      "Codewolf_Ctrl_Api_Dto_Api_UpdateEntityAddressRequest": {
        "type": "object",
        "properties": {
          "streetAddress": {
            "type": "string",
            "description": "Street address (line 1)",
            "nullable": true
          },
          "addressLine2": {
            "type": "string",
            "description": "Address line 2",
            "nullable": true
          },
          "city": {
            "type": "string",
            "description": "City",
            "nullable": true
          },
          "state": {
            "type": "string",
            "description": "State/province abbreviation (e.g., \"CA\", \"NY\").\r\nMaps to AdministrativeAreaAbbreviation in the database.",
            "nullable": true
          },
          "postalCode": {
            "type": "string",
            "description": "Postal/ZIP code",
            "nullable": true
          },
          "country": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code (e.g., \"US\", \"NZ\")",
            "nullable": true
          },
          "contactName": {
            "type": "string",
            "description": "Contact name",
            "nullable": true
          },
          "organisation": {
            "type": "string",
            "description": "Organisation name",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "description": "Phone number",
            "nullable": true
          },
          "emailAddress": {
            "type": "string",
            "description": "Email address",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request to update the entity (company) address for a customer account.\r\nAll fields are optional — only non-null fields will be updated (PATCH semantics)."
      },
      "Codewolf_Ctrl_Api_Dto_Api_UpdateReceiverPaysSettings": {
        "type": "object",
        "properties": {
          "billingAccountNumber": {
            "type": "string",
            "description": "Customer's carrier account number for third-party billing.\r\nSet to null or empty to clear receiver pays configuration.",
            "nullable": true
          },
          "billingPostalCode": {
            "type": "string",
            "description": "Billing postal code for the carrier account.",
            "nullable": true
          },
          "billingCountryCode": {
            "type": "string",
            "description": "Billing country code (e.g., \"US\", \"NZ\").",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Third-party billing (receiver pays) update settings."
      },
      "Codewolf_Ctrl_Api_Dto_Api_UpdateShipmentSettings": {
        "type": "object",
        "properties": {
          "availableCarriers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Customer's preferred carriers. Optional - only updated if provided.\r\nIf provided, must contain at least one carrier from the carrierOptions list returned by GET.",
            "nullable": true
          },
          "receiverPays": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_UpdateReceiverPaysSettings"
              }
            ],
            "description": "Third-party billing configuration for customer's own carrier account. Optional - only updated if provided.\r\nSet billingAccountNumber to enable receiver pays (use own carrier account).\r\nWhen billingAccountNumber is provided, billingPostalCode and billingCountryCode are required.",
            "nullable": true
          },
          "showCustomerAddressOnLabel": {
            "type": "boolean",
            "description": "Whether to show customer's address as return address on shipping labels.\r\nOptional - only updated if provided.",
            "nullable": true
          },
          "jobComment": {
            "type": "string",
            "description": "Default comment that appears on jobs for shipping department.\r\nOptional - only updated if provided. Use empty string \"\" to clear.",
            "nullable": true
          },
          "handlingFee": {
            "type": "number",
            "description": "Handling fee amount.\r\nOptional - only updated if provided.\r\nNote: When receiverPays is enabled, this is automatically set to 0.",
            "format": "double",
            "nullable": true
          },
          "applyHandlingFeeInsteadOfFreight": {
            "type": "boolean",
            "description": "If true, handling fee replaces freight charges.\r\nOptional - only updated if provided.\r\nNote: When receiverPays is enabled, this is automatically set to true.",
            "nullable": true
          },
          "availableShipmentTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Shipment type codes available for this customer. Optional - only updated if provided.\r\nUse codes from shipmentTypeOptions returned by GET (e.g., \"FR\", \"LC\", \"P\").\r\nEmpty array means all shipment types are available (no restrictions).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Model for updating customer shipment settings.\r\nAll fields are optional - only provided fields will be updated."
      },
      "Codewolf_Ctrl_Api_Dto_Api_ValidatePromocodeResponse": {
        "type": "object",
        "properties": {
          "isValid": {
            "type": "boolean",
            "description": "Whether the promo code is valid for the customer"
          },
          "promoCode": {
            "type": "string",
            "description": "The promo code that was validated",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Description of the promo code",
            "nullable": true
          },
          "discount": {
            "type": "integer",
            "description": "Discount amount (cents if IsFixed=true, percentage if IsFixed=false)",
            "format": "int32"
          },
          "isFixed": {
            "type": "boolean",
            "description": "Whether this is a fixed amount discount (true) or percentage discount (false)"
          },
          "message": {
            "type": "string",
            "description": "Error message if the promo code is not valid. Empty if valid.",
            "nullable": true
          },
          "applicableProcessCodes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of applicable process codes from the ones provided (if processCodes parameter was supplied).\r\nReturns null if no processCodes were provided or if promo code is not process-specific.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response from promo code validation"
      },
      "Codewolf_Ctrl_Api_Dto_ApproveJobRequest": {
        "type": "object",
        "properties": {
          "shipDate": {
            "type": "string",
            "description": "The ship date the customer is agreeing to, as yyyy-MM-dd. Must be today or later. Leave it\r\nout to approve without changing the job's date.",
            "format": "date-time",
            "nullable": true
          },
          "mustDate": {
            "type": "boolean",
            "description": "Whether the agreed ship date is fixed rather than a target. Ignored when no ship date is\r\nsupplied. Defaults to false."
          },
          "dateAction": {
            "type": "string",
            "description": "Whether the customer is accepting the date already on the job (`accept`) or asking for\r\nthe date they supplied (`request`). Ignored when no ship date is supplied; defaults to\r\n`request` when a ship date is supplied without it.",
            "nullable": true
          },
          "note": {
            "type": "string",
            "description": "A note to record against the job, up to 2000 characters. Whether it is recorded depends on\r\nthe account's settings; the response says which happened. The approval succeeds either way.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "What a customer sends when approving a job. Every field is optional - an empty body approves\r\nthe job as it stands."
      },
      "Codewolf_Ctrl_Api_Dto_ApproveJobResponse": {
        "type": "object",
        "properties": {
          "jobNumber": {
            "type": "integer",
            "description": "The job that was approved.",
            "format": "int32"
          },
          "status": {
            "type": "string",
            "description": "The job's status in plain English.",
            "nullable": true
          },
          "masterJobStatusId": {
            "type": "integer",
            "description": "The job's master status id.",
            "format": "int32"
          },
          "dateShip": {
            "type": "string",
            "description": "The job's ship date after the approval.",
            "format": "date-time",
            "nullable": true
          },
          "mustDate": {
            "type": "boolean",
            "description": "Whether the ship date is fixed rather than a target."
          },
          "alreadyApproved": {
            "type": "boolean",
            "description": "True when the job was already approved and this request changed nothing. The request still\r\nsucceeded; no history entry, tag or notification was repeated."
          },
          "noteRecorded": {
            "type": "boolean",
            "description": "Whether the supplied note was recorded against the job. False when a note was supplied but\r\nthe account does not record customer notes."
          }
        },
        "additionalProperties": false,
        "description": "The state of a job after a customer approved it."
      },
      "Codewolf_Ctrl_Api_Dto_AssetCustomerFileDto": {
        "type": "object",
        "properties": {
          "fileName": {
            "type": "string",
            "description": "The name the file is stored under.",
            "nullable": true
          },
          "guid": {
            "type": "string",
            "description": "The file's guid. Send it as If-Match to replace the file.",
            "format": "uuid"
          },
          "lastUpdate": {
            "type": "string",
            "description": "When the file was last changed.",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "A current customer file of an asset."
      },
      "Codewolf_Ctrl_Api_Dto_AssetCustomerFileResult": {
        "type": "object",
        "properties": {
          "assetTag": {
            "type": "string",
            "description": "The asset the file belongs to.",
            "nullable": true
          },
          "fileName": {
            "type": "string",
            "description": "The name the file is stored under: the asset tag, \"_customer\" and the uploaded file's extension.",
            "nullable": true
          },
          "guid": {
            "type": "string",
            "description": "The stored file's guid. Send it as If-Match to replace this file.",
            "format": "uuid"
          },
          "archivedFileGuids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The guids of the customer files this upload replaced. They are kept as archived files. Empty for a first customer file.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The customer file stored on an asset, and the customer files it replaced."
      },
      "Codewolf_Ctrl_Api_Dto_AssetCustomerFilesResult": {
        "type": "object",
        "properties": {
          "assetTag": {
            "type": "string",
            "description": "The asset the files belong to.",
            "nullable": true
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_AssetCustomerFileDto"
            },
            "description": "The current customer files, newest first. Normally one; empty when the asset has none.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "An asset's current customer files."
      },
      "Codewolf_Ctrl_Api_Dto_ChangeRequestFileResult": {
        "type": "object",
        "properties": {
          "fileName": {
            "type": "string",
            "description": "The file name as supplied by the caller.",
            "nullable": true
          },
          "storedFileName": {
            "type": "string",
            "description": "The name the file was stored under. Differs from the supplied name: attachments are named so\r\nstaff can recognise them as belonging to a change request. Null when the upload failed.",
            "nullable": true
          },
          "guid": {
            "type": "string",
            "description": "Identifier of the stored file, matching the `guid` returned by the job files endpoint.\r\nNull when the upload failed.",
            "format": "uuid",
            "nullable": true
          },
          "uploadSuccessful": {
            "type": "boolean",
            "description": "Whether this attachment was stored."
          }
        },
        "additionalProperties": false,
        "description": "What happened to one attachment sent with a change request."
      },
      "Codewolf_Ctrl_Api_Dto_ChangeRequestResponse": {
        "type": "object",
        "properties": {
          "jobNumber": {
            "type": "integer",
            "description": "The job the request was made against.",
            "format": "int32"
          },
          "status": {
            "type": "string",
            "description": "The job's status in plain English.",
            "nullable": true
          },
          "masterJobStatusId": {
            "type": "integer",
            "description": "The job's master status id.",
            "format": "int32"
          },
          "alreadyRequested": {
            "type": "boolean",
            "description": "True when changes had already been requested and this request changed nothing. The request\r\nstill succeeded; no attachment was stored again and no notification was repeated."
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_ChangeRequestFileResult"
            },
            "description": "The outcome for each attachment supplied with the request.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The state of a job after a customer asked for changes."
      },
      "Codewolf_Ctrl_Api_Dto_CopyPriceTierRequest": {
        "type": "object",
        "properties": {
          "newTierCode": {
            "type": "string",
            "description": "The new tier's code. Required, up to 50 characters, not already used.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "What the new tier is for. Optional, up to 1,500 characters.",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "description": "Notes about the new tier. Optional, up to 1,500 characters.",
            "nullable": true
          },
          "perUnitPercent": {
            "type": "number",
            "description": "The change to per-unit prices, in percent: negative lowers them. From -100 to 99,999.99.",
            "format": "double",
            "nullable": true
          },
          "markupPercent": {
            "type": "number",
            "description": "The change to markup percentages, in percent of the markup: negative lowers them. From -100 to 99,999.99.",
            "format": "double",
            "nullable": true
          },
          "setupPercent": {
            "type": "number",
            "description": "The change to setup charges, in percent. From -100 to 99,999.99. Not applied when setups are turned off, so they keep their amounts.",
            "format": "double",
            "nullable": true
          },
          "excludeSetups": {
            "type": "boolean",
            "description": "True to turn off every setup charge in the new tier; the amounts are kept unchanged.",
            "nullable": true
          },
          "resetPercent": {
            "type": "number",
            "description": "The change to reset charges, in percent. From -100 to 99,999.99. Not applied when resets are turned off, so they keep their amounts.",
            "format": "double",
            "nullable": true
          },
          "excludeResets": {
            "type": "boolean",
            "description": "True to turn off every reset charge in the new tier; the amounts are kept unchanged.",
            "nullable": true
          },
          "markupMinCharges": {
            "type": "boolean",
            "description": "True to change minimum charges by the same percentages as the prices; otherwise they are copied unchanged.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A new tier made from an existing one, with its prices changed by percentages. A blank percentage means 0."
      },
      "Codewolf_Ctrl_Api_Dto_CopyPriceTierResponse": {
        "type": "object",
        "properties": {
          "tierCode": {
            "type": "string",
            "description": "The new tier's code.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The tier a copy created."
      },
      "Codewolf_Ctrl_Api_Dto_CreateCustomerAddress": {
        "type": "object",
        "properties": {
          "line1": {
            "type": "string",
            "description": "Street address. Required, up to 255 characters.",
            "nullable": true
          },
          "line2": {
            "type": "string",
            "description": "Second address line, such as a unit or suburb. Optional, up to 255 characters.",
            "nullable": true
          },
          "city": {
            "type": "string",
            "description": "Town or city. Required, up to 200 characters.",
            "nullable": true
          },
          "state": {
            "type": "string",
            "description": "State or region, as a name or abbreviation. Optional. When supplied for a country that has\r\nstates, it must be one of that country's states.",
            "nullable": true
          },
          "postcode": {
            "type": "string",
            "description": "Postcode or ZIP code. Required, up to 50 characters.",
            "nullable": true
          },
          "country": {
            "type": "string",
            "description": "Two-letter ISO country code, for example `NZ` or `US`. Required.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The address of a new customer."
      },
      "Codewolf_Ctrl_Api_Dto_CreateCustomerRequest": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string",
            "description": "The person's first name. Required, up to 90 characters.",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "description": "The person's last name. Required, up to 255 characters.",
            "nullable": true
          },
          "email": {
            "type": "string",
            "description": "The person's email address, which they sign in with. Required, up to 250 characters.",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "description": "The person's phone number. Optional, up to 50 characters.",
            "nullable": true
          },
          "companyName": {
            "type": "string",
            "description": "The business name the account is created under. Required, up to 150 characters.",
            "nullable": true
          },
          "address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_CreateCustomerAddress"
              }
            ],
            "description": "The business address. Required.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A new wholesale customer and the person signing up for it. The account is set up with the\r\ntenant's default wholesale settings. If an active user already signs in with the email address,\r\nnothing is created and the call returns 409."
      },
      "Codewolf_Ctrl_Api_Dto_CreateCustomerResponse": {
        "type": "object",
        "properties": {
          "customerId": {
            "type": "integer",
            "description": "The new customer's id.",
            "format": "int32"
          },
          "userId": {
            "type": "integer",
            "description": "The new user's id. The user has no password until one is set.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "The customer and user created by a signup."
      },
      "Codewolf_Ctrl_Api_Dto_CreateJobShipmentDto": {
        "type": "object",
        "properties": {
          "deliveryMethod": {
            "maxLength": 50,
            "type": "string",
            "description": "Delivery method for this shipment, from the codes returned by the shipping options\r\nendpoint. Required. A method that identifies a collection creates a shipment with no\r\ndelivery address.",
            "nullable": true
          },
          "contactName": {
            "maxLength": 50,
            "type": "string",
            "description": "Contact name for delivery",
            "nullable": true
          },
          "organisation": {
            "maxLength": 100,
            "type": "string",
            "description": "Organisation/Company name",
            "nullable": true
          },
          "streetAddress": {
            "maxLength": 250,
            "type": "string",
            "description": "Street address line 1. Required unless the delivery method is a collection.",
            "nullable": true
          },
          "address2": {
            "maxLength": 250,
            "type": "string",
            "description": "Street address line 2",
            "nullable": true
          },
          "suburb": {
            "maxLength": 200,
            "type": "string",
            "description": "Suburb",
            "nullable": true
          },
          "city": {
            "maxLength": 250,
            "type": "string",
            "description": "City. Required unless the delivery method is a collection.",
            "nullable": true
          },
          "state": {
            "maxLength": 50,
            "type": "string",
            "description": "State/Province",
            "nullable": true
          },
          "postalCode": {
            "maxLength": 50,
            "type": "string",
            "description": "Postal/Zip code",
            "nullable": true
          },
          "countryCodeISO2": {
            "maxLength": 2,
            "type": "string",
            "description": "ISO 2-letter country code. Required unless the delivery method is a collection.",
            "nullable": true
          },
          "country": {
            "maxLength": 100,
            "type": "string",
            "description": "Country Name (e.g., \"United States\", \"New Zealand\")",
            "nullable": true
          },
          "phone": {
            "maxLength": 50,
            "type": "string",
            "description": "Phone number",
            "nullable": true
          },
          "emailAddress": {
            "maxLength": 150,
            "type": "string",
            "description": "Email address",
            "format": "email",
            "nullable": true
          },
          "shippingInstructions": {
            "maxLength": 350,
            "type": "string",
            "description": "Shipping instructions",
            "nullable": true
          },
          "isSaturdayDelivery": {
            "type": "boolean",
            "description": "Indicates whether Saturday delivery is requested for this shipment.\r\nSupported by UPS and FedEx express services. Optional, defaults to false.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A new shipment to add to an existing job."
      },
      "Codewolf_Ctrl_Api_Dto_CreateQuoteDecorationDto": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "What the decoration is priced by: `priceCode` for a price code from the price list, or `asset` for\r\nan existing asset, priced by its own prices.",
            "nullable": true
          },
          "itemCode": {
            "type": "string",
            "description": "The price code, such as `CATEGORY-Unit`, at most 500 characters; or the asset tag, at most 60 characters.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "The decoration's description, at most 1500 characters. Optional; an asset decoration without one takes the\r\nasset's description.",
            "nullable": true
          },
          "position": {
            "type": "string",
            "description": "Where the decoration goes on the garment, at most 500 characters. Optional.",
            "nullable": true
          },
          "setup": {
            "type": "number",
            "description": "The setup charge to quote, from 0 to 922337203685477.58, rounded to cents. Optional; defaults to the listed setup charge, which is kept either way.",
            "format": "double",
            "nullable": true
          },
          "details": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "nullable": true
            },
            "description": "The values the price code is priced by: `stitchcount`, a whole number from 0 to 2147483647, for a\r\nstitch-priced code; `dgx` and `dgy` (width and height), each from 0 to 999999.9999, for a size-priced\r\ncode. Each value is at most 150 characters. A value left out counts as 0.\r\nNot taken for an asset.",
            "nullable": true
          },
          "quotedPrices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_CreateQuotePriceDto"
            },
            "description": "Per unit prices to quote instead of the list price, each for one of the garment's quantities and at most one per\r\nquantity. Optional; a quantity without one is quoted at the list price.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A decoration on a garment of a quote to create."
      },
      "Codewolf_Ctrl_Api_Dto_CreateQuoteDto": {
        "type": "object",
        "properties": {
          "customerId": {
            "type": "integer",
            "description": "The customer the quote is for: an active customer.",
            "format": "int32"
          },
          "customerUserId": {
            "type": "integer",
            "description": "The customer's contact the quote is for: one of the customer's active contacts, or a contact shared by every\r\ncustomer where the tenant shares contacts. Optional.",
            "format": "int32",
            "nullable": true
          },
          "ownerName": {
            "type": "string",
            "description": "The name of the person the quote is for, at most 500 characters. Optional.",
            "nullable": true
          },
          "ownerEmail": {
            "type": "string",
            "description": "The email of the person the quote is for, at most 500 characters. Optional.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "The quote's description, at most 2500 characters. Optional.",
            "nullable": true
          },
          "comment": {
            "type": "string",
            "description": "A comment on the quote. Optional.",
            "nullable": true
          },
          "priceTier": {
            "type": "string",
            "description": "The price tier to price the quote at, at most 50 characters. Optional; defaults to the customer's price tier.",
            "nullable": true
          },
          "garments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_CreateQuoteGarmentDto"
            },
            "description": "The garments on the quote, in the order they appear: from 1 to 50.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A quote to create."
      },
      "Codewolf_Ctrl_Api_Dto_CreateQuoteGarmentDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The garment's name, at most 500 characters. Optional.",
            "nullable": true
          },
          "quantities": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "The quantities the garment is quoted at: from 1 to 20 different whole numbers, each 1 or more.",
            "nullable": true
          },
          "decorations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_CreateQuoteDecorationDto"
            },
            "description": "The decorations on the garment, in the order they appear: at most 20. Optional.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A garment on a quote to create."
      },
      "Codewolf_Ctrl_Api_Dto_CreateQuotePriceDto": {
        "type": "object",
        "properties": {
          "quantity": {
            "type": "integer",
            "description": "One of the garment's quantities.",
            "format": "int32"
          },
          "price": {
            "type": "number",
            "description": "The per unit price to quote, from 0 to 922337203685477.58, rounded to cents.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "A per unit price to quote at one quantity."
      },
      "Codewolf_Ctrl_Api_Dto_CreatedQuoteDecorationDto": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "What the decoration is priced by: `priceCode` or `asset`.",
            "nullable": true
          },
          "itemCode": {
            "type": "string",
            "description": "The item code as stored on the quote: the price code's full name, or the asset tag.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "The decoration's description.",
            "nullable": true
          },
          "position": {
            "type": "string",
            "description": "Where the decoration goes on the garment.",
            "nullable": true
          },
          "setup": {
            "type": "number",
            "description": "The setup charge quoted.",
            "format": "double"
          },
          "listedSetup": {
            "type": "number",
            "description": "The setup charge the price list or the asset gives.",
            "format": "double"
          },
          "isTimeBased": {
            "type": "boolean",
            "description": "True when the decoration is charged by time: its total time charge is spread over the quantity."
          },
          "timeBasedCharge": {
            "type": "number",
            "description": "The total time charge; 0 when the decoration is not charged by time.",
            "format": "double"
          },
          "prices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_CreatedQuotePriceDto"
            },
            "description": "The decoration's price at each of the garment's quantities.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A decoration on a created quote, with its prices."
      },
      "Codewolf_Ctrl_Api_Dto_CreatedQuoteDto": {
        "type": "object",
        "properties": {
          "quoteId": {
            "type": "integer",
            "description": "The new quote's id.",
            "format": "int32"
          },
          "priceTier": {
            "type": "string",
            "description": "The price tier the quote was priced at.",
            "nullable": true
          },
          "garments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_CreatedQuoteGarmentDto"
            },
            "description": "The quote's garments, in order.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A quote that was created, with the prices it was given."
      },
      "Codewolf_Ctrl_Api_Dto_CreatedQuoteGarmentDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The garment's name.",
            "nullable": true
          },
          "quantities": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "The quantities the garment is quoted at.",
            "nullable": true
          },
          "decorations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_CreatedQuoteDecorationDto"
            },
            "description": "The garment's decorations, in order.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A garment on a created quote."
      },
      "Codewolf_Ctrl_Api_Dto_CreatedQuotePriceDto": {
        "type": "object",
        "properties": {
          "quantity": {
            "type": "integer",
            "description": "The quantity.",
            "format": "int32"
          },
          "listPrice": {
            "type": "number",
            "description": "The per unit price the price list or the asset gives. 0 when no price band covers the quantity.",
            "format": "double"
          },
          "quotedPrice": {
            "type": "number",
            "description": "The per unit price quoted.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "A decoration's price at one quantity."
      },
      "Codewolf_Ctrl_Api_Dto_CustomerEmailInUseResponse": {
        "type": "object",
        "properties": {
          "customerId": {
            "type": "integer",
            "description": "The customer the existing user belongs to, or 0 when the user has no customer (for example a staff login).",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Returned when the signup's email address already belongs to an active user. Nothing was created."
      },
      "Codewolf_Ctrl_Api_Dto_FileUploadResponseDto": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "assetTag": {
            "type": "string",
            "nullable": true
          },
          "filesStored": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response DTO for file upload operations to assetFiles."
      },
      "Codewolf_Ctrl_Api_Dto_GangJoblineDto": {
        "type": "object",
        "properties": {
          "gangNumber": {
            "type": "integer",
            "format": "int32"
          },
          "jobLineId": {
            "type": "integer",
            "format": "int32"
          },
          "jobNumber": {
            "type": "integer",
            "format": "int32"
          },
          "assetCode": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "format": "int32"
          },
          "price": {
            "type": "number",
            "format": "double"
          },
          "customerName": {
            "type": "string",
            "nullable": true
          },
          "dateDueUtc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "joblineGang": {
            "type": "string",
            "nullable": true
          },
          "colourCritical": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "description": "Represents a jobline associated with a gang, used for the production scheduling board."
      },
      "Codewolf_Ctrl_Api_Dto_JobDispatchRefusalResponse": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "description": "The reason, one of: `closed`, `cancelled`, `multiple_open_shipments`, `lines_incomplete`,\r\n`delivery_email_missing`, `credit_job_not_allowed`, `credit_hold`, `payment_required` (the\r\nshipments are recorded, the job waits for payment and the customer is asked to pay), `payment_needs_review`\r\n(the shipments are recorded, but an earlier charge of the customer's saved card has an unknown outcome and is too\r\nold to retry, so a person must check the payment gateway before the job can be dispatched; the customer is not\r\nasked to pay), `freight_unpriced`, `status_not_dispatchable` (when the job's status changed while the\r\nrequest ran, its shipments, freight line and line quantities may already be recorded),\r\n`sales_channel_required`, `dispatch_in_progress` (retry later), `not_configured` or\r\n`customer_user_missing`.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "The job's current status in plain English, or null when it is not known.",
            "nullable": true
          },
          "masterJobStatusId": {
            "type": "integer",
            "description": "The job's current master status id, or null when it is not known.",
            "format": "int32",
            "nullable": true
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What needs a person's attention although the job was not dispatched; empty when nothing does. Each entry is one\r\nof: `payment_needs_review` (with `status_not_dispatchable`: the customer's card was charged, an\r\noverpayment was refunded or a small balance was written off, but the job's status changed before it could be\r\ndispatched, so the payment must be checked by hand) or `documents_pending` (with `payment_required`:\r\nthe request to pay was not sent; it is sent when the dispatch request is repeated).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Why a job was not dispatched. Nothing was changed except where the reason says otherwise."
      },
      "Codewolf_Ctrl_Api_Dto_JobDispatchRequest": {
        "type": "object",
        "properties": {
          "shipments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_JobDispatchShipmentRequest"
            },
            "description": "The shipments that carried the job, from 1 to 20. A tracking number the job already has is recorded once and\r\nignored on later requests, so a repeated request changes nothing.",
            "nullable": true
          },
          "source": {
            "type": "string",
            "description": "The system reporting the dispatch, up to 50 letters, digits, hyphens or underscores. Required. It is recorded\r\non new shipments and in the job's history.",
            "nullable": true
          },
          "externalRef": {
            "type": "string",
            "description": "The reporting system's own reference for the order, up to 100 characters. Optional; recorded in the job's history.",
            "nullable": true
          },
          "note": {
            "type": "string",
            "description": "A note for the job's history, up to 500 characters. Optional. Markup characters are removed when it is recorded.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A request to dispatch a job: the shipments that carried it and the system reporting them."
      },
      "Codewolf_Ctrl_Api_Dto_JobDispatchResponse": {
        "type": "object",
        "properties": {
          "jobNumber": {
            "type": "integer",
            "description": "The job number.",
            "format": "int32"
          },
          "status": {
            "type": "string",
            "description": "The job's status in plain English: Dispatched, or Closed for a customer that is not invoiced.",
            "nullable": true
          },
          "masterJobStatusId": {
            "type": "integer",
            "description": "The job's master status id.",
            "format": "int32"
          },
          "shipments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_JobDispatchShipmentResponse"
            },
            "description": "One entry per shipment in the request, in the same order: the job shipment that holds its tracking number.",
            "nullable": true
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What needs a person's attention although the job was dispatched; empty when nothing does. Each entry is one of:\r\n`refund_failed` (the customer had overpaid and the automatic refund of the difference failed, so it must be\r\nrefunded by hand) or `documents_pending` (the invoice and dispatch emails were not all sent; they are sent\r\nwhen the dispatch request is repeated).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The job after a successful dispatch request."
      },
      "Codewolf_Ctrl_Api_Dto_JobDispatchShipmentRequest": {
        "type": "object",
        "properties": {
          "carrier": {
            "type": "string",
            "description": "The carrier code, up to 50 characters, such as `DPD`. Required; it selects the freight rate.",
            "nullable": true
          },
          "service": {
            "type": "string",
            "description": "The carrier's service code, up to 50 characters. Required; it selects the freight rate.",
            "nullable": true
          },
          "trackingNumber": {
            "type": "string",
            "description": "The carrier's tracking number, up to 100 characters. Required, and unique within the request.",
            "nullable": true
          },
          "trackingUrl": {
            "type": "string",
            "description": "The carrier's tracking page for the shipment: an absolute http or https URL of up to 500 characters. Optional.",
            "nullable": true
          },
          "parcels": {
            "type": "integer",
            "description": "The number of parcels in the shipment, from 1 to 99. Freight is charged per parcel where the rate says so.",
            "format": "int32"
          },
          "dispatchedAtUtc": {
            "type": "string",
            "description": "When the shipment left, in UTC. Optional; the time the request is received is used when it is left out.",
            "format": "date-time",
            "nullable": true
          },
          "shipmentId": {
            "type": "integer",
            "description": "The job shipment this shipment completes. Optional: when it is left out, the job's one open shipment is used, or a\r\nnew shipment is added when it has none. It must name an open shipment of the job, at most once per request.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One shipment that carried the job."
      },
      "Codewolf_Ctrl_Api_Dto_JobDispatchShipmentResponse": {
        "type": "object",
        "properties": {
          "shipmentId": {
            "type": "integer",
            "description": "The job shipment id.",
            "format": "int32"
          },
          "trackingNumber": {
            "type": "string",
            "description": "The tracking number, with surrounding white space removed.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The job shipment that holds one shipment of the request."
      },
      "Codewolf_Ctrl_Api_Dto_JobLineUpdate": {
        "type": "object",
        "properties": {
          "jobLineId": {
            "type": "integer",
            "description": "The line to change. Required.",
            "format": "int32"
          },
          "quantity": {
            "type": "integer",
            "description": "The new quantity of an asset line. On a stock or external-garment line it may be sent only\r\nas the total of the sizes.",
            "format": "int32",
            "nullable": true
          },
          "sizeQuantities": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int32"
            },
            "description": "The full size breakdown of a stock or external-garment line, replacing the current one.\r\nStock sizes must be in the item's size set. A size code cannot contain \"/\" or \"|\".",
            "nullable": true
          },
          "garment": {
            "type": "string",
            "description": "The garment, on an external-garment or asset line. Up to 500 characters.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "The description of an external-garment line. Up to 500 characters.",
            "nullable": true
          },
          "comment": {
            "type": "string",
            "description": "The comment on an asset line. Up to 1000 characters.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The changes to one job line. A field left out is unchanged."
      },
      "Codewolf_Ctrl_Api_Dto_JobStaffDispatchMailResult": {
        "type": "object",
        "properties": {
          "mailCode": {
            "type": "string",
            "description": "Which dispatch email this is, such as `INTERNAL_DISPATCH` for the invoice email; may be null.",
            "nullable": true
          },
          "sentOk": {
            "type": "boolean",
            "description": "Whether the email was sent."
          },
          "message": {
            "type": "string",
            "description": "A message about the email for the staff member; may be null.",
            "nullable": true
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Problems that did not stop the email being sent, such as a missing attachment.",
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Why the email was not sent.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The result of one dispatch email."
      },
      "Codewolf_Ctrl_Api_Dto_JobStaffDispatchRefusalResponse": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "description": "The reason, one of: `closed`, `cancelled`, `lines_incomplete` (`lineIds` names the lines\r\nwith no job line type or no actual quantity above zero), `delivery_email_missing`,\r\n`action_not_permitted` (the staff member holds none of the roles allowed to dispatch, or may not dispatch\r\nthis credit job), `credit_info_missing` (`lineIds` names the credit job's lines with no credit\r\ninformation), `credit_hold`, `payment_required` (the job waits for payment, which can move it to\r\nPayment Issue, and the customer is asked to pay), `payment_needs_review` (an earlier charge of the customer's\r\nsaved card must be checked in the payment gateway first), `status_not_dispatchable`,\r\n`sales_channel_required`, `dispatch_in_progress` (retry later), `multiple_open_shipments`,\r\n`not_configured` or `customer_user_missing`.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "The job's current status in plain English, or null when it is not known.",
            "nullable": true
          },
          "masterJobStatusId": {
            "type": "integer",
            "description": "The job's current master status id, or null when it is not known.",
            "format": "int32",
            "nullable": true
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What needs the staff member's attention; empty when nothing does. Each entry is one of\r\n`payment_needs_review` or `documents_pending`.",
            "nullable": true
          },
          "warningText": {
            "type": "string",
            "description": "Text to show the staff member, such as the payment warning for `payment_required`; null when there is none.",
            "nullable": true
          },
          "lineIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "For `lines_incomplete` and `credit_info_missing`, the ids of the lines concerned; empty otherwise.",
            "nullable": true
          },
          "mailResults": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_JobStaffDispatchMailResult"
            },
            "description": "For `payment_required`, the result of each dispatch email this request attempted, in order; empty when it\r\nattempted none.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Why a staff member's dispatch of a job did not complete. Nothing was changed except where the reason says otherwise."
      },
      "Codewolf_Ctrl_Api_Dto_JobStaffDispatchResponse": {
        "type": "object",
        "properties": {
          "jobNumber": {
            "type": "integer",
            "description": "The job number.",
            "format": "int32"
          },
          "status": {
            "type": "string",
            "description": "The job's status in plain English: Dispatched, or Closed for a customer that is not invoiced.",
            "nullable": true
          },
          "masterJobStatusId": {
            "type": "integer",
            "description": "The job's master status id.",
            "format": "int32"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What needs the staff member's attention although the job was dispatched; empty when nothing does. Each entry is\r\none of `refund_failed` or `documents_pending`.",
            "nullable": true
          },
          "warningText": {
            "type": "string",
            "description": "Text to show the staff member about the warnings, or null when there are none.",
            "nullable": true
          },
          "emailsSent": {
            "type": "boolean",
            "description": "False when any dispatch email sent by this request was not sent, so the staff member should be told the emails\r\nfailed; true when every one was sent; null when this request sent no dispatch emails or their outcome is not\r\nknown.",
            "nullable": true
          },
          "mailResults": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_JobStaffDispatchMailResult"
            },
            "description": "The result of each dispatch email this request attempted, in order; empty when it attempted none.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The job after a staff member dispatched it."
      },
      "Codewolf_Ctrl_Api_Dto_MarkStockCompleteResponse": {
        "type": "object",
        "properties": {
          "jobNumber": {
            "type": "integer",
            "description": "The job that was marked.",
            "format": "int32"
          },
          "stockStatus": {
            "type": "string",
            "description": "The job's stock status in plain English: \"No Stock\", \"Partial Stock\" or \"Stock Complete\".\r\nAfter a successful call this is \"Stock Complete\".",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The state of a job after a customer marked its stock complete."
      },
      "Codewolf_Ctrl_Api_Dto_PatchAssetDto": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "description": "Asset description",
            "nullable": true
          },
          "memo": {
            "type": "string",
            "description": "Asset memo/notes",
            "nullable": true
          },
          "isArchived": {
            "type": "boolean",
            "description": "Set to true to archive the asset, false to unarchive. Null means no change.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "DTO for patching asset details"
      },
      "Codewolf_Ctrl_Api_Dto_PatchJobDto": {
        "type": "object",
        "properties": {
          "description": {
            "maxLength": 500,
            "type": "string",
            "description": "Job description",
            "nullable": true
          },
          "comments": {
            "maxLength": 1000,
            "type": "string",
            "description": "Internal job comments",
            "nullable": true
          },
          "orderNumber": {
            "maxLength": 50,
            "type": "string",
            "description": "Customer PO/reference number",
            "nullable": true
          },
          "mustDate": {
            "type": "boolean",
            "description": "Toggle \"must ship by\" flag on/off",
            "nullable": true
          },
          "dateDue": {
            "type": "string",
            "description": "Requested ship date",
            "format": "date-time",
            "nullable": true
          },
          "locationCode": {
            "maxLength": 50,
            "type": "string",
            "description": "New production location code (e.g. \"LA\", \"AT\"). SuperUser only.\r\nOmit/null = no change. Must match an active, non-virtual location.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "DTO for patching job details"
      },
      "Codewolf_Ctrl_Api_Dto_PatchJobShippingDto": {
        "type": "object",
        "properties": {
          "shipmentId": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "description": "Identifies which shipment on the job to update, from the `shipmentId`\r\nreturned on each entry of `shippingAddresses` by GET /Jobs/{jobNumber}.\r\n<br>\r\nOptional. If the job has exactly one shipment it may be omitted and that\r\nshipment is used. If the job has more than one, it is required — a patch with\r\nno identifier is rejected rather than resolved by guesswork.\r\n\r\nMay also be supplied on the route as PATCH /Jobs/{jobNumber}/shipping/{shipmentId};\r\nif both are given they must agree.",
            "format": "int32",
            "nullable": true
          },
          "contactName": {
            "maxLength": 50,
            "type": "string",
            "description": "Contact name for delivery",
            "nullable": true
          },
          "organisation": {
            "maxLength": 100,
            "type": "string",
            "description": "Organisation/Company name",
            "nullable": true
          },
          "streetAddress": {
            "maxLength": 250,
            "type": "string",
            "description": "Street address line 1",
            "nullable": true
          },
          "address2": {
            "maxLength": 250,
            "type": "string",
            "description": "Street address line 2",
            "nullable": true
          },
          "suburb": {
            "maxLength": 250,
            "type": "string",
            "description": "Suburb",
            "nullable": true
          },
          "city": {
            "maxLength": 250,
            "type": "string",
            "description": "City",
            "nullable": true
          },
          "state": {
            "maxLength": 200,
            "type": "string",
            "description": "State/Province",
            "nullable": true
          },
          "postalCode": {
            "maxLength": 50,
            "type": "string",
            "description": "Postal/Zip code",
            "nullable": true
          },
          "countryCodeISO2": {
            "maxLength": 2,
            "type": "string",
            "description": "ISO 2-letter country code",
            "nullable": true
          },
          "country": {
            "maxLength": 100,
            "type": "string",
            "description": "Country Name (e.g., \"United States\", \"New Zealand\")",
            "nullable": true
          },
          "phone": {
            "maxLength": 50,
            "type": "string",
            "description": "Phone number",
            "nullable": true
          },
          "emailAddress": {
            "maxLength": 150,
            "type": "string",
            "description": "Email address",
            "format": "email",
            "nullable": true
          },
          "deliveryMethod": {
            "maxLength": 50,
            "type": "string",
            "description": "Delivery method",
            "nullable": true
          },
          "shippingInstructions": {
            "maxLength": 350,
            "type": "string",
            "description": "Shipping instructions",
            "nullable": true
          },
          "isSaturdayDelivery": {
            "type": "boolean",
            "description": "Indicates whether Saturday delivery is requested for this shipment.\r\nSupported by UPS and FedEx express services. Optional.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "DTO for patching job shipping/delivery details"
      },
      "Codewolf_Ctrl_Api_Dto_PriceTierBandChargeDto": {
        "type": "object",
        "properties": {
          "chargeTypeId": {
            "type": "integer",
            "description": "The extra charge's id.",
            "format": "int32"
          },
          "cost": {
            "type": "number",
            "description": "The amount.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "The amount of one extra charge on a band."
      },
      "Codewolf_Ctrl_Api_Dto_PriceTierBandDto": {
        "type": "object",
        "properties": {
          "bandId": {
            "type": "integer",
            "description": "The band's id; unique together with Codewolf.Ctrl.Api.Dto.PriceTierBandDto.CalcType.",
            "format": "int32"
          },
          "calcType": {
            "type": "string",
            "description": "UNIT when Codewolf.Ctrl.Api.Dto.PriceTierBandDto.Price is a price per item, MARKUP when it is a markup percentage.",
            "nullable": true
          },
          "from": {
            "type": "integer",
            "description": "The smallest quantity the band covers.",
            "format": "int32"
          },
          "to": {
            "type": "integer",
            "description": "The largest quantity the band covers, or null when it has no upper limit.",
            "format": "int32",
            "nullable": true
          },
          "price": {
            "type": "number",
            "description": "The price per item, or the markup percentage.",
            "format": "double"
          },
          "minCharge": {
            "type": "number",
            "description": "The least charged for the band, or null or 0 for none.",
            "format": "double",
            "nullable": true
          },
          "charges": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_PriceTierBandChargeDto"
            },
            "description": "The amounts of the category's extra charges on this band. A charge with no amount is left out.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One quantity band of a unit: a price for quantities in a range."
      },
      "Codewolf_Ctrl_Api_Dto_PriceTierCategoryDto": {
        "type": "object",
        "properties": {
          "categoryCode": {
            "type": "string",
            "description": "The category code.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "The category name.",
            "nullable": true
          },
          "parentCategoryCode": {
            "type": "string",
            "description": "The category this one sits under, or null.",
            "nullable": true
          },
          "hasCharges": {
            "type": "boolean",
            "description": "False when no setup or reset charges have been set for the category in this tier; the charges are then null."
          },
          "setup": {
            "type": "number",
            "description": "The setup charge.",
            "format": "double",
            "nullable": true
          },
          "setupApplies": {
            "type": "boolean",
            "description": "True when the setup charge is applied.",
            "nullable": true
          },
          "reset": {
            "type": "number",
            "description": "The reset charge.",
            "format": "double",
            "nullable": true
          },
          "resetApplies": {
            "type": "boolean",
            "description": "True when the reset charge is applied.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A category shown under a price tier, with the tier's setup and reset charges for it."
      },
      "Codewolf_Ctrl_Api_Dto_PriceTierChargeTypeDto": {
        "type": "object",
        "properties": {
          "chargeTypeId": {
            "type": "integer",
            "description": "The charge's id.",
            "format": "int32"
          },
          "label": {
            "type": "string",
            "description": "The charge's name, as shown on the price sheets.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "An extra per-quantity charge of a category."
      },
      "Codewolf_Ctrl_Api_Dto_PriceTierDto": {
        "type": "object",
        "properties": {
          "tierCode": {
            "type": "string",
            "description": "The tier's code.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "What the tier is for.",
            "nullable": true
          },
          "dateCreated": {
            "type": "string",
            "description": "When the tier was created.",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string",
            "description": "The user who created the tier.",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "description": "Notes about the tier.",
            "nullable": true
          },
          "active": {
            "type": "boolean",
            "description": "False when the tier is no longer offered."
          },
          "copiedFrom": {
            "type": "string",
            "description": "The tier this one was copied from, or null.",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean",
            "description": "True for the tier used when a customer has none; it cannot be deleted."
          }
        },
        "additionalProperties": false,
        "description": "A price tier: a named set of prices that customers are assigned to."
      },
      "Codewolf_Ctrl_Api_Dto_PriceTierPricesDto": {
        "type": "object",
        "properties": {
          "tierCode": {
            "type": "string",
            "description": "The tier.",
            "nullable": true
          },
          "categoryCode": {
            "type": "string",
            "description": "The category.",
            "nullable": true
          },
          "chargeTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_PriceTierChargeTypeDto"
            },
            "description": "The extra per-quantity charges the category's bands carry, e.g. a surcharge. Usually none.",
            "nullable": true
          },
          "units": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_PriceTierUnitDto"
            },
            "description": "The category's units, each with its bands in this tier. A unit with no bands in the tier has an empty list.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A category's prices in a tier: each unit with its quantity bands, and the category's extra charges."
      },
      "Codewolf_Ctrl_Api_Dto_PriceTierProcessDto": {
        "type": "object",
        "properties": {
          "processCode": {
            "type": "string",
            "description": "The process code.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "The process name.",
            "nullable": true
          },
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_PriceTierCategoryDto"
            },
            "description": "The process's categories the tier shows, in price sheet order. May be empty.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A process shown under a price tier, with its categories."
      },
      "Codewolf_Ctrl_Api_Dto_PriceTierUnitDto": {
        "type": "object",
        "properties": {
          "categoryUnitId": {
            "type": "integer",
            "description": "The unit's id.",
            "format": "int32"
          },
          "unitType": {
            "type": "string",
            "description": "The unit's name, e.g. a size or a number of colours.",
            "nullable": true
          },
          "calcType": {
            "type": "string",
            "description": "UNIT when the unit is priced per item, MARKUP when by a markup percentage.",
            "nullable": true
          },
          "setupMultiplier": {
            "type": "integer",
            "description": "How many times the setup and reset charges apply for this unit.",
            "format": "int32"
          },
          "bands": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_PriceTierBandDto"
            },
            "description": "The unit's quantity bands, smallest quantity first.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A unit a category is priced in, with its quantity bands in the tier."
      },
      "Codewolf_Ctrl_Api_Dto_RemoveJobLinesRequest": {
        "type": "object",
        "properties": {
          "jobLineIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "The lines to remove, at most 100, each named once.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lines to remove from a placed job, applied together or not at all."
      },
      "Codewolf_Ctrl_Api_Dto_SavePriceTierChargesRequest": {
        "type": "object",
        "properties": {
          "setup": {
            "type": "number",
            "description": "The setup charge. From 0 to 9,999,999.99, two decimals at most.",
            "format": "double",
            "nullable": true
          },
          "setupApplies": {
            "type": "boolean",
            "description": "True to apply the setup charge.",
            "nullable": true
          },
          "reset": {
            "type": "number",
            "description": "The reset charge. From 0 to 9,999,999.99, two decimals at most.",
            "format": "double",
            "nullable": true
          },
          "resetApplies": {
            "type": "boolean",
            "description": "True to apply the reset charge.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A category's setup and reset charges in a tier. A blank charge means 0."
      },
      "Codewolf_Ctrl_Api_Dto_SaveSepsResponseDto": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_FileUploadResponseDto"
          }
        ],
        "properties": {
          "jobNumber": {
            "type": "integer",
            "format": "int32"
          },
          "jobLineId": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Response DTO for file upload operations to assetFiles for separation work flow."
      },
      "Codewolf_Ctrl_Api_Dto_SaveSepsUrlResponseDto": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_SaveSepsResponseDto"
          }
        ],
        "properties": {
          "taskGuid": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response DTO for file upload operations to assetFiles for separation work flow."
      },
      "Codewolf_Ctrl_Api_Dto_ShippingDateExclusionDto": {
        "type": "object",
        "properties": {
          "dateFrom": {
            "type": "string",
            "description": "Start date of the exclusion period (date only, no time)",
            "format": "date"
          },
          "dateTo": {
            "type": "string",
            "description": "End date of the exclusion period (date only, no time)",
            "format": "date"
          }
        },
        "additionalProperties": false,
        "description": "Date exclusion (holiday/non-working day) for calendar blocking"
      },
      "Codewolf_Ctrl_Api_Dto_ShippingDateResponseDto": {
        "type": "object",
        "properties": {
          "shippingDateUtc": {
            "type": "string",
            "description": "Calculated earliest shipping date in UTC",
            "format": "date-time"
          },
          "shippingDateLocal": {
            "type": "string",
            "description": "Calculated earliest shipping date in customer's local timezone",
            "format": "date-time"
          },
          "timezone": {
            "type": "string",
            "description": "IANA timezone used for calculations (e.g., \"Pacific/Auckland\")",
            "nullable": true
          },
          "dateExclusions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_ShippingDateExclusionDto"
            },
            "description": "List of date exclusions (holidays, non-working days) to block on calendar UI",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response containing calculated shipping date and date exclusions for calendar blocking"
      },
      "Codewolf_Ctrl_Api_Dto_TagAcceptedDto": {
        "type": "object",
        "properties": {
          "accepted": {
            "type": "boolean",
            "description": "Always true: the tag is queued and is written shortly afterwards."
          }
        },
        "additionalProperties": false,
        "description": "Confirms a tag was queued."
      },
      "Codewolf_Ctrl_Api_Dto_TagHandleDto": {
        "type": "object",
        "properties": {
          "handle": {
            "type": "string",
            "description": "What to type in a tag to name the user: @ followed by their login.",
            "nullable": true
          },
          "fullName": {
            "type": "string",
            "description": "The user's name. Null when no name is held for the login.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A user who can be named in a tag."
      },
      "Codewolf_Ctrl_Api_Dto_TagRemovalAcceptedDto": {
        "type": "object",
        "properties": {
          "accepted": {
            "type": "boolean",
            "description": "Always true: the removal is queued and the tag is taken off shortly afterwards."
          }
        },
        "additionalProperties": false,
        "description": "Confirms the removal of a tag was queued."
      },
      "Codewolf_Ctrl_Api_Dto_TagTypeDto": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type, as used in the tag routes: ASSET, INWARDS, JOB, QUOTE or STOCK.",
            "nullable": true
          },
          "entityIdMeaning": {
            "type": "string",
            "description": "Which id identifies an entity of this type in the tag routes, for example the job number.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A type of entity a tag can be put on."
      },
      "Codewolf_Ctrl_Api_Dto_UpdateJobLinesRequest": {
        "type": "object",
        "properties": {
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_JobLineUpdate"
            },
            "description": "The lines to change, at most 100, each named once.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Changes to existing lines of a placed job, applied together or not at all."
      },
      "Codewolf_Ctrl_Api_Dto_UpdatePriceTierBandChargeRequest": {
        "type": "object",
        "properties": {
          "chargeTypeId": {
            "type": "integer",
            "description": "The extra charge's id.",
            "format": "int32"
          },
          "cost": {
            "type": "number",
            "description": "The amount. 0 or more, four decimals at most.",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A new amount for one extra charge on a band."
      },
      "Codewolf_Ctrl_Api_Dto_UpdatePriceTierBandRequest": {
        "type": "object",
        "properties": {
          "bandId": {
            "type": "integer",
            "description": "The band's id.",
            "format": "int32"
          },
          "calcType": {
            "type": "string",
            "description": "The band's calculation type as returned with it: UNIT or MARKUP.",
            "nullable": true
          },
          "price": {
            "type": "number",
            "description": "The price per item (four decimals at most), or the markup percentage (two decimals at most). Required, 0 or more.",
            "format": "double",
            "nullable": true
          },
          "minCharge": {
            "type": "number",
            "description": "The least charged for the band. 0 or more, four decimals at most.",
            "format": "double",
            "nullable": true
          },
          "charges": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_UpdatePriceTierBandChargeRequest"
            },
            "description": "Amounts for the category's extra charges on this band. Optional.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "New prices for one band. A blank min charge or extra charge means 0."
      },
      "Codewolf_Ctrl_Api_Dto_UpdatePriceTierPricesRequest": {
        "type": "object",
        "properties": {
          "bands": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_UpdatePriceTierBandRequest"
            },
            "description": "The bands to change. Required, at least one, each band once.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "New prices for some of a category's existing bands in a tier. Quantity ranges are not changed."
      },
      "Codewolf_Ctrl_Api_Dto_UpdatePriceTierRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "description": "What the tier is for. Optional, up to 1,500 characters.",
            "nullable": true
          },
          "active": {
            "type": "boolean",
            "description": "False to stop offering the tier. Required.",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "description": "Notes about the tier. Optional, up to 1,500 characters.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The values of a price tier that can be changed."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_AddBomItemRequest": {
        "type": "object",
        "properties": {
          "assetCode": {
            "type": "string",
            "description": "The stock variant code of the garment, or the asset tag of a decoration. Required; maximum\r\n150 characters, printable ASCII.",
            "nullable": true
          },
          "position": {
            "type": "string",
            "description": "Where the item sits on the garment. Maximum 250 characters, printable ASCII.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Add an item to a BOM's composition."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_ApproveStockMatchCandidateRequestDto": {
        "type": "object",
        "properties": {
          "override": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockMatchOverride"
              }
            ],
            "description": "The reviewer's change to the product or colours, or null to approve as proposed.",
            "nullable": true
          },
          "confirmExoChecked": {
            "type": "boolean",
            "description": "The reviewer confirms the stock was checked in Exo, which lets retirement proceed for an\r\nExo-managed supplier."
          }
        },
        "additionalProperties": false,
        "description": "A reviewer's approval of one candidate."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_ApproveStockMatchCandidatesRequestDto": {
        "required": [
          "ids"
        ],
        "type": "object",
        "properties": {
          "ids": {
            "maxItems": 500,
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "The candidates to approve."
          },
          "confirmExoChecked": {
            "type": "boolean",
            "description": "The reviewer confirms the stock was checked in Exo."
          }
        },
        "additionalProperties": false,
        "description": "A reviewer's approval of several candidates as proposed."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_AssetFileDto": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "string",
            "description": "Hashed file identifier (matches the hashId in cdnUrl)\r\nCan be used to construct CDN URLs or for download requests",
            "nullable": true
          },
          "fileName": {
            "type": "string",
            "description": "Original filename",
            "nullable": true
          },
          "fileSize": {
            "type": "integer",
            "description": "File size in bytes",
            "format": "int64"
          },
          "dateUploaded": {
            "type": "string",
            "description": "Date and time when the file was uploaded",
            "format": "date-time"
          },
          "isImage": {
            "type": "boolean",
            "description": "Indicates whether this file is an image type (jpg, jpeg, png, gif, bmp)\r\nFor image files, clients can append ?size=100 to cdnUrl for thumbnails"
          },
          "cdnUrl": {
            "type": "string",
            "description": "Full CDN URL for accessing the file\r\nFor images, append ?size=50, ?size=100, or ?size=150 for thumbnails",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Individual asset file information"
      },
      "Codewolf_Ctrl_Api_Dtos_Api_AssetFilesResponseDto": {
        "type": "object",
        "properties": {
          "assetTag": {
            "type": "string",
            "description": "The asset tag (also known as asset code)",
            "nullable": true
          },
          "currentFiles": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_AssetFileDto"
                },
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_HistoricAssetFileDto"
                }
              ],
              "description": "Individual asset file information"
            },
            "description": "List of current (active) files associated with this asset (ordered by date uploaded descending)",
            "nullable": true
          },
          "historicFiles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_HistoricAssetFileDto"
            },
            "description": "List of historic (archived) files associated with this asset (ordered by date uploaded descending)",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response DTO for retrieving asset files"
      },
      "Codewolf_Ctrl_Api_Dtos_Api_AssetJobDto": {
        "type": "object",
        "properties": {
          "jobNumber": {
            "type": "integer",
            "description": "Job number",
            "format": "int32"
          },
          "orderNumber": {
            "type": "string",
            "description": "Customer's order number",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Job description",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "description": "Quantity from the job line matching this asset (not total job qty)",
            "format": "int32",
            "nullable": true
          },
          "dateOut": {
            "type": "string",
            "description": "Date the job was dispatched (null for active jobs not yet shipped)",
            "format": "date-time",
            "nullable": true
          },
          "masterJobStatus": {
            "type": "string",
            "description": "Current job status",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Individual job information in asset jobs response"
      },
      "Codewolf_Ctrl_Api_Dtos_Api_AssetJobsResponseDto": {
        "type": "object",
        "properties": {
          "assetCode": {
            "type": "string",
            "description": "The asset code that was queried",
            "nullable": true
          },
          "jobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_AssetJobDto"
            },
            "description": "List of jobs containing this asset",
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "description": "Total count of jobs returned",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Response DTO for asset jobs endpoint"
      },
      "Codewolf_Ctrl_Api_Dtos_Api_AssetListDto": {
        "type": "object",
        "properties": {
          "assetId": {
            "type": "integer",
            "format": "int32"
          },
          "assetTag": {
            "type": "string",
            "nullable": true
          },
          "processCode": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "garment": {
            "type": "string",
            "nullable": true
          },
          "priceTierCode": {
            "type": "string",
            "nullable": true
          },
          "setup": {
            "type": "number",
            "format": "double"
          },
          "reset": {
            "type": "number",
            "format": "double"
          },
          "priceCode": {
            "type": "string",
            "nullable": true
          },
          "assetUrl": {
            "type": "string",
            "nullable": true
          },
          "createDate": {
            "type": "string",
            "format": "date-time"
          },
          "isGlobal": {
            "type": "boolean"
          },
          "isArchived": {
            "type": "boolean"
          },
          "lastJobDate": {
            "type": "string",
            "description": "When this asset was last used on a job, or null where it has never been used. A job that\r\nis still open counts from the day it was placed. Present only when the caller passed\r\nincludeLastUsed, or sorted the list by LastUsed.",
            "format": "date-time",
            "nullable": true
          },
          "lastJobId": {
            "type": "integer",
            "description": "The job this asset was last used on, or null where it has never been used. Present only\r\nwhen the caller passed includeLastUsed, or sorted the list by LastUsed.",
            "format": "int32",
            "nullable": true
          },
          "priceBands": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Interfaces_IPriceBandDto"
            },
            "nullable": true
          },
          "attributes": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "nullable": true
            },
            "description": "Free-form asset attributes (the AssetAttributes table) as name/value pairs.\r\n<br>\r\nPopulated for SuperUser callers only. NullValueHandling.Ignore is set explicitly at the\r\nproperty level because the MVC response pipeline (ApiConfigurationHelper.ConfigureControllers)\r\ndoes not override Newtonsoft's default of Include — without this attribute a null would\r\nserialize as an explicit \"attributes\": null key and leak the property's existence to\r\nnon-SuperUser callers.\r\n<br>\r\nAn empty dictionary means \"authorised, but this asset has no attributes\"; an absent key\r\nmeans \"not authorised to see them\".\r\n",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Asset DTO for list endpoints - excludes ExternalId per CW-4024"
      },
      "Codewolf_Ctrl_Api_Dtos_Api_BomItemResultDto": {
        "type": "object",
        "properties": {
          "bom": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Api_Support_BomDtos_BomDto"
              },
              {
                "$ref": "#/components/schemas/Codewolf_Api_Support_BomDtos_BomExtendedDto"
              }
            ],
            "description": "describes a BOM (Bill of Materials) Lookup Item",
            "nullable": true
          },
          "bomItemId": {
            "type": "integer",
            "description": "The id of the item that was added.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "The body of a successful add-item: the re-read BOM plus the new item's id, so the caller need\r\nnot search `items` for what it just created."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_BomRangeDto": {
        "type": "object",
        "properties": {
          "range": {
            "type": "string",
            "description": "The BOM range name.",
            "nullable": true
          },
          "bomCount": {
            "type": "integer",
            "description": "Number of active, non-deleted BOMs in this range (informational — used by the UI to show \"(42)\").",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Represents a BOM range with a count of active, non-deleted BOMs in that range.\r\nReturned by GET /boms/ranges for the Shopify Import BOMs page."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_ConnectStockGatewaySupplierAccountRequestDto": {
        "required": [
          "credentials",
          "label"
        ],
        "type": "object",
        "properties": {
          "label": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string",
            "description": "A name for the account, for example the trading name it belongs to."
          },
          "credentials": {
            "maxLength": 20,
            "minLength": 1,
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "The credentials the supplier asks for, by name, for example a username and password. Each name and\r\nvalue is checked when the account is connected."
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether this is the account the supplier's prices and stock are read with."
          }
        },
        "additionalProperties": false,
        "description": "The trade account to connect a gateway supplier with. The credentials go straight to the gateway\r\nand are never stored or returned by Control."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_CopyStockGatewayPricingAddendumRequestDto": {
        "type": "object",
        "properties": {
          "targetTierCodes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The tier codes; each tier's addendum is replaced by the copy. At most 200 different tiers can be given; a\r\ntier given more than once counts once.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The price tiers a tier's Stock Gateway pricing addendum is to be copied to."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_CountryDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Full country name",
            "nullable": true,
            "example": "United States"
          },
          "iso2": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 code",
            "nullable": true,
            "example": "US"
          },
          "iso3": {
            "type": "string",
            "description": "ISO 3166-1 alpha-3 code",
            "nullable": true,
            "example": "USA"
          },
          "hasSuburb": {
            "type": "boolean",
            "description": "Indicates whether this country uses a suburb/district field in addresses (Dependent Locality)",
            "example": true
          },
          "hasState": {
            "type": "boolean",
            "description": "Indicates whether this country uses a state/province field in addresses (Administrative Area)",
            "example": true
          },
          "hasPostalCode": {
            "type": "boolean",
            "description": "Indicates whether this country uses a postal/zip code field in addresses",
            "example": true
          }
        },
        "additionalProperties": false,
        "description": "Country information for lookup"
      },
      "Codewolf_Ctrl_Api_Dtos_Api_CountryListResponse": {
        "type": "object",
        "properties": {
          "countries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_CountryDto"
            },
            "description": "List of available countries",
            "nullable": true
          },
          "defaultCountry": {
            "type": "string",
            "description": "Default country ISO2 code for this tenant",
            "nullable": true,
            "example": "US"
          }
        },
        "additionalProperties": false,
        "description": "Response containing list of countries with default"
      },
      "Codewolf_Ctrl_Api_Dtos_Api_CreateAssetRequestDto": {
        "type": "object",
        "properties": {
          "customerId": {
            "type": "integer",
            "description": "Customer the asset belongs to.",
            "format": "int32"
          },
          "code": {
            "type": "string",
            "description": "Price code that drives process, setup/reset, and pricing-band selection (e.g. \"DF_METERAGE:SupaDTF Supagang - 1.2m\").",
            "nullable": true
          },
          "attributes": {
            "type": "object",
            "additionalProperties": { },
            "description": "Free-form attributes the price-code validator consumes (description, garment, position, plus any process-specific attrs).",
            "nullable": true
          },
          "externalId": {
            "type": "string",
            "description": "External system identifier (max 255 chars).",
            "nullable": true
          },
          "assetBarcode": {
            "type": "string",
            "description": "Optional value identifying the product, printed as a barcode on the asset's labels. Up to 100\r\ncharacters, and only characters the chosen Codewolf.Ctrl.Api.Dtos.Api.CreateAssetRequestDto.AssetBarcodeFormat can encode.",
            "nullable": true
          },
          "assetBarcodeFormat": {
            "type": "string",
            "description": "Optional format for Codewolf.Ctrl.Api.Dtos.Api.CreateAssetRequestDto.AssetBarcode: code128, code39, ean13, ean8, upca, itf14, qrcode or\r\ndatamatrix. Requires Codewolf.Ctrl.Api.Dtos.Api.CreateAssetRequestDto.AssetBarcode. When omitted the value is checked as code128, and the\r\nlabel draws it in its template's default format, or code128.",
            "nullable": true
          },
          "externalSupplier": {
            "type": "string",
            "description": "Optional external supplier code (only used when the price code is a third-party supplier code).",
            "nullable": true
          },
          "externalPriceCode": {
            "type": "string",
            "description": "Optional external price code companion to Codewolf.Ctrl.Api.Dtos.Api.CreateAssetRequestDto.ExternalSupplier.",
            "nullable": true
          },
          "externalArtworkUrl": {
            "type": "string",
            "description": "Optional URL to working artwork. When supplied, a background download job is queued; the file is\r\nattached to the asset asynchronously. The caller can also use POST /Assets/{assetTag}/files to push\r\nbytes directly instead of (or in addition to) supplying a URL.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for POST /Assets — mint a new Codewolf asset directly (no job).\r\nThe asset is built from the same PriceCode shape that `/Jobs/shop` consumes\r\nfor job lines, minus everything that is jobline-specific."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_CreateAssetResponseDto": {
        "type": "object",
        "properties": {
          "assetTag": {
            "type": "string",
            "description": "Tag of the newly created asset (e.g. \"DF12345\").",
            "nullable": true
          },
          "customerId": {
            "type": "integer",
            "description": "Customer the asset belongs to.",
            "format": "int32"
          },
          "process": {
            "type": "string",
            "description": "Resolved process code (e.g. \"DF\", \"EW\").",
            "nullable": true
          },
          "priceCode": {
            "type": "string",
            "description": "Resolved canonical price code.",
            "nullable": true
          },
          "externalId": {
            "type": "string",
            "description": "External id echoed back from the request.",
            "nullable": true
          },
          "assetBarcode": {
            "type": "string",
            "description": "The barcode value stored on the asset. Null when none was supplied.",
            "nullable": true
          },
          "assetBarcodeFormat": {
            "type": "string",
            "description": "The barcode format stored on the asset. Null when no format was chosen: the label then draws it in its template's default format, or code128.",
            "nullable": true
          },
          "awaitingArtwork": {
            "type": "boolean",
            "description": "Mirrors the job-flow's `TblJobLines.AwaitingArtwork` semantics:\r\n<list type=\"bullet\"><item><description>`false` when `externalArtworkUrl` was supplied — the caller committed\r\n    artwork (file lands asynchronously via the background worker).</description></item><item><description>`true` when no URL was supplied — the asset is waiting for the caller to\r\n    push bytes via POST /Assets/{assetTag}/files.</description></item></list>"
          },
          "artworkDownloadQueued": {
            "type": "boolean",
            "description": "True when an artwork-download message was successfully enqueued for the supplied `externalArtworkUrl`.\r\nFalse when no URL was supplied, or when the queue dispatch failed (asset is still created either way —\r\nthe caller can retry by uploading directly to POST /Assets/{assetTag}/files)."
          }
        },
        "additionalProperties": false,
        "description": "Response body for POST /Assets."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_CreateBomRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "The BOM's title. Required; maximum 4,000 characters.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Free text describing the product. Maximum 8,000 characters.",
            "nullable": true
          },
          "range": {
            "type": "string",
            "description": "The range this BOM belongs to. Required; maximum 100 characters, printable ASCII.",
            "nullable": true
          },
          "customerSku": {
            "type": "string",
            "description": "The customer's own SKU for the BOM. Maximum 100 characters, printable ASCII.",
            "nullable": true
          },
          "active": {
            "type": "boolean",
            "description": "Whether the BOM is active. Defaults to `true` when the property is omitted — the\r\ninitialiser is load-bearing: a bare bool deserialises an absent property to false, and the\r\ncreate procedure requires the flag, so without it the natural create would silently make an\r\narchived BOM."
          }
        },
        "additionalProperties": false,
        "description": "Create a BOM. Ownership binds from the token, so there is no customer field anywhere on this\r\ntype, and no `code` — BOM.Code is a computed column read back from the created row."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_CreateInwardsItemDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "nullable": true
          },
          "garment": {
            "type": "string",
            "nullable": true
          },
          "colour": {
            "type": "string",
            "nullable": true
          },
          "sizeSet": {
            "type": "string",
            "nullable": true
          },
          "quantities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_SizeQuantityDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Line item payload for POST /Inwards."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_CreateInwardsRequest": {
        "type": "object",
        "properties": {
          "customerId": {
            "type": "integer",
            "description": "The customer the delivery is for. Required from a caller that is not tied to one customer;\r\nignored from a customer's own credentials, which always create for that customer. A\r\nvalue that is not a JSON whole number, including a number in quotes, is read as absent.",
            "format": "int32",
            "nullable": true
          },
          "orderNumber": {
            "type": "string",
            "nullable": true
          },
          "supplierId": {
            "type": "integer",
            "format": "int32"
          },
          "cartons": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "packageType": {
            "type": "string",
            "nullable": true
          },
          "dateDue": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "comment": {
            "type": "string",
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_CreateInwardsItemDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Payload for POST /Inwards."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_CreateInwardsResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response for POST /Inwards."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_CreateUserRequest": {
        "required": [
          "city",
          "emailAddress",
          "firstName",
          "lastName",
          "phone",
          "postalCode",
          "userName"
        ],
        "type": "object",
        "properties": {
          "firstName": {
            "maxLength": 50,
            "minLength": 1,
            "type": "string",
            "description": "User's first name"
          },
          "lastName": {
            "maxLength": 50,
            "minLength": 1,
            "type": "string",
            "description": "User's last name"
          },
          "emailAddress": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string",
            "description": "User's email address",
            "format": "email"
          },
          "userName": {
            "maxLength": 30,
            "minLength": 1,
            "pattern": "^[\\w@]+$",
            "type": "string",
            "description": "Login username (alphanumeric and @ only)"
          },
          "phone": {
            "maxLength": 50,
            "minLength": 1,
            "type": "string",
            "description": "Phone number"
          },
          "mobile": {
            "maxLength": 50,
            "type": "string",
            "description": "Mobile number (optional)",
            "nullable": true
          },
          "streetAddress": {
            "maxLength": 255,
            "type": "string",
            "description": "Street address line 1",
            "nullable": true
          },
          "addressLine2": {
            "maxLength": 255,
            "type": "string",
            "description": "Address line 2 (apt, building, suite, etc.)",
            "nullable": true
          },
          "suburb": {
            "maxLength": 255,
            "type": "string",
            "description": "Suburb/neighborhood",
            "nullable": true
          },
          "city": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string",
            "description": "City"
          },
          "state": {
            "maxLength": 255,
            "type": "string",
            "description": "State/province abbreviation or name.\r\nRequired if country has state subdivisions.",
            "nullable": true
          },
          "postalCode": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string",
            "description": "Postal/ZIP code"
          },
          "country": {
            "maxLength": 100,
            "type": "string",
            "description": "Country code (ISO2, ISO3, or full name).\r\nDefaults to tenant's default country if not provided.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request to create a new customer user"
      },
      "Codewolf_Ctrl_Api_Dtos_Api_CustomerJobCancelResponse": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "description": "The action taken on the order:\r\n<list type=\"bullet\"><item>`\"cancelled\"` — production cancelled (no refund needed; payment was not yet captured).</item><item>`\"refunded\"` — production cancelled and the captured payment refunded.</item><item>`\"already_reversed\"` — idempotent replay; the order was already cancelled by a concurrent request.</item></list>",
            "nullable": true
          },
          "jobNumber": {
            "type": "string",
            "description": "The job number that was processed (echo of the route parameter,\r\nfor client-side display).",
            "nullable": true
          },
          "message": {
            "type": "string",
            "description": "Human-readable English message for the customer UI. Clients may\r\noverride based on Codewolf.Ctrl.Api.Dtos.Api.CustomerJobCancelResponse.Action to support localisation.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response from the customer-initiated cancel-with-refund endpoint.\r\nIntentionally slim — internal fields such as `JobCancelled` on the\r\nunderlying engine response are not surfaced to retail customers."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_FulfilmentLocationDto": {
        "type": "object",
        "properties": {
          "locationCode": {
            "type": "string",
            "nullable": true
          },
          "locationName": {
            "type": "string",
            "nullable": true
          },
          "locale": {
            "type": "string",
            "nullable": true
          },
          "shipFromCity": {
            "type": "string",
            "nullable": true
          },
          "shipFromCountryCodeIso2": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Nested DTO representing a resolved fulfilment location within a shipping config."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_HistoricAssetFileDto": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_AssetFileDto"
          }
        ],
        "properties": {
          "action": {
            "type": "string",
            "description": "Action that caused this file to be archived (e.g., \"Replaced\", \"Archived\")",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Historic (archived) asset file information with action details"
      },
      "Codewolf_Ctrl_Api_Dtos_Api_InwardsDto": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_InwardsSummaryDto"
          }
        ],
        "properties": {
          "supplierId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "dateDue": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "shelfLocation": {
            "type": "string",
            "nullable": true
          },
          "comment": {
            "type": "string",
            "nullable": true
          },
          "packingSlipNumber": {
            "type": "string",
            "description": "Packing slip reference for this delivery, or null when none is recorded. Free text, not a\r\nnumber — live values are frequently alphanumeric (for example \"ORN0073086\") and a\r\nplaceholder \"-\" is common, so treat this as an opaque display string.",
            "nullable": true
          },
          "scanFile": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_InwardsScanFileDto"
              }
            ],
            "description": "Link to the supplier's packing slip as scanned at goods-in, or null when this delivery has\r\nno scan on file. Distinct from Codewolf.Ctrl.Api.Dtos.Api.InwardsDto.PackingSlipNumber, which is the reference the\r\nsupplier printed on the paperwork — this is the document itself.",
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_InwardsItemDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Detailed representation of an inwards record including items."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_InwardsItemDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "code": {
            "type": "string",
            "nullable": true
          },
          "garment": {
            "type": "string",
            "nullable": true
          },
          "colour": {
            "type": "string",
            "nullable": true
          },
          "sizeSetId": {
            "type": "integer",
            "format": "int32"
          },
          "sizeSet": {
            "type": "string",
            "nullable": true
          },
          "quantities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_SizeQuantityDto"
            },
            "nullable": true
          },
          "total": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "A line item on an inwards record."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_InwardsListResponseDto": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_InwardsSummaryDto"
                },
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_InwardsDto"
                },
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_PatchInwardsResponseDto"
                }
              ],
              "description": "Summary representation of an inwards record (used in list responses)."
            },
            "nullable": true
          },
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalItems": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Paginated list response for GET /Inwards."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_InwardsScanFileDto": {
        "type": "object",
        "properties": {
          "uri": {
            "type": "string",
            "description": "The URI to fetch the scan. Points at Control's public `/cdn/inwardscans/{token}`\r\nendpoint, where the token is a Hashids code (obfuscation, not encryption) keyed by the\r\ntenant Salt, carrying the customer, the inwards id and a lease expiry. Control re-validates\r\nthe lease and the customer's ownership of the delivery server-side on every request.\r\n<br>\r\nRequires no Authorization header, so it can be opened or downloaded directly by a browser.\r\n",
            "nullable": true
          },
          "uriExpires": {
            "type": "string",
            "description": "Expiry of the Codewolf.Ctrl.Api.Dtos.Api.InwardsScanFileDto.Uri — the end of the link's lease window. The CDN endpoint\r\nrejects the link once this passes; re-read the record to obtain a fresh one.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A slim public representation of an inwards scan on the Inwards contract. Mirrors the job\r\ncontract's invoice file: only the fetch URI and its expiry are exposed, never the internal\r\nstorage record."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_InwardsSizeSetDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "tblSizeMain.ID",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "tblSizeMain.szDesc",
            "nullable": true
          },
          "sizes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Active size labels, in position order (sz1..sz20, skipping null/empty).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A size template — e.g. \"2XS-5XL\", \"One Size\"."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_InwardsStatusDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "An inwards status lookup entry."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_InwardsSummaryDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "customerId": {
            "type": "integer",
            "description": "The customer the delivery belongs to. A delivery with no customer on record shows null or 0.",
            "format": "int32",
            "nullable": true
          },
          "customerName": {
            "type": "string",
            "description": "The customer's name as recorded on the delivery.",
            "nullable": true
          },
          "orderNumber": {
            "type": "string",
            "nullable": true
          },
          "supplier": {
            "type": "string",
            "nullable": true
          },
          "dateIn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "cartons": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "packageType": {
            "type": "string",
            "nullable": true
          },
          "totalQuantity": {
            "type": "integer",
            "format": "int32"
          },
          "itemCount": {
            "type": "integer",
            "format": "int32"
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "isAllocated": {
            "type": "boolean"
          },
          "jobNumber": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Auto-generated summary of the line items (\"code garment colour\" per line, CRLF-separated,\r\ncapped at 250 characters). Maintained by the same routine the intranet uses, so this is the\r\nidentical string the legacy inwards list renders. Null or empty on records whose line items\r\nhave no code/garment/colour — those lines are skipped when the summary is composed.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Summary representation of an inwards record (used in list responses)."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_JobFileArchiveItemDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "File name of the entry, without its path.",
            "nullable": true
          },
          "path": {
            "type": "string",
            "description": "Full path of the entry within the archive.",
            "nullable": true
          },
          "fullName": {
            "type": "string",
            "description": "Full path of the entry within the archive.",
            "nullable": true
          },
          "extension": {
            "type": "string",
            "description": "File extension of the entry, including the leading dot.",
            "nullable": true
          },
          "length": {
            "type": "integer",
            "description": "Uncompressed size of the entry in bytes.",
            "format": "int64"
          },
          "lastModified": {
            "type": "string",
            "description": "Last-modified timestamp recorded in the archive.",
            "format": "date-time"
          },
          "isDirectory": {
            "type": "boolean",
            "description": "Whether the entry is a directory rather than a file."
          }
        },
        "additionalProperties": false,
        "description": "One entry inside a zip archive."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_JobFileDto": {
        "type": "object",
        "properties": {
          "guid": {
            "type": "string",
            "description": "Stable identifier for the file.",
            "format": "uuid"
          },
          "fileType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Enums_JobFileListType"
              }
            ],
            "description": "Which kind of job file this is: `proof`, `packingslip`, `generic` or `worksheet`.\r\nWorksheets are returned only when `fileType=worksheet` is asked for."
          },
          "fileStatus": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Enums_FileStatus"
              }
            ],
            "description": "`Active`, `Archived` or `Deleted`. Always a single value on a row, never a\r\n            combination, even though the underlying type is a flags enum."
          },
          "shipmentId": {
            "type": "integer",
            "description": "For a packing slip attached to a specific shipment, that shipment's id. `null` for a\r\njob-level file.",
            "format": "int32",
            "nullable": true
          },
          "jobLineId": {
            "type": "integer",
            "description": "For a worksheet, the job line it is the current worksheet of. Not present on any other file type.\r\nA worksheet shared by several lines is returned once per line, with the same guid.",
            "format": "int32",
            "nullable": true
          },
          "fileName": {
            "type": "string",
            "description": "The stored file name.",
            "nullable": true
          },
          "contentType": {
            "type": "string",
            "description": "MIME type of the file.",
            "nullable": true
          },
          "fileSizeBytes": {
            "type": "integer",
            "description": "Size of the file in bytes.",
            "format": "int64"
          },
          "version": {
            "type": "number",
            "description": "Generation number. Proofs and packing slips are versioned as they are superseded, so this is\r\nthe ordering key for a proof history where several generations share a creation date.",
            "format": "double"
          },
          "createdDate": {
            "type": "string",
            "description": "When the file was uploaded.",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string",
            "description": "Display name of the uploader. `null` when the user cannot be resolved.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_JobFileMetaDto"
              }
            ],
            "description": "Additional typed metadata about the file.",
            "nullable": true
          },
          "cdnUrl": {
            "type": "string",
            "description": "A short-lived, pre-signed download URL. Present only on `Active` files; `null` for\r\n`Archived` and `Deleted`.",
            "nullable": true
          },
          "cdnUrlExpires": {
            "type": "string",
            "description": "When Codewolf.Ctrl.Api.Dtos.Api.JobFileDto.CdnUrl stops working. `null` when no URL was issued, and also when the\r\nunderlying storage bucket serves permanent public URLs that carry no lease.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One file held against a job."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_JobFileMetaDto": {
        "type": "object",
        "properties": {
          "archiveContents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_JobFileArchiveItemDto"
            },
            "description": "For a zip archive, its manifest. `null` for any file that is not an archive.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Typed metadata for a job file. Deliberately narrow: the storage layer keeps a free-form metadata\r\nbag, and publishing it wholesale would make whatever it writes next part of this contract."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_JobFilesResponseDto": {
        "type": "object",
        "properties": {
          "jobNumber": {
            "type": "integer",
            "description": "The job these files belong to.",
            "format": "int32"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_JobFileDto"
            },
            "description": "The files on this page, newest first.",
            "nullable": true
          },
          "page": {
            "type": "integer",
            "description": "The 1-based page number returned.",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "description": "The page size used.",
            "format": "int32"
          },
          "totalItems": {
            "type": "integer",
            "description": "Total files matching the filter, across all pages.",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "description": "Total number of pages available at this page size.",
            "format": "int32"
          },
          "unservedWorksheetJobLineIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Only on `fileType=worksheet`: the job's lines that reference a worksheet this API cannot serve - one kept\r\nin an older worksheet format the API cannot read, or a reference to a file that is missing, deleted or not a\r\nworksheet. For a caller scoped to one customer, it also lists lines whose worksheet was uploaded to another\r\ncustomer's job line, or whose originating job line cannot be identified. Staff may still see instructions for\r\nthese lines in Control. Covers the whole job, not just this page, and is the same on every page, in\r\nascending order. Empty when every referenced worksheet is served. Not present on any other request.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A page of the files held against a job."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_PagedActiveJobsDto": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_ReturnDtos_ActiveJobDto"
            },
            "description": "The collection of active jobs for the current page.",
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "description": "The total number of active jobs across all pages.",
            "format": "int32"
          },
          "pageNumber": {
            "type": "integer",
            "description": "The current page number (1-based).",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "description": "The number of items per page.",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "description": "The total number of pages available.",
            "format": "int32"
          },
          "hasPreviousPage": {
            "type": "boolean",
            "description": "Indicates whether there is a previous page available.",
            "readOnly": true
          },
          "hasNextPage": {
            "type": "boolean",
            "description": "Indicates whether there is a next page available.",
            "readOnly": true
          }
        },
        "additionalProperties": false,
        "description": "Represents a paginated response containing active jobs."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_PatchBomItemRequest": {
        "type": "object",
        "properties": {
          "position": {
            "type": "string",
            "description": "Where the item sits on the garment. Maximum 250 characters, printable ASCII.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Edit a BOM item. `position` is the only editable field: an item's asset code is what\r\ndecides its process and its size run, so changing it would orphan or contradict the run. Remove\r\nthe item and add the correct one instead."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_PatchBomRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "The BOM's title. Cannot be cleared — an empty value is a 400.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Free text describing the product. An empty string clears it.",
            "nullable": true
          },
          "range": {
            "type": "string",
            "description": "The range this BOM belongs to. Cannot be cleared — an empty value is a 400.",
            "nullable": true
          },
          "customerSku": {
            "type": "string",
            "description": "The customer's own SKU for the BOM. An empty string clears it.",
            "nullable": true
          },
          "active": {
            "type": "boolean",
            "description": "Archive (`false`) or restore (`true`) the BOM. Absent or null leaves the flag\r\nuntouched and issues no write.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Edit a BOM's fields. Every property is optional; an absent or null property leaves the field\r\nuntouched, and an empty string clears it. At least one property must be supplied."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_PatchBomVariantRequest": {
        "type": "object",
        "properties": {
          "customerVariantSku": {
            "type": "string",
            "description": "The customer's own SKU for this size. Maximum 500 characters, printable ASCII.",
            "nullable": true
          },
          "active": {
            "type": "boolean",
            "description": "Whether the variant is orderable. Absent or null leaves the flag untouched and issues no\r\nwrite. A deactivated variant stops being returned by the default read.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Edit a BOM variant. A variant's `code` and `size` are generated from the garment's size\r\nset and are not editable — editing either would break the order path, which keys on size."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_PatchInwardsRequest": {
        "type": "object",
        "properties": {
          "jobNumber": {
            "type": "integer",
            "description": "Job number to allocate this delivery to. Null or 0 clears an existing allocation.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Payload for PATCH /Inwards/{id}."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_PatchInwardsResponseDto": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_InwardsDto"
          }
        ],
        "properties": {
          "stockStatus": {
            "type": "string",
            "description": "The current stock status of the job this delivery is now associated with: the job just\r\nallocated to, or — when the allocation was cleared — the job it was removed from. One of\r\n\"No Stock\", \"Partial Stock\" or \"Stock Complete\", matching the value the job endpoints\r\nreport for the same job.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response for PATCH /Inwards/{id} — the updated record plus the affected job's recomputed\r\nstock status, so a client refreshing a job's stock panel does not need a second call to\r\nupdate the status badge and cannot render a value that disagrees with the job's real state."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_PricingProcessDto": {
        "type": "object",
        "properties": {
          "processCode": {
            "type": "string",
            "description": "Process code identifier",
            "nullable": true,
            "example": "WE"
          },
          "description": {
            "type": "string",
            "description": "Human-readable process description",
            "nullable": true,
            "example": "Wearable Transfers"
          },
          "active": {
            "type": "boolean",
            "description": "Whether process is currently available",
            "example": true
          },
          "sheetRank": {
            "type": "integer",
            "description": "Sort order for UI display",
            "format": "int32",
            "example": 10
          },
          "sheetColor": {
            "type": "string",
            "description": "Hex color code for UI display",
            "nullable": true,
            "example": "ddd9c4"
          },
          "tooltip": {
            "type": "string",
            "description": "Tooltip text for UI",
            "nullable": true,
            "example": "Wearables"
          },
          "mapsToMaster": {
            "type": "string",
            "description": "Master process code for grouping variants",
            "nullable": true,
            "example": "WE"
          },
          "maximumSheetUnit": {
            "type": "string",
            "description": "Unit of measure for the maximum sheet dimensions (cm / in / mm)",
            "nullable": true,
            "example": "mm"
          },
          "maximumSheetWidth": {
            "type": "number",
            "description": "Maximum sheet width in Codewolf.Ctrl.Api.Dtos.Api.PricingProcessDto.MaximumSheetUnit",
            "format": "double",
            "nullable": true,
            "example": 500
          },
          "maximumSheetHeight": {
            "type": "number",
            "description": "Maximum sheet height in Codewolf.Ctrl.Api.Dtos.Api.PricingProcessDto.MaximumSheetUnit",
            "format": "double",
            "nullable": true,
            "example": 700
          },
          "metadata": {
            "type": "string",
            "description": "An opaque tenant-defined JSON string describing the process. Control stores and serves\r\nthis verbatim and never interprets it - parse it client-side.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Pricing process information from the Pricing database"
      },
      "Codewolf_Ctrl_Api_Dtos_Api_PricingProcessesResponse": {
        "type": "object",
        "properties": {
          "processes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_PricingProcessDto"
            },
            "description": "List of pricing processes",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response wrapper for pricing processes"
      },
      "Codewolf_Ctrl_Api_Dtos_Api_ProcessCodeDto": {
        "required": [
          "description",
          "processCode"
        ],
        "type": "object",
        "properties": {
          "processCode": {
            "minLength": 1,
            "type": "string",
            "description": "Process code identifier",
            "example": "WE"
          },
          "description": {
            "minLength": 1,
            "type": "string",
            "description": "Human-readable process description",
            "example": "Wearable Transfer"
          },
          "rank": {
            "type": "integer",
            "description": "Display order rank (lower values appear first)",
            "format": "int32",
            "example": 10
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_ProcessCodeMetadataDto"
              }
            ],
            "description": "Process metadata containing operational flags",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Process code information"
      },
      "Codewolf_Ctrl_Api_Dtos_Api_ProcessCodeMetadataDto": {
        "type": "object",
        "properties": {
          "setupApplies": {
            "type": "boolean",
            "description": "Indicates if setup charges apply to this process",
            "example": true
          },
          "resetApplies": {
            "type": "boolean",
            "description": "Indicates if reset charges apply to this process",
            "example": true
          },
          "scheduleable": {
            "type": "boolean",
            "description": "Indicates if this process can be scheduled in production",
            "example": true
          },
          "physicalStockRequired": {
            "type": "boolean",
            "description": "Indicates if physical stock is required for this process",
            "example": false
          },
          "printable": {
            "type": "boolean",
            "description": "Indicates if this process produces printable output",
            "example": true
          }
        },
        "additionalProperties": false,
        "description": "Process metadata containing operational flags"
      },
      "Codewolf_Ctrl_Api_Dtos_Api_RejectStockMatchCandidateRequestDto": {
        "type": "object",
        "properties": {
          "reason": {
            "maxLength": 500,
            "type": "string",
            "description": "Why it was rejected.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A reviewer's rejection of one candidate."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_RejectStockMatchCandidatesRequestDto": {
        "required": [
          "ids"
        ],
        "type": "object",
        "properties": {
          "ids": {
            "maxItems": 500,
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "The candidates to reject. At most as many as one approval request may approve."
          },
          "reason": {
            "maxLength": 500,
            "type": "string",
            "description": "Why they were rejected.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A reviewer's rejection of several candidates, all for the same reason."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_RequestStockGatewayPricingRunRequestDto": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "description": "`APPLY` to write prices, or `PREVIEW` to compute them without writing.",
            "nullable": true
          },
          "tierCode": {
            "type": "string",
            "description": "The tier that prompted the run, or null. Every run prices all tiers with an addendum.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A Stock Gateway pricing run to request."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_SaveStockGatewayConnectionRequestDto": {
        "required": [
          "regionCode"
        ],
        "type": "object",
        "properties": {
          "regionCode": {
            "minLength": 1,
            "type": "string",
            "description": "The region's code."
          },
          "apiKey": {
            "maxLength": 500,
            "pattern": "^(?>\\s*)[!-~]*(?>\\s*)$",
            "type": "string",
            "description": "The API key issued for this tenant: 9 to 500 printable ASCII characters, with no spaces inside it. Omit it\r\nto change only the region and keep the saved key. A shorter key is refused with 400.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The region and API key to connect to the Stock Gateway with."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_SaveStockGatewayPricingAddendumRequestDto": {
        "type": "object",
        "properties": {
          "defaultMode": {
            "type": "string",
            "description": "The rule for suppliers without an override: `MARKUP_PERCENT` (a markup on supplier cost) or\r\n`TIER_MULTIPLIER` (the tier's own markup).",
            "nullable": true
          },
          "markupPercent": {
            "type": "number",
            "description": "The default markup percentage, 0 to 1000 with at most 2 decimal places; required for `MARKUP_PERCENT`.",
            "format": "double",
            "nullable": true
          },
          "addOnAmount": {
            "type": "number",
            "description": "An amount added to every unit price the default rule writes, after its markup. 0 to 9,999.99 with at most\r\n2 decimal places; 0 adds nothing. Omitted, it is 0.",
            "format": "double"
          },
          "overrides": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingOverrideDto"
            },
            "description": "The supplier overrides; they replace the tier's current ones, so an empty list removes them all.",
            "nullable": true
          },
          "expectedUpdatedAt": {
            "type": "string",
            "description": "The `rule.updatedAt` the addendum was read with, as an ISO 8601 date and time; null when the tier had no\r\naddendum. When someone else has saved the tier's addendum since, the save is refused with 409.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A price tier's Stock Gateway pricing addendum to save."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_SaveStockGatewaySupplierSettingsRequestDto": {
        "required": [
          "controlSupplierId"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsDto"
          }
        ],
        "properties": {
          "controlSupplierId": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "description": "The Control supplier the settings were loaded for: the `controlSupplierId` the settings read returned.\r\nThe save is refused with 409 when the gateway supplier is now paired with a different Control supplier.",
            "format": "int32"
          },
          "settingsVersion": {
            "pattern": "^[0-9a-f]{16}$",
            "type": "string",
            "description": "The `settingsVersion` the settings read (or the previous save) returned. The save is refused with 409\r\nwhen someone else saved the supplier's settings after that version was read. Left out, the save is made\r\nwithout that check.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A gateway supplier's settings to save, with the Control supplier they were loaded for."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_SetStockGatewayIngestionRequestDto": {
        "required": [
          "enabled"
        ],
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "True to start ingestion on its normal schedule, false to stop it."
          }
        },
        "additionalProperties": false,
        "description": "Switches Stock Gateway ingestion on or off."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_SetStockGatewaySupplierImportRequestDto": {
        "required": [
          "enabled"
        ],
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "True to import the supplier's catalogue on the ingestion service's schedule, false to stop."
          }
        },
        "additionalProperties": false,
        "description": "Switches the import of one paired gateway supplier on or off, keeping its pairing."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_SetStockGatewaySupplierIngestRequestDto": {
        "required": [
          "ingest"
        ],
        "type": "object",
        "properties": {
          "ingest": {
            "type": "boolean",
            "description": "True to ingest the supplier's stock, false to stop."
          },
          "controlSupplierId": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "description": "The Control supplier its stock is created under, or null to unpair it. A Control supplier can be paired\r\nwith only one gateway supplier.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Switches ingestion of one gateway supplier on or off and pairs it with a Control supplier."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_ShopBomDto": {
        "type": "object",
        "properties": {
          "bomCode": {
            "type": "string",
            "description": "Stable business key — the BOM's persisted Code (e.g. \"BOM10042\"). Used as the Shopify `custom.bom_code` metafield for idempotent upserts.",
            "nullable": true
          },
          "title": {
            "type": "string",
            "description": "Shopify product title. Sourced from the BOM.Title column (renamed from Description in CW-4323).\r\nFalls back to BomCode if Title is null/empty (defensive — the rename preserves existing row data\r\nso Title should almost always be populated).",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Shopify product description. Plain text — no HTML, no BBCode. Sourced from the BOM.Description\r\ncolumn (new in CW-4323). Null if never populated — the Shopify importer omits the field in that\r\ncase rather than overwriting an existing storefront description with an empty string.",
            "nullable": true
          },
          "imageUrl": {
            "type": "string",
            "description": "Absolute CDN URL for the BOM image. `null` if no image is uploaded for this BOM.\r\nExample: \"https://tenant-domain.example.com/cdn/boms/UjHmCJKgOu\".",
            "nullable": true
          },
          "price": {
            "type": "number",
            "description": "Computed total unit price — sum of UnitCost from `dbo.Get_BomItems_TotalPrices` for this BOM.\r\nUses the BOM's owning customer's PriceTierCode (per OQ-1 in the CW-4323 tech spec).",
            "format": "double"
          },
          "variants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_ShopBomVariantDto"
            },
            "description": "Size variants for this BOM, filtered to Active = 1 AND Deleted = 0. Ordered by the BOM's\r\nfirst stock BOMItem's SizeSet (vw_SizesVertical.SizeOrder), falling back to SizeOrder.[Order]\r\nthen alphabetical. See ADR-010 in the CW-4323 tech spec.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents a BOM shaped for Shopify product import. Returned by GET /boms/shop-boms?range={range}.\r\nEach ShopBomDto maps 1:1 to a Shopify product that will be created or updated by the Shopify admin app."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_ShopBomVariantDto": {
        "type": "object",
        "properties": {
          "variantCode": {
            "type": "string",
            "description": "Variant code (stock variant identifier).",
            "nullable": true
          },
          "size": {
            "type": "string",
            "description": "Size label (e.g. \"S\", \"M\", \"L\", \"XL\"). Used as the Shopify variant's Size option value.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A single size variant of a ShopBomDto. Maps to a Shopify product variant with the Size option."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_SizeQuantityDto": {
        "type": "object",
        "properties": {
          "size": {
            "type": "string",
            "nullable": true
          },
          "qty": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "A quantity for a specific size label within an item."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StateDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Full state/province name",
            "nullable": true,
            "example": "California"
          },
          "abbreviation": {
            "type": "string",
            "description": "State/province abbreviation",
            "nullable": true,
            "example": "CA"
          }
        },
        "additionalProperties": false,
        "description": "State/province/region information for lookup"
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StateListResponse": {
        "type": "object",
        "properties": {
          "countryCode": {
            "type": "string",
            "description": "Country ISO2 code",
            "nullable": true,
            "example": "US"
          },
          "states": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StateDto"
            },
            "description": "List of states/provinces for the country",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response containing list of states/provinces for a country"
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayAccountFieldDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The credential name to send the detail under.",
            "nullable": true
          },
          "label": {
            "type": "string",
            "description": "What to call the detail when asking for it.",
            "nullable": true
          },
          "kind": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockGatewayAccountFieldKind"
              }
            ],
            "description": "`Text`, `Email`, `Secret` (a password or token: ask for it masked and never show it) or\r\n            `Number`."
          },
          "description": {
            "type": "string",
            "description": "Help for whoever enters the detail, or null when there is none.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One detail a supplier's trade account needs when it is connected."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayAreaHealthDto": {
        "type": "object",
        "properties": {
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayHealthStatus"
              }
            ],
            "description": "The area's health."
          },
          "summary": {
            "type": "string",
            "description": "A short description of what the area did and why it has this status.",
            "nullable": true
          },
          "lastRunAt": {
            "type": "string",
            "description": "When the area last ran, or null when it never has.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "How one area of a supplier's ingestion is doing."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayConnectionStatusDto": {
        "type": "object",
        "properties": {
          "regionCode": {
            "type": "string",
            "description": "The chosen region's code, or null when none has been chosen.",
            "nullable": true
          },
          "keySaved": {
            "type": "boolean",
            "description": "Whether an API key has been saved."
          },
          "keyLastFour": {
            "type": "string",
            "description": "The last four characters of the saved API key, so it can be recognised.",
            "nullable": true
          },
          "ingestion": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockGatewayIngestionSetting"
              }
            ],
            "description": "`On` or `Off` when ingestion was started or stopped here; `NotStarted` when it never was,\r\n            in which case nothing is ingested."
          },
          "serviceLastRunAt": {
            "type": "string",
            "description": "When the ingestion service last started a run for the tenant, or null when it never has. A recent\r\ntime means the service is running.",
            "format": "date-time",
            "nullable": true
          },
          "savedBy": {
            "type": "string",
            "description": "Who last saved the connection.",
            "nullable": true
          },
          "savedAt": {
            "type": "string",
            "description": "When the connection was last saved.",
            "format": "date-time",
            "nullable": true
          },
          "settingsUnreadable": {
            "type": "boolean",
            "description": "True when the saved settings could not be read. The region and key are then reported as not saved,\r\ningestion is paused, and every change is refused until the settings are fixed."
          },
          "savedRegionUnavailable": {
            "type": "boolean",
            "description": "True when the saved region no longer has a gateway. Ingestion is then off until another region is saved."
          },
          "usingHostGateway": {
            "type": "boolean",
            "description": "True when no region and API key are saved but the site has its own default gateway address and key, so the\r\ngateway is already called with those. Suppliers and their trade accounts can then be read and changed\r\nbefore a region is saved."
          }
        },
        "additionalProperties": false,
        "description": "How the tenant's Stock Gateway connection is set up. The API key itself is never returned."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayConnectionTestDto": {
        "type": "object",
        "properties": {
          "succeeded": {
            "type": "boolean",
            "description": "Whether the gateway accepted the connection."
          },
          "error": {
            "type": "string",
            "description": "Why the test failed, when it did.",
            "nullable": true
          },
          "regionCode": {
            "type": "string",
            "description": "The region tested.",
            "nullable": true
          },
          "regionName": {
            "type": "string",
            "description": "The region's name.",
            "nullable": true
          },
          "gatewayName": {
            "type": "string",
            "description": "The name of the gateway that answered.",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "The region's currency.",
            "nullable": true
          },
          "supplierCount": {
            "type": "integer",
            "description": "How many suppliers the gateway offers in the region.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "What a Stock Gateway connection test found."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayControlSupplierDto": {
        "type": "object",
        "properties": {
          "supplierId": {
            "type": "integer",
            "description": "The Control supplier's id.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "The Control supplier's name.",
            "nullable": true
          },
          "pairedSupplierKey": {
            "type": "string",
            "description": "The gateway supplier it is already paired with, if any.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A Control supplier that can be paired with a gateway supplier."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayHealthRunDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The run's id, unique within its stage: sync runs and the other stages are numbered separately.",
            "format": "int64"
          },
          "stage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayHealthRunStage"
              }
            ],
            "description": "The stage the run belongs to."
          },
          "startedAt": {
            "type": "string",
            "description": "When the run started.",
            "format": "date-time"
          },
          "finishedAt": {
            "type": "string",
            "description": "When the run finished, or null while it is still running.",
            "format": "date-time",
            "nullable": true
          },
          "outcome": {
            "type": "string",
            "description": "How the run ended, for example `Succeeded`, `Failed`, `NotRun` or `Skipped`.",
            "nullable": true
          },
          "message": {
            "type": "string",
            "description": "Why the run failed or was skipped, or a note on how it ended; null when there is none.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One recorded ingestion run."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayHealthRunStage": {
        "enum": [
          "Sync",
          "Import",
          "SizeCheck",
          "Images"
        ],
        "type": "string",
        "description": "Which stage of ingestion a recorded run belongs to."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayHealthStatus": {
        "enum": [
          "Correct",
          "Gaps",
          "Failing",
          "NotRunning"
        ],
        "type": "string",
        "description": "How one part of Stock Gateway ingestion is doing."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayIngestionHealthDto": {
        "type": "object",
        "properties": {
          "generatedAt": {
            "type": "string",
            "description": "When this health was worked out. It can be up to a couple of minutes old unless refreshed.",
            "format": "date-time"
          },
          "service": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayIngestionServiceHealthDto"
              }
            ],
            "description": "How the ingestion service as a whole is set up and running.",
            "nullable": true
          },
          "suppliers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierHealthDto"
            },
            "description": "One entry per paired Control supplier, ordered by supplier name.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The health of Stock Gateway ingestion, overall and for each paired supplier."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayIngestionServiceHealthDto": {
        "type": "object",
        "properties": {
          "ingestion": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockGatewayIngestionSetting"
              }
            ],
            "description": "Whether ingestion is switched on, switched off, or has never been started."
          },
          "settingsReadable": {
            "type": "boolean",
            "description": "False when the saved Stock Gateway settings could not be read; ingestion is then paused."
          },
          "dryRun": {
            "type": "boolean",
            "description": "Whether the latest stock import wrote nothing and only reported what it would do, or null when no import\r\nhas recorded it.",
            "nullable": true
          },
          "keyAccepted": {
            "type": "boolean",
            "description": "False when the gateway rejected the API key on the latest sync that reached it, true when that sync\r\nsucceeded, or null when no sync has finished yet.",
            "nullable": true
          },
          "lastRunAt": {
            "type": "string",
            "description": "When the ingestion service last started any run, or null when it never has.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "How the ingestion service as a whole is set up and running."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPairedSupplierSettingsDto": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsDto"
          }
        ],
        "properties": {
          "controlSupplierId": {
            "type": "integer",
            "description": "The Control supplier the settings were read from. Send it back as `controlSupplierId` when saving\r\nthem, so the save is refused if the gateway supplier has since been paired with a different Control supplier.",
            "format": "int32"
          },
          "settingsVersion": {
            "type": "string",
            "description": "Identifies the settings as read. Send it back as `settingsVersion` when saving them, so the save is\r\nrefused if someone else changed the settings meanwhile.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A paired gateway supplier's settings, with the Control supplier they were read from."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPriceTierDto": {
        "type": "object",
        "properties": {
          "tierCode": {
            "type": "string",
            "description": "The price tier code.",
            "nullable": true
          },
          "isCostTier": {
            "type": "boolean",
            "description": "True when the tier holds supplier cost prices; without an addendum it is written at cost."
          },
          "defaultMarkupMultiplier": {
            "type": "number",
            "description": "The tier's own price as a percentage of supplier cost, used when a rule's mode is `TIER_MULTIPLIER`: 100 sells\r\nat cost and 119 sells at cost × 1.19. Not the same unit as `MarkupPercent`, where 19 means cost × 1.19.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "A price tier, as its Stock Gateway pricing addendum depends on it."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingAddendumDto": {
        "type": "object",
        "properties": {
          "tier": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPriceTierDto"
              }
            ],
            "description": "The price tier.",
            "nullable": true
          },
          "rule": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingRuleDto"
              }
            ],
            "description": "The tier's default rule, or null when the tier has no addendum yet.",
            "nullable": true
          },
          "overrides": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingOverrideDto"
            },
            "description": "The tier's supplier overrides.",
            "nullable": true
          },
          "suppliers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingSupplierDto"
            },
            "description": "The enabled gateway suppliers, plus any supplier no longer enabled that one of the overrides still names,\r\nby name.",
            "nullable": true
          },
          "supplierTierSupplierKey": {
            "type": "string",
            "description": "The supplier that offers its own price tiers; empty when none does.",
            "nullable": true
          },
          "supplierTiers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierTierDto"
            },
            "description": "That supplier's tiers.",
            "nullable": true
          },
          "latestRun": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingRunDto"
              },
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingSavedRunDto"
              }
            ],
            "description": "The run still waiting or in progress, or else the most recent run; null when there is none.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Everything needed to show and edit a price tier's Stock Gateway pricing addendum."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingBandDto": {
        "type": "object",
        "properties": {
          "from": {
            "type": "integer",
            "description": "First quantity of the band.",
            "format": "int32"
          },
          "to": {
            "type": "integer",
            "description": "Last quantity of the band, or null for no upper limit.",
            "format": "int32",
            "nullable": true
          },
          "perUnit": {
            "type": "number",
            "description": "The unit sell price.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "A quantity band and its unit price."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingChangeDto": {
        "type": "object",
        "properties": {
          "stockCode": {
            "type": "string",
            "description": "The item's stock code.",
            "nullable": true
          },
          "stockName": {
            "type": "string",
            "description": "The item's name.",
            "nullable": true
          },
          "tierCode": {
            "type": "string",
            "description": "The price tier code.",
            "nullable": true
          },
          "ruleMode": {
            "type": "string",
            "description": "The rule that priced it: `MARKUP_PERCENT`, `TIER_MULTIPLIER`, `SUPPLIER_TIER`, `COST` or\r\n`CARRIED_MARKUP`.",
            "nullable": true
          },
          "ruleValue": {
            "type": "number",
            "description": "The markup percentage the rule applied, or null: on supplier cost, or on the supplier's tier price for a\r\n`SUPPLIER_TIER` rule.",
            "format": "double",
            "nullable": true
          },
          "ruleAddOn": {
            "type": "number",
            "description": "The amount the rule added to each unit price after its markup, or null when the run did not record one.",
            "format": "double",
            "nullable": true
          },
          "supplierTierCode": {
            "type": "string",
            "description": "The supplier's own tier, for a `SUPPLIER_TIER` rule.",
            "nullable": true
          },
          "current": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingBandDto"
            },
            "description": "The price bands the tier holds now.",
            "nullable": true
          },
          "proposed": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingBandDto"
            },
            "description": "The price bands the run computed.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One price change a preview proposes."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingOverrideDto": {
        "type": "object",
        "properties": {
          "supplierKey": {
            "type": "string",
            "description": "The gateway supplier key.",
            "nullable": true
          },
          "mode": {
            "type": "string",
            "description": "`MARKUP_PERCENT` (a markup on supplier cost) or `SUPPLIER_TIER` (a markup on one of the supplier's own\r\n            tier prices).",
            "nullable": true
          },
          "markupPercent": {
            "type": "number",
            "description": "The markup percentage, 0 to 1000 with at most 2 decimal places; required for both modes. For `MARKUP_PERCENT`\r\nit applies to supplier cost; for `SUPPLIER_TIER` it applies to the supplier's tier price, where 0 means the\r\ntier price exactly.",
            "format": "double",
            "nullable": true
          },
          "supplierTierCode": {
            "type": "string",
            "description": "The supplier's own tier code when the mode is `SUPPLIER_TIER`; otherwise null.",
            "nullable": true
          },
          "addOnAmount": {
            "type": "number",
            "description": "An amount added to every unit price this override writes, after its markup. 0 to 9,999.99 with at most 2\r\ndecimal places; 0 adds nothing. Omitted, it is 0.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "A per-supplier override of a price tier's default Stock Gateway pricing rule."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingResultDto": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
          }
        ],
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Every reason it did not succeed, in words to show; `message` joins them.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The outcome of a Stock Gateway pricing read or change that did not succeed, with every reason."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingRuleDto": {
        "type": "object",
        "properties": {
          "tierCode": {
            "type": "string",
            "description": "The price tier code.",
            "nullable": true
          },
          "defaultMode": {
            "type": "string",
            "description": "`MARKUP_PERCENT` (a markup on supplier cost) or `TIER_MULTIPLIER` (the tier's own markup).",
            "nullable": true
          },
          "markupPercent": {
            "type": "number",
            "description": "The markup percentage when the mode is `MARKUP_PERCENT`; otherwise null.",
            "format": "double",
            "nullable": true
          },
          "addOnAmount": {
            "type": "number",
            "description": "An amount added to every unit price this rule writes, after its markup. 0 to 9,999.99; 0 adds nothing.",
            "format": "double"
          },
          "updatedAt": {
            "type": "string",
            "description": "When the rule was last saved, in UTC.",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "string",
            "description": "Who last saved the rule.",
            "nullable": true
          },
          "lastAppliedAt": {
            "type": "string",
            "description": "When the ingestion service last applied the rule, in UTC, or null if it never has.",
            "format": "date-time",
            "nullable": true
          },
          "lastPricesWritten": {
            "type": "integer",
            "description": "Prices written by the last apply.",
            "format": "int32",
            "nullable": true
          },
          "lastPricesUnchanged": {
            "type": "integer",
            "description": "Prices left unchanged by the last apply.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A price tier's default Stock Gateway pricing rule and the outcome of its last apply."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingRunDto": {
        "type": "object",
        "properties": {
          "runId": {
            "type": "integer",
            "description": "The run identifier.",
            "format": "int64"
          },
          "kind": {
            "type": "string",
            "description": "`APPLY` (writes prices) or `PREVIEW` (computes them without writing).",
            "nullable": true
          },
          "tierCode": {
            "type": "string",
            "description": "The tier whose addendum prompted the run, or null when it was requested for all tiers.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "`REQUESTED`, `RUNNING`, `SUCCEEDED` or `FAILED`.",
            "nullable": true
          },
          "requestedAt": {
            "type": "string",
            "description": "When the run was requested, in UTC.",
            "format": "date-time"
          },
          "requestedBy": {
            "type": "string",
            "description": "Who requested the run.",
            "nullable": true
          },
          "startedAt": {
            "type": "string",
            "description": "When the run started, in UTC, or null.",
            "format": "date-time",
            "nullable": true
          },
          "finishedAt": {
            "type": "string",
            "description": "When the run finished, in UTC, or null.",
            "format": "date-time",
            "nullable": true
          },
          "pricesWritten": {
            "type": "integer",
            "description": "Prices written, or that would be written for a preview.",
            "format": "int32",
            "nullable": true
          },
          "pricesUnchanged": {
            "type": "integer",
            "description": "Prices left unchanged.",
            "format": "int32",
            "nullable": true
          },
          "itemsSkipped": {
            "type": "integer",
            "description": "Items skipped.",
            "format": "int32",
            "nullable": true
          },
          "result": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingRunResultDto"
              }
            ],
            "description": "What the run did, or would do for a preview; null until it finishes, or when it recorded no detail.",
            "nullable": true
          },
          "error": {
            "type": "string",
            "description": "Why the run failed, when it did.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A requested or completed Stock Gateway pricing run."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingRunResultDto": {
        "type": "object",
        "properties": {
          "itemsConsidered": {
            "type": "integer",
            "description": "Stock items considered.",
            "format": "int32"
          },
          "pricesWritten": {
            "type": "integer",
            "description": "Item and tier pairs whose prices were, or would be, replaced.",
            "format": "int32"
          },
          "pricesUnchanged": {
            "type": "integer",
            "description": "Item and tier pairs whose prices were already current.",
            "format": "int32"
          },
          "itemsSkipped": {
            "type": "integer",
            "description": "Items not priced in any tier.",
            "format": "int32"
          },
          "fellBackToDefault": {
            "type": "integer",
            "description": "Prices that used the tier's default rule because the supplier's own tier prices were not available.",
            "format": "int32"
          },
          "chargesDropped": {
            "type": "integer",
            "description": "Additional charges removed because the price band they belonged to was replaced.",
            "format": "int32"
          },
          "sampleSize": {
            "type": "integer",
            "description": "The most changes, and the most skips, the result lists; a list this long may stop short of the total.",
            "format": "int32"
          },
          "batchesFailed": {
            "type": "integer",
            "description": "Batches that could not be priced or written.",
            "format": "int32"
          },
          "batchesDeferred": {
            "type": "integer",
            "description": "Batches left unwritten because other writes kept getting in their way. Their items are priced again\r\nautomatically by a later pricing pass, so these are not failures and need no action.",
            "format": "int32"
          },
          "itemsDeferredToNextPass": {
            "type": "integer",
            "description": "The items of the deferred batches; a later pricing pass prices them again automatically.",
            "format": "int32"
          },
          "tiers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingTierCountDto"
            },
            "description": "The counts for each price tier.",
            "nullable": true
          },
          "skips": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingSkipDto"
            },
            "description": "Items, or tiers of items, that were not priced.",
            "nullable": true
          },
          "changes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingChangeDto"
            },
            "description": "The price changes a preview proposes; empty for an apply.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "What a Stock Gateway pricing run did, or would do for a preview."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingSavedRunDto": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingRunDto"
          }
        ],
        "properties": {
          "updatedAt": {
            "type": "string",
            "description": "The addendum's new last save, in UTC, to the millisecond: the same value a later read returns as\r\n`rule.updatedAt`, and later than the one before it even when two saves land in the same millisecond.\r\nSend it as `expectedUpdatedAt` with the next save of this tier.",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "The APPLY run that will write a saved addendum's prices, with the addendum's new last save."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingSkipDto": {
        "type": "object",
        "properties": {
          "stockCode": {
            "type": "string",
            "description": "The item's stock code.",
            "nullable": true
          },
          "tierCode": {
            "type": "string",
            "description": "The tier, or null when the whole item was skipped.",
            "nullable": true
          },
          "reason": {
            "type": "string",
            "description": "Why: `NoGatewayProduct` (the item's gateway product or supplier is not mirrored),\r\n`SupplierNotEnabled` (the item's gateway supplier is not enabled), `NoGatewayPrice`, `NoTradePrice`,\r\n`DefaultTierHasNoRules`, `DefaultTierNotPriced`,\r\n`MissingPricingCategory`, `NonPositivePrice`, `DuplicateStockCode`, `UnsupportedPriceCalcType` or\r\n`UnparseableStockCode` (a stock code with a hyphen or colon, which a price code cannot be read back from).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "An item, or one tier of it, that a run did not price."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingSupplierDto": {
        "type": "object",
        "properties": {
          "supplierKey": {
            "type": "string",
            "description": "The gateway supplier key.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "The supplier's name.",
            "nullable": true
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether the supplier is enabled; only an enabled supplier can be given a new override."
          }
        },
        "additionalProperties": false,
        "description": "A Stock Gateway supplier an addendum can name."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingTierCountDto": {
        "type": "object",
        "properties": {
          "tierCode": {
            "type": "string",
            "description": "The price tier code.",
            "nullable": true
          },
          "written": {
            "type": "integer",
            "description": "Items whose prices were, or would be, replaced.",
            "format": "int32"
          },
          "unchanged": {
            "type": "integer",
            "description": "Items whose prices were already current.",
            "format": "int32"
          },
          "skipped": {
            "type": "integer",
            "description": "Items not priced in this tier.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "What a run did to one price tier."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayPricingTierSummaryDto": {
        "type": "object",
        "properties": {
          "tierCode": {
            "type": "string",
            "description": "The price tier code.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "The tier's description; empty when it has none.",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean",
            "description": "True for the tier used when another tier has no price for an item."
          },
          "isCostTier": {
            "type": "boolean",
            "description": "True when the tier holds supplier cost prices; without an addendum it is written at cost."
          },
          "hasAddendum": {
            "type": "boolean",
            "description": "True when the tier already has an addendum."
          }
        },
        "additionalProperties": false,
        "description": "An active price tier, as the list of tiers an addendum can be copied to shows it."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayReasonCountDto": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "description": "The reason.",
            "nullable": true
          },
          "count": {
            "type": "integer",
            "description": "How many times it was given.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "A reason and how many times it was given."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayRegionDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "The region's code, for example `NZ`.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "The region's name.",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "The currency the region's suppliers price in.",
            "nullable": true
          },
          "gatewayName": {
            "type": "string",
            "description": "The name of the gateway that serves the region.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A Stock Gateway region the tenant can ingest stock from."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySettingsOptionsDto": {
        "type": "object",
        "properties": {
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayStockCategoryDto"
            },
            "description": "The stock categories a default category or category map can name: every category with a code, visible or\r\nnot, one per code, ordered by name.",
            "nullable": true
          },
          "sizeSets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySizeSetDto"
            },
            "description": "The size sets a one-size set can name, ordered by name and then id.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The Control values a supplier's import settings can refer to."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto": {
        "type": "object",
        "properties": {
          "succeeded": {
            "type": "boolean",
            "description": "Whether the change was made."
          },
          "kind": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockGatewaySetupFailure"
              }
            ],
            "description": "Why it did not succeed: `None` when it did; `NotFound` (404), `Invalid` (400),\r\n`Refused` (409), `NotConfigured` (409), `GatewayUnavailable` (502) or `Busy` (503, nothing\r\nwas changed and the same request can be sent again) when it did not."
          },
          "message": {
            "type": "string",
            "description": "What was done, or why it was not, in words to show the person setting it up.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The outcome of a Stock Gateway setup change or read. Every 400, 404, 409 and 502 response from the\r\nStock Gateway setup endpoints carries one, including a request that is not valid."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySizeResolutionDto": {
        "type": "object",
        "properties": {
          "supplierId": {
            "type": "integer",
            "description": "The supplier.",
            "format": "int32"
          },
          "supplierKey": {
            "type": "string",
            "description": "The key the supplier's catalogue is mirrored under.",
            "nullable": true
          },
          "sizeRowsChecked": {
            "type": "integer",
            "description": "Linked stock sizes checked, active or not.",
            "format": "int32"
          },
          "sizeRowsResolved": {
            "type": "integer",
            "description": "Linked stock sizes that match exactly one size the supplier offers.",
            "format": "int32"
          },
          "unresolvedCount": {
            "type": "integer",
            "description": "Linked stock sizes that match no size the supplier offers, or several.",
            "format": "int32"
          },
          "activeUnresolvedCount": {
            "type": "integer",
            "description": "How many of the unresolved sizes are active.",
            "format": "int32"
          },
          "page": {
            "type": "integer",
            "description": "The page of unresolved sizes returned, starting at 1.",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "description": "The most unresolved sizes returned on a page.",
            "format": "int32"
          },
          "unresolved": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayUnresolvedSizeDto"
            },
            "description": "One page of the unresolved sizes, active sizes first, then by stock code, variant and size.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "How well a supplier's stock sizes, linked to its Stock Gateway catalogue, match the sizes the supplier\r\noffers, with one page of the sizes that do not."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySizeSetDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The size set id the settings store.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "The size set's name, or `Size set {id}` when it has none.",
            "nullable": true
          },
          "sizeCount": {
            "type": "integer",
            "description": "How many sizes the set holds, or null when that is not recorded.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A Control size set that a one-size product can be given."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayStockCategoryDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "The category code the settings store.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "The category's name.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A Control stock category that new stock can be filed under."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierCapabilitiesDto": {
        "type": "object",
        "properties": {
          "perLocationStock": {
            "type": "boolean",
            "description": "Stock levels per warehouse location."
          },
          "restockEta": {
            "type": "boolean",
            "description": "Expected restock dates."
          },
          "listPrice": {
            "type": "boolean",
            "description": "List prices."
          },
          "customerPrice": {
            "type": "boolean",
            "description": "Prices for the tenant's own trade account."
          },
          "quantityBreaks": {
            "type": "boolean",
            "description": "Quantity break pricing."
          }
        },
        "additionalProperties": false,
        "description": "What a gateway supplier's data includes."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierChangeDto": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
          }
        ],
        "properties": {
          "supplier": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSetupDto"
              }
            ],
            "description": "The supplier as the supplier list now shows it, or null when the change was not made, the supplier is no\r\nlonger listed, or it could not be read back in time. A successful change is made even when this is null;\r\nreload the supplier list to see it.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The outcome of switching a gateway supplier's ingestion or pairing, with the supplier as it now stands."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierHealthDetailsDto": {
        "type": "object",
        "properties": {
          "recentRuns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayHealthRunDto"
            },
            "description": "Up to 30 of the supplier's runs, newest first: the five newest of each stage, counting image copies and runs\r\nrecorded for the whole service, and every run that failed or did not run in the last seven days.",
            "nullable": true
          },
          "topRejections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayReasonCountDto"
            },
            "description": "The most common reasons the latest stock import rejected styles or colourways.",
            "nullable": true
          },
          "imageFailureReasons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayReasonCountDto"
            },
            "description": "The most common reasons the supplier's images could not be copied, up to five.",
            "nullable": true
          },
          "pricingSkipReasons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayReasonCountDto"
            },
            "description": "The most common reasons the supplier's stock items were not priced, up to five.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The recent runs for a supplier and the most common reasons behind any gaps."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierHealthDto": {
        "type": "object",
        "properties": {
          "controlSupplierId": {
            "type": "integer",
            "description": "The Control supplier's id.",
            "format": "int32"
          },
          "supplierKey": {
            "type": "string",
            "description": "The gateway supplier key the Control supplier is paired with.",
            "nullable": true
          },
          "supplierName": {
            "type": "string",
            "description": "The Control supplier's name.",
            "nullable": true
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayHealthStatus"
              }
            ],
            "description": "The supplier's overall health: Failing when any area is failing; otherwise Gaps when any area has gaps;\r\notherwise Correct when any area is correct; NotRunning when every area is not running, as it is whenever\r\ningestion is not switched on."
          },
          "sync": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayAreaHealthDto"
              }
            ],
            "description": "The sync of the supplier's catalogue and stock from the gateway.",
            "nullable": true
          },
          "mirror": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayAreaHealthDto"
              }
            ],
            "description": "The copy of the supplier's catalogue held in Control.",
            "nullable": true
          },
          "import": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayAreaHealthDto"
              }
            ],
            "description": "The stock import that creates and updates the supplier's stock items.",
            "nullable": true
          },
          "images": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayAreaHealthDto"
              }
            ],
            "description": "The copy of the supplier's images into the tenant's stock images.",
            "nullable": true
          },
          "pricing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayAreaHealthDto"
              }
            ],
            "description": "The pricing of the supplier's stock items from gateway costs.",
            "nullable": true
          },
          "details": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierHealthDetailsDto"
              }
            ],
            "description": "The recent runs and the most common reasons behind any gaps.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "How ingestion is doing for one paired Control supplier."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsDto": {
        "required": [
          "legacyStockCodePrefixes",
          "stockCategoryMap",
          "stockCodeExceptions"
        ],
        "type": "object",
        "properties": {
          "stockCodeExceptions": {
            "maxItems": 500,
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Stock codes ingestion must never create, update, match or retire. `*` matches any run of\r\ncharacters; matching ignores case and surrounding spaces."
          },
          "stockCodePrefix": {
            "maxLength": 10,
            "type": "string",
            "description": "The prefix added to the front of the supplier's own style codes.",
            "nullable": true
          },
          "stockCategoryCode": {
            "maxLength": 150,
            "type": "string",
            "description": "The stock category used when nothing more specific applies.",
            "nullable": true
          },
          "stockCategoryMap": {
            "maxLength": 1000,
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "The supplier's own categories, each mapped to a Control stock category code."
          },
          "importMappedCategoriesOnly": {
            "type": "boolean",
            "description": "Whether ingestion creates stock only for products whose supplier category is mapped in\r\n`stockCategoryMap`. Stock already linked to a product is updated whatever its category. When true, the\r\nmap must name at least one category. Left out of a save, the saved value is kept.",
            "nullable": true
          },
          "legacyStockCodePrefixes": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Prefixes the supplier's stock codes carried before, removed when matching existing stock."
          },
          "oneSizeSetId": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "description": "The size set used for a product sold in a single size.",
            "format": "int32",
            "nullable": true
          },
          "createMissingSizeSets": {
            "type": "boolean",
            "description": "Whether ingestion may create a size set that does not yet exist."
          },
          "splitLargeSizes": {
            "type": "boolean",
            "description": "Whether a style whose largest sizes cost more has those sizes split into their own stock item, so its other\r\nsizes are not priced at the higher cost. On unless saved as false. Left out of a save, the saved value is kept.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "How one gateway supplier's stock is turned into Control stock. Each value is checked in full when it\r\nis saved; a value that is not accepted is refused with a 400 saying why."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSettingsSaveResultDto": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySetupResultDto"
          }
        ],
        "properties": {
          "settingsVersion": {
            "type": "string",
            "description": "The version of the settings as saved, to send as `settingsVersion` with the next save; null when they\r\nwere not saved.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The outcome of saving a gateway supplier's settings."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierSetupDto": {
        "type": "object",
        "properties": {
          "supplierKey": {
            "type": "string",
            "description": "The gateway's key for the supplier.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "The supplier's name.",
            "nullable": true
          },
          "market": {
            "type": "string",
            "description": "The market the supplier serves.",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "The currency the supplier prices in.",
            "nullable": true
          },
          "capabilities": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierCapabilitiesDto"
              }
            ],
            "description": "What the supplier's data includes.",
            "nullable": true
          },
          "ingested": {
            "type": "boolean",
            "description": "Whether the supplier's stock is ingested."
          },
          "controlSupplierId": {
            "type": "integer",
            "description": "The Control supplier it is paired with, if any.",
            "format": "int32",
            "nullable": true
          },
          "controlSupplierName": {
            "type": "string",
            "description": "The paired Control supplier's name.",
            "nullable": true
          },
          "offeredByGateway": {
            "type": "boolean",
            "description": "False when the gateway no longer offers this supplier in the saved region, for example a pairing\r\nmade for a previous region. Such a supplier is listed only so it can be unpaired."
          },
          "controlSupplierActive": {
            "type": "boolean",
            "description": "False when the paired Control supplier is inactive. Such a supplier can still be unpaired."
          },
          "accountConnected": {
            "type": "boolean",
            "description": "Whether a trade account is connected for the supplier."
          },
          "canConnect": {
            "type": "boolean",
            "description": "Whether a trade account can be connected for the supplier. False when the supplier offers no account\r\npricing, or the gateway no longer offers the supplier."
          },
          "accountFields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockGatewayAccountFieldDto"
            },
            "description": "The details connecting a trade account needs, in the order to ask for them. Connect the account with\r\nexactly these names as the credential names, each with a value. Empty when none are declared.",
            "nullable": true
          },
          "staleConnectionCount": {
            "type": "integer",
            "description": "How many earlier trade account connections the gateway could not disconnect. Disconnecting the account\r\ntries them again. Zero when there are none.",
            "format": "int32"
          },
          "settingsComplete": {
            "type": "boolean",
            "description": "Whether the supplier's settings are complete enough for its stock to be imported: a stock code prefix and a\r\nstock category are saved. False when the supplier is not paired."
          },
          "lastRunAt": {
            "type": "string",
            "description": "When the supplier's stock was last ingested.",
            "format": "date-time",
            "nullable": true
          },
          "lastOutcome": {
            "type": "string",
            "description": "How the last ingestion ended.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A gateway supplier, what it offers, and how the tenant ingests it."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewaySupplierTierDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "The supplier's tier code.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "The supplier's tier name.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One of a supplier's own price tiers."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockGatewayUnresolvedSizeDto": {
        "type": "object",
        "properties": {
          "stockCode": {
            "type": "string",
            "description": "The stock code.",
            "nullable": true
          },
          "variantCode": {
            "type": "string",
            "description": "The variant code.",
            "nullable": true
          },
          "sizeCode": {
            "type": "string",
            "description": "The size code, empty for a variant that has no sizes.",
            "nullable": true
          },
          "sku": {
            "type": "string",
            "description": "The stock SKU.",
            "nullable": true
          },
          "active": {
            "type": "boolean",
            "description": "Whether the stock is active."
          },
          "outcome": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockGatewaySizeOutcome"
              }
            ],
            "description": "`NoMatch` when no size the supplier offers matches, `Ambiguous` when several do."
          },
          "reason": {
            "type": "string",
            "description": "Why the size does not match, naming the sizes involved.",
            "nullable": true
          },
          "gatewaySizes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The sizes the supplier offers for the linked colour, in the supplier's order.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A linked stock size that matches no size the supplier offers, or several."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockItemShipmentTypeOptionDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Shipment-type code (e.g. \"USPS\", \"Ground\", \"2 Day Air\"). Must be a code\r\nconfigured in the tenant's `JobForm_DeliveryOptions` OrgPref. Matched\r\ncase-insensitively; the server normalises to the canonical casing on\r\npersistence.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Display label shown to end-users. <b>Server-supplied</b> — populated from\r\nthe matched `IDeliveryOption.Label` on write; client-sent values are\r\nignored. Corresponds to the same Label exposed as `ShipmentType.Name`\r\nat `/account/shipment-settings`.",
            "nullable": true
          },
          "price": {
            "type": "number",
            "description": "Price override. `null` = use rate-API price; `0` = free; positive = flat override.\r\nAlways non-negative when set.",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A per-method shipping override for a stock item. Determines which shipment\r\nmethods are available for this stock item in this market and what they cost."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockItemShippingCreateDto": {
        "type": "object",
        "properties": {
          "stockItemId": {
            "type": "integer",
            "format": "int32"
          },
          "markets": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "shipMode": {
            "type": "string",
            "nullable": true
          },
          "fulfilmentLocationCodes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "weight": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "weightUnit": {
            "type": "string",
            "nullable": true
          },
          "length": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "width": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "height": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "dimensionUnit": {
            "type": "string",
            "nullable": true
          },
          "fixedShipping": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "groundOnly": {
            "type": "boolean"
          },
          "estimatedLeadDays": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "shipmentTypeOptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockItemShipmentTypeOptionDto"
            },
            "description": "Optional per-method shipping overrides. Send `null` or omit for none.\r\nSee Codewolf.Ctrl.Api.Dtos.Api.StockItemShipmentTypeOptionDto for price and name semantics.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request DTO for creating a new stock item shipping configuration."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockItemShippingDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "stockItemId": {
            "type": "integer",
            "format": "int32"
          },
          "markets": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "shipMode": {
            "type": "string",
            "nullable": true
          },
          "fulfilmentLocations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_FulfilmentLocationDto"
            },
            "nullable": true
          },
          "weight": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "weightUnit": {
            "type": "string",
            "nullable": true
          },
          "length": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "width": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "height": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "dimensionUnit": {
            "type": "string",
            "nullable": true
          },
          "fixedShipping": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "groundOnly": {
            "type": "boolean"
          },
          "estimatedLeadDays": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "active": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "shipmentTypeOptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockItemShipmentTypeOptionDto"
            },
            "description": "Per-method shipping overrides for this stock item in this market.\r\nEmpty array if no overrides are configured.\r\nOrder is meaningful — rows are returned in the sort order they were saved\r\n(first row may be treated by the consumer as the default method).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response DTO for a stock item shipping configuration, including resolved\r\nfulfilment location details from the junction table."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockItemShippingUpdateDto": {
        "type": "object",
        "properties": {
          "markets": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "shipMode": {
            "type": "string",
            "nullable": true
          },
          "fulfilmentLocationCodes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "weight": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "weightUnit": {
            "type": "string",
            "nullable": true
          },
          "length": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "width": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "height": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "dimensionUnit": {
            "type": "string",
            "nullable": true
          },
          "fixedShipping": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "groundOnly": {
            "type": "boolean"
          },
          "estimatedLeadDays": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "shipmentTypeOptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_StockItemShipmentTypeOptionDto"
            },
            "description": "Per-method shipping overrides. Replace-all semantics: the supplied list\r\nreplaces the existing rows entirely. Send an empty array to remove all\r\nexisting overrides, or `null`/omit to achieve the same result.\r\nSee Codewolf.Ctrl.Api.Dtos.Api.StockItemShipmentTypeOptionDto for price and name semantics.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request DTO for updating an existing stock item shipping configuration.\r\nStockItemId is immutable and identified via the route."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockMatchProductDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The gateway product id.",
            "format": "uuid"
          },
          "styleCode": {
            "type": "string",
            "description": "The supplier's style code.",
            "nullable": true
          },
          "title": {
            "type": "string",
            "description": "The product's title.",
            "nullable": true
          },
          "brand": {
            "type": "string",
            "description": "The product's brand.",
            "nullable": true
          },
          "colourways": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockCatalogueColourway"
            },
            "description": "The product's live colourways, in the same shape as a candidate's product colourways.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A product from a supplier's mirrored catalogue, offered to a reviewer choosing a product by hand."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockMatchRunResultDto": {
        "type": "object",
        "properties": {
          "aiUsed": {
            "type": "boolean",
            "description": "Whether the run asked the AI judge. A preview never does."
          },
          "aiSkippedCode": {
            "type": "string",
            "description": "`MODULE_DISABLED`, `NO_API_KEY` or `PREVIEW` when the AI was not used.",
            "nullable": true
          },
          "aiSkippedReason": {
            "type": "string",
            "description": "Why the AI was not used, in words.",
            "nullable": true
          },
          "maxItemsPerRun": {
            "type": "integer",
            "description": "The cap on items judged in this run.",
            "format": "int32"
          },
          "autoApproveConfidence": {
            "type": "number",
            "description": "The auto-approve threshold applied, or null when every AI proposal goes to review.",
            "format": "double",
            "nullable": true
          },
          "report": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockMatchRunReport"
              }
            ],
            "description": "Counts per stage, links, proposals, AI calls and tokens.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "What a stock matching run did, and whether the AI took part."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_StockOnboardingRunRequestDto": {
        "type": "object",
        "properties": {
          "confirmExoChecked": {
            "type": "boolean",
            "description": "Confirms the new codes were checked in Exo. Required to rename the stock of a supplier whose stock is managed\r\nin Exo; without it those renames are reported as not done."
          },
          "useJudge": {
            "type": "boolean",
            "description": "Whether the AI judge is asked about the existing stock the code stages cannot settle, when AI stock matching\r\nis switched on. Defaults to true."
          },
          "bestGuess": {
            "type": "boolean",
            "description": "Onboards on a best guess: every review candidate is settled by rule (confident matches approved, stock no\r\ncatalogue product claims retired, unsure matches left as they are), the retirements are applied, and the run\r\nrepeats until nothing changes, then switches the supplier's import on. The supplier's import may be on when it\r\nstarts. Defaults to false."
          }
        },
        "additionalProperties": false,
        "description": "How to onboard a supplier."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_TestStockGatewayConnectionRequestDto": {
        "type": "object",
        "properties": {
          "regionCode": {
            "type": "string",
            "description": "The region's code, or null to test the saved region.",
            "nullable": true
          },
          "apiKey": {
            "maxLength": 500,
            "pattern": "^(?>\\s*)[!-~]*(?>\\s*)$",
            "type": "string",
            "description": "The API key to test, 9 to 500 printable ASCII characters with no spaces inside it, or null to test the saved\r\nkey. A shorter key fails the test with the reason.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The values to test a Stock Gateway connection with. Anything omitted is taken from the saved connection."
      },
      "Codewolf_Ctrl_Api_Dtos_Api_UpdateUserRequest": {
        "type": "object",
        "properties": {
          "firstName": {
            "maxLength": 50,
            "type": "string",
            "description": "User's first name",
            "nullable": true
          },
          "lastName": {
            "maxLength": 50,
            "type": "string",
            "description": "User's last name",
            "nullable": true
          },
          "emailAddress": {
            "maxLength": 255,
            "type": "string",
            "description": "User's email address",
            "format": "email",
            "nullable": true
          },
          "phone": {
            "maxLength": 50,
            "type": "string",
            "description": "Phone number",
            "nullable": true
          },
          "mobile": {
            "maxLength": 50,
            "type": "string",
            "description": "Mobile number",
            "nullable": true
          },
          "streetAddress": {
            "maxLength": 255,
            "type": "string",
            "description": "Street address line 1",
            "nullable": true
          },
          "addressLine2": {
            "maxLength": 255,
            "type": "string",
            "description": "Address line 2 (apt, building, suite, etc.)",
            "nullable": true
          },
          "suburb": {
            "maxLength": 255,
            "type": "string",
            "description": "Suburb/neighborhood",
            "nullable": true
          },
          "city": {
            "maxLength": 255,
            "type": "string",
            "description": "City",
            "nullable": true
          },
          "state": {
            "maxLength": 255,
            "type": "string",
            "description": "State/province abbreviation or name",
            "nullable": true
          },
          "postalCode": {
            "maxLength": 255,
            "type": "string",
            "description": "Postal/ZIP code",
            "nullable": true
          },
          "usernameLoginOnly": {
            "type": "boolean",
            "description": "Whether this user logs in with username only (email is shared with another user).\r\nMust be set to true when changing email to one that is already in use by another user.",
            "nullable": true
          },
          "country": {
            "maxLength": 2,
            "minLength": 2,
            "pattern": "^[A-Z]{2}$",
            "type": "string",
            "description": "Country code (ISO 3166-1 alpha-2 format). Use GET /lookup/countries to get valid codes.",
            "nullable": true,
            "example": "NZ"
          }
        },
        "additionalProperties": false,
        "description": "Request to update an existing customer user (partial update)"
      },
      "Codewolf_Ctrl_Api_Dtos_Api_UploadArtworkDto": {
        "type": "object",
        "properties": {
          "customerReference": {
            "type": "string",
            "description": "The JobLine reference passed to the UploadArtwork Endpoint",
            "nullable": true
          },
          "uploadSuccessful": {
            "type": "boolean",
            "description": "Indicates whether the Upload of the Artwork was successful"
          },
          "message": {
            "type": "string",
            "description": "Any associated message regarding the Artwork Upload",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Returned as a result of a potential Artwork Upload"
      },
      "Codewolf_Ctrl_Api_Dtos_Api_UploadArtworkResult": {
        "type": "object",
        "properties": {
          "jobNumber": {
            "type": "integer",
            "format": "int32"
          },
          "allRequiredJobArtworkUploaded": {
            "type": "boolean",
            "description": "Indicates that all Artwork for a Job has been uploaded and the Job will now be ready for Proofing"
          },
          "uploads": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_UploadArtworkDto"
            },
            "description": "A list of Upload details for the UploadArtwork web api call",
            "nullable": true
          },
          "allUploadsSuccessful": {
            "type": "boolean",
            "description": "Indicates whether all of the attempted Artwork files were uploaded successfully",
            "readOnly": true
          }
        },
        "additionalProperties": false,
        "description": "Result of a run of the Upload Artwork for a Job"
      },
      "Codewolf_Ctrl_Api_Dtos_Api_UploadJobFileResult": {
        "type": "object",
        "properties": {
          "jobNumber": {
            "type": "integer",
            "description": "The job number for which files were uploaded",
            "format": "int32"
          },
          "fileType": {
            "type": "string",
            "description": "The type of file that was uploaded",
            "nullable": true
          },
          "uploadedFiles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_UploadedFileDto"
            },
            "description": "Details about each uploaded file",
            "nullable": true
          },
          "allUploadsSuccessful": {
            "type": "boolean",
            "description": "Indicates whether all files were uploaded successfully",
            "readOnly": true
          },
          "totalFilesUploaded": {
            "type": "integer",
            "description": "Total number of files uploaded",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false,
        "description": "Result of uploading job files (proof, packing slip, or generic files)"
      },
      "Codewolf_Ctrl_Api_Dtos_Api_UploadedFileDto": {
        "type": "object",
        "properties": {
          "fileName": {
            "type": "string",
            "description": "The original file name",
            "nullable": true
          },
          "storedFileName": {
            "type": "string",
            "description": "The name the file was actually stored under. This differs from Codewolf.Ctrl.Api.Dtos.Api.UploadedFileDto.FileName when\r\nthe uploaded name contained characters that cannot be stored or placed in a download URL,\r\nor when a file of the same name already existed on the job and a suffix was added.\r\n`null` when the upload failed.",
            "nullable": true
          },
          "guid": {
            "type": "string",
            "description": "Identifier of the stored file, matching the `guid` returned by\r\nGET /Jobs/{jobNumber}/files. `null` when the upload failed.",
            "format": "uuid",
            "nullable": true
          },
          "fileExtension": {
            "type": "string",
            "description": "The file extension",
            "nullable": true
          },
          "fileSize": {
            "type": "integer",
            "description": "The size of the file in bytes",
            "format": "int64"
          },
          "uploadSuccessful": {
            "type": "boolean",
            "description": "Indicates whether the upload was successful"
          },
          "message": {
            "type": "string",
            "description": "Any associated message regarding the file upload",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Details about an individual uploaded file"
      },
      "Codewolf_Ctrl_Api_Enums_JobFileListType": {
        "enum": [
          "generic",
          "proof",
          "packingslip",
          "worksheet"
        ],
        "type": "string",
        "description": "Which kind of job file to list, and the kind each listed file is reported as: `generic`,\r\n`proof`, `packingslip` or `worksheet`."
      },
      "Codewolf_Ctrl_Api_Enums_JobFileType": {
        "enum": [
          "generic",
          "proof",
          "packingslip"
        ],
        "type": "string",
        "description": "Specifies the type of file associated with a job."
      },
      "Codewolf_Ctrl_Api_Enums_ShipmentAddressSortBy": {
        "enum": [
          "Default",
          "Alpha",
          "AlphaDesc",
          "Date",
          "DateDesc"
        ],
        "type": "string",
        "description": "Sort orders available when listing a customer's shipment addresses."
      },
      "Codewolf_Ctrl_Api_Interfaces_IValidationError": {
        "type": "object",
        "properties": {
          "errorCode": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "message": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "data": {
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_Ctrl_Common_Classes_AssetDtos_AssetDto": {
        "type": "object",
        "properties": {
          "assetId": {
            "type": "integer",
            "description": "Internal Id for Asset",
            "format": "int32"
          },
          "assetTag": {
            "type": "string",
            "description": "The Tag (code) which identifies a unique asset",
            "nullable": true
          },
          "processCode": {
            "type": "string",
            "description": "The Process the Asset is used in",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "The Asset Description",
            "nullable": true
          },
          "garment": {
            "type": "string",
            "description": "The Garment the Asset is used on",
            "nullable": true
          },
          "priceTierCode": {
            "type": "string",
            "description": "The price Tier Code",
            "nullable": true
          },
          "setup": {
            "type": "number",
            "description": "The cost to setup for this asset job ($)",
            "format": "double"
          },
          "reset": {
            "type": "number",
            "description": "The reset cost to for this asset job ($)",
            "format": "double"
          },
          "priceCode": {
            "type": "string",
            "description": "Price code used to create the Asset",
            "nullable": true
          },
          "assetUrl": {
            "type": "string",
            "description": "URL to the Asset image",
            "nullable": true
          },
          "createDate": {
            "type": "string",
            "description": "Create Date",
            "format": "date-time"
          },
          "isGlobal": {
            "type": "boolean",
            "description": "Indicates if the Asset is a Global Asset - that anyone can see/use"
          },
          "externalId": {
            "type": "string",
            "description": "External identifier from third-party systems (e.g., BuildAGangSheet designId)",
            "nullable": true
          },
          "assetBarcode": {
            "type": "string",
            "description": "The value printed as the product barcode on this asset's labels. Null when the asset has none.",
            "nullable": true
          },
          "assetBarcodeFormat": {
            "type": "string",
            "description": "How Codewolf.Ctrl.Common.Classes.AssetDtos.AssetDto.AssetBarcode is drawn (for example code128 or qrcode). Null when no format was chosen: the label then draws it in its template's default format, or code128.",
            "nullable": true
          },
          "customerId": {
            "type": "integer",
            "description": "Owning customer id (ClientId on the underlying asset row). Populated when the asset is fetched\r\nvia the data-reader constructor (e.g. SuperUser flows) so callers can derive the owning customer\r\nfrom the asset itself. Nullable so the parameterless-constructor path yields null rather than a\r\nmisleading 0.\r\n<br>\r\nNOTE: null does NOT mean the key is omitted from API responses. The MVC pipeline\r\n(ApiConfigurationHelper.ConfigureControllers) does not override Newtonsoft's default\r\nNullValueHandling.Include, so this serializes as an explicit \"customerId\": null.\r\nThe global NullValueHandling.Ignore in Startup.cs applies only to manual JsonConvert calls.\r\nSee API-Technical-Debt item 29.\r\n",
            "format": "int32",
            "nullable": true
          },
          "isArchived": {
            "type": "boolean",
            "description": "Indicates if the asset is archived (hidden from default view)"
          },
          "lastJobDate": {
            "type": "string",
            "description": "When this asset was last used on a job, or null where it has never been used. A job that\r\nis still open counts from the day it was placed.",
            "format": "date-time",
            "nullable": true
          },
          "lastJobId": {
            "type": "integer",
            "description": "The job this asset was last used on, or null where it has never been used.",
            "format": "int32",
            "nullable": true
          },
          "priceBands": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Interfaces_IPriceBandDto"
            },
            "description": "Pricing Bands for the Asset",
            "nullable": true
          },
          "attributes": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "nullable": true
            },
            "description": "Free-form asset attributes (the AssetAttributes table) as name/value pairs — the same set\r\nshown on the Attributes tab of the Asset dialog in Control (Description, Garment, Colors,\r\nSize, PriceCode, ...). The set varies by tenant and process, so it is not a fixed schema.\r\n<br>\r\nPopulated for SuperUser callers only. For every other caller it is left null and the key is\r\nomitted from the JSON entirely (see M:Codewolf.Ctrl.Common.Classes.AssetDtos.AssetDto.ShouldSerializeAttributes), so a non-SuperUser\r\nresponse is byte-identical to one produced before this property existed.\r\n<br>\r\nAn empty dictionary means \"authorised, but this asset has no attributes\" — distinct from the\r\nkey being absent, which means \"not authorised to see them\".\r\n",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Describes an Asset Dtos"
      },
      "Codewolf_Ctrl_Common_Classes_AssetDtos_AssetTypeDto": {
        "type": "object",
        "properties": {
          "process": {
            "type": "string",
            "description": "The Process Code which normally is included at the front of the AssetCode so you can understand the process that the Asset uses",
            "nullable": true
          },
          "assetType": {
            "type": "string",
            "description": "The description of the Asset Type",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Holds the information about an Asset Type"
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_BaseAddress": {
        "type": "object",
        "properties": {
          "streetAddress": {
            "type": "string",
            "description": "Street Address for Delivery/Shipping",
            "nullable": true
          },
          "address2": {
            "type": "string",
            "description": "Street Address (2nd line) for Delivery/Shipping",
            "nullable": true
          },
          "suburb": {
            "type": "string",
            "description": "Suburb (or area) for Delivery/Shipping",
            "nullable": true
          },
          "city": {
            "type": "string",
            "description": "City for Delivery/Shipping",
            "nullable": true
          },
          "state": {
            "type": "string",
            "description": "State (or area) for Delivery/Shipping",
            "nullable": true
          },
          "stateCode": {
            "type": "string",
            "description": "State code i.e. NSW, CA, FL",
            "nullable": true
          },
          "postalCode": {
            "type": "string",
            "description": "Postcode for Delivery/Shipping",
            "nullable": true
          },
          "countryCodeISO2": {
            "type": "string",
            "description": "ISO code for the Country for Delivery/Shipping",
            "nullable": true
          },
          "country": {
            "type": "string",
            "description": "Country Name",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_DeliveryAddress": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_DeliveryBaseAddress"
          }
        ],
        "additionalProperties": false,
        "description": "Simplified address class for use in api for entering initial job delivery address."
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_DeliveryBaseAddress": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_BaseAddress"
          }
        ],
        "properties": {
          "deliveryMethod": {
            "type": "string",
            "description": "Delivery method for the order shipping\r\nThis must be one of the valid delivery methods available. \r\nsee Http GET: delivery methods",
            "nullable": true
          },
          "shippingInstructions": {
            "type": "string",
            "description": "Any shipping instructions for the delivery",
            "nullable": true
          },
          "contactName": {
            "type": "string",
            "description": "Contact Name for Delivery/Shipping",
            "nullable": true
          },
          "organisation": {
            "type": "string",
            "description": "Organisation for Delivery/Shipping",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "description": "Phone for Delivery/Shipping",
            "nullable": true
          },
          "mobile": {
            "type": "string",
            "description": "Mobile for Delivery/Shipping",
            "nullable": true
          },
          "emailAddress": {
            "type": "string",
            "description": "Email Address for Delivery/Shipping",
            "nullable": true
          },
          "isSaturdayDelivery": {
            "type": "boolean",
            "description": "Indicates whether Saturday delivery is requested for this shipment.\r\nSupported by UPS and FedEx express services. Optional, defaults to false."
          }
        },
        "additionalProperties": false,
        "description": "Simplified address class for use in api for entering initial job delivery address."
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_InvoiceFileDto": {
        "type": "object",
        "properties": {
          "uri": {
            "type": "string",
            "description": "The URI to fetch the invoice PDF. This points at Control's public\r\n`/cdn/invoices/{token}` endpoint, where the token is a Hashids code\r\n(obfuscation, not encryption) keyed by the tenant Salt, carrying the customer,\r\njob and a lease expiry. Control re-validates the lease and job ownership\r\nserver-side on every request. The invoice is served from storage as-is\r\n(Control generates and stores it) — nothing is generated on access.",
            "nullable": true
          },
          "uriExpires": {
            "type": "string",
            "description": "Expiry of the Codewolf.Ctrl.Common.Classes.Jobs.InvoiceFileDto.Uri — the end of the link's lease window. The\r\nCDN endpoint rejects the link once this passes. Populated whenever an invoice\r\nis advertised.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A slim public representation of a job's invoice file on the Job contract.\r\nOnly exposes the URI to fetch the invoice and an optional expiry; the full\r\ninternal EntityFileLite is never exposed on the public job contract."
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_JobBaseDto": {
        "type": "object",
        "properties": {
          "jobNumber": {
            "type": "integer",
            "description": "Job Number which identifies the job",
            "format": "int32"
          },
          "description": {
            "type": "string",
            "description": "The description associated with the Job",
            "nullable": true
          },
          "comments": {
            "type": "string",
            "description": "The comments associated with the Job",
            "nullable": true
          },
          "jobStatus": {
            "type": "string",
            "description": "The current status of the Job",
            "nullable": true
          },
          "orderNumber": {
            "type": "string",
            "description": "Any associated Order Number information for the Job",
            "nullable": true
          },
          "dateDue": {
            "type": "string",
            "description": "The Date the Job is due to complete",
            "format": "date-time"
          },
          "mustDate": {
            "type": "boolean",
            "description": "Indicates if the Due Date is a Must be on time flag"
          },
          "creator": {
            "type": "string",
            "description": "Person who Created the Job",
            "nullable": true
          },
          "invoiceNumber": {
            "type": "string",
            "description": "Invoice Number (if been invoiced)",
            "nullable": true
          },
          "orderGroup": {
            "type": "string",
            "description": "Shared identifier linking multiple jobs from one checkout",
            "nullable": true
          },
          "orderGroupSequence": {
            "type": "integer",
            "description": "Position within the order group (1, 2, 3...)",
            "format": "int32",
            "nullable": true
          },
          "orderBarcode": {
            "type": "string",
            "description": "The value printed as the order barcode on the job's labels. Null when the job has none.",
            "nullable": true
          },
          "orderBarcodeFormat": {
            "type": "string",
            "description": "How Codewolf.Ctrl.Common.Classes.Jobs.JobBaseDto.OrderBarcode is drawn (for example code128 or qrcode). Null when no format was chosen: the label then draws it in its template's default format, or code128.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The Job record"
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_JobCandidate": {
        "type": "object",
        "properties": {
          "orderNumber": {
            "type": "string",
            "description": "(optional) Order # reference (for the creating user's companies Order #)",
            "nullable": true
          },
          "orderBarcode": {
            "type": "string",
            "description": "(Optional) A value identifying the order, printed as a barcode on the job's labels.\r\nUp to 100 characters, and only characters the chosen Codewolf.Ctrl.Common.Classes.Jobs.JobCandidate.OrderBarcodeFormat can encode.\r\nOmit for no barcode.",
            "nullable": true
          },
          "orderBarcodeFormat": {
            "type": "string",
            "description": "(Optional) How Codewolf.Ctrl.Common.Classes.Jobs.JobCandidate.OrderBarcode is drawn: code128, code39, ean13, ean8, upca, itf14, qrcode or\r\ndatamatrix. Requires Codewolf.Ctrl.Common.Classes.Jobs.JobCandidate.OrderBarcode. When omitted the value is checked as code128, and the\r\nlabel draws it in its template's default format, or code128.",
            "nullable": true
          },
          "orderComment": {
            "type": "string",
            "description": "Any comment associated with the Order",
            "nullable": true
          },
          "customerUserId": {
            "type": "integer",
            "description": "(Optional) The associated Customer User Id - defaults to current logged on user.\r\nWhen supplied, the user must exist, be active, and belong to the customer the job is created for,\r\nand is set as the job's Customer User (owner/contact).",
            "format": "int32",
            "nullable": true
          },
          "dateDue": {
            "type": "string",
            "description": "(optional) The date the Order is due. \r\nIf passed then the date is the requesting Due date for the order to be delivered by\r\nIf not passed OR date is before the earliest due date for the customer then the Job Due date is set to earliest possible due date for the customer",
            "format": "date-time",
            "nullable": true
          },
          "mustDate": {
            "type": "boolean",
            "description": "only applicable if due date is specified. Indicates the Due date is a Must be met date"
          },
          "timeSensitive": {
            "type": "boolean",
            "description": "Indicates whether this job is Time Sensitive which means that the DueDate will incorporate the default Due TIME of the day for the Due date"
          },
          "description": {
            "type": "string",
            "description": "A description of the order",
            "nullable": true
          },
          "deliveryAddress": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_DeliveryAddress"
              }
            ],
            "description": "Delivery address information",
            "nullable": true
          },
          "promocode": {
            "type": "string",
            "description": "(Optional) Promo code - Must be a valid Promo code or Job will return a validation error",
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobLineBaseGrouping"
                },
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobLineBom"
                },
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobLineExternalGarment"
                },
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobLinePriceCode"
                },
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobLineStock"
                },
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_ReturnDtos_JobLineAsset"
                }
              ],
              "description": "Abstract class for a basic Job Line"
            },
            "description": "A List of Items to add to the Job. Supports adding the inherited classes JobLineAsset, JobLinePriceCode, JobLineStock, JobLineBom \r\nItems will be added in the same order as this supplied list",
            "nullable": true
          },
          "orderGroup": {
            "type": "string",
            "description": "Shared identifier linking multiple jobs from one checkout (e.g. RO-1234567).\r\nNull for single-job orders.",
            "nullable": true
          },
          "orderGroupSequence": {
            "type": "integer",
            "description": "Position within the order group (1, 2, 3...).\r\nNull for single-job orders.",
            "format": "int32",
            "nullable": true
          },
          "validateOnly": {
            "type": "boolean",
            "description": "Used in testing to Validate the data being passed without actually creating the Job itself"
          },
          "locationCodeOverride": {
            "type": "string",
            "description": "(Optional) Override the customer's default factory location.\r\nWhen provided, the job is routed to this location instead of the customer's profile location.\r\nMust reference an active, non-virtual Location.Code (e.g., \"LA\", \"AT\", \"NZ\").\r\nWhen omitted or null, existing behaviour is unchanged.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Job class to enable the creation of jobs from the web API"
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_JobDto": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobBaseDto"
          }
        ],
        "properties": {
          "stockStatus": {
            "type": "string",
            "description": "The plain-English stock status for the job: \"No Stock\", \"Partial Stock\" or \"Stock Complete\".\r\nTenant-conditional: only populated for tenants with the ShowInwardsList org pref enabled,\r\nand omitted entirely from the response otherwise. Only meaningful where inwards is in use.",
            "nullable": true
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Tags_TagDto"
            },
            "description": "The job's tags, oldest first. Returned to tenant staff callers only and omitted from the response for\r\nevery other caller, and when the tags could not be read. An empty list means the job has no tags.",
            "nullable": true
          },
          "customerUserId": {
            "type": "integer",
            "description": "The Customer User (owner/contact) the job belongs to - tblJobs.OwnerID.\r\nThis is the customer's own user who placed the job, not Codewolf.Ctrl.Common.Classes.Jobs.JobBaseDto.Creator\r\n(the Control staff member who keyed it in) and not the owning customer.\r\nNull on legacy rows that were written without an owner.",
            "format": "int32",
            "nullable": true
          },
          "customerUserName": {
            "type": "string",
            "description": "The display name of the Customer User identified by Codewolf.Ctrl.Common.Classes.Jobs.JobDto.CustomerUserId.\r\nReturned alongside the id because a plain CustomerUser token cannot resolve ids itself\r\n(/account/users is admin-only), so an id on its own would render as a bare number for\r\nexactly the users this field exists to serve. Null when the job has no owner.",
            "nullable": true
          },
          "shippingAddresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_ShippingAddress"
            },
            "description": "Holds the Shipping addresses and any tracking links",
            "nullable": true
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobLineDto"
            },
            "description": "The Lines in the Job",
            "nullable": true
          },
          "location": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobLocationDto"
              }
            ],
            "description": "Location information for the job",
            "nullable": true
          },
          "taxTotal": {
            "type": "number",
            "description": "The total tax amount for all job lines",
            "format": "double",
            "nullable": true
          },
          "dateOut": {
            "type": "string",
            "description": "The date the job was shipped/dispatched",
            "format": "date-time",
            "nullable": true
          },
          "dateIn": {
            "type": "string",
            "description": "The date the job was created/entered",
            "format": "date-time",
            "nullable": true
          },
          "shippedDateStatus": {
            "type": "string",
            "description": "A formatted status string indicating if the job was shipped early, on time, or late\r\n(e.g., \"1.35 Days Early\", \"On Time\", \"2 Days Late\")",
            "nullable": true
          },
          "shippedDaysToProcess": {
            "type": "number",
            "description": "The number of days the job was shipped early or late relative to the due date.\r\nNegative values indicate early shipment, positive values indicate late shipment.",
            "format": "double",
            "nullable": true
          },
          "processingDays": {
            "type": "number",
            "description": "The number of days it took to process the job from creation to shipping",
            "format": "double",
            "nullable": true
          },
          "permissions": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_PermissionsDto"
              }
            ],
            "description": "Edit permissions for this job",
            "nullable": true
          },
          "isCancelable": {
            "type": "boolean",
            "description": "Indicates whether the job can be cancelled via the API.\r\nThis is determined by the CanCancelCustomer flag on the job's current MasterJobStatus."
          },
          "daysToShipStatus": {
            "type": "integer",
            "description": "How the job's due date compares with the earliest date production could realistically\r\ndeliver it, given Codewolf.Ctrl.Common.Classes.Jobs.JobDto.LeadTimeDays:\r\n0 = unknown, 1 = comfortably achievable, 2 = comfortably achievable and the date is fixed,\r\n3 = inside the lead time, 4 = inside the lead time and the date is fixed,\r\n5 = already past, 6 = already past and the date is fixed.\r\nUse it to decide whether to ask the customer to agree a new date before approving.",
            "format": "int32"
          },
          "leadTimeDays": {
            "type": "integer",
            "description": "The number of working days production needs for this job, derived from the processes its\r\nlines use. Falls back to the account's default lead time when no line carries one. Null\r\nwhen it could not be worked out.",
            "format": "int32",
            "nullable": true
          },
          "customerSuppliedStock": {
            "type": "boolean",
            "description": "True when the customer is supplying the garments for this job - at least one line needs a\r\nphysical garment and none is being supplied with the order. False for jobs where every\r\ngarment is supplied with the order and for work that needs no garment at all, such as\r\nartwork or digitising. Null when it could not be determined.",
            "nullable": true
          },
          "invoiceFile": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_InvoiceFileDto"
              }
            ],
            "description": "The downloadable invoice file for this job. Populated only when the job is\r\nDispatched or Closed AND an invoice PDF has been stored for it (Control\r\ngenerates and stores invoices; the API never generates them). Null otherwise.\r\nThe URI points at Control's public, time-limited CDN invoice endpoint.",
            "nullable": true
          },
          "customerId": {
            "type": "integer",
            "description": "Customer ID that owns this job. Hidden from JSON output (matches the\r\n`OwnerId` pattern on Codewolf.Ctrl.Common.Classes.Jobs.JobExtendedDto) — used at the\r\ncontroller layer for a strict customer-isolation re-check after the\r\nlegacy `(CustomerMismatch AND UserMismatch)` ownership check, to\r\ndefend against `OwnerId` collisions on retail rows.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "The Job record"
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_JobExtendedDto": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobBaseDto"
          }
        ],
        "properties": {
          "customerId": {
            "type": "integer",
            "description": "Customer Id",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_JobLineBase": {
        "required": [
          "itemType"
        ],
        "type": "object",
        "properties": {
          "itemType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobLineType"
              }
            ],
            "description": "The Job Line type - which identifies the Object Type coming in via the web api"
          },
          "code": {
            "type": "string",
            "description": "A unique code which identifies the item (Asset / Price Code / Stock Item)",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "description": "A quantity for the Job Line",
            "format": "int32"
          },
          "customerReference": {
            "type": "string",
            "description": "(optional except when creating PriceCodes) Customer Defined - can be anything to distinguish the Job Line item. e.g could be an internal ID value from the WebAPI consumers system <br />Required for Price codes as these will need to be used when uploading the artwork for the job line\r\n<br />Where supplied, the value must be unique across the Job's lines - it is the key an artwork upload is matched on. Lines that leave it blank are exempt, as a blank reference can never be used to upload artwork.",
            "nullable": true
          },
          "price": {
            "type": "number",
            "description": "Unit price for this line. Required for shop orders; optional for callers authorised to supply trusted pricing on non-shop orders.\r\nOther non-shop callers must omit it, or the request is rejected. When omitted on a non-shop order, the normal pricing rules apply.\r\nUsed for asset, price-code and stock lines; not used to price bill-of-materials or external-garment lines.\r\nFor trusted pricing on non-shop orders, negative values are rejected, and on asset and price-code lines a value more than the tenant's tolerance above the customer's tier price is rejected (by default, more than twice the tier price).\r\nStock lines are not compared with a tier price; they are limited only by the negative-value and storage-range checks.\r\nA negative value is rejected even when it is not used to price the line. Stored unit prices use four decimal places; additional places are rounded.\r\nNumeric input is checked after parsing; values with many significant digits may lose precision before validation.",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Abstract class for a basic Job Line",
        "discriminator": {
          "propertyName": "itemType"
        }
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_JobLineBaseGrouping": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobLineBase"
          }
        ],
        "properties": {
          "groupHead": {
            "type": "string",
            "description": "(optional) If this Line Item is to be a Grouping for other lines. Note this can contain any string value, but if specified in the head the children will use the same string value \r\nThis means that other Line items with this same value set in the Group field will be grouped under this item",
            "nullable": true
          },
          "group": {
            "type": "string",
            "description": "(optional) If this line is set it should match to the name of a Group Head on another line, and this will create the current line as a child line under the Group Head line (of the same group name)",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_JobLineBom": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobLineBase"
          }
        ],
        "properties": {
          "size": {
            "type": "string",
            "description": "The Size code for the BOM\r\nRequired if the BOM Code does NOT include a size indicator at the end of the code eg. BOM1234-M contains a size indicator of M for the BOM Code BOM1234\r\nIf you pass the size and a BOM Code containing the Size then they must be the same else they will get a validation error",
            "nullable": true
          },
          "customName": {
            "type": "string",
            "description": "(Optional) A customer-supplied personalisation name for this BOM item — e.g. a back name\r\ncaptured from a Shopify \"+ Add Name\" line-item property (CW-4580 Part 3). When present, the\r\nBOM explosion produces a per-name \"Names\" jobline (the name recorded in the comment) instead\r\nof the single aggregated names-component line. Absent/blank preserves the existing behaviour\r\nexactly — nothing is sent to `ConvertBOMToJob`.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Defines a Line of a Job which uses a Bill of Material code to identify an entire process for creating an item"
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_JobLineDto": {
        "type": "object",
        "properties": {
          "jobLineId": {
            "type": "integer",
            "description": "Unique Identifier for the Job Line",
            "format": "int32"
          },
          "assetSku": {
            "type": "string",
            "description": "The Program value assigned to the Job Line\r\nThis could be the Asset Code or a new Asset code created from a PriceCode",
            "nullable": true
          },
          "processCode": {
            "type": "string",
            "description": "Gets or sets the code that identifies the process.",
            "nullable": true
          },
          "garment": {
            "type": "string",
            "description": "The garment to be used",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "The description o the Job line",
            "nullable": true
          },
          "comments": {
            "type": "string",
            "description": "The Comments on the Job line",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "description": "The quantity of this Job Line",
            "format": "int32"
          },
          "unitPrice": {
            "type": "number",
            "description": "The price of each unit",
            "format": "double"
          },
          "customerReference": {
            "type": "string",
            "description": "The Customers reference string",
            "nullable": true
          },
          "externalArtworkUrl": {
            "type": "string",
            "description": "The customer's artwork link for this line, as stored when the job was created or the line was added - the\r\nlink the Control job screen shows as \"Customer Art\". Null when the line has none. Returned only on a job that\r\nbelongs to the caller's own customer, or to a staff caller; null on every line otherwise. Returned as stored:\r\nit is not fetched, checked or rewritten by this read, so validate its scheme before rendering it as a link.",
            "nullable": true
          },
          "customerLabelUrl": {
            "type": "string",
            "description": "The customer label link for this line: the ordering tenant's label page sent with an external-supplier order.\r\nNull when the line has none. Not the supplier's label link, which this read does not return. Returned only on\r\na job that belongs to the caller's own customer, or to a staff caller; null on every line otherwise. Returned\r\nas stored; treat it as a credential, because the link opens the label page without signing in.",
            "nullable": true
          },
          "imageUrl": {
            "type": "string",
            "description": "CDN URL for the jobline image (asset or stock variant thumbnail)",
            "nullable": true
          },
          "gang": {
            "type": "string",
            "description": "Gets or sets the name of the gang associated with the entity.",
            "nullable": true
          },
          "jobLineStatus": {
            "type": "string",
            "description": "Gets or sets the programmatic comment associated with this instance.",
            "nullable": true
          },
          "parentJobLineId": {
            "type": "integer",
            "description": "The JobLineId of the line this line is grouped under, or null when this line is itself a\r\ntop-level (head) line. Lines sharing a ParentJobLineId belong to the same decoration - for\r\nexample an applique head line with its outer stitch and repeat setup. Grouping can nest more\r\nthan one level deep (a stock garment, a decoration on it, and that decoration's setup line).\r\nWhen not null the value always refers to another line present in the same response, so it is\r\nsafe to use as a key when building a tree.",
            "format": "int32",
            "nullable": true
          },
          "order": {
            "type": "integer",
            "description": "The position of this line among its siblings. It is scoped to the parent, not to the job: a\r\nchild line's Order restarts at 1 within each parent, and most lines report 0 because a value\r\nis only assigned when a job is explicitly reordered. It is therefore not a job-wide sequence\r\nand not a usable sort key on its own - group using ParentJobLineId rather than this field.\r\nFor display position prefer Rank, which is a job-wide sequence that reproduces the Control job\r\nscreen - but only on the reads that populate it. See Rank for which those are.",
            "format": "int32"
          },
          "rank": {
            "type": "integer",
            "description": "The line's position on the Control job screen, banded so that one number carries both the\r\nsequence and the grouping. Where it is populated, sorting the lines by Rank ascending\r\nreproduces Control's display order exactly - no secondary sort is needed, and the lines are\r\nalready returned in that order.\r\n<br><b>Not every read populates it.</b> Rank is set by the job reads that select the ranking\r\ncolumns - currently GET /Jobs/{jobNumber} and GET /Jobs/{jobIdentifier}/extended. Reads that\r\ndo not, such as the agent job read backed by dbo.GetJobLinesForCustomer, leave it at its\r\ndefault of 0 on every line. A response whose lines are all Rank 0 is unranked, not\r\nsame-ranked: fall back to the order the lines were returned in.\r\n<br>\r\nRank / 100 identifies the group: lines sharing a hundreds band are rendered together, and the\r\nfirst line of a band is the group's head. A Rank of 100000 or greater means the line belongs\r\nto no group and is rendered at the bottom, in Rank order - this is where setup, reset,\r\ndiscount and shipping lines land. A top-level line that has no children of its own occupies a\r\nband by itself.\r\n<br>\r\nRank and ParentJobLineId answer different questions and can legitimately disagree. Rank is\r\nwhere Control draws the line; ParentJobLineId is which line it was created from. A setup line\r\nsuch as RESPA carries a ParentJobLineId pointing into its group and a Rank of 100000 or more,\r\nbecause Control renders setup lines at the bottom rather than inside the group. Use Rank for\r\nplacement and ParentJobLineId for lineage.\r\n<br>\r\nThe value is stable for a given job state, not permanent: editing or reordering a job\r\nre-ranks its lines. It is scoped to the job, so ranks are only comparable within one job.\r\n",
            "format": "int32"
          },
          "permissions": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobLinePermissionsDto"
              }
            ],
            "description": "What the caller may do to this line through the line endpoints right now. Null on reads that\r\ndo not evaluate it.",
            "nullable": true
          },
          "sizeQuantities": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int32"
            },
            "description": "The quantity of each size on a stock or external-garment line, in the order the line lists\r\nthem; the quantities add up to Codewolf.Ctrl.Common.Classes.Jobs.JobLineDto.Quantity. Empty when the line's sizes cannot be\r\nread, and null on every other kind of line.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "defines a Line of a Job"
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_JobLineExternalGarment": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobLineBaseGrouping"
          }
        ],
        "properties": {
          "sizeQuantities": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int32"
            },
            "description": "A list of size quantities for a stock item\r\nDictionary indexed via SizeCode",
            "nullable": true
          },
          "garment": {
            "type": "string",
            "description": "The Garment that will be sent in as an External Garment",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Any description for the JobLine",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "description": "The quantity from the array of Size * Quantities list",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false,
        "description": "Defines a new Job Line which uses an existing Stock item"
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_JobLinePermissionsDto": {
        "type": "object",
        "properties": {
          "canEdit": {
            "type": "boolean",
            "description": "Whether the line can be changed now. False on lines the customer does not own (setup,\r\ndiscount, shipping), on a line already scheduled, ganged or in production, and wherever the\r\njob does not allow its lines to be changed."
          },
          "canRemove": {
            "type": "boolean",
            "description": "Whether the line can be removed now, on the same terms as Codewolf.Ctrl.Common.Classes.Jobs.JobLinePermissionsDto.CanEdit."
          }
        },
        "additionalProperties": false,
        "description": "What the caller may do to one job line through the line endpoints."
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_JobLinePriceCode": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobLineBaseGrouping"
          }
        ],
        "properties": {
          "attributes": {
            "type": "object",
            "additionalProperties": { },
            "description": "The attributes associated with this brand\r\nEntered into Dictionary using the attribute name, and the associated value",
            "nullable": true
          },
          "externalArtworkUrl": {
            "type": "string",
            "description": "(Optional) If supplied this will be a URL to the Image file for this Price Code\r\nNOTE: If you specify an image URL then we will expect all priceCodes to supply image URL's",
            "nullable": true
          },
          "externalId": {
            "type": "string",
            "description": "(Optional) External identifier from third-party systems (e.g., BuildAGangSheet designId)\r\nUsed to link the asset back to the original external design for editing",
            "nullable": true
          },
          "customerLabelUrl": {
            "type": "string",
            "description": "(Optional) A link to the ordering site's own label for this line. Kept only when the caller is a\r\nsupplier partner and the link is an absolute https URL of at most 1000 characters; otherwise it is\r\nignored and the job is still created.",
            "nullable": true
          },
          "assetBarcode": {
            "type": "string",
            "description": "(Optional) A value identifying the product, stored on the asset this line creates and printed\r\nas a barcode on its labels. Up to 100 characters, and only characters the chosen\r\nCodewolf.Ctrl.Common.Classes.Jobs.JobLinePriceCode.AssetBarcodeFormat can encode. Omit for no barcode.",
            "nullable": true
          },
          "assetBarcodeFormat": {
            "type": "string",
            "description": "(Optional) How Codewolf.Ctrl.Common.Classes.Jobs.JobLinePriceCode.AssetBarcode is drawn: code128, code39, ean13, ean8, upca, itf14, qrcode or\r\ndatamatrix. Requires Codewolf.Ctrl.Common.Classes.Jobs.JobLinePriceCode.AssetBarcode. When omitted the value is checked as code128, and the\r\nlabel draws it in its template's default format, or code128.",
            "nullable": true
          },
          "isSample": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether this instance is marked as a sample.\r\nThis allows the job line to be identified as a sample item, and therefore bypass the normal quantity minimums"
          }
        },
        "additionalProperties": false,
        "description": "defines a Job line which is used with a Price Code in the system to define a new Job Asset"
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_JobLineStock": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobLineBaseGrouping"
          }
        ],
        "properties": {
          "variantCode": {
            "type": "string",
            "description": "a variant code which can also identify the Stock item",
            "nullable": true
          },
          "sizeQuantities": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int32"
            },
            "description": "A list of size quantities for a stock item\r\nDictionary indexed via SizeCode",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "description": "The quantity from the array of Size * Quantities list",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false,
        "description": "Defines a new Job Line which uses an existing Stock item"
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_JobLineType": {
        "enum": [
          "Asset",
          "PriceCode",
          "Stock",
          "Bom",
          "ExternalGarment"
        ],
        "type": "string",
        "description": "Job Line Type - used to load the different line types into the Create Job Web API"
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_JobLocationDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the location",
            "nullable": true
          },
          "timezone": {
            "type": "string",
            "description": "The timezone of the location (Time zone identifier in IANA TZ database format)",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Location information for a job"
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_JobStatusDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "MasterJobStatusID",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Configuration for a single supported job status"
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_PermissionsDto": {
        "type": "object",
        "properties": {
          "canEdit": {
            "type": "boolean",
            "description": "Whether the resource can be edited"
          },
          "lockedReason": {
            "type": "string",
            "description": "Reason why editing is locked, null if canEdit is true",
            "nullable": true
          },
          "canEditLines": {
            "type": "boolean",
            "description": "Whether the caller may change the job's lines right now: at least one of updating, adding or\r\nremoving lines is open to them. Present on GET /Jobs/{jobNumber} and GET /Jobs/active, and on\r\nthe job returned by a line change; omitted from reads that do not evaluate it.",
            "nullable": true
          },
          "canAddLines": {
            "type": "boolean",
            "description": "Whether the caller may add lines to the job right now. Present where\r\nCodewolf.Ctrl.Common.Classes.Jobs.PermissionsDto.CanEditLines is; omitted from reads that do not evaluate it.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "DTO for edit permissions information"
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_ReturnDtos_ActiveJobDto": {
        "type": "object",
        "properties": {
          "permissions": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_PermissionsDto"
              }
            ],
            "description": "Edit permissions for this job based on its status.",
            "nullable": true
          },
          "jobNumber": {
            "type": "integer",
            "description": "The unique identifier for the job.",
            "format": "int32"
          },
          "masterJobStatus": {
            "type": "string",
            "description": "The current status of the job.",
            "nullable": true
          },
          "stockStatus": {
            "type": "string",
            "description": "The plain-English stock status for the job: \"No Stock\", \"Partial Stock\" or \"Stock Complete\".\r\nTenant-conditional: only populated for tenants with the ShowInwardsList org pref enabled,\r\nand omitted entirely from the response otherwise. Only meaningful where inwards is in use.",
            "nullable": true
          },
          "originCode": {
            "type": "string",
            "description": "The origin code indicating where the job originated from.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "A brief description of the job.",
            "nullable": true
          },
          "customerUserId": {
            "type": "integer",
            "description": "The Customer User (owner/contact) the job belongs to - tblJobs.OwnerID.\r\nThis is the customer's own user who placed the job, not the Control staff member who\r\nkeyed it in (that is Creator on the job detail DTO) and not the owning customer.\r\nNull on legacy rows that were written without an owner.",
            "format": "int32",
            "nullable": true
          },
          "customerUserName": {
            "type": "string",
            "description": "The display name of the Customer User identified by Codewolf.Ctrl.Common.Classes.Jobs.ReturnDtos.ActiveJobDto.CustomerUserId.\r\nReturned alongside the id because a plain CustomerUser token cannot resolve ids itself\r\n(/account/users is admin-only), so an id on its own would render as a bare number for\r\nexactly the users this field exists to serve. Null when the job has no owner.",
            "nullable": true
          },
          "mustDate": {
            "type": "boolean",
            "description": "Indicates whether the job has a strict deadline that must be met."
          },
          "dateDue": {
            "type": "string",
            "description": "The date the job is due to be completed.",
            "format": "date-time",
            "nullable": true
          },
          "dateOut": {
            "type": "string",
            "description": "The date the job was shipped or dispatched.",
            "format": "date-time",
            "nullable": true
          },
          "shippedDaysToProcess": {
            "type": "number",
            "description": "The number of days the job was shipped early or late relative to the due date.\r\nNegative values indicate early shipment, positive values indicate late shipment.",
            "format": "double",
            "nullable": true
          },
          "orderNumber": {
            "type": "string",
            "description": "Order number reference",
            "nullable": true
          },
          "orderGroup": {
            "type": "string",
            "description": "Shared identifier linking multiple jobs from one checkout (e.g. RO-1234567).\r\nNull for single-job orders.",
            "nullable": true
          },
          "orderGroupSequence": {
            "type": "integer",
            "description": "Position within the order group (1, 2, 3...).\r\nNull for single-job orders.",
            "format": "int32",
            "nullable": true
          },
          "tracking": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_ReturnDtos_TrackingItemDto"
            },
            "description": "Tracking information for this job's shipments.\r\nEach entry represents one shipment with its tracking number and optional tracking link.\r\nEmpty list if no tracking data is available.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents an active job with essential tracking and status information."
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_ReturnDtos_CreateJobReturnDto": {
        "type": "object",
        "properties": {
          "jobNumber": {
            "type": "integer",
            "description": "The new Job number created for the Job",
            "format": "int32",
            "readOnly": true
          },
          "location": {
            "type": "string",
            "description": "indicates the location that the job will be manufactured",
            "nullable": true
          },
          "dateDue": {
            "type": "string",
            "description": "The DueDate. Either the passed DueDate or Calculated due date if requested was earlier than possible\r\nNOTE: that this will always be the date and/or time in the locations timezone",
            "nullable": true,
            "readOnly": true
          },
          "jobLineDetails": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_ReturnDtos_JobLineReturnDto"
                },
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_ReturnDtos_JobLinePriceCodeReturnDto"
                }
              ],
              "description": "Base class returned as an array of items - holds the return information for each Job line\r\nNOTE: Create either a JobItemPriceCodeReturnDto object or one of these which doesn't extend the basic data in here"
            },
            "description": "A list of unique key values passed in as part of the CreateJob Item - these should only include job items that require new artwork to be uploaded",
            "nullable": true,
            "readOnly": true
          },
          "totalJobCost": {
            "type": "number",
            "description": "Total Job Cost",
            "format": "double"
          },
          "expectingArtworkToBeUploaded": {
            "type": "boolean",
            "description": "Indicates to the WebApi User whether this newly created Job is expecting Artwork for any of the lines in the Job Itself",
            "readOnly": true
          }
        },
        "additionalProperties": false,
        "description": "Returns the information from a successful Job Creation to the caller"
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_ReturnDtos_CreateShopJobReturnDto": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_ReturnDtos_CreateJobReturnDto"
          }
        ],
        "properties": {
          "customerId": {
            "type": "integer",
            "description": "The Customer Id for this shopify user",
            "format": "int32"
          },
          "userId": {
            "type": "integer",
            "description": "The User Id for this shopify user",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Returns the information from a successful Job Creation to the caller"
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_ReturnDtos_JobLineAsset": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobLineBaseGrouping"
          }
        ],
        "properties": {
          "garment": {
            "type": "string",
            "description": "(optional) Garment",
            "nullable": true
          },
          "comment": {
            "type": "string",
            "description": "Any Comment",
            "nullable": true
          },
          "customerLabelUrl": {
            "type": "string",
            "description": "(Optional) A link to the ordering site's own label for this line. Kept only when the caller is a\r\nsupplier partner and the link is an absolute https URL of at most 1000 characters; otherwise it is\r\nignored and the job is still created.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Create a Job Line Item which uses an existing Asset in the system. Identified via the Asset Code (Code property)"
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_ReturnDtos_JobLinePriceCodeReturnDto": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_ReturnDtos_JobLineReturnDto"
          }
        ],
        "properties": {
          "newAssetSku": {
            "type": "string",
            "description": "The associated AssetSKU associated with the job line \r\nShows the new AssetTag code if the JobLine used a Price Code",
            "nullable": true
          },
          "jobLineLabelUrl": {
            "type": "string",
            "description": "If this is an external supplier order, this will contain the link to the jobline label",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The Job line information returned to the WEBAPI caller from the Create Job call"
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_ReturnDtos_JobLineReturnDto": {
        "type": "object",
        "properties": {
          "needsArtworkToBeUploaded": {
            "type": "boolean",
            "description": "indicates whether artwork NEEDS to be uploaded for this item"
          },
          "customerReference": {
            "type": "string",
            "description": "The customer reference Id value that is passed on new PriceCode lines and passed back when new Artwork is needed to be uploaded for the line",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "description": "the unit cost of the job line (priced based on customer price tier etc.)",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Base class returned as an array of items - holds the return information for each Job line\r\nNOTE: Create either a JobItemPriceCodeReturnDto object or one of these which doesn't extend the basic data in here"
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_ReturnDtos_TrackingItemDto": {
        "type": "object",
        "properties": {
          "trackingNumber": {
            "type": "string",
            "description": "The carrier tracking number for this shipment.",
            "nullable": true
          },
          "trackingLink": {
            "type": "string",
            "description": "The URL to track this shipment on the carrier's website.\r\nMay be null if the carrier does not provide a tracking link.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents a single tracking entry for a job shipment.\r\nContains the tracking number and optional tracking link URL."
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_ShippingAddress": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_DeliveryBaseAddress"
          }
        ],
        "properties": {
          "shipmentId": {
            "type": "integer",
            "description": "Stable identifier for this shipment on the job (dbo.JobShipment.Id).\r\nA job can carry several shipments, each with its own address and delivery\r\nmethod; this is what PATCH /Jobs/{jobNumber}/shipping uses to target one of them.",
            "format": "int32"
          },
          "trackingLink": {
            "type": "string",
            "description": "A Tracking link - if one has been allocated",
            "nullable": true
          },
          "trackingNumber": {
            "type": "string",
            "description": "The Tracking number associated to the Shipping address (for the service)",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One shipment on a job as returned by the job read endpoints — an address plus its delivery\r\nmethod and tracking details."
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_ShopJobs_DiscountTargetEnum": {
        "enum": [
          "Item",
          "Shipping"
        ],
        "type": "string"
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_ShopJobs_DiscountTargetValueEnum": {
        "enum": [
          "Percentage",
          "FixedValue"
        ],
        "type": "string"
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_ShopJobs_ShopDiscount": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name for Discount - may be either the discount title or the dicount code",
            "nullable": true
          },
          "target": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_ShopJobs_DiscountTargetEnum"
              }
            ],
            "description": "The target for the discount, shipping or Items"
          },
          "value": {
            "type": "number",
            "description": "The discount Value - as a money value",
            "format": "double"
          },
          "targetValue": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_ShopJobs_DiscountTargetValueEnum"
              }
            ],
            "description": "the type of value, either a percentage or a fixed value"
          },
          "isDiscountCode": {
            "type": "boolean",
            "description": "Indicates whether this is a discount code or not"
          }
        },
        "additionalProperties": false,
        "description": "represents a discount application"
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_ShopJobs_ShopJobCandidate": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_ShopifyJobs_CustomerShopJobCandidate"
          }
        ],
        "properties": {
          "itemsTotal": {
            "type": "number",
            "description": "Total value of the Items",
            "format": "double"
          },
          "taxTotal": {
            "type": "number",
            "description": "Total amount of the Tax charged",
            "format": "double"
          },
          "taxLines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_TaxLine"
            },
            "description": "The TAX lines as divided up and included in the Tax amount",
            "nullable": true
          },
          "totalAmount": {
            "type": "number",
            "description": "The total Amount of the Order",
            "format": "double"
          },
          "shippingTotal": {
            "type": "number",
            "description": "The total amount of shipping paid",
            "format": "double"
          },
          "shippingType": {
            "type": "string",
            "description": "Type of shipping",
            "nullable": true
          },
          "paymentType": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "How was the order paid for - may list multiple sources",
            "nullable": true
          },
          "discounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_ShopJobs_ShopDiscount"
            },
            "description": "Any discount codes that contributed to the price",
            "nullable": true
          },
          "userDetails": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_ShopJobs_ShopUserDetails"
              }
            ],
            "description": "The Shopify users details (see if we need to create the user at the same time as the Job)\r\n(Optional) - only passed if we need to create the customer and user for the Shopify user",
            "nullable": true
          },
          "customerId": {
            "type": "integer",
            "description": "The customer Id passed in if we know the customer/user has already been created",
            "format": "int32",
            "nullable": true
          },
          "userId": {
            "type": "integer",
            "description": "The user Id passed in if we know the customer/user has already been created",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Create Job Candidate for Shop information \r\nExtends the Job Candidate object to include the prices/taxes paid"
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_ShopJobs_ShopUserDetails": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_UserDetails"
          }
        ],
        "properties": {
          "shopUserId": {
            "type": "integer",
            "format": "int64"
          },
          "bypassCustomerMatch": {
            "type": "boolean",
            "description": "indicates whether to bypass the customer match checks \r\nthis is normally set from the Shopify Admin app once an admin user has decided to create the Customer even though there was a previous customer match"
          }
        },
        "additionalProperties": false
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_ShopifyJobs_CustomerShopJobCandidate": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_JobCandidate"
          }
        ],
        "properties": {
          "shopName": {
            "type": "string",
            "description": "The Shop Name\r\nThis is the shop name for the link of the order",
            "nullable": true
          },
          "shopOrderName": {
            "type": "string",
            "description": "The Shopify Order Name",
            "nullable": true
          },
          "shopOrderId": {
            "type": "string",
            "description": "The Shop Order Id\r\nThis is different from the JobCandidate.OrderNumber\r\nThis is the BigInt order id for the shop",
            "nullable": true
          },
          "currencyCode": {
            "type": "string",
            "description": "The paid currency",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_TaxLine": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "The type of tax collected",
            "nullable": true
          },
          "rate": {
            "type": "number",
            "description": "the rate for the tax collected",
            "format": "double"
          },
          "price": {
            "type": "number",
            "description": "the tax collected for this type",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "Codewolf_Ctrl_Common_Classes_Jobs_UserDetails": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "nullable": true
          },
          "firstName": {
            "type": "string",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "userAddress": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_BaseAddress"
              },
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_DeliveryAddress"
              },
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_DeliveryBaseAddress"
              },
              {
                "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Jobs_ShippingAddress"
              }
            ],
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_Ctrl_Common_Classes_Pricing_PriceCodeDto": {
        "type": "object",
        "properties": {
          "priceCode": {
            "type": "string",
            "description": "The code for the Price code",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "price code description",
            "nullable": true
          },
          "categoryCode": {
            "type": "string",
            "description": "The Category Code that the PriceCode belongs to",
            "nullable": true
          },
          "categoryName": {
            "type": "string",
            "description": "The Category Name that the PriceCode belongs to",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "The name of the item for this Price Code",
            "nullable": true
          },
          "processCode": {
            "type": "string",
            "description": "The Process Code for the Price code",
            "nullable": true
          },
          "masterProcessCode": {
            "type": "string",
            "description": "The Master Process Code for the Price code - this maps to the Asset Type code",
            "nullable": true
          },
          "minimumQuantity": {
            "type": "integer",
            "description": "Minimum quantity of items if using this Price Code",
            "format": "int32"
          },
          "externalSupplier": {
            "type": "string",
            "description": "Indicates that this PriceCode is supplied Externally",
            "nullable": true
          },
          "externalPriceCode": {
            "type": "string",
            "description": "The External Price Code for the Price Code",
            "nullable": true
          },
          "hasMetaDataAttributes": {
            "type": "boolean",
            "description": "If a Price code has Meta data properties then it requires the metadata items sent in to get Pricing for a price Code \r\nSo is NOT supplied in the GET all call"
          },
          "standardSetup": {
            "type": "number",
            "description": "The cost to setup for this asset job ($) - if outputs as NULL then the Setup DOES NOT APPLY",
            "format": "double",
            "nullable": true
          },
          "standardReset": {
            "type": "number",
            "description": "The reset cost to for this asset job ($) - if outputs as NULL then the Setup DOES NOT APPLY",
            "format": "double",
            "nullable": true
          },
          "sampleAvailable": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether the same resource is available for use."
          },
          "samplePrice": {
            "type": "number",
            "description": "Sample value that outputs conditionally based on ShouldSerializeSample - if outputs as NULL then the Sample IS NOT AVAILABLE, and will be removed as a return field",
            "format": "double",
            "nullable": true
          },
          "sampleLabel": {
            "type": "string",
            "description": "Gets or sets the label associated with the sample - if outputs as NULL then the Sample IS NOT AVAILABLE, and will be removed as a return field",
            "nullable": true
          },
          "sizeUnit": {
            "type": "string",
            "description": "Unit of measure for the Category Unit size (cm / in / mm)",
            "nullable": true
          },
          "sizeWidth": {
            "type": "number",
            "description": "The width of the Category Unit in Codewolf.Ctrl.Common.Classes.Pricing.PriceCodeDto.SizeUnit",
            "format": "double",
            "nullable": true
          },
          "sizeHeight": {
            "type": "number",
            "description": "The height of the Category Unit in Codewolf.Ctrl.Common.Classes.Pricing.PriceCodeDto.SizeUnit",
            "format": "double",
            "nullable": true
          },
          "categoryDescription": {
            "type": "string",
            "description": "The tenant-authored description of the price category this Price Code belongs to\r\n(sourced from Category.PriceDescription)",
            "nullable": true,
            "example": "Full colour heat transfers supplied on a carrier sheet, ready to press."
          },
          "categoryMetadata": {
            "type": "string",
            "description": "An opaque tenant-defined JSON string describing the category. Control stores and serves\r\nthis verbatim and never interprets it - parse it client-side.",
            "nullable": true
          },
          "unitType": {
            "type": "string",
            "description": "The category unit as a first-class value. Previously this was only available embedded\r\nin the composite priceCode string.",
            "nullable": true,
            "example": "120mm x 60mm"
          },
          "attributes": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Pricing_ProcessAttribute"
                },
                {
                  "$ref": "#/components/schemas/ProcessNumericAttributeOf1T"
                },
                {
                  "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Pricing_ProcessTextAttribute"
                }
              ],
              "description": "Process Attribute base\r\nType identifies the type of attribute"
            },
            "description": "Any attributes available for the Price code (note: some may be required when being used)",
            "nullable": true
          },
          "priceBands": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Interfaces_IPriceBandDto"
            },
            "description": "Price Bands (available when the Pricing do NOT have dependant Metadata pricing",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Defines a Price Code that can be used to create new Jobs"
      },
      "Codewolf_Ctrl_Common_Classes_Pricing_ProcessAttribute": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the attribute - use this to pass values back for an attribute",
            "nullable": true
          },
          "type": {
            "type": "string",
            "description": "Type of the attribute - text, int, decimal, select\r\n<list type=\"bullet\"><item><term>text</term><description>defines a text based attribute (with minLength and maxLength values)</description></item><item><term>int</term><description>defines a integer numeric based attribute (with min and max values)</description></item><item><term>decimal</term><description>defines a decimal numeric based attribute (with min and max values), supports all numbers</description></item><item><term>select</term><description>defines a select list of potential Enumerable text/value pairs</description></item></list>",
            "nullable": true
          },
          "label": {
            "type": "string",
            "description": "Label - this would be used to show a label  for a screen field",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Description of the attribute",
            "nullable": true
          },
          "required": {
            "type": "boolean",
            "description": "Indicates the attribute value MUST be passed"
          },
          "isMetaDataAttribute": {
            "type": "boolean",
            "description": "Indicates that this attribute is a MetaData attribute which affects the Pricing matrix for this Price Code"
          },
          "enumerableValues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                }
              }
            },
            "nullable": true
          },
          "assetAttributeName": {
            "type": "string",
            "description": "Determines that the element must be saved to the AssetAttribute if provided",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Process Attribute base\r\nType identifies the type of attribute"
      },
      "Codewolf_Ctrl_Common_Classes_Pricing_ProcessTextAttribute": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Pricing_ProcessAttribute"
          }
        ],
        "properties": {
          "minLength": {
            "type": "integer",
            "description": "Min length of string",
            "format": "int32"
          },
          "maxLength": {
            "type": "integer",
            "description": "max length of string",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Text attribute for Process"
      },
      "Codewolf_Ctrl_Common_Classes_Stocks_StockDto": {
        "type": "object",
        "properties": {
          "supplier": {
            "type": "string",
            "description": "Stock Supplier",
            "nullable": true
          },
          "categoryName": {
            "type": "string",
            "description": "Stock Category",
            "nullable": true
          },
          "categoryUnitId": {
            "type": "string",
            "description": "Stock Category Unit ID (for Pricing)",
            "nullable": true
          },
          "stockItemId": {
            "type": "integer",
            "description": "Internal StockItemId used to enrich list responses with per-item data\r\n(e.g. markets from StockItemShipping). Never serialised to API consumers.",
            "format": "int32"
          },
          "stockCode": {
            "type": "string",
            "description": "The code which identifies the Stock",
            "nullable": true
          },
          "processCode": {
            "type": "string",
            "description": "the Process Code",
            "nullable": true,
            "readOnly": true
          },
          "stockName": {
            "type": "string",
            "description": "Stock name",
            "nullable": true
          },
          "stockDescription": {
            "type": "string",
            "description": "The stock item's description. May contain HTML markup; at most 4000 characters.",
            "nullable": true
          },
          "stockSpecifications": {
            "type": "string",
            "description": "The specifications for the stock item. Null for stock imported from a supplier that provides only\r\na description, in which case Codewolf.Ctrl.Common.Classes.Stocks.StockDto.StockDescription is the full product text. May contain HTML\r\nmarkup; at most 4000 characters.",
            "nullable": true
          },
          "priceCompatibleLookupCode": {
            "type": "string",
            "description": "The Price Compatible Lookup Code",
            "nullable": true
          },
          "rank": {
            "type": "integer",
            "description": "Gets or sets the rank or position associated with the current instance.",
            "format": "int32"
          },
          "stockVariants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Stocks_StockVariantDto"
            },
            "description": "The stock Variants as a list",
            "nullable": true
          },
          "stockImageUrl": {
            "type": "string",
            "description": "Gets or sets the URL or file path of the hero stock image associated with the item.\r\nBackwards compatible field — mirrors `Images[0]?.Url` when the gallery is\r\nnon-empty.",
            "nullable": true
          },
          "images": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Stocks_StockImageDto"
            },
            "description": "CW-4346: ordered gallery of images for this stock item. Index 0 is the hero\r\n(matches Codewolf.Ctrl.Common.Classes.Stocks.StockDto.StockImageUrl); subsequent entries are additional gallery\r\nimages. Empty list when the stock item has no images. Always serialised.",
            "nullable": true
          },
          "showAvailableStock": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether the available stock should be displayed to users."
          },
          "shippingConfigs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Stocks_StockItemShippingSummary"
            },
            "description": "Per-market shipping configurations for this stock item.\r\nOnly populated on single stock item endpoint (GET /stock/{code}).",
            "nullable": true
          },
          "markets": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Distinct union of markets (ISO country codes) drawn from this item's active\r\nshipping configurations. An empty array means the item has no active shipping\r\nconfiguration and should be hidden from all locale-filtered catalogues\r\n(fail-closed). Always serialised.",
            "nullable": true
          },
          "badges": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Short display badges rendered as pills on the product card\r\n(e.g. \"Free shipping\", \"No minimums\", \"Ground only\").\r\nOrder is preserved. Always serialised as an array — consumers\r\ncan rely on the field being present (empty array means no badges).",
            "nullable": true
          },
          "slug": {
            "type": "string",
            "description": "URL-friendly slug for the stock item, used to form canonical\r\nproduct URLs in consuming storefronts (e.g. /products/{slug}).\r\nLowercase, alphanumerics and hyphens only, globally unique across\r\nactive non-deleted stock items.",
            "nullable": true
          },
          "seoTitle": {
            "type": "string",
            "description": "Optional override for the HTML <title> tag on the storefront\r\nproduct page. Falls back to the default title if null or empty.",
            "nullable": true
          },
          "seoDescription": {
            "type": "string",
            "description": "Optional override for the HTML meta description on the storefront\r\nproduct page. Falls back to the default description if null or empty.",
            "nullable": true
          },
          "priceBands": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Interfaces_IPriceBandDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Information about an available Stock"
      },
      "Codewolf_Ctrl_Common_Classes_Stocks_StockImageDto": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "CDN URL of the image. Use this directly for both rendering and linking.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Optional display name for captions / lightbox titles. May be null.",
            "nullable": true
          },
          "altText": {
            "type": "string",
            "description": "Optional alt text for accessibility. May be null. Consumers should\r\nfall back to a sensible default (e.g. the stock name) when absent.",
            "nullable": true
          },
          "variantCode": {
            "type": "string",
            "description": "The code of the colour variant this picture shows. It matches the `variantCode` of an\r\nentry in the item's `stockVariants`. Null when the picture applies to the whole item\r\nrather than to one colour. It can name a colour that is not in `stockVariants`, for\r\nexample a retired colour when archived stock is not requested; such a picture belongs to no\r\nlisted colour.",
            "nullable": true
          },
          "view": {
            "type": "string",
            "description": "Which side or kind of picture this is. One of: FRONT (the front of the item), BACK (the back),\r\nSIDE (the item seen from one side), DETAIL (a close-up of part of the item), SWATCH (a sample\r\nof the colour or fabric), OTHER (a picture whose kind is known but is none of these). Null when\r\nthe view is not known; treat null as unknown, not as OTHER.",
            "nullable": true
          },
          "viewSource": {
            "type": "string",
            "description": "How the view was decided, as a guide to how far to trust it. One of: SUPPLIER (stated by the\r\nsupplier), AI (recognised from the picture by image analysis), POSITION (inferred from the\r\npicture's position in the supplier's list of pictures), PERSON (set or confirmed by a member of\r\nstaff). Null when the view is null.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A single image in a stock item's ordered gallery. Index 0 in\r\nCodewolf.Ctrl.Common.Classes.Stocks.StockDto.Images is the hero (the storefront hero CDN URL,\r\n`StockDto.StockImageUrl`, mirrors that entry's Codewolf.Ctrl.Common.Classes.Stocks.StockImageDto.Url)."
      },
      "Codewolf_Ctrl_Common_Classes_Stocks_StockItemShipmentTypeOptionSummary": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "price": {
            "type": "number",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lightweight shipment-type option summary for StockItemShippingSummary.\r\nMirrors the API-layer DTO shape: per-method override of shipment type availability and price."
      },
      "Codewolf_Ctrl_Common_Classes_Stocks_StockItemShippingLocationSummary": {
        "type": "object",
        "properties": {
          "locationCode": {
            "type": "string",
            "nullable": true
          },
          "locationName": {
            "type": "string",
            "nullable": true
          },
          "locale": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lightweight fulfilment location summary for StockItemShippingSummary."
      },
      "Codewolf_Ctrl_Common_Classes_Stocks_StockItemShippingSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "markets": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "shipMode": {
            "type": "string",
            "nullable": true
          },
          "weight": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "weightUnit": {
            "type": "string",
            "nullable": true
          },
          "length": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "width": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "height": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "dimensionUnit": {
            "type": "string",
            "nullable": true
          },
          "fixedShipping": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "groundOnly": {
            "type": "boolean"
          },
          "estimatedLeadDays": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "fulfilmentLocations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Stocks_StockItemShippingLocationSummary"
            },
            "nullable": true
          },
          "shipmentTypeOptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Stocks_StockItemShipmentTypeOptionSummary"
            },
            "description": "Per-shipment-method overrides for this stock item's shipping entry. Each option's\r\n`price` is null/absent when the rate-API price should be used, `0` for a\r\nfree override on this method, or positive for a flat override amount.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lightweight shipping configuration summary for inclusion in StockDto responses.\r\nContains only the fields needed for the GET /stock/{code} enrichment."
      },
      "Codewolf_Ctrl_Common_Classes_Stocks_StockVariantDto": {
        "type": "object",
        "properties": {
          "variantCode": {
            "type": "string",
            "description": "The unique identifier for the Stock Variant",
            "nullable": true
          },
          "colour": {
            "type": "string",
            "description": "The Stock Variant Colour",
            "nullable": true
          },
          "variantImageUrl": {
            "type": "string",
            "description": "Gets or sets the URL of the image associated with the product variant.",
            "nullable": true
          },
          "numberOfSizes": {
            "type": "integer",
            "description": "The number of sizes available for this variant",
            "format": "int32"
          },
          "sizesCsv": {
            "type": "string",
            "description": "Gets or sets a comma-separated list of sizes.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A Colour variant of a stock item"
      },
      "Codewolf_Ctrl_Common_Classes_Tags_TagDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The tag's id.",
            "format": "int32"
          },
          "tag": {
            "type": "string",
            "description": "The tag text, in lower case. A word that starts with @ names a user.",
            "nullable": true
          },
          "code": {
            "type": "string",
            "description": "The code of a tag the system placed, such as a milestone marker. Null on a tag a person typed.",
            "nullable": true
          },
          "isProtected": {
            "type": "boolean",
            "description": "True when the tag is protected: the system placed it and staff cannot remove it."
          },
          "enteredBy": {
            "type": "string",
            "description": "The login of the person who placed the tag. Null when the system placed it.",
            "nullable": true
          },
          "enteredAtUtc": {
            "type": "string",
            "description": "When the tag was placed, in UTC. Null on old tags that recorded no time.",
            "format": "date-time",
            "nullable": true
          },
          "mentions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The logins of the users the tag names with @. Empty when it names nobody.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A tag on a job, quote, inwards delivery, asset or stock item."
      },
      "Codewolf_Ctrl_Common_Enums_ActiveJobSortColumn": {
        "enum": [
          "JobNumber",
          "DateIn",
          "DateDue",
          "DateOut",
          "OrderGroupSequence"
        ],
        "type": "string"
      },
      "Codewolf_Ctrl_Common_Enums_AssetSortColumn": {
        "enum": [
          "AssetId",
          "AssetTag",
          "PriceCode",
          "CreateDate",
          "LastUsed"
        ],
        "type": "string"
      },
      "Codewolf_Ctrl_Common_Enums_FileStatus": {
        "enum": [
          "Active",
          "Archived",
          "Deleted"
        ],
        "type": "string"
      },
      "Codewolf_Ctrl_Common_Enums_SortDirection": {
        "enum": [
          "Ascending",
          "Descending"
        ],
        "type": "string"
      },
      "Codewolf_Ctrl_Common_Enums_StockSortColumn": {
        "enum": [
          "StockCode",
          "StockName",
          "PriceCompatibleLookupCode"
        ],
        "type": "string"
      },
      "Codewolf_Ctrl_Common_Enums_VariantSortColumn": {
        "enum": [
          "VariantCode",
          "Colour"
        ],
        "type": "string"
      },
      "Codewolf_Ctrl_Common_Interfaces_IDeliveryOption": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "nullable": true
          },
          "label": {
            "type": "string",
            "nullable": true
          },
          "isCollection": {
            "type": "boolean"
          },
          "rank": {
            "type": "integer",
            "format": "int32"
          },
          "gangRank": {
            "type": "integer",
            "format": "int32"
          },
          "value": {
            "type": "string",
            "nullable": true
          },
          "deliveryLabelEnabled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Codewolf_Ctrl_Common_Interfaces_IPriceBandDto": {
        "type": "object",
        "properties": {
          "from": {
            "type": "integer",
            "format": "int32"
          },
          "to": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "unitPrice": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_ExistingStockVariant": {
        "type": "object",
        "properties": {
          "stockVariantId": {
            "type": "integer",
            "format": "int32"
          },
          "variantCode": {
            "type": "string",
            "nullable": true
          },
          "colour": {
            "type": "string",
            "nullable": true
          },
          "gatewayColourwayId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "active": {
            "type": "boolean"
          },
          "sizeSetId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "sizeSetSizes": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockAdoptionException": {
        "type": "object",
        "properties": {
          "stockCode": {
            "type": "string",
            "nullable": true
          },
          "supplierCode": {
            "type": "string",
            "nullable": true
          },
          "reason": {
            "type": "string",
            "nullable": true
          },
          "kind": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockNotDoneKind"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockAdoptionLink": {
        "type": "object",
        "properties": {
          "stockItemId": {
            "type": "integer",
            "format": "int32"
          },
          "stockCode": {
            "type": "string",
            "nullable": true
          },
          "gatewayProductId": {
            "type": "string",
            "format": "uuid"
          },
          "styleCode": {
            "type": "string",
            "nullable": true
          },
          "variants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockAdoptionVariantLink"
            },
            "nullable": true
          },
          "itemAlreadyLinked": {
            "type": "boolean"
          },
          "source": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockMatchSource"
              }
            ]
          },
          "confidence": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "reason": {
            "type": "string",
            "nullable": true
          },
          "approvedBy": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockAdoptionReport": {
        "type": "object",
        "properties": {
          "supplierKey": {
            "type": "string",
            "nullable": true
          },
          "supplierId": {
            "type": "integer",
            "format": "int32"
          },
          "dryRun": {
            "type": "boolean"
          },
          "ran": {
            "type": "boolean"
          },
          "existingItemsFound": {
            "type": "integer",
            "format": "int32"
          },
          "existingVariantsFound": {
            "type": "integer",
            "format": "int32"
          },
          "itemsLinked": {
            "type": "integer",
            "format": "int32"
          },
          "variantsLinked": {
            "type": "integer",
            "format": "int32"
          },
          "codeRename": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockCodeRenameReport"
              }
            ],
            "nullable": true
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockAdoptionLink"
            },
            "nullable": true
          },
          "unmatched": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockAdoptionException"
            },
            "nullable": true
          },
          "excepted": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockAdoptionException"
            },
            "nullable": true
          },
          "proposals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockMatchCandidate"
            },
            "nullable": true
          },
          "configurationErrors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockAdoptionVariantLink": {
        "type": "object",
        "properties": {
          "stockVariantId": {
            "type": "integer",
            "format": "int32"
          },
          "variantCode": {
            "type": "string",
            "nullable": true
          },
          "gatewayColourwayId": {
            "type": "string",
            "format": "uuid"
          },
          "productCode": {
            "type": "string",
            "nullable": true
          },
          "source": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockMatchSource"
              }
            ]
          },
          "confidence": {
            "type": "number",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockBestGuessReport": {
        "type": "object",
        "properties": {
          "passes": {
            "type": "integer",
            "format": "int32"
          },
          "decisions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockBestGuessRuleCount"
            },
            "nullable": true
          },
          "refused": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockOnboardingItem"
            },
            "nullable": true
          },
          "retirementsApplied": {
            "type": "integer",
            "format": "int32"
          },
          "retirementsHeld": {
            "type": "integer",
            "format": "int32"
          },
          "retirementsFailed": {
            "type": "integer",
            "format": "int32"
          },
          "stoppedAtPassLimit": {
            "type": "boolean"
          },
          "importWasOn": {
            "type": "boolean"
          },
          "importSwitchedOn": {
            "type": "boolean"
          },
          "importSwitchError": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockBestGuessRule": {
        "enum": [
          "MatchApproved",
          "MatchBelowThreshold",
          "LeftAlone",
          "NoMatchRetired",
          "CodeReusedRetired",
          "DuplicateRetired",
          "ColourPaired",
          "ColourRetired"
        ],
        "type": "string"
      },
      "Codewolf_StockManagers_Shared_Classes_StockBestGuessRuleCount": {
        "type": "object",
        "properties": {
          "rule": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockBestGuessRule"
              }
            ]
          },
          "count": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockCatalogueColourway": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "productCode": {
            "type": "string",
            "nullable": true
          },
          "colourRaw": {
            "type": "string",
            "nullable": true
          },
          "colourCode": {
            "type": "string",
            "nullable": true
          },
          "sizes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockCatalogueSize"
            },
            "nullable": true
          },
          "everySizeDiscontinued": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockCatalogueSize": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "sku": {
            "type": "string",
            "nullable": true
          },
          "sizeRaw": {
            "type": "string",
            "nullable": true
          },
          "sizeOrder": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "lifecycle": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockCodeChange": {
        "type": "object",
        "properties": {
          "stockItemId": {
            "type": "integer",
            "format": "int32"
          },
          "oldStockCode": {
            "type": "string",
            "nullable": true
          },
          "newStockCode": {
            "type": "string",
            "nullable": true
          },
          "oldPriceCode": {
            "type": "string",
            "nullable": true
          },
          "newPriceCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockCodeHistoryReport": {
        "type": "object",
        "properties": {
          "supplierId": {
            "type": "integer",
            "format": "int32"
          },
          "dryRun": {
            "type": "boolean"
          },
          "requestedBy": {
            "type": "string",
            "nullable": true
          },
          "ran": {
            "type": "boolean"
          },
          "configurationErrors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "codeChanges": {
            "type": "integer",
            "format": "int32"
          },
          "rewritten": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockCodeReferenceCount"
            },
            "nullable": true
          },
          "skipped": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockCodeReferenceCount"
            },
            "nullable": true
          },
          "residual": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockCodeReferenceCount"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockCodeMapEntry": {
        "type": "object",
        "properties": {
          "stockCodeMapId": {
            "type": "integer",
            "format": "int64"
          },
          "supplierId": {
            "type": "integer",
            "format": "int32"
          },
          "oldStockItemId": {
            "type": "integer",
            "format": "int32"
          },
          "oldStockCode": {
            "type": "string",
            "nullable": true
          },
          "oldStockVariantId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "oldVariantCode": {
            "type": "string",
            "nullable": true
          },
          "newStockItemId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "newStockCode": {
            "type": "string",
            "nullable": true
          },
          "newStockVariantId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "newVariantCode": {
            "type": "string",
            "nullable": true
          },
          "renamedToCode": {
            "type": "string",
            "nullable": true
          },
          "renamedAtJobLineId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "renamedPrefix": {
            "type": "string",
            "nullable": true
          },
          "gatewayProductId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "gatewayColourwayId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "outcome": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockCodeMapOutcome"
              }
            ]
          },
          "source": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockMatchSource"
              }
            ]
          },
          "confidence": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "reason": {
            "type": "string",
            "nullable": true
          },
          "approvedBy": {
            "type": "string",
            "nullable": true
          },
          "approvedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "targetCode": {
            "type": "string",
            "nullable": true
          },
          "renameState": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockRenameState"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockCodeMapOutcome": {
        "enum": [
          "Linked",
          "Replaced",
          "Retired",
          "Renamed",
          "AwaitingReplacement",
          "CodeChanged"
        ],
        "type": "string"
      },
      "Codewolf_StockManagers_Shared_Classes_StockCodeReferenceCount": {
        "type": "object",
        "properties": {
          "table": {
            "type": "string",
            "nullable": true
          },
          "column": {
            "type": "string",
            "nullable": true
          },
          "rows": {
            "type": "integer",
            "format": "int32"
          },
          "reason": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockCodeRenameAction": {
        "type": "object",
        "properties": {
          "stockItemId": {
            "type": "integer",
            "format": "int32"
          },
          "oldStockCode": {
            "type": "string",
            "nullable": true
          },
          "newStockCode": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockCodeRenameStatus"
              }
            ]
          },
          "reason": {
            "type": "string",
            "nullable": true
          },
          "applied": {
            "type": "boolean"
          },
          "openJobNumbers": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "nullable": true
          },
          "oldPriceCode": {
            "type": "string",
            "nullable": true
          },
          "newPriceCode": {
            "type": "string",
            "nullable": true
          },
          "pricingMoved": {
            "type": "boolean"
          },
          "quoteLinesMoved": {
            "type": "integer",
            "format": "int32"
          },
          "quoteLinesLeft": {
            "type": "integer",
            "format": "int32"
          },
          "variants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockVariantCodeRenameAction"
            },
            "nullable": true
          },
          "rewritten": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockCodeReferenceCount"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockCodeRenameReport": {
        "type": "object",
        "properties": {
          "supplierId": {
            "type": "integer",
            "format": "int32"
          },
          "dryRun": {
            "type": "boolean"
          },
          "ran": {
            "type": "boolean"
          },
          "configurationErrors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "exoManaged": {
            "type": "boolean"
          },
          "stockCodePrefix": {
            "type": "string",
            "nullable": true
          },
          "renamed": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "alreadyCurrent": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "skipped": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "refused": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "deferred": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "failed": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "quoteLinesLeft": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockCodeRenameAction"
            },
            "nullable": true
          },
          "variantsRenamed": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "variantsAlreadyCurrent": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "variantsSkipped": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "variantsRefused": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "variantsDeferred": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "variantsFailed": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "codesChanged": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockCodeChange"
            },
            "nullable": true,
            "readOnly": true
          },
          "variantCodesChanged": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockVariantCodeChange"
            },
            "nullable": true,
            "readOnly": true
          },
          "rewritten": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockCodeReferenceCount"
            },
            "nullable": true
          },
          "historySkipped": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockCodeReferenceCount"
            },
            "nullable": true
          },
          "historyRan": {
            "type": "boolean"
          },
          "historyError": {
            "type": "string",
            "nullable": true
          },
          "residual": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockCodeReferenceCount"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockCodeRenameStatus": {
        "enum": [
          "Renamed",
          "AlreadyCurrent",
          "Excepted",
          "Refused",
          "Skipped",
          "Deferred",
          "Failed"
        ],
        "type": "string"
      },
      "Codewolf_StockManagers_Shared_Classes_StockCodeRenamed": {
        "type": "object",
        "properties": {
          "stockVariantId": {
            "type": "integer",
            "format": "int32"
          },
          "oldCode": {
            "type": "string",
            "nullable": true
          },
          "newCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockColourMapping": {
        "type": "object",
        "properties": {
          "stockVariantId": {
            "type": "integer",
            "format": "int32"
          },
          "gatewayColourwayId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "confidence": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "retire": {
            "type": "boolean"
          },
          "noColourwaySuggested": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockGatewayAccountFieldKind": {
        "enum": [
          "Text",
          "Email",
          "Secret",
          "Number"
        ],
        "type": "string"
      },
      "Codewolf_StockManagers_Shared_Classes_StockGatewayIngestionSetting": {
        "enum": [
          "On",
          "Off",
          "NotStarted"
        ],
        "type": "string"
      },
      "Codewolf_StockManagers_Shared_Classes_StockGatewaySetupFailure": {
        "enum": [
          "None",
          "NotFound",
          "Invalid",
          "Refused",
          "NotConfigured",
          "GatewayUnavailable",
          "Busy",
          "SettingsChanged"
        ],
        "type": "string"
      },
      "Codewolf_StockManagers_Shared_Classes_StockGatewaySizeOutcome": {
        "enum": [
          "Resolved",
          "NoMatch",
          "Ambiguous"
        ],
        "type": "string"
      },
      "Codewolf_StockManagers_Shared_Classes_StockImportCategoryNotImported": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string",
            "nullable": true
          },
          "products": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockImportRejection": {
        "type": "object",
        "properties": {
          "styleCode": {
            "type": "string",
            "nullable": true
          },
          "colourwayCode": {
            "type": "string",
            "nullable": true
          },
          "reason": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockImportReport": {
        "type": "object",
        "properties": {
          "supplierKey": {
            "type": "string",
            "nullable": true
          },
          "supplierId": {
            "type": "integer",
            "format": "int32"
          },
          "dryRun": {
            "type": "boolean"
          },
          "productsRead": {
            "type": "integer",
            "format": "int32"
          },
          "productsDiscontinued": {
            "type": "integer",
            "format": "int32"
          },
          "itemsCreated": {
            "type": "integer",
            "format": "int32"
          },
          "itemsUpdated": {
            "type": "integer",
            "format": "int32"
          },
          "variantsCreated": {
            "type": "integer",
            "format": "int32"
          },
          "createdItemCodes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "createdVariantCodes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "variantsUpdated": {
            "type": "integer",
            "format": "int32"
          },
          "sizeSetsCreated": {
            "type": "integer",
            "format": "int32"
          },
          "rejections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockImportRejection"
            },
            "nullable": true
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockImportRejection"
            },
            "nullable": true
          },
          "excepted": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockImportRejection"
            },
            "nullable": true
          },
          "heldForMatching": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockImportRejection"
            },
            "nullable": true
          },
          "categoriesNotImported": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockImportCategoryNotImported"
            },
            "nullable": true
          },
          "adoption": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockAdoptionReport"
              }
            ],
            "nullable": true
          },
          "codeRename": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockCodeRenameReport"
              }
            ],
            "nullable": true
          },
          "configurationErrors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "ran": {
            "type": "boolean"
          },
          "error": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockMatchAutoApproval": {
        "type": "object",
        "properties": {
          "stockMatchCandidateId": {
            "type": "integer",
            "format": "int64"
          },
          "stockItemId": {
            "type": "integer",
            "format": "int32"
          },
          "stockCode": {
            "type": "string",
            "nullable": true
          },
          "gatewayProductId": {
            "type": "string",
            "format": "uuid"
          },
          "styleCode": {
            "type": "string",
            "nullable": true
          },
          "confidence": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "fromEarlierRun": {
            "type": "boolean"
          },
          "variants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockAdoptionVariantLink"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockMatchCandidate": {
        "type": "object",
        "properties": {
          "stockMatchCandidateId": {
            "type": "integer",
            "format": "int64"
          },
          "supplierId": {
            "type": "integer",
            "format": "int32"
          },
          "kind": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockMatchKind"
              }
            ]
          },
          "stockItemId": {
            "type": "integer",
            "format": "int32"
          },
          "stockVariantId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "keepStockItemId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "gatewayProductId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "gatewayColourwayId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "colourMappings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockColourMapping"
            },
            "nullable": true
          },
          "verdict": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockMatchVerdict"
              }
            ]
          },
          "source": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockMatchSource"
              }
            ]
          },
          "confidence": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "reason": {
            "type": "string",
            "nullable": true
          },
          "requestFingerprint": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockMatchStatus"
              }
            ]
          },
          "statusReason": {
            "type": "string",
            "nullable": true
          },
          "exoChecked": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "targetCode": {
            "type": "string",
            "nullable": true
          },
          "renameState": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockRenameState"
              }
            ]
          },
          "decidedBy": {
            "type": "string",
            "nullable": true
          },
          "decidedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "appliedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "stockCode": {
            "type": "string",
            "nullable": true
          },
          "stockName": {
            "type": "string",
            "nullable": true
          },
          "variantCode": {
            "type": "string",
            "nullable": true
          },
          "keepStockCode": {
            "type": "string",
            "nullable": true
          },
          "keepStockName": {
            "type": "string",
            "nullable": true
          },
          "styleCode": {
            "type": "string",
            "nullable": true
          },
          "productTitle": {
            "type": "string",
            "nullable": true
          },
          "variants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_ExistingStockVariant"
            },
            "nullable": true
          },
          "productColourways": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockCatalogueColourway"
            },
            "nullable": true
          },
          "jobLineCount": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "keepVariants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_ExistingStockVariant"
            },
            "nullable": true
          },
          "keepJobLineCount": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockMatchDecisionResult": {
        "type": "object",
        "properties": {
          "stockMatchCandidateId": {
            "type": "integer",
            "format": "int64"
          },
          "succeeded": {
            "type": "boolean"
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockMatchStatus"
              }
            ],
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "replaced": {
            "type": "boolean"
          },
          "itemsLinked": {
            "type": "integer",
            "format": "int32"
          },
          "variantsLinked": {
            "type": "integer",
            "format": "int32"
          },
          "aliasesLearned": {
            "type": "integer",
            "format": "int32"
          },
          "retirement": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockRetirementAction"
              }
            ],
            "nullable": true
          },
          "retirementFailed": {
            "type": "boolean"
          },
          "notFound": {
            "type": "boolean"
          },
          "codeRename": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockCodeRenameReport"
              }
            ],
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockMatchKind": {
        "enum": [
          "Item",
          "Variant",
          "Duplicate"
        ],
        "type": "string"
      },
      "Codewolf_StockManagers_Shared_Classes_StockMatchOverride": {
        "type": "object",
        "properties": {
          "gatewayProductId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "gatewayColourwayId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "colourMappings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockColourMapping"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockMatchRunReport": {
        "type": "object",
        "properties": {
          "supplierId": {
            "type": "integer",
            "format": "int32"
          },
          "supplierKey": {
            "type": "string",
            "nullable": true
          },
          "dryRun": {
            "type": "boolean"
          },
          "ran": {
            "type": "boolean"
          },
          "configurationErrors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "existingItemsFound": {
            "type": "integer",
            "format": "int32"
          },
          "existingVariantsFound": {
            "type": "integer",
            "format": "int32"
          },
          "excepted": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockAdoptionException"
            },
            "nullable": true
          },
          "duplicatesProposed": {
            "type": "integer",
            "format": "int32"
          },
          "itemsLinked": {
            "type": "integer",
            "format": "int32"
          },
          "variantsLinkedByCode": {
            "type": "integer",
            "format": "int32"
          },
          "variantsLinkedByColour": {
            "type": "integer",
            "format": "int32"
          },
          "variantsLinkedByAlias": {
            "type": "integer",
            "format": "int32"
          },
          "codeRename": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockCodeRenameReport"
              }
            ],
            "nullable": true
          },
          "colourChoicesProposed": {
            "type": "integer",
            "format": "int32"
          },
          "noCandidateItems": {
            "type": "integer",
            "format": "int32"
          },
          "noCodeMatchItems": {
            "type": "integer",
            "format": "int32"
          },
          "itemsToJudge": {
            "type": "integer",
            "format": "int32"
          },
          "itemsToJudgeCodes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "itemsNotJudgedCodes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "aiCalls": {
            "type": "integer",
            "format": "int32"
          },
          "aiFailures": {
            "type": "integer",
            "format": "int32"
          },
          "inputTokens": {
            "type": "integer",
            "format": "int64",
            "readOnly": true
          },
          "outputTokens": {
            "type": "integer",
            "format": "int64",
            "readOnly": true
          },
          "cacheCreationInputTokens": {
            "type": "integer",
            "format": "int64",
            "readOnly": true
          },
          "cacheReadInputTokens": {
            "type": "integer",
            "format": "int64",
            "readOnly": true
          },
          "aiFailuresByCode": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int32"
            },
            "nullable": true
          },
          "aiStoppedReason": {
            "type": "string",
            "nullable": true
          },
          "judgeSkippedReason": {
            "type": "string",
            "nullable": true
          },
          "alreadyPending": {
            "type": "integer",
            "format": "int32"
          },
          "itemsRejectedBefore": {
            "type": "integer",
            "format": "int32"
          },
          "proposalsSaved": {
            "type": "integer",
            "format": "int32"
          },
          "proposalsSuperseded": {
            "type": "integer",
            "format": "int32"
          },
          "exceptedProposalsSuperseded": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockAdoptionException"
            },
            "nullable": true
          },
          "proposalsPreviouslyRejected": {
            "type": "integer",
            "format": "int32"
          },
          "proposalsAlreadyDecided": {
            "type": "integer",
            "format": "int32"
          },
          "proposalsSkippedAsOpen": {
            "type": "integer",
            "format": "int32"
          },
          "autoApproved": {
            "type": "integer",
            "format": "int32"
          },
          "autoApprovedFromEarlierRuns": {
            "type": "integer",
            "format": "int32"
          },
          "autoApprovals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockMatchAutoApproval"
            },
            "nullable": true
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockAdoptionLink"
            },
            "nullable": true
          },
          "proposals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockMatchCandidate"
            },
            "nullable": true
          },
          "unmatched": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockAdoptionException"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockMatchSource": {
        "enum": [
          "Exact",
          "ColourName",
          "Alias",
          "AI",
          "Manual",
          "Duplicate"
        ],
        "type": "string"
      },
      "Codewolf_StockManagers_Shared_Classes_StockMatchStatus": {
        "enum": [
          "Pending",
          "Approved",
          "Rejected",
          "Applied",
          "Deferred",
          "Superseded"
        ],
        "type": "string"
      },
      "Codewolf_StockManagers_Shared_Classes_StockMatchVerdict": {
        "enum": [
          "Match",
          "NoMatch",
          "CodeReused",
          "Unsure",
          "Duplicate"
        ],
        "type": "string"
      },
      "Codewolf_StockManagers_Shared_Classes_StockNotDoneKind": {
        "enum": [
          "Other",
          "DuplicateCodes",
          "InactiveDuplicates",
          "SharedCatalogueCode",
          "AlreadyLinked",
          "RepeatedInCatalogue",
          "NotInCatalogue",
          "ColourwayNotInCatalogue",
          "JudgeStopped",
          "NotJudged",
          "AwaitingReview",
          "RenameRefused",
          "RenameDeferred",
          "RenameFailed",
          "RenameSkipped",
          "NotConfigured",
          "HistoryFailed",
          "ImportFailed",
          "HeldForMatching",
          "ImportRejected",
          "RetirementHeld",
          "ImportNeedsReview"
        ],
        "type": "string"
      },
      "Codewolf_StockManagers_Shared_Classes_StockOnboardingItem": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "nullable": true
          },
          "newCode": {
            "type": "string",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockOnboardingNotDone": {
        "type": "object",
        "properties": {
          "stage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockOnboardingStage"
              }
            ]
          },
          "kind": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockNotDoneKind"
              }
            ]
          },
          "code": {
            "type": "string",
            "nullable": true
          },
          "reason": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockOnboardingReport": {
        "type": "object",
        "properties": {
          "supplierId": {
            "type": "integer",
            "format": "int32"
          },
          "supplierKey": {
            "type": "string",
            "nullable": true
          },
          "dryRun": {
            "type": "boolean"
          },
          "ran": {
            "type": "boolean"
          },
          "exoManaged": {
            "type": "boolean"
          },
          "importEnabled": {
            "type": "boolean"
          },
          "configurationErrors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "summary": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockOnboardingSummary"
              }
            ],
            "nullable": true
          },
          "notDone": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockOnboardingNotDone"
            },
            "nullable": true
          },
          "renamedItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockOnboardingItem"
            },
            "nullable": true
          },
          "renamedVariants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockOnboardingItem"
            },
            "nullable": true
          },
          "openCandidates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockOnboardingItem"
            },
            "nullable": true
          },
          "matching": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockMatchRunReport"
              }
            ],
            "nullable": true
          },
          "rename": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockCodeRenameReport"
              }
            ],
            "nullable": true
          },
          "history": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockCodeHistoryReport"
              }
            ],
            "nullable": true
          },
          "import": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockImportReport"
              }
            ],
            "nullable": true
          },
          "bestGuess": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockBestGuessReport"
              }
            ],
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockOnboardingStage": {
        "enum": [
          "Matching",
          "Review",
          "Rename",
          "History",
          "Import",
          "Retirement"
        ],
        "type": "string"
      },
      "Codewolf_StockManagers_Shared_Classes_StockOnboardingSummary": {
        "type": "object",
        "properties": {
          "itemsLinked": {
            "type": "integer",
            "format": "int32"
          },
          "variantsLinked": {
            "type": "integer",
            "format": "int32"
          },
          "itemsRenamed": {
            "type": "integer",
            "format": "int32"
          },
          "variantsRenamed": {
            "type": "integer",
            "format": "int32"
          },
          "candidatesOpen": {
            "type": "integer",
            "format": "int32"
          },
          "itemsAutoApproved": {
            "type": "integer",
            "format": "int32"
          },
          "itemsToJudge": {
            "type": "integer",
            "format": "int32"
          },
          "itemsCreated": {
            "type": "integer",
            "format": "int32"
          },
          "variantsCreated": {
            "type": "integer",
            "format": "int32"
          },
          "productsHeldForMatching": {
            "type": "integer",
            "format": "int32"
          },
          "productsCategoryNotImported": {
            "type": "integer",
            "format": "int32"
          },
          "importRejections": {
            "type": "integer",
            "format": "int32"
          },
          "historyRowsRewritten": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockRenameState": {
        "enum": [
          "None",
          "NotLinked",
          "Pending",
          "Renamed"
        ],
        "type": "string"
      },
      "Codewolf_StockManagers_Shared_Classes_StockRetirementAction": {
        "type": "object",
        "properties": {
          "stockMatchCandidateId": {
            "type": "integer",
            "format": "int64"
          },
          "stockItemId": {
            "type": "integer",
            "format": "int32"
          },
          "stockCode": {
            "type": "string",
            "nullable": true
          },
          "verdict": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockMatchVerdict"
              }
            ]
          },
          "applied": {
            "type": "boolean"
          },
          "deferred": {
            "type": "boolean"
          },
          "reason": {
            "type": "string",
            "nullable": true
          },
          "variantsRetired": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "renamed": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockCodeRenamed"
            },
            "nullable": true
          },
          "variantsExcepted": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "itemRetired": {
            "type": "boolean"
          },
          "mapEntries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockCodeMapEntry"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockRetirementReport": {
        "type": "object",
        "properties": {
          "supplierId": {
            "type": "integer",
            "format": "int32"
          },
          "dryRun": {
            "type": "boolean"
          },
          "ran": {
            "type": "boolean"
          },
          "configurationErrors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "exoManaged": {
            "type": "boolean"
          },
          "applied": {
            "type": "integer",
            "format": "int32"
          },
          "deferred": {
            "type": "integer",
            "format": "int32"
          },
          "failed": {
            "type": "integer",
            "format": "int32"
          },
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockRetirementAction"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockVariantCodeChange": {
        "type": "object",
        "properties": {
          "stockItemId": {
            "type": "integer",
            "format": "int32"
          },
          "stockVariantId": {
            "type": "integer",
            "format": "int32"
          },
          "oldVariantCode": {
            "type": "string",
            "nullable": true
          },
          "newVariantCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Codewolf_StockManagers_Shared_Classes_StockVariantCodeRenameAction": {
        "type": "object",
        "properties": {
          "stockVariantId": {
            "type": "integer",
            "format": "int32"
          },
          "oldVariantCode": {
            "type": "string",
            "nullable": true
          },
          "newVariantCode": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Codewolf_StockManagers_Shared_Classes_StockCodeRenameStatus"
              }
            ]
          },
          "reason": {
            "type": "string",
            "nullable": true
          },
          "applied": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "HttpValidationProblemDetails": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ProblemDetails"
          }
        ],
        "properties": {
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "IPagedDataOf1Codewolf_Ctrl_Api_Dto_PriceTierDto": {
        "type": "object",
        "properties": {
          "currentPage": {
            "type": "integer",
            "format": "int32"
          },
          "entities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_PriceTierDto"
            },
            "nullable": true
          },
          "hasNext": {
            "type": "boolean"
          },
          "hasPrevious": {
            "type": "boolean"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "returnedResults": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "totalResults": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "IPagedDataOf1Codewolf_Ctrl_Api_Dto_TagHandleDto": {
        "type": "object",
        "properties": {
          "currentPage": {
            "type": "integer",
            "format": "int32"
          },
          "entities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_TagHandleDto"
            },
            "nullable": true
          },
          "hasNext": {
            "type": "boolean"
          },
          "hasPrevious": {
            "type": "boolean"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "returnedResults": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "totalResults": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "PagedDataOf1Codewolf_Ctrl_Api_Dto_Api_AccountUserSummary": {
        "type": "object",
        "properties": {
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "returnedResults": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "totalResults": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "currentPage": {
            "type": "integer",
            "format": "int32"
          },
          "hasNext": {
            "type": "boolean"
          },
          "hasPrevious": {
            "type": "boolean"
          },
          "filter": {
            "type": "string",
            "nullable": true
          },
          "nextUrl": {
            "type": "string",
            "nullable": true
          },
          "previousUrl": {
            "type": "string",
            "nullable": true
          },
          "entities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_AccountUserSummary"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PagedDataOf1Codewolf_Ctrl_Api_Dto_Api_PaymentTransaction": {
        "type": "object",
        "properties": {
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "returnedResults": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "totalResults": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "currentPage": {
            "type": "integer",
            "format": "int32"
          },
          "hasNext": {
            "type": "boolean"
          },
          "hasPrevious": {
            "type": "boolean"
          },
          "filter": {
            "type": "string",
            "nullable": true
          },
          "nextUrl": {
            "type": "string",
            "nullable": true
          },
          "previousUrl": {
            "type": "string",
            "nullable": true
          },
          "entities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_PaymentTransaction"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PagedDataOf1Codewolf_Ctrl_Api_Dto_Api_ShipmentAddressDto": {
        "type": "object",
        "properties": {
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "returnedResults": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "totalResults": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "currentPage": {
            "type": "integer",
            "format": "int32"
          },
          "hasNext": {
            "type": "boolean"
          },
          "hasPrevious": {
            "type": "boolean"
          },
          "filter": {
            "type": "string",
            "nullable": true
          },
          "nextUrl": {
            "type": "string",
            "nullable": true
          },
          "previousUrl": {
            "type": "string",
            "nullable": true
          },
          "entities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dto_Api_ShipmentAddressDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PagedDataOf1Codewolf_Ctrl_Api_Dtos_Api_AssetListDto": {
        "type": "object",
        "properties": {
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "returnedResults": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "totalResults": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "currentPage": {
            "type": "integer",
            "format": "int32"
          },
          "hasNext": {
            "type": "boolean"
          },
          "hasPrevious": {
            "type": "boolean"
          },
          "filter": {
            "type": "string",
            "nullable": true
          },
          "nextUrl": {
            "type": "string",
            "nullable": true
          },
          "previousUrl": {
            "type": "string",
            "nullable": true
          },
          "entities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Codewolf_Ctrl_Api_Dtos_Api_AssetListDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "ProcessNumericAttributeOf1T": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Codewolf_Ctrl_Common_Classes_Pricing_ProcessAttribute"
          }
        ],
        "properties": {
          "minValue": {
            "allOf": [
              {
                "$ref": "#/components/schemas/T"
              }
            ],
            "description": "Minimum value for number",
            "nullable": true
          },
          "maxValue": {
            "allOf": [
              {
                "$ref": "#/components/schemas/T"
              }
            ],
            "description": "max number for number value",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Text attribute for Process"
      },
      "T": {
        "type": "object",
        "additionalProperties": false
      },
      "ValidationProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "nullable": true
          }
        },
        "additionalProperties": { }
      }
    },
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "description": "OAuth2 Client Credentials flow. Enter your client_id and client_secret in the Authorize dialog.",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "/api/auth/token",
            "scopes": { }
          }
        }
      },
      "Bearer": {
        "type": "apiKey",
        "description": "JWT Authorization header using the Bearer scheme.\n                      Enter 'Bearer' [space] and then your token in the text input below.\n                      Example: 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...'",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "oauth2": [ ]
    },
    {
      "Bearer": [ ]
    }
  ],
  "tags": [
    {
      "name": "Account",
      "description": "Account management endpoints"
    },
    {
      "name": "Assets",
      "description": "Assets end-points - used to get Asset data"
    },
    {
      "name": "BomItems",
      "description": "A BOM's composition — the garment plus its branding lines. Adding the garment generates the\r\nBOM's size run; removing it cascades that run away again, which is why these live on their own\r\ncontroller rather than beside the BOM-level writes."
    },
    {
      "name": "Boms",
      "description": "Bill of Materials end-points - used to get information about pre-built bill of materials items"
    },
    {
      "name": "BomVariants",
      "description": "A BOM's size variants. Variants are generated from the garment's size set and cannot be created\r\nor deleted directly — only their customer SKU and their availability can be changed."
    },
    {
      "name": "Inwards",
      "description": "Inwards (goods-receipt) endpoints — list, get-by-id, and create."
    },
    {
      "name": "Jobs",
      "description": "Jobs end-points - used to create/manage jobs in the system"
    },
    {
      "name": "Lookups",
      "description": "Lookup data endpoints - provides reference data for dropdowns and selections"
    },
    {
      "name": "PaymentMethods",
      "description": "Payment method (credit card token) management endpoints.\r\nProvides functionality for customers to view, add, and delete saved payment methods."
    },
    {
      "name": "PriceCodes",
      "description": "Pricing end-points - used to get information about Price Codes"
    },
    {
      "name": "PromoCodes",
      "description": "Promo Code management endpoints"
    },
    {
      "name": "ShipmentAddresses",
      "description": "Saved shipment addresses for the authenticated customer."
    },
    {
      "name": "Stock",
      "description": "Stock end-points - used to get information about Stock available for Jobs"
    },
    {
      "name": "StockImport",
      "description": "Creates stock items and variants from a supplier's mirrored catalogue."
    },
    {
      "name": "StockItemShipping",
      "description": "Manages per-market shipping and fulfilment metadata for stock items.\r\nConsumed by Integrate (Shopify integration) for ship-from address resolution."
    },
    {
      "name": "StockMatching",
      "description": "Reconciles a supplier's old stock with its gateway catalogue: runs matching, and takes a\r\nreviewer's decisions on what it proposes."
    },
    {
      "name": "StockOnboarding",
      "description": "Onboards a Stock Gateway supplier in one pass: links its existing stock to the catalogue, renames the linked\r\nstock to the codes its import gives it, rewrites the history naming the old codes, then imports only the\r\nproducts no existing stock claims."
    },
    {
      "name": "StockRetirement",
      "description": "Applies approved stock match decisions that retire, replace or rename old stock, and renames\r\nlinked stock to the codes the supplier's import gives it."
    },
    {
      "name": "Tags",
      "description": "Reads the tags on jobs, quotes, inwards deliveries, assets and stock items, and adds tags to them and removes them."
    },
    {
      "name": "StockGatewaySetup",
      "description": "Sets up the tenant's Stock Gateway connection: the region, the API key and whether ingestion runs."
    },
    {
      "name": "StockGatewaySupplier",
      "description": "Sets up how one Stock Gateway supplier is ingested: whether it is, the Control supplier it is\r\npaired with, its settings, and its trade account."
    },
    {
      "name": "StockGatewaySupplierImport",
      "description": "Switches the scheduled import of a paired Stock Gateway supplier's catalogue on or off."
    },
    {
      "name": "StockGatewaySupplierList",
      "description": "Lists what the Stock Gateway setup pairs and configures: the gateway suppliers in the connected region, the\r\nControl suppliers they can be paired with, the Control values a supplier's settings can refer to, and how\r\ningestion is doing for the paired suppliers."
    },
    {
      "name": "QuoteCreate",
      "description": "Creates quotes for customers."
    },
    {
      "name": "PriceTierPricing",
      "description": "Reads and changes a price tier's category charges and quantity band prices."
    },
    {
      "name": "PriceTiers",
      "description": "Lists, changes, deletes and copies price tiers."
    },
    {
      "name": "StockGatewayPricing",
      "description": "Reads and saves a price tier's Stock Gateway pricing addendum - the rules the Stock Gateway ingestion service\r\napplies to each supplier's cost to write the tier's stock prices - and requests and follows the runs that apply\r\nor preview them."
    },
    {
      "name": "CustomerJobActions",
      "description": "Actions a customer can take on their own job."
    },
    {
      "name": "JobDispatch",
      "description": "Dispatching a job once its shipments have left."
    },
    {
      "name": "JobFiles",
      "description": "Read access to the files held against a job."
    },
    {
      "name": "JobLines",
      "description": "Change the lines of a job that has already been placed: add, change and remove lines."
    },
    {
      "name": "JobShipments",
      "description": "Shipment end-points for a job - a job can be delivered to several addresses, each its own shipment."
    },
    {
      "name": "CustomerSignup",
      "description": "Creates wholesale customers from a signup."
    },
    {
      "name": "AssetCustomerFiles",
      "description": "Reads and replaces an asset's customer file."
    },
    {
      "name": "AssetJobs",
      "description": "Lists the jobs that use an asset."
    }
  ]
}