# API Error: Order number does not exist

**URL:** <https://forums.ordoro.com/t/api-error-order-number-does-not-exist/593>\
**Category:** Bug Reports\
**Created:** [August 27, 2020, 6:23pm UTC](https://forums.ordoro.com/t/api-error-order-number-does-not-exist/593 "2020-08-27T18:23:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![InspryDev](https://avatars.discourse-cdn.com/v4/letter/i/858c86/32.png) [@InspryDev](https://forums.ordoro.com/u/InspryDev)\
**Post date:** [August 27, 2020, 6:23pm UTC](https://forums.ordoro.com/t/api-error-order-number-does-not-exist/593/1 "2020-08-27T18:23:40Z")

</div>

Hello,

## Description

I’m trying to add a tag to my orders via the API.

### When I did:

I received an error saying that the “order number does not exist”. But the order number does exist as I copied it straight from the GET request.

### I expected:

A success in adding a tag to the specific order number I requested.

### What actually happened:

Received an error.

## Request Details

Here is a copy of the PHP CURL request:

// Relevant info  
$order-\>order\_number = ‘1-201440’;  
$tagId = ‘40769’;

// Request  
$curl = curl\_init(‘[https://apiverson.ordoro.com/order/](https://apiverson.ordoro.com/order/)’ . $order-\>order\_number .’ /tag/’ . $tagId);  
curl\_setopt($curl, CURLOPT\_ENCODING, ‘gzip’);  
curl\_setopt($curl, CURLOPT\_RETURNTRANSFER, 1);  
curl\_setopt($curl, CURLOPT\_FOLLOWLOCATION, 1);  
curl\_setopt($curl, CURLOPT\_POST, 1);  
curl\_setopt($curl, CURLOPT\_HTTPHEADER, array(‘Content-Type: application/json’,‘Accept: application/json’));  
curl\_setopt($curl, CURLOPT\_USERPWD, ORDORO\_CLIENT\_ID . ‘:’ . ORDORO\_CLIENT\_SECRET);

## Response Details

[“error\_message”]=\> string(37) “Order number 1-201440 does not exist” [“param”]=\> NULL

---

<div class="post-metadata">

**Author:** ![syork](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.ordoro.com/syork/32/61_2.png) [@syork](https://forums.ordoro.com/u/syork)\
**Post date:** [August 27, 2020, 7:00pm UTC](https://forums.ordoro.com/t/api-error-order-number-does-not-exist/593/2 "2020-08-27T19:00:09Z")

</div>

Hello [InspryDev](https://forums.ordoro.com/u/InspryDev),  
In the logs it looks like there was possibly a space after the order number in your request.

Here is the request: `/order/1-201440%20/tag/40769`

---

<div class="post-metadata">

**Author:** ![InspryDev](https://avatars.discourse-cdn.com/v4/letter/i/858c86/32.png) [@InspryDev](https://forums.ordoro.com/u/InspryDev)\
**Post date:** [August 27, 2020, 7:14pm UTC](https://forums.ordoro.com/t/api-error-order-number-does-not-exist/593/3 "2020-08-27T19:14:32Z")

</div>

Hi syork,

I cannot believe I didn’t catch that. That fixed it. Thank you so much!
