# Unexpected error for order\_create and query products

**URL:** <https://community.shiphero.com/t/unexpected-error-for-order-create-and-query-products/2324>\
**Category:** GraphQL API\
**Created:** [January 21, 2023, 5:41am UTC](https://community.shiphero.com/t/unexpected-error-for-order-create-and-query-products/2324 "2023-01-21T05:41:26Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![pavanvemunuri](https://avatars.discourse-cdn.com/v4/letter/p/9fc348/32.png) [@pavanvemunuri](https://community.shiphero.com/u/pavanvemunuri)\
**Post date:** [January 21, 2023, 5:41am UTC](https://community.shiphero.com/t/unexpected-error-for-order-create-and-query-products/2324/1 "2023-01-21T05:41:26Z")

</div>

Hi Team,  
We have setup the authorization correctly. Using Bearer Token in Postman. However, below order\_create request is not working. We tried with basic account query also but no luck.  
Including both queries below.  
We keep getting error {“message”: “Unexpected error. Please contact a system administrator.”}  
We tried options like updating the password and accessing new token, selecting Content-Type value application/json . Nothing helped.  
Can you please help us resolving this. Thanks in advance.

```auto
mutation {
  order_create(
    data: {
      order_number: "TEST_SO-339975"
      shop_name: "Test Shop"
      fulfillment_status: "pending"
      order_date: "2023-01-20"
      total_tax: "0.00"
      subtotal: "0.00"
      total_discounts: "0.00"
      total_price: "0.00"
      shipping_lines: {
        title: "UPS"
        price: "0.00"
        carrier: "UPS"
        method: "Ground"
      }
      shipping_address: {
        first_name: "Test Trott"
        last_name: "Test Trott"
        city: "Vancouver"
        state: "British Columbia"
        state_code: "BC"
        zip: "V6C 3C1"
        country: "Canada"
        country_code: "CA"
        email: "test@flowhydration.com"
        phone: "604-812-2302"
      }
      line_items: {
        sku: "840277000811",
        partner_line_item_id: "TEST_P40001",
        quantity: 2,
        price: "0.00",
        product_name: "Original Product name changed here 001",
        fulfillment_status: "pending",
        quantity_pending_fulfillment: 2,
        warehouse_id: "79549"
      }
      line_items: {
        sku: "840277000637",
        partner_line_item_id: "TEST_P40002",
        quantity: 1,
        price: "0.00",
        product_name: "Original Product name changed here 002",
        fulfillment_status: "pending",
        quantity_pending_fulfillment: 1,
        warehouse_id: "79549"
      }
      line_items: {
        sku: "628055429784",
        partner_line_item_id: "TEST_P40003",
        quantity: 3,
        price: "0.00",
        product_name: "Original Product name changed here 003",
        fulfillment_status: "pending",
        quantity_pending_fulfillment: 2,
        warehouse_id: "79549"
      }	  	  	  
      required_ship_date: "2023-01-21"
    }
  ){
    request_id
    complexity
    order {
      id
      order_number
      shop_name
      fulfillment_status
      order_date
      total_tax
      subtotal
      total_discounts
      total_price
      custom_invoice_url
      account_id
      email
      profile
      packing_note
      required_ship_date
      shipping_address {
        first_name
        last_name
        company
        address1
        address2
        city
        state
        state_code
        zip
        country
        country_code
        email
        phone
      }
      line_items(first: 3) {
        edges {
          node {
            id
            sku
            product_id
            quantity
            product_name
            fulfillment_status
            quantity_pending_fulfillment
            quantity_allocated
            backorder_quantity
            eligible_for_return
            customs_value
            warehouse_id
            locked_to_warehouse_id
          }
        }
      }
    }
  }
}

```

**Second request - query**

```auto
query {
  products {
    request_id
    complexity
    data(first: 100) {
      edges {
        node {
          id
          legacy_id
          account_id
          name
          sku
          barcode
          country_of_manufacture
          dimensions {
            height
            width
            length
            weight
          }
          tariff_code
          kit
          kit_build
          no_air
          final_sale
          customs_value
          customs_description
          not_owned
          dropship
          needs_serial_number
          thumbnail
          large_thumbnail
          created_at
          updated_at
          product_note
          virtual
          ignore_on_invoice
          ignore_on_customs
          active
          warehouse_products {
            warehouse_id
            on_hand
          }
          images {
            src
          }
          tags
          kit_components {
            sku
            quantity
          }
        }
      }
    }
  }
}

```

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

---

<div class="post-metadata">

**Author:** ![sh-agent](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sh-agent](https://community.shiphero.com/u/sh-agent)\
**Post date:** [January 23, 2023, 12:14pm UTC](https://community.shiphero.com/t/unexpected-error-for-order-create-and-query-products/2324/3 "2023-01-23T12:14:47Z")

</div>

Hey @pavanvemunuri,

Thanks for reaching out!

Looking into this issue now. I’ll update you as soon as I can.

Best,  
RayanP

---

<div class="post-metadata">

**Author:** ![sh-agent](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sh-agent](https://community.shiphero.com/u/sh-agent)\
**Post date:** [January 23, 2023, 5:24pm UTC](https://community.shiphero.com/t/unexpected-error-for-order-create-and-query-products/2324/4 "2023-01-23T17:24:11Z")

</div>

Hey @pavanvemunuri,

Thanks for hanging in there!

If you hover over your authorization header field and see this message:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/shiphero/original/1X/d2c83a888f23010e06e47029fc6bee5fa20ad732.png)  
I’d recommend disabling that and putting the same token in the authorization tab.

If this doesn’t solve your issue, would you mind sending me your token privately so I can try to reproduce the issue?

Please let me know if you have any questions or concerns.

Best,  
RayanP

---

<div class="post-metadata">

**Author:** ![pavanvemunuri](https://avatars.discourse-cdn.com/v4/letter/p/9fc348/32.png) [@pavanvemunuri](https://community.shiphero.com/u/pavanvemunuri)\
**Post date:** [January 24, 2023, 1:27am UTC](https://community.shiphero.com/t/unexpected-error-for-order-create-and-query-products/2324/5 "2023-01-24T01:27:18Z")

</div>

Hi Rayan,

Thanks for your response. I checked as you suggested. There is no duplicate header.

I will send the token information privately.  
Also please note the Authorization from postman was successfully done and we could see the Schema Fetched update as shared below.

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

Regards,

Pavan

---

<div class="post-metadata">

**Author:** ![sh-agent](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sh-agent](https://community.shiphero.com/u/sh-agent)\
**Post date:** [January 24, 2023, 1:41pm UTC](https://community.shiphero.com/t/unexpected-error-for-order-create-and-query-products/2324/6 "2023-01-24T13:41:47Z")

</div>

Hey @pavanvemunuri,

Thanks for the update!

I was able to test using your token and was able to return a query successfully in your account.  
Could you try inputting your request into the query column and leaving the variables blank?

Let me know if that helps!

Best,  
RayanP

---

<div class="post-metadata">

**Author:** ![pavanvemunuri](https://avatars.discourse-cdn.com/v4/letter/p/9fc348/32.png) [@pavanvemunuri](https://community.shiphero.com/u/pavanvemunuri)\
**Post date:** [January 25, 2023, 2:40pm UTC](https://community.shiphero.com/t/unexpected-error-for-order-create-and-query-products/2324/7 "2023-01-25T14:40:33Z")

</div>

Hi Rayan,  
I have sent you original request which we tried in GraphQL format. We want to send in JSON format from our Salesforce org. Can we get equivalent JSON format of a working request so that we can try building the same. We tried formatting JSON request manually but not working for us.  
Thanks in advance.

Regards,  
Pavan

---

<div class="post-metadata">

**Author:** ![sh-agent](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sh-agent](https://community.shiphero.com/u/sh-agent)\
**Post date:** [January 25, 2023, 5:25pm UTC](https://community.shiphero.com/t/unexpected-error-for-order-create-and-query-products/2324/8 "2023-01-25T17:25:15Z")

</div>

Hey @pavanvemunuri,

Thanks for hanging in there!

Would you mind sending your JSON format request? I’ll do my best to help you troubleshoot that, but I only interact with the ShipHero Public API through GraphQL.

Please let me know if you have any questions or concerns!

Best,  
RayanP

---

<div class="post-metadata">

**Author:** ![pavanvemunuri](https://avatars.discourse-cdn.com/v4/letter/p/9fc348/32.png) [@pavanvemunuri](https://community.shiphero.com/u/pavanvemunuri)\
**Post date:** [February 7, 2023, 11:07pm UTC](https://community.shiphero.com/t/unexpected-error-for-order-create-and-query-products/2324/9 "2023-02-07T23:07:40Z")

</div>

Hi RayanP,  
Can you please let us know if you had a chance to look at the JSON request we shared ?

Thanks,  
Pavan
