Vendor

Contain data reffered to vendor.


Receive a list of all Vendors

Query parameters:
  • fields - list of fields returning in response
  • limit - number of returned vendors (default: 50)
  • page - currently displayed page (default: 1)
  • since_id - restrict vendors to greater identifiers than specified id
  • product_id - filter with product id
  • created_at_min - shows vendors, which creation date was later than specified (format: 2011-06-19 13:18:50)
  • created_at_max - shows vendors, which creation date was earlier than specified (format: 2011-06-19 13:18:50)
  • updated_at_min - shows vendors, which modification date was later than specified (format: 2011-06-19 13:18:50)
  • updated_at_max - shows vendors, which modification date was earlier than specified (format: 2011-06-19 13:18:50)
GET /services/vendors

Returns all vendors

HTTP/1.1 200 OK
{
	"vendors": [
		{
			"id" : "1",
			"uuid" : "66312e54-1908-434e-b0b3-9ca95e02ba09",
			"url" : "nike",
			"description" : "",
			"logo" : "",
			"created_at" : "2011-09-22 01:27:09",
			"updated_at" : "2011-09-22 01:27:09",
			"title" : "Nike",
			"metadata" : [ 
				{
					"meta_title" : "",
					"meta_description" : "",
					"meta_keywords" : "",
				},
			],
		},
		{
			"id" : "2",
			"uuid" : "224c8d78-8afc-44cc-a370-9ce2b6d71c7b",
			"url" : "adidas",
			"description" : "",
			"logo" : "",
			"created_at" : "2011-09-22 01:27:15",
			"updated_at" : "2011-09-22 01:27:15",
			"title" : "Adidas",
			"metadata" : [ 
				{
					"meta_title" : "",
					"meta_description" : "",
					"meta_keywords" : "",
				},
			],
		},
	]
}

Receive a count of all Vendors

Query parameters:
  • since_id - restrict vendors to greater identifiers than specified id
  • product_id - filter with product id
  • created_at_min - counts vendors, which creation date was later than specified (format: 2011-06-19 13:18:50)
  • created_at_max - counts vendors, which creation date was earlier than specified (format: 2011-06-19 13:18:50)
  • updated_at_min - counts vendors, which modification date was later than specified (format: 2011-06-19 13:18:50)
  • updated_at_max - counts vendors, which modification date was earlier than specified (format: 2011-06-19 13:18:50)
GET /services/vendors/count

Receive a count of all Vendors

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

Receive a single Vendor

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

Receive a single Vendor

Response
HTTP/1.1 200 OK
{
	"vendor": {
		"id" : "2",
		"uuid" : "ddb33c94-1e42-4b56-86eb-fa27f9397831",
		"url" : "adidas",
		"description" : "",
		"logo" : "",
		"created_at" : "2011-09-22 01:27:15",
		"updated_at" : "2011-09-22 01:27:15",
		"title" : "Adidas",
		"metadata" : [ 
			{
				"meta_title" : "",
				"meta_description" : "",
				"meta_keywords" : "",
			},
		],
	},
}

Create a Vendor

POST services/vendors

Create vendor with specified parameters

Request
{
	"vendor": {
		"title" : "BluCase",
		"description" : "",
		"metadata" : [ 
			{
				"meta_title" : "",
				"meta_description" : "",
				"meta_keywords" : "",
			},
		],
	},
}
Response
HTTP/1.1 200 OK
{
	"vendor": {
		"id" : "251",
		"uuid" : "6f5a88c5-674c-4d5a-8057-9a49c357395a",
		"url" : "blucase",
		"description" : "",
		"logo" : "",
		"created_at" : "2011-09-22 09:27:15",
		"updated_at" : "2011-09-22 09:27:15",
		"title" : "BluCase",
		"metadata" : [ 
			{
				"meta_title" : "",
				"meta_description" : "",
				"meta_keywords" : "",
			},
		],
	},
}

Update an existing Vendor

PUT services/vendors/{id}

You can update a title, url, description and meta data.

Request
{
	"vendor": {
		"title" : "Blue Case",
	},
}
Response
HTTP/1.1 200 OK
{
	"vendor": {
		"id" : "251",
		"uuid" : "8f765ddc-da5a-4cbc-bf51-10070215a86f",
		"url" : "blue-case",
		"description" : "",
		"logo" : "",
		"created_at" : "2011-09-22 09:27:15",
		"updated_at" : "2011-09-22 10:27:15",
		"title" : "Blue Case",
		"metadata" : [ 
			{
				"meta_title" : "",
				"meta_description" : "",
				"meta_keywords" : "",
			},
		],
	},
}

Delete an existing Vendor

DELETE services/vendors/{id}

Delete an existing vendor from a shop

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