diff --git a/docs/source/tendering/http/tutorial/active-cancellation.http b/docs/source/tendering/http/tutorial/active-cancellation.http index efa8f1247d..73d0f2666a 100644 --- a/docs/source/tendering/http/tutorial/active-cancellation.http +++ b/docs/source/tendering/http/tutorial/active-cancellation.http @@ -1,7 +1,7 @@ -PATCH /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/cancellations/d4d0fafa7fbf40b8b171adc3651ed356?acc_token=e6bb69a4c5474e4987130585951b6f3e HTTP/1.0 -Authorization: Bearer broker -Content-Length: 30 -Content-Type: application/json +PATCH /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/cancellations/d4d0fafa7fbf40b8b171adc3651ed356?acc_token=e6bb69a4c5474e4987130585951b6f3e HTTP/1.0 +Authorization: Bearer broker +Content-Length: 30 +Content-Type: application/json Host: lb-api-sandbox.prozorro.gov.ua DATA: { @@ -19,24 +19,24 @@ Content-Type: application/json; charset=UTF-8 { "hash": "md5:00000000000000000000000000000000", "description": "Changed description", - "title": "Notice.pdf", - "url": "http://public-docs-sandbox.prozorro.gov.ua/get/888a378eb7764d1693a1fec763cb806f?KeyID=a8968c46&Signature=66iYlHWRzl%252BEJRqmPqx781kVoy2WJlTVVKmZsNxrbNcxI0ib35aJ507wHARZ0lNebq9cfxuwi161lXFPn2NEAw%253D%253D", "format": "application/pdf", + "url": "http://public-docs-sandbox.prozorro.gov.ua/get/888a378eb7764d1693a1fec763cb806f?KeyID=a8968c46&Signature=66iYlHWRzl%252BEJRqmPqx781kVoy2WJlTVVKmZsNxrbNcxI0ib35aJ507wHARZ0lNebq9cfxuwi161lXFPn2NEAw%253D%253D", + "title": "Notice.pdf", "documentOf": "tender", - "datePublished": "2020-05-15T01:00:03+03:00", - "id": "2c95fa8b548444c08d8575bfc95f0bea", - "dateModified": "2020-05-15T01:00:03+03:00" + "datePublished": "2020-05-01T01:00:03+03:00", + "dateModified": "2020-05-01T01:00:03+03:00", + "id": "2c95fa8b548444c08d8575bfc95f0bea" }, { "hash": "md5:00000000000000000000000000000000", "description": "Changed description", - "title": "Notice-2.pdf", - "url": "http://public-docs-sandbox.prozorro.gov.ua/get/c9f250e2f74e4e8e95a882add5b4401a?KeyID=a8968c46&Signature=zr1a4Vd8WIGqoGAskp1DDf5%252BQzA6WJ5nV1uzXJIgIc3nK%2FJFCw%252BGK4aIT7vCv8qv8WTHWJ4%252BN%2Fb5gGIWIzYKAQ%253D%253D", "format": "application/pdf", + "url": "http://public-docs-sandbox.prozorro.gov.ua/get/c9f250e2f74e4e8e95a882add5b4401a?KeyID=a8968c46&Signature=zr1a4Vd8WIGqoGAskp1DDf5%252BQzA6WJ5nV1uzXJIgIc3nK%2FJFCw%252BGK4aIT7vCv8qv8WTHWJ4%252BN%2Fb5gGIWIzYKAQ%253D%253D", + "title": "Notice-2.pdf", "documentOf": "tender", - "datePublished": "2020-05-15T01:00:03+03:00", - "id": "2c95fa8b548444c08d8575bfc95f0bea", - "dateModified": "2020-05-15T01:00:03+03:00" + "datePublished": "2020-05-01T01:00:03+03:00", + "dateModified": "2020-05-01T01:00:03+03:00", + "id": "2c95fa8b548444c08d8575bfc95f0bea" } ], "reason": "cancellation reason", diff --git a/docs/source/tendering/http/tutorial/auction-url.http b/docs/source/tendering/http/tutorial/auction-url.http index 7318d0bce5..90f70fdcf3 100644 --- a/docs/source/tendering/http/tutorial/auction-url.http +++ b/docs/source/tendering/http/tutorial/auction-url.http @@ -1,5 +1,5 @@ -GET /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680 HTTP/1.0 -Authorization: Bearer broker +GET /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680 HTTP/1.0 +Authorization: Bearer broker Host: lb-api-sandbox.prozorro.gov.ua Response: 200 OK @@ -81,15 +81,15 @@ Content-Type: application/json; charset=UTF-8 { "hash": "md5:00000000000000000000000000000000", "description": "document description modified", - "title": "Notice.pdf", + "author": "tender_owner", "url": "http://public-docs-sandbox.prozorro.gov.ua/get/4d52879c11df4aa7ae80d3b6c4a274ce?KeyID=a8968c46&Signature=BiR23Y26fUFdAaBBqxSqN2Lv29UkW8VjpoZA0NLoVj2cgKeSq3J%2FiuGzva%252Bl0R6wpgLbA2zfat9mNkErf3HjAg%253D%253D", "format": "application/pdf", "documentOf": "tender", - "datePublished": "2020-05-15T01:00:01+03:00", - "author": "tender_owner", + "datePublished": "2020-05-01T01:00:01+03:00", "documentType": "technicalSpecifications", "id": "8a3d30101dc94ca58f768bec6a1f45dd", - "dateModified": "2020-05-15T01:00:01+03:00" + "title": "Notice.pdf", + "dateModified": "2020-05-01T01:00:01+03:00" }, { "hash": "md5:00000000000000000000000000000000", @@ -98,9 +98,9 @@ Content-Type: application/json; charset=UTF-8 "url": "http://public-docs-sandbox.prozorro.gov.ua/get/55286412717f4997b35cde1cdc8ca4a3?KeyID=a8968c46&Signature=SLJwlJyNeYyhfqlj5fjfDUM5HpgwZKwSFTALjLjeIuv5mzql8Jjjua0WO8iNogqE6c0DA0%252BkyD8utzz3zI27BA%253D%253D", "format": "application/pdf", "documentOf": "tender", - "datePublished": "2020-05-15T01:00:01+03:00", - "id": "90a4fef3a0f545f4807445bbd4017f29", - "dateModified": "2020-05-15T01:00:01+03:00" + "datePublished": "2020-05-01T01:00:01+03:00", + "dateModified": "2020-05-01T01:00:01+03:00", + "id": "90a4fef3a0f545f4807445bbd4017f29" }, { "hash": "md5:00000000000000000000000000000000", @@ -109,9 +109,9 @@ Content-Type: application/json; charset=UTF-8 "url": "http://public-docs-sandbox.prozorro.gov.ua/get/5d1c2cddad3f45a3aac16cb29b81f97f?KeyID=a8968c46&Signature=E3RouA49wKUWYJ7BPlrzsmaNUW69ZPMHhlKAAOoUy3gSRyJaA98YqWOvmbQ30Z0oCAQ44WCDW4wlwGZV0RXjCA%253D%253D", "format": "application/pdf", "documentOf": "tender", - "datePublished": "2020-05-15T01:00:01+03:00", - "id": "90a4fef3a0f545f4807445bbd4017f29", - "dateModified": "2020-05-15T01:00:01+03:00" + "datePublished": "2020-05-01T01:00:01+03:00", + "dateModified": "2020-05-01T01:00:01+03:00", + "id": "90a4fef3a0f545f4807445bbd4017f29" } ], "title": "футляри до державних нагород", diff --git a/docs/source/tendering/http/tutorial/bidder-documents.http b/docs/source/tendering/http/tutorial/bidder-documents.http index 0af6b0efe8..8105984cd5 100644 --- a/docs/source/tendering/http/tutorial/bidder-documents.http +++ b/docs/source/tendering/http/tutorial/bidder-documents.http @@ -1,5 +1,5 @@ -GET /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/bids/b31ec66637a141c7bb03446a0f22f5dc/documents?acc_token=7a7e299c46ba4430a2a63af9bf91af30 HTTP/1.0 -Authorization: Bearer broker +GET /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/bids/b31ec66637a141c7bb03446a0f22f5dc/documents?acc_token=7a7e299c46ba4430a2a63af9bf91af30 HTTP/1.0 +Authorization: Bearer broker Host: lb-api-sandbox.prozorro.gov.ua Response: 200 OK @@ -12,9 +12,9 @@ Content-Type: application/json; charset=UTF-8 "url": "http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/bids/b31ec66637a141c7bb03446a0f22f5dc/documents/86cd9a1b304d4530852984610d67c933?download=748412273ae54b27a3606febdfe1bc93", "format": "application/pdf", "documentOf": "tender", - "datePublished": "2020-05-15T01:00:01+03:00", - "id": "86cd9a1b304d4530852984610d67c933", - "dateModified": "2020-05-15T01:00:01+03:00" + "datePublished": "2020-05-01T01:00:01+03:00", + "dateModified": "2020-05-01T01:00:01+03:00", + "id": "86cd9a1b304d4530852984610d67c933" } ] } diff --git a/docs/source/tendering/http/tutorial/bidder-participation-url.http b/docs/source/tendering/http/tutorial/bidder-participation-url.http index df5c3d33a2..9462870a58 100644 --- a/docs/source/tendering/http/tutorial/bidder-participation-url.http +++ b/docs/source/tendering/http/tutorial/bidder-participation-url.http @@ -1,5 +1,5 @@ -GET /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/bids/b31ec66637a141c7bb03446a0f22f5dc?acc_token=7a7e299c46ba4430a2a63af9bf91af30 HTTP/1.0 -Authorization: Bearer broker +GET /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/bids/b31ec66637a141c7bb03446a0f22f5dc?acc_token=7a7e299c46ba4430a2a63af9bf91af30 HTTP/1.0 +Authorization: Bearer broker Host: lb-api-sandbox.prozorro.gov.ua Response: 200 OK @@ -14,9 +14,9 @@ Content-Type: application/json; charset=UTF-8 "url": "http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/bids/b31ec66637a141c7bb03446a0f22f5dc/documents/86cd9a1b304d4530852984610d67c933?download=748412273ae54b27a3606febdfe1bc93", "format": "application/pdf", "documentOf": "tender", - "datePublished": "2020-05-15T01:00:01+03:00", - "id": "86cd9a1b304d4530852984610d67c933", - "dateModified": "2020-05-15T01:00:01+03:00" + "datePublished": "2020-05-01T01:00:01+03:00", + "dateModified": "2020-05-01T01:00:01+03:00", + "id": "86cd9a1b304d4530852984610d67c933" } ], "value": { diff --git a/docs/source/tendering/http/tutorial/bidder2-participation-url.http b/docs/source/tendering/http/tutorial/bidder2-participation-url.http index 176649e97f..4e6442e7f4 100644 --- a/docs/source/tendering/http/tutorial/bidder2-participation-url.http +++ b/docs/source/tendering/http/tutorial/bidder2-participation-url.http @@ -1,5 +1,5 @@ -GET /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/bids/694f980947ff4d0b870d9a18384f23fe?acc_token=cfa7d625bdd049c79e3dfa84d8835a53 HTTP/1.0 -Authorization: Bearer broker +GET /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/bids/694f980947ff4d0b870d9a18384f23fe?acc_token=cfa7d625bdd049c79e3dfa84d8835a53 HTTP/1.0 +Authorization: Bearer broker Host: lb-api-sandbox.prozorro.gov.ua Response: 200 OK @@ -14,9 +14,9 @@ Content-Type: application/json; charset=UTF-8 "url": "http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/bids/694f980947ff4d0b870d9a18384f23fe/documents/ce114f673cf14b039c1ee9705b07c00b?download=9152e77768004ab1ba6b843902ac3f12", "format": "application/pdf", "documentOf": "tender", - "datePublished": "2020-05-15T01:00:01+03:00", - "id": "ce114f673cf14b039c1ee9705b07c00b", - "dateModified": "2020-05-15T01:00:01+03:00" + "datePublished": "2020-05-01T01:00:01+03:00", + "dateModified": "2020-05-01T01:00:01+03:00", + "id": "ce114f673cf14b039c1ee9705b07c00b" }, { "hash": "md5:00000000000000000000000000000000", @@ -24,9 +24,9 @@ Content-Type: application/json; charset=UTF-8 "url": "http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/bids/694f980947ff4d0b870d9a18384f23fe/documents/8baccb56ed4a44a18ef4c13ef8a4094b?download=99993315a2cd472f9387941fe22ee6d5", "format": "application/pdf", "documentOf": "tender", - "datePublished": "2020-05-15T01:00:01+03:00", - "id": "8baccb56ed4a44a18ef4c13ef8a4094b", - "dateModified": "2020-05-15T01:00:01+03:00" + "datePublished": "2020-05-01T01:00:01+03:00", + "dateModified": "2020-05-01T01:00:01+03:00", + "id": "8baccb56ed4a44a18ef4c13ef8a4094b" } ], "value": { diff --git a/docs/source/tendering/http/tutorial/change-contract-status-to-pending-by-supplier.http b/docs/source/tendering/http/tutorial/change-contract-status-to-pending-by-supplier.http new file mode 100644 index 0000000000..37516d0d99 --- /dev/null +++ b/docs/source/tendering/http/tutorial/change-contract-status-to-pending-by-supplier.http @@ -0,0 +1,129 @@ +PATCH /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/contracts/4f7b2b4c16f24c66897d0d18d57c05f3?acc_token=cfa7d625bdd049c79e3dfa84d8835a53 HTTP/1.0 +Authorization: Bearer broker +Content-Length: 31 +Content-Type: application/json +Host: lb-api-sandbox.prozorro.gov.ua +DATA: +{ + "data": { + "status": "pending" + } +} + +Response: 200 OK +Content-Type: application/json; charset=UTF-8 +{ + "data": { + "status": "pending", + "documents": [ + { + "hash": "md5:00000000000000000000000000000000", + "author": "tender_owner", + "title": "contract_first_document.doc", + "url": "http://public-docs-sandbox.prozorro.gov.ua/get/b97562e3f33c493297fd14dd6d8c50f0?KeyID=a8968c46&Signature=dQMvA4OqNyUhOiqC5GLb4uSEt49HDaSNcEbdsglo9C4Wq8XJDos68B7pBOwMEiRZWStfSwxaG5Hf8DZduhr9DA%253D%253D", + "format": "application/msword", + "documentOf": "tender", + "datePublished": "2020-05-01T01:00:03+03:00", + "dateModified": "2020-05-01T01:00:03+03:00", + "id": "9f3ff556fde24588bb8d43242b4fe977" + }, + { + "hash": "md5:00000000000000000000000000000000", + "author": "tender_owner", + "title": "contract_second_document.doc", + "url": "http://public-docs-sandbox.prozorro.gov.ua/get/a2aa5b35517c445ca3778b7b25560cc9?KeyID=a8968c46&Signature=VkkdjRhMvrxZzXFjmULpNVxzcq52P09KEEXjD2Fe%252BBMNBH9FUupk0ZN6hHIwAFGr5lYmPcm2HzuX83tijpfOBw%253D%253D", + "format": "application/msword", + "documentOf": "tender", + "datePublished": "2020-05-01T01:00:03+03:00", + "dateModified": "2020-05-01T01:00:03+03:00", + "id": "d0c4000793a24e009a3057b4434ae119" + }, + { + "dateModified": "2020-05-01T01:00:03+03:00", + "hash": "md5:00000000000000000000000000000000", + "format": "application/pkcs7-signature", + "url": "http://public-docs-sandbox.prozorro.gov.ua/get/4f1b9f5a45364f0cbb725e846b662238?KeyID=a8968c46&Signature=CVe5P9Wl2XZzgeb%2F2VXizVGxoyZ5PZmcSZPdZzb58LZXQ48PfznXpmJcGAzC65u3BgNoBfLxlwaAsU5oNDG%252BBg%253D%253D", + "author": "contract_supplier", + "documentOf": "document", + "relatedItem": "9f3ff556fde24588bb8d43242b4fe977", + "title": "supplier_first_document_sign.pkcs7", + "datePublished": "2020-05-01T01:00:03+03:00", + "id": "6433ef9dfe0443279db2f43f2a226561" + } + ], + "items": [ + { + "description": "футляри до державних нагород", + "classification": { + "scheme": "ДК021", + "description": "Cartons", + "id": "44617100-9" + }, + "additionalClassifications": [ + { + "scheme": "ДКПП", + "id": "17.21.1", + "description": "папір і картон гофровані, паперова й картонна тара" + } + ], + "deliveryAddress": { + "postalCode": "79000", + "countryName": "Україна", + "streetAddress": "вул. Банкова 1", + "region": "м. Київ", + "locality": "м. Київ" + }, + "deliveryDate": { + "startDate": "2020-05-03T01:00:00+03:00", + "endDate": "2020-05-06T01:00:00+03:00" + }, + "id": "22efe85457d041aab3bc5a64aae6be0f", + "unit": { + "code": "44617100-9", + "name": "item" + }, + "quantity": 5.0 + } + ], + "suppliers": [ + { + "contactPoint": { + "email": "aagt@gmail.com", + "telephone": "+380 (322) 91-69-30", + "name": "Андрій Олексюк" + }, + "scale": "sme", + "name": "ДКП «Книга»", + "identifier": { + "scheme": "UA-EDR", + "id": "00137226", + "uri": "http://www.sc.gov.ua/" + }, + "address": { + "postalCode": "79013", + "countryName": "Україна", + "streetAddress": "вул. Островського, 34", + "region": "Львівська область", + "locality": "м. Львів" + } + } + ], + "contractNumber": "contract #13111", + "period": { + "startDate": "2020-05-01T01:00:03+03:00", + "endDate": "2021-05-01T01:00:03+03:00" + }, + "dateSigned": "2020-05-01T01:00:03+03:00", + "value": { + "currency": "UAH", + "amount": 238.0, + "amountNet": 237.0, + "valueAddedTaxIncluded": true + }, + "date": "2020-05-01T01:00:03+03:00", + "awardID": "85136c93a6b043469633be6f0e09aa8b", + "id": "4f7b2b4c16f24c66897d0d18d57c05f3", + "contractID": "UA-2020-05-01-000001-1" + } +} + diff --git a/docs/source/tendering/http/tutorial/change-contract-status-to-pending-winner-signing-by-owner.http b/docs/source/tendering/http/tutorial/change-contract-status-to-pending-winner-signing-by-owner.http new file mode 100644 index 0000000000..e3022b3861 --- /dev/null +++ b/docs/source/tendering/http/tutorial/change-contract-status-to-pending-winner-signing-by-owner.http @@ -0,0 +1,117 @@ +PATCH /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/contracts/4f7b2b4c16f24c66897d0d18d57c05f3?acc_token=e6bb69a4c5474e4987130585951b6f3e HTTP/1.0 +Authorization: Bearer broker +Content-Length: 46 +Content-Type: application/json +Host: lb-api-sandbox.prozorro.gov.ua +DATA: +{ + "data": { + "status": "pending.winner-signing" + } +} + +Response: 200 OK +Content-Type: application/json; charset=UTF-8 +{ + "data": { + "status": "pending.winner-signing", + "documents": [ + { + "hash": "md5:00000000000000000000000000000000", + "author": "tender_owner", + "title": "contract_first_document.doc", + "url": "http://public-docs-sandbox.prozorro.gov.ua/get/b97562e3f33c493297fd14dd6d8c50f0?KeyID=a8968c46&Signature=dQMvA4OqNyUhOiqC5GLb4uSEt49HDaSNcEbdsglo9C4Wq8XJDos68B7pBOwMEiRZWStfSwxaG5Hf8DZduhr9DA%253D%253D", + "format": "application/msword", + "documentOf": "tender", + "datePublished": "2020-05-01T01:00:03+03:00", + "dateModified": "2020-05-01T01:00:03+03:00", + "id": "9f3ff556fde24588bb8d43242b4fe977" + }, + { + "hash": "md5:00000000000000000000000000000000", + "author": "tender_owner", + "title": "contract_second_document.doc", + "url": "http://public-docs-sandbox.prozorro.gov.ua/get/a2aa5b35517c445ca3778b7b25560cc9?KeyID=a8968c46&Signature=VkkdjRhMvrxZzXFjmULpNVxzcq52P09KEEXjD2Fe%252BBMNBH9FUupk0ZN6hHIwAFGr5lYmPcm2HzuX83tijpfOBw%253D%253D", + "format": "application/msword", + "documentOf": "tender", + "datePublished": "2020-05-01T01:00:03+03:00", + "dateModified": "2020-05-01T01:00:03+03:00", + "id": "d0c4000793a24e009a3057b4434ae119" + } + ], + "items": [ + { + "description": "футляри до державних нагород", + "classification": { + "scheme": "ДК021", + "description": "Cartons", + "id": "44617100-9" + }, + "additionalClassifications": [ + { + "scheme": "ДКПП", + "id": "17.21.1", + "description": "папір і картон гофровані, паперова й картонна тара" + } + ], + "deliveryAddress": { + "postalCode": "79000", + "countryName": "Україна", + "streetAddress": "вул. Банкова 1", + "region": "м. Київ", + "locality": "м. Київ" + }, + "deliveryDate": { + "startDate": "2020-05-03T01:00:00+03:00", + "endDate": "2020-05-06T01:00:00+03:00" + }, + "id": "22efe85457d041aab3bc5a64aae6be0f", + "unit": { + "code": "44617100-9", + "name": "item" + }, + "quantity": 5.0 + } + ], + "suppliers": [ + { + "contactPoint": { + "email": "aagt@gmail.com", + "telephone": "+380 (322) 91-69-30", + "name": "Андрій Олексюк" + }, + "scale": "sme", + "name": "ДКП «Книга»", + "identifier": { + "scheme": "UA-EDR", + "id": "00137226", + "uri": "http://www.sc.gov.ua/" + }, + "address": { + "postalCode": "79013", + "countryName": "Україна", + "streetAddress": "вул. Островського, 34", + "region": "Львівська область", + "locality": "м. Львів" + } + } + ], + "contractNumber": "contract #13111", + "period": { + "startDate": "2020-05-01T01:00:03+03:00", + "endDate": "2021-05-01T01:00:03+03:00" + }, + "dateSigned": "2020-05-01T01:00:03+03:00", + "value": { + "currency": "UAH", + "amount": 238.0, + "amountNet": 237.0, + "valueAddedTaxIncluded": true + }, + "date": "2020-05-01T01:00:03+03:00", + "awardID": "85136c93a6b043469633be6f0e09aa8b", + "id": "4f7b2b4c16f24c66897d0d18d57c05f3", + "contractID": "UA-2020-05-01-000001-1" + } +} + diff --git a/docs/source/tendering/http/tutorial/get-tender-contracts.http b/docs/source/tendering/http/tutorial/get-tender-contracts.http new file mode 100644 index 0000000000..94e7fed26f --- /dev/null +++ b/docs/source/tendering/http/tutorial/get-tender-contracts.http @@ -0,0 +1,109 @@ +GET /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/contracts/4f7b2b4c16f24c66897d0d18d57c05f3 HTTP/1.0 +Authorization: Bearer broker +Host: lb-api-sandbox.prozorro.gov.ua + +Response: 200 OK +Content-Type: application/json; charset=UTF-8 +{ + "data": { + "status": "pending", + "documents": [ + { + "hash": "md5:00000000000000000000000000000000", + "author": "tender_owner", + "title": "contract_first_document.doc", + "url": "http://public-docs-sandbox.prozorro.gov.ua/get/b97562e3f33c493297fd14dd6d8c50f0?KeyID=a8968c46&Signature=dQMvA4OqNyUhOiqC5GLb4uSEt49HDaSNcEbdsglo9C4Wq8XJDos68B7pBOwMEiRZWStfSwxaG5Hf8DZduhr9DA%253D%253D", + "format": "application/msword", + "documentOf": "tender", + "datePublished": "2020-05-01T01:00:03+03:00", + "dateModified": "2020-05-01T01:00:03+03:00", + "id": "9f3ff556fde24588bb8d43242b4fe977" + }, + { + "hash": "md5:00000000000000000000000000000000", + "author": "tender_owner", + "title": "contract_second_document.doc", + "url": "http://public-docs-sandbox.prozorro.gov.ua/get/a2aa5b35517c445ca3778b7b25560cc9?KeyID=a8968c46&Signature=VkkdjRhMvrxZzXFjmULpNVxzcq52P09KEEXjD2Fe%252BBMNBH9FUupk0ZN6hHIwAFGr5lYmPcm2HzuX83tijpfOBw%253D%253D", + "format": "application/msword", + "documentOf": "tender", + "datePublished": "2020-05-01T01:00:03+03:00", + "dateModified": "2020-05-01T01:00:03+03:00", + "id": "d0c4000793a24e009a3057b4434ae119" + } + ], + "items": [ + { + "description": "футляри до державних нагород", + "classification": { + "scheme": "ДК021", + "description": "Cartons", + "id": "44617100-9" + }, + "additionalClassifications": [ + { + "scheme": "ДКПП", + "id": "17.21.1", + "description": "папір і картон гофровані, паперова й картонна тара" + } + ], + "deliveryAddress": { + "postalCode": "79000", + "countryName": "Україна", + "streetAddress": "вул. Банкова 1", + "region": "м. Київ", + "locality": "м. Київ" + }, + "deliveryDate": { + "startDate": "2020-05-03T01:00:00+03:00", + "endDate": "2020-05-06T01:00:00+03:00" + }, + "id": "22efe85457d041aab3bc5a64aae6be0f", + "unit": { + "code": "44617100-9", + "name": "item" + }, + "quantity": 5.0 + } + ], + "suppliers": [ + { + "contactPoint": { + "email": "aagt@gmail.com", + "telephone": "+380 (322) 91-69-30", + "name": "Андрій Олексюк" + }, + "scale": "sme", + "name": "ДКП «Книга»", + "identifier": { + "scheme": "UA-EDR", + "id": "00137226", + "uri": "http://www.sc.gov.ua/" + }, + "address": { + "postalCode": "79013", + "countryName": "Україна", + "streetAddress": "вул. Островського, 34", + "region": "Львівська область", + "locality": "м. Львів" + } + } + ], + "contractNumber": "contract #13111", + "period": { + "startDate": "2020-05-01T01:00:03+03:00", + "endDate": "2021-05-01T01:00:03+03:00" + }, + "dateSigned": "2020-05-01T01:00:03+03:00", + "value": { + "currency": "UAH", + "amount": 238.0, + "amountNet": 230.0, + "valueAddedTaxIncluded": true + }, + "date": "2020-05-01T01:00:01+03:00", + "awardID": "85136c93a6b043469633be6f0e09aa8b", + "id": "4f7b2b4c16f24c66897d0d18d57c05f3", + "contractID": "UA-2020-05-01-000001-1" + } +} + diff --git a/docs/source/tendering/http/tutorial/patch-cancellation.http b/docs/source/tendering/http/tutorial/patch-cancellation.http index 4ad3ae6d85..27d9326037 100644 --- a/docs/source/tendering/http/tutorial/patch-cancellation.http +++ b/docs/source/tendering/http/tutorial/patch-cancellation.http @@ -1,7 +1,7 @@ -PATCH /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/cancellations/d4d0fafa7fbf40b8b171adc3651ed356/documents/2c95fa8b548444c08d8575bfc95f0bea?acc_token=e6bb69a4c5474e4987130585951b6f3e HTTP/1.0 -Authorization: Bearer broker -Content-Length: 48 -Content-Type: application/json +PATCH /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/cancellations/d4d0fafa7fbf40b8b171adc3651ed356/documents/2c95fa8b548444c08d8575bfc95f0bea?acc_token=e6bb69a4c5474e4987130585951b6f3e HTTP/1.0 +Authorization: Bearer broker +Content-Length: 48 +Content-Type: application/json Host: lb-api-sandbox.prozorro.gov.ua DATA: { @@ -16,13 +16,13 @@ Content-Type: application/json; charset=UTF-8 "data": { "hash": "md5:00000000000000000000000000000000", "description": "Changed description", - "title": "Notice.pdf", - "url": "http://public-docs-sandbox.prozorro.gov.ua/get/888a378eb7764d1693a1fec763cb806f?KeyID=a8968c46&Signature=66iYlHWRzl%252BEJRqmPqx781kVoy2WJlTVVKmZsNxrbNcxI0ib35aJ507wHARZ0lNebq9cfxuwi161lXFPn2NEAw%253D%253D", "format": "application/pdf", + "url": "http://public-docs-sandbox.prozorro.gov.ua/get/888a378eb7764d1693a1fec763cb806f?KeyID=a8968c46&Signature=66iYlHWRzl%252BEJRqmPqx781kVoy2WJlTVVKmZsNxrbNcxI0ib35aJ507wHARZ0lNebq9cfxuwi161lXFPn2NEAw%253D%253D", + "title": "Notice.pdf", "documentOf": "tender", - "datePublished": "2020-05-15T01:00:03+03:00", - "id": "2c95fa8b548444c08d8575bfc95f0bea", - "dateModified": "2020-05-15T01:00:03+03:00" + "datePublished": "2020-05-01T01:00:03+03:00", + "dateModified": "2020-05-01T01:00:03+03:00", + "id": "2c95fa8b548444c08d8575bfc95f0bea" } } diff --git a/docs/source/tendering/http/tutorial/register-2nd-bidder.http b/docs/source/tendering/http/tutorial/register-2nd-bidder.http index 85e3e5c642..d4c078b4a2 100644 --- a/docs/source/tendering/http/tutorial/register-2nd-bidder.http +++ b/docs/source/tendering/http/tutorial/register-2nd-bidder.http @@ -1,7 +1,7 @@ -POST /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/bids HTTP/1.0 -Authorization: Bearer broker -Content-Length: 1438 -Content-Type: application/json +POST /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/bids HTTP/1.0 +Authorization: Bearer broker +Content-Length: 1438 +Content-Type: application/json Host: lb-api-sandbox.prozorro.gov.ua DATA: { @@ -66,9 +66,9 @@ Location: http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/bc3a9016b29d4fed "url": "http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/bids/694f980947ff4d0b870d9a18384f23fe/documents/ce114f673cf14b039c1ee9705b07c00b?download=9152e77768004ab1ba6b843902ac3f12", "format": "application/pdf", "documentOf": "tender", - "datePublished": "2020-05-15T01:00:01+03:00", - "id": "ce114f673cf14b039c1ee9705b07c00b", - "dateModified": "2020-05-15T01:00:01+03:00" + "datePublished": "2020-05-01T01:00:01+03:00", + "dateModified": "2020-05-01T01:00:01+03:00", + "id": "ce114f673cf14b039c1ee9705b07c00b" }, { "hash": "md5:00000000000000000000000000000000", @@ -76,9 +76,9 @@ Location: http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/bc3a9016b29d4fed "url": "http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/bids/694f980947ff4d0b870d9a18384f23fe/documents/8baccb56ed4a44a18ef4c13ef8a4094b?download=99993315a2cd472f9387941fe22ee6d5", "format": "application/pdf", "documentOf": "tender", - "datePublished": "2020-05-15T01:00:01+03:00", - "id": "8baccb56ed4a44a18ef4c13ef8a4094b", - "dateModified": "2020-05-15T01:00:01+03:00" + "datePublished": "2020-05-01T01:00:01+03:00", + "dateModified": "2020-05-01T01:00:01+03:00", + "id": "8baccb56ed4a44a18ef4c13ef8a4094b" } ], "value": { diff --git a/docs/source/tendering/http/tutorial/tender-contract-get-documents-again.http b/docs/source/tendering/http/tutorial/tender-contract-get-documents-again.http index 2d2d84a446..8f2a2191db 100644 --- a/docs/source/tendering/http/tutorial/tender-contract-get-documents-again.http +++ b/docs/source/tendering/http/tutorial/tender-contract-get-documents-again.http @@ -1,5 +1,5 @@ -GET /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/contracts/4f7b2b4c16f24c66897d0d18d57c05f3/documents HTTP/1.0 -Authorization: Bearer broker +GET /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/contracts/4f7b2b4c16f24c66897d0d18d57c05f3/documents HTTP/1.0 +Authorization: Bearer broker Host: lb-api-sandbox.prozorro.gov.ua Response: 200 OK @@ -8,23 +8,25 @@ Content-Type: application/json; charset=UTF-8 "data": [ { "hash": "md5:00000000000000000000000000000000", + "author": "tender_owner", "title": "contract_first_document.doc", "url": "http://public-docs-sandbox.prozorro.gov.ua/get/b97562e3f33c493297fd14dd6d8c50f0?KeyID=a8968c46&Signature=dQMvA4OqNyUhOiqC5GLb4uSEt49HDaSNcEbdsglo9C4Wq8XJDos68B7pBOwMEiRZWStfSwxaG5Hf8DZduhr9DA%253D%253D", "format": "application/msword", "documentOf": "tender", - "datePublished": "2020-05-15T01:00:03+03:00", - "id": "9f3ff556fde24588bb8d43242b4fe977", - "dateModified": "2020-05-15T01:00:03+03:00" + "datePublished": "2020-05-01T01:00:03+03:00", + "dateModified": "2020-05-01T01:00:03+03:00", + "id": "9f3ff556fde24588bb8d43242b4fe977" }, { "hash": "md5:00000000000000000000000000000000", + "author": "tender_owner", "title": "contract_second_document.doc", "url": "http://public-docs-sandbox.prozorro.gov.ua/get/a2aa5b35517c445ca3778b7b25560cc9?KeyID=a8968c46&Signature=VkkdjRhMvrxZzXFjmULpNVxzcq52P09KEEXjD2Fe%252BBMNBH9FUupk0ZN6hHIwAFGr5lYmPcm2HzuX83tijpfOBw%253D%253D", "format": "application/msword", "documentOf": "tender", - "datePublished": "2020-05-15T01:00:03+03:00", - "id": "d0c4000793a24e009a3057b4434ae119", - "dateModified": "2020-05-15T01:00:03+03:00" + "datePublished": "2020-05-01T01:00:03+03:00", + "dateModified": "2020-05-01T01:00:03+03:00", + "id": "d0c4000793a24e009a3057b4434ae119" } ] } diff --git a/docs/source/tendering/http/tutorial/tender-contract-get-documents.http b/docs/source/tendering/http/tutorial/tender-contract-get-documents.http index d8e2920ed5..0ef3dc5633 100644 --- a/docs/source/tendering/http/tutorial/tender-contract-get-documents.http +++ b/docs/source/tendering/http/tutorial/tender-contract-get-documents.http @@ -1,5 +1,5 @@ -GET /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/contracts/4f7b2b4c16f24c66897d0d18d57c05f3/documents HTTP/1.0 -Authorization: Bearer broker +GET /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/contracts/4f7b2b4c16f24c66897d0d18d57c05f3/documents HTTP/1.0 +Authorization: Bearer broker Host: lb-api-sandbox.prozorro.gov.ua Response: 200 OK @@ -8,13 +8,14 @@ Content-Type: application/json; charset=UTF-8 "data": [ { "hash": "md5:00000000000000000000000000000000", + "author": "tender_owner", "title": "contract_first_document.doc", "url": "http://public-docs-sandbox.prozorro.gov.ua/get/b97562e3f33c493297fd14dd6d8c50f0?KeyID=a8968c46&Signature=dQMvA4OqNyUhOiqC5GLb4uSEt49HDaSNcEbdsglo9C4Wq8XJDos68B7pBOwMEiRZWStfSwxaG5Hf8DZduhr9DA%253D%253D", "format": "application/msword", "documentOf": "tender", - "datePublished": "2020-05-15T01:00:03+03:00", - "id": "9f3ff556fde24588bb8d43242b4fe977", - "dateModified": "2020-05-15T01:00:03+03:00" + "datePublished": "2020-05-01T01:00:03+03:00", + "dateModified": "2020-05-01T01:00:03+03:00", + "id": "9f3ff556fde24588bb8d43242b4fe977" } ] } diff --git a/docs/source/tendering/http/tutorial/tender-contract-upload-document.http b/docs/source/tendering/http/tutorial/tender-contract-upload-document.http index 4c6b70e9b5..8afdbbb3d7 100644 --- a/docs/source/tendering/http/tutorial/tender-contract-upload-document.http +++ b/docs/source/tendering/http/tutorial/tender-contract-upload-document.http @@ -1,7 +1,7 @@ -POST /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/contracts/4f7b2b4c16f24c66897d0d18d57c05f3/documents?acc_token=e6bb69a4c5474e4987130585951b6f3e HTTP/1.0 -Authorization: Bearer broker -Content-Length: 348 -Content-Type: application/json +POST /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/contracts/4f7b2b4c16f24c66897d0d18d57c05f3/documents?acc_token=e6bb69a4c5474e4987130585951b6f3e HTTP/1.0 +Authorization: Bearer broker +Content-Length: 348 +Content-Type: application/json Host: lb-api-sandbox.prozorro.gov.ua DATA: { @@ -19,13 +19,14 @@ Location: http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/bc3a9016b29d4fed { "data": { "hash": "md5:00000000000000000000000000000000", + "author": "tender_owner", "title": "contract_first_document.doc", "url": "http://public-docs-sandbox.prozorro.gov.ua/get/b97562e3f33c493297fd14dd6d8c50f0?KeyID=a8968c46&Signature=dQMvA4OqNyUhOiqC5GLb4uSEt49HDaSNcEbdsglo9C4Wq8XJDos68B7pBOwMEiRZWStfSwxaG5Hf8DZduhr9DA%253D%253D", "format": "application/msword", "documentOf": "tender", - "datePublished": "2020-05-15T01:00:03+03:00", - "id": "9f3ff556fde24588bb8d43242b4fe977", - "dateModified": "2020-05-15T01:00:03+03:00" + "datePublished": "2020-05-01T01:00:03+03:00", + "dateModified": "2020-05-01T01:00:03+03:00", + "id": "9f3ff556fde24588bb8d43242b4fe977" } } diff --git a/docs/source/tendering/http/tutorial/tender-contract-upload-second-document.http b/docs/source/tendering/http/tutorial/tender-contract-upload-second-document.http index a550a489b3..4444682c0b 100644 --- a/docs/source/tendering/http/tutorial/tender-contract-upload-second-document.http +++ b/docs/source/tendering/http/tutorial/tender-contract-upload-second-document.http @@ -1,7 +1,7 @@ -POST /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/contracts/4f7b2b4c16f24c66897d0d18d57c05f3/documents?acc_token=e6bb69a4c5474e4987130585951b6f3e HTTP/1.0 -Authorization: Bearer broker -Content-Length: 347 -Content-Type: application/json +POST /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/contracts/4f7b2b4c16f24c66897d0d18d57c05f3/documents?acc_token=e6bb69a4c5474e4987130585951b6f3e HTTP/1.0 +Authorization: Bearer broker +Content-Length: 347 +Content-Type: application/json Host: lb-api-sandbox.prozorro.gov.ua DATA: { @@ -19,13 +19,14 @@ Location: http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/bc3a9016b29d4fed { "data": { "hash": "md5:00000000000000000000000000000000", + "author": "tender_owner", "title": "contract_second_document.doc", "url": "http://public-docs-sandbox.prozorro.gov.ua/get/a2aa5b35517c445ca3778b7b25560cc9?KeyID=a8968c46&Signature=VkkdjRhMvrxZzXFjmULpNVxzcq52P09KEEXjD2Fe%252BBMNBH9FUupk0ZN6hHIwAFGr5lYmPcm2HzuX83tijpfOBw%253D%253D", "format": "application/msword", "documentOf": "tender", - "datePublished": "2020-05-15T01:00:03+03:00", - "id": "d0c4000793a24e009a3057b4434ae119", - "dateModified": "2020-05-15T01:00:03+03:00" + "datePublished": "2020-05-01T01:00:03+03:00", + "dateModified": "2020-05-01T01:00:03+03:00", + "id": "d0c4000793a24e009a3057b4434ae119" } } diff --git a/docs/source/tendering/http/tutorial/tender-contract-upload-sign-file-by-owner.http b/docs/source/tendering/http/tutorial/tender-contract-upload-sign-file-by-owner.http new file mode 100644 index 0000000000..18b1ba0dbc --- /dev/null +++ b/docs/source/tendering/http/tutorial/tender-contract-upload-sign-file-by-owner.http @@ -0,0 +1,35 @@ +POST /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/contracts/4f7b2b4c16f24c66897d0d18d57c05f3/documents?acc_token=e6bb69a4c5474e4987130585951b6f3e HTTP/1.0 +Authorization: Bearer broker +Content-Length: 434 +Content-Type: application/json +Host: lb-api-sandbox.prozorro.gov.ua +DATA: +{ + "data": { + "hash": "md5:00000000000000000000000000000000", + "title": "owner_first_document_sign.pkcs7", + "url": "http://public-docs-sandbox.prozorro.gov.ua/get/13a0c52811684b1c90e594fb5fb765b4?KeyID=a8968c46&Signature=4vEihD3qAJ4PebZkzbnaP6u2vJhD7G3Cnl%2FkyXUnDvWJFLU3vvo%2FqOTq%2Bh3jIIIPh58r4Xv0SoQri1quukdKAw%3D%3D", + "format": "application/pkcs7-signature", + "documentOf": "document", + "relatedItem": "9f3ff556fde24588bb8d43242b4fe977" + } +} + +Response: 201 Created +Content-Type: application/json; charset=UTF-8 +Location: http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/contracts/4f7b2b4c16f24c66897d0d18d57c05f3/documents/44b59b91c2c3408d912e71197bcb2026 +{ + "data": { + "dateModified": "2020-05-01T01:00:03+03:00", + "hash": "md5:00000000000000000000000000000000", + "format": "application/pkcs7-signature", + "url": "http://public-docs-sandbox.prozorro.gov.ua/get/13a0c52811684b1c90e594fb5fb765b4?KeyID=a8968c46&Signature=H1uYxm2tSuPt1Sb%252BZn%2Ffzuu0rGGiNPPRYpE1PIpYlAnObArIskamOTmUyerpQZZm0PXZvOHjmCbkreYkWN4GAA%253D%253D", + "author": "tender_owner", + "documentOf": "document", + "relatedItem": "9f3ff556fde24588bb8d43242b4fe977", + "title": "owner_first_document_sign.pkcs7", + "datePublished": "2020-05-01T01:00:03+03:00", + "id": "44b59b91c2c3408d912e71197bcb2026" + } +} + diff --git a/docs/source/tendering/http/tutorial/tender-contract-upload-sign-file-by-supplier.http b/docs/source/tendering/http/tutorial/tender-contract-upload-sign-file-by-supplier.http new file mode 100644 index 0000000000..d45edd0959 --- /dev/null +++ b/docs/source/tendering/http/tutorial/tender-contract-upload-sign-file-by-supplier.http @@ -0,0 +1,35 @@ +POST /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/contracts/4f7b2b4c16f24c66897d0d18d57c05f3/documents?acc_token=cfa7d625bdd049c79e3dfa84d8835a53 HTTP/1.0 +Authorization: Bearer broker +Content-Length: 435 +Content-Type: application/json +Host: lb-api-sandbox.prozorro.gov.ua +DATA: +{ + "data": { + "hash": "md5:00000000000000000000000000000000", + "title": "supplier_first_document_sign.pkcs7", + "url": "http://public-docs-sandbox.prozorro.gov.ua/get/4f1b9f5a45364f0cbb725e846b662238?KeyID=a8968c46&Signature=Anj2v1yWUYKKgDGOTSrm%2F2cCwUbJhn7mlhxn7TzrZOcNnNawXe6hQqovJX4gIQbV6scc%2Bnugf1DoQknw7dCmBA%3D%3D", + "format": "application/pkcs7-signature", + "documentOf": "document", + "relatedItem": "9f3ff556fde24588bb8d43242b4fe977" + } +} + +Response: 201 Created +Content-Type: application/json; charset=UTF-8 +Location: http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/contracts/4f7b2b4c16f24c66897d0d18d57c05f3/documents/6433ef9dfe0443279db2f43f2a226561 +{ + "data": { + "dateModified": "2020-05-01T01:00:03+03:00", + "hash": "md5:00000000000000000000000000000000", + "format": "application/pkcs7-signature", + "url": "http://public-docs-sandbox.prozorro.gov.ua/get/4f1b9f5a45364f0cbb725e846b662238?KeyID=a8968c46&Signature=CVe5P9Wl2XZzgeb%2F2VXizVGxoyZ5PZmcSZPdZzb58LZXQ48PfznXpmJcGAzC65u3BgNoBfLxlwaAsU5oNDG%252BBg%253D%253D", + "author": "contract_supplier", + "documentOf": "document", + "relatedItem": "9f3ff556fde24588bb8d43242b4fe977", + "title": "supplier_first_document_sign.pkcs7", + "datePublished": "2020-05-01T01:00:03+03:00", + "id": "6433ef9dfe0443279db2f43f2a226561" + } +} + diff --git a/docs/source/tendering/http/tutorial/tender-document-add-documentType.http b/docs/source/tendering/http/tutorial/tender-document-add-documentType.http index 5016f7edbf..607cbd57ce 100644 --- a/docs/source/tendering/http/tutorial/tender-document-add-documentType.http +++ b/docs/source/tendering/http/tutorial/tender-document-add-documentType.http @@ -1,7 +1,7 @@ -PATCH /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/documents/8a3d30101dc94ca58f768bec6a1f45dd?acc_token=e6bb69a4c5474e4987130585951b6f3e HTTP/1.0 -Authorization: Bearer broker -Content-Length: 53 -Content-Type: application/json +PATCH /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/documents/8a3d30101dc94ca58f768bec6a1f45dd?acc_token=e6bb69a4c5474e4987130585951b6f3e HTTP/1.0 +Authorization: Bearer broker +Content-Length: 53 +Content-Type: application/json Host: lb-api-sandbox.prozorro.gov.ua DATA: { @@ -14,16 +14,16 @@ Response: 200 OK Content-Type: application/json; charset=UTF-8 { "data": { + "dateModified": "2020-05-01T01:00:01+03:00", "hash": "md5:00000000000000000000000000000000", - "author": "tender_owner", - "title": "Notice.pdf", - "url": "http://public-docs-sandbox.prozorro.gov.ua/get/4d52879c11df4aa7ae80d3b6c4a274ce?KeyID=a8968c46&Signature=BiR23Y26fUFdAaBBqxSqN2Lv29UkW8VjpoZA0NLoVj2cgKeSq3J%2FiuGzva%252Bl0R6wpgLbA2zfat9mNkErf3HjAg%253D%253D", "format": "application/pdf", + "url": "http://public-docs-sandbox.prozorro.gov.ua/get/4d52879c11df4aa7ae80d3b6c4a274ce?KeyID=a8968c46&Signature=BiR23Y26fUFdAaBBqxSqN2Lv29UkW8VjpoZA0NLoVj2cgKeSq3J%2FiuGzva%252Bl0R6wpgLbA2zfat9mNkErf3HjAg%253D%253D", + "author": "tender_owner", "documentOf": "tender", "datePublished": "2020-05-15T01:00:01+03:00", "documentType": "technicalSpecifications", - "id": "8a3d30101dc94ca58f768bec6a1f45dd", - "dateModified": "2020-05-15T01:00:01+03:00" + "title": "Notice.pdf", + "id": "8a3d30101dc94ca58f768bec6a1f45dd" } } diff --git a/docs/source/tendering/http/tutorial/tender-document-edit-docType-desc.http b/docs/source/tendering/http/tutorial/tender-document-edit-docType-desc.http index 5d14f0a6f6..9601b8e0cd 100644 --- a/docs/source/tendering/http/tutorial/tender-document-edit-docType-desc.http +++ b/docs/source/tendering/http/tutorial/tender-document-edit-docType-desc.http @@ -1,7 +1,7 @@ -PATCH /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/documents/8a3d30101dc94ca58f768bec6a1f45dd?acc_token=e6bb69a4c5474e4987130585951b6f3e HTTP/1.0 -Authorization: Bearer broker -Content-Length: 58 -Content-Type: application/json +PATCH /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/documents/8a3d30101dc94ca58f768bec6a1f45dd?acc_token=e6bb69a4c5474e4987130585951b6f3e HTTP/1.0 +Authorization: Bearer broker +Content-Length: 58 +Content-Type: application/json Host: lb-api-sandbox.prozorro.gov.ua DATA: { @@ -16,15 +16,15 @@ Content-Type: application/json; charset=UTF-8 "data": { "hash": "md5:00000000000000000000000000000000", "description": "document description modified", - "title": "Notice.pdf", + "author": "tender_owner", "url": "http://public-docs-sandbox.prozorro.gov.ua/get/4d52879c11df4aa7ae80d3b6c4a274ce?KeyID=a8968c46&Signature=BiR23Y26fUFdAaBBqxSqN2Lv29UkW8VjpoZA0NLoVj2cgKeSq3J%2FiuGzva%252Bl0R6wpgLbA2zfat9mNkErf3HjAg%253D%253D", "format": "application/pdf", "documentOf": "tender", - "datePublished": "2020-05-15T01:00:01+03:00", - "author": "tender_owner", + "datePublished": "2020-05-01T01:00:01+03:00", "documentType": "technicalSpecifications", "id": "8a3d30101dc94ca58f768bec6a1f45dd", - "dateModified": "2020-05-15T01:00:01+03:00" + "title": "Notice.pdf", + "dateModified": "2020-05-01T01:00:01+03:00" } } diff --git a/docs/source/tendering/http/tutorial/tender-documents-2.http b/docs/source/tendering/http/tutorial/tender-documents-2.http index 61c9c81082..edd3a9cb23 100644 --- a/docs/source/tendering/http/tutorial/tender-documents-2.http +++ b/docs/source/tendering/http/tutorial/tender-documents-2.http @@ -1,5 +1,5 @@ -GET /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/documents HTTP/1.0 -Authorization: Bearer broker +GET /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/documents HTTP/1.0 +Authorization: Bearer broker Host: lb-api-sandbox.prozorro.gov.ua Response: 200 OK @@ -9,15 +9,15 @@ Content-Type: application/json; charset=UTF-8 { "hash": "md5:00000000000000000000000000000000", "description": "document description modified", - "title": "Notice.pdf", + "author": "tender_owner", "url": "http://public-docs-sandbox.prozorro.gov.ua/get/4d52879c11df4aa7ae80d3b6c4a274ce?KeyID=a8968c46&Signature=BiR23Y26fUFdAaBBqxSqN2Lv29UkW8VjpoZA0NLoVj2cgKeSq3J%2FiuGzva%252Bl0R6wpgLbA2zfat9mNkErf3HjAg%253D%253D", "format": "application/pdf", "documentOf": "tender", - "datePublished": "2020-05-15T01:00:01+03:00", - "author": "tender_owner", + "datePublished": "2020-05-01T01:00:01+03:00", "documentType": "technicalSpecifications", "id": "8a3d30101dc94ca58f768bec6a1f45dd", - "dateModified": "2020-05-15T01:00:01+03:00" + "title": "Notice.pdf", + "dateModified": "2020-05-01T01:00:01+03:00" }, { "hash": "md5:00000000000000000000000000000000", @@ -26,9 +26,9 @@ Content-Type: application/json; charset=UTF-8 "url": "http://public-docs-sandbox.prozorro.gov.ua/get/55286412717f4997b35cde1cdc8ca4a3?KeyID=a8968c46&Signature=SLJwlJyNeYyhfqlj5fjfDUM5HpgwZKwSFTALjLjeIuv5mzql8Jjjua0WO8iNogqE6c0DA0%252BkyD8utzz3zI27BA%253D%253D", "format": "application/pdf", "documentOf": "tender", - "datePublished": "2020-05-15T01:00:01+03:00", - "id": "90a4fef3a0f545f4807445bbd4017f29", - "dateModified": "2020-05-15T01:00:01+03:00" + "datePublished": "2020-05-01T01:00:01+03:00", + "dateModified": "2020-05-01T01:00:01+03:00", + "id": "90a4fef3a0f545f4807445bbd4017f29" } ] } diff --git a/docs/source/tendering/http/tutorial/tender-documents-3.http b/docs/source/tendering/http/tutorial/tender-documents-3.http index 22f0dc890f..2072ea2872 100644 --- a/docs/source/tendering/http/tutorial/tender-documents-3.http +++ b/docs/source/tendering/http/tutorial/tender-documents-3.http @@ -1,5 +1,5 @@ -GET /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/documents HTTP/1.0 -Authorization: Bearer broker +GET /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/documents HTTP/1.0 +Authorization: Bearer broker Host: lb-api-sandbox.prozorro.gov.ua Response: 200 OK @@ -9,15 +9,15 @@ Content-Type: application/json; charset=UTF-8 { "hash": "md5:00000000000000000000000000000000", "description": "document description modified", - "title": "Notice.pdf", + "author": "tender_owner", "url": "http://public-docs-sandbox.prozorro.gov.ua/get/4d52879c11df4aa7ae80d3b6c4a274ce?KeyID=a8968c46&Signature=BiR23Y26fUFdAaBBqxSqN2Lv29UkW8VjpoZA0NLoVj2cgKeSq3J%2FiuGzva%252Bl0R6wpgLbA2zfat9mNkErf3HjAg%253D%253D", "format": "application/pdf", "documentOf": "tender", - "datePublished": "2020-05-15T01:00:01+03:00", - "author": "tender_owner", + "datePublished": "2020-05-01T01:00:01+03:00", "documentType": "technicalSpecifications", "id": "8a3d30101dc94ca58f768bec6a1f45dd", - "dateModified": "2020-05-15T01:00:01+03:00" + "title": "Notice.pdf", + "dateModified": "2020-05-01T01:00:01+03:00" }, { "hash": "md5:00000000000000000000000000000000", @@ -26,9 +26,9 @@ Content-Type: application/json; charset=UTF-8 "url": "http://public-docs-sandbox.prozorro.gov.ua/get/5d1c2cddad3f45a3aac16cb29b81f97f?KeyID=a8968c46&Signature=E3RouA49wKUWYJ7BPlrzsmaNUW69ZPMHhlKAAOoUy3gSRyJaA98YqWOvmbQ30Z0oCAQ44WCDW4wlwGZV0RXjCA%253D%253D", "format": "application/pdf", "documentOf": "tender", - "datePublished": "2020-05-15T01:00:01+03:00", - "id": "90a4fef3a0f545f4807445bbd4017f29", - "dateModified": "2020-05-15T01:00:01+03:00" + "datePublished": "2020-05-01T01:00:01+03:00", + "dateModified": "2020-05-01T01:00:01+03:00", + "id": "90a4fef3a0f545f4807445bbd4017f29" } ] } diff --git a/docs/source/tendering/http/tutorial/tender-documents.http b/docs/source/tendering/http/tutorial/tender-documents.http index 711e4ce7f0..d2db90b8b0 100644 --- a/docs/source/tendering/http/tutorial/tender-documents.http +++ b/docs/source/tendering/http/tutorial/tender-documents.http @@ -1,5 +1,5 @@ -GET /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/documents/8a3d30101dc94ca58f768bec6a1f45dd HTTP/1.0 -Authorization: Bearer broker +GET /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/documents/8a3d30101dc94ca58f768bec6a1f45dd HTTP/1.0 +Authorization: Bearer broker Host: lb-api-sandbox.prozorro.gov.ua Response: 200 OK @@ -14,8 +14,8 @@ Content-Type: application/json; charset=UTF-8 "documentOf": "tender", "datePublished": "2020-05-15T01:00:01+03:00", "previousVersions": [], - "id": "8a3d30101dc94ca58f768bec6a1f45dd", - "dateModified": "2020-05-15T01:00:01+03:00" + "dateModified": "2020-05-01T01:00:01+03:00", + "id": "8a3d30101dc94ca58f768bec6a1f45dd" } } diff --git a/docs/source/tendering/http/tutorial/update-award-criteria.http b/docs/source/tendering/http/tutorial/update-award-criteria.http index a13388bf5e..d2d45279cb 100644 --- a/docs/source/tendering/http/tutorial/update-award-criteria.http +++ b/docs/source/tendering/http/tutorial/update-award-criteria.http @@ -1,7 +1,7 @@ -PUT /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/documents/90a4fef3a0f545f4807445bbd4017f29?acc_token=e6bb69a4c5474e4987130585951b6f3e HTTP/1.0 -Authorization: Bearer broker -Content-Length: 329 -Content-Type: application/json +PUT /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/documents/90a4fef3a0f545f4807445bbd4017f29?acc_token=e6bb69a4c5474e4987130585951b6f3e HTTP/1.0 +Authorization: Bearer broker +Content-Length: 329 +Content-Type: application/json Host: lb-api-sandbox.prozorro.gov.ua DATA: { @@ -23,9 +23,9 @@ Content-Type: application/json; charset=UTF-8 "url": "http://public-docs-sandbox.prozorro.gov.ua/get/5d1c2cddad3f45a3aac16cb29b81f97f?KeyID=a8968c46&Signature=E3RouA49wKUWYJ7BPlrzsmaNUW69ZPMHhlKAAOoUy3gSRyJaA98YqWOvmbQ30Z0oCAQ44WCDW4wlwGZV0RXjCA%253D%253D", "format": "application/pdf", "documentOf": "tender", - "datePublished": "2020-05-15T01:00:01+03:00", - "id": "90a4fef3a0f545f4807445bbd4017f29", - "dateModified": "2020-05-15T01:00:01+03:00" + "datePublished": "2020-05-01T01:00:01+03:00", + "dateModified": "2020-05-01T01:00:01+03:00", + "id": "90a4fef3a0f545f4807445bbd4017f29" } } diff --git a/docs/source/tendering/http/tutorial/update-cancellation-doc.http b/docs/source/tendering/http/tutorial/update-cancellation-doc.http index 60ac5abc72..5a526824c9 100644 --- a/docs/source/tendering/http/tutorial/update-cancellation-doc.http +++ b/docs/source/tendering/http/tutorial/update-cancellation-doc.http @@ -1,7 +1,7 @@ -PUT /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/cancellations/d4d0fafa7fbf40b8b171adc3651ed356/documents/2c95fa8b548444c08d8575bfc95f0bea?acc_token=e6bb69a4c5474e4987130585951b6f3e HTTP/1.0 -Authorization: Bearer broker -Content-Length: 322 -Content-Type: application/json +PUT /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/cancellations/d4d0fafa7fbf40b8b171adc3651ed356/documents/2c95fa8b548444c08d8575bfc95f0bea?acc_token=e6bb69a4c5474e4987130585951b6f3e HTTP/1.0 +Authorization: Bearer broker +Content-Length: 322 +Content-Type: application/json Host: lb-api-sandbox.prozorro.gov.ua DATA: { @@ -19,13 +19,13 @@ Content-Type: application/json; charset=UTF-8 "data": { "hash": "md5:00000000000000000000000000000000", "description": "Changed description", - "title": "Notice-2.pdf", - "url": "http://public-docs-sandbox.prozorro.gov.ua/get/c9f250e2f74e4e8e95a882add5b4401a?KeyID=a8968c46&Signature=zr1a4Vd8WIGqoGAskp1DDf5%252BQzA6WJ5nV1uzXJIgIc3nK%2FJFCw%252BGK4aIT7vCv8qv8WTHWJ4%252BN%2Fb5gGIWIzYKAQ%253D%253D", "format": "application/pdf", + "url": "http://public-docs-sandbox.prozorro.gov.ua/get/c9f250e2f74e4e8e95a882add5b4401a?KeyID=a8968c46&Signature=zr1a4Vd8WIGqoGAskp1DDf5%252BQzA6WJ5nV1uzXJIgIc3nK%2FJFCw%252BGK4aIT7vCv8qv8WTHWJ4%252BN%2Fb5gGIWIzYKAQ%253D%253D", + "title": "Notice-2.pdf", "documentOf": "tender", - "datePublished": "2020-05-15T01:00:03+03:00", - "id": "2c95fa8b548444c08d8575bfc95f0bea", - "dateModified": "2020-05-15T01:00:03+03:00" + "datePublished": "2020-05-01T01:00:03+03:00", + "dateModified": "2020-05-01T01:00:03+03:00", + "id": "2c95fa8b548444c08d8575bfc95f0bea" } } diff --git a/docs/source/tendering/http/tutorial/upload-award-criteria.http b/docs/source/tendering/http/tutorial/upload-award-criteria.http index 4a1a3da4f4..8dfb72f555 100644 --- a/docs/source/tendering/http/tutorial/upload-award-criteria.http +++ b/docs/source/tendering/http/tutorial/upload-award-criteria.http @@ -1,7 +1,7 @@ -POST /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/documents?acc_token=e6bb69a4c5474e4987130585951b6f3e HTTP/1.0 -Authorization: Bearer broker -Content-Length: 337 -Content-Type: application/json +POST /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/documents?acc_token=e6bb69a4c5474e4987130585951b6f3e HTTP/1.0 +Authorization: Bearer broker +Content-Length: 337 +Content-Type: application/json Host: lb-api-sandbox.prozorro.gov.ua DATA: { @@ -24,9 +24,9 @@ Location: http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/bc3a9016b29d4fed "url": "http://public-docs-sandbox.prozorro.gov.ua/get/55286412717f4997b35cde1cdc8ca4a3?KeyID=a8968c46&Signature=SLJwlJyNeYyhfqlj5fjfDUM5HpgwZKwSFTALjLjeIuv5mzql8Jjjua0WO8iNogqE6c0DA0%252BkyD8utzz3zI27BA%253D%253D", "format": "application/pdf", "documentOf": "tender", - "datePublished": "2020-05-15T01:00:01+03:00", - "id": "90a4fef3a0f545f4807445bbd4017f29", - "dateModified": "2020-05-15T01:00:01+03:00" + "datePublished": "2020-05-01T01:00:01+03:00", + "dateModified": "2020-05-01T01:00:01+03:00", + "id": "90a4fef3a0f545f4807445bbd4017f29" } } diff --git a/docs/source/tendering/http/tutorial/upload-bid-proposal.http b/docs/source/tendering/http/tutorial/upload-bid-proposal.http index 24fb697995..829d7c66d3 100644 --- a/docs/source/tendering/http/tutorial/upload-bid-proposal.http +++ b/docs/source/tendering/http/tutorial/upload-bid-proposal.http @@ -1,7 +1,7 @@ -POST /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/bids/b31ec66637a141c7bb03446a0f22f5dc/documents?acc_token=7a7e299c46ba4430a2a63af9bf91af30 HTTP/1.0 -Authorization: Bearer broker -Content-Length: 326 -Content-Type: application/json +POST /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/bids/b31ec66637a141c7bb03446a0f22f5dc/documents?acc_token=7a7e299c46ba4430a2a63af9bf91af30 HTTP/1.0 +Authorization: Bearer broker +Content-Length: 326 +Content-Type: application/json Host: lb-api-sandbox.prozorro.gov.ua DATA: { @@ -23,9 +23,9 @@ Location: http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/bc3a9016b29d4fed "url": "http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/bids/b31ec66637a141c7bb03446a0f22f5dc/documents/86cd9a1b304d4530852984610d67c933?download=748412273ae54b27a3606febdfe1bc93", "format": "application/pdf", "documentOf": "tender", - "datePublished": "2020-05-15T01:00:01+03:00", - "id": "86cd9a1b304d4530852984610d67c933", - "dateModified": "2020-05-15T01:00:01+03:00" + "datePublished": "2020-05-01T01:00:01+03:00", + "dateModified": "2020-05-01T01:00:01+03:00", + "id": "86cd9a1b304d4530852984610d67c933" } } diff --git a/docs/source/tendering/http/tutorial/upload-cancellation-doc.http b/docs/source/tendering/http/tutorial/upload-cancellation-doc.http index 1646fe03ea..8b1d20bc87 100644 --- a/docs/source/tendering/http/tutorial/upload-cancellation-doc.http +++ b/docs/source/tendering/http/tutorial/upload-cancellation-doc.http @@ -1,7 +1,7 @@ -POST /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/cancellations/d4d0fafa7fbf40b8b171adc3651ed356/documents?acc_token=e6bb69a4c5474e4987130585951b6f3e HTTP/1.0 -Authorization: Bearer broker -Content-Length: 326 -Content-Type: application/json +POST /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/cancellations/d4d0fafa7fbf40b8b171adc3651ed356/documents?acc_token=e6bb69a4c5474e4987130585951b6f3e HTTP/1.0 +Authorization: Bearer broker +Content-Length: 326 +Content-Type: application/json Host: lb-api-sandbox.prozorro.gov.ua DATA: { @@ -23,9 +23,9 @@ Location: http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/bc3a9016b29d4fed "url": "http://public-docs-sandbox.prozorro.gov.ua/get/888a378eb7764d1693a1fec763cb806f?KeyID=a8968c46&Signature=66iYlHWRzl%252BEJRqmPqx781kVoy2WJlTVVKmZsNxrbNcxI0ib35aJ507wHARZ0lNebq9cfxuwi161lXFPn2NEAw%253D%253D", "format": "application/pdf", "documentOf": "tender", - "datePublished": "2020-05-15T01:00:03+03:00", - "id": "2c95fa8b548444c08d8575bfc95f0bea", - "dateModified": "2020-05-15T01:00:03+03:00" + "datePublished": "2020-05-01T01:00:03+03:00", + "dateModified": "2020-05-01T01:00:03+03:00", + "id": "2c95fa8b548444c08d8575bfc95f0bea" } } diff --git a/docs/source/tendering/http/tutorial/upload-tender-notice.http b/docs/source/tendering/http/tutorial/upload-tender-notice.http index bfab3552d7..e26f608fcf 100644 --- a/docs/source/tendering/http/tutorial/upload-tender-notice.http +++ b/docs/source/tendering/http/tutorial/upload-tender-notice.http @@ -1,7 +1,7 @@ -POST /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/documents?acc_token=e6bb69a4c5474e4987130585951b6f3e HTTP/1.0 -Authorization: Bearer broker -Content-Length: 326 -Content-Type: application/json +POST /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/documents?acc_token=e6bb69a4c5474e4987130585951b6f3e HTTP/1.0 +Authorization: Bearer broker +Content-Length: 326 +Content-Type: application/json Host: lb-api-sandbox.prozorro.gov.ua DATA: { @@ -24,9 +24,9 @@ Location: http://lb-api-sandbox.prozorro.gov.ua/api/2.5/tenders/bc3a9016b29d4fed "url": "http://public-docs-sandbox.prozorro.gov.ua/get/4d52879c11df4aa7ae80d3b6c4a274ce?KeyID=a8968c46&Signature=BiR23Y26fUFdAaBBqxSqN2Lv29UkW8VjpoZA0NLoVj2cgKeSq3J%2FiuGzva%252Bl0R6wpgLbA2zfat9mNkErf3HjAg%253D%253D", "format": "application/pdf", "documentOf": "tender", - "datePublished": "2020-05-15T01:00:01+03:00", - "id": "8a3d30101dc94ca58f768bec6a1f45dd", - "dateModified": "2020-05-15T01:00:01+03:00" + "datePublished": "2020-05-01T01:00:01+03:00", + "dateModified": "2020-05-01T01:00:01+03:00", + "id": "8a3d30101dc94ca58f768bec6a1f45dd" } } diff --git a/docs/tests/test_belowthreshold.py b/docs/tests/test_belowthreshold.py index 86a769a84f..7a7b0252d5 100644 --- a/docs/tests/test_belowthreshold.py +++ b/docs/tests/test_belowthreshold.py @@ -2,6 +2,8 @@ import os from copy import deepcopy from uuid import uuid4 + +import jmespath from datetime import timedelta from openprocurement.api.models import get_now @@ -468,6 +470,8 @@ def test_docs_tutorial(self): }}) self.assertEqual(response.status, '201 Created') + contract_first_document_id = response.json["data"]["id"] + with open(TARGET_DIR + 'tutorial/tender-contract-get-documents.http', 'w') as self.app.file_obj: response = self.app.get('/tenders/{}/contracts/{}/documents'.format( self.tender_id, self.contract_id)) @@ -484,6 +488,7 @@ def test_docs_tutorial(self): 'format': 'application/msword', }}) self.assertEqual(response.status, '201 Created') + contract_second_document_id = response.json["data"]["id"] with open(TARGET_DIR + 'tutorial/tender-contract-get-documents-again.http', 'w') as self.app.file_obj: response = self.app.get('/tenders/{}/contracts/{}/documents'.format( @@ -499,20 +504,93 @@ def test_docs_tutorial(self): {'data': {"dateSigned": get_now().isoformat()}}) self.assertEqual(response.status, '200 OK') - #### Contract signing + #### Contract signing procedure + # Checking if contract has the `pending` status + + with open(TARGET_DIR + 'tutorial/get-tender-contracts.http', 'w') as self.app.file_obj: + response = self.app.get("/tenders/{}/contracts/{}".format(self.tender_id, self.contract_id)) + self.assertEqual(response.json["data"]["status"], "pending") + contract = response.json["data"] + contract_id = contract["id"] + + + # Contract preparation + + # To identify a winner supplier we need to find a bid which owner won an auction. + # Bid and award should be in the status `active`. tender = self.db.get(self.tender_id) - for i in tender.get('awards', []): - i['complaintPeriod']['endDate'] = i['complaintPeriod']['startDate'] + bid_id = jmespath.search("awards[?id=='{}'].bid_id".format(contract["awardID"]), tender)[0] + bid_token = jmespath.search("bids[?id=='{}'].owner_token".format(bid_id), tender)[0] + + for bid in tender.get("bids", []): + if bid["id"] == bid_id and bid["status"] == "pending": + bid["status"] = "active" + for i in tender.get("awards", []): + if 'complaintPeriod' in i: + i["complaintPeriod"]["endDate"] = i["complaintPeriod"]["startDate"] + if 'value' in tender['contracts'][0] and tender['contracts'][0]['value']['valueAddedTaxIncluded']: + tender['contracts'][0]['value']['amountNet'] = str(float(tender['contracts'][0]['value']['amount']) - 1) self.db.save(tender) - with open(TARGET_DIR + 'tutorial/tender-contract-sign.http', 'w') as self.app.file_obj: + # Changing a contract status to `pending.winner-signing` by the tender owner + + with open(TARGET_DIR + 'tutorial/change-contract-status-to-pending-winner-signing-by-owner.http', 'w') as self.app.file_obj: response = self.app.patch_json( - '/tenders/{}/contracts/{}?acc_token={}'.format( - self.tender_id, self.contract_id, owner_token), - {'data': {'status': 'active'}}) - self.assertEqual(response.status, '200 OK') + "/tenders/{}/contracts/{}?acc_token={}".format(self.tender_id, self.contract_id, owner_token), + {"data": {"status": "pending.winner-signing"}} + ) + self.assertEqual(response.status, "200 OK") + + # Uploading a sign document to the contract document by supplier + with open(TARGET_DIR + 'tutorial/tender-contract-upload-sign-file-by-supplier.http', 'w') as self.app.file_obj: + response = self.app.post_json( + "/tenders/{}/contracts/{}/documents?acc_token={}".format(self.tender_id, self.contract_id, bid_token), + { + "data": { + "title": u"supplier_first_document_sign.pkcs7", + "url": self.generate_docservice_url(), + "hash": "md5:" + "0" * 32, + "format": "application/pkcs7-signature", + "documentOf": "document", + "relatedItem": contract_first_document_id, + } + }, + status=201 + ) + self.assertEqual(response.status, "201 Created") + doc_id = response.json["data"]["id"] + + # Changing a contract status to `pending` by supplier + + with open(TARGET_DIR + 'tutorial/change-contract-status-to-pending-by-supplier.http', 'w') as self.app.file_obj: + response = self.app.patch_json( + "/tenders/{}/contracts/{}?acc_token={}".format(self.tender_id, contract_id, bid_token), + {"data": {"status": "pending"}} + ) + self.assertEqual(response.status, "200 OK") + + # Uploading a sign document to the contract document by owner + + with open(TARGET_DIR + 'tutorial/tender-contract-upload-sign-file-by-owner.http', 'w') as self.app.file_obj: + + response = self.app.post_json( + "/tenders/{}/contracts/{}/documents?acc_token={}".format(self.tender_id, self.contract_id, owner_token), + { + "data": { + "title": u"owner_first_document_sign.pkcs7", + "url": self.generate_docservice_url(), + "hash": "md5:" + "0" * 32, + "format": "application/pkcs7-signature", + "documentOf": "document", + "relatedItem": contract_first_document_id, + } + }, + status=201 + ) + self.assertEqual(response.status, "201 Created") + # Preparing the cancellation request self.set_status('active.awarded')