NAV Navbar
shell java python ruby php

Introduction

Tradenity API is organized around REST. It uses built-in HTTP features, like HTTP authentication and HTTP verbs, and has predictable, resource-oriented URLs, and utilize HTTP response codes to indicate API errors.

Commons

API Version

Currently, all API calls will be directed to and handled by v1.0 of the API, to maximize compatability with future versions of the API it is recommended to include the version number in each request:

ACCEPT: application/vnd.tradenity.v1.0+json

Root Endpoint

The main endpoint for the api is:

https://api.tradenity.com

You can issue GET request to the root endpoint to get a list of all available resources.

SSL Encryption

All HTTP trafic from and to Tradenity servers must be through SSL, All API calls must be dome through the https:// protocol, attempting to make calls to its http:// counterpart will results in an error.

Input parameters

Many API calls requires parameters, for GET requests parameters can be passed as an HTTP query string parameter:

curl http://api.tradenity.com/brands?size=20

For POST, PUT, DELETE calls, the resource endpoint expects www-form-encoded data.

Output format

All API calls return data in JSON format. The specific format for each call will be documented separately.

Date format

All ate values will be in the standard UTC timezone, the server utilizes only ISO8601 formatted date, i.e. Date will parsed and produced in ISO8601 format only.

HTTP

HTTP Verbs

Where possible, API v3 strives to use appropriate HTTP verbs for each action.

Verb Description
HEAD Can be issued against any resource to get just the HTTP header info.
GET Used for retrieving resources.
POST Used for creating resources.
PUT Used for updating resources with partial data.
DELETE Used for deleting resources.

Success

Tradenity API uses the following success codes:

HTTP Code Meaning
200 Success -- Your request has completed successfully
201 Created -- Resource created successfully

Errors

Tradenity API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is not formed properly
401 Unauthorized -- Your API key is wrong
403 Forbidden -- The kitten requested is hidden for administrators only
404 Not Found -- The specified kitten could not be found
405 Method Not Allowed -- You tried to access a resource with an invalid method
406 Not Acceptable -- You requested a format that isn't supported
429 Too Many Requests -- You exceeded your quota limit.
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarially offline for maintanance. Please try again later.

Concepts

Stores

A store is the center and the scope of all operations, which means that all operations are specific to store.

This store is determined by the credential associated with each request.

Operations

Operations are divided into two main categories :

User operation: all operation allowed to any users such as: browsing, searching, filtering products, adding item to cart, checkout... etc.

Admin operations: Operations only allowed to store administrator

Session management

Tradenity handles user's session for you, so it is very easy to manage their shopping carts and checkout process, and their orders.

Authentication

Authorization in tradenity is a 2 stage process and it is closely related to session management

Tradenity uses API keys to allow access to the API. The API key is used as the username when using HTTP Basic Auth. Each store hat its unique set of API keys, typically you get 2 different keys for each store, You can also register a new Store API key at our developer portal.

Tradenity expects all API requests to be authenticated by either ways, the server in a header that looks like the following:

Authorization: store_public_or_secret_key

Session management

In order to keep track of each user's shopping cart and checkout process, your store must maintaine these data in user's session.

Tradenity makes this task easy by manage user sessions for you, it creates a session and allocates backend storage for each user browsing your store.

When you authenticate for the first time with http basic auth using your store key as username, the API server will include the session identification token in the response as a http header called x-auth-token, any subsequent request uses this token for authentication will be counted as related to the same session.

However, Tradenity SDKs include out of the box solutions to smoothly integrate its session with your development framework. For example, if you are using the Java SDK for developing a web application, tradenity integrate smoothly with the servlet's container session, and thie same for all other supported languages and SDKs, please refer to the documentation of your favourite SDK to know about the supported frameworks.

If your framework is not listed, you can easily develop this glue code, it is as easy as implementing a two method interface, and our team will be available for support.

Currencies

Currency attributes

Parameter Type Required Read only Default Description
name String Yes False n/a Name of the Currency
code String Yes False n/a Code of the Currency
symbol String No False n/a Symbol of the Currency
decimalPointPlacement Integer No False 2 DecimalPointPlacement of the Currency
smallestUnit Integer No False 100 SmallestUnit of the Currency
status String Yes False n/a Status of the Currency
exchangeRate Float No False n/a ExchangeRate of the Currency
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.

Get All Currencies

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<Currency> currencies = CurrencyService.findAll();

require 'tradenity'

currencies = Currency.find_all

from tradenity.resources import Currency

currencies = Currency.find_all()
curl -X GET http://api.tradenity.com/v1/currencies \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$currencies = Currency->find_all()

The above command returns JSON structured like this:

