RESTful Web service API

#1

Hi,
I have problem with API from one of my clients distributors. I was already working with similar services, ,but they were somehow more detailed explained with code examples.

I’m not sure how to access data.

Here is their documentation:

To access the API the following header for all requests should be:
Content-Type : application/json
x-auth-token : dXNlcm5hbWU6cGFzc3dvcmQ=

Parameters:
“username”: API_USERNAME,
“password”: API_PASSWORD

API_USERNAME : as given by Nottage to allow you access to our API
API_PASSWORD :password as given by Nottage to allow you access to our API


NIConcept.com is currently split into 3 native worlds [The Range, Bullet and Elevate].A request can be filtered by defining which world is being requested.

“nativeWorld”:NOTTAGE_NATIVE_WORLD

NOTTAGE_NATIVE_WORLD: this defines which world of NIConcept to return. Options include “therange”, “elevate” or “Bullet”

To return the product information including product prices, indicative data, decoration methods, prices, image files, sku information use this webservice:

END POINT:
http://niconceptws.com/api/NottageECommerceApi/GetProduct

REQUIRED INPUT:
“username”: API_USERNAME,
“password”: API_PASSWORD

OPTIONAL INPUTS:

REQUEST ONE PRODUCT:
“itemnumber”: "9161 "

The item number is the Nottage product code. Do not request SKU’s as they will be included in the item request.

REQUEST MULTIPLE PRODUCTS:
“itemnumber”: "9161,884 "

List all products comma delimited.

REQUEST ALL PRODUCTS FOR A GIVEN WORLD:
“nativeworld”: “therange”

For other worlds use “bullet” and “elevate”

REQUEST SPECIFIC DECORATOR:
“decorator”: “Alex Printing”

This option can be used to return decoration options for a given decorator rather than listing them all.
For other decorators use [”G& K Printing”, “JK Multicolor”, “NI Printshop”]

REQUEST RECOMMENDED DECORATIONS:
“decoration”:“Recommended”

This will show just the recommended decoration methods recommended by Nottage for this product.


#2

I have no idea what you are asking for

#3

I find it quite amusing that a so called restful webservice for some reason has “get” in the url - and that endpoint don’t even support get requests…

On a more serious note, please clarify what you need help with. Though I kind of expect that the easiest way out would be to consult whatever info or support this webservice offers.

1 Like
#4

I have been a few places that didn’t understand how endpoints should be designed, and working primarily with integrations now, there are several very large companies that still don’t!

#5

Thank you all for reply.
I will try to explain this.

So this is only documentation that I have from them and I already contacted their support team and they told me that they dont have developers so only way it is to google the solution.

As i said i worked with few similar API and they always had code examples so we could figure how to send parameters.

Generally, on the basis of this documentation, I would need to send an API request with PHP that will return all the products in json or xml format.

I tried with google chrome add on called “Restlet client - REST API testing” and all works fine (image below) but i’m not sure how to do that with PHP code.

Untitled

@astonecipher

#6

And what code do you have where you are trying something?

It’s just a cURL request with a json object.

#7

I’m not sure how to to that. Suppliers usually give me prepared functions for that. Thanks for helping btw

#8

Thanks all, i figured that out.

1 Like