# Assign product to a client via API

**URL:** <https://community.shiphero.com/t/assign-product-to-a-client-via-api/881>\
**Category:** GraphQL API\
**Created:** [October 8, 2020, 3:07pm UTC](https://community.shiphero.com/t/assign-product-to-a-client-via-api/881 "2020-10-08T15:07:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![isaac.wyatt](https://avatars.discourse-cdn.com/v4/letter/i/6f9a4e/32.png) [@isaac.wyatt](https://community.shiphero.com/u/isaac.wyatt)\
**Post date:** [October 8, 2020, 3:07pm UTC](https://community.shiphero.com/t/assign-product-to-a-client-via-api/881/1 "2020-10-08T15:07:39Z")

</div>

Hi @tomasw is there a way to create a product and assign the product to a specific client through the API? As of now, we are creating products in our master 3PL account but we need to assign those SKUs to a client account.

If this cannot be done through the API, is this possible through the Bulk Edit function?

---

<div class="post-metadata">

**Author:** ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)\
**Post date:** [October 8, 2020, 3:11pm UTC](https://community.shiphero.com/t/assign-product-to-a-client-via-api/881/2 "2020-10-08T15:11:52Z")

</div>

Hi @isaac.wyatt!  
Absolutely. Products need to be created on the client account always. You can do that by either:

1. Adding a `customer_account_id` on the Mutation payload
2. Using a Bearer from the client account user

Let me know if this doesn’t help or I could explain better.  
Thanks in advance!  
Tom

---

<div class="post-metadata">

**Author:** ![isaac.wyatt](https://avatars.discourse-cdn.com/v4/letter/i/6f9a4e/32.png) [@isaac.wyatt](https://community.shiphero.com/u/isaac.wyatt)\
**Post date:** [October 8, 2020, 3:20pm UTC](https://community.shiphero.com/t/assign-product-to-a-client-via-api/881/3 "2020-10-08T15:20:30Z")

</div>

Are we able to update the customer\_account\_id in an update product mutation?

---

<div class="post-metadata">

**Author:** ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)\
**Post date:** [October 8, 2020, 4:01pm UTC](https://community.shiphero.com/t/assign-product-to-a-client-via-api/881/4 "2020-10-08T16:01:15Z")

</div>

That is correct @isaac.wyatt  
For example let say you wanted to update the product note on a SKU for a specific customer, then you could make this mutation:

```
mutation{
  product_update(data: {
    customer_account_id:"QWNjb3VudDo3NTU2"
    sku:"1122334459"
    product_note:"Test Note"
  }){
    request_id
    complexity
  }
} 

```

Being the `customer_account_id` from:

```
query {
  account {
    request_id
    complexity
    data {
      customers {
        edges {
          node {
            id
            legacy_id
          }
        }
      }
    }
  }
}
```
