Repository: moov-io/customers
Pull request #153 (2020-09-14 21:16:33)

all: record x-namespace for customers
Fixes: https://github.com/moov-io/customers/issues/146 

codecov-commenter: # [Codecov](https://codecov.io/gh/moov-io/customers/pull/153?src=pr&el=h1) Report
> Merging [#153](https://codecov.io/gh/moov-io/customers/pull/153?src=pr&el=desc) into [master](https://codecov.io/gh/moov-io/customers/commit/058152a74194a47105679154eda036cdbaaa273c?el=desc) will **decrease** coverage by `0.22%`.
> The diff coverage is `55.00%`.


```diff
@@            Coverage Diff             @@
##           master     #153      +/-   ##
==========================================
- Coverage   64.90%   64.67%   -0.23%     
==========================================
  Files          42       43       +1     
  Lines        2402     2415      +13     
==========================================
+ Hits         1559     1562       +3     
- Misses        591      596       +5     
- Partials      252      257       +5     
```


Patch:
diff --git a/README.md b/README.md
index 34c3f22..fdb09df 100644
--- a/README.md
+++ b/README.md
@@ -46,6 +46,7 @@ The following environmental variables can be set to configure behavior in Accoun
 | `HTTPS_CERT_FILE` | Filepath containing a certificate (or intermediate chain) to be served by the HTTP server. Requires all traffic be over secure HTTP. | Empty |
 | `HTTPS_KEY_FILE`  | Filepath of a private key matching the leaf certificate from `HTTPS_CERT_FILE`. | Empty |
 | `DATABASE_TYPE` | Which database option to use (Options: `sqlite`, `mysql`) | Default: `sqlite` |
+| `NAMESPACE_HEADER` | HTTP header to read for separating models and identifying their groupings. | Default: `X-Namespace` |
 
 #### Fed
 
diff --git a/api/client.yaml b/api/client.yaml
index f5a5c24..3bf0f6a 100644
--- a/api/client.yaml
+++ b/api/client.yaml
@@ -101,10 +101,10 @@ paths:
           example: rs4f9915
           schema:
             type: string
-        - name: X-User-ID
+        - name: X-Namespace
           in: header
-          description: Unique userID set by an auth proxy or client to identify and isolate objects.
-          example: e3cdf999
+          description: Value used to separate and identify models
+          example: org342
           schema:
             type: string
       requestBody:
@@ -139,10 +139,10 @@ paths:
           example: rs4f9915
           schema:
             type: string
-        - name: X-User-ID
+        - name: X-Namespace
           in: header
-          description: Unique userID set by an auth proxy or client to identify and isolate objects.
-          example: e3cdf999
+          description: Value used to separate and identify models
+          example: org342
           schema:
             type: string
         - name: customerID
@@ -180,10 +180,10 @@ paths:
           example: rs4f9915
           schema:
             type: string
-        - name: X-User-ID
+        - name: X-Namespace
           in: header
-          description: Unique userID set by an auth proxy or client to identify and isolate objects.
-          example: e3cdf999
+          description: Value used to separate and identify models
+          example: org342
           schema:
             type: string
         - name: customerID
@@ -225,10 +225,10 @@ paths:
           example: rs4f9915
           schema:
             type: string
-        - name: X-User-ID
+        - name: X-Namespace
           in: header
-          description: Unique userID set by an auth proxy or client to identify and isolate objects.
-          example: e3cdf999
+          description: Value used to separate and identify models
+          example: org342
           schema:
             type: string
         - name: customerID
@@ -270,10 +270,10 @@ paths:
           example: rs4f9915
           schema:
             type: string
-        - name: X-User-ID
+        - name: X-Namespace
           in: header
-          description: Unique userID set by an auth proxy or client to identify and isolate objects.
-          example: e3cdf999
+          description: Value used to separate and identify models
+          example: org342
           schema:
             type: string
         - name: customerID
@@ -315,10 +315,10 @@ paths:
           example: rs4f9915
           schema:
             type: string
-        - name: X-User-ID
+        - name: X-Namespace
           in: header
-          description: Unique userID set by an auth proxy or client to identify and isolate objects.
-          example: e3cdf999
+          description: Value used to separate and identify models
+          example: org342
           schema:
             type: string
         - name: customerID
@@ -353,10 +353,10 @@ paths:
           example: rs4f9915
           schema:
             type: string
-        - name: X-User-ID
+        - name: X-Namespace
           in: header
-          description: Unique userID set by an auth proxy or client to identify and isolate objects.
-          example: e3cdf999
+          description: Value used to separate and identify models
+          example: org342
           schema:
             type: string
         - name: customerID
@@ -397,10 +397,10 @@ paths:
           example: rs4f9915
           schema:
             type: string
-        - name: X-User-ID
+        - name: X-Namespace
           in: header
-          description: Unique userID set by an auth proxy or client to identify and isolate objects.
-          example: e3cdf999
+          description: Value used to separate and identify models
+          example: org342
           schema:
             type: string
         - name: customerID
@@ -433,10 +433,10 @@ paths:
           example: rs4f9915
           schema:
             type: string
-        - name: X-User-ID
+        - name: X-Namespace
           in: header
-          description: Unique userID set by an auth proxy or client to identify and isolate objects.
-          example: e3cdf999
+          description: Value used to separate and identify models
+          example: org342
           schema:
             type: string
         - name: customerID
@@ -480,10 +480,10 @@ paths:
           example: rs4f9915
           schema:
             type: string
-        - name: X-User-ID
+        - name: X-Namespace
           in: header
-          description: Unique userID set by an auth proxy or client to identify and isolate objects.
-          example: e3cdf999
+          description: Value used to separate and identify models
+          example: org342
           schema:
             type: string
         - name: customerID
@@ -540,10 +540,10 @@ paths:
           example: rs4f9915
           schema:
             type: string
-        - name: X-User-ID
+        - name: X-Namespace
           in: header
-          description: Unique userID set by an auth proxy or client to identify and isolate objects.
-          example: e3cdf999
+          description: Value used to separate and identify models
+          example: org342
           schema:
             type: string
         - name: customerID
@@ -586,10 +586,10 @@ paths:
           example: rs4f9915
           schema:
             type: string
-        - name: X-User-ID
+        - name: X-Namespace
           in: header
-          description: Unique userID set by an auth proxy or client to identify and isolate objects.
-          example: e3cdf999
+          description: Value used to separate and identify models
+          example: org342
           schema:
             type: string
         - name: customerID
@@ -673,10 +673,10 @@ paths:
           example: rs4f9915
           schema:
             type: string
-        - name: X-User-ID
+        - name: X-Namespace
           in: header
-          description: Unique userID set by an auth proxy or client to identify and isolate objects.
-          example: e3cdf999
+          description: Value used to separate and identify models
+          example: org342
           schema:
             type: string
         - name: customerID
@@ -760,10 +760,10 @@ paths:
           example: rs4f9915
           schema:
             type: string
-        - name: X-User-ID
+        - name: X-Namespace
           in: header
-          description: Unique userID set by an auth proxy or client to identify and isolate objects.
-          example: e3cdf999
+          description: Value used to separate and identify models
+          example: org342
           schema:
             type: string
         - name: customerID
@@ -843,10 +843,10 @@ paths:
           example: rs4f9915
           schema:
             type: string
-        - name: X-User-ID
+        - name: X-Namespace
           in: header
-          description: Unique userID set by an auth proxy or client to identify and isolate objects.
-          example: e3cdf999
+          description: Value used to separate and identify models
+          example: org342
           schema:
             type: string
         - name: customerID
@@ -882,10 +882,10 @@ paths:
           example: rs4f9915
           schema:
             type: string
-        - name: X-User-ID
+        - name: X-Namespace
           in: header
-          description: Unique userID set by an auth proxy or client to identify and isolate objects.
-          example: e3cdf999
+          description: Value used to separate and identify models
+          example: org342
           schema:
             type: string
         - name: customerID
@@ -928,10 +928,10 @@ paths:
           example: rs4f9915
           schema:
             type: string
-        - name: X-User-ID
+        - name: X-Namespace
           in: header
-          description: Unique userID set by an auth proxy or client to identify and isolate objects.
-          example: e3cdf999
+          description: Value used to separate and identify models
+          example: org342
           schema:
             type: string
         - name: customerID
@@ -984,10 +984,10 @@ paths:
           example: rs4f9915
           schema:
             type: string
-        - name: X-User-ID
+        - name: X-Namespace
           in: header
-          description: Unique userID set by an auth proxy or client to identify and isolate objects.
-          example: e3cdf999
+          description: Value used to separate and identify models
+          example: org342
           schema:
             type: string
         - name: customerID
@@ -1023,10 +1023,10 @@ paths:
           example: rs4f9915
           schema:
             type: string
-        - name: X-User-ID
+        - name: X-Namespace
           in: header
-          description: Unique userID set by an auth proxy or client to identify and isolate objects.
-          example: e3cdf999
+          description: Value used to separate and identify models
+          example: org342
           schema:
             type: string
         - name: customerID
@@ -1074,10 +1074,10 @@ paths:
           example: rs4f9915
           schema:
             type: string
-        - name: X-User-ID
+        - name: X-Namespace
           in: header
-          description: Unique userID set by an auth proxy or client to identify and isolate objects.
-          example: e3cdf999
+          description: Value used to separate and identify models
+          example: org342
           schema:
             type: string
         - name: customerID
@@ -1113,10 +1113,10 @@ paths:
           example: rs4f9915
           schema:
             type: string
-        - name: X-User-ID
+        - name: X-Namespace
           in: header
-          description: Unique userID set by an auth proxy or client to identify and isolate objects.
-          example: e3cdf999
+          description: Value used to separate and identify models
+          example: org342
           schema:
             type: string
         - name: customerID
diff --git a/cmd/server/customer_search.go b/cmd/server/customer_search.go
index d686f53..9b7ba58 100644
--- a/cmd/server/customer_search.go
+++ b/cmd/server/customer_search.go
@@ -20,11 +20,18 @@ func searchCustomers(logger log.Logger, repo customerRepository) http.HandlerFun
 	return func(w http.ResponseWriter, r *http.Request) {
 		w = route.Responder(logger, w, r)
 
+		namespace := route.GetNamespace(w, r)
+		if namespace == "" {
+			return
+		}
+
 		params, err := readSearchParams(r)
 		if err != nil {
 			moovhttp.Problem(w, err)
 			return
 		}
+		params.Namespace = namespace
+
 		customers, err := repo.searchCustomers(params)
 		if err != nil {
 			moovhttp.Problem(w, err)
@@ -40,12 +47,13 @@ func searchCustomers(logger log.Logger, repo customerRepository) http.HandlerFun
 }
 
 type searchParams struct {
-	Query  string
-	Email  string
-	Status string
-	Type   string
-	Skip   int64
-	Count  int64
+	Namespace string
+	Query     string
+	Email     string
+	Status    string
+	Type      string
+	Skip      int64
+	Count     int64
 }
 
 func readSearchParams(r *http.Request) (searchParams, error) {
@@ -105,7 +113,8 @@ func (r *sqlCustomerRepository) searchCustomers(params searchParams) ([]*client.
 
 func buildSearchQuery(params searchParams) (string, []interface{}) {
 	var args []interface{}
-	query := `select customer_id from customers where deleted_at is null`
+	query := `select customer_id from customers where deleted_at is null and namespace = ?`
+	args = append(args, params.Namespace)
 	if params.Query != "" {
 		query += " and lower(first_name) || \" \" || lower(last_name) LIKE ?"
 		args = append(args, "%"+params.Query+"%")
diff --git a/cmd/server/customers.go b/cmd/server/customers.go
index 0b02102..15dab83 100644
--- a/cmd/server/customers.go
+++ b/cmd/server/customers.go
@@ -204,7 +204,10 @@ func createCustomer(logger log.Logger, repo customerRepository, customerSSNStora
 		w = route.Responder(logger, w, r)
 		w.Header().Set("Content-Type", "application/json; charset=utf-8")
 
-		requestID := moovhttp.GetRequestID(r)
+		requestID, namespace := moovhttp.GetRequestID(r), route.GetNamespace(w, r)
+		if namespace == "" {
+			return
+		}
 
 		var req customerRequest
 		if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
@@ -231,10 +234,8 @@ func createCustomer(logger log.Logger, repo customerRepository, customerSSNStora
 				return
 			}
 		}
-		if err := repo.createCustomer(cust); err != nil {
-			if requestID != "" {
-				logger.Log("customers", fmt.Sprintf("createCustomer: %v", err), "requestID", requestID)
-			}
+		if err := repo.createCustomer(cust, namespace); err != nil {
+			logger.Log("customers", fmt.Sprintf("createCustomer: %v", err), "requestID", requestID)
 			moovhttp.Problem(w, err)
 			return
 		}
@@ -316,7 +317,7 @@ func addCustomerAddress(logger log.Logger, repo customerRepository) http.Handler
 
 type customerRepository interface {
 	getCustomer(customerID string) (*client.Customer, error)
-	createCustomer(c *client.Customer) error
+	createCustomer(c *client.Customer, namespace string) error
 	updateCustomerStatus(customerID string, status client.CustomerStatus, comment string) error
 
 	searchCustomers(params searchParams) ([]*client.Customer, error)
@@ -340,15 +341,15 @@ func (r *sqlCustomerRepository) close() error {
 	return r.db.Close()
 }
 
-func (r *sqlCustomerRepository) createCustomer(c *client.Customer) error {
+func (r *sqlCustomerRepository) createCustomer(c *client.Customer, namespace string) error {
 	tx, err := r.db.Begin()
 	if err != nil {
 		return err
 	}
 
 	// Insert customer record
-	query := `insert into customers (customer_id, first_name, middle_name, last_name, nick_name, suffix, type, birth_date, status, email, created_at, last_modified)
-values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);`
+	query := `insert into customers (customer_id, first_name, middle_name, last_name, nick_name, suffix, type, birth_date, status, email, created_at, last_modified, namespace)
+values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);`
 	stmt, err := tx.Prepare(query)
 	if err != nil {
 		return err
@@ -356,7 +357,7 @@ values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);`
 	defer stmt.Close()
 
 	now := time.Now()
-	_, err = stmt.Exec(c.CustomerID, c.FirstName, c.MiddleName, c.LastName, c.NickName, c.Suffix, c.Type, c.BirthDate, c.Status, c.Email, now, now)
+	_, err = stmt.Exec(c.CustomerID, c.FirstName, c.MiddleName, c.LastName, c.NickName, c.Suffix, c.Type, c.BirthDate, c.Status, c.Email, now, now, namespace)
 	if err != nil {
 		return fmt.Errorf("createCustomer: insert into customers err=%v | rollback=%v", err, tx.Rollback())
 	}
diff --git a/cmd/server/documents.go b/cmd/server/documents.go
index 0842a92..20548b7 100644
--- a/cmd/server/documents.go
+++ b/cmd/server/documents.go
@@ -83,7 +83,7 @@ func readDocumentType(v string) (string, error) {
 func uploadCustomerDocument(logger log.Logger, repo documentRepository, bucketFactory bucketFunc) http.HandlerFunc {
 	return func(w http.ResponseWriter, r *http.Request) {
 		w = route.Responder(logger, w, r)
-		// TODO(adam): should we store x-user-id along with the Document?
+		// TODO(adam): should we store x-namespace along with the Document?
 
 		documentType, err := readDocumentType(r.URL.Query().Get("type"))
 		if err != nil {
diff --git a/cmd/server/route/namespace.go b/cmd/server/route/namespace.go
new file mode 100644
index 0000000..873b3ac
--- /dev/null
+++ b/cmd/server/route/namespace.go
@@ -0,0 +1,27 @@
+// Copyright 2020 The Moov Authors
+// Use of this source code is governed by an Apache License
+// license that can be found in the LICENSE file.
+
+package route
+
+import (
+	"fmt"
+	"net/http"
+	"os"
+
+	moovhttp "github.com/moov-io/base/http"
+	"github.com/moov-io/customers/internal/util"
+)
+
+var (
+	namespaceHeaderKey = util.Or(os.Getenv("NAMESPACE_HEADER"), "X-Namespace")
+)
+
+func GetNamespace(w http.ResponseWriter, r *http.Request) string {
+	if ns := r.Header.Get(namespaceHeaderKey); ns == "" {
+		moovhttp.Problem(w, fmt.Errorf("missing %s header", namespaceHeaderKey))
+		return ""
+	} else {
+		return ns
+	}
+}
diff --git a/internal/database/mysql.go b/internal/database/mysql.go
index 0161aa5..2d48b99 100644
--- a/internal/database/mysql.go
+++ b/internal/database/mysql.go
@@ -120,6 +120,10 @@ var (
 			"create_account_ofac_searches",
 			`create table if not exists account_ofac_searches(account_ofac_search_id varchar(40) primary key, account_id varchar(40), entity_id varchar(40), sdn_name varchar(40), sdn_type integer, percentage_match double precision (5,2), created_at datetime);`,
 		),
+		execsql(
+			"add_namespace__to__customers",
+			"alter table customers add column namespace varchar(40) not null;",
+		),
 	)
 )
 
diff --git a/internal/database/sqlite.go b/internal/database/sqlite.go
index 88ffc09..552ab94 100644
--- a/internal/database/sqlite.go
+++ b/internal/database/sqlite.go
@@ -138,6 +138,10 @@ PRAGMA foreign_keys=on;`,
 			"create_account_ofac_searches",
 			`create table if not exists account_ofac_searches(account_ofac_search_id varchar(40) primary key, account_id varchar(40), entity_id varchar(40), sdn_name varchar(40), sdn_type integer, percentage_match double precision (5,2), created_at datetime);`,
 		),
+		execsql(
+			"add_namespace__to__customers",
+			"alter table customers add column namespace varchar(40) not null default 'unknown';",
+		),
 	)
 )
 
diff --git a/pkg/client/api/openapi.yaml b/pkg/client/api/openapi.yaml
index 4b818a9..01979ed 100644
--- a/pkg/client/api/openapi.yaml
+++ b/pkg/client/api/openapi.yaml
@@ -122,12 +122,11 @@ paths:
         schema:
           type: string
         style: simple
-      - description: Unique userID set by an auth proxy or client to identify and
-          isolate objects.
-        example: e3cdf999
+      - description: Value used to separate and identify models
+        example: org342
         explode: false
         in: header
-        name: X-User-ID
+        name: X-Namespace
         required: false
         schema:
           type: string
@@ -169,12 +168,11 @@ paths:
         schema:
           type: string
         style: simple
-      - description: Unique userID set by an auth proxy or client to identify and
-          isolate objects.
-        example: e3cdf999
+      - description: Value used to separate and identify models
+        example: org342
         explode: false
         in: header
-        name: X-User-ID
+        name: X-Namespace
         required: false
         schema:
           type: string
@@ -221,12 +219,11 @@ paths:
         schema:
           type: string
         style: simple
-      - description: Unique userID set by an auth proxy or client to identify and
-          isolate objects.
-        example: e3cdf999
+      - description: Value used to separate and identify models
+        example: org342
         explode: false
         in: header
-        name: X-User-ID
+        name: X-Namespace
         required: false
         schema:
           type: string
@@ -279,12 +276,11 @@ paths:
         schema:
           type: string
         style: simple
-      - description: Unique userID set by an auth proxy or client to identify and
-          isolate objects.
-        example: e3cdf999
+      - description: Value used to separate and identify models
+        example: org342
         explode: false
         in: header
-        name: X-User-ID
+        name: X-Namespace
         required: false
         schema:
           type: string
@@ -336,12 +332,11 @@ paths:
         schema:
           type: string
         style: simple
-      - description: Unique userID set by an auth proxy or client to identify and
-          isolate objects.
-        example: e3cdf999
+      - description: Value used to separate and identify models
+        example: org342
         explode: false
         in: header
-        name: X-User-ID
+        name: X-Namespace
         required: false
         schema:
           type: string
@@ -392,12 +387,11 @@ paths:
         schema:
           type: string
         style: simple
-      - description: Unique userID set by an auth proxy or client to identify and
-          isolate objects.
-        example: e3cdf999
+      - description: Value used to separate and identify models
+        example: org342
         explode: false
         in: header
-        name: X-User-ID
+        name: X-Namespace
         required: false
         schema:
           type: string
@@ -437,12 +431,11 @@ paths:
         schema:
           type: string
         style: simple
-      - description: Unique userID set by an auth proxy or client to identify and
-          isolate objects.
-        example: e3cdf999
+      - description: Value used to separate and identify models
+        example: org342
         explode: false
         in: header
-        name: X-User-ID
+        name: X-Namespace
         required: false
         schema:
           type: string
@@ -486,12 +479,11 @@ paths:
         schema:
           type: string
         style: simple
-      - description: Unique userID set by an auth proxy or client to identify and
-          isolate objects.
-        example: e3cdf999
+      - description: Value used to separate and identify models
+        example: org342
         explode: false
         in: header
-        name: X-User-ID
+        name: X-Namespace
         required: false
         schema:
           type: string
@@ -543,12 +535,11 @@ paths:
         schema:
           type: string
         style: simple
-      - description: Unique userID set by an auth proxy or client to identify and
-          isolate objects.
-        example: e3cdf999
+      - description: Value used to separate and identify models
+        example: org342
         explode: false
         in: header
-        name: X-User-ID
+        name: X-Namespace
         required: false
         schema:
           type: string
@@ -603,12 +594,11 @@ paths:
         schema:
           type: string
         style: simple
-      - description: Unique userID set by an auth proxy or client to identify and
-          isolate objects.
-        example: e3cdf999
+      - description: Value used to separate and identify models
+        example: org342
         explode: false
         in: header
-        name: X-User-ID
+        name: X-Namespace
         required: false
         schema:
           type: string
@@ -678,12 +668,11 @@ paths:
         schema:
           type: string
         style: simple
-      - description: Unique userID set by an auth proxy or client to identify and
-          isolate objects.
-        example: e3cdf999
+      - description: Value used to separate and identify models
+        example: org342
         explode: false
         in: header
-        name: X-User-ID
+        name: X-Namespace
         required: false
         schema:
           type: string
@@ -737,12 +726,11 @@ paths:
         schema:
           type: string
         style: simple
-      - description: Unique userID set by an auth proxy or client to identify and
-          isolate objects.
-        example: e3cdf999
+      - description: Value used to separate and identify models
+        example: org342
         explode: false
         in: header
-        name: X-User-ID
+        name: X-Namespace
         required: false
         schema:
           type: string
@@ -842,12 +830,11 @@ paths:
         schema:
           type: string
         style: simple
-      - description: Unique userID set by an auth proxy or client to identify and
-          isolate objects.
-        example: e3cdf999
+      - description: Value used to separate and identify models
+        example: org342
         explode: false
         in: header
-        name: X-User-ID
+        name: X-Namespace
         required: false
         schema:
           type: string
@@ -942,12 +929,11 @@ paths:
         schema:
           type: string
         style: simple
-      - description: Unique userID set by an auth proxy or client to identify and
-          isolate objects.
-        example: e3cdf999
+      - description: Value used to separate and identify models
+        example: org342
         explode: false
         in: header
-        name: X-User-ID
+        name: X-Namespace
         required: false
         schema:
           type: string
@@ -1038,12 +1024,11 @@ paths:
         schema:
           type: string
         style: simple
-      - description: Unique userID set by an auth proxy or client to identify and
-          isolate objects.
-        example: e3cdf999
+      - description: Value used to separate and identify models
+        example: org342
         explode: false
         in: header
-        name: X-User-ID
+        name: X-Namespace
         required: false
         schema:
           type: string
@@ -1089,12 +1074,11 @@ paths:
         schema:
           type: string
         style: simple
-      - description: Unique userID set by an auth proxy or client to identify and
-          isolate objects.
-        example: e3cdf999
+      - description: Value used to separate and identify models
+        example: org342
         explode: false
         in: header
-        name: X-User-ID
+        name: X-Namespace
         required: false
         schema:
           type: string
@@ -1148,12 +1132,11 @@ paths:
         schema:
           type: string
         style: simple
-      - description: Unique userID set by an auth proxy or client to identify and
-          isolate objects.
-        example: e3cdf999
+      - description: Value used to separate and identify models
+        example: org342
         explode: false
         in: header
-        name: X-User-ID
+        name: X-Namespace
         required: false
         schema:
           type: string
@@ -1197,12 +1180,11 @@ paths:
         schema:
           type: string
         style: simple
-      - description: Unique userID set by an auth proxy or client to identify and
-          isolate objects.
-        example: e3cdf999
+      - description: Value used to separate and identify models
+        example: org342
         explode: false
         in: header
-        name: X-User-ID
+        name: X-Namespace
         required: false
         schema:
           type: string
@@ -1267,12 +1249,11 @@ paths:
         schema:
           type: string
         style: simple
-      - description: Unique userID set by an auth proxy or client to identify and
-          isolate objects.
-        example: e3cdf999
+      - description: Value used to separate and identify models
+        example: org342
         explode: false
         in: header
-        name: X-User-ID
+        name: X-Namespace
         required: false
         schema:
           type: string
@@ -1331,12 +1312,11 @@ paths:
         schema:
           type: string
         style: simple
-      - description: Unique userID set by an auth proxy or client to identify and
-          isolate objects.
-        example: e3cdf999
+      - description: Value used to separate and identify models
+        example: org342
         explode: false
         in: header
-        name: X-User-ID
+        name: X-Namespace
         required: false
         schema:
           type: string
@@ -1381,12 +1361,11 @@ paths:
         schema:
           type: string
         style: simple
-      - description: Unique userID set by an auth proxy or client to identify and
-          isolate objects.
-        example: e3cdf999
+      - description: Value used to separate and identify models
+        example: org342
         explode: false
         in: header
-        name: X-User-ID
+        name: X-Namespace
         required: false
         schema:
           type: string
diff --git a/pkg/client/api_customers.go b/pkg/client/api_customers.go
index 0da45bf..9185109 100644
--- a/pkg/client/api_customers.go
+++ b/pkg/client/api_customers.go
@@ -30,7 +30,7 @@ type CustomersApiService service
 // AcceptDisclaimerOpts Optional parameters for the method 'AcceptDisclaimer'
 type AcceptDisclaimerOpts struct {
 	XRequestID optional.String
-	XUserID    optional.String
+	XNamespace optional.String
 }
 
 /*
@@ -41,7 +41,7 @@ Accept a disclaimer for the given customer which could include a document also
  * @param disclaimerID disclaimerID of the Disclaimer to accept
  * @param optional nil or *AcceptDisclaimerOpts - Optional Parameters:
  * @param "XRequestID" (optional.String) -  Optional requestID allows application developer to trace requests through the systems logs
- * @param "XUserID" (optional.String) -  Unique userID set by an auth proxy or client to identify and isolate objects.
+ * @param "XNamespace" (optional.String) -  Value used to separate and identify models
 @return Disclaimer
 */
 func (a *CustomersApiService) AcceptDisclaimer(ctx _context.Context, customerID string, disclaimerID string, localVarOptionals *AcceptDisclaimerOpts) (Disclaimer, *_nethttp.Response, error) {
@@ -84,8 +84,8 @@ func (a *CustomersApiService) AcceptDisclaimer(ctx _context.Context, customerID
 	if localVarOptionals != nil && localVarOptionals.XRequestID.IsSet() {
 		localVarHeaderParams["X-Request-ID"] = parameterToString(localVarOptionals.XRequestID.Value(), "")
 	}
-	if localVarOptionals != nil && localVarOptionals.XUserID.IsSet() {
-		localVarHeaderParams["X-User-ID"] = parameterToString(localVarOptionals.XUserID.Value(), "")
+	if localVarOptionals != nil && localVarOptionals.XNamespace.IsSet() {
+		localVarHeaderParams["X-Namespace"] = parameterToString(localVarOptionals.XNamespace.Value(), "")
 	}
 	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
 	if err != nil {
@@ -135,7 +135,7 @@ func (a *CustomersApiService) AcceptDisclaimer(ctx _context.Context, customerID
 // AddCustomerAddressOpts Optional parameters for the method 'AddCustomerAddress'
 type AddCustomerAddressOpts struct {
 	XRequestID optional.String
-	XUserID    optional.String
+	XNamespace optional.String
 }
 
 /*
@@ -146,7 +146,7 @@ Add an Address onto an existing Customer record
  * @param createCustomerAddress
  * @param optional nil or *AddCustomerAddressOpts - Optional Parameters:
  * @param "XRequestID" (optional.String) -  Optional requestID allows application developer to trace requests through the systems logs
- * @param "XUserID" (optional.String) -  Unique userID set by an auth proxy or client to identify and isolate objects.
+ * @param "XNamespace" (optional.String) -  Value used to separate and identify models
 @return Customer
 */
 func (a *CustomersApiService) AddCustomerAddress(ctx _context.Context, customerID string, createCustomerAddress CreateCustomerAddress, localVarOptionals *AddCustomerAddressOpts) (Customer, *_nethttp.Response, error) {
@@ -187,8 +187,8 @@ func (a *CustomersApiService) AddCustomerAddress(ctx _context.Context, customerI
 	if localVarOptionals != nil && localVarOptionals.XRequestID.IsSet() {
 		localVarHeaderParams["X-Request-ID"] = parameterToString(localVarOptionals.XRequestID.Value(), "")
 	}
-	if localVarOptionals != nil && localVarOptionals.XUserID.IsSet() {
-		localVarHeaderParams["X-User-ID"] = parameterToString(localVarOptionals.XUserID.Value(), "")
+	if localVarOptionals != nil && localVarOptionals.XNamespace.IsSet() {
+		localVarHeaderParams["X-Namespace"] = parameterToString(localVarOptionals.XNamespace.Value(), "")
 	}
 	// body params
 	localVarPostBody = &createCustomerAddress
@@ -240,7 +240,7 @@ func (a *CustomersApiService) AddCustomerAddress(ctx _context.Context, customerI
 // CompleteAccountValidationOpts Optional parameters for the method 'CompleteAccountValidation'
 type CompleteAccountValidationOpts struct {
 	XRequestID optional.String
-	XUserID    optional.String
+	XNamespace optional.String
 }
 
 /*
@@ -252,7 +252,7 @@ Complete account validation with specified strategy and vendor.
  * @param completeAccountValidationRequest
  * @param optional nil or *CompleteAccountValidationOpts - Optional Parameters:
  * @param "XRequestID" (optional.String) -  Optional requestID allows application developer to trace requests through the systems logs
- * @param "XUserID" (optional.String) -  Unique userID set by an auth proxy or client to identify and isolate objects.
+ * @param "XNamespace" (optional.String) -  Value used to separate and identify models
 @return CompleteAccountValidationResponse
 */
 func (a *CustomersApiService) CompleteAccountValidation(ctx _context.Context, customerID string, accountID string, completeAccountValidationRequest CompleteAccountValidationRequest, localVarOptionals *CompleteAccountValidationOpts) (CompleteAccountValidationResponse, *_nethttp.Response, error) {
@@ -295,8 +295,8 @@ func (a *CustomersApiService) CompleteAccountValidation(ctx _context.Context, cu
 	if localVarOptionals != nil && localVarOptionals.XRequestID.IsSet() {
 		localVarHeaderParams["X-Request-ID"] = parameterToString(localVarOptionals.XRequestID.Value(), "")
 	}
-	if localVarOptionals != nil && localVarOptionals.XUserID.IsSet() {
-		localVarHeaderParams["X-User-ID"] = parameterToString(localVarOptionals.XUserID.Value(), "")
+	if localVarOptionals != nil && localVarOptionals.XNamespace.IsSet() {
+		localVarHeaderParams["X-Namespace"] = parameterToString(localVarOptionals.XNamespace.Value(), "")
 	}
 	// body params
 	localVarPostBody = &completeAccountValidationRequest
@@ -348,7 +348,7 @@ func (a *CustomersApiService) CompleteAccountValidation(ctx _context.Context, cu
 // CreateCustomerOpts Optional parameters for the method 'CreateCustomer'
 type CreateCustomerOpts struct {
 	XRequestID optional.String
-	XUserID    optional.String
+	XNamespace optional.String
 }
 
 /*
@@ -358,7 +358,7 @@ Create a Customer object from the given details of a human or business
  * @param createCustomer
  * @param optional nil or *CreateCustomerOpts - Optional Parameters:
  * @param "XRequestID" (optional.String) -  Optional requestID allows application developer to trace requests through the systems logs
- * @param "XUserID" (optional.String) -  Unique userID set by an auth proxy or client to identify and isolate objects.
+ * @param "XNamespace" (optional.String) -  Value used to separate and identify models
 @return Customer
 */
 func (a *CustomersApiService) CreateCustomer(ctx _context.Context, createCustomer CreateCustomer, localVarOptionals *CreateCustomerOpts) (Customer, *_nethttp.Response, error) {
@@ -397,8 +397,8 @@ func (a *CustomersApiService) CreateCustomer(ctx _context.Context, createCustome
 	if localVarOptionals != nil && localVarOptionals.XRequestID.IsSet() {
 		localVarHeaderParams["X-Request-ID"] = parameterToString(localVarOptionals.XRequestID.Value(), "")
 	}
-	if localVarOptionals != nil && localVarOptionals.XUserID.IsSet() {
-		localVarHeaderParams["X-User-ID"] = parameterToString(localVarOptionals.XUserID.Value(), "")
+	if localVarOptionals != nil && localVarOptionals.XNamespace.IsSet() {
+		localVarHeaderParams["X-Namespace"] = parameterToString(localVarOptionals.XNamespace.Value(), "")
 	}
 	// body params
 	localVarPostBody = &createCustomer
@@ -450,7 +450,7 @@ func (a *CustomersApiService) CreateCustomer(ctx _context.Context, createCustome
 // CreateCustomerAccountOpts Optional parameters for the method 'CreateCustomerAccount'
 type CreateCustomerAccountOpts struct {
 	XRequestID optional.String
-	XUserID    optional.String
+	XNamespace optional.String
 }
 
 /*
@@ -461,7 +461,7 @@ Create an account for the given customer
  * @param createAccount
  * @param optional nil or *CreateCustomerAccountOpts - Optional Parameters:
  * @param "XRequestID" (optional.String) -  Optional requestID allows application developer to trace requests through the systems logs
- * @param "XUserID" (optional.String) -  Unique userID set by an auth proxy or client to identify and isolate objects.
+ * @param "XNamespace" (optional.String) -  Value used to separate and identify models
 @return Account
 */
 func (a *CustomersApiService) CreateCustomerAccount(ctx _context.Context, customerID string, createAccount CreateAccount, localVarOptionals *CreateCustomerAccountOpts) (Account, *_nethttp.Response, error) {
@@ -502,8 +502,8 @@ func (a *CustomersApiService) CreateCustomerAccount(ctx _context.Context, custom
 	if localVarOptionals != nil && localVarOptionals.XRequestID.IsSet() {
 		localVarHeaderParams["X-Request-ID"] = parameterToString(localVarOptionals.XRequestID.Value(), "")
 	}
-	if localVarOptionals != nil && localVarOptionals.XUserID.IsSet() {
-		localVarHeaderParams["X-User-ID"] = parameterToString(localVarOptionals.XUserID.Value(), "")
+	if localVarOptionals != nil && localVarOptionals.XNamespace.IsSet() {
+		localVarHeaderParams["X-Namespace"] = parameterToString(localVarOptionals.XNamespace.Value(), "")
 	}
 	// body params
 	localVarPostBody = &createAccount
@@ -555,7 +555,7 @@ func (a *CustomersApiService) CreateCustomerAccount(ctx _context.Context, custom
 // DecryptAccountNumberOpts Optional parameters for the method 'DecryptAccountNumber'
 type DecryptAccountNumberOpts struct {
 	XRequestID optional.String
-	XUserID    optional.String
+	XNamespace optional.String
 }
 
 /*
@@ -566,7 +566,7 @@ Return the account number encrypted with a shared secret for application request
  * @param accountID accountID of the Account to get decrypted account number
  * @param optional nil or *DecryptAccountNumberOpts - Optional Parameters:
  * @param "XRequestID" (optional.String) -  Optional requestID allows application developer to trace requests through the systems logs
- * @param "XUserID" (optional.String) -  Unique userID set by an auth proxy or client to identify and isolate objects.
+ * @param "XNamespace" (optional.String) -  Value used to separate and identify models
 @return TransitAccountNumber
 */
 func (a *CustomersApiService) DecryptAccountNumber(ctx _context.Context, customerID string, accountID string, localVarOptionals *DecryptAccountNumberOpts) (TransitAccountNumber, *_nethttp.Response, error) {
@@ -609,8 +609,8 @@ func (a *CustomersApiService) DecryptAccountNumber(ctx _context.Context, custome
 	if localVarOptionals != nil && localVarOptionals.XRequestID.IsSet() {
 		localVarHeaderParams["X-Request-ID"] = parameterToString(localVarOptionals.XRequestID.Value(), "")
 	}
-	if localVarOptionals != nil && localVarOptionals.XUserID.IsSet() {
-		localVarHeaderParams["X-User-ID"] = parameterToString(localVarOptionals.XUserID.Value(), "")
+	if localVarOptionals != nil && localVarOptionals.XNamespace.IsSet() {
+		localVarHeaderParams["X-Namespace"] = parameterToString(localVarOptionals.XNamespace.Value(), "")
 	}
 	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
 	if err != nil {
@@ -660,7 +660,7 @@ func (a *CustomersApiService) DecryptAccountNumber(ctx _context.Context, custome
 // DeleteCustomerAccountOpts Optional parameters for the method 'DeleteCustomerAccount'
 type DeleteCustomerAccountOpts struct {
 	XRequestID optional.String
-	XUserID    optional.String
+	XNamespace optional.String
 }
 
 /*
@@ -670,7 +670,7 @@ Remove an account from the given Customer
  * @param customerID customerID of the Customer to remove an Account
  * @param optional nil or *DeleteCustomerAccountOpts - Optional Parameters:
  * @param "XRequestID" (optional.String) -  Optional requestID allows application developer to trace requests through the systems logs
- * @param "XUserID" (optional.String) -  Unique userID set by an auth proxy or client to identify and isolate objects.
+ * @param "XNamespace" (optional.String) -  Value used to separate and identify models
 */
 func (a *CustomersApiService) DeleteCustomerAccount(ctx _context.Context, customerID string, localVarOptionals *DeleteCustomerAccountOpts) (*_nethttp.Response, error) {
 	var (
@@ -709,8 +709,8 @@ func (a *CustomersApiService) DeleteCustomerAccount(ctx _context.Context, custom
 	if localVarOptionals != nil && localVarOptionals.XRequestID.IsSet() {
 		localVarHeaderParams["X-Request-ID"] = parameterToString(localVarOptionals.XRequestID.Value(), "")
 	}
-	if localVarOptionals != nil && localVarOptionals.XUserID.IsSet() {
-		localVarHeaderParams["X-User-ID"] = parameterToString(localVarOptionals.XUserID.Value(), "")
+	if localVarOptionals != nil && localVarOptionals.XNamespace.IsSet() {
+		localVarHeaderParams["X-Namespace"] = parameterToString(localVarOptionals.XNamespace.Value(), "")
 	}
 	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
 	if err != nil {
@@ -751,7 +751,7 @@ func (a *CustomersApiService) DeleteCustomerAccount(ctx _context.Context, custom
 // GetAccountValidationOpts Optional parameters for the method 'GetAccountValidation'
 type GetAccountValidationOpts struct {
 	XRequestID optional.String
-	XUserID    optional.String
+	XNamespace optional.String
 }
 
 /*
@@ -763,7 +763,7 @@ Get information about account validation strategy, status, etc.
  * @param validationID ID of the Validation
  * @param optional nil or *GetAccountValidationOpts - Optional Parameters:
  * @param "XRequestID" (optional.String) -  Optional requestID allows application developer to trace requests through the systems logs
- * @param "XUserID" (optional.String) -  Unique userID set by an auth proxy or client to identify and isolate objects.
+ * @param "XNamespace" (optional.String) -  Value used to separate and identify models
 @return AccountValidationResponse
 */
 func (a *CustomersApiService) GetAccountValidation(ctx _context.Context, customerID string, accountID string, validationID string, localVarOptionals *GetAccountValidationOpts) (AccountValidationResponse, *_nethttp.Response, error) {
@@ -808,8 +808,8 @@ func (a *CustomersApiService) GetAccountValidation(ctx _context.Context, custome
 	if localVarOptionals != nil && localVarOptionals.XRequestID.IsSet() {
 		localVarHeaderParams["X-Request-ID"] = parameterToString(localVarOptionals.XRequestID.Value(), "")
 	}
-	if localVarOptionals != nil && localVarOptionals.XUserID.IsSet() {
-		localVarHeaderParams["X-User-ID"] = parameterToString(localVarOptionals.XUserID.Value(), "")
+	if localVarOptionals != nil && localVarOptionals.XNamespace.IsSet() {
+		localVarHeaderParams["X-Namespace"] = parameterToString(localVarOptionals.XNamespace.Value(), "")
 	}
 	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
 	if err != nil {
@@ -859,7 +859,7 @@ func (a *CustomersApiService) GetAccountValidation(ctx _context.Context, custome
 // GetCustomerOpts Optional parameters for the method 'GetCustomer'
 type GetCustomerOpts struct {
 	XRequestID optional.String
-	XUserID    optional.String
+	XNamespace optional.String
 }
 
 /*
@@ -869,7 +869,7 @@ Get the Customer object and metadata for the customerID.
  * @param customerID customerID that identifies this Customer
  * @param optional nil or *GetCustomerOpts - Optional Parameters:
  * @param "XRequestID" (optional.String) -  Optional requestID allows application developer to trace requests through the systems logs
- * @param "XUserID" (optional.String) -  Unique userID set by an auth proxy or client to identify and isolate objects.
+ * @param "XNamespace" (optional.String) -  Value used to separate and identify models
 @return Customer
 */
 func (a *CustomersApiService) GetCustomer(ctx _context.Context, customerID string, localVarOptionals *GetCustomerOpts) (Customer, *_nethttp.Response, error) {
@@ -910,8 +910,8 @@ func (a *CustomersApiService) GetCustomer(ctx _context.Context, customerID strin
 	if localVarOptionals != nil && localVarOptionals.XRequestID.IsSet() {
 		localVarHeaderParams["X-Request-ID"] = parameterToString(localVarOptionals.XRequestID.Value(), "")
 	}
-	if localVarOptionals != nil && localVarOptionals.XUserID.IsSet() {
-		localVarHeaderParams["X-User-ID"] = parameterToString(localVarOptionals.XUserID.Value(), "")
+	if localVarOptionals != nil && localVarOptionals.XNamespace.IsSet() {
+		localVarHeaderParams["X-Namespace"] = parameterToString(localVarOptionals.XNamespace.Value(), "")
 	}
 	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
 	if err != nil {
@@ -962,7 +962,7 @@ func (a *CustomersApiService) GetCustomer(ctx _context.Context, customerID strin
 // GetCustomerAccountsOpts Optional parameters for the method 'GetCustomerAccounts'
 type GetCustomerAccountsOpts struct {
 	XRequestID optional.String
-	XUserID    optional.String
+	XNamespace optional.String
 }
 
 /*
@@ -972,7 +972,7 @@ Retrieve all accounts for the given customer.
  * @param customerID customerID of the Customer to get Accounts for
  * @param optional nil or *GetCustomerAccountsOpts - Optional Parameters:
  * @param "XRequestID" (optional.String) -  Optional requestID allows application developer to trace requests through the systems logs
- * @param "XUserID" (optional.String) -  Unique userID set by an auth proxy or client to identify and isolate objects.
+ * @param "XNamespace" (optional.String) -  Value used to separate and identify models
 @return []Account
 */
 func (a *CustomersApiService) GetCustomerAccounts(ctx _context.Context, customerID string, localVarOptionals *GetCustomerAccountsOpts) ([]Account, *_nethttp.Response, error) {
@@ -1013,8 +1013,8 @@ func (a *CustomersApiService) GetCustomerAccounts(ctx _context.Context, customer
 	if localVarOptionals != nil && localVarOptionals.XRequestID.IsSet() {
 		localVarHeaderParams["X-Request-ID"] = parameterToString(localVarOptionals.XRequestID.Value(), "")
 	}
-	if localVarOptionals != nil && localVarOptionals.XUserID.IsSet() {
-		localVarHeaderParams["X-User-ID"] = parameterToString(localVarOptionals.XUserID.Value(), "")
+	if localVarOptionals != nil && localVarOptionals.XNamespace.IsSet() {
+		localVarHeaderParams["X-Namespace"] = parameterToString(localVarOptionals.XNamespace.Value(), "")
 	}
 	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
 	if err != nil {
@@ -1064,7 +1064,7 @@ func (a *CustomersApiService) GetCustomerAccounts(ctx _context.Context, customer
 // GetCustomerDisclaimersOpts Optional parameters for the method 'GetCustomerDisclaimers'
 type GetCustomerDisclaimersOpts struct {
 	XRequestID optional.String
-	XUserID    optional.String
+	XNamespace optional.String
 }
 
 /*
@@ -1074,7 +1074,7 @@ Get active disclaimers for the given customer
  * @param customerID customerID of the Customer to get disclaimers
  * @param optional nil or *GetCustomerDisclaimersOpts - Optional Parameters:
  * @param "XRequestID" (optional.String) -  Optional requestID allows application developer to trace requests through the systems logs
- * @param "XUserID" (optional.String) -  Unique userID set by an auth proxy or client to identify and isolate objects.
+ * @param "XNamespace" (optional.String) -  Value used to separate and identify models
 @return []Disclaimer
 */
 func (a *CustomersApiService) GetCustomerDisclaimers(ctx _context.Context, customerID string, localVarOptionals *GetCustomerDisclaimersOpts) ([]Disclaimer, *_nethttp.Response, error) {
@@ -1115,8 +1115,8 @@ func (a *CustomersApiService) GetCustomerDisclaimers(ctx _context.Context, custo
 	if localVarOptionals != nil && localVarOptionals.XRequestID.IsSet() {
 		localVarHeaderParams["X-Request-ID"] = parameterToString(localVarOptionals.XRequestID.Value(), "")
 	}
-	if localVarOptionals != nil && localVarOptionals.XUserID.IsSet() {
-		localVarHeaderParams["X-User-ID"] = parameterToString(localVarOptionals.XUserID.Value(), "")
+	if localVarOptionals != nil && localVarOptionals.XNamespace.IsSet() {
+		localVarHeaderParams["X-Namespace"] = parameterToString(localVarOptionals.XNamespace.Value(), "")
 	}
 	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
 	if err != nil {
@@ -1166,7 +1166,7 @@ func (a *CustomersApiService) GetCustomerDisclaimers(ctx _context.Context, custo
 // GetCustomerDocumentContentsOpts Optional parameters for the method 'GetCustomerDocumentContents'
 type GetCustomerDocumentContentsOpts struct {
 	XRequestID optional.String
-	XUserID    optional.String
+	XNamespace optional.String
 }
 
 /*
@@ -1177,7 +1177,7 @@ Retrieve the referenced document
  * @param documentID documentID to identify a Document
  * @param optional nil or *GetCustomerDocumentContentsOpts - Optional Parameters:
  * @param "XRequestID" (optional.String) -  Optional requestID allows application developer to trace requests through the systems logs
- * @param "XUserID" (optional.String) -  Unique userID set by an auth proxy or client to identify and isolate objects.
+ * @param "XNamespace" (optional.String) -  Value used to separate and identify models
 @return *os.File
 */
 func (a *CustomersApiService) GetCustomerDocumentContents(ctx _context.Context, customerID string, documentID string, localVarOptionals *GetCustomerDocumentContentsOpts) (*os.File, *_nethttp.Response, error) {
@@ -1220,8 +1220,8 @@ func (a *CustomersApiService) GetCustomerDocumentContents(ctx _context.Context,
 	if localVarOptionals != nil && localVarOptionals.XRequestID.IsSet() {
 		localVarHeaderParams["X-Request-ID"] = parameterToString(localVarOptionals.XRequestID.Value(), "")
 	}
-	if localVarOptionals != nil && localVarOptionals.XUserID.IsSet() {
-		localVarHeaderParams["X-User-ID"] = parameterToString(localVarOptionals.XUserID.Value(), "")
+	if localVarOptionals != nil && localVarOptionals.XNamespace.IsSet() {
+		localVarHeaderParams["X-Namespace"] = parameterToString(localVarOptionals.XNamespace.Value(), "")
 	}
 	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
 	if err != nil {
@@ -1271,7 +1271,7 @@ func (a *CustomersApiService) GetCustomerDocumentContents(ctx _context.Context,
 // GetCustomerDocumentsOpts Optional parameters for the method 'GetCustomerDocuments'
 type GetCustomerDocumentsOpts struct {
 	XRequestID optional.String
-	XUserID    optional.String
+	XNamespace optional.String
 }
 
 /*
@@ -1281,7 +1281,7 @@ Get documents for a customer
  * @param customerID customerID of the Customer to get all Documents
  * @param optional nil or *GetCustomerDocumentsOpts - Optional Parameters:
  * @param "XRequestID" (optional.String) -  Optional requestID allows application developer to trace requests through the systems logs
- * @param "XUserID" (optional.String) -  Unique userID set by an auth proxy or client to identify and isolate objects.
+ * @param "XNamespace" (optional.String) -  Value used to separate and identify models
 @return []Document
 */
 func (a *CustomersApiService) GetCustomerDocuments(ctx _context.Context, customerID string, localVarOptionals *GetCustomerDocumentsOpts) ([]Document, *_nethttp.Response, error) {
@@ -1322,8 +1322,8 @@ func (a *CustomersApiService) GetCustomerDocuments(ctx _context.Context, custome
 	if localVarOptionals != nil && localVarOptionals.XRequestID.IsSet() {
 		localVarHeaderParams["X-Request-ID"] = parameterToString(localVarOptionals.XRequestID.Value(), "")
 	}
-	if localVarOptionals != nil && localVarOptionals.XUserID.IsSet() {
-		localVarHeaderParams["X-User-ID"] = parameterToString(localVarOptionals.XUserID.Value(), "")
+	if localVarOptionals != nil && localVarOptionals.XNamespace.IsSet() {
+		localVarHeaderParams["X-Namespace"] = parameterToString(localVarOptionals.XNamespace.Value(), "")
 	}
 	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
 	if err != nil {
@@ -1373,7 +1373,7 @@ func (a *CustomersApiService) GetCustomerDocuments(ctx _context.Context, custome
 // GetLatestAccountOFACSearchOpts Optional parameters for the method 'GetLatestAccountOFACSearch'
 type GetLatestAccountOFACSearchOpts struct {
 	XRequestID optional.String
-	XUserID    optional.String
+	XNamespace optional.String
 }
 
 /*
@@ -1384,7 +1384,7 @@ Get the latest OFAC search for an Account
  * @param accountID accountID of the Account to get latest OFAC search
  * @param optional nil or *GetLatestAccountOFACSearchOpts - Optional Parameters:
  * @param "XRequestID" (optional.String) -  Optional requestID allows application developer to trace requests through the systems logs
- * @param "XUserID" (optional.String) -  Unique userID set by an auth proxy or client to identify and isolate objects.
+ * @param "XNamespace" (optional.String) -  Value used to separate and identify models
 @return OfacSearch
 */
 func (a *CustomersApiService) GetLatestAccountOFACSearch(ctx _context.Context, customerID string, accountID string, localVarOptionals *GetLatestAccountOFACSearchOpts) (OfacSearch, *_nethttp.Response, error) {
@@ -1427,8 +1427,8 @@ func (a *CustomersApiService) GetLatestAccountOFACSearch(ctx _context.Context, c
 	if localVarOptionals != nil && localVarOptionals.XRequestID.IsSet() {
 		localVarHeaderParams["X-Request-ID"] = parameterToString(localVarOptionals.XRequestID.Value(), "")
 	}
-	if localVarOptionals != nil && localVarOptionals.XUserID.IsSet() {
-		localVarHeaderParams["X-User-ID"] = parameterToString(localVarOptionals.XUserID.Value(), "")
+	if localVarOptionals != nil && localVarOptionals.XNamespace.IsSet() {
+		localVarHeaderParams["X-Namespace"] = parameterToString(localVarOptionals.XNamespace.Value(), "")
 	}
 	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
 	if err != nil {
@@ -1478,7 +1478,7 @@ func (a *CustomersApiService) GetLatestAccountOFACSearch(ctx _context.Context, c
 // GetLatestOFACSearchOpts Optional parameters for the method 'GetLatestOFACSearch'
 type GetLatestOFACSearchOpts struct {
 	XRequestID optional.String
-	XUserID    optional.String
+	XNamespace optional.String
 }
 
 /*
@@ -1488,7 +1488,7 @@ Get the latest OFAC search for a Customer
  * @param customerID customerID of the Customer to get latest OFAC search
  * @param optional nil or *GetLatestOFACSearchOpts - Optional Parameters:
  * @param "XRequestID" (optional.String) -  Optional requestID allows application developer to trace requests through the systems logs
- * @param "XUserID" (optional.String) -  Unique userID set by an auth proxy or client to identify and isolate objects.
+ * @param "XNamespace" (optional.String) -  Value used to separate and identify models
 @return OfacSearch
 */
 func (a *CustomersApiService) GetLatestOFACSearch(ctx _context.Context, customerID string, localVarOptionals *GetLatestOFACSearchOpts) (OfacSearch, *_nethttp.Response, error) {
@@ -1529,8 +1529,8 @@ func (a *CustomersApiService) GetLatestOFACSearch(ctx _context.Context, customer
 	if localVarOptionals != nil && localVarOptionals.XRequestID.IsSet() {
 		localVarHeaderParams["X-Request-ID"] = parameterToString(localVarOptionals.XRequestID.Value(), "")
 	}
-	if localVarOptionals != nil && localVarOptionals.XUserID.IsSet() {
-		localVarHeaderParams["X-User-ID"] = parameterToString(localVarOptionals.XUserID.Value(), "")
+	if localVarOptionals != nil && localVarOptionals.XNamespace.IsSet() {
+		localVarHeaderParams["X-Namespace"] = parameterToString(localVarOptionals.XNamespace.Value(), "")
 	}
 	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
 	if err != nil {
@@ -1580,7 +1580,7 @@ func (a *CustomersApiService) GetLatestOFACSearch(ctx _context.Context, customer
 // InitAccountValidationOpts Optional parameters for the method 'InitAccountValidation'
 type InitAccountValidationOpts struct {
 	XRequestID optional.String
-	XUserID    optional.String
+	XNamespace optional.String
 }
 
 /*
@@ -1592,7 +1592,7 @@ Initiate account validation with specified strategy and vendor.
  * @param initAccountValidationRequest
  * @param optional nil or *InitAccountValidationOpts - Optional Parameters:
  * @param "XRequestID" (optional.String) -  Optional requestID allows application developer to trace requests through the systems logs
- * @param "XUserID" (optional.String) -  Unique userID set by an auth proxy or client to identify and isolate objects.
+ * @param "XNamespace" (optional.String) -  Value used to separate and identify models
 @return InitAccountValidationResponse
 */
 func (a *CustomersApiService) InitAccountValidation(ctx _context.Context, customerID string, accountID string, initAccountValidationRequest InitAccountValidationRequest, localVarOptionals *InitAccountValidationOpts) (InitAccountValidationResponse, *_nethttp.Response, error) {
@@ -1635,8 +1635,8 @@ func (a *CustomersApiService) InitAccountValidation(ctx _context.Context, custom
 	if localVarOptionals != nil && localVarOptionals.XRequestID.IsSet() {
 		localVarHeaderParams["X-Request-ID"] = parameterToString(localVarOptionals.XRequestID.Value(), "")
 	}
-	if localVarOptionals != nil && localVarOptionals.XUserID.IsSet() {
-		localVarHeaderParams["X-User-ID"] = parameterToString(localVarOptionals.XUserID.Value(), "")
+	if localVarOptionals != nil && localVarOptionals.XNamespace.IsSet() {
+		localVarHeaderParams["X-Namespace"] = parameterToString(localVarOptionals.XNamespace.Value(), "")
 	}
 	// body params
 	localVarPostBody = &initAccountValidationRequest
@@ -1752,7 +1752,7 @@ func (a *CustomersApiService) Ping(ctx _context.Context) (*_nethttp.Response, er
 // RefreshAccountOFACSearchOpts Optional parameters for the method 'RefreshAccountOFACSearch'
 type RefreshAccountOFACSearchOpts struct {
 	XRequestID optional.String
-	XUserID    optional.String
+	XNamespace optional.String
 }
 
 /*
@@ -1763,7 +1763,7 @@ Refresh OFAC search for a given Account
  * @param accountID accountID of the Account to get latest OFAC search
  * @param optional nil or *RefreshAccountOFACSearchOpts - Optional Parameters:
  * @param "XRequestID" (optional.String) -  Optional requestID allows application developer to trace requests through the systems logs
- * @param "XUserID" (optional.String) -  Unique userID set by an auth proxy or client to identify and isolate objects.
+ * @param "XNamespace" (optional.String) -  Value used to separate and identify models
 @return OfacSearch
 */
 func (a *CustomersApiService) RefreshAccountOFACSearch(ctx _context.Context, customerID string, accountID string, localVarOptionals *RefreshAccountOFACSearchOpts) (OfacSearch, *_nethttp.Response, error) {
@@ -1806,8 +1806,8 @@ func (a *CustomersApiService) RefreshAccountOFACSearch(ctx _context.Context, cus
 	if localVarOptionals != nil && localVarOptionals.XRequestID.IsSet() {
 		localVarHeaderParams["X-Request-ID"] = parameterToString(localVarOptionals.XRequestID.Value(), "")
 	}
-	if localVarOptionals != nil && localVarOptionals.XUserID.IsSet() {
-		localVarHeaderParams["X-User-ID"] = parameterToString(localVarOptionals.XUserID.Value(), "")
+	if localVarOptionals != nil && localVarOptionals.XNamespace.IsSet() {
+		localVarHeaderParams["X-Namespace"] = parameterToString(localVarOptionals.XNamespace.Value(), "")
 	}
 	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
 	if err != nil {
@@ -1857,7 +1857,7 @@ func (a *CustomersApiService) RefreshAccountOFACSearch(ctx _context.Context, cus
 // RefreshOFACSearchOpts Optional parameters for the method 'RefreshOFACSearch'
 type RefreshOFACSearchOpts struct {
 	XRequestID optional.String
-	XUserID    optional.String
+	XNamespace optional.String
 }
 
 /*
@@ -1867,7 +1867,7 @@ Refresh OFAC search for a given Customer
  * @param customerID customerID of the Customer to refresh OFAC search
  * @param optional nil or *RefreshOFACSearchOpts - Optional Parameters:
  * @param "XRequestID" (optional.String) -  Optional requestID allows application developer to trace requests through the systems logs
- * @param "XUserID" (optional.String) -  Unique userID set by an auth proxy or client to identify and isolate objects.
+ * @param "XNamespace" (optional.String) -  Value used to separate and identify models
 @return OfacSearch
 */
 func (a *CustomersApiService) RefreshOFACSearch(ctx _context.Context, customerID string, localVarOptionals *RefreshOFACSearchOpts) (OfacSearch, *_nethttp.Response, error) {
@@ -1908,8 +1908,8 @@ func (a *CustomersApiService) RefreshOFACSearch(ctx _context.Context, customerID
 	if localVarOptionals != nil && localVarOptionals.XRequestID.IsSet() {
 		localVarHeaderParams["X-Request-ID"] = parameterToString(localVarOptionals.XRequestID.Value(), "")
 	}
-	if localVarOptionals != nil && localVarOptionals.XUserID.IsSet() {
-		localVarHeaderParams["X-User-ID"] = parameterToString(localVarOptionals.XUserID.Value(), "")
+	if localVarOptionals != nil && localVarOptionals.XNamespace.IsSet() {
+		localVarHeaderParams["X-Namespace"] = parameterToString(localVarOptionals.XNamespace.Value(), "")
 	}
 	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
 	if err != nil {
@@ -1959,7 +1959,7 @@ func (a *CustomersApiService) RefreshOFACSearch(ctx _context.Context, customerID
 // ReplaceCustomerMetadataOpts Optional parameters for the method 'ReplaceCustomerMetadata'
 type ReplaceCustomerMetadataOpts struct {
 	XRequestID optional.String
-	XUserID    optional.String
+	XNamespace optional.String
 }
 
 /*
@@ -1970,7 +1970,7 @@ Replace the metadata object for a customer. Metadata is a map of unique keys ass
  * @param customerMetadata
  * @param optional nil or *ReplaceCustomerMetadataOpts - Optional Parameters:
  * @param "XRequestID" (optional.String) -  Optional requestID allows application developer to trace requests through the systems logs
- * @param "XUserID" (optional.String) -  Unique userID set by an auth proxy or client to identify and isolate objects.
+ * @param "XNamespace" (optional.String) -  Value used to separate and identify models
 @return Customer
 */
 func (a *CustomersApiService) ReplaceCustomerMetadata(ctx _context.Context, customerID string, customerMetadata CustomerMetadata, localVarOptionals *ReplaceCustomerMetadataOpts) (Customer, *_nethttp.Response, error) {
@@ -2011,8 +2011,8 @@ func (a *CustomersApiService) ReplaceCustomerMetadata(ctx _context.Context, cust
 	if localVarOptionals != nil && localVarOptionals.XRequestID.IsSet() {
 		localVarHeaderParams["X-Request-ID"] = parameterToString(localVarOptionals.XRequestID.Value(), "")
 	}
-	if localVarOptionals != nil && localVarOptionals.XUserID.IsSet() {
-		localVarHeaderParams["X-User-ID"] = parameterToString(localVarOptionals.XUserID.Value(), "")
+	if localVarOptionals != nil && localVarOptionals.XNamespace.IsSet() {
+		localVarHeaderParams["X-Namespace"] = parameterToString(localVarOptionals.XNamespace.Value(), "")
 	}
 	// body params
 	localVarPostBody = &customerMetadata
@@ -2276,7 +2276,7 @@ func (a *CustomersApiService) UpdateAccountStatus(ctx _context.Context, customer
 // UpdateCustomerStatusOpts Optional parameters for the method 'UpdateCustomerStatus'
 type UpdateCustomerStatusOpts struct {
 	XRequestID optional.String
-	XUserID    optional.String
+	XNamespace optional.String
 }
 
 /*
@@ -2287,7 +2287,7 @@ Update the status for a customer, which can only be updated by authenticated use
  * @param updateCustomerStatus
  * @param optional nil or *UpdateCustomerStatusOpts - Optional Parameters:
  * @param "XRequestID" (optional.String) -  Optional requestID allows application developer to trace requests through the systems logs
- * @param "XUserID" (optional.String) -  Unique userID set by an auth proxy or client to identify and isolate objects.
+ * @param "XNamespace" (optional.String) -  Value used to separate and identify models
 @return Customer
 */
 func (a *CustomersApiService) UpdateCustomerStatus(ctx _context.Context, customerID string, updateCustomerStatus UpdateCustomerStatus, localVarOptionals *UpdateCustomerStatusOpts) (Customer, *_nethttp.Response, error) {
@@ -2328,8 +2328,8 @@ func (a *CustomersApiService) UpdateCustomerStatus(ctx _context.Context, custome
 	if localVarOptionals != nil && localVarOptionals.XRequestID.IsSet() {
 		localVarHeaderParams["X-Request-ID"] = parameterToString(localVarOptionals.XRequestID.Value(), "")
 	}
-	if localVarOptionals != nil && localVarOptionals.XUserID.IsSet() {
-		localVarHeaderParams["X-User-ID"] = parameterToString(localVarOptionals.XUserID.Value(), "")
+	if localVarOptionals != nil && localVarOptionals.XNamespace.IsSet() {
+		localVarHeaderParams["X-Namespace"] = parameterToString(localVarOptionals.XNamespace.Value(), "")
 	}
 	// body params
 	localVarPostBody = &updateCustomerStatus
@@ -2381,7 +2381,7 @@ func (a *CustomersApiService) UpdateCustomerStatus(ctx _context.Context, custome
 // UploadCustomerDocumentOpts Optional parameters for the method 'UploadCustomerDocument'
 type UploadCustomerDocumentOpts struct {
 	XRequestID optional.String
-	XUserID    optional.String
+	XNamespace optional.String
 }
 
 /*
@@ -2393,7 +2393,7 @@ Upload a document for the given customer
  * @param file Document to be uploaded
  * @param optional nil or *UploadCustomerDocumentOpts - Optional Parameters:
  * @param "XRequestID" (optional.String) -  Optional requestID allows application developer to trace requests through the systems logs
- * @param "XUserID" (optional.String) -  Unique userID set by an auth proxy or client to identify and isolate objects.
+ * @param "XNamespace" (optional.String) -  Value used to separate and identify models
 @return Document
 */
 func (a *CustomersApiService) UploadCustomerDocument(ctx _context.Context, customerID string, type_ string, file *os.File, localVarOptionals *UploadCustomerDocumentOpts) (Document, *_nethttp.Response, error) {
@@ -2435,8 +2435,8 @@ func (a *CustomersApiService) UploadCustomerDocument(ctx _context.Context, custo
 	if localVarOptionals != nil && localVarOptionals.XRequestID.IsSet() {
 		localVarHeaderParams["X-Request-ID"] = parameterToString(localVarOptionals.XRequestID.Value(), "")
 	}
-	if localVarOptionals != nil && localVarOptionals.XUserID.IsSet() {
-		localVarHeaderParams["X-User-ID"] = parameterToString(localVarOptionals.XUserID.Value(), "")
+	if localVarOptionals != nil && localVarOptionals.XNamespace.IsSet() {
+		localVarHeaderParams["X-Namespace"] = parameterToString(localVarOptionals.XNamespace.Value(), "")
 	}
 	localVarFormFileName = "file"
 	localVarFile := file
diff --git a/pkg/client/docs/CustomersApi.md b/pkg/client/docs/CustomersApi.md
index dd274a1..cf9e57c 100644
--- a/pkg/client/docs/CustomersApi.md
+++ b/pkg/client/docs/CustomersApi.md
@@ -59,7 +59,7 @@ Name | Type | Description  | Notes
 
 
  **xRequestID** | **optional.String**| Optional requestID allows application developer to trace requests through the systems logs | 
- **xUserID** | **optional.String**| Unique userID set by an auth proxy or client to identify and isolate objects. | 
+ **xNamespace** | **optional.String**| Value used to separate and identify models | 
 
 ### Return type
 
@@ -107,7 +107,7 @@ Name | Type | Description  | Notes
 
 
  **xRequestID** | **optional.String**| Optional requestID allows application developer to trace requests through the systems logs | 
- **xUserID** | **optional.String**| Unique userID set by an auth proxy or client to identify and isolate objects. | 
+ **xNamespace** | **optional.String**| Value used to separate and identify models | 
 
 ### Return type
 
@@ -157,7 +157,7 @@ Name | Type | Description  | Notes
 
 
  **xRequestID** | **optional.String**| Optional requestID allows application developer to trace requests through the systems logs | 
- **xUserID** | **optional.String**| Unique userID set by an auth proxy or client to identify and isolate objects. | 
+ **xNamespace** | **optional.String**| Value used to separate and identify models | 
 
 ### Return type
 
@@ -203,7 +203,7 @@ Name | Type | Description  | Notes
 ------------- | ------------- | ------------- | -------------
 
  **xRequestID** | **optional.String**| Optional requestID allows application developer to trace requests through the systems logs | 
- **xUserID** | **optional.String**| Unique userID set by an auth proxy or client to identify and isolate objects. | 
+ **xNamespace** | **optional.String**| Value used to separate and identify models | 
 
 ### Return type
 
@@ -251,7 +251,7 @@ Name | Type | Description  | Notes
 
 
  **xRequestID** | **optional.String**| Optional requestID allows application developer to trace requests through the systems logs | 
- **xUserID** | **optional.String**| Unique userID set by an auth proxy or client to identify and isolate objects. | 
+ **xNamespace** | **optional.String**| Value used to separate and identify models | 
 
 ### Return type
 
@@ -299,7 +299,7 @@ Name | Type | Description  | Notes
 
 
  **xRequestID** | **optional.String**| Optional requestID allows application developer to trace requests through the systems logs | 
- **xUserID** | **optional.String**| Unique userID set by an auth proxy or client to identify and isolate objects. | 
+ **xNamespace** | **optional.String**| Value used to separate and identify models | 
 
 ### Return type
 
@@ -345,7 +345,7 @@ Name | Type | Description  | Notes
 ------------- | ------------- | ------------- | -------------
 
  **xRequestID** | **optional.String**| Optional requestID allows application developer to trace requests through the systems logs | 
- **xUserID** | **optional.String**| Unique userID set by an auth proxy or client to identify and isolate objects. | 
+ **xNamespace** | **optional.String**| Value used to separate and identify models | 
 
 ### Return type
 
@@ -395,7 +395,7 @@ Name | Type | Description  | Notes
 
 
  **xRequestID** | **optional.String**| Optional requestID allows application developer to trace requests through the systems logs | 
- **xUserID** | **optional.String**| Unique userID set by an auth proxy or client to identify and isolate objects. | 
+ **xNamespace** | **optional.String**| Value used to separate and identify models | 
 
 ### Return type
 
@@ -441,7 +441,7 @@ Name | Type | Description  | Notes
 ------------- | ------------- | ------------- | -------------
 
  **xRequestID** | **optional.String**| Optional requestID allows application developer to trace requests through the systems logs | 
- **xUserID** | **optional.String**| Unique userID set by an auth proxy or client to identify and isolate objects. | 
+ **xNamespace** | **optional.String**| Value used to separate and identify models | 
 
 ### Return type
 
@@ -487,7 +487,7 @@ Name | Type | Description  | Notes
 ------------- | ------------- | ------------- | -------------
 
  **xRequestID** | **optional.String**| Optional requestID allows application developer to trace requests through the systems logs | 
- **xUserID** | **optional.String**| Unique userID set by an auth proxy or client to identify and isolate objects. | 
+ **xNamespace** | **optional.String**| Value used to separate and identify models | 
 
 ### Return type
 
@@ -533,7 +533,7 @@ Name | Type | Description  | Notes
 ------------- | ------------- | ------------- | -------------
 
  **xRequestID** | **optional.String**| Optional requestID allows application developer to trace requests through the systems logs | 
- **xUserID** | **optional.String**| Unique userID set by an auth proxy or client to identify and isolate objects. | 
+ **xNamespace** | **optional.String**| Value used to separate and identify models | 
 
 ### Return type
 
@@ -581,7 +581,7 @@ Name | Type | Description  | Notes
 
 
  **xRequestID** | **optional.String**| Optional requestID allows application developer to trace requests through the systems logs | 
- **xUserID** | **optional.String**| Unique userID set by an auth proxy or client to identify and isolate objects. | 
+ **xNamespace** | **optional.String**| Value used to separate and identify models | 
 
 ### Return type
 
@@ -627,7 +627,7 @@ Name | Type | Description  | Notes
 ------------- | ------------- | ------------- | -------------
 
  **xRequestID** | **optional.String**| Optional requestID allows application developer to trace requests through the systems logs | 
- **xUserID** | **optional.String**| Unique userID set by an auth proxy or client to identify and isolate objects. | 
+ **xNamespace** | **optional.String**| Value used to separate and identify models | 
 
 ### Return type
 
@@ -675,7 +675,7 @@ Name | Type | Description  | Notes
 
 
  **xRequestID** | **optional.String**| Optional requestID allows application developer to trace requests through the systems logs | 
- **xUserID** | **optional.String**| Unique userID set by an auth proxy or client to identify and isolate objects. | 
+ **xNamespace** | **optional.String**| Value used to separate and identify models | 
 
 ### Return type
 
@@ -721,7 +721,7 @@ Name | Type | Description  | Notes
 ------------- | ------------- | ------------- | -------------
 
  **xRequestID** | **optional.String**| Optional requestID allows application developer to trace requests through the systems logs | 
- **xUserID** | **optional.String**| Unique userID set by an auth proxy or client to identify and isolate objects. | 
+ **xNamespace** | **optional.String**| Value used to separate and identify models | 
 
 ### Return type
 
@@ -771,7 +771,7 @@ Name | Type | Description  | Notes
 
 
  **xRequestID** | **optional.String**| Optional requestID allows application developer to trace requests through the systems logs | 
- **xUserID** | **optional.String**| Unique userID set by an auth proxy or client to identify and isolate objects. | 
+ **xNamespace** | **optional.String**| Value used to separate and identify models | 
 
 ### Return type
 
@@ -849,7 +849,7 @@ Name | Type | Description  | Notes
 
 
  **xRequestID** | **optional.String**| Optional requestID allows application developer to trace requests through the systems logs | 
- **xUserID** | **optional.String**| Unique userID set by an auth proxy or client to identify and isolate objects. | 
+ **xNamespace** | **optional.String**| Value used to separate and identify models | 
 
 ### Return type
 
@@ -895,7 +895,7 @@ Name | Type | Description  | Notes
 ------------- | ------------- | ------------- | -------------
 
  **xRequestID** | **optional.String**| Optional requestID allows application developer to trace requests through the systems logs | 
- **xUserID** | **optional.String**| Unique userID set by an auth proxy or client to identify and isolate objects. | 
+ **xNamespace** | **optional.String**| Value used to separate and identify models | 
 
 ### Return type
 
@@ -943,7 +943,7 @@ Name | Type | Description  | Notes
 
 
  **xRequestID** | **optional.String**| Optional requestID allows application developer to trace requests through the systems logs | 
- **xUserID** | **optional.String**| Unique userID set by an auth proxy or client to identify and isolate objects. | 
+ **xNamespace** | **optional.String**| Value used to separate and identify models | 
 
 ### Return type
 
@@ -1075,7 +1075,7 @@ Name | Type | Description  | Notes
 
 
  **xRequestID** | **optional.String**| Optional requestID allows application developer to trace requests through the systems logs | 
- **xUserID** | **optional.String**| Unique userID set by an auth proxy or client to identify and isolate objects. | 
+ **xNamespace** | **optional.String**| Value used to separate and identify models | 
 
 ### Return type
 
@@ -1125,7 +1125,7 @@ Name | Type | Description  | Notes
 
 
  **xRequestID** | **optional.String**| Optional requestID allows application developer to trace requests through the systems logs | 
- **xUserID** | **optional.String**| Unique userID set by an auth proxy or client to identify and isolate objects. | 
+ **xNamespace** | **optional.String**| Value used to separate and identify models | 
 
 ### Return type
 
diff --git a/version.go b/version.go
index 097411f..196d9ca 100644
--- a/version.go
+++ b/version.go
@@ -5,4 +5,4 @@
 package customers
 
 // Version number
-const Version = "v0.5.0-dev2"
+const Version = "v0.5.0-dev3"


Test patch:
diff --git a/cmd/server/approval_test.go b/cmd/server/approval_test.go
index 3818c3b..7a152f5 100644
--- a/cmd/server/approval_test.go
+++ b/cmd/server/approval_test.go
@@ -41,7 +41,7 @@ func TestCustomers__updateCustomerStatus(t *testing.T) {
 	if err != nil {
 		t.Fatal(err)
 	}
-	req.Header.Set("x-user-id", "test")
+	req.Header.Set("x-namespace", "test")
 	req.Header.Set("x-request-id", "test")
 
 	resp, err := http.DefaultClient.Do(req)
@@ -155,7 +155,7 @@ func TestCustomers__updateCustomerAddress(t *testing.T) {
 	if err != nil {
 		t.Fatal(err)
 	}
-	req.Header.Set("x-user-id", "test")
+	req.Header.Set("x-namespace", "test")
 	req.Header.Set("x-request-id", "test")
 
 	resp, err := http.DefaultClient.Do(req)
@@ -222,7 +222,7 @@ func TestCustomerRepository__updateCustomerAddress(t *testing.T) {
 			},
 		},
 	}).asCustomer(testCustomerSSNStorage(t))
-	if err := repo.createCustomer(cust); err != nil {
+	if err := repo.createCustomer(cust, "namespace"); err != nil {
 		t.Fatal(err)
 	}
 
diff --git a/cmd/server/customer_search_scope_test.go b/cmd/server/customer_search_scope_test.go
index 37b9d17..31310c6 100644
--- a/cmd/server/customer_search_scope_test.go
+++ b/cmd/server/customer_search_scope_test.go
@@ -33,6 +33,7 @@ func (scope *Scope) GetCustomers(query string) ([]*client.Customer, error) {
 	addCustomerRoutes(log.NewNopLogger(), router, scope.customerRepo, nil, nil)
 	w := httptest.NewRecorder()
 	req := httptest.NewRequest("GET", "/customers"+query, nil)
+	req.Header.Set("X-Namespace", "namespace")
 	router.ServeHTTP(w, req)
 
 	var customers []*client.Customer
@@ -64,7 +65,7 @@ func (scope *Scope) CreateCustomer(firstName, lastName, email string, customerTy
 		Email:     email,
 		Type:      customerType,
 	}).asCustomer(testCustomerSSNStorage(scope.t))
-	if err := scope.customerRepo.createCustomer(cust); err != nil {
+	if err := scope.customerRepo.createCustomer(cust, "namespace"); err != nil {
 		scope.t.Error(err)
 	}
 	return *cust
diff --git a/cmd/server/customer_search_test.go b/cmd/server/customer_search_test.go
index 539d58b..47f56fe 100644
--- a/cmd/server/customer_search_test.go
+++ b/cmd/server/customer_search_test.go
@@ -26,6 +26,7 @@ func TestCustomersSearchRouter(t *testing.T) {
 
 	w := httptest.NewRecorder()
 	req := httptest.NewRequest("GET", "/customers?query=jane+doe", nil)
+	req.Header.Set("X-Namespace", "namespace")
 	router.ServeHTTP(w, req)
 
 	// verify with zero results we don't return null
@@ -42,13 +43,14 @@ func TestCustomersSearchRouter(t *testing.T) {
 		LastName:  "Doe",
 		Email:     "jane@example.com",
 	}).asCustomer(testCustomerSSNStorage(t))
-	if err := repo.createCustomer(cust); err != nil {
+	if err := repo.createCustomer(cust, "namespace"); err != nil {
 		t.Error(err)
 	}
 
 	// find a customer from their partial name
 	w = httptest.NewRecorder()
 	req = httptest.NewRequest("GET", "/customers?query=jane", nil)
+	req.Header.Set("X-Namespace", "namespace")
 	router.ServeHTTP(w, req)
 
 	var resp []*client.Customer
@@ -62,6 +64,7 @@ func TestCustomersSearchRouter(t *testing.T) {
 	// find a customer from full name
 	w = httptest.NewRecorder()
 	req = httptest.NewRequest("GET", "/customers?query=jane+doe", nil)
+	req.Header.Set("X-Namespace", "namespace")
 	router.ServeHTTP(w, req)
 
 	var resp2 []*client.Customer
@@ -90,10 +93,11 @@ func TestCustomerSearch__query(t *testing.T) {
 
 	// Query search
 	query, args := buildSearchQuery(searchParams{
-		Query: "jane doe",
-		Count: 100,
+		Namespace: "foo",
+		Query:     "jane doe",
+		Count:     100,
 	})
-	if query != "select customer_id from customers where deleted_at is null and lower(first_name) || \" \" || lower(last_name) LIKE ? order by created_at desc limit ?;" {
+	if query != "select customer_id from customers where deleted_at is null and namespace = ? and lower(first_name) || \" \" || lower(last_name) LIKE ? order by created_at desc limit ?;" {
 		t.Errorf("unexpected query: %q", query)
 	}
 	if err := prepare(sqliteDB.DB, query); err != nil {
@@ -102,15 +106,16 @@ func TestCustomerSearch__query(t *testing.T) {
 	if err := prepare(mysqlDB.DB, query); err != nil {
 		t.Errorf("mysql: %v", err)
 	}
-	if len(args) != 2 {
+	if len(args) != 3 {
 		t.Errorf("unexpected args: %#v", args)
 	}
 
 	// Eamil search
 	query, args = buildSearchQuery(searchParams{
-		Email: "jane.doe@moov.io",
+		Namespace: "foo",
+		Email:     "jane.doe@moov.io",
 	})
-	if query != "select customer_id from customers where deleted_at is null and lower(email) like ? order by created_at desc limit ?;" {
+	if query != "select customer_id from customers where deleted_at is null and namespace = ? and lower(email) like ? order by created_at desc limit ?;" {
 		t.Errorf("unexpected query: %q", query)
 	}
 	if err := prepare(sqliteDB.DB, query); err != nil {
@@ -119,17 +124,18 @@ func TestCustomerSearch__query(t *testing.T) {
 	if err := prepare(mysqlDB.DB, query); err != nil {
 		t.Errorf("mysql: %v", err)
 	}
-	if len(args) != 2 {
+	if len(args) != 3 {
 		t.Errorf("unexpected args: %#v", args)
 	}
 
 	// Query and Eamil saerch
 	query, args = buildSearchQuery(searchParams{
-		Query: "jane doe",
-		Email: "jane.doe@moov.io",
-		Count: 25,
+		Namespace: "foo",
+		Query:     "jane doe",
+		Email:     "jane.doe@moov.io",
+		Count:     25,
 	})
-	if query != "select customer_id from customers where deleted_at is null and lower(first_name) || \" \" || lower(last_name) LIKE ? and lower(email) like ? order by created_at desc limit ?;" {
+	if query != "select customer_id from customers where deleted_at is null and namespace = ? and lower(first_name) || \" \" || lower(last_name) LIKE ? and lower(email) like ? order by created_at desc limit ?;" {
 		t.Errorf("unexpected query: %q", query)
 	}
 	if err := prepare(sqliteDB.DB, query); err != nil {
@@ -138,7 +144,7 @@ func TestCustomerSearch__query(t *testing.T) {
 	if err := prepare(mysqlDB.DB, query); err != nil {
 		t.Errorf("mysql: %v", err)
 	}
-	if len(args) != 3 {
+	if len(args) != 4 {
 		t.Errorf("unexpected args: %#v", args)
 	}
 }
diff --git a/cmd/server/customers_test.go b/cmd/server/customers_test.go
index 5777015..929e80e 100644
--- a/cmd/server/customers_test.go
+++ b/cmd/server/customers_test.go
@@ -41,7 +41,7 @@ func (r *testCustomerRepository) getCustomer(customerID string) (*client.Custome
 	return r.customer, nil
 }
 
-func (r *testCustomerRepository) createCustomer(c *client.Customer) error {
+func (r *testCustomerRepository) createCustomer(c *client.Customer, namespace string) error {
 	r.createdCustomer = c
 	return r.err
 }
@@ -128,13 +128,13 @@ func TestCustomers__GetCustomer(t *testing.T) {
 		LastName:  "Doe",
 		Email:     "jane@example.com",
 	}).asCustomer(testCustomerSSNStorage(t))
-	if err := repo.createCustomer(cust); err != nil {
+	if err := repo.createCustomer(cust, "namespace"); err != nil {
 		t.Fatal(err)
 	}
 
 	w := httptest.NewRecorder()
 	req := httptest.NewRequest("GET", fmt.Sprintf("/customers/%s", cust.CustomerID), nil)
-	req.Header.Set("x-user-id", "test")
+	req.Header.Set("x-namespace", "test")
 	req.Header.Set("x-request-id", "test")
 
 	router := mux.NewRouter()
@@ -160,7 +160,7 @@ func TestCustomers__GetCustomerEmpty(t *testing.T) {
 
 	w := httptest.NewRecorder()
 	req := httptest.NewRequest("GET", fmt.Sprintf("/customers/%s", base.ID()), nil)
-	req.Header.Set("x-user-id", "test")
+	req.Header.Set("x-namespace", "test")
 	req.Header.Set("x-request-id", "test")
 
 	router := mux.NewRouter()
@@ -180,7 +180,7 @@ func TestCustomerRepository__createCustomer(t *testing.T) {
 			LastName:  "Doe",
 			Email:     "jane@example.com",
 		}).asCustomer(testCustomerSSNStorage(t))
-		if err := repo.createCustomer(cust); err != nil {
+		if err := repo.createCustomer(cust, "namespace"); err != nil {
 			t.Fatal(err)
 		}
 	}
@@ -201,7 +201,7 @@ func TestCustomers__GetCustomersError(t *testing.T) {
 
 	w := httptest.NewRecorder()
 	req := httptest.NewRequest("GET", "/customers/foo", nil)
-	req.Header.Set("x-user-id", "test")
+	req.Header.Set("x-namespace", "test")
 	req.Header.Set("x-request-id", "test")
 
 	router := mux.NewRouter()
@@ -286,7 +286,7 @@ func TestCustomers__createCustomer(t *testing.T) {
 	address := `{"type": "home", "address1": "123 1st St", "city": "Denver", "state": "CO", "postalCode": "12345", "country": "USA"}`
 	body := fmt.Sprintf(`{"firstName": "jane", "lastName": "doe", "email": "jane@example.com", "birthDate": "1991-04-01", "ssn": "123456789", "type": "individual", "phones": [%s], "addresses": [%s]}`, phone, address)
 	req := httptest.NewRequest("POST", "/customers", strings.NewReader(body))
-	req.Header.Set("x-user-id", "test")
+	req.Header.Set("x-namespace", "test")
 	req.Header.Set("x-request-id", "test")
 
 	repo := createTestCustomerRepository(t)
@@ -314,7 +314,7 @@ func TestCustomers__createCustomer(t *testing.T) {
 	// sad path
 	w = httptest.NewRecorder()
 	req = httptest.NewRequest("POST", "/customers", strings.NewReader("null"))
-	req.Header.Set("x-user-id", "test")
+	req.Header.Set("x-namespace", "test")
 	req.Header.Set("x-request-id", "test")
 	router.ServeHTTP(w, req)
 	w.Flush()
@@ -326,7 +326,7 @@ func TestCustomers__createCustomer(t *testing.T) {
 	// customerSSNStorage sad path
 	w = httptest.NewRecorder()
 	req = httptest.NewRequest("POST", "/customers", strings.NewReader(body))
-	req.Header.Set("x-user-id", "test")
+	req.Header.Set("x-namespace", "test")
 
 	if r, ok := customerSSNStorage.repo.(*testCustomerSSNRepository); !ok {
 		t.Fatalf("got %T", customerSSNStorage.repo)
@@ -384,7 +384,7 @@ func TestCustomers__repository(t *testing.T) {
 			},
 		},
 	}).asCustomer(testCustomerSSNStorage(t))
-	if err := repo.createCustomer(cust); err != nil {
+	if err := repo.createCustomer(cust, "namespace"); err != nil {
 		t.Error(err)
 	}
 	if cust == nil {
@@ -416,7 +416,7 @@ func TestCustomerRepository__updateCustomerStatus(t *testing.T) {
 		LastName:  "Doe",
 		Email:     "jane@example.com",
 	}).asCustomer(testCustomerSSNStorage(t))
-	if err := repo.createCustomer(cust); err != nil {
+	if err := repo.createCustomer(cust, "namespace"); err != nil {
 		t.Fatal(err)
 	}
 
@@ -444,7 +444,7 @@ func TestCustomers__replaceCustomerMetadata(t *testing.T) {
 		LastName:  "Doe",
 		Email:     "jane@example.com",
 	}).asCustomer(testCustomerSSNStorage(t))
-	if err := repo.createCustomer(cust); err != nil {
+	if err := repo.createCustomer(cust, "namespace"); err != nil {
 		t.Fatal(err)
 	}
 
@@ -452,7 +452,7 @@ func TestCustomers__replaceCustomerMetadata(t *testing.T) {
 
 	w := httptest.NewRecorder()
 	req := httptest.NewRequest("PUT", fmt.Sprintf("/customers/%s/metadata", cust.CustomerID), body)
-	req.Header.Set("x-user-id", "test")
+	req.Header.Set("x-namespace", "test")
 	req.Header.Set("x-request-id", "test")
 
 	router := mux.NewRouter()
@@ -477,7 +477,7 @@ func TestCustomers__replaceCustomerMetadata(t *testing.T) {
 
 	w = httptest.NewRecorder()
 	req = httptest.NewRequest("PUT", "/customers/foo/metadata", nil)
-	req.Header.Set("x-user-id", "test")
+	req.Header.Set("x-namespace", "test")
 	req.Header.Set("x-request-id", "test")
 
 	router2 := mux.NewRouter()
@@ -499,7 +499,7 @@ func TestCustomers__replaceCustomerMetadataInvalid(t *testing.T) {
 		LastName:  "Doe",
 		Email:     "jane@example.com",
 	}).asCustomer(testCustomerSSNStorage(t))
-	if err := repo.createCustomer(cust); err != nil {
+	if err := repo.createCustomer(cust, "namespace"); err != nil {
 		t.Fatal(err)
 	}
 
@@ -513,7 +513,7 @@ func TestCustomers__replaceCustomerMetadataInvalid(t *testing.T) {
 
 	w := httptest.NewRecorder()
 	req := httptest.NewRequest("PUT", fmt.Sprintf("/customers/%s/metadata", cust.CustomerID), &buf)
-	req.Header.Set("x-user-id", "test")
+	req.Header.Set("x-namespace", "test")
 	req.Header.Set("x-request-id", "test")
 
 	router := mux.NewRouter()
@@ -528,7 +528,7 @@ func TestCustomers__replaceCustomerMetadataInvalid(t *testing.T) {
 	// invalid JSON
 	w = httptest.NewRecorder()
 	req = httptest.NewRequest("PUT", fmt.Sprintf("/customers/%s/metadata", cust.CustomerID), strings.NewReader("{invalid-json"))
-	req.Header.Set("x-user-id", "test")
+	req.Header.Set("x-namespace", "test")
 	req.Header.Set("x-request-id", "test")
 
 	router.ServeHTTP(w, req)
@@ -546,7 +546,7 @@ func TestCustomers__replaceCustomerMetadataError(t *testing.T) {
 
 	w := httptest.NewRecorder()
 	req := httptest.NewRequest("PUT", "/customers/foo/metadata", body)
-	req.Header.Set("x-user-id", "test")
+	req.Header.Set("x-namespace", "test")
 	req.Header.Set("x-request-id", "test")
 
 	router := mux.NewRouter()
@@ -623,7 +623,7 @@ func TestCustomers__addCustomerAddress(t *testing.T) {
 
 	w := httptest.NewRecorder()
 	req := httptest.NewRequest("POST", "/customers/foo/address", strings.NewReader(address))
-	req.Header.Set("x-user-id", "test")
+	req.Header.Set("x-namespace", "test")
 	req.Header.Set("x-request-id", "test")
 
 	router := mux.NewRouter()
@@ -639,7 +639,7 @@ func TestCustomers__addCustomerAddress(t *testing.T) {
 	repo.err = nil
 
 	req = httptest.NewRequest("POST", "/customers/foo/address", strings.NewReader(address))
-	req.Header.Set("x-user-id", "test")
+	req.Header.Set("x-namespace", "test")
 	req.Header.Set("x-request-id", "test")
 
 	w = httptest.NewRecorder()
@@ -660,7 +660,7 @@ func TestCustomersRepository__addCustomerAddress(t *testing.T) {
 		LastName:  "Doe",
 		Email:     "jane@example.com",
 	}).asCustomer(testCustomerSSNStorage(t))
-	if err := repo.createCustomer(cust); err != nil {
+	if err := repo.createCustomer(cust, "namespace"); err != nil {
 		t.Fatal(err)
 	}
 
@@ -773,7 +773,7 @@ func TestCustomers__minimumFields(t *testing.T) {
 	w := httptest.NewRecorder()
 	body := `{"firstName": "jane", "lastName": "doe", "type": "individual"}`
 	req := httptest.NewRequest("POST", "/customers", strings.NewReader(body))
-	req.Header.Set("x-user-id", "test")
+	req.Header.Set("x-namespace", "test")
 	req.Header.Set("x-request-id", "test")
 
 	repo := createTestCustomerRepository(t)
@@ -794,7 +794,7 @@ func TestCustomers__minimumFields(t *testing.T) {
 func TestCustomers__BadReq(t *testing.T) {
 	w := httptest.NewRecorder()
 	req := httptest.NewRequest("POST", "/customers", strings.NewReader("®"))
-	req.Header.Set("x-user-id", "test")
+	req.Header.Set("x-namespace", "test")
 	req.Header.Set("x-request-id", "test")
 
 	repo := createTestCustomerRepository(t)
diff --git a/cmd/server/disclaimers_test.go b/cmd/server/disclaimers_test.go
index 3dac307..d9b4bec 100644
--- a/cmd/server/disclaimers_test.go
+++ b/cmd/server/disclaimers_test.go
@@ -252,7 +252,7 @@ func TestDisclaimersAdmin__create(t *testing.T) {
 	if err != nil {
 		t.Fatal(err)
 	}
-	req.Header.Set("x-user-id", "test")
+	req.Header.Set("x-namespace", "test")
 	req.Header.Set("x-request-id", "test")
 
 	resp, err := http.DefaultClient.Do(req)
@@ -289,7 +289,7 @@ func TestDisclaimersAdmin__createErr(t *testing.T) {
 	if err != nil {
 		t.Fatal(err)
 	}
-	req.Header.Set("x-user-id", "test")
+	req.Header.Set("x-namespace", "test")
 	req.Header.Set("x-request-id", "test")
 
 	resp, err := http.DefaultClient.Do(req)
@@ -316,7 +316,7 @@ func TestDisclaimersAdmin__createMethodErr(t *testing.T) {
 	if err != nil {
 		t.Fatal(err)
 	}
-	req.Header.Set("x-user-id", "test")
+	req.Header.Set("x-namespace", "test")
 	req.Header.Set("x-request-id", "test")
 
 	resp, err := http.DefaultClient.Do(req)
@@ -344,7 +344,7 @@ func TestDisclaimersAdmin__createJSONErr(t *testing.T) {
 	if err != nil {
 		t.Fatal(err)
 	}
-	req.Header.Set("x-user-id", "test")
+	req.Header.Set("x-namespace", "test")
 	req.Header.Set("x-request-id", "test")
 
 	resp, err := http.DefaultClient.Do(req)
diff --git a/cmd/server/route/namespace_test.go b/cmd/server/route/namespace_test.go
new file mode 100644
index 0000000..d10e9cf
--- /dev/null
+++ b/cmd/server/route/namespace_test.go
@@ -0,0 +1,34 @@
+// Copyright 2020 The Moov Authors
+// Use of this source code is governed by an Apache License
+// license that can be found in the LICENSE file.
+
+package route
+
+import (
+	"net/http"
+	"net/http/httptest"
+	"testing"
+)
+
+func TestRoute__GetNamespace(t *testing.T) {
+	w := httptest.NewRecorder()
+	req := httptest.NewRequest("GET", "/ping", nil)
+	req.Header.Set("x-namespace", "foo")
+
+	if ns := GetNamespace(w, req); ns != "foo" {
+		t.Errorf("unexpected ns: %v", ns)
+	}
+}
+
+func TestRoute__GetNamespaceMissing(t *testing.T) {
+	w := httptest.NewRecorder()
+	req := httptest.NewRequest("GET", "/ping", nil)
+
+	if ns := GetNamespace(w, req); ns != "" {
+		t.Errorf("unexpected ns: %v", ns)
+	}
+
+	if w.Code != http.StatusBadRequest {
+		t.Errorf("bogus HTTP status: %d", w.Code)
+	}
+}