{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0.0",
    "title": "Hub",
    "description": "Hub API"
  },
  "servers": [
    {
      "url": "https://api-hub.extensiv.com"
    }
  ],
  "tags": [
    {
      "name": "auth",
      "description": "Authentication"
    },
    {
      "name": "clientregistrations",
      "description": "Client Registrations"
    },
    {
      "name": "orgs",
      "description": "Organizations"
    },
    {
      "name": "roles",
      "description": "Roles"
    },
    {
      "name": "users",
      "description": "Users"
    }
  ],
  "components": {
    "schemas": {
      "String": {
        "type": "object",
        "properties": {}
      },
      "IProductAccess": {
        "type": "object",
        "properties": {
          "can3pl": {
            "type": "boolean",
            "description": "Can this Org access 3pl Warehouse Manager?"
          },
          "canOrderManager": {
            "type": "boolean",
            "description": "Can this Org access Order Manager Web?"
          },
          "canWarehouseManagerClassicAdmin": {
            "type": "boolean",
            "description": "Can this Org access Warehouse Manager Classic Admin?"
          },
          "canWarehouseManagerUnlimitedAdmin": {
            "type": "boolean",
            "description": "Can this Org access Warehouse Manager Unlimitedd Admin?"
          },
          "canWarehouseManagerCustomerPortal": {
            "type": "boolean",
            "description": "Can this Org access Warehouse Manager Customer Portal?"
          },
          "canWarehouseManagerIntegrations": {
            "type": "boolean",
            "description": "Can this Org access Warehouse Manager Integrations?"
          },
          "canWarehouseManagerMobile": {
            "type": "boolean",
            "description": "Can this Org access Warehouse Manager Mobile?"
          },
          "canWarehouseManagerAccountManager": {
            "type": "boolean",
            "description": "Can this Org access Warehouse Manager Account Manager?"
          },
          "canIntegrationManager": {
            "type": "boolean",
            "description": "Can this Org access Integration Manager?"
          },
          "canBilling": {
            "type": "boolean",
            "description": "Can this Org access Billing?"
          },
          "canNetworkManager": {
            "type": "boolean",
            "description": "Can this Org access Network Manager?"
          },
          "canSignUp": {
            "type": "boolean",
            "description": "Can this Org access 3pl Warehouse Manager Sign Up?"
          },
          "canManagementConsole": {
            "type": "boolean",
            "description": "Can this Org access Management Console?"
          },
          "canAdmin": {
            "type": "boolean",
            "description": "Can this Org access Admin?"
          },
          "canFM": {
            "type": "boolean",
            "description": "Can this Org access Fulfilment?"
          },
          "canSmartScan": {
            "type": "boolean",
            "description": "Can this Org access SmartScan?"
          },
          "canAccountingIntegration": {
            "type": "boolean",
            "description": "Can this Org access Accounting Integration?"
          },
          "canBusinessAnalytics": {
            "type": "boolean",
            "description": "Can this Org access Business Analytics?"
          },
          "canAI": {
            "type": "boolean",
            "description": "Can this Org access AI?"
          }
        }
      },
      "IAppPermissions": {
        "type": "object",
        "required": [
          "perms",
          "fplperms"
        ],
        "properties": {
          "perms": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "fplperms": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "IClientRegistration": {
        "type": "object",
        "required": [
          "orgKey",
          "productAccess",
          "permissions",
          "created",
          "referrerHosts"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Leave empty to allow the system to assign a uuid",
            "format": "uuid"
          },
          "secret": {
            "type": "string",
            "description": "System assigned - will only be returned once in the create response",
            "format": "uuid"
          },
          "orgKey": {
            "type": "string",
            "format": "uuid"
          },
          "productAccess": {
            "$ref": "#/components/schemas/IProductAccess"
          },
          "permissions": {
            "$ref": "#/components/schemas/IAppPermissions"
          },
          "created": {
            "type": "number",
            "description": "System assigned on create - just pass 0 or anything on create"
          },
          "referrerHosts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "expirationDate": {
            "type": "number",
            "nullable": true,
            "description": "Setting to null will remove the expiration date"
          }
        }
      },
      "IOrgSettings": {
        "type": "object",
        "properties": {
          "aiLogoImage": {
            "type": "string",
            "format": "uri",
            "nullable": true
          },
          "aiThemeColor": {
            "type": "string",
            "nullable": true
          },
          "aiTier": {
            "type": "string",
            "enum": [
              "Free",
              "Paid"
            ],
            "nullable": true
          },
          "favorites": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "IProductsID": {
        "type": "object",
        "properties": {
          "tplId": {
            "type": "number"
          },
          "tplGuid": {
            "type": "string",
            "description": "ID from 3W"
          },
          "warehouseManagerCustomerID": {
            "type": "string",
            "description": "ID from WM"
          },
          "integrationManagerAccountID": {
            "type": "string",
            "description": "ID from IM"
          },
          "orderManagerCompanyID": {
            "type": "string",
            "description": "ID from OM"
          }
        }
      },
      "IAppIdType": {
        "type": "object",
        "required": [
          "name",
          "id",
          "disabled"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "disabled": {
            "type": "boolean"
          }
        }
      },
      "IProductIDs": {
        "type": "object",
        "properties": {
          "imIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IAppIdType"
            }
          }
        }
      },
      "IOrgSecurity": {
        "type": "object",
        "required": [
          "mfaEnabled"
        ],
        "properties": {
          "mfaEnabled": {
            "type": "boolean"
          }
        }
      },
      "IOrganization": {
        "type": "object",
        "required": [
          "key",
          "displayName"
        ],
        "properties": {
          "key": {
            "type": "string",
            "format": "uuid"
          },
          "displayName": {
            "type": "string"
          },
          "extensivId": {
            "type": "string",
            "description": "System assigned on create"
          },
          "salesForceCustomerId": {
            "type": "string"
          },
          "isInternalTestOrg": {
            "type": "boolean"
          },
          "ownerUserEmail": {
            "type": "string",
            "format": "email"
          },
          "isSuperOrg": {
            "type": "boolean"
          },
          "isC2": {
            "type": "boolean"
          },
          "isEssential": {
            "type": "boolean"
          },
          "logo": {
            "type": "string",
            "format": "uri"
          },
          "loginContent": {
            "type": "string",
            "format": "uri"
          },
          "phoneNumber": {
            "type": "string"
          },
          "settings": {
            "$ref": "#/components/schemas/IOrgSettings"
          },
          "productAccess": {
            "$ref": "#/components/schemas/IProductAccess"
          },
          "productsID": {
            "$ref": "#/components/schemas/IProductsID"
          },
          "productIDs": {
            "$ref": "#/components/schemas/IProductIDs"
          },
          "security": {
            "$ref": "#/components/schemas/IOrgSecurity"
          }
        }
      },
      "IOrgUpdateProductIdsRequest": {
        "type": "object",
        "properties": {
          "productsID": {
            "$ref": "#/components/schemas/IProductsID"
          },
          "productIDs": {
            "$ref": "#/components/schemas/IProductIDs"
          }
        }
      },
      "IOrgFeatureFlags": {
        "additionalProperties": {
          "type": "string"
        },
        "type": "object",
        "properties": {}
      },
      "IFeatureFlags": {
        "type": "object",
        "required": [
          "values"
        ],
        "properties": {
          "names": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "values": {
            "additionalProperties": {
              "$ref": "#/components/schemas/IOrgFeatureFlags"
            }
          }
        }
      },
      "OpenSearchResult-IOrganization": {
        "type": "object",
        "required": [
          "count",
          "items"
        ],
        "properties": {
          "count": {
            "type": "number",
            "description": "Total results"
          },
          "searchAfter": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IOrganization"
            }
          }
        }
      },
      "IRole": {
        "type": "object",
        "required": [
          "id",
          "orgKey",
          "name",
          "description",
          "creationdate",
          "permissions"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "orgKey": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "creationdate": {
            "type": "number"
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "IOrgUserSecurity": {
        "type": "object",
        "required": [
          "mfaEnabled"
        ],
        "properties": {
          "mfaEnabled": {
            "type": "boolean"
          }
        }
      },
      "IExternalUser": {
        "type": "object",
        "required": [
          "customerIds",
          "loginUserName"
        ],
        "properties": {
          "userId": {
            "type": "string"
          },
          "roleIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "legacyRoleIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "facilityIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "customerIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "loginUserName": {
            "type": "string"
          }
        }
      },
      "IUserSettings": {
        "type": "object",
        "properties": {
          "displayLanguage": {
            "type": "string"
          }
        }
      },
      "CreateUserBody": {
        "type": "object",
        "required": [
          "orgKey",
          "userId",
          "defaultAppName",
          "id",
          "email"
        ],
        "properties": {
          "orgKey": {
            "type": "string",
            "format": "uuid"
          },
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "warehouseManagerUserId": {
            "type": "integer"
          },
          "tplUserId": {
            "type": "string"
          },
          "integrationManagerUserId": {
            "type": "string"
          },
          "orderManagerUserId": {
            "type": "string"
          },
          "defaultAppName": {
            "type": "string",
            "enum": [
              "Hub",
              "Billing",
              "3PLWarehouseManager",
              "OrderManager",
              "NetworkManager",
              "IntegrationManager",
              "WarehouseManagerClassicAdmin",
              "WarehouseManagerUnlimitedAdmin",
              "WarehouseManagerCustomerPortal",
              "WarehouseManagerIntegrations",
              "WarehouseManagerMobile",
              "WarehouseManagerAccountManager",
              "Signup",
              "ManagementConsole",
              "Admin",
              "FulfillmentMarketplace",
              "SmartScan",
              "AccountingIntegration",
              "BusinessAnalytics",
              "AI"
            ],
            "description": "What App the user will be redirected to when they log in"
          },
          "jobTitle": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the user's role"
          },
          "productAccess": {
            "$ref": "#/components/schemas/IProductAccess"
          },
          "security": {
            "$ref": "#/components/schemas/IOrgUserSecurity"
          },
          "externalUsers": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/IExternalUser"
            }
          },
          "isC2": {
            "type": "boolean"
          },
          "lastLoginTimestamp": {
            "type": "number"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "defaultOrgKey": {
            "type": "string",
            "format": "uuid",
            "description": "Organization selected when the user logs in"
          },
          "status": {
            "type": "string",
            "enum": [
              "UNCONFIRMED",
              "CONFIRMED",
              "ARCHIVED",
              "COMPROMISED",
              "UNKNOWN",
              "RESET_REQUIRED",
              "FORCE_CHANGE_PASSWORD"
            ]
          },
          "isSuperUser": {
            "type": "boolean"
          },
          "image": {
            "type": "string",
            "format": "uri"
          },
          "settings": {
            "$ref": "#/components/schemas/IUserSettings"
          },
          "tempPassword": {
            "type": "string",
            "description": "Custom temporary password. If not specified, a random password will be generated."
          },
          "prompts": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of OrgPrompt IDs to populate the user's prompts"
          }
        }
      },
      "IUser": {
        "type": "object",
        "required": [
          "orgKey",
          "userId",
          "defaultAppName",
          "id",
          "email"
        ],
        "properties": {
          "orgKey": {
            "type": "string",
            "format": "uuid"
          },
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "warehouseManagerUserId": {
            "type": "integer"
          },
          "tplUserId": {
            "type": "string"
          },
          "integrationManagerUserId": {
            "type": "string"
          },
          "orderManagerUserId": {
            "type": "string"
          },
          "defaultAppName": {
            "type": "string",
            "enum": [
              "Hub",
              "Billing",
              "3PLWarehouseManager",
              "OrderManager",
              "NetworkManager",
              "IntegrationManager",
              "WarehouseManagerClassicAdmin",
              "WarehouseManagerUnlimitedAdmin",
              "WarehouseManagerCustomerPortal",
              "WarehouseManagerIntegrations",
              "WarehouseManagerMobile",
              "WarehouseManagerAccountManager",
              "Signup",
              "ManagementConsole",
              "Admin",
              "FulfillmentMarketplace",
              "SmartScan",
              "AccountingIntegration",
              "BusinessAnalytics",
              "AI"
            ],
            "description": "What App the user will be redirected to when they log in"
          },
          "jobTitle": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the user's role"
          },
          "productAccess": {
            "$ref": "#/components/schemas/IProductAccess"
          },
          "security": {
            "$ref": "#/components/schemas/IOrgUserSecurity"
          },
          "externalUsers": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/IExternalUser"
            }
          },
          "isC2": {
            "type": "boolean"
          },
          "lastLoginTimestamp": {
            "type": "number"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "defaultOrgKey": {
            "type": "string",
            "format": "uuid",
            "description": "Organization selected when the user logs in"
          },
          "status": {
            "type": "string",
            "enum": [
              "UNCONFIRMED",
              "CONFIRMED",
              "ARCHIVED",
              "COMPROMISED",
              "UNKNOWN",
              "RESET_REQUIRED",
              "FORCE_CHANGE_PASSWORD"
            ]
          },
          "isSuperUser": {
            "type": "boolean"
          },
          "image": {
            "type": "string",
            "format": "uri"
          },
          "settings": {
            "$ref": "#/components/schemas/IUserSettings"
          }
        }
      },
      "IUsersToInvite": {
        "type": "object",
        "required": [
          "emails",
          "jobTitle",
          "role",
          "productAccess"
        ],
        "properties": {
          "emails": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "email"
            }
          },
          "jobTitle": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the new users' role"
          },
          "productAccess": {
            "$ref": "#/components/schemas/IProductAccess"
          },
          "tempPassword": {
            "type": "string"
          }
        }
      },
      "IUserOrgs": {
        "type": "object",
        "required": [
          "key",
          "displayName",
          "has3pl"
        ],
        "properties": {
          "key": {
            "type": "string",
            "format": "uuid"
          },
          "displayName": {
            "type": "string"
          },
          "extensivId": {
            "type": "string"
          },
          "logo": {
            "type": "string",
            "format": "uri"
          },
          "tplUserId": {
            "type": "string",
            "description": "Usually HUB_CREATED, HUB_VERIFIED or an id"
          },
          "has3pl": {
            "type": "boolean",
            "description": "Whether or not this org has 3PL set up"
          },
          "role": {
            "type": "string"
          },
          "isC2": {
            "type": "boolean"
          },
          "security": {
            "$ref": "#/components/schemas/IOrgSecurity"
          }
        }
      },
      "IExtendedUser": {
        "type": "object",
        "required": [
          "id",
          "email",
          "firstName",
          "lastName",
          "jobTitle",
          "isSuperUser",
          "orgs",
          "contextOrgApps"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "jobTitle": {
            "type": "string"
          },
          "image": {
            "type": "string",
            "format": "uri"
          },
          "isSuperUser": {
            "type": "boolean"
          },
          "orgs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IUserOrgs"
            }
          },
          "contextOrgApps": {
            "$ref": "#/components/schemas/IProductAccess"
          },
          "defaultOrgKey": {
            "type": "string"
          },
          "isC2": {
            "type": "boolean"
          },
          "settings": {
            "$ref": "#/components/schemas/IUserSettings"
          }
        }
      },
      "UserCognitoRisk": {
        "type": "object",
        "required": [
          "CompromisedCredentialsDetected",
          "RiskDecision",
          "RiskLevel"
        ],
        "properties": {
          "CompromisedCredentialsDetected": {
            "type": "string"
          },
          "RiskDecision": {
            "type": "string"
          },
          "RiskLevel": {
            "type": "string"
          }
        }
      },
      "IResendInvite": {
        "type": "object",
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "tempPassword": {
            "type": "string"
          }
        }
      },
      "IForgotPasswordResult": {
        "type": "object",
        "required": [
          "invitationResent"
        ],
        "properties": {
          "invitationResent": {
            "type": "boolean",
            "description": "An invitation e-mail was resent to the user"
          }
        }
      },
      "BulkUpdateUsersWhere": {
        "type": "object",
        "properties": {
          "orgKey": {
            "type": "string",
            "description": "Either orgKey or extensivId must be supplied",
            "nullable": true
          },
          "extensivId": {
            "type": "string",
            "description": "Either orgKey or extensivId must be supplied",
            "nullable": true
          },
          "isC2": {
            "type": "boolean",
            "nullable": true
          },
          "roleIds": {
            "type": "array",
            "items": {
              "type": "string",
              "nullable": true
            }
          },
          "productAccess": {
            "$ref": "#/components/schemas/IProductAccess"
          }
        }
      },
      "BulkUpdateUsersUpdate": {
        "type": "object",
        "properties": {
          "roleId": {
            "type": "string"
          },
          "productAccess": {
            "$ref": "#/components/schemas/IProductAccess"
          },
          "externalRoleIds": {
            "nullable": true,
            "type": "object",
            "properties": {
              "can3pl": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "canOrderManager": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "canWarehouseManagerClassicAdmin": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "canWarehouseManagerUnlimitedAdmin": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "canWarehouseManagerCustomerPortal": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "canWarehouseManagerIntegrations": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "canWarehouseManagerMobile": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "canWarehouseManagerAccountManager": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "canIntegrationManager": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "canBilling": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "canNetworkManager": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "canSignUp": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "canManagementConsole": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "canAdmin": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "canFM": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "canSmartScan": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "canAccountingIntegration": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "canBusinessAnalytics": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "canAI": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "BulkUpdateUsersRequest": {
        "type": "object",
        "required": [
          "where",
          "update"
        ],
        "properties": {
          "where": {
            "$ref": "#/components/schemas/BulkUpdateUsersWhere"
          },
          "update": {
            "$ref": "#/components/schemas/BulkUpdateUsersUpdate"
          },
          "dryRun": {
            "type": "boolean"
          }
        }
      }
    },
    "securitySchemes": {
      "cognitoJwtAuthorizer": {
        "description": "cognitoJwtAuthorizer",
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "salesForceJwtAuthorizer": {
        "description": "salesForceJwtAuthorizer",
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "paths": {
    "/auth/token": {
      "get": {
        "summary": "getToken",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/String"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Returns an auth token",
        "parameters": [
          {
            "name": "orgkey",
            "in": "query",
            "description": "One of these path parameters is required",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "extensivid",
            "in": "query",
            "description": "One of these path parameters is required",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "tplguid",
            "in": "query",
            "description": "One of these path parameters is required",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "tplid",
            "in": "query",
            "description": "One of these path parameters is required",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "warehousemanagercustomerid",
            "in": "query",
            "description": "One of these path parameters is required",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "integrationmanageraccountid",
            "in": "query",
            "description": "One of these path parameters is required",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "ordermanagercompanyid",
            "in": "query",
            "description": "One of these path parameters is required",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "isc2user",
            "in": "query",
            "description": "Whether the token should have isc2user = true or false",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "required": false
          }
        ],
        "tags": [
          "auth"
        ]
      }
    },
    "/clientregistrations/{id}": {
      "get": {
        "summary": "getClientRegistration",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/IClientRegistration"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Returns a Client Registration by id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID of the desired Client Registration record",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "clientregistrations"
        ]
      },
      "delete": {
        "summary": "deleteClientRegistration",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Deletes an existing Client Registration",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID of the desired Client Registration record",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "clientregistrations"
        ]
      }
    },
    "/clientregistrations/": {
      "post": {
        "summary": "addClientRegistration",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/IClientRegistration"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Creates a Client Registration",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IClientRegistration"
              }
            }
          }
        },
        "tags": [
          "clientregistrations"
        ]
      },
      "put": {
        "summary": "updateClientRegistration",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/IClientRegistration"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Updates an existing Client Registration",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IClientRegistration"
              }
            }
          }
        },
        "tags": [
          "clientregistrations"
        ]
      }
    },
    "/clientregistrations/list/{orgkey}": {
      "get": {
        "summary": "getClientRegistrationList",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/IClientRegistration"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Lists all Client Registrations",
        "parameters": [
          {
            "name": "orgkey",
            "in": "path",
            "description": "The orgKey of the desired Client Registration records",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "clientregistrations"
        ]
      }
    },
    "/orgs/settings": {
      "get": {
        "summary": "getOrgSettings",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/IOrgSettings"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Returns settings for the context organization",
        "parameters": [],
        "tags": [
          "orgs"
        ]
      }
    },
    "/orgs/{orgkey}": {
      "get": {
        "summary": "getOrganization",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/IOrganization"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Returns an organization - pass current for context org",
        "parameters": [
          {
            "in": "path",
            "name": "orgkey",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "orgs"
        ]
      },
      "put": {
        "summary": "updateOrganization",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/IOrganization"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Updates an existing organization",
        "parameters": [
          {
            "in": "path",
            "name": "orgkey",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IOrganization"
              }
            }
          }
        },
        "tags": [
          "orgs"
        ]
      },
      "delete": {
        "summary": "deleteOrganization",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Deletes an existing organization",
        "parameters": [
          {
            "in": "path",
            "name": "orgkey",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "orgs"
        ]
      }
    },
    "/orgs/": {
      "get": {
        "summary": "getOrganizationList",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/IOrganization"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Lists all organizations",
        "parameters": [],
        "tags": [
          "orgs"
        ]
      },
      "post": {
        "summary": "addOrganization",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/IOrganization"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Creates an organization",
        "parameters": [
          {
            "name": "publishorgcreatedevent",
            "in": "query",
            "description": "If false,  bypasses sync service notification",
            "schema": {
              "type": "boolean"
            },
            "required": false
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IOrganization"
              }
            }
          }
        },
        "tags": [
          "orgs"
        ]
      }
    },
    "/orgs/{orgkey}/product-ids": {
      "put": {
        "summary": "updateProductIds",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/IOrganization"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Updates product IDs for an existing organization",
        "parameters": [
          {
            "in": "path",
            "name": "orgkey",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IOrgUpdateProductIdsRequest"
              }
            }
          }
        },
        "tags": [
          "orgs"
        ]
      }
    },
    "/orgs/search": {
      "get": {
        "summary": "searchOrganizations",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/OpenSearchResult-IOrganization"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Search organizations",
        "parameters": [
          {
            "description": "(JSON) Raw OpenSearch search body. Mutually exclusive with other params.",
            "example": "{ \"query\": { \"match_all\": {} } }",
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "(JSON) Filter object, or list of filters",
            "example": "{ \"displayName\": \"my org\", \"ownerUserEmail\": { \"$contains\": \"john\" } }",
            "name": "filter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "What operator to use to join clauses inside a filter object. For example, if filter={a: 1, b: 2} and operator1=AND, the query will be (a=1 and b=2)<br>. If operator1=OR, the query would be (a=1 or b=2).",
            "name": "operator1",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "AND",
                "OR"
              ],
              "default": "AND"
            }
          },
          {
            "description": "What operator to use to join filter objects, when a list is supplied.<br> For example, if filter=[{a: 1}, {b: 2}] and operato2=AND, the query will be (a=1 and b=2)<br>. If operator2=OR, the query would be (a=1 or b=2).",
            "name": "operator2",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "AND",
                "OR"
              ],
              "default": "AND"
            }
          },
          {
            "description": "Pagination - how many records to skip",
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Pagination - supply the value from `searchAfter` of a previous call",
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "[{ \"displayName\": \"asc\" }]",
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "maxResults",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Comma-separated list of fields to return",
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "orgs"
        ]
      }
    },
    "/orgs/{orgkey}/appinstance": {
      "post": {
        "summary": "addAppInstance",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Creates a new instance of an app",
        "parameters": [
          {
            "name": "orgkey",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "appname",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "can3pl",
                "canOrderManager",
                "canWarehouseManagerClassicAdmin",
                "canWarehouseManagerUnlimitedAdmin",
                "canWarehouseManagerCustomerPortal",
                "canWarehouseManagerIntegrations",
                "canWarehouseManagerMobile",
                "canWarehouseManagerAccountManager",
                "canIntegrationManager",
                "canBilling",
                "canNetworkManager",
                "canSignUp",
                "canManagementConsole",
                "canAdmin",
                "canFM",
                "canSmartScan",
                "canAccountingIntegration",
                "canBusinessAnalytics",
                "canAI"
              ]
            },
            "required": true
          },
          {
            "name": "appinstancename",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "orgs"
        ]
      },
      "delete": {
        "summary": "disableAppInstance",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "204": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Disables an instance of an app",
        "parameters": [
          {
            "name": "orgkey",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "appname",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "can3pl",
                "canOrderManager",
                "canWarehouseManagerClassicAdmin",
                "canWarehouseManagerUnlimitedAdmin",
                "canWarehouseManagerCustomerPortal",
                "canWarehouseManagerIntegrations",
                "canWarehouseManagerMobile",
                "canWarehouseManagerAccountManager",
                "canIntegrationManager",
                "canBilling",
                "canNetworkManager",
                "canSignUp",
                "canManagementConsole",
                "canAdmin",
                "canFM",
                "canSmartScan",
                "canAccountingIntegration",
                "canBusinessAnalytics",
                "canAI"
              ]
            },
            "required": true
          },
          {
            "name": "appinstanceid",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "orgs"
        ]
      },
      "put": {
        "summary": "updateAppInstance",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Renames an instance of an app, and optionally enables it",
        "parameters": [
          {
            "name": "orgkey",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "appname",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "can3pl",
                "canOrderManager",
                "canWarehouseManagerClassicAdmin",
                "canWarehouseManagerUnlimitedAdmin",
                "canWarehouseManagerCustomerPortal",
                "canWarehouseManagerIntegrations",
                "canWarehouseManagerMobile",
                "canWarehouseManagerAccountManager",
                "canIntegrationManager",
                "canBilling",
                "canNetworkManager",
                "canSignUp",
                "canManagementConsole",
                "canAdmin",
                "canFM",
                "canSmartScan",
                "canAccountingIntegration",
                "canBusinessAnalytics",
                "canAI"
              ]
            },
            "required": true
          },
          {
            "name": "appinstanceid",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "appinstancename",
            "in": "query",
            "description": "New name for this app instance",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "enable",
            "in": "query",
            "description": "Enable this instance",
            "schema": {
              "type": "boolean"
            },
            "required": false
          }
        ],
        "tags": [
          "orgs"
        ]
      }
    },
    "/roles/{id}": {
      "get": {
        "summary": "getRole",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/IRole"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Returns a role",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orgkey",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Can only be specified by superusers. Will be the context org if not specified",
            "required": false
          }
        ],
        "tags": [
          "roles"
        ]
      },
      "put": {
        "summary": "updateRole",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/IRole"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Updates a role",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orgkey",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Can only be specified by superusers. Will be the context org if not specified",
            "required": false
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IRole"
              }
            }
          }
        },
        "tags": [
          "roles"
        ]
      },
      "delete": {
        "summary": "deleteRole",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "204": {
            "description": "Role deleted successfully"
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Deletes a role",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orgkey",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Can only be specified by superusers. Will be the context org if not specified",
            "required": false
          }
        ],
        "tags": [
          "roles"
        ]
      }
    },
    "/roles/": {
      "post": {
        "summary": "addRole",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/IRole"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Creates a role",
        "parameters": [
          {
            "name": "orgkey",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Can only be specified by superusers. Will be the context org if not specified",
            "required": false
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IRole"
              }
            }
          }
        },
        "tags": [
          "roles"
        ]
      },
      "get": {
        "summary": "getRoles",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/IRole"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Returns all roles for an organization",
        "parameters": [
          {
            "name": "orgkey",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Can only be specified by superusers. Will be the context org if not specified",
            "required": false
          }
        ],
        "tags": [
          "roles"
        ]
      }
    },
    "/users/": {
      "post": {
        "summary": "createUser",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/IUser"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Creates a user and sends an email invitation",
        "parameters": [
          {
            "name": "publishusercreatedevent",
            "in": "query",
            "description": "If false,  bypasses sync service notification",
            "schema": {
              "type": "boolean"
            },
            "required": false
          },
          {
            "name": "temppassword",
            "in": "query",
            "description": "Custom temporary password. If not specified, a random password will be generated.",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "orgkey",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Can only be specified by superusers. Will be the context org if not specified",
            "required": false
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserBody"
              }
            }
          }
        },
        "tags": [
          "users"
        ]
      },
      "get": {
        "summary": "getUserList",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/IUser"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Lists users",
        "parameters": [
          {
            "name": "appName",
            "in": "query",
            "description": "Only return users that have this app access",
            "schema": {
              "type": "string",
              "enum": [
                "can3pl",
                "canOrderManager",
                "canWarehouseManagerClassicAdmin",
                "canWarehouseManagerUnlimitedAdmin",
                "canWarehouseManagerCustomerPortal",
                "canWarehouseManagerIntegrations",
                "canWarehouseManagerMobile",
                "canWarehouseManagerAccountManager",
                "canIntegrationManager",
                "canBilling",
                "canNetworkManager",
                "canSignUp",
                "canManagementConsole",
                "canAdmin",
                "canFM",
                "canSmartScan",
                "canAccountingIntegration",
                "canBusinessAnalytics",
                "canAI"
              ]
            }
          },
          {
            "name": "orgkey",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Can only be specified by superusers. Will be the context org if not specified",
            "required": false
          }
        ],
        "tags": [
          "users"
        ]
      }
    },
    "/users/invite": {
      "post": {
        "summary": "inviteUsers",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/IUser"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Creates users and sends email invitations",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IUsersToInvite"
              }
            }
          }
        },
        "tags": [
          "users"
        ]
      }
    },
    "/users/{id}": {
      "get": {
        "summary": "getUserProfile",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/IUser"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Returns a user's profile",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orgkey",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Can only be specified by superusers. Will be the context org if not specified",
            "required": false
          }
        ],
        "tags": [
          "users"
        ]
      },
      "put": {
        "summary": "updateUserProfile",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/IUser"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Updates a user's profile",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orgkey",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Can only be specified by superusers. Will be the context org if not specified",
            "required": false
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IUser"
              }
            }
          }
        },
        "tags": [
          "users"
        ]
      },
      "delete": {
        "summary": "removeUser",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "204": {
            "description": "The user has been removed successfully"
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Removes a user",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "users"
        ]
      }
    },
    "/users/{id}/info": {
      "get": {
        "summary": "getUserInfo",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/IExtendedUser"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Returns extended info for a user, including all orgs they have access to",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orgkey",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Can only be specified by superusers. Will be the context org if not specified",
            "required": false
          }
        ],
        "tags": [
          "users"
        ]
      }
    },
    "/users/{id}/risk": {
      "put": {
        "summary": "updateUserRiskAndResetPassword",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "200": {
            "description": "The user risk was updated and a password reset has been sent"
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Resets the user's risk info in Cognito and also sends a password reset.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "users"
        ]
      },
      "get": {
        "summary": "getUserRisk",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/UserCognitoRisk"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Returns the user's risk information in Cognito",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "users"
        ]
      }
    },
    "/users/{id}/role": {
      "delete": {
        "summary": "removeUserRole",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "204": {
            "description": "The role has been removed successfully"
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Removes a user's role in the current organization",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orgkey",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Can only be specified by superusers. Will be the context org if not specified",
            "required": false
          }
        ],
        "tags": [
          "users"
        ]
      }
    },
    "/users/{id}/org/{orgId}": {
      "delete": {
        "summary": "removeOrgUser",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "204": {
            "description": "The user has been removed successfully"
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Removes a user from an organization",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "orgId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "users"
        ]
      }
    },
    "/users/resend-invite": {
      "put": {
        "summary": "resendInvite",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "200": {
            "description": "The invite has been resent"
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Resends an email invitation to a user",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IResendInvite"
              }
            }
          }
        },
        "tags": [
          "users"
        ]
      }
    },
    "/users/forgot-password": {
      "put": {
        "summary": "forgotPassword",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/IForgotPasswordResult"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Sends a password reset email if the user is confirmed, otherwise resends the invitation",
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "users"
        ]
      }
    },
    "/users/{id}/security": {
      "post": {
        "summary": "updateUserSecurity",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Updates User MFA Option",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orgkey",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Can only be specified by superusers. Will be the context org if not specified",
            "required": false
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IOrgUserSecurity"
              }
            }
          }
        },
        "tags": [
          "users"
        ]
      }
    },
    "/users/{id}/settings": {
      "post": {
        "summary": "updateUserSettings",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Updates User Settings",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orgkey",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Can only be specified by superusers. Will be the context org if not specified",
            "required": false
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IUserSettings"
              }
            }
          }
        },
        "tags": [
          "users"
        ]
      }
    },
    "/users/syncExternalUsers": {
      "post": {
        "summary": "syncExternalUsersForOrgs",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "200": {
            "description": "List of migrated user emails",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Resync external users for specified organizations",
        "parameters": [
          {
            "name": "orgIds",
            "in": "query",
            "description": "Comma-separated list of organization IDs to sync (max 100)",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "users"
        ]
      }
    },
    "/users/update-where": {
      "post": {
        "summary": "bulkUpdateUsers",
        "security": [
          {
            "cognitoJwtAuthorizer": []
          }
        ],
        "responses": {
          "200": {
            "description": "List of updated users",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Resource does not exist<br>Invalid request<br>Validation error<br>Database constraint error"
          },
          "403": {
            "description": "Insufficient permissions"
          }
        },
        "description": "Updates multiple users in an org, based on some conditions",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkUpdateUsersRequest"
              }
            }
          }
        },
        "tags": [
          "users"
        ]
      }
    }
  }
}