# Create order invalid warehouse\_id

**URL:** <https://community.shiphero.com/t/create-order-invalid-warehouse-id/1581>\
**Category:** GraphQL API\
**Created:** [September 23, 2021, 8:25am UTC](https://community.shiphero.com/t/create-order-invalid-warehouse-id/1581 "2021-09-23T08:25:30Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![shannenscreencloud](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@shannenscreencloud](https://community.shiphero.com/u/shannenscreencloud)\
**Post date:** [September 23, 2021, 8:25am UTC](https://community.shiphero.com/t/create-order-invalid-warehouse-id/1581/1 "2021-09-23T08:25:30Z")

</div>

I am trying to test the mutation `order_create` in my [https://sfapp.shiphero.com/](https://sfapp.shiphero.com/) test account. I have created a product successfully but the create order is failing. I have double checked the warehouse\_id on my account and it is correct.

Could I get some help as to why this is failing please?

```auto
order_create(
    data: {
      order_number: "11223344"
      fulfillment_status: "pending"
      order_date: "2021-09-22"
      shipping_address: {
        first_name: "John"
        last_name: "Johnson"
        company: "The Johnson Co"
        address1: "2543 Duck St."
        address2: "Apt. 2"
        city: "Oklahoma"
        state: "Oklahoma"
        state_code: "OK"
        zip: "73008"
        country: "US"
        country_code: "US"
      }
      line_items: {
        sku: "testSKU12345"
        partner_line_item_id: "282960815"
        quantity: 2
        price: "150.00"
        product_name: "Example Product"
        fulfillment_status: "pending"
        quantity_pending_fulfillment: 2
        warehouse_id: "V2FyZWhvdXNlOjc2Nzk2"
      }
      required_ship_date: "2021-09-26"
    }
  )

```

Error message returned

```auto
{
      "message": "Invalid warehouse_id in order line item with sku testSKU12345",
      "operation": "order_create",
      "field": "order_create",
      "request_id": "614c38e7c3ced2a89e775eba",
      "code": 3
    }

```

If I take out warehouse\_id I still get an error

```auto
      "message": "Unexpected Error",
      "operation": "order_create",
      "field": "order_create",
      "request_id": "614c38c0d3891266fc2cac0e",
      "code": 22
    }

```

---

<div class="post-metadata">

**Author:** ![Theresa](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/theresa/32/377_2.png) [@Theresa](https://community.shiphero.com/u/Theresa)\
**Post date:** [September 24, 2021, 5:58pm UTC](https://community.shiphero.com/t/create-order-invalid-warehouse-id/1581/2 "2021-09-24T17:58:57Z")

</div>

We have updated this to a trial. Please try again, with the warehouse id you originally had

---

<div class="post-metadata">

**Author:** ![shannenscreencloud](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@shannenscreencloud](https://community.shiphero.com/u/shannenscreencloud)\
**Post date:** [September 27, 2021, 7:51am UTC](https://community.shiphero.com/t/create-order-invalid-warehouse-id/1581/3 "2021-09-27T07:51:09Z")

</div>

Hi Theresa,

I am still getting the same error message.

```auto
      "message": "Invalid warehouse_id in order line item with sku testSKU12345",
      "operation": "order_create",
      "field": "order_create",
      "request_id": "6151778c67b994db5f01b0ee",
      "code": 3

```

Get product by id result:

```
    "name": "Test product",
    "sku": "testSKU12345",
    "barcode": "495456475",
    "country_of_manufacture": "US",
    "created_at": "2021-09-22T11:24:43",
    "warehouse_products": [
      {
        "warehouse_id": "V2FyZWhvdXNlOjc2Nzk2",
        "warehouse_identifier": "Primary",
        "on_hand": 200,
        "inventory_bin": "",
        "inventory_overstock_bin": " ",
        "reserve_inventory": 0,
        "replenishment_level": 0,
        "reorder_amount": 1,
        "reorder_level": 0,
        "custom": false
      }

```

Can you please tell me the correct warehouse\_id that I can create an order with on my account?

---

<div class="post-metadata">

**Author:** ![shannenscreencloud](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@shannenscreencloud](https://community.shiphero.com/u/shannenscreencloud)\
**Post date:** [September 27, 2021, 2:59pm UTC](https://community.shiphero.com/t/create-order-invalid-warehouse-id/1581/4 "2021-09-27T14:59:05Z")

</div>

@Theresa What does updating my account to a trial account do? Is that the same as a develop test account?

---

<div class="post-metadata">

**Author:** ![Theresa](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/theresa/32/377_2.png) [@Theresa](https://community.shiphero.com/u/Theresa)\
**Post date:** [September 27, 2021, 8:40pm UTC](https://community.shiphero.com/t/create-order-invalid-warehouse-id/1581/5 "2021-09-27T20:40:58Z")

</div>

You will need to go to [https://app.shiphero.com/dashboard/users](https://app.shiphero.com/dashboard/users) and add a third-party developer account.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/shiphero/original/1X/aa6f225f37e9c1e9a730540210d3d04796e174aa.png)

---

<div class="post-metadata">

**Author:** ![shannenscreencloud](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@shannenscreencloud](https://community.shiphero.com/u/shannenscreencloud)\
**Post date:** [September 28, 2021, 6:56am UTC](https://community.shiphero.com/t/create-order-invalid-warehouse-id/1581/6 "2021-09-28T06:56:45Z")

</div>

Hi @Theresa my account is a fulfilment account - [https://sfapp.shiphero.com/](https://sfapp.shiphero.com/) and I do not have that option in my UI to add third party developers

 ![Screenshot 2021-09-28 at 07.51.03](https://us1.discourse-cdn.com/flex020/uploads/shiphero/original/1X/79e8b7b70749f60a0a01c0e2f2d02e2c082e96b1.png)

I have generated a new access token for my user on that account and ran the mutation again. Still getting the same error message.

```
  "message": "Invalid warehouse_id in order line item with sku testSKU12345",
  "operation": "order_create",
  "field": "order_create",
  "request_id": "6152bc30f5041f35ab7b02bd",
  "code": 3

```

I have been able to create product and run other queries with my access token. Could you try to run the query on my account on your side please?

---

<div class="post-metadata">

**Author:** ![Theresa](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/theresa/32/377_2.png) [@Theresa](https://community.shiphero.com/u/Theresa)\
**Post date:** [September 28, 2021, 6:01pm UTC](https://community.shiphero.com/t/create-order-invalid-warehouse-id/1581/7 "2021-09-28T18:01:14Z")

</div>

I was able to send you a developer token and refresh token to the email you are registered with. Give that a go!

---

<div class="post-metadata">

**Author:** ![shannenscreencloud](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@shannenscreencloud](https://community.shiphero.com/u/shannenscreencloud)\
**Post date:** [September 28, 2021, 9:03pm UTC](https://community.shiphero.com/t/create-order-invalid-warehouse-id/1581/8 "2021-09-28T21:03:26Z")

</div>

Hi Theresa,

Thanks for the access token. I am still unable to create an order.  
“request\_id”: “6153831309fd7c885c082b7e”,

Could you please try create an order on my account?

I’ve also tried the Upload CSV to upload orders but I am getting the error:  
`Warehouse primary is invalid. Valid warehouses are: `  
Which suggests that there is no valid warehouses on my account.

I have tried to create a shipping plan too and getting the error

```auto
      "message": "Shipping plans can only be created for ShipHero Fulfillment warehouses.",
      "operation": "shipping_plan_create",
      "field": "shipping_plan_create",
      "request_id": "615409ee5b8c5d79f344088a",
      "code": 7
    }

```

Mutation details

```auto
mutation {
  shipping_plan_create(
    data: {
      subtotal: "0.00"
      shipping_price: "0.00"
      total_price: "0.00"
      warehouse_id: "V2FyZWhvdXNlOjc2Nzk2"
      line_items: [
        { 
          product_name: "Test product",
          sku: "testSKU12345", 
          quantity: 100 
        }
      ]
    }
  ) {
    request_id
    complexity
    shipping_plan {
      id
      account_id
      fulfillment_status
      warehouse_id
    }
  }
}

```

It seems like the warehouse is not configured correctly on my account. Could you and the fulfilment team please help update my warehouse so that I can create an order?

---

<div class="post-metadata">

**Author:** ![shannenscreencloud](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@shannenscreencloud](https://community.shiphero.com/u/shannenscreencloud)\
**Post date:** [September 28, 2021, 9:11pm UTC](https://community.shiphero.com/t/create-order-invalid-warehouse-id/1581/9 "2021-09-28T21:11:55Z")

</div>

Would you be available for a screenshare?

We need the ability to create orders on Thursday with out live account. I haven’t been able to create an order with this test account, I am a bit nervous that when I try the same thing on our live site I still won’t be able to create an order. Is there a way to test creating orders on the live site?

---

<div class="post-metadata">

**Author:** ![Theresa](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/theresa/32/377_2.png) [@Theresa](https://community.shiphero.com/u/Theresa)\
**Post date:** [September 29, 2021, 3:00pm UTC](https://community.shiphero.com/t/create-order-invalid-warehouse-id/1581/10 "2021-09-29T15:00:14Z")

</div>

I emailed you a 3rd party developer token. Did you get it? Let me check on the best way to do a test on a live fulfillment account.

---

<div class="post-metadata">

**Author:** ![shannenscreencloud](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@shannenscreencloud](https://community.shiphero.com/u/shannenscreencloud)\
**Post date:** [September 29, 2021, 3:06pm UTC](https://community.shiphero.com/t/create-order-invalid-warehouse-id/1581/11 "2021-09-29T15:06:12Z")

</div>

Hi Theresa,

I got the 3rd party developer token and used it to try the create\_order mutation. I got the same error message.

I’ve also tried the Upload CSV to upload orders but I am getting the error:  
`Warehouse primary is invalid. Valid warehouses are:`

Which suggests the warehouses are not configured correctly on my account.

Thanks Theresa, look forward to hearing from you on how to test on a live fulfilment account

---

<div class="post-metadata">

**Author:** ![Theresa](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/theresa/32/377_2.png) [@Theresa](https://community.shiphero.com/u/Theresa)\
**Post date:** [September 29, 2021, 4:05pm UTC](https://community.shiphero.com/t/create-order-invalid-warehouse-id/1581/12 "2021-09-29T16:05:56Z")

</div>

Hi Shannen,  
You could create an order in the production account with a hold.

---

<div class="post-metadata">

**Author:** ![shannenscreencloud](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@shannenscreencloud](https://community.shiphero.com/u/shannenscreencloud)\
**Post date:** [September 29, 2021, 4:22pm UTC](https://community.shiphero.com/t/create-order-invalid-warehouse-id/1581/13 "2021-09-29T16:22:01Z")

</div>

Hi Theresa,  
What do you mean by `with a hold`? What parameter is that on the create\_order mutation?

---

<div class="post-metadata">

**Author:** ![Theresa](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/theresa/32/377_2.png) [@Theresa](https://community.shiphero.com/u/Theresa)\
**Post date:** [September 29, 2021, 6:04pm UTC](https://community.shiphero.com/t/create-order-invalid-warehouse-id/1581/14 "2021-09-29T18:04:23Z")

</div>

in the order\_create mutation, you can send in data for holds:

```auto
mutation {
  order_create(
    data: {
      order_number: "1234"
      shipping_address: { first_name: "Joe", last_name: "Smith" }
      holds: { operator_hold: true }
    }
  ) {
    request_id
    complexity
    order {
      line_items {
        edges {
          node {
            sku
            barcode
          }
        }
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![shannenscreencloud](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@shannenscreencloud](https://community.shiphero.com/u/shannenscreencloud)\
**Post date:** [September 29, 2021, 7:39pm UTC](https://community.shiphero.com/t/create-order-invalid-warehouse-id/1581/15 "2021-09-29T19:39:25Z")

</div>

Brilliant thanks Theresa. I will try that on our live site.  
Is it still possible to get my test site configured correctly, with the warehouse updated, so I can test out different calls please?

Thanks for your help,  
Shannen

---

<div class="post-metadata">

**Author:** ![shannenscreencloud](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@shannenscreencloud](https://community.shiphero.com/u/shannenscreencloud)\
**Post date:** [September 30, 2021, 3:44pm UTC](https://community.shiphero.com/t/create-order-invalid-warehouse-id/1581/16 "2021-09-30T15:44:55Z")

</div>

I have successfully been able to create an order on our production site that is on operator hold 🎉

@Theresa Could you help get my test account set up the same as this fulfilment account so that I can test what happens when I remove it from operator hold please?

---

<div class="post-metadata">

**Author:** ![Theresa](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/theresa/32/377_2.png) [@Theresa](https://community.shiphero.com/u/Theresa)\
**Post date:** [September 30, 2021, 10:46pm UTC](https://community.shiphero.com/t/create-order-invalid-warehouse-id/1581/17 "2021-09-30T22:46:03Z")

</div>

Yes, this is a bit trickier than original expectations but still working through it!

---

<div class="post-metadata">

**Author:** ![shannenscreencloud](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@shannenscreencloud](https://community.shiphero.com/u/shannenscreencloud)\
**Post date:** [October 4, 2021, 2:22pm UTC](https://community.shiphero.com/t/create-order-invalid-warehouse-id/1581/18 "2021-10-04T14:22:57Z")

</div>

Thanks @Theresa look forward to hearing from you

---

<div class="post-metadata">

**Author:** ![Theresa](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/theresa/32/377_2.png) [@Theresa](https://community.shiphero.com/u/Theresa)\
**Post date:** [October 6, 2021, 6:54pm UTC](https://community.shiphero.com/t/create-order-invalid-warehouse-id/1581/19 "2021-10-06T18:54:12Z")

</div>

Hi Shannen,  
I did not forget about your question. I am not sure that we can get it set 100% so the test order will come through in a fulfillment account, because of the unique nature of the warehouse. As soon as I get more information, I can pass it on!
