{
	"info": {
		"_postman_id": "1ac8df1f-3dff-4e4f-a203-8e63dcff88a6",
		"name": "Marketplacer API v2",
		"description": "This describes the resources that make up the official Marketplacer API V2. This API is used by sellers to manage products and orders on a site powered by Marketplacer",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "Adverts",
			"item": [
				{
					"name": "List adverts",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"value": "{{api_key}}",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v2/client/adverts",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"adverts"
							]
						},
						"description": "This endpoint will return a paginated collection of your adverts, as well as their associated brands and taxons."
					},
					"response": []
				},
				{
					"name": "Get a single advert",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"value": "{{api_key}}",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v2/client/adverts/100000000",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"adverts",
								"100000000"
							]
						},
						"description": "This endpoint will return a single advert as well as its associated brands and taxons."
					},
					"response": []
				},
				{
					"name": "Deleting an advert",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v2/client/adverts/100000000",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"adverts",
								"100000000"
							]
						},
						"description": "Use this endpoint to delete an advert."
					},
					"response": []
				},
				{
					"name": "Create an advert with slugs",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"value": "{{api_key}}",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/vnd.api+json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"data\": {\n    \"type\": \"adverts\",\n    \"attributes\": {\n      \"title\": \"Giant Cypress DX\",\n      \"description\": \"Smooth-rolling 700c wheels give Cypress...\",\n      \"price\": 529,\n      \"sale_price\": 399,\n      \"domestic_shipping_cost\": 9.95,\n      \"international_shipping_cost\": 39.95,\n      \"condition\": \"new\",\n      \"brand_slug\": \"giant\",\n      \"taxon_slug\": \"hybrid-bikes\",\n      \"published\": true,\n      \"external_id\": \"ABC1234\",\n      \"code\": \"\",\n      \"notes\": \"\",\n      \"shipping_parcel_attributes\": {\n        \"weight\": 5.3,\n        \"width\": 8.3,\n        \"length\": 8.2,\n        \"depth\": 2.9,\n        \"mass_unit\": \"g\",\n        \"distance_unit\": \"cm\"\n      },\n      \"features\": {\n        \"product_features\": [\n          \"7 gears\",\n          \"Ready to use\"\n        ]\n      }\n    },\n    \"relationships\": {\n      \"advert_option_values\": [\n        {\n          \"type\": \"advert_option_values\",\n          \"option_value_id\": 214\n        },\n        {\n          \"type\": \"advert_option_values\",\n          \"option_value_id\": 215\n        },\n        {\n          \"type\": \"advert_option_values\",\n          \"option_type_id\": 214,\n          \"text_value\": \"Crisp as an autumn morning\"\n        }\n      ],\n      \"secondary_taxons\": [\n        {\n          \"type\": \"taxons\",\n          \"slug\": \"tricycles\"\n        }\n      ]\n    }\n  }\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v2/client/adverts",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"adverts"
							]
						},
						"description": "Creating an advert is a multi-step process\n\nSelect the appropriate taxon & brand with the API only.\n\n    Find the appropriate taxon and brand slugs by using the Taxon API and Brand API.\n    Submit the advert to /api/v2/client/adverts as below, using the taxon_slug and brand_slug attributes.\n"
					},
					"response": []
				},
				{
					"name": "Update an advert",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							},
							{
								"key": "Content-Type",
								"type": "text",
								"value": "application/vnd.api+json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"data\": {\n    \"attributes\": {\n      \"title\": \"Giant Cypress DX 2014\",\n      \"features\": {\n        \"product_features\": [\n          \"Feature 1\",\n          \"Feature 2\"\n        ]\n      }\n    },\n    \"relationships\": {\n      \"advert_option_values\": []\n    }\n  }\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v2/client/adverts/100000000",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"adverts",
								"100000000"
							]
						},
						"description": "Use this endpoint to update any attributes for an advert.\n\nTo clear all advert_option_values or secondary_taxons, assign an empty array. Not supplying the key for advert_option_values or secondary_taxons will leave the relevant relationship unchanged.\n\nA request with the key below will remove all advert_option_values from the advert and leave secondary_taxons unchanged:\n\n{\n  \"relationships\": {\n    \"advert_option_values\": [\n\n    ]\n  }\n}\n\nA request with the key below will remove all secondary_taxons from the advert and leave advert_option_values unchanged:\n\n{\n  \"relationships\": {\n    \"secondary_taxons\": [\n\n    ]\n  }\n}\n\nA request with the field below won’t change either relationship.\n\n{\n  \"relationships\": {\n  }\n}"
					},
					"response": []
				},
				{
					"name": "Resubmit an advert for vetting",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v2/client/adverts/100000000/resubmit_for_vetting",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"adverts",
								"100000000",
								"resubmit_for_vetting"
							]
						},
						"description": "Use this endpoint to resubmit a rejected advert for vetting."
					},
					"response": []
				},
				{
					"name": "Create an advert with mapping",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							},
							{
								"key": "Content-Type",
								"type": "text",
								"value": "application/vnd.api+json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"data\": {\n    \"type\": \"adverts\",\n    \"attributes\": {\n      \"title\": \"Giant Cypress DX\",\n      \"description\": \"Smooth-rolling 700c wheels give Cypress...\",\n      \"price\": 529,\n      \"sale_price\": 399,\n      \"domestic_shipping_cost\": 9.95,\n      \"international_shipping_cost\": 39.95,\n      \"condition\": \"new\",\n      \"map_brand\": [\n        \"Bikes - Hybrid Bikes\",\n        \"Bikes - Giant Bikes\"\n      ],\n      \"map_taxon\": [\n        \"Bikes - Hybrid Bikes\",\n        \"Bikes - Giant Bikes\"\n      ],\n      \"published\": false,\n      \"publish_streams\": [\n        \"m_store\"\n      ],\n      \"external_id\": \"ABC1234\",\n      \"code\": \"\",\n      \"notes\": \"\"\n    }\n  }\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v2/client/adverts",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"adverts"
							]
						},
						"description": "Creating an advert is a multi-step process\n\nSelect the appropriate taxon & brand using the client admin in Marketplacer.\n\n    Submit the advert to /api/v2/client/adverts as below, using the map_taxon and map_brand attributes.\n    In the Marketplacer client admin /client/mappings, relate these values to the corresponding Marketplacer taxon and brand.\n"
					},
					"response": []
				}
			],
			"description": "Adverts in Marketplacer represent an item, such as a bike or a chair. An advert has one or more variants which represent the different ways an advert varies. For instance, a bike may come in Black or White colours, which would mean the advert would have two variants: a White variant and a Black variant.",
			"protocolProfileBehavior": {}
		},
		{
			"name": "Brands",
			"item": [
				{
					"name": "Listing brands",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v2/brands",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"brands"
							]
						},
						"description": "This endpoint returns all brands."
					},
					"response": []
				},
				{
					"name": "Search for brands",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v2/brands/search?name=Giant",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"brands",
								"search"
							],
							"query": [
								{
									"key": "name",
									"value": "Giant"
								}
							]
						},
						"description": "This endpoint allows you to search for a brand by its name or by a substring of its name."
					},
					"response": []
				}
			],
			"protocolProfileBehavior": {}
		},
		{
			"name": "Images",
			"item": [
				{
					"name": "Listing an advert’s images",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v2/client/adverts/100000013/images",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"adverts",
								"100000013",
								"images"
							]
						},
						"description": "Images are displayed prominently on an advert’s page. An advert can have up to 20 images."
					},
					"response": []
				},
				{
					"name": "Showing a single image",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v2/client/adverts/100000013/images/1",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"adverts",
								"100000013",
								"images",
								"1"
							]
						},
						"description": "This endpoint allows you to request an image at a specific position within the advert’s list of images. The example request here shows how to get the first image. Numbers up to 20 are supported."
					},
					"response": []
				},
				{
					"name": "Adding an image",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							},
							{
								"key": "Content-Type",
								"value": "multipart/form-data",
								"type": "text"
							}
						],
						"body": {
							"mode": "formdata",
							"formdata": [
								{
									"key": "image_url",
									"value": "http://api.marketplacer.com/images/logo.png",
									"type": "text"
								}
							]
						},
						"url": {
							"raw": "{{base_url}}/api/v2/client/adverts/100000013/images",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"adverts",
								"100000013",
								"images"
							]
						},
						"description": "This endpoint allows you to add up to 20 images to an advert. For image uploads you may need to set the Content-Type to be ‘multipart/form-data’."
					},
					"response": []
				},
				{
					"name": "Updating an image",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							},
							{
								"key": "Content-Type",
								"value": "multipart/form-data",
								"type": "text"
							}
						],
						"body": {
							"mode": "formdata",
							"formdata": [
								{
									"key": "image_url",
									"value": "http://api.marketplacer.com/images/logo.png",
									"type": "text"
								}
							]
						},
						"url": {
							"raw": "{{base_url}}/api/v2/client/adverts/100000013/images/3?image_url=http://api.marketplacer.com/images/getting_started/api-access-page.png",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"adverts",
								"100000013",
								"images",
								"3"
							],
							"query": [
								{
									"key": "image_url",
									"value": "http://api.marketplacer.com/images/getting_started/api-access-page.png"
								}
							]
						},
						"description": "To update an image, you must first know its position within the list of images returned from the listing images endpoint."
					},
					"response": []
				},
				{
					"name": "Deleting an image",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v2/client/adverts/100000013/images/3",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"adverts",
								"100000013",
								"images",
								"3"
							]
						},
						"description": "To delete an image, you must first know its position within the list of images returned from the listing images endpoint."
					},
					"response": []
				},
				{
					"name": "Listing a variant's images",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v2/client/variants/59/images",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"variants",
								"59",
								"images"
							]
						},
						"description": " Images can also be assigned to individual advert variants"
					},
					"response": []
				}
			],
			"protocolProfileBehavior": {}
		},
		{
			"name": "Documents",
			"item": [
				{
					"name": "Listing an advert’s documents",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v2/client/adverts/100000013/documents",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"adverts",
								"100000013",
								"documents"
							]
						},
						"description": "Documents are displayed on an advert’s page. An advert can have up to 20 documents."
					},
					"response": []
				},
				{
					"name": "Showing a single document",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v2/client/adverts/100000013/documents/1",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"adverts",
								"100000013",
								"documents",
								"1"
							]
						},
						"description": "This endpoint allows you to request a document at a specific position within the adverts list of documents. The example request here shows how to get the first document for an advert. Numbers up to 20 are supported."
					},
					"response": []
				},
				{
					"name": "Adding a document",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							},
							{
								"key": "Content-Type",
								"type": "text",
								"value": "multipart/form-data"
							}
						],
						"body": {
							"mode": "formdata",
							"formdata": [
								{
									"key": "document_url",
									"value": "http://api.marketplacer.com/documents/sample.pdf",
									"type": "text"
								}
							]
						},
						"url": {
							"raw": "{{base_url}}/api/v2/client/adverts/100000013/documents",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"adverts",
								"100000013",
								"documents"
							]
						},
						"description": "This endpoint allows you to add up to 20 documents to an advert. For document uploads you may need to set the Content-Type to be ‘multipart/form-data’."
					},
					"response": []
				},
				{
					"name": "Updating a document",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							},
							{
								"key": "Content-Type",
								"type": "text",
								"value": "multipart/form-data"
							}
						],
						"body": {
							"mode": "formdata",
							"formdata": [
								{
									"key": "document_url",
									"value": "http://api.marketplacer.com/documents/sample-2.pdf",
									"type": "text"
								}
							]
						},
						"url": {
							"raw": "{{base_url}}/api/v2/client/adverts/100000013/documents/1",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"adverts",
								"100000013",
								"documents",
								"1"
							]
						},
						"description": "To update a document, you must first know its position within the list of documents returned from the listing documents endpoint."
					},
					"response": []
				},
				{
					"name": "Deleting a document",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v2/client/adverts/100000013/documents/3",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"adverts",
								"100000013",
								"documents",
								"3"
							]
						},
						"description": "To delete a document, you must first know its position within the list of documents returned from the listing documents endpoint."
					},
					"response": []
				}
			],
			"protocolProfileBehavior": {}
		},
		{
			"name": "Inventory",
			"item": [
				{
					"name": "List a variant’s inventory items",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v2/client/variants/59/inventories",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"variants",
								"59",
								"inventories"
							]
						},
						"description": " This endpoint only deals with multi-store adverts. For single seller adverts, stock levels are set directly on the variant. "
					},
					"response": []
				},
				{
					"name": "Updating a variant’s inventory as a parent",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							},
							{
								"key": "Content-Type",
								"value": "application/vnd.api+json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"data\": [\n        {\n            \"type\": \"inventories\",\n            \"attributes\": {\n                \"count_on_hand\": 10,\n                \"price\": 500,\n                \"sale_price\": 450,\n                \"seller_id\": 1\n            }\n        },\n        {\n            \"type\": \"inventories\",\n            \"attributes\": {\n                \"count_on_hand\": 15,\n                \"seller_id\": 2\n            }\n        },\n        {\n            \"type\": \"inventories\",\n            \"attributes\": {\n                \"infinite\": true,\n                \"seller_id\": 3\n            }\n        }\n    ]\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base_url}}/api/v2/client/variants/59/inventories",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"variants",
								"59",
								"inventories"
							]
						},
						"description": "This route can be used by the multi-store parent to update or create multiple inventories\n\n If you do not send a record for a seller who already has stock in the system, that seller's stock will remain unchanged. To set a seller as having no stock, you must explicitly send a 0 value. "
					},
					"response": []
				},
				{
					"name": "Updating a variant’s inventory as a child",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							},
							{
								"key": "Content-Type",
								"type": "text",
								"value": "application/vnd.api+json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"data\": [\n        {\n            \"attributes\": {\n                \"count_on_hand\": 22,\n                \"price\": 27.38,\n                \"sale_price\": 21.99,\n                \"infinite\": false\n            }\n        }\n    ]\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base_url}}/api/v2/client/variants/59/inventories",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"variants",
								"59",
								"inventories"
							]
						},
						"description": "This route can be used by members of the multi-store to update or create a single inventory record associated with their multi-store membership.\n\n This request will either update or create an Inventory associated with the member's API key in the request. The owner of the API key will need to already be a member of the multi-store. The attributes must be submitted in an array, and the last element will be used to update the multi-store member's inventory. All inventories will be returned. "
					},
					"response": []
				},
				{
					"name": "Deleting an inventory record",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v2/client/variants/59/inventories/1",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"variants",
								"59",
								"inventories",
								"1"
							]
						},
						"description": " An inventory record with a 0 count_on_hand value is handled differently to a non-existent inventory record. The 0 value will show the seller in the store selector but disabled; a non-existent record means the seller won't be shown at all in the store selector. "
					},
					"response": []
				}
			],
			"description": "Inventory represents the stock holding that a specific seller has for a multi-store advert variant. For instance, a parent seller might have an advert with two variants: “Blue / Small” and “Red / Large”; Seller A might hold 2 of the “Blue / Small” variant while Seller B holds 3 of the “Red / Large” variant. This would be represented by 2 inventory items:\n\n    Seller A, “Blue / Small”, 2 on hand\n    Seller B, “Red / Large”, 3 on hand\n\nYou can retrieve the seller IDs related to the multi-store using multi_store_memberships.\n\nAn inventory item can have a different price/sale price from the parent variant. It can also be configured to have infinite stock which never sells out.\nThis endpoint only deals with multi-store adverts. For single seller adverts, stock levels are set directly on the variant. ",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"id": "ff928b4e-2ff0-46f1-b021-b77e92dd5ac1",
						"type": "text/javascript",
						"exec": [
							""
						]
					}
				},
				{
					"listen": "test",
					"script": {
						"id": "e6e6a8d3-e9e5-4e71-89d4-1083888492e3",
						"type": "text/javascript",
						"exec": [
							""
						]
					}
				}
			],
			"protocolProfileBehavior": {}
		},
		{
			"name": "Invoices",
			"item": [
				{
					"name": "Listing invoices",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v2/client/invoices?since=2015-11-09T00:00:00Z&status=paid",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"invoices"
							],
							"query": [
								{
									"key": "since",
									"value": "2015-11-09T00:00:00Z"
								},
								{
									"key": "status",
									"value": "paid"
								}
							]
						},
						"description": "This endpoint returns a paginated list of invoices."
					},
					"response": []
				},
				{
					"name": "Showing invoices",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v2/client/invoices/10000",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"invoices",
								"10000"
							]
						},
						"description": "This endpoint will show an invoice’s information and includes the invoices line items as well as shipments by default."
					},
					"response": []
				},
				{
					"name": "Sending an invoice",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							},
							{
								"key": "Content-Type",
								"value": "application/vnd.api+json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"data\": {\n        \"type\": \"invoices\",\n        \"attributes\": {\n            \"postage_tracking\": \"TRACK007\",\n            \"postage_carrier\": \"AusPost\"\n        }\n    }\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base_url}}/api/v2/client/invoices/10000/sent",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"invoices",
								"10000",
								"sent"
							]
						},
						"description": "This endpoint marks “Buy Online” invoices as sent out to the customer. It can take additional attributes such as postage information."
					},
					"response": []
				},
				{
					"name": "Readying an invoice",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"data\": {\n        \"type\": \"invoices\",\n        \"attributes\": {\n            \"postage_tracking\": \"TRACK007\",\n            \"postage_carrier\": \"AusPost\"\n        }\n    }\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base_url}}/api/v2/client/invoices/10000/ready",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"invoices",
								"10000",
								"ready"
							]
						},
						"description": "This endpoint marks “Click and Collect” invoices as ready for collection."
					},
					"response": []
				},
				{
					"name": "Marking an invoice as collected",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"data\": {\n        \"type\": \"invoices\",\n        \"attributes\": {\n            \"postage_tracking\": \"TRACK007\",\n            \"postage_carrier\": \"AusPost\"\n        }\n    }\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base_url}}/api/v2/client/invoices/10000/collected",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"invoices",
								"10000",
								"collected"
							]
						},
						"description": "This endpoint marks “Click and Collect” invoices as collected."
					},
					"response": []
				}
			],
			"description": "Invoices track a collection of items bought from a store in a single transaction. Invoices are also grouped further by a delivery type. For instance, if someone buys a bike which is “Click and Collect” and a helmet which is “Buy Online” in the same order and for the same retailer, these will be split up into two invoices for the one retailer.\n\nInvoices have many line items which represent the amount of a particular advert purchased in the invoice.\n\nInvoices have many shipments which represent the individual shipments that were dispatched to a customer (including shipment tracking number and carrier).\n\nInvoices can transition through the following statuses:\n\n * Awaiting Payment -> Cancelled\n * Awaiting Payment -> Paid -> Refunded\n * Awaiting Payment -> Paid -> Ready -> Collected\n * Awaiting Payment -> Paid -> Sent\n\nAn invoice can be marked as “Ready” and then “Collected” only if the invoice is a “Click and Collect” invoice. Similarly, it can only be marked as “Sent” if it is a “Buy Online” invoice.\nAn invoice can also be marked as \"Partially Sent\". This state, however, can only be achieved by managing shipments via Shipments endpoint\n\nAn invoice will have both a “created_at” timestamp and a “paid_at” timestamp. You can only retrieve invoices after they have been paid, so you should use the “paid_at” timestamp as your canonical timestamp for the invoice.",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"id": "2c1fdc10-0467-47d1-b061-469f997d94e2",
						"type": "text/javascript",
						"exec": [
							""
						]
					}
				},
				{
					"listen": "test",
					"script": {
						"id": "f3531b25-f1e0-4809-9218-3428beaca7cc",
						"type": "text/javascript",
						"exec": [
							""
						]
					}
				}
			],
			"protocolProfileBehavior": {}
		},
		{
			"name": "Shipments",
			"item": [
				{
					"name": "Listing shipments",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v2/client/invoices/10000/shipments",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"invoices",
								"10000",
								"shipments"
							]
						},
						"description": "This endpoint returns a paginated list of shipments that belong to a particular invoice."
					},
					"response": []
				},
				{
					"name": "Showing shipments",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v2/client/invoices/10000/shipments/1",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"invoices",
								"10000",
								"shipments",
								"1"
							]
						},
						"description": "This endpoint will show a shipment’s information and includes the shipments line items as well as an invoice by default."
					},
					"response": []
				},
				{
					"name": "Create a shipment",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							},
							{
								"key": "Content-Type",
								"value": "application/vnd.api+json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"data\": {\n        \"type\": \"shipments\",\n        \"attributes\": {\n            \"shipment_tracking_number\": \"TRACK007\",\n            \"shipment_carrier\": \"AusPost\",\n            \"line_items_ids\": [\n                1\n            ]\n        }\n    }\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v2/client/invoices/10000/shipments",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"invoices",
								"10000",
								"shipments"
							]
						},
						"description": "This endpoint allows for the creation of shipments for a particular invoice. It requires a list of line item IDs (that are part of this invoice) to be provided. Additionally, it accepts shipment_tracking_number and shipment_carrier attributes. This will mutate an invoice’s status and transition to either “Sent” or “Partially Sent”."
					},
					"response": []
				},
				{
					"name": "Update a shipment",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							},
							{
								"key": "Content-Type",
								"type": "text",
								"value": "application/vnd.api+json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"data\": {\n        \"type\": \"shipments\",\n        \"attributes\": {\n            \"shipment_tracking_number\": \"NEW_TRACK008\",\n            \"shipment_carrier\": \"AusPost\"\n        }\n    }\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v2/client/invoices/10000/shipments/1",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"invoices",
								"10000",
								"shipments",
								"1"
							]
						},
						"description": "This endpoint allows tracking information (number and carrier) to be updated for a particular shipment. Similarly to new shipments, it accepts shipment_tracking_number and shipment_carrier attributes. This will update tracking information and trigger email notification to a customer."
					},
					"response": []
				}
			],
			"description": "Shipments endpoint provides a way to create and retrieve information about individual shipments containing one or multiple line items that are part of an invoice. Shipments have many shipped items (line items), which represent the amount of a particular advert purchased in the invoice.\n\nAn invoice will be marked as “Partially Sent” when some of its line items have been shipped. It will later transition into “Sent” when all of its line items have been shipped. Each shipment will have its “dispatched_at” canonical timestamp exposed, which represents the date and time when a shipment was created.",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"id": "9f87707a-232c-4503-9656-82f0a88ec3ac",
						"type": "text/javascript",
						"exec": [
							""
						]
					}
				},
				{
					"listen": "test",
					"script": {
						"id": "6660e630-1f50-4888-8e8b-31c793071266",
						"type": "text/javascript",
						"exec": [
							""
						]
					}
				}
			],
			"protocolProfileBehavior": {}
		},
		{
			"name": "Multi Store Memberships",
			"item": [
				{
					"name": "List the members of the multi store",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v2/client/multi_store_memberships",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"multi_store_memberships"
							]
						},
						"description": "A seller can be the parent of one multi store. A multi store membership represents the relationship between a parent store and a child store.\n\nThe parent can use the inventory endpoint to manage the stock levels for the child stores. To do that, the parent must know the Seller ID of the child store.\n\nThis endpoint allows the parent to retrieve the IDs and names of the child stores."
					},
					"response": []
				}
			],
			"protocolProfileBehavior": {}
		},
		{
			"name": "Taxons",
			"item": [
				{
					"name": "Listing taxons",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"value": "{{api_key}}",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v2/taxons",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"taxons"
							]
						},
						"description": "This endpoint returns all taxons."
					},
					"response": []
				},
				{
					"name": "Search for taxons",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v2/taxons/search?name=Hybrid",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"taxons",
								"search"
							],
							"query": [
								{
									"key": "name",
									"value": "Hybrid"
								}
							]
						},
						"description": "This endpoint allows you to search for a taxon by a word in its name or by a substring of its name."
					},
					"response": []
				},
				{
					"name": "Fetch a taxon",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v2/taxons/hybrid-bikes",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"taxons",
								"hybrid-bikes"
							]
						},
						"description": "If you want to get the option value information for an individual taxon, use the taxon id or slug"
					},
					"response": []
				}
			],
			"protocolProfileBehavior": {}
		},
		{
			"name": "Variants",
			"item": [
				{
					"name": "Creating a variant",
					"item": [
						{
							"name": "Request #1",
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "MARKETPLACER-API-KEY",
										"type": "text",
										"value": "{{api_key}}"
									}
								],
								"url": {
									"raw": "{{base_url}}/api/v2/client/adverts/100000013/variants/new",
									"host": [
										"{{base_url}}"
									],
									"path": [
										"api",
										"v2",
										"client",
										"adverts",
										"100000013",
										"variants",
										"new"
									]
								},
								"description": "First you must make a request to get a list of the variant’s possible option types and option values"
							},
							"response": []
						},
						{
							"name": "Request #2",
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "MARKETPLACER-API-KEY",
										"type": "text",
										"value": "{{api_key}}"
									},
									{
										"key": "Content-Type",
										"value": "application/vnd.api+json",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n    \"data\": {\n        \"type\": \"variants\",\n        \"attributes\": {\n            \"count_on_hand\": 5,\n            \"barcode\": \"9300601123456\",\n            \"sku\": \"SKU001\",\n            \"external_id\": \"ABC1234\",\n            \"notes\": \"\"\n        },\n        \"relationships\": {\n            \"variant_option_values\": [\n                {\n                    \"type\": \"variant_option_values\",\n                    \"option_value_id\": 1\n                }\n            ]\n        }\n    }\n}"
								},
								"url": {
									"raw": "{{base_url}}/api/v2/client/adverts/100000013/variants",
									"host": [
										"{{base_url}}"
									],
									"path": [
										"api",
										"v2",
										"client",
										"adverts",
										"100000013",
										"variants"
									]
								},
								"description": "Once you have this information, you can create a new variant"
							},
							"response": []
						}
					],
					"description": "Creating a variant is a two-step process. First you must make a request to get a list of the variant’s possible option types and option values:",
					"protocolProfileBehavior": {},
					"_postman_isSubFolder": true
				},
				{
					"name": "List your variants",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v2/client/variants",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"variants"
							]
						},
						"description": "This endpoint will return a paginated collection of your variants."
					},
					"response": []
				},
				{
					"name": "List an advert’s variants",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v2/client/adverts/100000013/variants",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"adverts",
								"100000013",
								"variants"
							]
						},
						"description": "This endpoint will return a list of a specific advert’s variants."
					},
					"response": []
				},
				{
					"name": "Get a single variant",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v2/client/adverts/100000013/variants/11",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"adverts",
								"100000013",
								"variants",
								"11"
							]
						},
						"description": "This endpoint shows data for a specific variant"
					},
					"response": []
				},
				{
					"name": "Updating a variant",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							},
							{
								"key": "Content-Type",
								"type": "text",
								"value": "application/vnd.api+json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"data\": {\n        \"type\": \"variants\",\n        \"attributes\": {\n            \"count_on_hand\": 0,\n            \"infinite\": true,\n            \"barcode\": \"9300601 123456\",\n            \"sku\": \"SKU001\"\n        },\n        \"relationships\": {\n            \"variant_option_values\": [\n                {\n                    \"type\": \"variant_option_values\",\n                    \"option_value_id\": \"1\"\n                }\n            ]\n        }\n    }\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v2/client/adverts/100000013/variants/11",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"adverts",
								"100000013",
								"variants",
								"11"
							]
						},
						"description": "Use this endpoint to update a variant’s information, such as its count_on_hand.\n\n You only need to pass through option values to this request and you can leave out option types. This is because option values belong to an option type; if we know the option value, we know the option type. "
					},
					"response": []
				},
				{
					"name": "Updating stock on hand for many variants",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							},
							{
								"key": "Content-Type",
								"type": "text",
								"value": "application/vnd.api+json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"count_on_hand\": {\n        \"123\": 2,\n        \"456\": 10,\n        \"789\": \"INFINITE\"\n    }\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v2/client/variants/stock_on_hand",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"variants",
								"stock_on_hand"
							]
						},
						"description": "Use this endpoint to update the count_on_hand for many variants.\n\n You should pass a hash of `variant_id` to `count_on_hand`. There is a special case of `INFINITE` which will set the `infinite?` stocklevel flag. "
					},
					"response": []
				},
				{
					"name": "Deleting a variant",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "MARKETPLACER-API-KEY",
								"type": "text",
								"value": "{{api_key}}"
							},
							{
								"key": "Content-Type",
								"type": "text",
								"value": "application/vnd.api+json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"count_on_hand\": {\n        \"123\": 2,\n        \"456\": 10,\n        \"789\": \"INFINITE\"\n    }\n}"
						},
						"url": {
							"raw": "{{base_url}}/api/v2/client/adverts/100000013/variants/11",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v2",
								"client",
								"adverts",
								"100000013",
								"variants",
								"11"
							]
						},
						"description": "Use this endpoint to delete a variant."
					},
					"response": []
				}
			],
			"description": "Variants represent the ways an advert can vary. For instance, an advert might come in different colours and sizes. Each colour and size combination is a unique variant. These are represented by option types and option values. Option types are things such as “Colour” and “Size”, and the option values are the corresponding values for these types. For example, an advert might come in “Red” and sizes “Small”, “Medium” and “Large”. This would be represented by 3 variants:\n\n    Colour: Red, Size: Small\n    Colour: Red, Size: Medium\n    Colour: Red, Size: Large\n\nVariants can represent advert variations by more than simply colour and size, too. For instance, groupsets on Bike Exchange can vary based on thread, crank arm length, cassette ratio, front rotor size, rear rotor size, crankset ratio and front deraillieur.\n\nAdverts that do not have anything to vary by still need to have a single variant - this will hold barcodes, stock, etc.\n\n## Variant IDs and External IDs\n\nSome endpoints use a variant id (e.g. updating a variant). The id of a variant will not always be consistent after some UI operations or exporting then reimporting as CSV. Please assign an external_id to variants you want to keep track of as they relate to the data in your system. To find the current id value of a variant whose external_id you know, you can use the filtered list endpoint: GET /api/v2/client/variants?external_id=VALUE.\n\nIf you ask for a variant ID that that doesn’t exist for this authorized user, or for that specific advert if an advert ID was given, then the request will return a 404.",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"id": "b4562eab-ea4d-43bf-8559-b4ea33508de8",
						"type": "text/javascript",
						"exec": [
							""
						]
					}
				},
				{
					"listen": "test",
					"script": {
						"id": "ae214cc9-454d-4b60-8327-9daef529b973",
						"type": "text/javascript",
						"exec": [
							""
						]
					}
				}
			],
			"protocolProfileBehavior": {}
		}
	],
	"auth": {
		"type": "basic",
		"basic": [
			{
				"key": "password",
				"value": "{{password}}",
				"type": "string"
			},
			{
				"key": "username",
				"value": "{{username}}",
				"type": "string"
			}
		]
	},
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"id": "748282bc-eb7a-465b-8d2f-a4a739fd76ea",
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"id": "5e5f2938-1924-4b8d-9a51-7f6ea3a9946a",
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		}
	],
	"variable": [
		{
			"id": "0f325724-f0fa-463e-a117-f735cffd9ae3",
			"key": "api_key",
			"value": "c62b790ed975c565cc41d69fdf590a0d"
		},
		{
			"id": "be764540-ca2f-400d-9c1a-c534d30be5b2",
			"key": "base_url",
			"value": "https://bestfriendbazaar.com"
		},
		{
			"id": "72875136-bde3-495c-9fe0-0993e1d3d92c",
			"key": "username",
			"value": "yourusername"
		},
		{
			"id": "db839aef-c512-4019-b53f-7a2a595440b9",
			"key": "password",
			"value": "yourpassword"
		}
	],
	"protocolProfileBehavior": {}
}