{
    "currencies": [{
        "name": "...",
        "code": "...",
        "symbol": "...",
        "decimalPointPlacement": "...",
        "smallestUnit": "...",
        "status": "...",
        "exchangeRate": "...",
        "store": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all currencies.

HTTP Request

GET http://api.tradenity.com/v1/currencies

Find a Specific Currency by ID

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
Currency currency = CurrencyService.findById(id);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
currency = Currency.find_by_id(id)
from tradenity.resources import Currency

currency_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
currency = Currency.find_by_id(currency_id)
curl GET "http://api.tradenity.com/v1/currencies/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$currency = Currency->find_by_id($id)

The above command returns JSON structured like this:

{
  "__meta" : {
    "href" : "http://localhost:8080/api/v1/addresses/address_001"
  },
  "id": "...",
  "name": "...",
  "code": "...",
  "symbol": "...",
  "decimalPointPlacement": "...",
  "smallestUnit": "...",
  "status": "...",
  "exchangeRate": "...",
  "store": "..."
}

This endpoint retrieves a specific currency.

HTTP Request

GET http://api.tradenity.com/v1/currencies/<ID>

URL Parameters

Parameter Description
ID The ID of the currency to retrieve

Create new Currency

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

Currency currency = new Currency();
currency.setName("...");
currency.setCode("...");
currency.setSymbol("...");
currency.setDecimalPointPlacement("...");
currency.setSmallestUnit("...");
currency.setStatus("...");
currency.setExchangeRate("...");
currency.setStore("...");

Currency currency = CurrencyService.create(currency);

require 'tradenity'

currency = Currency.new(name: "...", code: "...", symbol: "...", decimalPointPlacement: "...", smallestUnit: "...", status: "...", exchangeRate: "...", store: "...")

currency.create

from tradenity.resources import Currency

currency = Currency(name="...", code="...", symbol="...", decimalPointPlacement="...", smallestUnit="...", status="...", exchangeRate="...", store="...")

currency.create()
curl -X POST http://api.tradenity.com/v1/currencies \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "code=..." \
  -d "symbol=..." \
  -d "decimalPointPlacement=..." \
  -d "smallestUnit=..." \
  -d "status=..." \
  -d "exchangeRate=..." \
  -d "store=..." \
require 'tradenity'

$currency = new Currency()
$currency->setName("...");
$currency->setCode("...");
$currency->setSymbol("...");
$currency->setDecimalPointPlacement("...");
$currency->setSmallestUnit("...");
$currency->setStatus("...");
$currency->setExchangeRate("...");
$currency->setStore("...");

$currency->create();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "code": "...",
    "symbol": "...",
    "decimalPointPlacement": "...",
    "smallestUnit": "...",
    "status": "...",
    "exchangeRate": "...",
    "store": "..."
  }

This endpoint create a new currency using the specified parameters.

HTTP Request

POST http://api.tradenity.com/v1/currencies

Updating Currency

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
Currency currency = CurrencyService.findById(id);
currency.setName("...");
currency.setCode("...");
currency.setSymbol("...");
currency.setDecimalPointPlacement("...");
currency.setSmallestUnit("...");
currency.setStatus("...");
currency.setExchangeRate("...");
currency.setStore("...");

Currency currency = CurrencyService.update(currency);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
currency = Currency.find_by_id(id)
Currency.name = "..."
Currency.code = "..."
Currency.symbol = "..."
Currency.decimalPointPlacement = "..."
Currency.smallestUnit = "..."
Currency.status = "..."
Currency.exchangeRate = "..."
Currency.store = "..."

currency.update()

from tradenity.resources import Currency

currency_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
currency = Currency.find_by_id(currency_id)
Currency.name = "..."
Currency.code = "..."
Currency.symbol = "..."
Currency.decimalPointPlacement = "..."
Currency.smallestUnit = "..."
Currency.status = "..."
Currency.exchangeRate = "..."
Currency.store = "..."

currency.update()
curl -X PUT http://api.tradenity.com/v1/currencies \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "code=..." \
  -d "symbol=..." \
  -d "decimalPointPlacement=..." \
  -d "smallestUnit=..." \
  -d "status=..." \
  -d "exchangeRate=..." \
  -d "store=..." \
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$currency = Currency->find_by_id($id)
$currency.setName("...");
$currency.setCode("...");
$currency.setSymbol("...");
$currency.setDecimalPointPlacement("...");
$currency.setSmallestUnit("...");
$currency.setStatus("...");
$currency.setExchangeRate("...");
$currency.setStore("...");

$currency->update();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "code": "...",
    "symbol": "...",
    "decimalPointPlacement": "...",
    "smallestUnit": "...",
    "status": "...",
    "exchangeRate": "...",
    "store": "..."
  }

This endpoint updates instance of currency using the specified parameters.

HTTP Request

PUT http://api.tradenity.com/v1/currencies/<ID>

URL Parameters

Parameter Description
ID The ID of the currency to update

Delete a Specific Currency

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
boolean result = CurrencyService.delete(id);

require 'tradenity'

result = Currency.delete_by_id(id)
from tradenity.resources import Currency

currency_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
result = Currency.delete_by_id(currency_id)
curl DELETE "http://api.tradenity.com/v1/currencies/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

result = Currency->delete_by_id($id)

The above command returns no JSON document, just a success or failure status (HTTP status code or language specific boolean true or false) :

This endpoint delete a specific currency.

HTTP Request

DELETE http://api.tradenity.com/v1/currencies/<ID>

URL Parameters

Parameter Description
ID The ID of the currency to delete

States

State attributes

Parameter Type Required Read only Default Description
name String Yes False n/a Name of the State
code String No False n/a Code of the State
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.
country Country Yes No n/a Country of the State

Get All States

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<State> states = StateService.findAll();

require 'tradenity'

states = State.find_all

from tradenity.resources import State

states = State.find_all()
curl -X GET http://api.tradenity.com/v1/states \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$states = State->find_all()

The above command returns JSON structured like this:

{
    "states": [{
        "name": "...",
        "code": "...",
        "country": "...",
        "store": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all states.

HTTP Request

GET http://api.tradenity.com/v1/states

Find a Specific State by ID

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
State state = StateService.findById(id);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
state = State.find_by_id(id)
from tradenity.resources import State

state_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
state = State.find_by_id(state_id)
curl GET "http://api.tradenity.com/v1/states/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$state = State->find_by_id($id)

The above command returns JSON structured like this:

{
  "__meta" : {
    "href" : "http://localhost:8080/api/v1/addresses/address_001"
  },
  "id": "...",
  "name": "...",
  "code": "...",
  "country": "...",
  "store": "..."
}

This endpoint retrieves a specific state.

HTTP Request

GET http://api.tradenity.com/v1/states/<ID>

URL Parameters

Parameter Description
ID The ID of the state to retrieve

Create new State

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

State state = new State();
state.setName("...");
state.setCode("...");
state.setCountry("...");
state.setStore("...");

State state = StateService.create(state);

require 'tradenity'

state = State.new(name: "...", code: "...", country: "...", store: "...")

state.create

from tradenity.resources import State

state = State(name="...", code="...", country="...", store="...")

state.create()
curl -X POST http://api.tradenity.com/v1/states \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "code=..." \
  -d "country=..." \
  -d "store=..." \
require 'tradenity'

$state = new State()
$state->setName("...");
$state->setCode("...");
$state->setCountry("...");
$state->setStore("...");

$state->create();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "code": "...",
    "country": "...",
    "store": "..."
  }

This endpoint create a new state using the specified parameters.

HTTP Request

POST http://api.tradenity.com/v1/states

Updating State

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
State state = StateService.findById(id);
state.setName("...");
state.setCode("...");
state.setCountry("...");
state.setStore("...");

State state = StateService.update(state);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
state = State.find_by_id(id)
State.name = "..."
State.code = "..."
State.country = "..."
State.store = "..."

state.update()

from tradenity.resources import State

state_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
state = State.find_by_id(state_id)
State.name = "..."
State.code = "..."
State.country = "..."
State.store = "..."

state.update()
curl -X PUT http://api.tradenity.com/v1/states \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "code=..." \
  -d "country=..." \
  -d "store=..." \
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$state = State->find_by_id($id)
$state.setName("...");
$state.setCode("...");
$state.setCountry("...");
$state.setStore("...");

$state->update();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "code": "...",
    "country": "...",
    "store": "..."
  }

This endpoint updates instance of state using the specified parameters.

HTTP Request

PUT http://api.tradenity.com/v1/states/<ID>

URL Parameters

Parameter Description
ID The ID of the state to update

Delete a Specific State

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
boolean result = StateService.delete(id);

require 'tradenity'

result = State.delete_by_id(id)
from tradenity.resources import State

state_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
result = State.delete_by_id(state_id)
curl DELETE "http://api.tradenity.com/v1/states/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

result = State->delete_by_id($id)

The above command returns no JSON document, just a success or failure status (HTTP status code or language specific boolean true or false) :

This endpoint delete a specific state.

HTTP Request

DELETE http://api.tradenity.com/v1/states/<ID>

URL Parameters

Parameter Description
ID The ID of the state to delete

Countries

Country attributes

Parameter Type Required Read only Default Description
name String Yes False n/a Name of the Country
iso2 String Yes False n/a Iso2 of the Country
iso3 String Yes False n/a Iso3 of the Country
iso3166 String Yes False n/a Iso3166 of the Country
countryCode String Yes False n/a CountryCode of the Country
subRegion String Yes False n/a SubRegion of the Country
region String Yes False n/a Region of the Country
status String Yes False n/a Status of the Country
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.

Get All Countries

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<Country> countries = CountryService.findAll();

require 'tradenity'

countries = Country.find_all

from tradenity.resources import Country

countries = Country.find_all()
curl -X GET http://api.tradenity.com/v1/countries \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$countries = Country->find_all()

The above command returns JSON structured like this:

{
    "countries": [{
        "name": "...",
        "iso2": "...",
        "iso3": "...",
        "iso3166": "...",
        "countryCode": "...",
        "subRegion": "...",
        "region": "...",
        "status": "...",
        "store": "...",
        "states": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all countries.

HTTP Request

GET http://api.tradenity.com/v1/countries

Find a Specific Country by ID

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
Country country = CountryService.findById(id);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
country = Country.find_by_id(id)
from tradenity.resources import Country

country_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
country = Country.find_by_id(country_id)
curl GET "http://api.tradenity.com/v1/countries/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$country = Country->find_by_id($id)

The above command returns JSON structured like this:

{
  "__meta" : {
    "href" : "http://localhost:8080/api/v1/addresses/address_001"
  },
  "id": "...",
  "name": "...",
  "iso2": "...",
  "iso3": "...",
  "iso3166": "...",
  "countryCode": "...",
  "subRegion": "...",
  "region": "...",
  "status": "...",
  "store": "...",
  "states": "..."
}

This endpoint retrieves a specific country.

HTTP Request

GET http://api.tradenity.com/v1/countries/<ID>

URL Parameters

Parameter Description
ID The ID of the country to retrieve

Create new Country

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

Country country = new Country();
country.setName("...");
country.setIso2("...");
country.setIso3("...");
country.setIso3166("...");
country.setCountryCode("...");
country.setSubRegion("...");
country.setRegion("...");
country.setStatus("...");
country.setStore("...");
country.setStates("...");

Country country = CountryService.create(country);

require 'tradenity'

country = Country.new(name: "...", iso2: "...", iso3: "...", iso3166: "...", countryCode: "...", subRegion: "...", region: "...", status: "...", store: "...", states: "...")

country.create

from tradenity.resources import Country

country = Country(name="...", iso2="...", iso3="...", iso3166="...", countryCode="...", subRegion="...", region="...", status="...", store="...", states="...")

country.create()
curl -X POST http://api.tradenity.com/v1/countries \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "iso2=..." \
  -d "iso3=..." \
  -d "iso3166=..." \
  -d "countryCode=..." \
  -d "subRegion=..." \
  -d "region=..." \
  -d "status=..." \
  -d "store=..." \
  -d "states=..." \
require 'tradenity'

$country = new Country()
$country->setName("...");
$country->setIso2("...");
$country->setIso3("...");
$country->setIso3166("...");
$country->setCountryCode("...");
$country->setSubRegion("...");
$country->setRegion("...");
$country->setStatus("...");
$country->setStore("...");
$country->setStates("...");

$country->create();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "iso2": "...",
    "iso3": "...",
    "iso3166": "...",
    "countryCode": "...",
    "subRegion": "...",
    "region": "...",
    "status": "...",
    "store": "...",
    "states": "..."
  }

This endpoint create a new country using the specified parameters.

HTTP Request

POST http://api.tradenity.com/v1/countries

Updating Country

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
Country country = CountryService.findById(id);
country.setName("...");
country.setIso2("...");
country.setIso3("...");
country.setIso3166("...");
country.setCountryCode("...");
country.setSubRegion("...");
country.setRegion("...");
country.setStatus("...");
country.setStore("...");
country.setStates("...");

Country country = CountryService.update(country);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
country = Country.find_by_id(id)
Country.name = "..."
Country.iso2 = "..."
Country.iso3 = "..."
Country.iso3166 = "..."
Country.countryCode = "..."
Country.subRegion = "..."
Country.region = "..."
Country.status = "..."
Country.store = "..."
Country.states = "..."

country.update()

from tradenity.resources import Country

country_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
country = Country.find_by_id(country_id)
Country.name = "..."
Country.iso2 = "..."
Country.iso3 = "..."
Country.iso3166 = "..."
Country.countryCode = "..."
Country.subRegion = "..."
Country.region = "..."
Country.status = "..."
Country.store = "..."
Country.states = "..."

country.update()
curl -X PUT http://api.tradenity.com/v1/countries \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "iso2=..." \
  -d "iso3=..." \
  -d "iso3166=..." \
  -d "countryCode=..." \
  -d "subRegion=..." \
  -d "region=..." \
  -d "status=..." \
  -d "store=..." \
  -d "states=..." \
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$country = Country->find_by_id($id)
$country.setName("...");
$country.setIso2("...");
$country.setIso3("...");
$country.setIso3166("...");
$country.setCountryCode("...");
$country.setSubRegion("...");
$country.setRegion("...");
$country.setStatus("...");
$country.setStore("...");
$country.setStates("...");

$country->update();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "iso2": "...",
    "iso3": "...",
    "iso3166": "...",
    "countryCode": "...",
    "subRegion": "...",
    "region": "...",
    "status": "...",
    "store": "...",
    "states": "..."
  }

This endpoint updates instance of country using the specified parameters.

HTTP Request

PUT http://api.tradenity.com/v1/countries/<ID>

URL Parameters

Parameter Description
ID The ID of the country to update

Delete a Specific Country

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
boolean result = CountryService.delete(id);

require 'tradenity'

result = Country.delete_by_id(id)
from tradenity.resources import Country

country_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
result = Country.delete_by_id(country_id)
curl DELETE "http://api.tradenity.com/v1/countries/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

result = Country->delete_by_id($id)

The above command returns no JSON document, just a success or failure status (HTTP status code or language specific boolean true or false) :

This endpoint delete a specific country.

HTTP Request

DELETE http://api.tradenity.com/v1/countries/<ID>

URL Parameters

Parameter Description
ID The ID of the country to delete

Addresses

Address attributes

Parameter Type Required Read only Default Description
streetLine1 String Yes False n/a StreetLine1 of the Address
streetLine2 String No False n/a StreetLine2 of the Address
city String Yes False n/a City of the Address
zipCode String Yes False n/a ZipCode of the Address
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.
state State Yes No n/a State of the Address
country Country Yes No n/a Country of the Address

Get All Addresses

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<Address> addresses = AddressService.findAll();

require 'tradenity'

addresses = Address.find_all

from tradenity.resources import Address

addresses = Address.find_all()
curl -X GET http://api.tradenity.com/v1/addresses \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$addresses = Address->find_all()

The above command returns JSON structured like this:

{
    "addresses": [{
        "streetLine1": "...",
        "streetLine2": "...",
        "city": "...",
        "state": "...",
        "zipCode": "...",
        "country": "...",
        "store": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all addresses.

HTTP Request

GET http://api.tradenity.com/v1/addresses

Find a Specific Address by ID

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
Address address = AddressService.findById(id);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
address = Address.find_by_id(id)
from tradenity.resources import Address

address_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
address = Address.find_by_id(address_id)
curl GET "http://api.tradenity.com/v1/addresses/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$address = Address->find_by_id($id)

The above command returns JSON structured like this:

{
  "__meta" : {
    "href" : "http://localhost:8080/api/v1/addresses/address_001"
  },
  "id": "...",
  "streetLine1": "...",
  "streetLine2": "...",
  "city": "...",
  "state": "...",
  "zipCode": "...",
  "country": "...",
  "store": "..."
}

This endpoint retrieves a specific address.

HTTP Request

GET http://api.tradenity.com/v1/addresses/<ID>

URL Parameters

Parameter Description
ID The ID of the address to retrieve

Create new Address

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

Address address = new Address();
address.setStreetLine1("...");
address.setStreetLine2("...");
address.setCity("...");
address.setState("...");
address.setZipCode("...");
address.setCountry("...");
address.setStore("...");

Address address = AddressService.create(address);

require 'tradenity'

address = Address.new(streetLine1: "...", streetLine2: "...", city: "...", state: "...", zipCode: "...", country: "...", store: "...")

address.create

from tradenity.resources import Address

address = Address(streetLine1="...", streetLine2="...", city="...", state="...", zipCode="...", country="...", store="...")

address.create()
curl -X POST http://api.tradenity.com/v1/addresses \
  -H "Authorization: basicauthkey \
  -d "streetLine1=..." \
  -d "streetLine2=..." \
  -d "city=..." \
  -d "state=..." \
  -d "zipCode=..." \
  -d "country=..." \
  -d "store=..." \
require 'tradenity'

$address = new Address()
$address->setStreetLine1("...");
$address->setStreetLine2("...");
$address->setCity("...");
$address->setState("...");
$address->setZipCode("...");
$address->setCountry("...");
$address->setStore("...");

$address->create();

The above command returns JSON structured like this:

  {
    "id": "...",
    "streetLine1": "...",
    "streetLine2": "...",
    "city": "...",
    "state": "...",
    "zipCode": "...",
    "country": "...",
    "store": "..."
  }

This endpoint create a new address using the specified parameters.

HTTP Request

POST http://api.tradenity.com/v1/addresses

Updating Address

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
Address address = AddressService.findById(id);
address.setStreetLine1("...");
address.setStreetLine2("...");
address.setCity("...");
address.setState("...");
address.setZipCode("...");
address.setCountry("...");
address.setStore("...");

Address address = AddressService.update(address);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
address = Address.find_by_id(id)
Address.streetLine1 = "..."
Address.streetLine2 = "..."
Address.city = "..."
Address.state = "..."
Address.zipCode = "..."
Address.country = "..."
Address.store = "..."

address.update()

from tradenity.resources import Address

address_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
address = Address.find_by_id(address_id)
Address.streetLine1 = "..."
Address.streetLine2 = "..."
Address.city = "..."
Address.state = "..."
Address.zipCode = "..."
Address.country = "..."
Address.store = "..."

address.update()
curl -X PUT http://api.tradenity.com/v1/addresses \
  -H "Authorization: basicauthkey \
  -d "streetLine1=..." \
  -d "streetLine2=..." \
  -d "city=..." \
  -d "state=..." \
  -d "zipCode=..." \
  -d "country=..." \
  -d "store=..." \
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$address = Address->find_by_id($id)
$address.setStreetLine1("...");
$address.setStreetLine2("...");
$address.setCity("...");
$address.setState("...");
$address.setZipCode("...");
$address.setCountry("...");
$address.setStore("...");

$address->update();

The above command returns JSON structured like this:

  {
    "id": "...",
    "streetLine1": "...",
    "streetLine2": "...",
    "city": "...",
    "state": "...",
    "zipCode": "...",
    "country": "...",
    "store": "..."
  }

This endpoint updates instance of address using the specified parameters.

HTTP Request

PUT http://api.tradenity.com/v1/addresses/<ID>

URL Parameters

Parameter Description
ID The ID of the address to update

Delete a Specific Address

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
boolean result = AddressService.delete(id);

require 'tradenity'

result = Address.delete_by_id(id)
from tradenity.resources import Address

address_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
result = Address.delete_by_id(address_id)
curl DELETE "http://api.tradenity.com/v1/addresses/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

result = Address->delete_by_id($id)

The above command returns no JSON document, just a success or failure status (HTTP status code or language specific boolean true or false) :

This endpoint delete a specific address.

HTTP Request

DELETE http://api.tradenity.com/v1/addresses/<ID>

URL Parameters

Parameter Description
ID The ID of the address to delete

Brands

Brand attributes

Parameter Type Required Read only Default Description
name String Yes False n/a Name of the Brand
slug String Yes False n/a Slug of the Brand
status String Yes False n/a Status of the Brand
description String No False n/a Description of the Brand
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.
photo Photo NO No n/a Photo of the Brand

Get All Brands

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<Brand> brands = BrandService.findAll();

require 'tradenity'

brands = Brand.find_all

from tradenity.resources import Brand

brands = Brand.find_all()
curl -X GET http://api.tradenity.com/v1/brands \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$brands = Brand->find_all()

The above command returns JSON structured like this:

{
    "brands": [{
        "name": "...",
        "slug": "...",
        "status": "...",
        "description": "...",
        "photo": "...",
        "store": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all brands.

HTTP Request

GET http://api.tradenity.com/v1/brands

Find a Specific Brand by ID

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
Brand brand = BrandService.findById(id);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
brand = Brand.find_by_id(id)
from tradenity.resources import Brand

brand_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
brand = Brand.find_by_id(brand_id)
curl GET "http://api.tradenity.com/v1/brands/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$brand = Brand->find_by_id($id)

The above command returns JSON structured like this:

{
  "__meta" : {
    "href" : "http://localhost:8080/api/v1/addresses/address_001"
  },
  "id": "...",
  "name": "...",
  "slug": "...",
  "status": "...",
  "description": "...",
  "photo": "...",
  "store": "..."
}

This endpoint retrieves a specific brand.

HTTP Request

GET http://api.tradenity.com/v1/brands/<ID>

URL Parameters

Parameter Description
ID The ID of the brand to retrieve

Create new Brand

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

Brand brand = new Brand();
brand.setName("...");
brand.setSlug("...");
brand.setStatus("...");
brand.setDescription("...");
brand.setPhoto("...");
brand.setStore("...");

Brand brand = BrandService.create(brand);

require 'tradenity'

brand = Brand.new(name: "...", slug: "...", status: "...", description: "...", photo: "...", store: "...")

brand.create

from tradenity.resources import Brand

brand = Brand(name="...", slug="...", status="...", description="...", photo="...", store="...")

brand.create()
curl -X POST http://api.tradenity.com/v1/brands \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "slug=..." \
  -d "status=..." \
  -d "description=..." \
  -d "photo=..." \
  -d "store=..." \
require 'tradenity'

$brand = new Brand()
$brand->setName("...");
$brand->setSlug("...");
$brand->setStatus("...");
$brand->setDescription("...");
$brand->setPhoto("...");
$brand->setStore("...");

$brand->create();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "slug": "...",
    "status": "...",
    "description": "...",
    "photo": "...",
    "store": "..."
  }

This endpoint create a new brand using the specified parameters.

HTTP Request

POST http://api.tradenity.com/v1/brands

Updating Brand

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
Brand brand = BrandService.findById(id);
brand.setName("...");
brand.setSlug("...");
brand.setStatus("...");
brand.setDescription("...");
brand.setPhoto("...");
brand.setStore("...");

Brand brand = BrandService.update(brand);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
brand = Brand.find_by_id(id)
Brand.name = "..."
Brand.slug = "..."
Brand.status = "..."
Brand.description = "..."
Brand.photo = "..."
Brand.store = "..."

brand.update()

from tradenity.resources import Brand

brand_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
brand = Brand.find_by_id(brand_id)
Brand.name = "..."
Brand.slug = "..."
Brand.status = "..."
Brand.description = "..."
Brand.photo = "..."
Brand.store = "..."

brand.update()
curl -X PUT http://api.tradenity.com/v1/brands \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "slug=..." \
  -d "status=..." \
  -d "description=..." \
  -d "photo=..." \
  -d "store=..." \
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$brand = Brand->find_by_id($id)
$brand.setName("...");
$brand.setSlug("...");
$brand.setStatus("...");
$brand.setDescription("...");
$brand.setPhoto("...");
$brand.setStore("...");

$brand->update();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "slug": "...",
    "status": "...",
    "description": "...",
    "photo": "...",
    "store": "..."
  }

This endpoint updates instance of brand using the specified parameters.

HTTP Request

PUT http://api.tradenity.com/v1/brands/<ID>

URL Parameters

Parameter Description
ID The ID of the brand to update

Delete a Specific Brand

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
boolean result = BrandService.delete(id);

require 'tradenity'

result = Brand.delete_by_id(id)
from tradenity.resources import Brand

brand_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
result = Brand.delete_by_id(brand_id)
curl DELETE "http://api.tradenity.com/v1/brands/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

result = Brand->delete_by_id($id)

The above command returns no JSON document, just a success or failure status (HTTP status code or language specific boolean true or false) :

This endpoint delete a specific brand.

HTTP Request

DELETE http://api.tradenity.com/v1/brands/<ID>

URL Parameters

Parameter Description
ID The ID of the brand to delete

Categories

Category attributes

Parameter Type Required Read only Default Description
name String Yes False n/a Name of the Category
slug String Yes False n/a Slug of the Category
status String Yes False n/a Status of the Category
description String No False n/a Description of the Category
depth Integer No False n/a Depth of the Category
position Integer No False n/a Position of the Category
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.
photo Photo NO No n/a Photo of the Category
parentCategory Category NO No n/a ParentCategory of the Category

Get All Categories

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<Category> categories = CategoryService.findAll();

require 'tradenity'

categories = Category.find_all

from tradenity.resources import Category

categories = Category.find_all()
curl -X GET http://api.tradenity.com/v1/categories \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$categories = Category->find_all()

The above command returns JSON structured like this:

{
    "categories": [{
        "name": "...",
        "slug": "...",
        "status": "...",
        "description": "...",
        "photo": "...",
        "depth": "...",
        "position": "...",
        "parentCategory": "...",
        "store": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all categories.

HTTP Request

GET http://api.tradenity.com/v1/categories

Find a Specific Category by ID

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
Category category = CategoryService.findById(id);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
category = Category.find_by_id(id)
from tradenity.resources import Category

category_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
category = Category.find_by_id(category_id)
curl GET "http://api.tradenity.com/v1/categories/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$category = Category->find_by_id($id)

The above command returns JSON structured like this:

{
  "__meta" : {
    "href" : "http://localhost:8080/api/v1/addresses/address_001"
  },
  "id": "...",
  "name": "...",
  "slug": "...",
  "status": "...",
  "description": "...",
  "photo": "...",
  "depth": "...",
  "position": "...",
  "parentCategory": "...",
  "store": "..."
}

This endpoint retrieves a specific category.

HTTP Request

GET http://api.tradenity.com/v1/categories/<ID>

URL Parameters

Parameter Description
ID The ID of the category to retrieve

Create new Category

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

Category category = new Category();
category.setName("...");
category.setSlug("...");
category.setStatus("...");
category.setDescription("...");
category.setPhoto("...");
category.setDepth("...");
category.setPosition("...");
category.setParentCategory("...");
category.setStore("...");

Category category = CategoryService.create(category);

require 'tradenity'

category = Category.new(name: "...", slug: "...", status: "...", description: "...", photo: "...", depth: "...", position: "...", parentCategory: "...", store: "...")

category.create

from tradenity.resources import Category

category = Category(name="...", slug="...", status="...", description="...", photo="...", depth="...", position="...", parentCategory="...", store="...")

category.create()
curl -X POST http://api.tradenity.com/v1/categories \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "slug=..." \
  -d "status=..." \
  -d "description=..." \
  -d "photo=..." \
  -d "depth=..." \
  -d "position=..." \
  -d "parentCategory=..." \
  -d "store=..." \
require 'tradenity'

$category = new Category()
$category->setName("...");
$category->setSlug("...");
$category->setStatus("...");
$category->setDescription("...");
$category->setPhoto("...");
$category->setDepth("...");
$category->setPosition("...");
$category->setParentCategory("...");
$category->setStore("...");

$category->create();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "slug": "...",
    "status": "...",
    "description": "...",
    "photo": "...",
    "depth": "...",
    "position": "...",
    "parentCategory": "...",
    "store": "..."
  }

This endpoint create a new category using the specified parameters.

HTTP Request

POST http://api.tradenity.com/v1/categories

Updating Category

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
Category category = CategoryService.findById(id);
category.setName("...");
category.setSlug("...");
category.setStatus("...");
category.setDescription("...");
category.setPhoto("...");
category.setDepth("...");
category.setPosition("...");
category.setParentCategory("...");
category.setStore("...");

Category category = CategoryService.update(category);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
category = Category.find_by_id(id)
Category.name = "..."
Category.slug = "..."
Category.status = "..."
Category.description = "..."
Category.photo = "..."
Category.depth = "..."
Category.position = "..."
Category.parentCategory = "..."
Category.store = "..."

category.update()

from tradenity.resources import Category

category_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
category = Category.find_by_id(category_id)
Category.name = "..."
Category.slug = "..."
Category.status = "..."
Category.description = "..."
Category.photo = "..."
Category.depth = "..."
Category.position = "..."
Category.parentCategory = "..."
Category.store = "..."

category.update()
curl -X PUT http://api.tradenity.com/v1/categories \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "slug=..." \
  -d "status=..." \
  -d "description=..." \
  -d "photo=..." \
  -d "depth=..." \
  -d "position=..." \
  -d "parentCategory=..." \
  -d "store=..." \
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$category = Category->find_by_id($id)
$category.setName("...");
$category.setSlug("...");
$category.setStatus("...");
$category.setDescription("...");
$category.setPhoto("...");
$category.setDepth("...");
$category.setPosition("...");
$category.setParentCategory("...");
$category.setStore("...");

$category->update();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "slug": "...",
    "status": "...",
    "description": "...",
    "photo": "...",
    "depth": "...",
    "position": "...",
    "parentCategory": "...",
    "store": "..."
  }

This endpoint updates instance of category using the specified parameters.

HTTP Request

PUT http://api.tradenity.com/v1/categories/<ID>

URL Parameters

Parameter Description
ID The ID of the category to update

Delete a Specific Category

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
boolean result = CategoryService.delete(id);

require 'tradenity'

result = Category.delete_by_id(id)
from tradenity.resources import Category

category_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
result = Category.delete_by_id(category_id)
curl DELETE "http://api.tradenity.com/v1/categories/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

result = Category->delete_by_id($id)

The above command returns no JSON document, just a success or failure status (HTTP status code or language specific boolean true or false) :

This endpoint delete a specific category.

HTTP Request

DELETE http://api.tradenity.com/v1/categories/<ID>

URL Parameters

Parameter Description
ID The ID of the category to delete

Options

Option attributes

Parameter Type Required Read only Default Description
name String Yes False n/a Name of the Option
slug String Yes False n/a Slug of the Option
description String No False n/a Description of the Option
required Boolean No False true Required of the Option
dataType String Yes False string DataType of the Option
status String Yes False enable Status of the Option
position Integer Yes False 1 Position of the Option
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.

Get All Options

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<Option> options = OptionService.findAll();

require 'tradenity'

options = Option.find_all

from tradenity.resources import Option

options = Option.find_all()
curl -X GET http://api.tradenity.com/v1/options \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$options = Option->find_all()

The above command returns JSON structured like this:

{
    "options": [{
        "name": "...",
        "slug": "...",
        "description": "...",
        "required": "...",
        "dataType": "...",
        "status": "...",
        "position": "...",
        "store": "...",
        "values": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all options.

HTTP Request

GET http://api.tradenity.com/v1/options

Find a Specific Option by ID

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
Option option = OptionService.findById(id);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
option = Option.find_by_id(id)
from tradenity.resources import Option

option_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
option = Option.find_by_id(option_id)
curl GET "http://api.tradenity.com/v1/options/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$option = Option->find_by_id($id)

The above command returns JSON structured like this:

{
  "__meta" : {
    "href" : "http://localhost:8080/api/v1/addresses/address_001"
  },
  "id": "...",
  "name": "...",
  "slug": "...",
  "description": "...",
  "required": "...",
  "dataType": "...",
  "status": "...",
  "position": "...",
  "store": "...",
  "values": "..."
}

This endpoint retrieves a specific option.

HTTP Request

GET http://api.tradenity.com/v1/options/<ID>

URL Parameters

Parameter Description
ID The ID of the option to retrieve

Create new Option

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

Option option = new Option();
option.setName("...");
option.setSlug("...");
option.setDescription("...");
option.setRequired("...");
option.setDataType("...");
option.setStatus("...");
option.setPosition("...");
option.setStore("...");
option.setValues("...");

Option option = OptionService.create(option);

require 'tradenity'

option = Option.new(name: "...", slug: "...", description: "...", required: "...", dataType: "...", status: "...", position: "...", store: "...", values: "...")

option.create

from tradenity.resources import Option

option = Option(name="...", slug="...", description="...", required="...", dataType="...", status="...", position="...", store="...", values="...")

option.create()
curl -X POST http://api.tradenity.com/v1/options \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "slug=..." \
  -d "description=..." \
  -d "required=..." \
  -d "dataType=..." \
  -d "status=..." \
  -d "position=..." \
  -d "store=..." \
  -d "values=..." \
require 'tradenity'

$option = new Option()
$option->setName("...");
$option->setSlug("...");
$option->setDescription("...");
$option->setRequired("...");
$option->setDataType("...");
$option->setStatus("...");
$option->setPosition("...");
$option->setStore("...");
$option->setValues("...");

$option->create();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "slug": "...",
    "description": "...",
    "required": "...",
    "dataType": "...",
    "status": "...",
    "position": "...",
    "store": "...",
    "values": "..."
  }

This endpoint create a new option using the specified parameters.

HTTP Request

POST http://api.tradenity.com/v1/options

Updating Option

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
Option option = OptionService.findById(id);
option.setName("...");
option.setSlug("...");
option.setDescription("...");
option.setRequired("...");
option.setDataType("...");
option.setStatus("...");
option.setPosition("...");
option.setStore("...");
option.setValues("...");

Option option = OptionService.update(option);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
option = Option.find_by_id(id)
Option.name = "..."
Option.slug = "..."
Option.description = "..."
Option.required = "..."
Option.dataType = "..."
Option.status = "..."
Option.position = "..."
Option.store = "..."
Option.values = "..."

option.update()

from tradenity.resources import Option

option_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
option = Option.find_by_id(option_id)
Option.name = "..."
Option.slug = "..."
Option.description = "..."
Option.required = "..."
Option.dataType = "..."
Option.status = "..."
Option.position = "..."
Option.store = "..."
Option.values = "..."

option.update()
curl -X PUT http://api.tradenity.com/v1/options \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "slug=..." \
  -d "description=..." \
  -d "required=..." \
  -d "dataType=..." \
  -d "status=..." \
  -d "position=..." \
  -d "store=..." \
  -d "values=..." \
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$option = Option->find_by_id($id)
$option.setName("...");
$option.setSlug("...");
$option.setDescription("...");
$option.setRequired("...");
$option.setDataType("...");
$option.setStatus("...");
$option.setPosition("...");
$option.setStore("...");
$option.setValues("...");

$option->update();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "slug": "...",
    "description": "...",
    "required": "...",
    "dataType": "...",
    "status": "...",
    "position": "...",
    "store": "...",
    "values": "..."
  }

This endpoint updates instance of option using the specified parameters.

HTTP Request

PUT http://api.tradenity.com/v1/options/<ID>

URL Parameters

Parameter Description
ID The ID of the option to update

Delete a Specific Option

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
boolean result = OptionService.delete(id);

require 'tradenity'

result = Option.delete_by_id(id)
from tradenity.resources import Option

option_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
result = Option.delete_by_id(option_id)
curl DELETE "http://api.tradenity.com/v1/options/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

result = Option->delete_by_id($id)

The above command returns no JSON document, just a success or failure status (HTTP status code or language specific boolean true or false) :

This endpoint delete a specific option.

HTTP Request

DELETE http://api.tradenity.com/v1/options/<ID>

URL Parameters

Parameter Description
ID The ID of the option to delete

OptionValues

OptionValue attributes

Parameter Type Required Read only Default Description
value String Yes False n/a Value of the OptionValue
code String Yes False n/a Code of the OptionValue
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.
option Option Yes No n/a Option of the OptionValue

Get All OptionValues

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<OptionValue> optionValues = OptionValueService.findAll();

require 'tradenity'

optionValues = OptionValue.find_all

from tradenity.resources import OptionValue

optionValues = OptionValue.find_all()
curl -X GET http://api.tradenity.com/v1/optionValues \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$optionValues = OptionValue->find_all()

The above command returns JSON structured like this:

{
    "optionValues": [{
        "option": "...",
        "value": "...",
        "code": "...",
        "store": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all optionValues.

HTTP Request

GET http://api.tradenity.com/v1/optionValues

Find a Specific OptionValue by ID

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
OptionValue optionValue = OptionValueService.findById(id);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
optionValue = OptionValue.find_by_id(id)
from tradenity.resources import OptionValue

optionValue_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
optionValue = OptionValue.find_by_id(optionValue_id)
curl GET "http://api.tradenity.com/v1/optionValues/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$optionValue = OptionValue->find_by_id($id)

The above command returns JSON structured like this:

{
  "__meta" : {
    "href" : "http://localhost:8080/api/v1/addresses/address_001"
  },
  "id": "...",
  "option": "...",
  "value": "...",
  "code": "...",
  "store": "..."
}

This endpoint retrieves a specific optionValue.

HTTP Request

GET http://api.tradenity.com/v1/optionValues/<ID>

URL Parameters

Parameter Description
ID The ID of the optionValue to retrieve

Create new OptionValue

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

OptionValue optionValue = new OptionValue();
optionValue.setOption("...");
optionValue.setValue("...");
optionValue.setCode("...");
optionValue.setStore("...");

OptionValue optionValue = OptionValueService.create(optionValue);

require 'tradenity'

optionValue = OptionValue.new(option: "...", value: "...", code: "...", store: "...")

optionValue.create

from tradenity.resources import OptionValue

optionValue = OptionValue(option="...", value="...", code="...", store="...")

optionValue.create()
curl -X POST http://api.tradenity.com/v1/optionValues \
  -H "Authorization: basicauthkey \
  -d "option=..." \
  -d "value=..." \
  -d "code=..." \
  -d "store=..." \
require 'tradenity'

$optionValue = new OptionValue()
$optionValue->setOption("...");
$optionValue->setValue("...");
$optionValue->setCode("...");
$optionValue->setStore("...");

$optionValue->create();

The above command returns JSON structured like this:

  {
    "id": "...",
    "option": "...",
    "value": "...",
    "code": "...",
    "store": "..."
  }

This endpoint create a new optionValue using the specified parameters.

HTTP Request

POST http://api.tradenity.com/v1/optionValues

Updating OptionValue

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
OptionValue optionValue = OptionValueService.findById(id);
optionValue.setOption("...");
optionValue.setValue("...");
optionValue.setCode("...");
optionValue.setStore("...");

OptionValue optionValue = OptionValueService.update(optionValue);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
optionValue = OptionValue.find_by_id(id)
OptionValue.option = "..."
OptionValue.value = "..."
OptionValue.code = "..."
OptionValue.store = "..."

optionValue.update()

from tradenity.resources import OptionValue

optionValue_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
optionValue = OptionValue.find_by_id(optionValue_id)
OptionValue.option = "..."
OptionValue.value = "..."
OptionValue.code = "..."
OptionValue.store = "..."

optionValue.update()
curl -X PUT http://api.tradenity.com/v1/optionValues \
  -H "Authorization: basicauthkey \
  -d "option=..." \
  -d "value=..." \
  -d "code=..." \
  -d "store=..." \
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$optionValue = OptionValue->find_by_id($id)
$optionValue.setOption("...");
$optionValue.setValue("...");
$optionValue.setCode("...");
$optionValue.setStore("...");

$optionValue->update();

The above command returns JSON structured like this:

  {
    "id": "...",
    "option": "...",
    "value": "...",
    "code": "...",
    "store": "..."
  }

This endpoint updates instance of optionValue using the specified parameters.

HTTP Request

PUT http://api.tradenity.com/v1/optionValues/<ID>

URL Parameters

Parameter Description
ID The ID of the optionValue to update

Delete a Specific OptionValue

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
boolean result = OptionValueService.delete(id);

require 'tradenity'

result = OptionValue.delete_by_id(id)
from tradenity.resources import OptionValue

optionValue_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
result = OptionValue.delete_by_id(optionValue_id)
curl DELETE "http://api.tradenity.com/v1/optionValues/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

result = OptionValue->delete_by_id($id)

The above command returns no JSON document, just a success or failure status (HTTP status code or language specific boolean true or false) :

This endpoint delete a specific optionValue.

HTTP Request

DELETE http://api.tradenity.com/v1/optionValues/<ID>

URL Parameters

Parameter Description
ID The ID of the optionValue to delete

OptionSets

OptionSet attributes

Parameter Type Required Read only Default Description
name String Yes False n/a Name of the OptionSet
slug String Yes False n/a Slug of the OptionSet
description String No False n/a Description of the OptionSet
status String Yes False enabled Status of the OptionSet
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.
options List of options NO No n/a Options of the OptionSet

Get All OptionSets

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<OptionSet> optionSets = OptionSetService.findAll();

require 'tradenity'

optionSets = OptionSet.find_all

from tradenity.resources import OptionSet

optionSets = OptionSet.find_all()
curl -X GET http://api.tradenity.com/v1/optionSets \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$optionSets = OptionSet->find_all()

The above command returns JSON structured like this:

{
    "optionSets": [{
        "name": "...",
        "slug": "...",
        "description": "...",
        "status": "...",
        "options": "...",
        "store": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all optionSets.

HTTP Request

GET http://api.tradenity.com/v1/optionSets

Find a Specific OptionSet by ID

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
OptionSet optionSet = OptionSetService.findById(id);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
optionSet = OptionSet.find_by_id(id)
from tradenity.resources import OptionSet

optionSet_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
optionSet = OptionSet.find_by_id(optionSet_id)
curl GET "http://api.tradenity.com/v1/optionSets/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$optionSet = OptionSet->find_by_id($id)

The above command returns JSON structured like this:

{
  "__meta" : {
    "href" : "http://localhost:8080/api/v1/addresses/address_001"
  },
  "id": "...",
  "name": "...",
  "slug": "...",
  "description": "...",
  "status": "...",
  "options": "...",
  "store": "..."
}

This endpoint retrieves a specific optionSet.

HTTP Request

GET http://api.tradenity.com/v1/optionSets/<ID>

URL Parameters

Parameter Description
ID The ID of the optionSet to retrieve

Create new OptionSet

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

OptionSet optionSet = new OptionSet();
optionSet.setName("...");
optionSet.setSlug("...");
optionSet.setDescription("...");
optionSet.setStatus("...");
optionSet.setOptions("...");
optionSet.setStore("...");

OptionSet optionSet = OptionSetService.create(optionSet);

require 'tradenity'

optionSet = OptionSet.new(name: "...", slug: "...", description: "...", status: "...", options: "...", store: "...")

optionSet.create

from tradenity.resources import OptionSet

optionSet = OptionSet(name="...", slug="...", description="...", status="...", options="...", store="...")

optionSet.create()
curl -X POST http://api.tradenity.com/v1/optionSets \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "slug=..." \
  -d "description=..." \
  -d "status=..." \
  -d "options=..." \
  -d "store=..." \
require 'tradenity'

$optionSet = new OptionSet()
$optionSet->setName("...");
$optionSet->setSlug("...");
$optionSet->setDescription("...");
$optionSet->setStatus("...");
$optionSet->setOptions("...");
$optionSet->setStore("...");

$optionSet->create();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "slug": "...",
    "description": "...",
    "status": "...",
    "options": "...",
    "store": "..."
  }

This endpoint create a new optionSet using the specified parameters.

HTTP Request

POST http://api.tradenity.com/v1/optionSets

Updating OptionSet

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
OptionSet optionSet = OptionSetService.findById(id);
optionSet.setName("...");
optionSet.setSlug("...");
optionSet.setDescription("...");
optionSet.setStatus("...");
optionSet.setOptions("...");
optionSet.setStore("...");

OptionSet optionSet = OptionSetService.update(optionSet);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
optionSet = OptionSet.find_by_id(id)
OptionSet.name = "..."
OptionSet.slug = "..."
OptionSet.description = "..."
OptionSet.status = "..."
OptionSet.options = "..."
OptionSet.store = "..."

optionSet.update()

from tradenity.resources import OptionSet

optionSet_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
optionSet = OptionSet.find_by_id(optionSet_id)
OptionSet.name = "..."
OptionSet.slug = "..."
OptionSet.description = "..."
OptionSet.status = "..."
OptionSet.options = "..."
OptionSet.store = "..."

optionSet.update()
curl -X PUT http://api.tradenity.com/v1/optionSets \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "slug=..." \
  -d "description=..." \
  -d "status=..." \
  -d "options=..." \
  -d "store=..." \
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$optionSet = OptionSet->find_by_id($id)
$optionSet.setName("...");
$optionSet.setSlug("...");
$optionSet.setDescription("...");
$optionSet.setStatus("...");
$optionSet.setOptions("...");
$optionSet.setStore("...");

$optionSet->update();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "slug": "...",
    "description": "...",
    "status": "...",
    "options": "...",
    "store": "..."
  }

This endpoint updates instance of optionSet using the specified parameters.

HTTP Request

PUT http://api.tradenity.com/v1/optionSets/<ID>

URL Parameters

Parameter Description
ID The ID of the optionSet to update

Delete a Specific OptionSet

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
boolean result = OptionSetService.delete(id);

require 'tradenity'

result = OptionSet.delete_by_id(id)
from tradenity.resources import OptionSet

optionSet_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
result = OptionSet.delete_by_id(optionSet_id)
curl DELETE "http://api.tradenity.com/v1/optionSets/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

result = OptionSet->delete_by_id($id)

The above command returns no JSON document, just a success or failure status (HTTP status code or language specific boolean true or false) :

This endpoint delete a specific optionSet.

HTTP Request

DELETE http://api.tradenity.com/v1/optionSets/<ID>

URL Parameters

Parameter Description
ID The ID of the optionSet to delete

Products

Product attributes

Parameter Type Required Read only Default Description
name String Yes False n/a Name of the Product
slug String Yes False n/a Slug of the Product
model String No False n/a Model of the Product
status String Yes False n/a Status of the Product
type String Yes False physical Type of the Product
shortDescription String No False n/a ShortDescription of the Product
fullDescription String No False n/a FullDescription of the Product
freeShipping Boolean No False false FreeShipping of the Product
sku String Yes False n/a Sku of the Product
price Integer Yes False n/a Price of the Product
costPrice Integer No False n/a CostPrice of the Product
retailPrice Integer No False n/a RetailPrice of the Product
salePrice Integer No False n/a SalePrice of the Product
manageInventory Boolean No False false ManageInventory of the Product
stockLevel Integer No False n/a StockLevel of the Product
minimumStockLevel Integer No False n/a MinimumStockLevel of the Product
maximumSellCount Integer No False n/a MaximumSellCount of the Product
requireShipping Boolean No False false RequireShipping of the Product
availability String No False n/a Availability of the Product
availabilityDate Date No False n/a AvailabilityDate of the Product
allowPreOrder Boolean No False false AllowPreOrder of the Product
stockStatus String No True n/a StockStatus of the Product
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.
brand Brand NO No n/a Brand of the Product
mainPhoto Photo NO No n/a MainPhoto of the Product
photos List of photos NO No n/a Photos of the Product
files List of storageFiles NO No n/a Files of the Product
promotions List of promotions NO No n/a Promotions of the Product
relatedProducts List of products NO No n/a RelatedProducts of the Product
categories List of categories Yes No n/a Categories of the Product
taxClass TaxClass NO No n/a TaxClass of the Product
optionSet OptionSet NO No n/a OptionSet of the Product

Get All Products

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<Product> products = ProductService.findAll();

require 'tradenity'

products = Product.find_all

from tradenity.resources import Product

products = Product.find_all()
curl -X GET http://api.tradenity.com/v1/products \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$products = Product->find_all()

The above command returns JSON structured like this:

{
    "products": [{
        "name": "...",
        "slug": "...",
        "model": "...",
        "status": "...",
        "type": "...",
        "shortDescription": "...",
        "fullDescription": "...",
        "freeShipping": "...",
        "sku": "...",
        "price": "...",
        "costPrice": "...",
        "retailPrice": "...",
        "salePrice": "...",
        "manageInventory": "...",
        "stockLevel": "...",
        "minimumStockLevel": "...",
        "maximumSellCount": "...",
        "itemDimensions": "...",
        "packageDimensions": "...",
        "packageWeight": "...",
        "requireShipping": "...",
        "availability": "...",
        "availabilityDate": "...",
        "allowPreOrder": "...",
        "brand": "...",
        "mainPhoto": "...",
        "photos": "...",
        "files": "...",
        "promotions": "...",
        "relatedProducts": "...",
        "stockStatus": "...",
        "categories": "...",
        "taxClass": "...",
        "optionSet": "...",
        "store": "...",
        "variants": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all products.

HTTP Request

GET http://api.tradenity.com/v1/products

Find a Specific Product by ID

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
Product product = ProductService.findById(id);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
product = Product.find_by_id(id)
from tradenity.resources import Product

product_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
product = Product.find_by_id(product_id)
curl GET "http://api.tradenity.com/v1/products/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$product = Product->find_by_id($id)

The above command returns JSON structured like this:

{
  "__meta" : {
    "href" : "http://localhost:8080/api/v1/addresses/address_001"
  },
  "id": "...",
  "name": "...",
  "slug": "...",
  "model": "...",
  "status": "...",
  "type": "...",
  "shortDescription": "...",
  "fullDescription": "...",
  "freeShipping": "...",
  "sku": "...",
  "price": "...",
  "costPrice": "...",
  "retailPrice": "...",
  "salePrice": "...",
  "manageInventory": "...",
  "stockLevel": "...",
  "minimumStockLevel": "...",
  "maximumSellCount": "...",
  "itemDimensions": "...",
  "packageDimensions": "...",
  "packageWeight": "...",
  "requireShipping": "...",
  "availability": "...",
  "availabilityDate": "...",
  "allowPreOrder": "...",
  "brand": "...",
  "mainPhoto": "...",
  "photos": "...",
  "files": "...",
  "promotions": "...",
  "relatedProducts": "...",
  "stockStatus": "...",
  "categories": "...",
  "taxClass": "...",
  "optionSet": "...",
  "store": "...",
  "variants": "..."
}

This endpoint retrieves a specific product.

HTTP Request

GET http://api.tradenity.com/v1/products/<ID>

URL Parameters

Parameter Description
ID The ID of the product to retrieve

Create new Product

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

Product product = new Product();
product.setName("...");
product.setSlug("...");
product.setModel("...");
product.setStatus("...");
product.setType("...");
product.setShortDescription("...");
product.setFullDescription("...");
product.setFreeShipping("...");
product.setSku("...");
product.setPrice("...");
product.setCostPrice("...");
product.setRetailPrice("...");
product.setSalePrice("...");
product.setManageInventory("...");
product.setStockLevel("...");
product.setMinimumStockLevel("...");
product.setMaximumSellCount("...");
product.setItemDimensions("...");
product.setPackageDimensions("...");
product.setPackageWeight("...");
product.setRequireShipping("...");
product.setAvailability("...");
product.setAvailabilityDate("...");
product.setAllowPreOrder("...");
product.setBrand("...");
product.setMainPhoto("...");
product.setPhotos("...");
product.setFiles("...");
product.setPromotions("...");
product.setRelatedProducts("...");
product.setStockStatus("...");
product.setCategories("...");
product.setTaxClass("...");
product.setOptionSet("...");
product.setStore("...");
product.setVariants("...");

Product product = ProductService.create(product);

require 'tradenity'

product = Product.new(name: "...", slug: "...", model: "...", status: "...", type: "...", shortDescription: "...", fullDescription: "...", freeShipping: "...", sku: "...", price: "...", costPrice: "...", retailPrice: "...", salePrice: "...", manageInventory: "...", stockLevel: "...", minimumStockLevel: "...", maximumSellCount: "...", itemDimensions: "...", packageDimensions: "...", packageWeight: "...", requireShipping: "...", availability: "...", availabilityDate: "...", allowPreOrder: "...", brand: "...", mainPhoto: "...", photos: "...", files: "...", promotions: "...", relatedProducts: "...", stockStatus: "...", categories: "...", taxClass: "...", optionSet: "...", store: "...", variants: "...")

product.create

from tradenity.resources import Product

product = Product(name="...", slug="...", model="...", status="...", type="...", shortDescription="...", fullDescription="...", freeShipping="...", sku="...", price="...", costPrice="...", retailPrice="...", salePrice="...", manageInventory="...", stockLevel="...", minimumStockLevel="...", maximumSellCount="...", itemDimensions="...", packageDimensions="...", packageWeight="...", requireShipping="...", availability="...", availabilityDate="...", allowPreOrder="...", brand="...", mainPhoto="...", photos="...", files="...", promotions="...", relatedProducts="...", stockStatus="...", categories="...", taxClass="...", optionSet="...", store="...", variants="...")

product.create()
curl -X POST http://api.tradenity.com/v1/products \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "slug=..." \
  -d "model=..." \
  -d "status=..." \
  -d "type=..." \
  -d "shortDescription=..." \
  -d "fullDescription=..." \
  -d "freeShipping=..." \
  -d "sku=..." \
  -d "price=..." \
  -d "costPrice=..." \
  -d "retailPrice=..." \
  -d "salePrice=..." \
  -d "manageInventory=..." \
  -d "stockLevel=..." \
  -d "minimumStockLevel=..." \
  -d "maximumSellCount=..." \
  -d "itemDimensions=..." \
  -d "packageDimensions=..." \
  -d "packageWeight=..." \
  -d "requireShipping=..." \
  -d "availability=..." \
  -d "availabilityDate=..." \
  -d "allowPreOrder=..." \
  -d "brand=..." \
  -d "mainPhoto=..." \
  -d "photos=..." \
  -d "files=..." \
  -d "promotions=..." \
  -d "relatedProducts=..." \
  -d "stockStatus=..." \
  -d "categories=..." \
  -d "taxClass=..." \
  -d "optionSet=..." \
  -d "store=..." \
  -d "variants=..." \
require 'tradenity'

$product = new Product()
$product->setName("...");
$product->setSlug("...");
$product->setModel("...");
$product->setStatus("...");
$product->setType("...");
$product->setShortDescription("...");
$product->setFullDescription("...");
$product->setFreeShipping("...");
$product->setSku("...");
$product->setPrice("...");
$product->setCostPrice("...");
$product->setRetailPrice("...");
$product->setSalePrice("...");
$product->setManageInventory("...");
$product->setStockLevel("...");
$product->setMinimumStockLevel("...");
$product->setMaximumSellCount("...");
$product->setItemDimensions("...");
$product->setPackageDimensions("...");
$product->setPackageWeight("...");
$product->setRequireShipping("...");
$product->setAvailability("...");
$product->setAvailabilityDate("...");
$product->setAllowPreOrder("...");
$product->setBrand("...");
$product->setMainPhoto("...");
$product->setPhotos("...");
$product->setFiles("...");
$product->setPromotions("...");
$product->setRelatedProducts("...");
$product->setStockStatus("...");
$product->setCategories("...");
$product->setTaxClass("...");
$product->setOptionSet("...");
$product->setStore("...");
$product->setVariants("...");

$product->create();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "slug": "...",
    "model": "...",
    "status": "...",
    "type": "...",
    "shortDescription": "...",
    "fullDescription": "...",
    "freeShipping": "...",
    "sku": "...",
    "price": "...",
    "costPrice": "...",
    "retailPrice": "...",
    "salePrice": "...",
    "manageInventory": "...",
    "stockLevel": "...",
    "minimumStockLevel": "...",
    "maximumSellCount": "...",
    "itemDimensions": "...",
    "packageDimensions": "...",
    "packageWeight": "...",
    "requireShipping": "...",
    "availability": "...",
    "availabilityDate": "...",
    "allowPreOrder": "...",
    "brand": "...",
    "mainPhoto": "...",
    "photos": "...",
    "files": "...",
    "promotions": "...",
    "relatedProducts": "...",
    "stockStatus": "...",
    "categories": "...",
    "taxClass": "...",
    "optionSet": "...",
    "store": "...",
    "variants": "..."
  }

This endpoint create a new product using the specified parameters.

HTTP Request

POST http://api.tradenity.com/v1/products

Updating Product

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
Product product = ProductService.findById(id);
product.setName("...");
product.setSlug("...");
product.setModel("...");
product.setStatus("...");
product.setType("...");
product.setShortDescription("...");
product.setFullDescription("...");
product.setFreeShipping("...");
product.setSku("...");
product.setPrice("...");
product.setCostPrice("...");
product.setRetailPrice("...");
product.setSalePrice("...");
product.setManageInventory("...");
product.setStockLevel("...");
product.setMinimumStockLevel("...");
product.setMaximumSellCount("...");
product.setItemDimensions("...");
product.setPackageDimensions("...");
product.setPackageWeight("...");
product.setRequireShipping("...");
product.setAvailability("...");
product.setAvailabilityDate("...");
product.setAllowPreOrder("...");
product.setBrand("...");
product.setMainPhoto("...");
product.setPhotos("...");
product.setFiles("...");
product.setPromotions("...");
product.setRelatedProducts("...");
product.setStockStatus("...");
product.setCategories("...");
product.setTaxClass("...");
product.setOptionSet("...");
product.setStore("...");
product.setVariants("...");

Product product = ProductService.update(product);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
product = Product.find_by_id(id)
Product.name = "..."
Product.slug = "..."
Product.model = "..."
Product.status = "..."
Product.type = "..."
Product.shortDescription = "..."
Product.fullDescription = "..."
Product.freeShipping = "..."
Product.sku = "..."
Product.price = "..."
Product.costPrice = "..."
Product.retailPrice = "..."
Product.salePrice = "..."
Product.manageInventory = "..."
Product.stockLevel = "..."
Product.minimumStockLevel = "..."
Product.maximumSellCount = "..."
Product.itemDimensions = "..."
Product.packageDimensions = "..."
Product.packageWeight = "..."
Product.requireShipping = "..."
Product.availability = "..."
Product.availabilityDate = "..."
Product.allowPreOrder = "..."
Product.brand = "..."
Product.mainPhoto = "..."
Product.photos = "..."
Product.files = "..."
Product.promotions = "..."
Product.relatedProducts = "..."
Product.stockStatus = "..."
Product.categories = "..."
Product.taxClass = "..."
Product.optionSet = "..."
Product.store = "..."
Product.variants = "..."

product.update()

from tradenity.resources import Product

product_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
product = Product.find_by_id(product_id)
Product.name = "..."
Product.slug = "..."
Product.model = "..."
Product.status = "..."
Product.type = "..."
Product.shortDescription = "..."
Product.fullDescription = "..."
Product.freeShipping = "..."
Product.sku = "..."
Product.price = "..."
Product.costPrice = "..."
Product.retailPrice = "..."
Product.salePrice = "..."
Product.manageInventory = "..."
Product.stockLevel = "..."
Product.minimumStockLevel = "..."
Product.maximumSellCount = "..."
Product.itemDimensions = "..."
Product.packageDimensions = "..."
Product.packageWeight = "..."
Product.requireShipping = "..."
Product.availability = "..."
Product.availabilityDate = "..."
Product.allowPreOrder = "..."
Product.brand = "..."
Product.mainPhoto = "..."
Product.photos = "..."
Product.files = "..."
Product.promotions = "..."
Product.relatedProducts = "..."
Product.stockStatus = "..."
Product.categories = "..."
Product.taxClass = "..."
Product.optionSet = "..."
Product.store = "..."
Product.variants = "..."

product.update()
curl -X PUT http://api.tradenity.com/v1/products \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "slug=..." \
  -d "model=..." \
  -d "status=..." \
  -d "type=..." \
  -d "shortDescription=..." \
  -d "fullDescription=..." \
  -d "freeShipping=..." \
  -d "sku=..." \
  -d "price=..." \
  -d "costPrice=..." \
  -d "retailPrice=..." \
  -d "salePrice=..." \
  -d "manageInventory=..." \
  -d "stockLevel=..." \
  -d "minimumStockLevel=..." \
  -d "maximumSellCount=..." \
  -d "itemDimensions=..." \
  -d "packageDimensions=..." \
  -d "packageWeight=..." \
  -d "requireShipping=..." \
  -d "availability=..." \
  -d "availabilityDate=..." \
  -d "allowPreOrder=..." \
  -d "brand=..." \
  -d "mainPhoto=..." \
  -d "photos=..." \
  -d "files=..." \
  -d "promotions=..." \
  -d "relatedProducts=..." \
  -d "stockStatus=..." \
  -d "categories=..." \
  -d "taxClass=..." \
  -d "optionSet=..." \
  -d "store=..." \
  -d "variants=..." \
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$product = Product->find_by_id($id)
$product.setName("...");
$product.setSlug("...");
$product.setModel("...");
$product.setStatus("...");
$product.setType("...");
$product.setShortDescription("...");
$product.setFullDescription("...");
$product.setFreeShipping("...");
$product.setSku("...");
$product.setPrice("...");
$product.setCostPrice("...");
$product.setRetailPrice("...");
$product.setSalePrice("...");
$product.setManageInventory("...");
$product.setStockLevel("...");
$product.setMinimumStockLevel("...");
$product.setMaximumSellCount("...");
$product.setItemDimensions("...");
$product.setPackageDimensions("...");
$product.setPackageWeight("...");
$product.setRequireShipping("...");
$product.setAvailability("...");
$product.setAvailabilityDate("...");
$product.setAllowPreOrder("...");
$product.setBrand("...");
$product.setMainPhoto("...");
$product.setPhotos("...");
$product.setFiles("...");
$product.setPromotions("...");
$product.setRelatedProducts("...");
$product.setStockStatus("...");
$product.setCategories("...");
$product.setTaxClass("...");
$product.setOptionSet("...");
$product.setStore("...");
$product.setVariants("...");

$product->update();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "slug": "...",
    "model": "...",
    "status": "...",
    "type": "...",
    "shortDescription": "...",
    "fullDescription": "...",
    "freeShipping": "...",
    "sku": "...",
    "price": "...",
    "costPrice": "...",
    "retailPrice": "...",
    "salePrice": "...",
    "manageInventory": "...",
    "stockLevel": "...",
    "minimumStockLevel": "...",
    "maximumSellCount": "...",
    "itemDimensions": "...",
    "packageDimensions": "...",
    "packageWeight": "...",
    "requireShipping": "...",
    "availability": "...",
    "availabilityDate": "...",
    "allowPreOrder": "...",
    "brand": "...",
    "mainPhoto": "...",
    "photos": "...",
    "files": "...",
    "promotions": "...",
    "relatedProducts": "...",
    "stockStatus": "...",
    "categories": "...",
    "taxClass": "...",
    "optionSet": "...",
    "store": "...",
    "variants": "..."
  }

This endpoint updates instance of product using the specified parameters.

HTTP Request

PUT http://api.tradenity.com/v1/products/<ID>

URL Parameters

Parameter Description
ID The ID of the product to update

Delete a Specific Product

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
boolean result = ProductService.delete(id);

require 'tradenity'

result = Product.delete_by_id(id)
from tradenity.resources import Product

product_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
result = Product.delete_by_id(product_id)
curl DELETE "http://api.tradenity.com/v1/products/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

result = Product->delete_by_id($id)

The above command returns no JSON document, just a success or failure status (HTTP status code or language specific boolean true or false) :

This endpoint delete a specific product.

HTTP Request

DELETE http://api.tradenity.com/v1/products/<ID>

URL Parameters

Parameter Description
ID The ID of the product to delete

Collections

Collection attributes

Parameter Type Required Read only Default Description
name String Yes False n/a Name of the Collection
slug String Yes False n/a Slug of the Collection
status String Yes False n/a Status of the Collection
description String No False n/a Description of the Collection
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.
products List of products NO No n/a Products of the Collection

Get All Collections

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<Collection> collections = CollectionService.findAll();

require 'tradenity'

collections = Collection.find_all

from tradenity.resources import Collection

collections = Collection.find_all()
curl -X GET http://api.tradenity.com/v1/collections \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$collections = Collection->find_all()

The above command returns JSON structured like this:

{
    "collections": [{
        "name": "...",
        "slug": "...",
        "status": "...",
        "description": "...",
        "products": "...",
        "store": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all collections.

HTTP Request

GET http://api.tradenity.com/v1/collections

Find a Specific Collection by ID

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
Collection collection = CollectionService.findById(id);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
collection = Collection.find_by_id(id)
from tradenity.resources import Collection

collection_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
collection = Collection.find_by_id(collection_id)
curl GET "http://api.tradenity.com/v1/collections/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$collection = Collection->find_by_id($id)

The above command returns JSON structured like this:

{
  "__meta" : {
    "href" : "http://localhost:8080/api/v1/addresses/address_001"
  },
  "id": "...",
  "name": "...",
  "slug": "...",
  "status": "...",
  "description": "...",
  "products": "...",
  "store": "..."
}

This endpoint retrieves a specific collection.

HTTP Request

GET http://api.tradenity.com/v1/collections/<ID>

URL Parameters

Parameter Description
ID The ID of the collection to retrieve

Create new Collection

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

Collection collection = new Collection();
collection.setName("...");
collection.setSlug("...");
collection.setStatus("...");
collection.setDescription("...");
collection.setProducts("...");
collection.setStore("...");

Collection collection = CollectionService.create(collection);

require 'tradenity'

collection = Collection.new(name: "...", slug: "...", status: "...", description: "...", products: "...", store: "...")

collection.create

from tradenity.resources import Collection

collection = Collection(name="...", slug="...", status="...", description="...", products="...", store="...")

collection.create()
curl -X POST http://api.tradenity.com/v1/collections \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "slug=..." \
  -d "status=..." \
  -d "description=..." \
  -d "products=..." \
  -d "store=..." \
require 'tradenity'

$collection = new Collection()
$collection->setName("...");
$collection->setSlug("...");
$collection->setStatus("...");
$collection->setDescription("...");
$collection->setProducts("...");
$collection->setStore("...");

$collection->create();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "slug": "...",
    "status": "...",
    "description": "...",
    "products": "...",
    "store": "..."
  }

This endpoint create a new collection using the specified parameters.

HTTP Request

POST http://api.tradenity.com/v1/collections

Updating Collection

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
Collection collection = CollectionService.findById(id);
collection.setName("...");
collection.setSlug("...");
collection.setStatus("...");
collection.setDescription("...");
collection.setProducts("...");
collection.setStore("...");

Collection collection = CollectionService.update(collection);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
collection = Collection.find_by_id(id)
Collection.name = "..."
Collection.slug = "..."
Collection.status = "..."
Collection.description = "..."
Collection.products = "..."
Collection.store = "..."

collection.update()

from tradenity.resources import Collection

collection_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
collection = Collection.find_by_id(collection_id)
Collection.name = "..."
Collection.slug = "..."
Collection.status = "..."
Collection.description = "..."
Collection.products = "..."
Collection.store = "..."

collection.update()
curl -X PUT http://api.tradenity.com/v1/collections \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "slug=..." \
  -d "status=..." \
  -d "description=..." \
  -d "products=..." \
  -d "store=..." \
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$collection = Collection->find_by_id($id)
$collection.setName("...");
$collection.setSlug("...");
$collection.setStatus("...");
$collection.setDescription("...");
$collection.setProducts("...");
$collection.setStore("...");

$collection->update();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "slug": "...",
    "status": "...",
    "description": "...",
    "products": "...",
    "store": "..."
  }

This endpoint updates instance of collection using the specified parameters.

HTTP Request

PUT http://api.tradenity.com/v1/collections/<ID>

URL Parameters

Parameter Description
ID The ID of the collection to update

Delete a Specific Collection

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
boolean result = CollectionService.delete(id);

require 'tradenity'

result = Collection.delete_by_id(id)
from tradenity.resources import Collection

collection_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
result = Collection.delete_by_id(collection_id)
curl DELETE "http://api.tradenity.com/v1/collections/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

result = Collection->delete_by_id($id)

The above command returns no JSON document, just a success or failure status (HTTP status code or language specific boolean true or false) :

This endpoint delete a specific collection.

HTTP Request

DELETE http://api.tradenity.com/v1/collections/<ID>

URL Parameters

Parameter Description
ID The ID of the collection to delete

ItemsSelectors

ItemsSelector attributes

Parameter Type Required Read only Default Description
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.
categories List of categories NO No n/a Categories of the ItemsSelector
brands List of brands NO No n/a Brands of the ItemsSelector
collections List of collections NO No n/a Collections of the ItemsSelector
products List of products NO No n/a Products of the ItemsSelector

DiscountPromotions

DiscountPromotion attributes

Parameter Type Required Read only Default Description
name String Yes False n/a Name of the DiscountPromotion
description String No False n/a Description of the DiscountPromotion
status String Yes False n/a Status of the DiscountPromotion
beginsAt Date No False n/a BeginsAt of the DiscountPromotion
endsAt Date No False n/a EndsAt of the DiscountPromotion
type String Yes False n/a Type of the DiscountPromotion
amount Integer Yes False n/a Amount of the DiscountPromotion
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.
include ItemsSelector NO No n/a Include of the DiscountPromotion

Get All DiscountPromotions

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<DiscountPromotion> discountPromotions = DiscountPromotionService.findAll();

require 'tradenity'

discountPromotions = DiscountPromotion.find_all

from tradenity.resources import DiscountPromotion

discountPromotions = DiscountPromotion.find_all()
curl -X GET http://api.tradenity.com/v1/discountPromotions \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$discountPromotions = DiscountPromotion->find_all()

The above command returns JSON structured like this:

{
    "discountPromotions": [{
        "name": "...",
        "description": "...",
        "status": "...",
        "beginsAt": "...",
        "endsAt": "...",
        "include": "...",
        "store": "...",
        "type": "...",
        "amount": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all discountPromotions.

HTTP Request

GET http://api.tradenity.com/v1/discountPromotions

Find a Specific DiscountPromotion by ID

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
DiscountPromotion discountPromotion = DiscountPromotionService.findById(id);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
discountPromotion = DiscountPromotion.find_by_id(id)
from tradenity.resources import DiscountPromotion

discountPromotion_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
discountPromotion = DiscountPromotion.find_by_id(discountPromotion_id)
curl GET "http://api.tradenity.com/v1/discountPromotions/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$discountPromotion = DiscountPromotion->find_by_id($id)

The above command returns JSON structured like this:

{
  "__meta" : {
    "href" : "http://localhost:8080/api/v1/addresses/address_001"
  },
  "id": "...",
  "name": "...",
  "description": "...",
  "status": "...",
  "beginsAt": "...",
  "endsAt": "...",
  "include": "...",
  "store": "...",
  "type": "...",
  "amount": "..."
}

This endpoint retrieves a specific discountPromotion.

HTTP Request

GET http://api.tradenity.com/v1/discountPromotions/<ID>

URL Parameters

Parameter Description
ID The ID of the discountPromotion to retrieve

Create new DiscountPromotion

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

DiscountPromotion discountPromotion = new DiscountPromotion();
discountPromotion.setName("...");
discountPromotion.setDescription("...");
discountPromotion.setStatus("...");
discountPromotion.setBeginsAt("...");
discountPromotion.setEndsAt("...");
discountPromotion.setInclude("...");
discountPromotion.setStore("...");
discountPromotion.setType("...");
discountPromotion.setAmount("...");

DiscountPromotion discountPromotion = DiscountPromotionService.create(discountPromotion);

require 'tradenity'

discountPromotion = DiscountPromotion.new(name: "...", description: "...", status: "...", beginsAt: "...", endsAt: "...", include: "...", store: "...", type: "...", amount: "...")

discountPromotion.create

from tradenity.resources import DiscountPromotion

discountPromotion = DiscountPromotion(name="...", description="...", status="...", beginsAt="...", endsAt="...", include="...", store="...", type="...", amount="...")

discountPromotion.create()
curl -X POST http://api.tradenity.com/v1/discountPromotions \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "description=..." \
  -d "status=..." \
  -d "beginsAt=..." \
  -d "endsAt=..." \
  -d "include=..." \
  -d "store=..." \
  -d "type=..." \
  -d "amount=..." \
require 'tradenity'

$discountPromotion = new DiscountPromotion()
$discountPromotion->setName("...");
$discountPromotion->setDescription("...");
$discountPromotion->setStatus("...");
$discountPromotion->setBeginsAt("...");
$discountPromotion->setEndsAt("...");
$discountPromotion->setInclude("...");
$discountPromotion->setStore("...");
$discountPromotion->setType("...");
$discountPromotion->setAmount("...");

$discountPromotion->create();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "description": "...",
    "status": "...",
    "beginsAt": "...",
    "endsAt": "...",
    "include": "...",
    "store": "...",
    "type": "...",
    "amount": "..."
  }

This endpoint create a new discountPromotion using the specified parameters.

HTTP Request

POST http://api.tradenity.com/v1/discountPromotions

Updating DiscountPromotion

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
DiscountPromotion discountPromotion = DiscountPromotionService.findById(id);
discountPromotion.setName("...");
discountPromotion.setDescription("...");
discountPromotion.setStatus("...");
discountPromotion.setBeginsAt("...");
discountPromotion.setEndsAt("...");
discountPromotion.setInclude("...");
discountPromotion.setStore("...");
discountPromotion.setType("...");
discountPromotion.setAmount("...");

DiscountPromotion discountPromotion = DiscountPromotionService.update(discountPromotion);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
discountPromotion = DiscountPromotion.find_by_id(id)
DiscountPromotion.name = "..."
DiscountPromotion.description = "..."
DiscountPromotion.status = "..."
DiscountPromotion.beginsAt = "..."
DiscountPromotion.endsAt = "..."
DiscountPromotion.include = "..."
DiscountPromotion.store = "..."
DiscountPromotion.type = "..."
DiscountPromotion.amount = "..."

discountPromotion.update()

from tradenity.resources import DiscountPromotion

discountPromotion_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
discountPromotion = DiscountPromotion.find_by_id(discountPromotion_id)
DiscountPromotion.name = "..."
DiscountPromotion.description = "..."
DiscountPromotion.status = "..."
DiscountPromotion.beginsAt = "..."
DiscountPromotion.endsAt = "..."
DiscountPromotion.include = "..."
DiscountPromotion.store = "..."
DiscountPromotion.type = "..."
DiscountPromotion.amount = "..."

discountPromotion.update()
curl -X PUT http://api.tradenity.com/v1/discountPromotions \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "description=..." \
  -d "status=..." \
  -d "beginsAt=..." \
  -d "endsAt=..." \
  -d "include=..." \
  -d "store=..." \
  -d "type=..." \
  -d "amount=..." \
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$discountPromotion = DiscountPromotion->find_by_id($id)
$discountPromotion.setName("...");
$discountPromotion.setDescription("...");
$discountPromotion.setStatus("...");
$discountPromotion.setBeginsAt("...");
$discountPromotion.setEndsAt("...");
$discountPromotion.setInclude("...");
$discountPromotion.setStore("...");
$discountPromotion.setType("...");
$discountPromotion.setAmount("...");

$discountPromotion->update();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "description": "...",
    "status": "...",
    "beginsAt": "...",
    "endsAt": "...",
    "include": "...",
    "store": "...",
    "type": "...",
    "amount": "..."
  }

This endpoint updates instance of discountPromotion using the specified parameters.

HTTP Request

PUT http://api.tradenity.com/v1/discountPromotions/<ID>

URL Parameters

Parameter Description
ID The ID of the discountPromotion to update

Delete a Specific DiscountPromotion

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
boolean result = DiscountPromotionService.delete(id);

require 'tradenity'

result = DiscountPromotion.delete_by_id(id)
from tradenity.resources import DiscountPromotion

discountPromotion_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
result = DiscountPromotion.delete_by_id(discountPromotion_id)
curl DELETE "http://api.tradenity.com/v1/discountPromotions/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

result = DiscountPromotion->delete_by_id($id)

The above command returns no JSON document, just a success or failure status (HTTP status code or language specific boolean true or false) :

This endpoint delete a specific discountPromotion.

HTTP Request

DELETE http://api.tradenity.com/v1/discountPromotions/<ID>

URL Parameters

Parameter Description
ID The ID of the discountPromotion to delete

FreeShippingPromotions

FreeShippingPromotion attributes

Parameter Type Required Read only Default Description
name String Yes False n/a Name of the FreeShippingPromotion
description String No False n/a Description of the FreeShippingPromotion
status String Yes False n/a Status of the FreeShippingPromotion
beginsAt Date No False n/a BeginsAt of the FreeShippingPromotion
endsAt Date No False n/a EndsAt of the FreeShippingPromotion
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.
include ItemsSelector NO No n/a Include of the FreeShippingPromotion

Get All FreeShippingPromotions

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<FreeShippingPromotion> freeShippingPromotions = FreeShippingPromotionService.findAll();

require 'tradenity'

freeShippingPromotions = FreeShippingPromotion.find_all

from tradenity.resources import FreeShippingPromotion

freeShippingPromotions = FreeShippingPromotion.find_all()
curl -X GET http://api.tradenity.com/v1/freeShippingPromotions \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$freeShippingPromotions = FreeShippingPromotion->find_all()

The above command returns JSON structured like this:

{
    "freeShippingPromotions": [{
        "name": "...",
        "description": "...",
        "status": "...",
        "beginsAt": "...",
        "endsAt": "...",
        "include": "...",
        "store": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all freeShippingPromotions.

HTTP Request

GET http://api.tradenity.com/v1/freeShippingPromotions

Find a Specific FreeShippingPromotion by ID

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
FreeShippingPromotion freeShippingPromotion = FreeShippingPromotionService.findById(id);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
freeShippingPromotion = FreeShippingPromotion.find_by_id(id)
from tradenity.resources import FreeShippingPromotion

freeShippingPromotion_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
freeShippingPromotion = FreeShippingPromotion.find_by_id(freeShippingPromotion_id)
curl GET "http://api.tradenity.com/v1/freeShippingPromotions/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$freeShippingPromotion = FreeShippingPromotion->find_by_id($id)

The above command returns JSON structured like this:

{
  "__meta" : {
    "href" : "http://localhost:8080/api/v1/addresses/address_001"
  },
  "id": "...",
  "name": "...",
  "description": "...",
  "status": "...",
  "beginsAt": "...",
  "endsAt": "...",
  "include": "...",
  "store": "..."
}

This endpoint retrieves a specific freeShippingPromotion.

HTTP Request

GET http://api.tradenity.com/v1/freeShippingPromotions/<ID>

URL Parameters

Parameter Description
ID The ID of the freeShippingPromotion to retrieve

Create new FreeShippingPromotion

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

FreeShippingPromotion freeShippingPromotion = new FreeShippingPromotion();
freeShippingPromotion.setName("...");
freeShippingPromotion.setDescription("...");
freeShippingPromotion.setStatus("...");
freeShippingPromotion.setBeginsAt("...");
freeShippingPromotion.setEndsAt("...");
freeShippingPromotion.setInclude("...");
freeShippingPromotion.setStore("...");

FreeShippingPromotion freeShippingPromotion = FreeShippingPromotionService.create(freeShippingPromotion);

require 'tradenity'

freeShippingPromotion = FreeShippingPromotion.new(name: "...", description: "...", status: "...", beginsAt: "...", endsAt: "...", include: "...", store: "...")

freeShippingPromotion.create

from tradenity.resources import FreeShippingPromotion

freeShippingPromotion = FreeShippingPromotion(name="...", description="...", status="...", beginsAt="...", endsAt="...", include="...", store="...")

freeShippingPromotion.create()
curl -X POST http://api.tradenity.com/v1/freeShippingPromotions \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "description=..." \
  -d "status=..." \
  -d "beginsAt=..." \
  -d "endsAt=..." \
  -d "include=..." \
  -d "store=..." \
require 'tradenity'

$freeShippingPromotion = new FreeShippingPromotion()
$freeShippingPromotion->setName("...");
$freeShippingPromotion->setDescription("...");
$freeShippingPromotion->setStatus("...");
$freeShippingPromotion->setBeginsAt("...");
$freeShippingPromotion->setEndsAt("...");
$freeShippingPromotion->setInclude("...");
$freeShippingPromotion->setStore("...");

$freeShippingPromotion->create();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "description": "...",
    "status": "...",
    "beginsAt": "...",
    "endsAt": "...",
    "include": "...",
    "store": "..."
  }

This endpoint create a new freeShippingPromotion using the specified parameters.

HTTP Request

POST http://api.tradenity.com/v1/freeShippingPromotions

Updating FreeShippingPromotion

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
FreeShippingPromotion freeShippingPromotion = FreeShippingPromotionService.findById(id);
freeShippingPromotion.setName("...");
freeShippingPromotion.setDescription("...");
freeShippingPromotion.setStatus("...");
freeShippingPromotion.setBeginsAt("...");
freeShippingPromotion.setEndsAt("...");
freeShippingPromotion.setInclude("...");
freeShippingPromotion.setStore("...");

FreeShippingPromotion freeShippingPromotion = FreeShippingPromotionService.update(freeShippingPromotion);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
freeShippingPromotion = FreeShippingPromotion.find_by_id(id)
FreeShippingPromotion.name = "..."
FreeShippingPromotion.description = "..."
FreeShippingPromotion.status = "..."
FreeShippingPromotion.beginsAt = "..."
FreeShippingPromotion.endsAt = "..."
FreeShippingPromotion.include = "..."
FreeShippingPromotion.store = "..."

freeShippingPromotion.update()

from tradenity.resources import FreeShippingPromotion

freeShippingPromotion_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
freeShippingPromotion = FreeShippingPromotion.find_by_id(freeShippingPromotion_id)
FreeShippingPromotion.name = "..."
FreeShippingPromotion.description = "..."
FreeShippingPromotion.status = "..."
FreeShippingPromotion.beginsAt = "..."
FreeShippingPromotion.endsAt = "..."
FreeShippingPromotion.include = "..."
FreeShippingPromotion.store = "..."

freeShippingPromotion.update()
curl -X PUT http://api.tradenity.com/v1/freeShippingPromotions \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "description=..." \
  -d "status=..." \
  -d "beginsAt=..." \
  -d "endsAt=..." \
  -d "include=..." \
  -d "store=..." \
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$freeShippingPromotion = FreeShippingPromotion->find_by_id($id)
$freeShippingPromotion.setName("...");
$freeShippingPromotion.setDescription("...");
$freeShippingPromotion.setStatus("...");
$freeShippingPromotion.setBeginsAt("...");
$freeShippingPromotion.setEndsAt("...");
$freeShippingPromotion.setInclude("...");
$freeShippingPromotion.setStore("...");

$freeShippingPromotion->update();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "description": "...",
    "status": "...",
    "beginsAt": "...",
    "endsAt": "...",
    "include": "...",
    "store": "..."
  }

This endpoint updates instance of freeShippingPromotion using the specified parameters.

HTTP Request

PUT http://api.tradenity.com/v1/freeShippingPromotions/<ID>

URL Parameters

Parameter Description
ID The ID of the freeShippingPromotion to update

Delete a Specific FreeShippingPromotion

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
boolean result = FreeShippingPromotionService.delete(id);

require 'tradenity'

result = FreeShippingPromotion.delete_by_id(id)
from tradenity.resources import FreeShippingPromotion

freeShippingPromotion_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
result = FreeShippingPromotion.delete_by_id(freeShippingPromotion_id)
curl DELETE "http://api.tradenity.com/v1/freeShippingPromotions/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

result = FreeShippingPromotion->delete_by_id($id)

The above command returns no JSON document, just a success or failure status (HTTP status code or language specific boolean true or false) :

This endpoint delete a specific freeShippingPromotion.

HTTP Request

DELETE http://api.tradenity.com/v1/freeShippingPromotions/<ID>

URL Parameters

Parameter Description
ID The ID of the freeShippingPromotion to delete

Coupons

Coupon attributes

Parameter Type Required Read only Default Description
name String Yes False n/a Name of the Coupon
description String No False n/a Description of the Coupon
status String Yes False n/a Status of the Coupon
minimumOrder Integer No False n/a MinimumOrder of the Coupon
code String Yes False n/a Code of the Coupon
beginsAt Date No False n/a BeginsAt of the Coupon
endsAt Date No False n/a EndsAt of the Coupon
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.
include ItemsSelector NO No n/a Include of the Coupon

Get All Coupons

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<Coupon> coupons = CouponService.findAll();

require 'tradenity'

coupons = Coupon.find_all

from tradenity.resources import Coupon

coupons = Coupon.find_all()
curl -X GET http://api.tradenity.com/v1/coupons \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$coupons = Coupon->find_all()

The above command returns JSON structured like this:

{
    "coupons": [{
        "name": "...",
        "description": "...",
        "status": "...",
        "minimumOrder": "...",
        "code": "...",
        "beginsAt": "...",
        "endsAt": "...",
        "include": "...",
        "store": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all coupons.

HTTP Request

GET http://api.tradenity.com/v1/coupons

DiscountCoupons

DiscountCoupon attributes

Parameter Type Required Read only Default Description
name String Yes False n/a Name of the DiscountCoupon
description String No False n/a Description of the DiscountCoupon
status String Yes False n/a Status of the DiscountCoupon
minimumOrder Integer No False n/a MinimumOrder of the DiscountCoupon
code String Yes False n/a Code of the DiscountCoupon
beginsAt Date No False n/a BeginsAt of the DiscountCoupon
endsAt Date No False n/a EndsAt of the DiscountCoupon
type String Yes False n/a Type of the DiscountCoupon
amount Integer Yes False n/a Amount of the DiscountCoupon
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.
include ItemsSelector NO No n/a Include of the DiscountCoupon

Get All DiscountCoupons

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<DiscountCoupon> discountCoupons = DiscountCouponService.findAll();

require 'tradenity'

discountCoupons = DiscountCoupon.find_all

from tradenity.resources import DiscountCoupon

discountCoupons = DiscountCoupon.find_all()
curl -X GET http://api.tradenity.com/v1/discountCoupons \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$discountCoupons = DiscountCoupon->find_all()

The above command returns JSON structured like this:

{
    "discountCoupons": [{
        "name": "...",
        "description": "...",
        "status": "...",
        "minimumOrder": "...",
        "code": "...",
        "beginsAt": "...",
        "endsAt": "...",
        "include": "...",
        "store": "...",
        "type": "...",
        "amount": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all discountCoupons.

HTTP Request

GET http://api.tradenity.com/v1/discountCoupons

Find a Specific DiscountCoupon by ID

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
DiscountCoupon discountCoupon = DiscountCouponService.findById(id);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
discountCoupon = DiscountCoupon.find_by_id(id)
from tradenity.resources import DiscountCoupon

discountCoupon_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
discountCoupon = DiscountCoupon.find_by_id(discountCoupon_id)
curl GET "http://api.tradenity.com/v1/discountCoupons/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$discountCoupon = DiscountCoupon->find_by_id($id)

The above command returns JSON structured like this:

{
  "__meta" : {
    "href" : "http://localhost:8080/api/v1/addresses/address_001"
  },
  "id": "...",
  "name": "...",
  "description": "...",
  "status": "...",
  "minimumOrder": "...",
  "code": "...",
  "beginsAt": "...",
  "endsAt": "...",
  "include": "...",
  "store": "...",
  "type": "...",
  "amount": "..."
}

This endpoint retrieves a specific discountCoupon.

HTTP Request

GET http://api.tradenity.com/v1/discountCoupons/<ID>

URL Parameters

Parameter Description
ID The ID of the discountCoupon to retrieve

Create new DiscountCoupon

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

DiscountCoupon discountCoupon = new DiscountCoupon();
discountCoupon.setName("...");
discountCoupon.setDescription("...");
discountCoupon.setStatus("...");
discountCoupon.setMinimumOrder("...");
discountCoupon.setCode("...");
discountCoupon.setBeginsAt("...");
discountCoupon.setEndsAt("...");
discountCoupon.setInclude("...");
discountCoupon.setStore("...");
discountCoupon.setType("...");
discountCoupon.setAmount("...");

DiscountCoupon discountCoupon = DiscountCouponService.create(discountCoupon);

require 'tradenity'

discountCoupon = DiscountCoupon.new(name: "...", description: "...", status: "...", minimumOrder: "...", code: "...", beginsAt: "...", endsAt: "...", include: "...", store: "...", type: "...", amount: "...")

discountCoupon.create

from tradenity.resources import DiscountCoupon

discountCoupon = DiscountCoupon(name="...", description="...", status="...", minimumOrder="...", code="...", beginsAt="...", endsAt="...", include="...", store="...", type="...", amount="...")

discountCoupon.create()
curl -X POST http://api.tradenity.com/v1/discountCoupons \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "description=..." \
  -d "status=..." \
  -d "minimumOrder=..." \
  -d "code=..." \
  -d "beginsAt=..." \
  -d "endsAt=..." \
  -d "include=..." \
  -d "store=..." \
  -d "type=..." \
  -d "amount=..." \
require 'tradenity'

$discountCoupon = new DiscountCoupon()
$discountCoupon->setName("...");
$discountCoupon->setDescription("...");
$discountCoupon->setStatus("...");
$discountCoupon->setMinimumOrder("...");
$discountCoupon->setCode("...");
$discountCoupon->setBeginsAt("...");
$discountCoupon->setEndsAt("...");
$discountCoupon->setInclude("...");
$discountCoupon->setStore("...");
$discountCoupon->setType("...");
$discountCoupon->setAmount("...");

$discountCoupon->create();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "description": "...",
    "status": "...",
    "minimumOrder": "...",
    "code": "...",
    "beginsAt": "...",
    "endsAt": "...",
    "include": "...",
    "store": "...",
    "type": "...",
    "amount": "..."
  }

This endpoint create a new discountCoupon using the specified parameters.

HTTP Request

POST http://api.tradenity.com/v1/discountCoupons

Updating DiscountCoupon

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
DiscountCoupon discountCoupon = DiscountCouponService.findById(id);
discountCoupon.setName("...");
discountCoupon.setDescription("...");
discountCoupon.setStatus("...");
discountCoupon.setMinimumOrder("...");
discountCoupon.setCode("...");
discountCoupon.setBeginsAt("...");
discountCoupon.setEndsAt("...");
discountCoupon.setInclude("...");
discountCoupon.setStore("...");
discountCoupon.setType("...");
discountCoupon.setAmount("...");

DiscountCoupon discountCoupon = DiscountCouponService.update(discountCoupon);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
discountCoupon = DiscountCoupon.find_by_id(id)
DiscountCoupon.name = "..."
DiscountCoupon.description = "..."
DiscountCoupon.status = "..."
DiscountCoupon.minimumOrder = "..."
DiscountCoupon.code = "..."
DiscountCoupon.beginsAt = "..."
DiscountCoupon.endsAt = "..."
DiscountCoupon.include = "..."
DiscountCoupon.store = "..."
DiscountCoupon.type = "..."
DiscountCoupon.amount = "..."

discountCoupon.update()

from tradenity.resources import DiscountCoupon

discountCoupon_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
discountCoupon = DiscountCoupon.find_by_id(discountCoupon_id)
DiscountCoupon.name = "..."
DiscountCoupon.description = "..."
DiscountCoupon.status = "..."
DiscountCoupon.minimumOrder = "..."
DiscountCoupon.code = "..."
DiscountCoupon.beginsAt = "..."
DiscountCoupon.endsAt = "..."
DiscountCoupon.include = "..."
DiscountCoupon.store = "..."
DiscountCoupon.type = "..."
DiscountCoupon.amount = "..."

discountCoupon.update()
curl -X PUT http://api.tradenity.com/v1/discountCoupons \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "description=..." \
  -d "status=..." \
  -d "minimumOrder=..." \
  -d "code=..." \
  -d "beginsAt=..." \
  -d "endsAt=..." \
  -d "include=..." \
  -d "store=..." \
  -d "type=..." \
  -d "amount=..." \
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$discountCoupon = DiscountCoupon->find_by_id($id)
$discountCoupon.setName("...");
$discountCoupon.setDescription("...");
$discountCoupon.setStatus("...");
$discountCoupon.setMinimumOrder("...");
$discountCoupon.setCode("...");
$discountCoupon.setBeginsAt("...");
$discountCoupon.setEndsAt("...");
$discountCoupon.setInclude("...");
$discountCoupon.setStore("...");
$discountCoupon.setType("...");
$discountCoupon.setAmount("...");

$discountCoupon->update();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "description": "...",
    "status": "...",
    "minimumOrder": "...",
    "code": "...",
    "beginsAt": "...",
    "endsAt": "...",
    "include": "...",
    "store": "...",
    "type": "...",
    "amount": "..."
  }

This endpoint updates instance of discountCoupon using the specified parameters.

HTTP Request

PUT http://api.tradenity.com/v1/discountCoupons/<ID>

URL Parameters

Parameter Description
ID The ID of the discountCoupon to update

Delete a Specific DiscountCoupon

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
boolean result = DiscountCouponService.delete(id);

require 'tradenity'

result = DiscountCoupon.delete_by_id(id)
from tradenity.resources import DiscountCoupon

discountCoupon_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
result = DiscountCoupon.delete_by_id(discountCoupon_id)
curl DELETE "http://api.tradenity.com/v1/discountCoupons/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

result = DiscountCoupon->delete_by_id($id)

The above command returns no JSON document, just a success or failure status (HTTP status code or language specific boolean true or false) :

This endpoint delete a specific discountCoupon.

HTTP Request

DELETE http://api.tradenity.com/v1/discountCoupons/<ID>

URL Parameters

Parameter Description
ID The ID of the discountCoupon to delete

FreeShippingCoupons

FreeShippingCoupon attributes

Parameter Type Required Read only Default Description
name String Yes False n/a Name of the FreeShippingCoupon
description String No False n/a Description of the FreeShippingCoupon
status String Yes False n/a Status of the FreeShippingCoupon
minimumOrder Integer No False n/a MinimumOrder of the FreeShippingCoupon
code String Yes False n/a Code of the FreeShippingCoupon
beginsAt Date No False n/a BeginsAt of the FreeShippingCoupon
endsAt Date No False n/a EndsAt of the FreeShippingCoupon
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.
include ItemsSelector NO No n/a Include of the FreeShippingCoupon
geoZones List of geoZones NO No n/a GeoZones of the FreeShippingCoupon

Get All FreeShippingCoupons

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<FreeShippingCoupon> freeShippingCoupons = FreeShippingCouponService.findAll();

require 'tradenity'

freeShippingCoupons = FreeShippingCoupon.find_all

from tradenity.resources import FreeShippingCoupon

freeShippingCoupons = FreeShippingCoupon.find_all()
curl -X GET http://api.tradenity.com/v1/freeShippingCoupons \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$freeShippingCoupons = FreeShippingCoupon->find_all()

The above command returns JSON structured like this:

{
    "freeShippingCoupons": [{
        "name": "...",
        "description": "...",
        "status": "...",
        "minimumOrder": "...",
        "code": "...",
        "beginsAt": "...",
        "endsAt": "...",
        "include": "...",
        "store": "...",
        "geoZones": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all freeShippingCoupons.

HTTP Request

GET http://api.tradenity.com/v1/freeShippingCoupons

Find a Specific FreeShippingCoupon by ID

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
FreeShippingCoupon freeShippingCoupon = FreeShippingCouponService.findById(id);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
freeShippingCoupon = FreeShippingCoupon.find_by_id(id)
from tradenity.resources import FreeShippingCoupon

freeShippingCoupon_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
freeShippingCoupon = FreeShippingCoupon.find_by_id(freeShippingCoupon_id)
curl GET "http://api.tradenity.com/v1/freeShippingCoupons/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$freeShippingCoupon = FreeShippingCoupon->find_by_id($id)

The above command returns JSON structured like this:

{
  "__meta" : {
    "href" : "http://localhost:8080/api/v1/addresses/address_001"
  },
  "id": "...",
  "name": "...",
  "description": "...",
  "status": "...",
  "minimumOrder": "...",
  "code": "...",
  "beginsAt": "...",
  "endsAt": "...",
  "include": "...",
  "store": "...",
  "geoZones": "..."
}

This endpoint retrieves a specific freeShippingCoupon.

HTTP Request

GET http://api.tradenity.com/v1/freeShippingCoupons/<ID>

URL Parameters

Parameter Description
ID The ID of the freeShippingCoupon to retrieve

Create new FreeShippingCoupon

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

FreeShippingCoupon freeShippingCoupon = new FreeShippingCoupon();
freeShippingCoupon.setName("...");
freeShippingCoupon.setDescription("...");
freeShippingCoupon.setStatus("...");
freeShippingCoupon.setMinimumOrder("...");
freeShippingCoupon.setCode("...");
freeShippingCoupon.setBeginsAt("...");
freeShippingCoupon.setEndsAt("...");
freeShippingCoupon.setInclude("...");
freeShippingCoupon.setStore("...");
freeShippingCoupon.setGeoZones("...");

FreeShippingCoupon freeShippingCoupon = FreeShippingCouponService.create(freeShippingCoupon);

require 'tradenity'

freeShippingCoupon = FreeShippingCoupon.new(name: "...", description: "...", status: "...", minimumOrder: "...", code: "...", beginsAt: "...", endsAt: "...", include: "...", store: "...", geoZones: "...")

freeShippingCoupon.create

from tradenity.resources import FreeShippingCoupon

freeShippingCoupon = FreeShippingCoupon(name="...", description="...", status="...", minimumOrder="...", code="...", beginsAt="...", endsAt="...", include="...", store="...", geoZones="...")

freeShippingCoupon.create()
curl -X POST http://api.tradenity.com/v1/freeShippingCoupons \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "description=..." \
  -d "status=..." \
  -d "minimumOrder=..." \
  -d "code=..." \
  -d "beginsAt=..." \
  -d "endsAt=..." \
  -d "include=..." \
  -d "store=..." \
  -d "geoZones=..." \
require 'tradenity'

$freeShippingCoupon = new FreeShippingCoupon()
$freeShippingCoupon->setName("...");
$freeShippingCoupon->setDescription("...");
$freeShippingCoupon->setStatus("...");
$freeShippingCoupon->setMinimumOrder("...");
$freeShippingCoupon->setCode("...");
$freeShippingCoupon->setBeginsAt("...");
$freeShippingCoupon->setEndsAt("...");
$freeShippingCoupon->setInclude("...");
$freeShippingCoupon->setStore("...");
$freeShippingCoupon->setGeoZones("...");

$freeShippingCoupon->create();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "description": "...",
    "status": "...",
    "minimumOrder": "...",
    "code": "...",
    "beginsAt": "...",
    "endsAt": "...",
    "include": "...",
    "store": "...",
    "geoZones": "..."
  }

This endpoint create a new freeShippingCoupon using the specified parameters.

HTTP Request

POST http://api.tradenity.com/v1/freeShippingCoupons

Updating FreeShippingCoupon

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
FreeShippingCoupon freeShippingCoupon = FreeShippingCouponService.findById(id);
freeShippingCoupon.setName("...");
freeShippingCoupon.setDescription("...");
freeShippingCoupon.setStatus("...");
freeShippingCoupon.setMinimumOrder("...");
freeShippingCoupon.setCode("...");
freeShippingCoupon.setBeginsAt("...");
freeShippingCoupon.setEndsAt("...");
freeShippingCoupon.setInclude("...");
freeShippingCoupon.setStore("...");
freeShippingCoupon.setGeoZones("...");

FreeShippingCoupon freeShippingCoupon = FreeShippingCouponService.update(freeShippingCoupon);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
freeShippingCoupon = FreeShippingCoupon.find_by_id(id)
FreeShippingCoupon.name = "..."
FreeShippingCoupon.description = "..."
FreeShippingCoupon.status = "..."
FreeShippingCoupon.minimumOrder = "..."
FreeShippingCoupon.code = "..."
FreeShippingCoupon.beginsAt = "..."
FreeShippingCoupon.endsAt = "..."
FreeShippingCoupon.include = "..."
FreeShippingCoupon.store = "..."
FreeShippingCoupon.geoZones = "..."

freeShippingCoupon.update()

from tradenity.resources import FreeShippingCoupon

freeShippingCoupon_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
freeShippingCoupon = FreeShippingCoupon.find_by_id(freeShippingCoupon_id)
FreeShippingCoupon.name = "..."
FreeShippingCoupon.description = "..."
FreeShippingCoupon.status = "..."
FreeShippingCoupon.minimumOrder = "..."
FreeShippingCoupon.code = "..."
FreeShippingCoupon.beginsAt = "..."
FreeShippingCoupon.endsAt = "..."
FreeShippingCoupon.include = "..."
FreeShippingCoupon.store = "..."
FreeShippingCoupon.geoZones = "..."

freeShippingCoupon.update()
curl -X PUT http://api.tradenity.com/v1/freeShippingCoupons \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "description=..." \
  -d "status=..." \
  -d "minimumOrder=..." \
  -d "code=..." \
  -d "beginsAt=..." \
  -d "endsAt=..." \
  -d "include=..." \
  -d "store=..." \
  -d "geoZones=..." \
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$freeShippingCoupon = FreeShippingCoupon->find_by_id($id)
$freeShippingCoupon.setName("...");
$freeShippingCoupon.setDescription("...");
$freeShippingCoupon.setStatus("...");
$freeShippingCoupon.setMinimumOrder("...");
$freeShippingCoupon.setCode("...");
$freeShippingCoupon.setBeginsAt("...");
$freeShippingCoupon.setEndsAt("...");
$freeShippingCoupon.setInclude("...");
$freeShippingCoupon.setStore("...");
$freeShippingCoupon.setGeoZones("...");

$freeShippingCoupon->update();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "description": "...",
    "status": "...",
    "minimumOrder": "...",
    "code": "...",
    "beginsAt": "...",
    "endsAt": "...",
    "include": "...",
    "store": "...",
    "geoZones": "..."
  }

This endpoint updates instance of freeShippingCoupon using the specified parameters.

HTTP Request

PUT http://api.tradenity.com/v1/freeShippingCoupons/<ID>

URL Parameters

Parameter Description
ID The ID of the freeShippingCoupon to update

Delete a Specific FreeShippingCoupon

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
boolean result = FreeShippingCouponService.delete(id);

require 'tradenity'

result = FreeShippingCoupon.delete_by_id(id)
from tradenity.resources import FreeShippingCoupon

freeShippingCoupon_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
result = FreeShippingCoupon.delete_by_id(freeShippingCoupon_id)
curl DELETE "http://api.tradenity.com/v1/freeShippingCoupons/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

result = FreeShippingCoupon->delete_by_id($id)

The above command returns no JSON document, just a success or failure status (HTTP status code or language specific boolean true or false) :

This endpoint delete a specific freeShippingCoupon.

HTTP Request

DELETE http://api.tradenity.com/v1/freeShippingCoupons/<ID>

URL Parameters

Parameter Description
ID The ID of the freeShippingCoupon to delete

FreeItemCoupons

FreeItemCoupon attributes

Parameter Type Required Read only Default Description
name String Yes False n/a Name of the FreeItemCoupon
description String No False n/a Description of the FreeItemCoupon
status String Yes False n/a Status of the FreeItemCoupon
minimumOrder Integer No False n/a MinimumOrder of the FreeItemCoupon
code String Yes False n/a Code of the FreeItemCoupon
beginsAt Date No False n/a BeginsAt of the FreeItemCoupon
endsAt Date No False n/a EndsAt of the FreeItemCoupon
quantity Integer No False 2 Quantity of the FreeItemCoupon
freeQuantity Integer No False 1 FreeQuantity of the FreeItemCoupon
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.
include ItemsSelector NO No n/a Include of the FreeItemCoupon

Get All FreeItemCoupons

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<FreeItemCoupon> freeItemCoupons = FreeItemCouponService.findAll();

require 'tradenity'

freeItemCoupons = FreeItemCoupon.find_all

from tradenity.resources import FreeItemCoupon

freeItemCoupons = FreeItemCoupon.find_all()
curl -X GET http://api.tradenity.com/v1/freeItemCoupons \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$freeItemCoupons = FreeItemCoupon->find_all()

The above command returns JSON structured like this:

{
    "freeItemCoupons": [{
        "name": "...",
        "description": "...",
        "status": "...",
        "minimumOrder": "...",
        "code": "...",
        "beginsAt": "...",
        "endsAt": "...",
        "include": "...",
        "store": "...",
        "quantity": "...",
        "freeQuantity": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all freeItemCoupons.

HTTP Request

GET http://api.tradenity.com/v1/freeItemCoupons

Find a Specific FreeItemCoupon by ID

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
FreeItemCoupon freeItemCoupon = FreeItemCouponService.findById(id);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
freeItemCoupon = FreeItemCoupon.find_by_id(id)
from tradenity.resources import FreeItemCoupon

freeItemCoupon_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
freeItemCoupon = FreeItemCoupon.find_by_id(freeItemCoupon_id)
curl GET "http://api.tradenity.com/v1/freeItemCoupons/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$freeItemCoupon = FreeItemCoupon->find_by_id($id)

The above command returns JSON structured like this:

{
  "__meta" : {
    "href" : "http://localhost:8080/api/v1/addresses/address_001"
  },
  "id": "...",
  "name": "...",
  "description": "...",
  "status": "...",
  "minimumOrder": "...",
  "code": "...",
  "beginsAt": "...",
  "endsAt": "...",
  "include": "...",
  "store": "...",
  "quantity": "...",
  "freeQuantity": "..."
}

This endpoint retrieves a specific freeItemCoupon.

HTTP Request

GET http://api.tradenity.com/v1/freeItemCoupons/<ID>

URL Parameters

Parameter Description
ID The ID of the freeItemCoupon to retrieve

Create new FreeItemCoupon

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

FreeItemCoupon freeItemCoupon = new FreeItemCoupon();
freeItemCoupon.setName("...");
freeItemCoupon.setDescription("...");
freeItemCoupon.setStatus("...");
freeItemCoupon.setMinimumOrder("...");
freeItemCoupon.setCode("...");
freeItemCoupon.setBeginsAt("...");
freeItemCoupon.setEndsAt("...");
freeItemCoupon.setInclude("...");
freeItemCoupon.setStore("...");
freeItemCoupon.setQuantity("...");
freeItemCoupon.setFreeQuantity("...");

FreeItemCoupon freeItemCoupon = FreeItemCouponService.create(freeItemCoupon);

require 'tradenity'

freeItemCoupon = FreeItemCoupon.new(name: "...", description: "...", status: "...", minimumOrder: "...", code: "...", beginsAt: "...", endsAt: "...", include: "...", store: "...", quantity: "...", freeQuantity: "...")

freeItemCoupon.create

from tradenity.resources import FreeItemCoupon

freeItemCoupon = FreeItemCoupon(name="...", description="...", status="...", minimumOrder="...", code="...", beginsAt="...", endsAt="...", include="...", store="...", quantity="...", freeQuantity="...")

freeItemCoupon.create()
curl -X POST http://api.tradenity.com/v1/freeItemCoupons \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "description=..." \
  -d "status=..." \
  -d "minimumOrder=..." \
  -d "code=..." \
  -d "beginsAt=..." \
  -d "endsAt=..." \
  -d "include=..." \
  -d "store=..." \
  -d "quantity=..." \
  -d "freeQuantity=..." \
require 'tradenity'

$freeItemCoupon = new FreeItemCoupon()
$freeItemCoupon->setName("...");
$freeItemCoupon->setDescription("...");
$freeItemCoupon->setStatus("...");
$freeItemCoupon->setMinimumOrder("...");
$freeItemCoupon->setCode("...");
$freeItemCoupon->setBeginsAt("...");
$freeItemCoupon->setEndsAt("...");
$freeItemCoupon->setInclude("...");
$freeItemCoupon->setStore("...");
$freeItemCoupon->setQuantity("...");
$freeItemCoupon->setFreeQuantity("...");

$freeItemCoupon->create();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "description": "...",
    "status": "...",
    "minimumOrder": "...",
    "code": "...",
    "beginsAt": "...",
    "endsAt": "...",
    "include": "...",
    "store": "...",
    "quantity": "...",
    "freeQuantity": "..."
  }

This endpoint create a new freeItemCoupon using the specified parameters.

HTTP Request

POST http://api.tradenity.com/v1/freeItemCoupons

Updating FreeItemCoupon

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
FreeItemCoupon freeItemCoupon = FreeItemCouponService.findById(id);
freeItemCoupon.setName("...");
freeItemCoupon.setDescription("...");
freeItemCoupon.setStatus("...");
freeItemCoupon.setMinimumOrder("...");
freeItemCoupon.setCode("...");
freeItemCoupon.setBeginsAt("...");
freeItemCoupon.setEndsAt("...");
freeItemCoupon.setInclude("...");
freeItemCoupon.setStore("...");
freeItemCoupon.setQuantity("...");
freeItemCoupon.setFreeQuantity("...");

FreeItemCoupon freeItemCoupon = FreeItemCouponService.update(freeItemCoupon);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
freeItemCoupon = FreeItemCoupon.find_by_id(id)
FreeItemCoupon.name = "..."
FreeItemCoupon.description = "..."
FreeItemCoupon.status = "..."
FreeItemCoupon.minimumOrder = "..."
FreeItemCoupon.code = "..."
FreeItemCoupon.beginsAt = "..."
FreeItemCoupon.endsAt = "..."
FreeItemCoupon.include = "..."
FreeItemCoupon.store = "..."
FreeItemCoupon.quantity = "..."
FreeItemCoupon.freeQuantity = "..."

freeItemCoupon.update()

from tradenity.resources import FreeItemCoupon

freeItemCoupon_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
freeItemCoupon = FreeItemCoupon.find_by_id(freeItemCoupon_id)
FreeItemCoupon.name = "..."
FreeItemCoupon.description = "..."
FreeItemCoupon.status = "..."
FreeItemCoupon.minimumOrder = "..."
FreeItemCoupon.code = "..."
FreeItemCoupon.beginsAt = "..."
FreeItemCoupon.endsAt = "..."
FreeItemCoupon.include = "..."
FreeItemCoupon.store = "..."
FreeItemCoupon.quantity = "..."
FreeItemCoupon.freeQuantity = "..."

freeItemCoupon.update()
curl -X PUT http://api.tradenity.com/v1/freeItemCoupons \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "description=..." \
  -d "status=..." \
  -d "minimumOrder=..." \
  -d "code=..." \
  -d "beginsAt=..." \
  -d "endsAt=..." \
  -d "include=..." \
  -d "store=..." \
  -d "quantity=..." \
  -d "freeQuantity=..." \
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$freeItemCoupon = FreeItemCoupon->find_by_id($id)
$freeItemCoupon.setName("...");
$freeItemCoupon.setDescription("...");
$freeItemCoupon.setStatus("...");
$freeItemCoupon.setMinimumOrder("...");
$freeItemCoupon.setCode("...");
$freeItemCoupon.setBeginsAt("...");
$freeItemCoupon.setEndsAt("...");
$freeItemCoupon.setInclude("...");
$freeItemCoupon.setStore("...");
$freeItemCoupon.setQuantity("...");
$freeItemCoupon.setFreeQuantity("...");

$freeItemCoupon->update();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "description": "...",
    "status": "...",
    "minimumOrder": "...",
    "code": "...",
    "beginsAt": "...",
    "endsAt": "...",
    "include": "...",
    "store": "...",
    "quantity": "...",
    "freeQuantity": "..."
  }

This endpoint updates instance of freeItemCoupon using the specified parameters.

HTTP Request

PUT http://api.tradenity.com/v1/freeItemCoupons/<ID>

URL Parameters

Parameter Description
ID The ID of the freeItemCoupon to update

Delete a Specific FreeItemCoupon

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
boolean result = FreeItemCouponService.delete(id);

require 'tradenity'

result = FreeItemCoupon.delete_by_id(id)
from tradenity.resources import FreeItemCoupon

freeItemCoupon_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
result = FreeItemCoupon.delete_by_id(freeItemCoupon_id)
curl DELETE "http://api.tradenity.com/v1/freeItemCoupons/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

result = FreeItemCoupon->delete_by_id($id)

The above command returns no JSON document, just a success or failure status (HTTP status code or language specific boolean true or false) :

This endpoint delete a specific freeItemCoupon.

HTTP Request

DELETE http://api.tradenity.com/v1/freeItemCoupons/<ID>

URL Parameters

Parameter Description
ID The ID of the freeItemCoupon to delete

CustomerGroups

CustomerGroup attributes

Parameter Type Required Read only Default Description
name String Yes False n/a Name of the CustomerGroup
slug String Yes False n/a Slug of the CustomerGroup
status String Yes False n/a Status of the CustomerGroup
description String No False n/a Description of the CustomerGroup
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.

Get All CustomerGroups

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<CustomerGroup> customerGroups = CustomerGroupService.findAll();

require 'tradenity'

customerGroups = CustomerGroup.find_all

from tradenity.resources import CustomerGroup

customerGroups = CustomerGroup.find_all()
curl -X GET http://api.tradenity.com/v1/customerGroups \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$customerGroups = CustomerGroup->find_all()

The above command returns JSON structured like this:

{
    "customerGroups": [{
        "name": "...",
        "slug": "...",
        "status": "...",
        "description": "...",
        "store": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all customerGroups.

HTTP Request

GET http://api.tradenity.com/v1/customerGroups

Find a Specific CustomerGroup by ID

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
CustomerGroup customerGroup = CustomerGroupService.findById(id);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
customerGroup = CustomerGroup.find_by_id(id)
from tradenity.resources import CustomerGroup

customerGroup_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
customerGroup = CustomerGroup.find_by_id(customerGroup_id)
curl GET "http://api.tradenity.com/v1/customerGroups/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$customerGroup = CustomerGroup->find_by_id($id)

The above command returns JSON structured like this:

{
  "__meta" : {
    "href" : "http://localhost:8080/api/v1/addresses/address_001"
  },
  "id": "...",
  "name": "...",
  "slug": "...",
  "status": "...",
  "description": "...",
  "store": "..."
}

This endpoint retrieves a specific customerGroup.

HTTP Request

GET http://api.tradenity.com/v1/customerGroups/<ID>

URL Parameters

Parameter Description
ID The ID of the customerGroup to retrieve

Create new CustomerGroup

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

CustomerGroup customerGroup = new CustomerGroup();
customerGroup.setName("...");
customerGroup.setSlug("...");
customerGroup.setStatus("...");
customerGroup.setDescription("...");
customerGroup.setStore("...");

CustomerGroup customerGroup = CustomerGroupService.create(customerGroup);

require 'tradenity'

customerGroup = CustomerGroup.new(name: "...", slug: "...", status: "...", description: "...", store: "...")

customerGroup.create

from tradenity.resources import CustomerGroup

customerGroup = CustomerGroup(name="...", slug="...", status="...", description="...", store="...")

customerGroup.create()
curl -X POST http://api.tradenity.com/v1/customerGroups \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "slug=..." \
  -d "status=..." \
  -d "description=..." \
  -d "store=..." \
require 'tradenity'

$customerGroup = new CustomerGroup()
$customerGroup->setName("...");
$customerGroup->setSlug("...");
$customerGroup->setStatus("...");
$customerGroup->setDescription("...");
$customerGroup->setStore("...");

$customerGroup->create();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "slug": "...",
    "status": "...",
    "description": "...",
    "store": "..."
  }

This endpoint create a new customerGroup using the specified parameters.

HTTP Request

POST http://api.tradenity.com/v1/customerGroups

Updating CustomerGroup

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
CustomerGroup customerGroup = CustomerGroupService.findById(id);
customerGroup.setName("...");
customerGroup.setSlug("...");
customerGroup.setStatus("...");
customerGroup.setDescription("...");
customerGroup.setStore("...");

CustomerGroup customerGroup = CustomerGroupService.update(customerGroup);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
customerGroup = CustomerGroup.find_by_id(id)
CustomerGroup.name = "..."
CustomerGroup.slug = "..."
CustomerGroup.status = "..."
CustomerGroup.description = "..."
CustomerGroup.store = "..."

customerGroup.update()

from tradenity.resources import CustomerGroup

customerGroup_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
customerGroup = CustomerGroup.find_by_id(customerGroup_id)
CustomerGroup.name = "..."
CustomerGroup.slug = "..."
CustomerGroup.status = "..."
CustomerGroup.description = "..."
CustomerGroup.store = "..."

customerGroup.update()
curl -X PUT http://api.tradenity.com/v1/customerGroups \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "slug=..." \
  -d "status=..." \
  -d "description=..." \
  -d "store=..." \
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$customerGroup = CustomerGroup->find_by_id($id)
$customerGroup.setName("...");
$customerGroup.setSlug("...");
$customerGroup.setStatus("...");
$customerGroup.setDescription("...");
$customerGroup.setStore("...");

$customerGroup->update();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "slug": "...",
    "status": "...",
    "description": "...",
    "store": "..."
  }

This endpoint updates instance of customerGroup using the specified parameters.

HTTP Request

PUT http://api.tradenity.com/v1/customerGroups/<ID>

URL Parameters

Parameter Description
ID The ID of the customerGroup to update

Delete a Specific CustomerGroup

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
boolean result = CustomerGroupService.delete(id);

require 'tradenity'

result = CustomerGroup.delete_by_id(id)
from tradenity.resources import CustomerGroup

customerGroup_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
result = CustomerGroup.delete_by_id(customerGroup_id)
curl DELETE "http://api.tradenity.com/v1/customerGroups/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

result = CustomerGroup->delete_by_id($id)

The above command returns no JSON document, just a success or failure status (HTTP status code or language specific boolean true or false) :

This endpoint delete a specific customerGroup.

HTTP Request

DELETE http://api.tradenity.com/v1/customerGroups/<ID>

URL Parameters

Parameter Description
ID The ID of the customerGroup to delete

Customers

Customer attributes

Parameter Type Required Read only Default Description
firstName String Yes False n/a FirstName of the Customer
lastName String Yes False n/a LastName of the Customer
email String Yes False n/a Email of the Customer
username String Yes False n/a Username of the Customer
password String Yes False n/a Password of the Customer
status String Yes False disabled Status of the Customer
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.
photo Photo NO No n/a Photo of the Customer
billingAddress Address NO No n/a BillingAddress of the Customer
shippingAddress Address NO No n/a ShippingAddress of the Customer
customerGroups List of customerGroups NO No n/a CustomerGroups of the Customer

Get All Customers

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<Customer> customers = CustomerService.findAll();

require 'tradenity'

customers = Customer.find_all

from tradenity.resources import Customer

customers = Customer.find_all()
curl -X GET http://api.tradenity.com/v1/customers \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$customers = Customer->find_all()

The above command returns JSON structured like this:

{
    "customers": [{
        "firstName": "...",
        "lastName": "...",
        "email": "...",
        "username": "...",
        "password": "...",
        "status": "...",
        "photo": "...",
        "billingAddress": "...",
        "shippingAddress": "...",
        "customerGroups": "...",
        "store": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all customers.

HTTP Request

GET http://api.tradenity.com/v1/customers

Find a Specific Customer by ID

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
Customer customer = CustomerService.findById(id);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
customer = Customer.find_by_id(id)
from tradenity.resources import Customer

customer_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
customer = Customer.find_by_id(customer_id)
curl GET "http://api.tradenity.com/v1/customers/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$customer = Customer->find_by_id($id)

The above command returns JSON structured like this:

{
  "__meta" : {
    "href" : "http://localhost:8080/api/v1/addresses/address_001"
  },
  "id": "...",
  "firstName": "...",
  "lastName": "...",
  "email": "...",
  "username": "...",
  "password": "...",
  "status": "...",
  "photo": "...",
  "billingAddress": "...",
  "shippingAddress": "...",
  "customerGroups": "...",
  "store": "..."
}

This endpoint retrieves a specific customer.

HTTP Request

GET http://api.tradenity.com/v1/customers/<ID>

URL Parameters

Parameter Description
ID The ID of the customer to retrieve

Create new Customer

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

Customer customer = new Customer();
customer.setFirstName("...");
customer.setLastName("...");
customer.setEmail("...");
customer.setUsername("...");
customer.setPassword("...");
customer.setStatus("...");
customer.setPhoto("...");
customer.setBillingAddress("...");
customer.setShippingAddress("...");
customer.setCustomerGroups("...");
customer.setStore("...");

Customer customer = CustomerService.create(customer);

require 'tradenity'

customer = Customer.new(firstName: "...", lastName: "...", email: "...", username: "...", password: "...", status: "...", photo: "...", billingAddress: "...", shippingAddress: "...", customerGroups: "...", store: "...")

customer.create

from tradenity.resources import Customer

customer = Customer(firstName="...", lastName="...", email="...", username="...", password="...", status="...", photo="...", billingAddress="...", shippingAddress="...", customerGroups="...", store="...")

customer.create()
curl -X POST http://api.tradenity.com/v1/customers \
  -H "Authorization: basicauthkey \
  -d "firstName=..." \
  -d "lastName=..." \
  -d "email=..." \
  -d "username=..." \
  -d "password=..." \
  -d "status=..." \
  -d "photo=..." \
  -d "billingAddress=..." \
  -d "shippingAddress=..." \
  -d "customerGroups=..." \
  -d "store=..." \
require 'tradenity'

$customer = new Customer()
$customer->setFirstName("...");
$customer->setLastName("...");
$customer->setEmail("...");
$customer->setUsername("...");
$customer->setPassword("...");
$customer->setStatus("...");
$customer->setPhoto("...");
$customer->setBillingAddress("...");
$customer->setShippingAddress("...");
$customer->setCustomerGroups("...");
$customer->setStore("...");

$customer->create();

The above command returns JSON structured like this:

  {
    "id": "...",
    "firstName": "...",
    "lastName": "...",
    "email": "...",
    "username": "...",
    "password": "...",
    "status": "...",
    "photo": "...",
    "billingAddress": "...",
    "shippingAddress": "...",
    "customerGroups": "...",
    "store": "..."
  }

This endpoint create a new customer using the specified parameters.

HTTP Request

POST http://api.tradenity.com/v1/customers

Updating Customer

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
Customer customer = CustomerService.findById(id);
customer.setFirstName("...");
customer.setLastName("...");
customer.setEmail("...");
customer.setUsername("...");
customer.setPassword("...");
customer.setStatus("...");
customer.setPhoto("...");
customer.setBillingAddress("...");
customer.setShippingAddress("...");
customer.setCustomerGroups("...");
customer.setStore("...");

Customer customer = CustomerService.update(customer);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
customer = Customer.find_by_id(id)
Customer.firstName = "..."
Customer.lastName = "..."
Customer.email = "..."
Customer.username = "..."
Customer.password = "..."
Customer.status = "..."
Customer.photo = "..."
Customer.billingAddress = "..."
Customer.shippingAddress = "..."
Customer.customerGroups = "..."
Customer.store = "..."

customer.update()

from tradenity.resources import Customer

customer_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
customer = Customer.find_by_id(customer_id)
Customer.firstName = "..."
Customer.lastName = "..."
Customer.email = "..."
Customer.username = "..."
Customer.password = "..."
Customer.status = "..."
Customer.photo = "..."
Customer.billingAddress = "..."
Customer.shippingAddress = "..."
Customer.customerGroups = "..."
Customer.store = "..."

customer.update()
curl -X PUT http://api.tradenity.com/v1/customers \
  -H "Authorization: basicauthkey \
  -d "firstName=..." \
  -d "lastName=..." \
  -d "email=..." \
  -d "username=..." \
  -d "password=..." \
  -d "status=..." \
  -d "photo=..." \
  -d "billingAddress=..." \
  -d "shippingAddress=..." \
  -d "customerGroups=..." \
  -d "store=..." \
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$customer = Customer->find_by_id($id)
$customer.setFirstName("...");
$customer.setLastName("...");
$customer.setEmail("...");
$customer.setUsername("...");
$customer.setPassword("...");
$customer.setStatus("...");
$customer.setPhoto("...");
$customer.setBillingAddress("...");
$customer.setShippingAddress("...");
$customer.setCustomerGroups("...");
$customer.setStore("...");

$customer->update();

The above command returns JSON structured like this:

  {
    "id": "...",
    "firstName": "...",
    "lastName": "...",
    "email": "...",
    "username": "...",
    "password": "...",
    "status": "...",
    "photo": "...",
    "billingAddress": "...",
    "shippingAddress": "...",
    "customerGroups": "...",
    "store": "..."
  }

This endpoint updates instance of customer using the specified parameters.

HTTP Request

PUT http://api.tradenity.com/v1/customers/<ID>

URL Parameters

Parameter Description
ID The ID of the customer to update

Delete a Specific Customer

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
boolean result = CustomerService.delete(id);

require 'tradenity'

result = Customer.delete_by_id(id)
from tradenity.resources import Customer

customer_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
result = Customer.delete_by_id(customer_id)
curl DELETE "http://api.tradenity.com/v1/customers/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

result = Customer->delete_by_id($id)

The above command returns no JSON document, just a success or failure status (HTTP status code or language specific boolean true or false) :

This endpoint delete a specific customer.

HTTP Request

DELETE http://api.tradenity.com/v1/customers/<ID>

URL Parameters

Parameter Description
ID The ID of the customer to delete

WishLists

WishList attributes

Parameter Type Required Read only Default Description
name String Yes False n/a Name of the WishList
description String No False n/a Description of the WishList
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.
products List of products NO No n/a Products of the WishList
customer Customer Yes No n/a Customer of the WishList

Get All WishLists

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<WishList> wishLists = WishListService.findAll();

require 'tradenity'

wishLists = WishList.find_all

from tradenity.resources import WishList

wishLists = WishList.find_all()
curl -X GET http://api.tradenity.com/v1/wishLists \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$wishLists = WishList->find_all()

The above command returns JSON structured like this:

{
    "wishLists": [{
        "name": "...",
        "description": "...",
        "products": "...",
        "customer": "...",
        "store": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all wishLists.

HTTP Request

GET http://api.tradenity.com/v1/wishLists

Find a Specific WishList by ID

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
WishList wishList = WishListService.findById(id);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
wishList = WishList.find_by_id(id)
from tradenity.resources import WishList

wishList_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
wishList = WishList.find_by_id(wishList_id)
curl GET "http://api.tradenity.com/v1/wishLists/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$wishList = WishList->find_by_id($id)

The above command returns JSON structured like this:

{
  "__meta" : {
    "href" : "http://localhost:8080/api/v1/addresses/address_001"
  },
  "id": "...",
  "name": "...",
  "description": "...",
  "products": "...",
  "customer": "...",
  "store": "..."
}

This endpoint retrieves a specific wishList.

HTTP Request

GET http://api.tradenity.com/v1/wishLists/<ID>

URL Parameters

Parameter Description
ID The ID of the wishList to retrieve

Create new WishList

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

WishList wishList = new WishList();
wishList.setName("...");
wishList.setDescription("...");
wishList.setProducts("...");
wishList.setCustomer("...");
wishList.setStore("...");

WishList wishList = WishListService.create(wishList);

require 'tradenity'

wishList = WishList.new(name: "...", description: "...", products: "...", customer: "...", store: "...")

wishList.create

from tradenity.resources import WishList

wishList = WishList(name="...", description="...", products="...", customer="...", store="...")

wishList.create()
curl -X POST http://api.tradenity.com/v1/wishLists \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "description=..." \
  -d "products=..." \
  -d "customer=..." \
  -d "store=..." \
require 'tradenity'

$wishList = new WishList()
$wishList->setName("...");
$wishList->setDescription("...");
$wishList->setProducts("...");
$wishList->setCustomer("...");
$wishList->setStore("...");

$wishList->create();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "description": "...",
    "products": "...",
    "customer": "...",
    "store": "..."
  }

This endpoint create a new wishList using the specified parameters.

HTTP Request

POST http://api.tradenity.com/v1/wishLists

Updating WishList

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
WishList wishList = WishListService.findById(id);
wishList.setName("...");
wishList.setDescription("...");
wishList.setProducts("...");
wishList.setCustomer("...");
wishList.setStore("...");

WishList wishList = WishListService.update(wishList);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
wishList = WishList.find_by_id(id)
WishList.name = "..."
WishList.description = "..."
WishList.products = "..."
WishList.customer = "..."
WishList.store = "..."

wishList.update()

from tradenity.resources import WishList

wishList_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
wishList = WishList.find_by_id(wishList_id)
WishList.name = "..."
WishList.description = "..."
WishList.products = "..."
WishList.customer = "..."
WishList.store = "..."

wishList.update()
curl -X PUT http://api.tradenity.com/v1/wishLists \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "description=..." \
  -d "products=..." \
  -d "customer=..." \
  -d "store=..." \
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$wishList = WishList->find_by_id($id)
$wishList.setName("...");
$wishList.setDescription("...");
$wishList.setProducts("...");
$wishList.setCustomer("...");
$wishList.setStore("...");

$wishList->update();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "description": "...",
    "products": "...",
    "customer": "...",
    "store": "..."
  }

This endpoint updates instance of wishList using the specified parameters.

HTTP Request

PUT http://api.tradenity.com/v1/wishLists/<ID>

URL Parameters

Parameter Description
ID The ID of the wishList to update

Delete a Specific WishList

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
boolean result = WishListService.delete(id);

require 'tradenity'

result = WishList.delete_by_id(id)
from tradenity.resources import WishList

wishList_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
result = WishList.delete_by_id(wishList_id)
curl DELETE "http://api.tradenity.com/v1/wishLists/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

result = WishList->delete_by_id($id)

The above command returns no JSON document, just a success or failure status (HTTP status code or language specific boolean true or false) :

This endpoint delete a specific wishList.

HTTP Request

DELETE http://api.tradenity.com/v1/wishLists/<ID>

URL Parameters

Parameter Description
ID The ID of the wishList to delete

Gateways

Gateway attributes

Parameter Type Required Read only Default Description
name String Yes False n/a Name of the Gateway
mode String Yes False n/a Mode of the Gateway
authorizeOnly Boolean No False false AuthorizeOnly of the Gateway
accountId String No False n/a AccountId of the Gateway
status String Yes False n/a Status of the Gateway
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.

Get All Gateways

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<Gateway> gateways = GatewayService.findAll();

require 'tradenity'

gateways = Gateway.find_all

from tradenity.resources import Gateway

gateways = Gateway.find_all()
curl -X GET http://api.tradenity.com/v1/gateways \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$gateways = Gateway->find_all()

The above command returns JSON structured like this:

{
    "gateways": [{
        "name": "...",
        "mode": "...",
        "authorizeOnly": "...",
        "accountId": "...",
        "status": "...",
        "store": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all gateways.

HTTP Request

GET http://api.tradenity.com/v1/gateways

TestGateways

TestGateway attributes

Parameter Type Required Read only Default Description
name String Yes False n/a Name of the TestGateway
mode String Yes False n/a Mode of the TestGateway
authorizeOnly Boolean No False false AuthorizeOnly of the TestGateway
accountId String No False n/a AccountId of the TestGateway
status String Yes False n/a Status of the TestGateway
secretKey String No False n/a SecretKey of the TestGateway
publicKey String No False n/a PublicKey of the TestGateway
testSecretKey String No False n/a TestSecretKey of the TestGateway
testPublicKey String No False n/a TestPublicKey of the TestGateway
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.

Get All TestGateways

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<TestGateway> testGateways = TestGatewayService.findAll();

require 'tradenity'

testGateways = TestGateway.find_all

from tradenity.resources import TestGateway

testGateways = TestGateway.find_all()
curl -X GET http://api.tradenity.com/v1/testGateways \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$testGateways = TestGateway->find_all()

The above command returns JSON structured like this:

{
    "testGateways": [{
        "name": "...",
        "mode": "...",
        "authorizeOnly": "...",
        "accountId": "...",
        "status": "...",
        "store": "...",
        "secretKey": "...",
        "publicKey": "...",
        "testSecretKey": "...",
        "testPublicKey": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all testGateways.

HTTP Request

GET http://api.tradenity.com/v1/testGateways

Find a Specific TestGateway by ID

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
TestGateway testGateway = TestGatewayService.findById(id);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
testGateway = TestGateway.find_by_id(id)
from tradenity.resources import TestGateway

testGateway_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
testGateway = TestGateway.find_by_id(testGateway_id)
curl GET "http://api.tradenity.com/v1/testGateways/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$testGateway = TestGateway->find_by_id($id)

The above command returns JSON structured like this:

{
  "__meta" : {
    "href" : "http://localhost:8080/api/v1/addresses/address_001"
  },
  "id": "...",
  "name": "...",
  "mode": "...",
  "authorizeOnly": "...",
  "accountId": "...",
  "status": "...",
  "store": "...",
  "secretKey": "...",
  "publicKey": "...",
  "testSecretKey": "...",
  "testPublicKey": "..."
}

This endpoint retrieves a specific testGateway.

HTTP Request

GET http://api.tradenity.com/v1/testGateways/<ID>

URL Parameters

Parameter Description
ID The ID of the testGateway to retrieve

Create new TestGateway

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

TestGateway testGateway = new TestGateway();
testGateway.setName("...");
testGateway.setMode("...");
testGateway.setAuthorizeOnly("...");
testGateway.setAccountId("...");
testGateway.setStatus("...");
testGateway.setStore("...");
testGateway.setSecretKey("...");
testGateway.setPublicKey("...");
testGateway.setTestSecretKey("...");
testGateway.setTestPublicKey("...");

TestGateway testGateway = TestGatewayService.create(testGateway);

require 'tradenity'

testGateway = TestGateway.new(name: "...", mode: "...", authorizeOnly: "...", accountId: "...", status: "...", store: "...", secretKey: "...", publicKey: "...", testSecretKey: "...", testPublicKey: "...")

testGateway.create

from tradenity.resources import TestGateway

testGateway = TestGateway(name="...", mode="...", authorizeOnly="...", accountId="...", status="...", store="...", secretKey="...", publicKey="...", testSecretKey="...", testPublicKey="...")

testGateway.create()
curl -X POST http://api.tradenity.com/v1/testGateways \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "mode=..." \
  -d "authorizeOnly=..." \
  -d "accountId=..." \
  -d "status=..." \
  -d "store=..." \
  -d "secretKey=..." \
  -d "publicKey=..." \
  -d "testSecretKey=..." \
  -d "testPublicKey=..." \
require 'tradenity'

$testGateway = new TestGateway()
$testGateway->setName("...");
$testGateway->setMode("...");
$testGateway->setAuthorizeOnly("...");
$testGateway->setAccountId("...");
$testGateway->setStatus("...");
$testGateway->setStore("...");
$testGateway->setSecretKey("...");
$testGateway->setPublicKey("...");
$testGateway->setTestSecretKey("...");
$testGateway->setTestPublicKey("...");

$testGateway->create();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "mode": "...",
    "authorizeOnly": "...",
    "accountId": "...",
    "status": "...",
    "store": "...",
    "secretKey": "...",
    "publicKey": "...",
    "testSecretKey": "...",
    "testPublicKey": "..."
  }

This endpoint create a new testGateway using the specified parameters.

HTTP Request

POST http://api.tradenity.com/v1/testGateways

Updating TestGateway

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
TestGateway testGateway = TestGatewayService.findById(id);
testGateway.setName("...");
testGateway.setMode("...");
testGateway.setAuthorizeOnly("...");
testGateway.setAccountId("...");
testGateway.setStatus("...");
testGateway.setStore("...");
testGateway.setSecretKey("...");
testGateway.setPublicKey("...");
testGateway.setTestSecretKey("...");
testGateway.setTestPublicKey("...");

TestGateway testGateway = TestGatewayService.update(testGateway);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
testGateway = TestGateway.find_by_id(id)
TestGateway.name = "..."
TestGateway.mode = "..."
TestGateway.authorizeOnly = "..."
TestGateway.accountId = "..."
TestGateway.status = "..."
TestGateway.store = "..."
TestGateway.secretKey = "..."
TestGateway.publicKey = "..."
TestGateway.testSecretKey = "..."
TestGateway.testPublicKey = "..."

testGateway.update()

from tradenity.resources import TestGateway

testGateway_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
testGateway = TestGateway.find_by_id(testGateway_id)
TestGateway.name = "..."
TestGateway.mode = "..."
TestGateway.authorizeOnly = "..."
TestGateway.accountId = "..."
TestGateway.status = "..."
TestGateway.store = "..."
TestGateway.secretKey = "..."
TestGateway.publicKey = "..."
TestGateway.testSecretKey = "..."
TestGateway.testPublicKey = "..."

testGateway.update()
curl -X PUT http://api.tradenity.com/v1/testGateways \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "mode=..." \
  -d "authorizeOnly=..." \
  -d "accountId=..." \
  -d "status=..." \
  -d "store=..." \
  -d "secretKey=..." \
  -d "publicKey=..." \
  -d "testSecretKey=..." \
  -d "testPublicKey=..." \
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$testGateway = TestGateway->find_by_id($id)
$testGateway.setName("...");
$testGateway.setMode("...");
$testGateway.setAuthorizeOnly("...");
$testGateway.setAccountId("...");
$testGateway.setStatus("...");
$testGateway.setStore("...");
$testGateway.setSecretKey("...");
$testGateway.setPublicKey("...");
$testGateway.setTestSecretKey("...");
$testGateway.setTestPublicKey("...");

$testGateway->update();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "mode": "...",
    "authorizeOnly": "...",
    "accountId": "...",
    "status": "...",
    "store": "...",
    "secretKey": "...",
    "publicKey": "...",
    "testSecretKey": "...",
    "testPublicKey": "..."
  }

This endpoint updates instance of testGateway using the specified parameters.

HTTP Request

PUT http://api.tradenity.com/v1/testGateways/<ID>

URL Parameters

Parameter Description
ID The ID of the testGateway to update

Delete a Specific TestGateway

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
boolean result = TestGatewayService.delete(id);

require 'tradenity'

result = TestGateway.delete_by_id(id)
from tradenity.resources import TestGateway

testGateway_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
result = TestGateway.delete_by_id(testGateway_id)
curl DELETE "http://api.tradenity.com/v1/testGateways/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

result = TestGateway->delete_by_id($id)

The above command returns no JSON document, just a success or failure status (HTTP status code or language specific boolean true or false) :

This endpoint delete a specific testGateway.

HTTP Request

DELETE http://api.tradenity.com/v1/testGateways/<ID>

URL Parameters

Parameter Description
ID The ID of the testGateway to delete

StripeGateways

StripeGateway attributes

Parameter Type Required Read only Default Description
name String Yes False n/a Name of the StripeGateway
mode String Yes False n/a Mode of the StripeGateway
authorizeOnly Boolean No False false AuthorizeOnly of the StripeGateway
accountId String No False n/a AccountId of the StripeGateway
status String Yes False n/a Status of the StripeGateway
secretKey String No False n/a SecretKey of the StripeGateway
publicKey String No False n/a PublicKey of the StripeGateway
testSecretKey String No False n/a TestSecretKey of the StripeGateway
testPublicKey String No False n/a TestPublicKey of the StripeGateway
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.

Get All StripeGateways

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<StripeGateway> stripeGateways = StripeGatewayService.findAll();

require 'tradenity'

stripeGateways = StripeGateway.find_all

from tradenity.resources import StripeGateway

stripeGateways = StripeGateway.find_all()
curl -X GET http://api.tradenity.com/v1/stripeGateways \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$stripeGateways = StripeGateway->find_all()

The above command returns JSON structured like this:

{
    "stripeGateways": [{
        "name": "...",
        "mode": "...",
        "authorizeOnly": "...",
        "accountId": "...",
        "status": "...",
        "store": "...",
        "secretKey": "...",
        "publicKey": "...",
        "testSecretKey": "...",
        "testPublicKey": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all stripeGateways.

HTTP Request

GET http://api.tradenity.com/v1/stripeGateways

Find a Specific StripeGateway by ID

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
StripeGateway stripeGateway = StripeGatewayService.findById(id);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
stripeGateway = StripeGateway.find_by_id(id)
from tradenity.resources import StripeGateway

stripeGateway_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
stripeGateway = StripeGateway.find_by_id(stripeGateway_id)
curl GET "http://api.tradenity.com/v1/stripeGateways/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$stripeGateway = StripeGateway->find_by_id($id)

The above command returns JSON structured like this:

{
  "__meta" : {
    "href" : "http://localhost:8080/api/v1/addresses/address_001"
  },
  "id": "...",
  "name": "...",
  "mode": "...",
  "authorizeOnly": "...",
  "accountId": "...",
  "status": "...",
  "store": "...",
  "secretKey": "...",
  "publicKey": "...",
  "testSecretKey": "...",
  "testPublicKey": "..."
}

This endpoint retrieves a specific stripeGateway.

HTTP Request

GET http://api.tradenity.com/v1/stripeGateways/<ID>

URL Parameters

Parameter Description
ID The ID of the stripeGateway to retrieve

Create new StripeGateway

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

StripeGateway stripeGateway = new StripeGateway();
stripeGateway.setName("...");
stripeGateway.setMode("...");
stripeGateway.setAuthorizeOnly("...");
stripeGateway.setAccountId("...");
stripeGateway.setStatus("...");
stripeGateway.setStore("...");
stripeGateway.setSecretKey("...");
stripeGateway.setPublicKey("...");
stripeGateway.setTestSecretKey("...");
stripeGateway.setTestPublicKey("...");

StripeGateway stripeGateway = StripeGatewayService.create(stripeGateway);

require 'tradenity'

stripeGateway = StripeGateway.new(name: "...", mode: "...", authorizeOnly: "...", accountId: "...", status: "...", store: "...", secretKey: "...", publicKey: "...", testSecretKey: "...", testPublicKey: "...")

stripeGateway.create

from tradenity.resources import StripeGateway

stripeGateway = StripeGateway(name="...", mode="...", authorizeOnly="...", accountId="...", status="...", store="...", secretKey="...", publicKey="...", testSecretKey="...", testPublicKey="...")

stripeGateway.create()
curl -X POST http://api.tradenity.com/v1/stripeGateways \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "mode=..." \
  -d "authorizeOnly=..." \
  -d "accountId=..." \
  -d "status=..." \
  -d "store=..." \
  -d "secretKey=..." \
  -d "publicKey=..." \
  -d "testSecretKey=..." \
  -d "testPublicKey=..." \
require 'tradenity'

$stripeGateway = new StripeGateway()
$stripeGateway->setName("...");
$stripeGateway->setMode("...");
$stripeGateway->setAuthorizeOnly("...");
$stripeGateway->setAccountId("...");
$stripeGateway->setStatus("...");
$stripeGateway->setStore("...");
$stripeGateway->setSecretKey("...");
$stripeGateway->setPublicKey("...");
$stripeGateway->setTestSecretKey("...");
$stripeGateway->setTestPublicKey("...");

$stripeGateway->create();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "mode": "...",
    "authorizeOnly": "...",
    "accountId": "...",
    "status": "...",
    "store": "...",
    "secretKey": "...",
    "publicKey": "...",
    "testSecretKey": "...",
    "testPublicKey": "..."
  }

This endpoint create a new stripeGateway using the specified parameters.

HTTP Request

POST http://api.tradenity.com/v1/stripeGateways

Updating StripeGateway

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
StripeGateway stripeGateway = StripeGatewayService.findById(id);
stripeGateway.setName("...");
stripeGateway.setMode("...");
stripeGateway.setAuthorizeOnly("...");
stripeGateway.setAccountId("...");
stripeGateway.setStatus("...");
stripeGateway.setStore("...");
stripeGateway.setSecretKey("...");
stripeGateway.setPublicKey("...");
stripeGateway.setTestSecretKey("...");
stripeGateway.setTestPublicKey("...");

StripeGateway stripeGateway = StripeGatewayService.update(stripeGateway);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
stripeGateway = StripeGateway.find_by_id(id)
StripeGateway.name = "..."
StripeGateway.mode = "..."
StripeGateway.authorizeOnly = "..."
StripeGateway.accountId = "..."
StripeGateway.status = "..."
StripeGateway.store = "..."
StripeGateway.secretKey = "..."
StripeGateway.publicKey = "..."
StripeGateway.testSecretKey = "..."
StripeGateway.testPublicKey = "..."

stripeGateway.update()

from tradenity.resources import StripeGateway

stripeGateway_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
stripeGateway = StripeGateway.find_by_id(stripeGateway_id)
StripeGateway.name = "..."
StripeGateway.mode = "..."
StripeGateway.authorizeOnly = "..."
StripeGateway.accountId = "..."
StripeGateway.status = "..."
StripeGateway.store = "..."
StripeGateway.secretKey = "..."
StripeGateway.publicKey = "..."
StripeGateway.testSecretKey = "..."
StripeGateway.testPublicKey = "..."

stripeGateway.update()
curl -X PUT http://api.tradenity.com/v1/stripeGateways \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "mode=..." \
  -d "authorizeOnly=..." \
  -d "accountId=..." \
  -d "status=..." \
  -d "store=..." \
  -d "secretKey=..." \
  -d "publicKey=..." \
  -d "testSecretKey=..." \
  -d "testPublicKey=..." \
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$stripeGateway = StripeGateway->find_by_id($id)
$stripeGateway.setName("...");
$stripeGateway.setMode("...");
$stripeGateway.setAuthorizeOnly("...");
$stripeGateway.setAccountId("...");
$stripeGateway.setStatus("...");
$stripeGateway.setStore("...");
$stripeGateway.setSecretKey("...");
$stripeGateway.setPublicKey("...");
$stripeGateway.setTestSecretKey("...");
$stripeGateway.setTestPublicKey("...");

$stripeGateway->update();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "mode": "...",
    "authorizeOnly": "...",
    "accountId": "...",
    "status": "...",
    "store": "...",
    "secretKey": "...",
    "publicKey": "...",
    "testSecretKey": "...",
    "testPublicKey": "..."
  }

This endpoint updates instance of stripeGateway using the specified parameters.

HTTP Request

PUT http://api.tradenity.com/v1/stripeGateways/<ID>

URL Parameters

Parameter Description
ID The ID of the stripeGateway to update

Delete a Specific StripeGateway

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
boolean result = StripeGatewayService.delete(id);

require 'tradenity'

result = StripeGateway.delete_by_id(id)
from tradenity.resources import StripeGateway

stripeGateway_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
result = StripeGateway.delete_by_id(stripeGateway_id)
curl DELETE "http://api.tradenity.com/v1/stripeGateways/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

result = StripeGateway->delete_by_id($id)

The above command returns no JSON document, just a success or failure status (HTTP status code or language specific boolean true or false) :

This endpoint delete a specific stripeGateway.

HTTP Request

DELETE http://api.tradenity.com/v1/stripeGateways/<ID>

URL Parameters

Parameter Description
ID The ID of the stripeGateway to delete

BraintreeGateways

BraintreeGateway attributes

Parameter Type Required Read only Default Description
name String Yes False n/a Name of the BraintreeGateway
mode String Yes False n/a Mode of the BraintreeGateway
authorizeOnly Boolean No False false AuthorizeOnly of the BraintreeGateway
accountId String No False n/a AccountId of the BraintreeGateway
status String Yes False n/a Status of the BraintreeGateway
secretKey String No False n/a SecretKey of the BraintreeGateway
publicKey String No False n/a PublicKey of the BraintreeGateway
testSecretKey String No False n/a TestSecretKey of the BraintreeGateway
testPublicKey String No False n/a TestPublicKey of the BraintreeGateway
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.

Get All BraintreeGateways

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<BraintreeGateway> braintreeGateways = BraintreeGatewayService.findAll();

require 'tradenity'

braintreeGateways = BraintreeGateway.find_all

from tradenity.resources import BraintreeGateway

braintreeGateways = BraintreeGateway.find_all()
curl -X GET http://api.tradenity.com/v1/braintreeGateways \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$braintreeGateways = BraintreeGateway->find_all()

The above command returns JSON structured like this:

{
    "braintreeGateways": [{
        "name": "...",
        "mode": "...",
        "authorizeOnly": "...",
        "accountId": "...",
        "status": "...",
        "store": "...",
        "secretKey": "...",
        "publicKey": "...",
        "testSecretKey": "...",
        "testPublicKey": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all braintreeGateways.

HTTP Request

GET http://api.tradenity.com/v1/braintreeGateways

Find a Specific BraintreeGateway by ID

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
BraintreeGateway braintreeGateway = BraintreeGatewayService.findById(id);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
braintreeGateway = BraintreeGateway.find_by_id(id)
from tradenity.resources import BraintreeGateway

braintreeGateway_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
braintreeGateway = BraintreeGateway.find_by_id(braintreeGateway_id)
curl GET "http://api.tradenity.com/v1/braintreeGateways/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$braintreeGateway = BraintreeGateway->find_by_id($id)

The above command returns JSON structured like this:

{
  "__meta" : {
    "href" : "http://localhost:8080/api/v1/addresses/address_001"
  },
  "id": "...",
  "name": "...",
  "mode": "...",
  "authorizeOnly": "...",
  "accountId": "...",
  "status": "...",
  "store": "...",
  "secretKey": "...",
  "publicKey": "...",
  "testSecretKey": "...",
  "testPublicKey": "..."
}

This endpoint retrieves a specific braintreeGateway.

HTTP Request

GET http://api.tradenity.com/v1/braintreeGateways/<ID>

URL Parameters

Parameter Description
ID The ID of the braintreeGateway to retrieve

Create new BraintreeGateway

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

BraintreeGateway braintreeGateway = new BraintreeGateway();
braintreeGateway.setName("...");
braintreeGateway.setMode("...");
braintreeGateway.setAuthorizeOnly("...");
braintreeGateway.setAccountId("...");
braintreeGateway.setStatus("...");
braintreeGateway.setStore("...");
braintreeGateway.setSecretKey("...");
braintreeGateway.setPublicKey("...");
braintreeGateway.setTestSecretKey("...");
braintreeGateway.setTestPublicKey("...");

BraintreeGateway braintreeGateway = BraintreeGatewayService.create(braintreeGateway);

require 'tradenity'

braintreeGateway = BraintreeGateway.new(name: "...", mode: "...", authorizeOnly: "...", accountId: "...", status: "...", store: "...", secretKey: "...", publicKey: "...", testSecretKey: "...", testPublicKey: "...")

braintreeGateway.create

from tradenity.resources import BraintreeGateway

braintreeGateway = BraintreeGateway(name="...", mode="...", authorizeOnly="...", accountId="...", status="...", store="...", secretKey="...", publicKey="...", testSecretKey="...", testPublicKey="...")

braintreeGateway.create()
curl -X POST http://api.tradenity.com/v1/braintreeGateways \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "mode=..." \
  -d "authorizeOnly=..." \
  -d "accountId=..." \
  -d "status=..." \
  -d "store=..." \
  -d "secretKey=..." \
  -d "publicKey=..." \
  -d "testSecretKey=..." \
  -d "testPublicKey=..." \
require 'tradenity'

$braintreeGateway = new BraintreeGateway()
$braintreeGateway->setName("...");
$braintreeGateway->setMode("...");
$braintreeGateway->setAuthorizeOnly("...");
$braintreeGateway->setAccountId("...");
$braintreeGateway->setStatus("...");
$braintreeGateway->setStore("...");
$braintreeGateway->setSecretKey("...");
$braintreeGateway->setPublicKey("...");
$braintreeGateway->setTestSecretKey("...");
$braintreeGateway->setTestPublicKey("...");

$braintreeGateway->create();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "mode": "...",
    "authorizeOnly": "...",
    "accountId": "...",
    "status": "...",
    "store": "...",
    "secretKey": "...",
    "publicKey": "...",
    "testSecretKey": "...",
    "testPublicKey": "..."
  }

This endpoint create a new braintreeGateway using the specified parameters.

HTTP Request

POST http://api.tradenity.com/v1/braintreeGateways

Updating BraintreeGateway

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
BraintreeGateway braintreeGateway = BraintreeGatewayService.findById(id);
braintreeGateway.setName("...");
braintreeGateway.setMode("...");
braintreeGateway.setAuthorizeOnly("...");
braintreeGateway.setAccountId("...");
braintreeGateway.setStatus("...");
braintreeGateway.setStore("...");
braintreeGateway.setSecretKey("...");
braintreeGateway.setPublicKey("...");
braintreeGateway.setTestSecretKey("...");
braintreeGateway.setTestPublicKey("...");

BraintreeGateway braintreeGateway = BraintreeGatewayService.update(braintreeGateway);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
braintreeGateway = BraintreeGateway.find_by_id(id)
BraintreeGateway.name = "..."
BraintreeGateway.mode = "..."
BraintreeGateway.authorizeOnly = "..."
BraintreeGateway.accountId = "..."
BraintreeGateway.status = "..."
BraintreeGateway.store = "..."
BraintreeGateway.secretKey = "..."
BraintreeGateway.publicKey = "..."
BraintreeGateway.testSecretKey = "..."
BraintreeGateway.testPublicKey = "..."

braintreeGateway.update()

from tradenity.resources import BraintreeGateway

braintreeGateway_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
braintreeGateway = BraintreeGateway.find_by_id(braintreeGateway_id)
BraintreeGateway.name = "..."
BraintreeGateway.mode = "..."
BraintreeGateway.authorizeOnly = "..."
BraintreeGateway.accountId = "..."
BraintreeGateway.status = "..."
BraintreeGateway.store = "..."
BraintreeGateway.secretKey = "..."
BraintreeGateway.publicKey = "..."
BraintreeGateway.testSecretKey = "..."
BraintreeGateway.testPublicKey = "..."

braintreeGateway.update()
curl -X PUT http://api.tradenity.com/v1/braintreeGateways \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "mode=..." \
  -d "authorizeOnly=..." \
  -d "accountId=..." \
  -d "status=..." \
  -d "store=..." \
  -d "secretKey=..." \
  -d "publicKey=..." \
  -d "testSecretKey=..." \
  -d "testPublicKey=..." \
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$braintreeGateway = BraintreeGateway->find_by_id($id)
$braintreeGateway.setName("...");
$braintreeGateway.setMode("...");
$braintreeGateway.setAuthorizeOnly("...");
$braintreeGateway.setAccountId("...");
$braintreeGateway.setStatus("...");
$braintreeGateway.setStore("...");
$braintreeGateway.setSecretKey("...");
$braintreeGateway.setPublicKey("...");
$braintreeGateway.setTestSecretKey("...");
$braintreeGateway.setTestPublicKey("...");

$braintreeGateway->update();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "mode": "...",
    "authorizeOnly": "...",
    "accountId": "...",
    "status": "...",
    "store": "...",
    "secretKey": "...",
    "publicKey": "...",
    "testSecretKey": "...",
    "testPublicKey": "..."
  }

This endpoint updates instance of braintreeGateway using the specified parameters.

HTTP Request

PUT http://api.tradenity.com/v1/braintreeGateways/<ID>

URL Parameters

Parameter Description
ID The ID of the braintreeGateway to update

Delete a Specific BraintreeGateway

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
boolean result = BraintreeGatewayService.delete(id);

require 'tradenity'

result = BraintreeGateway.delete_by_id(id)
from tradenity.resources import BraintreeGateway

braintreeGateway_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
result = BraintreeGateway.delete_by_id(braintreeGateway_id)
curl DELETE "http://api.tradenity.com/v1/braintreeGateways/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

result = BraintreeGateway->delete_by_id($id)

The above command returns no JSON document, just a success or failure status (HTTP status code or language specific boolean true or false) :

This endpoint delete a specific braintreeGateway.

HTTP Request

DELETE http://api.tradenity.com/v1/braintreeGateways/<ID>

URL Parameters

Parameter Description
ID The ID of the braintreeGateway to delete

ShippingMethods

ShippingMethod attributes

Parameter Type Required Read only Default Description
name String Yes False n/a Name of the ShippingMethod
slug String Yes False n/a Slug of the ShippingMethod
message String No False n/a Message of the ShippingMethod
description String No False n/a Description of the ShippingMethod
status String Yes False n/a Status of the ShippingMethod
useDiscountedSubtotal Boolean No False n/a UseDiscountedSubtotal of the ShippingMethod
includeTaxes Boolean No False n/a IncludeTaxes of the ShippingMethod
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.
geoZone GeoZone Yes No n/a GeoZone of the ShippingMethod
customerGroups List of customerGroups NO No n/a CustomerGroups of the ShippingMethod

Get All ShippingMethods

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<ShippingMethod> shippingMethods = ShippingMethodService.findAll();

require 'tradenity'

shippingMethods = ShippingMethod.find_all

from tradenity.resources import ShippingMethod

shippingMethods = ShippingMethod.find_all()
curl -X GET http://api.tradenity.com/v1/shippingMethods \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$shippingMethods = ShippingMethod->find_all()

The above command returns JSON structured like this:

{
    "shippingMethods": [{
        "name": "...",
        "slug": "...",
        "message": "...",
        "description": "...",
        "geoZone": "...",
        "customerGroups": "...",
        "status": "...",
        "useDiscountedSubtotal": "...",
        "includeTaxes": "...",
        "store": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all shippingMethods.

HTTP Request

GET http://api.tradenity.com/v1/shippingMethods

FreeShippings

FreeShipping attributes

Parameter Type Required Read only Default Description
name String Yes False n/a Name of the FreeShipping
slug String Yes False n/a Slug of the FreeShipping
message String No False n/a Message of the FreeShipping
description String No False n/a Description of the FreeShipping
status String Yes False n/a Status of the FreeShipping
useDiscountedSubtotal Boolean No False n/a UseDiscountedSubtotal of the FreeShipping
includeTaxes Boolean No False n/a IncludeTaxes of the FreeShipping
minimumOrder Integer No False n/a MinimumOrder of the FreeShipping
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.
geoZone GeoZone Yes No n/a GeoZone of the FreeShipping
customerGroups List of customerGroups NO No n/a CustomerGroups of the FreeShipping

Get All FreeShippings

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<FreeShipping> freeShippings = FreeShippingService.findAll();

require 'tradenity'

freeShippings = FreeShipping.find_all

from tradenity.resources import FreeShipping

freeShippings = FreeShipping.find_all()
curl -X GET http://api.tradenity.com/v1/freeShippings \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$freeShippings = FreeShipping->find_all()

The above command returns JSON structured like this:

{
    "freeShippings": [{
        "name": "...",
        "slug": "...",
        "message": "...",
        "description": "...",
        "geoZone": "...",
        "customerGroups": "...",
        "status": "...",
        "useDiscountedSubtotal": "...",
        "includeTaxes": "...",
        "store": "...",
        "minimumOrder": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all freeShippings.

HTTP Request

GET http://api.tradenity.com/v1/freeShippings

Find a Specific FreeShipping by ID

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
FreeShipping freeShipping = FreeShippingService.findById(id);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
freeShipping = FreeShipping.find_by_id(id)
from tradenity.resources import FreeShipping

freeShipping_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
freeShipping = FreeShipping.find_by_id(freeShipping_id)
curl GET "http://api.tradenity.com/v1/freeShippings/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$freeShipping = FreeShipping->find_by_id($id)

The above command returns JSON structured like this:

{
  "__meta" : {
    "href" : "http://localhost:8080/api/v1/addresses/address_001"
  },
  "id": "...",
  "name": "...",
  "slug": "...",
  "message": "...",
  "description": "...",
  "geoZone": "...",
  "customerGroups": "...",
  "status": "...",
  "useDiscountedSubtotal": "...",
  "includeTaxes": "...",
  "store": "...",
  "minimumOrder": "..."
}

This endpoint retrieves a specific freeShipping.

HTTP Request

GET http://api.tradenity.com/v1/freeShippings/<ID>

URL Parameters

Parameter Description
ID The ID of the freeShipping to retrieve

Create new FreeShipping

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

FreeShipping freeShipping = new FreeShipping();
freeShipping.setName("...");
freeShipping.setSlug("...");
freeShipping.setMessage("...");
freeShipping.setDescription("...");
freeShipping.setGeoZone("...");
freeShipping.setCustomerGroups("...");
freeShipping.setStatus("...");
freeShipping.setUseDiscountedSubtotal("...");
freeShipping.setIncludeTaxes("...");
freeShipping.setStore("...");
freeShipping.setMinimumOrder("...");

FreeShipping freeShipping = FreeShippingService.create(freeShipping);

require 'tradenity'

freeShipping = FreeShipping.new(name: "...", slug: "...", message: "...", description: "...", geoZone: "...", customerGroups: "...", status: "...", useDiscountedSubtotal: "...", includeTaxes: "...", store: "...", minimumOrder: "...")

freeShipping.create

from tradenity.resources import FreeShipping

freeShipping = FreeShipping(name="...", slug="...", message="...", description="...", geoZone="...", customerGroups="...", status="...", useDiscountedSubtotal="...", includeTaxes="...", store="...", minimumOrder="...")

freeShipping.create()
curl -X POST http://api.tradenity.com/v1/freeShippings \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "slug=..." \
  -d "message=..." \
  -d "description=..." \
  -d "geoZone=..." \
  -d "customerGroups=..." \
  -d "status=..." \
  -d "useDiscountedSubtotal=..." \
  -d "includeTaxes=..." \
  -d "store=..." \
  -d "minimumOrder=..." \
require 'tradenity'

$freeShipping = new FreeShipping()
$freeShipping->setName("...");
$freeShipping->setSlug("...");
$freeShipping->setMessage("...");
$freeShipping->setDescription("...");
$freeShipping->setGeoZone("...");
$freeShipping->setCustomerGroups("...");
$freeShipping->setStatus("...");
$freeShipping->setUseDiscountedSubtotal("...");
$freeShipping->setIncludeTaxes("...");
$freeShipping->setStore("...");
$freeShipping->setMinimumOrder("...");

$freeShipping->create();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "slug": "...",
    "message": "...",
    "description": "...",
    "geoZone": "...",
    "customerGroups": "...",
    "status": "...",
    "useDiscountedSubtotal": "...",
    "includeTaxes": "...",
    "store": "...",
    "minimumOrder": "..."
  }

This endpoint create a new freeShipping using the specified parameters.

HTTP Request

POST http://api.tradenity.com/v1/freeShippings

Updating FreeShipping

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
FreeShipping freeShipping = FreeShippingService.findById(id);
freeShipping.setName("...");
freeShipping.setSlug("...");
freeShipping.setMessage("...");
freeShipping.setDescription("...");
freeShipping.setGeoZone("...");
freeShipping.setCustomerGroups("...");
freeShipping.setStatus("...");
freeShipping.setUseDiscountedSubtotal("...");
freeShipping.setIncludeTaxes("...");
freeShipping.setStore("...");
freeShipping.setMinimumOrder("...");

FreeShipping freeShipping = FreeShippingService.update(freeShipping);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
freeShipping = FreeShipping.find_by_id(id)
FreeShipping.name = "..."
FreeShipping.slug = "..."
FreeShipping.message = "..."
FreeShipping.description = "..."
FreeShipping.geoZone = "..."
FreeShipping.customerGroups = "..."
FreeShipping.status = "..."
FreeShipping.useDiscountedSubtotal = "..."
FreeShipping.includeTaxes = "..."
FreeShipping.store = "..."
FreeShipping.minimumOrder = "..."

freeShipping.update()

from tradenity.resources import FreeShipping

freeShipping_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
freeShipping = FreeShipping.find_by_id(freeShipping_id)
FreeShipping.name = "..."
FreeShipping.slug = "..."
FreeShipping.message = "..."
FreeShipping.description = "..."
FreeShipping.geoZone = "..."
FreeShipping.customerGroups = "..."
FreeShipping.status = "..."
FreeShipping.useDiscountedSubtotal = "..."
FreeShipping.includeTaxes = "..."
FreeShipping.store = "..."
FreeShipping.minimumOrder = "..."

freeShipping.update()
curl -X PUT http://api.tradenity.com/v1/freeShippings \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "slug=..." \
  -d "message=..." \
  -d "description=..." \
  -d "geoZone=..." \
  -d "customerGroups=..." \
  -d "status=..." \
  -d "useDiscountedSubtotal=..." \
  -d "includeTaxes=..." \
  -d "store=..." \
  -d "minimumOrder=..." \
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$freeShipping = FreeShipping->find_by_id($id)
$freeShipping.setName("...");
$freeShipping.setSlug("...");
$freeShipping.setMessage("...");
$freeShipping.setDescription("...");
$freeShipping.setGeoZone("...");
$freeShipping.setCustomerGroups("...");
$freeShipping.setStatus("...");
$freeShipping.setUseDiscountedSubtotal("...");
$freeShipping.setIncludeTaxes("...");
$freeShipping.setStore("...");
$freeShipping.setMinimumOrder("...");

$freeShipping->update();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "slug": "...",
    "message": "...",
    "description": "...",
    "geoZone": "...",
    "customerGroups": "...",
    "status": "...",
    "useDiscountedSubtotal": "...",
    "includeTaxes": "...",
    "store": "...",
    "minimumOrder": "..."
  }

This endpoint updates instance of freeShipping using the specified parameters.

HTTP Request

PUT http://api.tradenity.com/v1/freeShippings/<ID>

URL Parameters

Parameter Description
ID The ID of the freeShipping to update

Delete a Specific FreeShipping

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
boolean result = FreeShippingService.delete(id);

require 'tradenity'

result = FreeShipping.delete_by_id(id)
from tradenity.resources import FreeShipping

freeShipping_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
result = FreeShipping.delete_by_id(freeShipping_id)
curl DELETE "http://api.tradenity.com/v1/freeShippings/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

result = FreeShipping->delete_by_id($id)

The above command returns no JSON document, just a success or failure status (HTTP status code or language specific boolean true or false) :

This endpoint delete a specific freeShipping.

HTTP Request

DELETE http://api.tradenity.com/v1/freeShippings/<ID>

URL Parameters

Parameter Description
ID The ID of the freeShipping to delete

FixedRateShippings

FixedRateShipping attributes

Parameter Type Required Read only Default Description
name String Yes False n/a Name of the FixedRateShipping
slug String Yes False n/a Slug of the FixedRateShipping
message String No False n/a Message of the FixedRateShipping
description String No False n/a Description of the FixedRateShipping
status String Yes False n/a Status of the FixedRateShipping
useDiscountedSubtotal Boolean No False n/a UseDiscountedSubtotal of the FixedRateShipping
includeTaxes Boolean No False n/a IncludeTaxes of the FixedRateShipping
cost Integer Yes False n/a Cost of the FixedRateShipping
costType String Yes False n/a CostType of the FixedRateShipping
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.
geoZone GeoZone Yes No n/a GeoZone of the FixedRateShipping
customerGroups List of customerGroups NO No n/a CustomerGroups of the FixedRateShipping

Get All FixedRateShippings

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<FixedRateShipping> fixedRateShippings = FixedRateShippingService.findAll();

require 'tradenity'

fixedRateShippings = FixedRateShipping.find_all

from tradenity.resources import FixedRateShipping

fixedRateShippings = FixedRateShipping.find_all()
curl -X GET http://api.tradenity.com/v1/fixedRateShippings \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$fixedRateShippings = FixedRateShipping->find_all()

The above command returns JSON structured like this:

{
    "fixedRateShippings": [{
        "name": "...",
        "slug": "...",
        "message": "...",
        "description": "...",
        "geoZone": "...",
        "customerGroups": "...",
        "status": "...",
        "useDiscountedSubtotal": "...",
        "includeTaxes": "...",
        "store": "...",
        "cost": "...",
        "costType": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all fixedRateShippings.

HTTP Request

GET http://api.tradenity.com/v1/fixedRateShippings

Find a Specific FixedRateShipping by ID

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
FixedRateShipping fixedRateShipping = FixedRateShippingService.findById(id);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
fixedRateShipping = FixedRateShipping.find_by_id(id)
from tradenity.resources import FixedRateShipping

fixedRateShipping_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
fixedRateShipping = FixedRateShipping.find_by_id(fixedRateShipping_id)
curl GET "http://api.tradenity.com/v1/fixedRateShippings/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$fixedRateShipping = FixedRateShipping->find_by_id($id)

The above command returns JSON structured like this:

{
  "__meta" : {
    "href" : "http://localhost:8080/api/v1/addresses/address_001"
  },
  "id": "...",
  "name": "...",
  "slug": "...",
  "message": "...",
  "description": "...",
  "geoZone": "...",
  "customerGroups": "...",
  "status": "...",
  "useDiscountedSubtotal": "...",
  "includeTaxes": "...",
  "store": "...",
  "cost": "...",
  "costType": "..."
}

This endpoint retrieves a specific fixedRateShipping.

HTTP Request

GET http://api.tradenity.com/v1/fixedRateShippings/<ID>

URL Parameters

Parameter Description
ID The ID of the fixedRateShipping to retrieve

Create new FixedRateShipping

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

FixedRateShipping fixedRateShipping = new FixedRateShipping();
fixedRateShipping.setName("...");
fixedRateShipping.setSlug("...");
fixedRateShipping.setMessage("...");
fixedRateShipping.setDescription("...");
fixedRateShipping.setGeoZone("...");
fixedRateShipping.setCustomerGroups("...");
fixedRateShipping.setStatus("...");
fixedRateShipping.setUseDiscountedSubtotal("...");
fixedRateShipping.setIncludeTaxes("...");
fixedRateShipping.setStore("...");
fixedRateShipping.setCost("...");
fixedRateShipping.setCostType("...");

FixedRateShipping fixedRateShipping = FixedRateShippingService.create(fixedRateShipping);

require 'tradenity'

fixedRateShipping = FixedRateShipping.new(name: "...", slug: "...", message: "...", description: "...", geoZone: "...", customerGroups: "...", status: "...", useDiscountedSubtotal: "...", includeTaxes: "...", store: "...", cost: "...", costType: "...")

fixedRateShipping.create

from tradenity.resources import FixedRateShipping

fixedRateShipping = FixedRateShipping(name="...", slug="...", message="...", description="...", geoZone="...", customerGroups="...", status="...", useDiscountedSubtotal="...", includeTaxes="...", store="...", cost="...", costType="...")

fixedRateShipping.create()
curl -X POST http://api.tradenity.com/v1/fixedRateShippings \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "slug=..." \
  -d "message=..." \
  -d "description=..." \
  -d "geoZone=..." \
  -d "customerGroups=..." \
  -d "status=..." \
  -d "useDiscountedSubtotal=..." \
  -d "includeTaxes=..." \
  -d "store=..." \
  -d "cost=..." \
  -d "costType=..." \
require 'tradenity'

$fixedRateShipping = new FixedRateShipping()
$fixedRateShipping->setName("...");
$fixedRateShipping->setSlug("...");
$fixedRateShipping->setMessage("...");
$fixedRateShipping->setDescription("...");
$fixedRateShipping->setGeoZone("...");
$fixedRateShipping->setCustomerGroups("...");
$fixedRateShipping->setStatus("...");
$fixedRateShipping->setUseDiscountedSubtotal("...");
$fixedRateShipping->setIncludeTaxes("...");
$fixedRateShipping->setStore("...");
$fixedRateShipping->setCost("...");
$fixedRateShipping->setCostType("...");

$fixedRateShipping->create();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "slug": "...",
    "message": "...",
    "description": "...",
    "geoZone": "...",
    "customerGroups": "...",
    "status": "...",
    "useDiscountedSubtotal": "...",
    "includeTaxes": "...",
    "store": "...",
    "cost": "...",
    "costType": "..."
  }

This endpoint create a new fixedRateShipping using the specified parameters.

HTTP Request

POST http://api.tradenity.com/v1/fixedRateShippings

Updating FixedRateShipping

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
FixedRateShipping fixedRateShipping = FixedRateShippingService.findById(id);
fixedRateShipping.setName("...");
fixedRateShipping.setSlug("...");
fixedRateShipping.setMessage("...");
fixedRateShipping.setDescription("...");
fixedRateShipping.setGeoZone("...");
fixedRateShipping.setCustomerGroups("...");
fixedRateShipping.setStatus("...");
fixedRateShipping.setUseDiscountedSubtotal("...");
fixedRateShipping.setIncludeTaxes("...");
fixedRateShipping.setStore("...");
fixedRateShipping.setCost("...");
fixedRateShipping.setCostType("...");

FixedRateShipping fixedRateShipping = FixedRateShippingService.update(fixedRateShipping);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
fixedRateShipping = FixedRateShipping.find_by_id(id)
FixedRateShipping.name = "..."
FixedRateShipping.slug = "..."
FixedRateShipping.message = "..."
FixedRateShipping.description = "..."
FixedRateShipping.geoZone = "..."
FixedRateShipping.customerGroups = "..."
FixedRateShipping.status = "..."
FixedRateShipping.useDiscountedSubtotal = "..."
FixedRateShipping.includeTaxes = "..."
FixedRateShipping.store = "..."
FixedRateShipping.cost = "..."
FixedRateShipping.costType = "..."

fixedRateShipping.update()

from tradenity.resources import FixedRateShipping

fixedRateShipping_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
fixedRateShipping = FixedRateShipping.find_by_id(fixedRateShipping_id)
FixedRateShipping.name = "..."
FixedRateShipping.slug = "..."
FixedRateShipping.message = "..."
FixedRateShipping.description = "..."
FixedRateShipping.geoZone = "..."
FixedRateShipping.customerGroups = "..."
FixedRateShipping.status = "..."
FixedRateShipping.useDiscountedSubtotal = "..."
FixedRateShipping.includeTaxes = "..."
FixedRateShipping.store = "..."
FixedRateShipping.cost = "..."
FixedRateShipping.costType = "..."

fixedRateShipping.update()
curl -X PUT http://api.tradenity.com/v1/fixedRateShippings \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "slug=..." \
  -d "message=..." \
  -d "description=..." \
  -d "geoZone=..." \
  -d "customerGroups=..." \
  -d "status=..." \
  -d "useDiscountedSubtotal=..." \
  -d "includeTaxes=..." \
  -d "store=..." \
  -d "cost=..." \
  -d "costType=..." \
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$fixedRateShipping = FixedRateShipping->find_by_id($id)
$fixedRateShipping.setName("...");
$fixedRateShipping.setSlug("...");
$fixedRateShipping.setMessage("...");
$fixedRateShipping.setDescription("...");
$fixedRateShipping.setGeoZone("...");
$fixedRateShipping.setCustomerGroups("...");
$fixedRateShipping.setStatus("...");
$fixedRateShipping.setUseDiscountedSubtotal("...");
$fixedRateShipping.setIncludeTaxes("...");
$fixedRateShipping.setStore("...");
$fixedRateShipping.setCost("...");
$fixedRateShipping.setCostType("...");

$fixedRateShipping->update();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "slug": "...",
    "message": "...",
    "description": "...",
    "geoZone": "...",
    "customerGroups": "...",
    "status": "...",
    "useDiscountedSubtotal": "...",
    "includeTaxes": "...",
    "store": "...",
    "cost": "...",
    "costType": "..."
  }

This endpoint updates instance of fixedRateShipping using the specified parameters.

HTTP Request

PUT http://api.tradenity.com/v1/fixedRateShippings/<ID>

URL Parameters

Parameter Description
ID The ID of the fixedRateShipping to update

Delete a Specific FixedRateShipping

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
boolean result = FixedRateShippingService.delete(id);

require 'tradenity'

result = FixedRateShipping.delete_by_id(id)
from tradenity.resources import FixedRateShipping

fixedRateShipping_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
result = FixedRateShipping.delete_by_id(fixedRateShipping_id)
curl DELETE "http://api.tradenity.com/v1/fixedRateShippings/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

result = FixedRateShipping->delete_by_id($id)

The above command returns no JSON document, just a success or failure status (HTTP status code or language specific boolean true or false) :

This endpoint delete a specific fixedRateShipping.

HTTP Request

DELETE http://api.tradenity.com/v1/fixedRateShippings/<ID>

URL Parameters

Parameter Description
ID The ID of the fixedRateShipping to delete

TableRateShippings

TableRateShipping attributes

Parameter Type Required Read only Default Description
name String Yes False n/a Name of the TableRateShipping
slug String Yes False n/a Slug of the TableRateShipping
message String No False n/a Message of the TableRateShipping
description String No False n/a Description of the TableRateShipping
status String Yes False n/a Status of the TableRateShipping
useDiscountedSubtotal Boolean No False n/a UseDiscountedSubtotal of the TableRateShipping
includeTaxes Boolean No False n/a IncludeTaxes of the TableRateShipping
costType String Yes False n/a CostType of the TableRateShipping
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.
geoZone GeoZone Yes No n/a GeoZone of the TableRateShipping
customerGroups List of customerGroups NO No n/a CustomerGroups of the TableRateShipping

Get All TableRateShippings

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<TableRateShipping> tableRateShippings = TableRateShippingService.findAll();

require 'tradenity'

tableRateShippings = TableRateShipping.find_all

from tradenity.resources import TableRateShipping

tableRateShippings = TableRateShipping.find_all()
curl -X GET http://api.tradenity.com/v1/tableRateShippings \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$tableRateShippings = TableRateShipping->find_all()

The above command returns JSON structured like this:

{
    "tableRateShippings": [{
        "name": "...",
        "slug": "...",
        "message": "...",
        "description": "...",
        "geoZone": "...",
        "customerGroups": "...",
        "status": "...",
        "useDiscountedSubtotal": "...",
        "includeTaxes": "...",
        "store": "...",
        "costType": "...",
        "ranges": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all tableRateShippings.

HTTP Request

GET http://api.tradenity.com/v1/tableRateShippings

Find a Specific TableRateShipping by ID

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
TableRateShipping tableRateShipping = TableRateShippingService.findById(id);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
tableRateShipping = TableRateShipping.find_by_id(id)
from tradenity.resources import TableRateShipping

tableRateShipping_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
tableRateShipping = TableRateShipping.find_by_id(tableRateShipping_id)
curl GET "http://api.tradenity.com/v1/tableRateShippings/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$tableRateShipping = TableRateShipping->find_by_id($id)

The above command returns JSON structured like this:

{
  "__meta" : {
    "href" : "http://localhost:8080/api/v1/addresses/address_001"
  },
  "id": "...",
  "name": "...",
  "slug": "...",
  "message": "...",
  "description": "...",
  "geoZone": "...",
  "customerGroups": "...",
  "status": "...",
  "useDiscountedSubtotal": "...",
  "includeTaxes": "...",
  "store": "...",
  "costType": "...",
  "ranges": "..."
}

This endpoint retrieves a specific tableRateShipping.

HTTP Request

GET http://api.tradenity.com/v1/tableRateShippings/<ID>

URL Parameters

Parameter Description
ID The ID of the tableRateShipping to retrieve

Create new TableRateShipping

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

TableRateShipping tableRateShipping = new TableRateShipping();
tableRateShipping.setName("...");
tableRateShipping.setSlug("...");
tableRateShipping.setMessage("...");
tableRateShipping.setDescription("...");
tableRateShipping.setGeoZone("...");
tableRateShipping.setCustomerGroups("...");
tableRateShipping.setStatus("...");
tableRateShipping.setUseDiscountedSubtotal("...");
tableRateShipping.setIncludeTaxes("...");
tableRateShipping.setStore("...");
tableRateShipping.setCostType("...");
tableRateShipping.setRanges("...");

TableRateShipping tableRateShipping = TableRateShippingService.create(tableRateShipping);

require 'tradenity'

tableRateShipping = TableRateShipping.new(name: "...", slug: "...", message: "...", description: "...", geoZone: "...", customerGroups: "...", status: "...", useDiscountedSubtotal: "...", includeTaxes: "...", store: "...", costType: "...", ranges: "...")

tableRateShipping.create

from tradenity.resources import TableRateShipping

tableRateShipping = TableRateShipping(name="...", slug="...", message="...", description="...", geoZone="...", customerGroups="...", status="...", useDiscountedSubtotal="...", includeTaxes="...", store="...", costType="...", ranges="...")

tableRateShipping.create()
curl -X POST http://api.tradenity.com/v1/tableRateShippings \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "slug=..." \
  -d "message=..." \
  -d "description=..." \
  -d "geoZone=..." \
  -d "customerGroups=..." \
  -d "status=..." \
  -d "useDiscountedSubtotal=..." \
  -d "includeTaxes=..." \
  -d "store=..." \
  -d "costType=..." \
  -d "ranges=..." \
require 'tradenity'

$tableRateShipping = new TableRateShipping()
$tableRateShipping->setName("...");
$tableRateShipping->setSlug("...");
$tableRateShipping->setMessage("...");
$tableRateShipping->setDescription("...");
$tableRateShipping->setGeoZone("...");
$tableRateShipping->setCustomerGroups("...");
$tableRateShipping->setStatus("...");
$tableRateShipping->setUseDiscountedSubtotal("...");
$tableRateShipping->setIncludeTaxes("...");
$tableRateShipping->setStore("...");
$tableRateShipping->setCostType("...");
$tableRateShipping->setRanges("...");

$tableRateShipping->create();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "slug": "...",
    "message": "...",
    "description": "...",
    "geoZone": "...",
    "customerGroups": "...",
    "status": "...",
    "useDiscountedSubtotal": "...",
    "includeTaxes": "...",
    "store": "...",
    "costType": "...",
    "ranges": "..."
  }

This endpoint create a new tableRateShipping using the specified parameters.

HTTP Request

POST http://api.tradenity.com/v1/tableRateShippings

Updating TableRateShipping

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
TableRateShipping tableRateShipping = TableRateShippingService.findById(id);
tableRateShipping.setName("...");
tableRateShipping.setSlug("...");
tableRateShipping.setMessage("...");
tableRateShipping.setDescription("...");
tableRateShipping.setGeoZone("...");
tableRateShipping.setCustomerGroups("...");
tableRateShipping.setStatus("...");
tableRateShipping.setUseDiscountedSubtotal("...");
tableRateShipping.setIncludeTaxes("...");
tableRateShipping.setStore("...");
tableRateShipping.setCostType("...");
tableRateShipping.setRanges("...");

TableRateShipping tableRateShipping = TableRateShippingService.update(tableRateShipping);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
tableRateShipping = TableRateShipping.find_by_id(id)
TableRateShipping.name = "..."
TableRateShipping.slug = "..."
TableRateShipping.message = "..."
TableRateShipping.description = "..."
TableRateShipping.geoZone = "..."
TableRateShipping.customerGroups = "..."
TableRateShipping.status = "..."
TableRateShipping.useDiscountedSubtotal = "..."
TableRateShipping.includeTaxes = "..."
TableRateShipping.store = "..."
TableRateShipping.costType = "..."
TableRateShipping.ranges = "..."

tableRateShipping.update()

from tradenity.resources import TableRateShipping

tableRateShipping_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
tableRateShipping = TableRateShipping.find_by_id(tableRateShipping_id)
TableRateShipping.name = "..."
TableRateShipping.slug = "..."
TableRateShipping.message = "..."
TableRateShipping.description = "..."
TableRateShipping.geoZone = "..."
TableRateShipping.customerGroups = "..."
TableRateShipping.status = "..."
TableRateShipping.useDiscountedSubtotal = "..."
TableRateShipping.includeTaxes = "..."
TableRateShipping.store = "..."
TableRateShipping.costType = "..."
TableRateShipping.ranges = "..."

tableRateShipping.update()
curl -X PUT http://api.tradenity.com/v1/tableRateShippings \
  -H "Authorization: basicauthkey \
  -d "name=..." \
  -d "slug=..." \
  -d "message=..." \
  -d "description=..." \
  -d "geoZone=..." \
  -d "customerGroups=..." \
  -d "status=..." \
  -d "useDiscountedSubtotal=..." \
  -d "includeTaxes=..." \
  -d "store=..." \
  -d "costType=..." \
  -d "ranges=..." \
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$tableRateShipping = TableRateShipping->find_by_id($id)
$tableRateShipping.setName("...");
$tableRateShipping.setSlug("...");
$tableRateShipping.setMessage("...");
$tableRateShipping.setDescription("...");
$tableRateShipping.setGeoZone("...");
$tableRateShipping.setCustomerGroups("...");
$tableRateShipping.setStatus("...");
$tableRateShipping.setUseDiscountedSubtotal("...");
$tableRateShipping.setIncludeTaxes("...");
$tableRateShipping.setStore("...");
$tableRateShipping.setCostType("...");
$tableRateShipping.setRanges("...");

$tableRateShipping->update();

The above command returns JSON structured like this:

  {
    "id": "...",
    "name": "...",
    "slug": "...",
    "message": "...",
    "description": "...",
    "geoZone": "...",
    "customerGroups": "...",
    "status": "...",
    "useDiscountedSubtotal": "...",
    "includeTaxes": "...",
    "store": "...",
    "costType": "...",
    "ranges": "..."
  }

This endpoint updates instance of tableRateShipping using the specified parameters.

HTTP Request

PUT http://api.tradenity.com/v1/tableRateShippings/<ID>

URL Parameters

Parameter Description
ID The ID of the tableRateShipping to update

Delete a Specific TableRateShipping

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
boolean result = TableRateShippingService.delete(id);

require 'tradenity'

result = TableRateShipping.delete_by_id(id)
from tradenity.resources import TableRateShipping

tableRateShipping_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
result = TableRateShipping.delete_by_id(tableRateShipping_id)
curl DELETE "http://api.tradenity.com/v1/tableRateShippings/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

result = TableRateShipping->delete_by_id($id)

The above command returns no JSON document, just a success or failure status (HTTP status code or language specific boolean true or false) :

This endpoint delete a specific tableRateShipping.

HTTP Request

DELETE http://api.tradenity.com/v1/tableRateShippings/<ID>

URL Parameters

Parameter Description
ID The ID of the tableRateShipping to delete

TableRateRules

TableRateRule attributes

Parameter Type Required Read only Default Description
minimum Integer Yes False n/a Minimum of the TableRateRule
maximum Integer Yes False n/a Maximum of the TableRateRule
cost Integer Yes False n/a Cost of the TableRateRule
unit String Yes False n/a Unit of the TableRateRule
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.
tableRateShipping TableRateShipping Yes No n/a TableRateShipping of the TableRateRule

Get All TableRateRules

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<TableRateRule> tableRateRules = TableRateRuleService.findAll();

require 'tradenity'

tableRateRules = TableRateRule.find_all

from tradenity.resources import TableRateRule

tableRateRules = TableRateRule.find_all()
curl -X GET http://api.tradenity.com/v1/tableRateRules \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$tableRateRules = TableRateRule->find_all()

The above command returns JSON structured like this:

{
    "tableRateRules": [{
        "minimum": "...",
        "maximum": "...",
        "cost": "...",
        "unit": "...",
        "tableRateShipping": "...",
        "store": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all tableRateRules.

HTTP Request

GET http://api.tradenity.com/v1/tableRateRules

Find a Specific TableRateRule by ID

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
TableRateRule tableRateRule = TableRateRuleService.findById(id);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
tableRateRule = TableRateRule.find_by_id(id)
from tradenity.resources import TableRateRule

tableRateRule_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
tableRateRule = TableRateRule.find_by_id(tableRateRule_id)
curl GET "http://api.tradenity.com/v1/tableRateRules/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$tableRateRule = TableRateRule->find_by_id($id)

The above command returns JSON structured like this:

{
  "__meta" : {
    "href" : "http://localhost:8080/api/v1/addresses/address_001"
  },
  "id": "...",
  "minimum": "...",
  "maximum": "...",
  "cost": "...",
  "unit": "...",
  "tableRateShipping": "...",
  "store": "..."
}

This endpoint retrieves a specific tableRateRule.

HTTP Request

GET http://api.tradenity.com/v1/tableRateRules/<ID>

URL Parameters

Parameter Description
ID The ID of the tableRateRule to retrieve

Create new TableRateRule

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

TableRateRule tableRateRule = new TableRateRule();
tableRateRule.setMinimum("...");
tableRateRule.setMaximum("...");
tableRateRule.setCost("...");
tableRateRule.setUnit("...");
tableRateRule.setTableRateShipping("...");
tableRateRule.setStore("...");

TableRateRule tableRateRule = TableRateRuleService.create(tableRateRule);

require 'tradenity'

tableRateRule = TableRateRule.new(minimum: "...", maximum: "...", cost: "...", unit: "...", tableRateShipping: "...", store: "...")

tableRateRule.create

from tradenity.resources import TableRateRule

tableRateRule = TableRateRule(minimum="...", maximum="...", cost="...", unit="...", tableRateShipping="...", store="...")

tableRateRule.create()
curl -X POST http://api.tradenity.com/v1/tableRateRules \
  -H "Authorization: basicauthkey \
  -d "minimum=..." \
  -d "maximum=..." \
  -d "cost=..." \
  -d "unit=..." \
  -d "tableRateShipping=..." \
  -d "store=..." \
require 'tradenity'

$tableRateRule = new TableRateRule()
$tableRateRule->setMinimum("...");
$tableRateRule->setMaximum("...");
$tableRateRule->setCost("...");
$tableRateRule->setUnit("...");
$tableRateRule->setTableRateShipping("...");
$tableRateRule->setStore("...");

$tableRateRule->create();

The above command returns JSON structured like this:

  {
    "id": "...",
    "minimum": "...",
    "maximum": "...",
    "cost": "...",
    "unit": "...",
    "tableRateShipping": "...",
    "store": "..."
  }

This endpoint create a new tableRateRule using the specified parameters.

HTTP Request

POST http://api.tradenity.com/v1/tableRateRules

Updating TableRateRule

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
TableRateRule tableRateRule = TableRateRuleService.findById(id);
tableRateRule.setMinimum("...");
tableRateRule.setMaximum("...");
tableRateRule.setCost("...");
tableRateRule.setUnit("...");
tableRateRule.setTableRateShipping("...");
tableRateRule.setStore("...");

TableRateRule tableRateRule = TableRateRuleService.update(tableRateRule);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
tableRateRule = TableRateRule.find_by_id(id)
TableRateRule.minimum = "..."
TableRateRule.maximum = "..."
TableRateRule.cost = "..."
TableRateRule.unit = "..."
TableRateRule.tableRateShipping = "..."
TableRateRule.store = "..."

tableRateRule.update()

from tradenity.resources import TableRateRule

tableRateRule_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
tableRateRule = TableRateRule.find_by_id(tableRateRule_id)
TableRateRule.minimum = "..."
TableRateRule.maximum = "..."
TableRateRule.cost = "..."
TableRateRule.unit = "..."
TableRateRule.tableRateShipping = "..."
TableRateRule.store = "..."

tableRateRule.update()
curl -X PUT http://api.tradenity.com/v1/tableRateRules \
  -H "Authorization: basicauthkey \
  -d "minimum=..." \
  -d "maximum=..." \
  -d "cost=..." \
  -d "unit=..." \
  -d "tableRateShipping=..." \
  -d "store=..." \
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$tableRateRule = TableRateRule->find_by_id($id)
$tableRateRule.setMinimum("...");
$tableRateRule.setMaximum("...");
$tableRateRule.setCost("...");
$tableRateRule.setUnit("...");
$tableRateRule.setTableRateShipping("...");
$tableRateRule.setStore("...");

$tableRateRule->update();

The above command returns JSON structured like this:

  {
    "id": "...",
    "minimum": "...",
    "maximum": "...",
    "cost": "...",
    "unit": "...",
    "tableRateShipping": "...",
    "store": "..."
  }

This endpoint updates instance of tableRateRule using the specified parameters.

HTTP Request

PUT http://api.tradenity.com/v1/tableRateRules/<ID>

URL Parameters

Parameter Description
ID The ID of the tableRateRule to update

Delete a Specific TableRateRule

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
boolean result = TableRateRuleService.delete(id);

require 'tradenity'

result = TableRateRule.delete_by_id(id)
from tradenity.resources import TableRateRule

tableRateRule_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
result = TableRateRule.delete_by_id(tableRateRule_id)
curl DELETE "http://api.tradenity.com/v1/tableRateRules/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

result = TableRateRule->delete_by_id($id)

The above command returns no JSON document, just a success or failure status (HTTP status code or language specific boolean true or false) :

This endpoint delete a specific tableRateRule.

HTTP Request

DELETE http://api.tradenity.com/v1/tableRateRules/<ID>

URL Parameters

Parameter Description
ID The ID of the tableRateRule to delete

Orders

Order attributes

Parameter Type Required Read only Default Description
status String Yes False n/a Status of the Order
subtotal Integer Yes False n/a Subtotal of the Order
total Integer Yes False n/a Total of the Order
shippingCost Integer No False n/a ShippingCost of the Order
itemsTaxAmount Integer No False n/a ItemsTaxAmount of the Order
totalItemsDiscount Integer No False n/a TotalItemsDiscount of the Order
purchaseDay Date Yes False n/a PurchaseDay of the Order
purchasedAt Date Yes False n/a PurchasedAt of the Order
completedAt Date No False n/a CompletedAt of the Order
createdAt Date No (Autogenerated) Yes n/a Auto generated creation time.
updatedAt Date No (Autogenerated) Yes n/a Auto generated last updated time.
customer Customer Yes No n/a Customer of the Order
shippingAddress Address NO No n/a ShippingAddress of the Order
billingAddress Address Yes No n/a BillingAddress of the Order
currency Currency Yes No n/a Currency of the Order
shippingMethod ShippingMethod NO No n/a ShippingMethod of the Order
promotions List of promotions NO No n/a Promotions of the Order
coupons List of coupons NO No n/a Coupons of the Order

Get All Orders

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

List<Order> orders = OrderService.findAll();

require 'tradenity'

orders = Order.find_all

from tradenity.resources import Order

orders = Order.find_all()
curl -X GET http://api.tradenity.com/v1/orders \
  -H "Authorization: basicauthkey" \
require 'tradenity'

$orders = Order->find_all()

The above command returns JSON structured like this:

{
    "orders": [{
        "status": "...",
        "subtotal": "...",
        "total": "...",
        "shippingCost": "...",
        "itemsTaxAmount": "...",
        "totalItemsDiscount": "...",
        "purchaseDay": "...",
        "purchasedAt": "...",
        "completedAt": "...",
        "customer": "...",
        "shippingAddress": "...",
        "billingAddress": "...",
        "currency": "...",
        "shippingMethod": "...",
        "promotions": "...",
        "coupons": "...",
        "store": "...",
        "items": "...",
        "payments": "...",
        "transactions": "..."
      }, {
      ...
    }],
    "__meta": {
        "href" : "http://localhost:8080/api/v1/addresses",
        "totalPages" : 1,
        "totalElements" : 5,
        "number" : 0,
        "size" : 10,
        "numberOfElements" : 5
    }
}

This endpoint retrieves all orders.

HTTP Request

GET http://api.tradenity.com/v1/orders

Find a Specific Order by ID

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
Order order = OrderService.findById(id);

require 'tradenity'

id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
order = Order.find_by_id(id)
from tradenity.resources import Order

order_id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
order = Order.find_by_id(order_id)
curl GET "http://api.tradenity.com/v1/orders/bed8a032-96e4-4c0e-af5b-1f076d211fce"
  -H "Authorization: basicaouthencoded"
require 'tradenity'

$id = "bed8a032-96e4-4c0e-af5b-1f076d211fce"
$order = Order->find_by_id($id)

The above command returns JSON structured like this:

{
  "__meta" : {
    "href" : "http://localhost:8080/api/v1/addresses/address_001"
  },
  "id": "...",
  "status": "...",
  "subtotal": "...",
  "total": "...",
  "shippingCost": "...",
  "itemsTaxAmount": "...",
  "totalItemsDiscount": "...",
  "purchaseDay": "...",
  "purchasedAt": "...",
  "completedAt": "...",
  "customer": "...",
  "shippingAddress": "...",
  "billingAddress": "...",
  "currency": "...",
  "shippingMethod": "...",
  "promotions": "...",
  "coupons": "...",
  "store": "...",
  "items": "...",
  "payments": "...",
  "transactions": "..."
}

This endpoint retrieves a specific order.

HTTP Request

GET http://api.tradenity.com/v1/orders/<ID>

URL Parameters

Parameter Description
ID The ID of the order to retrieve

Create new Order

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

Order order = new Order();
order.setStatus("...");
order.setSubtotal("...");
order.setTotal("...");
order.setShippingCost("...");
order.setItemsTaxAmount("...");
order.setTotalItemsDiscount("...");
order.setPurchaseDay("...");
order.setPurchasedAt("...");
order.setCompletedAt("...");
order.setCustomer("...");
order.setShippingAddress("...");
order.setBillingAddress("...");
order.setCurrency("...");
order.setShippingMethod("...");
order.setPromotions("...");
order.setCoupons("...");
order.setStore("...");
order.setItems("...");
order.setPayments("...");
order.setTransactions("...");

Order order = OrderService.create(order);

require 'tradenity'

order = Order.new(status: "...", subtotal: "...", total: "...", shippingCost: "...", itemsTaxAmount: "...", totalItemsDiscount: "...", purchaseDay: "...", purchasedAt: "...", completedAt: "...", customer: "...", shippingAddress: "...", billingAddress: "...", currency: "...", shippingMethod: "...", promotions: "...", coupons: "...", store: "...", items: "...", payments: "...", transactions: "...")

order.create

from tradenity.resources import Order

order = Order(status="...", subtotal="...", total="...", shippingCost="...", itemsTaxAmount="...", totalItemsDiscount="...", purchaseDay="...", purchasedAt="...", completedAt="...", customer="...", shippingAddress="...", billingAddress="...", currency="...", shippingMethod="...", promotions="...", coupons="...", store="...", items="...", payments="...", transactions="...")

order.create()
curl -X POST http://api.tradenity.com/v1/orders \
  -H "Authorization: basicauthkey \
  -d "status=..." \
  -d "subtotal=..." \
  -d "total=..." \
  -d "shippingCost=..." \
  -d "itemsTaxAmount=..." \
  -d "totalItemsDiscount=..." \
  -d "purchaseDay=..." \
  -d "purchasedAt=..." \
  -d "completedAt=..." \
  -d "customer=..." \
  -d "shippingAddress=..." \
  -d "billingAddress=..." \
  -d "currency=..." \
  -d "shippingMethod=..." \
  -d "promotions=..." \
  -d "coupons=..." \
  -d "store=..." \
  -d "items=..." \
  -d "payments=..." \
  -d "transactions=..." \
require 'tradenity'

$order = new Order()
$order->setStatus("...");
$order->setSubtotal("...");
$order->setTotal("...");
$order->setShippingCost("...");
$order->setItemsTaxAmount("...");
$order->setTotalItemsDiscount("...");
$order->setPurchaseDay("...");
$order->setPurchasedAt("...");
$order->setCompletedAt("...");
$order->setCustomer("...");
$order->setShippingAddress("...");
$order->setBillingAddress("...");
$order->setCurrency("...");
$order->setShippingMethod("...");
$order->setPromotions("...");
$order->setCoupons("...");
$order->setStore("...");
$order->setItems("...");
$order->setPayments("...");
$order->setTransactions("...");

$order->create();

The above command returns JSON structured like this:

  {
    "id": "...",
    "status": "...",
    "subtotal": "...",
    "total": "...",
    "shippingCost": "...",
    "itemsTaxAmount": "...",
    "totalItemsDiscount": "...",
    "purchaseDay": "...",
    "purchasedAt": "...",
    "completedAt": "...",
    "customer": "...",
    "shippingAddress": "...",
    "billingAddress": "...",
    "currency": "...",
    "shippingMethod": "...",
    "promotions": "...",
    "coupons": "...",
    "store": "...",
    "items": "...",
    "payments": "...",
    "transactions": "..."
  }

This endpoint create a new order using the specified parameters.

HTTP Request

POST http://api.tradenity.com/v1/orders

Updating Order

import com.tradenity.sdk.model.*;
import com.tradenity.sdk.services.*;

String id = "bed8a032-96e4-4c0e-af5b-1f076d211fce";
Order order = OrderService.findById(id);
order.setStatus("...");
order.setSubtotal("...");
order.setTotal("...");
order.setShippingCost("...");
order.setItemsTaxAmount("...");
order.setTotalItemsDiscount("...");
order.setPurchaseDay("...");
order.setPurchasedAt("...");
order.setCompletedAt("...");
order.setCustomer("...");
order.setShippingAddress("...");
order.setBillingAddress("...");
order.setCurrency("...");
order.setShippingMethod("...");
order.setPromotions("...");
order.setCoupons("...");
order.setStore("...");
order.setItems("...");
order.setPayments("...");
order.setTransactions("...");

Order order = OrderService.update(order);

requir