API Error: Order number does not exist

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/’ . $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

Hello 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

Hi syork,

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

1 Like