# API Keys related question

**URL:** <https://community.shiphero.com/t/api-keys-related-question/1105>\
**Category:** Getting Started\
**Created:** [February 8, 2021, 11:35am UTC](https://community.shiphero.com/t/api-keys-related-question/1105 "2021-02-08T11:35:51Z")\
**Posts on this page:** 11\
**Page:** 3

<div class="post-metadata">

**Author:** ![bhavesh](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/bhavesh/32/288_2.png) [@bhavesh](https://community.shiphero.com/u/bhavesh)\
**Post date:** [April 16, 2021, 4:43pm UTC](https://community.shiphero.com/t/api-keys-related-question/1105/42 "2021-04-16T16:43:42Z")

</div>

Hello @tomasw  
shiphero working is perfect now our side but i have one issues your(shiphero) backend side i share a video please check it what i am doing there.

please give me Solution.

country related issues. i pass Out United states of America but there(shiphero backend) is empty.

[https://trello-attachments.s3.amazonaws.com/601c198cd707c0228d8a2fe6/6079b8319da56a6e4734fb39/2f74fc4b5971bfd9892ad21b671aa559/screen-capture\_(28).webm](https://trello-attachments.s3.amazonaws.com/601c198cd707c0228d8a2fe6/6079b8319da56a6e4734fb39/2f74fc4b5971bfd9892ad21b671aa559/screen-capture_(28).webm)

Thanks agin!  
Bhavesh

---

<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:** [April 18, 2021, 3:19pm UTC](https://community.shiphero.com/t/api-keys-related-question/1105/43 "2021-04-18T15:19:17Z")

</div>

Hi @bhavesh!  
Try by sending US instead (Ref.: [Gotcha’s – Developer Resources | ShipHero](https://developer.shiphero.com/gotchas#countrycodes))

Thanks again!  
Tom

---

<div class="post-metadata">

**Author:** ![bhavesh](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/bhavesh/32/288_2.png) [@bhavesh](https://community.shiphero.com/u/bhavesh)\
**Post date:** [May 21, 2021, 7:27am UTC](https://community.shiphero.com/t/api-keys-related-question/1105/44 "2021-05-21T07:27:12Z")

</div>

Hello @tomasw!

I hope doing great @tomasw

how to add order in coupon amount in shiphero order.  
if you have any idea please share with me.

Thanks again!  
Bhavesh

---

<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:** [May 21, 2021, 2:55pm UTC](https://community.shiphero.com/t/api-keys-related-question/1105/45 "2021-05-21T14:55:24Z")

</div>

Hi @bhavesh !  
Thanks! hope you are doing great as well!

Would **total\_discounts: “20.00”** work for you?  
You can add it while trying to generate the order

Thanks again!  
Tom

---

<div class="post-metadata">

**Author:** ![bhavesh](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/bhavesh/32/288_2.png) [@bhavesh](https://community.shiphero.com/u/bhavesh)\
**Post date:** [May 28, 2021, 6:20am UTC](https://community.shiphero.com/t/api-keys-related-question/1105/46 "2021-05-28T06:20:58Z")

</div>

Hello @tomasw  
Thanks working properly total\_discounts. 🙂

how can check order states order processing, order cancle and order successfully.  
Please give me solution.

Thanks again!  
Bhavesh

---

<div class="post-metadata">

**Author:** ![bhavesh](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/bhavesh/32/288_2.png) [@bhavesh](https://community.shiphero.com/u/bhavesh)\
**Post date:** [June 18, 2021, 7:19am UTC](https://community.shiphero.com/t/api-keys-related-question/1105/47 "2021-06-18T07:19:01Z")

</div>

Hello @tomasw !  
Thanks! hope you are doing great as well!

Please give Solution product quantity update in shiphero.  
how can check order states order processing, order cancle and order successfully.

Thanks again!  
Bhavesh

---

<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:** [June 22, 2021, 12:31pm UTC](https://community.shiphero.com/t/api-keys-related-question/1105/48 "2021-06-22T12:31:27Z")

</div>

Hi @bhavesh!

> [@bhavesh](#):
>
> how can check order states order processing, order cancle and order successfully.

Do you need to check the status of the order?  
In that case, you can use the order query, something like this:

```auto
query {
  order(id: "195249449") {
    request_id
    complexity
    data {
      fulfillment_status
    }
  }
}

```

> [@bhavesh](#):
>
> Please give Solution product quantity update in shiphero.

You need to update the inventory on the warehouse or the quantity of the product on the order?

Thanks again!  
Tom

---

<div class="post-metadata">

**Author:** ![bhavesh](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/bhavesh/32/288_2.png) [@bhavesh](https://community.shiphero.com/u/bhavesh)\
**Post date:** [September 23, 2021, 7:19am UTC](https://community.shiphero.com/t/api-keys-related-question/1105/49 "2021-09-23T07:19:48Z")

</div>

Hello,

How to check order tracking number marge or not  
and which order number with merged?  
can you please give me solution with tracking number

Thanks again!  
Bhavesh

---

<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, 9:13pm UTC](https://community.shiphero.com/t/api-keys-related-question/1105/50 "2021-09-28T21:13:48Z")

</div>

Hi Bhavesh,  
This query will give you any merged orders:

```auto
query{
  order(id: "<order id here>"){
    request_id
    complexity
    data{
      merged_orders{
        order_id
        is_master
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![bhavesh](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/bhavesh/32/288_2.png) [@bhavesh](https://community.shiphero.com/u/bhavesh)\
**Post date:** [November 9, 2021, 2:48pm UTC](https://community.shiphero.com/t/api-keys-related-question/1105/51 "2021-11-09T14:48:48Z")

</div>

Hello gays,

Only php users are use this functions.

$curl = curl\_init();

```
	curl_setopt_array($curl, array(
	  CURLOPT_URL => "https://public-api.shiphero.com/auth/refresh",
	  CURLOPT_RETURNTRANSFER => true,
	  CURLOPT_ENCODING => "",
	  CURLOPT_MAXREDIRS => 10,
	  CURLOPT_TIMEOUT => 30,
	  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
	  CURLOPT_CUSTOMREQUEST => "POST",
	  CURLOPT_POSTFIELDS => "{\"refresh_token\":\"XXXXXXXXyour tokenXXXXXXXXXXX\"}",
	  CURLOPT_HTTPHEADER => array(
	    "content-type: application/json"
	  ),
	));

	$response = curl_exec($curl);
	$err = curl_error($curl);

	curl_close($curl);

	if($err) {
	  echo "cURL Error #:" . $err;
	} else {
	  $response;
	}
	$result = json_decode($response);
	$bearer = $result->access_token;

	$ch = curl_init();

    curl_setopt($ch, CURLOPT_URL, 'https://public-api.shiphero.com/graphql');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS,json_encode(array("query"=>$body))); //$body add your query like order create, get treacking number etc.
    curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');

    $headers = array();
    $headers[] = 'Accept-Encoding: gzip, deflate, br';
    $headers[] = 'Content-Type: application/json';
    $headers[] = 'Accept: application/json';
    $headers[] = 'Connection: keep-alive';
    $headers[] = 'Origin: chrome-extension://flnheeellpciglgpaodhkhmapeljopja';
    $headers[] = 'Authorization: Bearer '.$bearer;
    $headers[] = 'Refresh_token: XXXXXXXXyour tokenXXXXXXXXXXX';
    
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

    $result = curl_exec($ch);
    if (curl_errno($ch)) {
        echo 'Error:' . curl_error($ch);
    }

    //curl_close($ch);

    $new_result = json_decode($result);

```

print\_r($new\_result);

Thanks in advance!  
Bhavesh

---

<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:** [November 9, 2021, 7:14pm UTC](https://community.shiphero.com/t/api-keys-related-question/1105/52 "2021-11-09T19:14:35Z")

</div>

Hello @bhavesh!  
Could you please further explain your request? I’m not sure I understand what is the issue you are having.  
If you are experiencing an error with an API call please remember to post the request ID so we can trace it.  
Have a great day!  
Tomas

[Previous page](https://community.shiphero.com/t/api-keys-related-question/1105.md?page=2)
