Shipping

Contain data reffered to shipping.


Receive a list of all Shipping

Query parameters:
  • fields - list of fields returning in response
  • limit - number of returned shipping (default: 50)
  • page - currently displayed page (default: 1)
  • since_id - restrict shipping to greater identifiers than specified id
  • is_active - filter with shipping depending on it's activity
  • price - filter with shipping price greater or equal than specified
  • weight - filter with weight greater or equal than specified
  • created_at_min - shows shipping, which creation date was later than specified (format: 2011-06-19 13:18:50)
  • created_at_max - shows shipping, which creation date was earlier than specified (format: 2011-06-19 13:18:50)
  • updated_at_min - shows shipping, which modification date was later than specified (format: 2011-06-19 13:18:50)
  • updated_at_max - shows shipping, which modification date was earlier than specified (format: 2011-06-19 13:18:50)
GET /services/shipping

Returns all shipping

HTTP/1.1 200 OK
{
	"shipping": [
		{
			"id" : "109",
			"uuid" : "c5fbd531-d9ca-44b5-9200-9a40057eaa4b",
			"title" : "Kurier DHL",
			"is_active" : "1",
			"charge_type" : "2",
			"charge_from" : "0",
			"charge_to" : "20000",
			"delivery_price" : "3600",
			"created_at" : "2012-06-04 10:12:25",
			"updated_at" : "2012-06-04 10:12:25",
		},
		{
			"id" : "115",
			"uuid" : "75ac445b-c4f8-4863-a3d9-90b9df835512",
			"title" : "Kurier UPS",
			"is_active" : "1",
			"charge_type" : "2",
			"charge_from" : "0",
			"charge_to" : "20000",
			"delivery_price" : "3425",
			"created_at" : "2012-06-04 10:12:25",
			"updated_at" : "2012-06-04 10:12:25",
		},
	],
}

Receive a count of all Shippings

Query parameters:
  • since_id - restrict shipping to greater identifiers than specified id
  • is_active - filter with shipping depending on it's activity
  • price - filter with shipping price greater or equal than specified
  • weight - filter with weight greater or equal than specified
  • created_at_min - shows shipping, which creation date was later than specified (format: 2011-06-19 13:18:50)
  • created_at_max - shows shipping, which creation date was earlier than specified (format: 2011-06-19 13:18:50)
  • updated_at_min - shows shipping, which modification date was later than specified (format: 2011-06-19 13:18:50)
  • updated_at_max - shows shipping, which modification date was earlier than specified (format: 2011-06-19 13:18:50)
GET /services/shipping/count

Receive a count of all Shippings

HTTP/1.1 200 OK
{
    "count": 250
}

Receive a single Shipping

Query parameters:
  • fields - list of fields returning in response
GET services/shipping/{id}

Receive a single Shipping

Response
HTTP/1.1 200 OK
{
	"shipping": {
		"id" : "109",
		"uuid" : "c5fbd531-d9ca-44b5-9200-9a40057eaa4b",
		"title" : "Kurier DHL",
		"is_active" : "1",
		"charge_type" : "2",
		"charge_from" : "0",
		"charge_to" : "20000",
		"delivery_price" : "3600",
		"created_at" : "2012-06-04 10:12:25",
		"updated_at" : "2012-06-04 10:12:25",
	},
}

Create a Shipping

Parameters:
  • title - Title of shipping
  • is_active - Field describes if shipping is active or not
  • charge_type - Charge type of shipping
    • 1 - FLAT_RATE - Fixed price
    • 2 - WEIGHT - Price is based on items weight
    • 3 - ORDER_PRICE - Price is based on items value
  • charge_from - Depends on charge_type
    • 1 - Not used
    • 2 - Weight from
    • 3 - Order total from
  • charge_to - Depends on charge_type
    • 1 - Not used
    • 2 - Weight to
    • 3 - Order total to
  • delivery_price - Price of shipping
POST services/shipping

Create shipping with specified parameters

Request
{
        "shipping": {
            "title" : "Kurier DHL",
            "is_active" : "1",
            "charge_type" : "2",
            "charge_from" : "0",
            "charge_to" : "20000",
            "delivery_price" : "3600",
        },
}
Response
HTTP/1.1 200 OK
{
    "shipping": {
        "id" : "109",
		"uuid" : "c5fbd531-d9ca-44b5-9200-9a40057eaa4b",
        "title" : "Kurier DHL",
        "is_active" : "1",
        "charge_type" : "2",
        "charge_from" : "0",
        "charge_to" : "20000",
        "delivery_price" : "3600",
        "created_at" : "2012-06-04 10:12:25",
        "updated_at" : "2012-06-04 10:12:25",
    },
}

Update an existing Shipping

Parameters:
  • title - Title of shipping
  • is_active - Field describes if shipping is active or not
  • charge_type - Charge type of shipping
    • 1 - FLAT_RATE - Fixed price
    • 2 - WEIGHT - Price is based on items weight
    • 3 - ORDER_PRICE - Price is based on items value
  • charge_from - Depends on charge_type
    • 1 - Not used
    • 2 - Weight from
    • 3 - Order total from
  • charge_to - Depends on charge_type
    • 1 - Not used
    • 2 - Weight to
    • 3 - Order total to
  • delivery_price - Price of shipping
PUT services/shipping/{id}

You can update data of a given shipping

Request
{
    "shipping": {
        "title" : "Kurier DHL",
        "is_active" : "1",
        "charge_type" : "2",
        "charge_from" : "0",
        "charge_to" : "20000",
        "delivery_price" : "3600",
    },
}
Response
HTTP/1.1 200 OK
{
    "id"	: 5,
}

Delete an existing Shipping

DELETE services/shipping/{id}

Delete an existing shipping from a shop

Response
HTTP/1.1 200 OK
{
    "status"	: "ok",
}