{
	"info": {
		"_postman_id": "c8ab6131-0bac-426d-998e-a1fb1b7c71f5",
		"name": "Docuten - Colección para recepción de facturas",
		"description": "Puedes consultar la documentación del API de recepción de facturas de Docuten en el siguiente enlace: [https://docutenrecepcionapi.docs.apiary.io]()",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "343353"
	},
	"item": [
		{
			"name": "Proveedores",
			"item": [
				{
					"name": "Alta de proveedor",
					"request": {
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"tax_number\": \"B00000000\",\n  \"name\": \"SUPPLIER SL \",\n  \"address\": \"VIDAL \",\n  \"poblation\": \"VALENCIA\",\n  \"province\": \"VALENCIA\",\n  \"post_code\": \"46002\",\n  \"country_code\": \"ES\",\n  \"email\": \"supplier@email.com\",\n  \"companies\": [\"A00000000\"]\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "https://{{environment}}/api/v1/suppliers/",
							"protocol": "https",
							"host": [
								"{{environment}}"
							],
							"path": [
								"api",
								"v1",
								"suppliers",
								""
							]
						}
					},
					"response": []
				},
				{
					"name": "Update de proveedor",
					"request": {
						"method": "PUT",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"tax_number\": \"B00000000\",\n  \"name\": \"SUPPLIER SL \",\n  \"address\": \"VIDAL \",\n  \"poblation\": \"VALENCIA\",\n  \"province\": \"VALENCIA\",\n  \"post_code\": \"46002\",\n  \"country_code\": \"ES\",\n  \"email\": \"supplier@email.com\",\n  \"companies\": [\"A00000000\"]\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "https://{{environment}}/api/v1/suppliers/{{supplier_id}}",
							"protocol": "https",
							"host": [
								"{{environment}}"
							],
							"path": [
								"api",
								"v1",
								"suppliers",
								"{{supplier_id}}"
							]
						}
					},
					"response": []
				},
				{
					"name": "Listado de proveedores",
					"protocolProfileBehavior": {
						"disableBodyPruning": true
					},
					"request": {
						"method": "GET",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"url": {
							"raw": "https://{{environment}}/api/v1/suppliers/",
							"protocol": "https",
							"host": [
								"{{environment}}"
							],
							"path": [
								"api",
								"v1",
								"suppliers",
								""
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Facturas",
			"item": [
				{
					"name": "Listar facturas recibidas",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://{{environment}}/api/v1/received_invoices",
							"protocol": "https",
							"host": [
								"{{environment}}"
							],
							"path": [
								"api",
								"v1",
								"received_invoices"
							]
						}
					},
					"response": []
				},
				{
					"name": "Consultar una factura recibida",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://{{environment}}/api/v1/received_invoices/{{inv_id}}",
							"protocol": "https",
							"host": [
								"{{environment}}"
							],
							"path": [
								"api",
								"v1",
								"received_invoices",
								"{{inv_id}}"
							]
						}
					},
					"response": []
				},
				{
					"name": "Actualizar estado de una factura recibida",
					"request": {
						"method": "PUT",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n\"state\": \"2600\",\n\"reason\": \"Mensaje explicativo del cambio (opcional)\"\n}"
						},
						"url": {
							"raw": "https://{{environment}}/api/v1/received_invoices/{{inv_id}}",
							"protocol": "https",
							"host": [
								"{{environment}}"
							],
							"path": [
								"api",
								"v1",
								"received_invoices",
								"{{inv_id}}"
							]
						}
					},
					"response": []
				},
				{
					"name": "Rechazar una factura recibida",
					"request": {
						"method": "PUT",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n\"reason\": \"Motivo de rechazo de la factura\"\n}"
						},
						"url": {
							"raw": "https://{{environment}}/api/v1/received_invoices/{{inv_id}}/reject",
							"protocol": "https",
							"host": [
								"{{environment}}"
							],
							"path": [
								"api",
								"v1",
								"received_invoices",
								"{{inv_id}}",
								"reject"
							]
						}
					},
					"response": []
				},
				{
					"name": "Aceptar una factura recibida",
					"request": {
						"method": "PUT",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"url": {
							"raw": "https://{{environment}}/api/v1/received_invoices/{{inv_id}}/accept",
							"protocol": "https",
							"host": [
								"{{environment}}"
							],
							"path": [
								"api",
								"v1",
								"received_invoices",
								"{{inv_id}}",
								"accept"
							]
						}
					},
					"response": []
				},
				{
					"name": "Descargar factura recibida",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://{{environment}}/api/v1/received_invoices/{{inv_id}}/original",
							"protocol": "https",
							"host": [
								"{{environment}}"
							],
							"path": [
								"api",
								"v1",
								"received_invoices",
								"{{inv_id}}",
								"original"
							]
						}
					},
					"response": []
				}
			]
		}
	],
	"auth": {
		"type": "apikey",
		"apikey": [
			{
				"key": "value",
				"value": "Basic {{APIKey}}",
				"type": "string"
			},
			{
				"key": "key",
				"value": "Authorization",
				"type": "string"
			}
		]
	},
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		}
	],
	"variable": [
		{
			"key": "APIKey",
			"value": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
			"type": "string"
		},
		{
			"key": "environment",
			"value": "sandbox.docuten.com",
			"type": "string"
		},
		{
			"key": "inv_id",
			"value": "111111",
			"type": "string"
		},
		{
			"key": "supplier_id",
			"value": "111111",
			"type": "string"
		}
	]
}