# Create order return with inventory to locations

**URL:** <https://community.shiphero.com/t/create-order-return-with-inventory-to-locations/2922>\
**Category:** GraphQL API\
**Created:** [May 20, 2024, 10:29am UTC](https://community.shiphero.com/t/create-order-return-with-inventory-to-locations/2922 "2024-05-20T10:29:09Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![saif\_storage](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@saif\_storage](https://community.shiphero.com/u/saif_storage)\
**Post date:** [May 20, 2024, 10:29am UTC](https://community.shiphero.com/t/create-order-return-with-inventory-to-locations/2922/1 "2024-05-20T10:29:09Z")

</div>

Hi!  
I am trying to create the return for orders via the API. create return mutation is working fine but i have an issue that i cant make it to return the inventory back to the system at the specified bins.  
For example we have location (bin) and we want the return for specific item in the order created for that specific bin. Could not find a way to achieve this via API. Any help would be really appreciated.  
Thanks

---

<div class="post-metadata">

**Author:** ![tomasfd](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tomasfd](https://community.shiphero.com/u/tomasfd)\
**Post date:** [May 20, 2024, 3:33pm UTC](https://community.shiphero.com/t/create-order-return-with-inventory-to-locations/2922/2 "2024-05-20T15:33:29Z")

</div>

Hello @saif_storage,

You could add inventory to a bin using the API. However, returns cannot be updated from the API, so you wouldn’t be able to tell how much was received. The best way to process returns after creation is in our UI.

Have a nice day!

---

<div class="post-metadata">

**Author:** ![saif\_storage](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@saif\_storage](https://community.shiphero.com/u/saif_storage)\
**Post date:** [May 23, 2024, 8:30am UTC](https://community.shiphero.com/t/create-order-return-with-inventory-to-locations/2922/3 "2024-05-23T08:30:49Z")

</div>

Hello,  
Could you send me the link please to Change the inventory?  
Also it would be great to know if we can increase the inventory by some numbers like adding 5 to the current available inventory… is this possible?

---

<div class="post-metadata">

**Author:** ![tomasfd](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tomasfd](https://community.shiphero.com/u/tomasfd)\
**Post date:** [May 23, 2024, 4:05pm UTC](https://community.shiphero.com/t/create-order-return-with-inventory-to-locations/2922/4 "2024-05-23T16:05:37Z")

</div>

Hello @saif_storage! I checked your account and see you have Dynamic Slottin activated. Here are examples of how to manage inventory when having Dynamic Slotting: [Inventory-DS – Developer Resources | ShipHero](https://developer.shiphero.com/examples-inventory-ds/)

You can also find those mutations in our schema for more details: [Schema – Developer Resources | ShipHero](https://developer.shiphero.com/schema/)

As a 3PL, you must also pass the `customer_account_id` in your calls.

Have a nice day!

---

<div class="post-metadata">

**Author:** ![saif\_storage](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@saif\_storage](https://community.shiphero.com/u/saif_storage)\
**Post date:** [July 1, 2024, 9:31am UTC](https://community.shiphero.com/t/create-order-return-with-inventory-to-locations/2922/5 "2024-07-01T09:31:33Z")

</div>

Hello we are getting this error while we changing the inventory with location id:  
Errors: Array  
(  
[0] =\> Array  
(  
[message] =\> Cannot access the requested location. Permission denied  
[operation] =\> inventory\_add  
[field] =\> inventory\_add  
[request\_id] =\> 6682a604edebfe01ae1cffdc  
[code] =\> 9  
)

)

---

<div class="post-metadata">

**Author:** ![tomasfd](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tomasfd](https://community.shiphero.com/u/tomasfd)\
**Post date:** [July 2, 2024, 3:35pm UTC](https://community.shiphero.com/t/create-order-return-with-inventory-to-locations/2922/6 "2024-07-02T15:35:02Z")

</div>

Hello @saif_storage. The mutation is failing because you are using the `warehouse_id` from the example in our docs, which points to one of our test accounts.

You can pull you account’s warehouses using a query like this one:

```auto
query {
  account(analyze: false) {
    request_id
    data {
      legacy_id
      id
      warehouses {
        id
        legacy_id
        identifier
        profile
        address{
          name
          country
          state
          city
        }
      }
    }
  }
}

```

Have a nice day!

---

<div class="post-metadata">

**Author:** ![saif\_storage](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@saif\_storage](https://community.shiphero.com/u/saif_storage)\
**Post date:** [July 3, 2024, 9:51am UTC](https://community.shiphero.com/t/create-order-return-with-inventory-to-locations/2922/7 "2024-07-03T09:51:21Z")

</div>

Hello we are using correct warehouse\_id, account\_id and location\_id but still we are getting the same error. please check this request:

(  
[message] =\> Cannot access the requested location. Permission denied  
[operation] =\> inventory\_add  
[field] =\> inventory\_add  
[request\_id] =\> 66851dd4040ed25ebf8fd7fe  
[code] =\> 9  
)

---

<div class="post-metadata">

**Author:** ![tomasfd](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tomasfd](https://community.shiphero.com/u/tomasfd)\
**Post date:** [July 3, 2024, 12:24pm UTC](https://community.shiphero.com/t/create-order-return-with-inventory-to-locations/2922/8 "2024-07-03T12:24:04Z")

</div>

Hello @saif_storage, I see now that the `customer_account_id` passed is the 3PL, and the SKU you are attempting to modify was also created at the 3PL level instead of the child. Please make sure you create SKUs associated with child accounts. Then when moving the inventory you should keep using the token from the 3PL, but pass the `customer_account_id` where the product was created.  
Have a great day!

---

<div class="post-metadata">

**Author:** ![saif\_storage](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@saif\_storage](https://community.shiphero.com/u/saif_storage)\
**Post date:** [July 18, 2024, 8:27am UTC](https://community.shiphero.com/t/create-order-return-with-inventory-to-locations/2922/9 "2024-07-18T08:27:17Z")

</div>

Hello @tomasfd  
I wanted to understand its working. Because the product I am trying to create is the same account whose token we are using. the account\_id in the product details is the same as account\_id we are passing. Its bit confusing. Can you help with this please?  
Thanks and regards

---

<div class="post-metadata">

**Author:** ![tomasfd](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tomasfd](https://community.shiphero.com/u/tomasfd)\
**Post date:** [July 18, 2024, 7:44pm UTC](https://community.shiphero.com/t/create-order-return-with-inventory-to-locations/2922/10 "2024-07-18T19:44:45Z")

</div>

Hello @saif_storage. I meant that the product was not created in the right place. 3PLs should not own products; they store and ship products on behalf of the child accounts they have connected. If you are using a 3PL token, you need to create the product using the `customer_account_id` of the child the product needs to be associated with. Then, you would operate, move inventory, or update the details of products using the corresponding `customer_account_id`.  
Have a great day!
