Introduction
GunsAmerica selling APIs enable dealers to manage their sales by using simple REST API. Back in 2016 we introduced Bulk Upload Inventory,
where inventory is managed by uploading/downloaing excel file containing the entire inventory. The new GunsAmerica APIs infrastructure,
provides major advancement over traditional Bulk Upload.
With our new APIs dealers are able to incorporate their sales and listings from GunsAmerica into their system or their web site.
Overview
GunsAmerica selling APIs are built on latest RESTfull and JSON technologies and are secured with OAuth 2.0 protocol.
We are using seller stock number based inventory management, which allows you to manage multiple listings by your SKU rather than by the listing IDs.
Currently there are 3 selling APIs:
The Base URL for all api calls is:
https://functions-stage.gunsamerica.com/
Inventory API
The inventory API allows sellers to manage their inventory on GunsAmerica web site.
It allows user to post and update items to GunsAmerica web site or to the Seller Store (if there is one). Items are managed by the seller stock number instead of listing id.
Restrictions:
Single seller stock number can only be listed once on GunsAmerica and once on seller store.
In case when the item with the same
seller stock number is already listed manually by seller that item cannot be created/posted by the Inventory API.
If the item that is posted by API is edited on GunsAmerica, or seller store web site, that item becomes a manual item and cannot be updated by the Invetory API anymore.
Items - Listings API
The items API allows sellers to view their listings on GunsAmerica and seller store, regardless of if the items are managed/created by Inventory API or using GunsAmerica web site.
Items are not grouped by the seller stock number.
Orders API
This API enables sellers to monitor their orders on GunsAmerica and seller store.
Authentication
All GunsAmerica API use OAuth 2.0 protocol for application authentication and user authorization.
To access our API, you will first need to obtain an access token from GunsAmerica access token service by providing your Client ID and Client secret.
All requests made to GunsAmerica REST operations require the authorization HTTP header for authentication
Obtaining OAuth access token
The request requires the following values:
- ClientID - your client id (provided to you when you sign up for the service).
- ClientSecret - Base64-encoded string (provided to you when you sign up for the service).
- OAuth scope(s) - required for access to the REST interfaces.
Access token Request example:
HTTP method: POST
URL:
https://functions-stage.gunsamerica.com/api/identity/connect/token
HTTP headers:
content-type: application/x-www-form-urlencoded
Request body
grant_type:"client_credentials"
scope:"InventoryServiceAPI"
client_id:"TestSeller"
client_secret:"XXXXX-XXX-XXXX-XXXX-XXXXXXX"
Response Body
access_token:"5404d41b24a788u9khknhd0eac9360092"
expires_in:3600
token_type:"Bearer"