2 Phase Commit

Creating auction with 2 Phase Commit

Let’s create auction in draft status:

POST /api/2.3/auctions?opt_pretty=1 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 2168
Content-Type: application/json
Host: api-sandbox.ea.openprocurement.org

{
  "data": {
    "status": "draft",
    "title": "футляри до державних нагород",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35
    },
    "auctionPeriod": {
      "startDate": "2017-02-15"
    },
    "tenderAttempts": 1,
    "procurementMethodType": "dgfOtherAssets",
    "value": {
      "currency": "UAH",
      "amount": 100
    },
    "dgfDecisionDate": "2016-11-17",
    "dgfID": "219560",
    "dgfDecisionID": "219560",
    "procurementMethodDetails": "quick, accelerator=1440",
    "items": [
      {
        "description": "Земля для військовослужбовців",
        "classification": {
          "scheme": "CAV",
          "id": "04114000-0",
          "description": "Земельні ділянки"
        },
        "address": {
          "countryName": "Україна",
          "postalCode": "79000",
          "region": "м. Київ",
          "streetAddress": "вул. Банкова 1",
          "locality": "м. Київ"
        },
        "schema_properties": {
          "code": "04114000-0",
          "version": "latest",
          "properties": {
            "number_of_rooms": 4,
            "total_area": 4
          }
        },
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "address": {
        "countryName": "Україна",
        "postalCode": "01220",
        "region": "м. Київ",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "locality": "м. Київ"
      }
    }
  }
}


201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.ea.openprocurement.org/api/2.3/auctions/f7be6c0b987146118d6505733a3e438c

{
  "access": {
    "token": "ee2b8301dccc492b93769179dbcbcd37"
  },
  "data": {
    "procurementMethod": "open",
    "auctionID": "UA-EA-2017-02-01-000001",
    "enquiryPeriod": {
      "startDate": "2017-02-01T13:22:11.463782+02:00",
      "endDate": "2017-02-14T23:59:50+02:00"
    },
    "submissionMethod": "electronicAuction",
    "dgfDecisionDate": "2016-11-17",
    "awardCriteria": "highestCost",
    "dgfDecisionID": "219560",
    "owner": "broker",
    "id": "f7be6c0b987146118d6505733a3e438c",
    "documents": [
      {
        "title": "Місце та форма прийому заяв на участь в аукціоні та банківські реквізити для зарахування гарантійних внесків",
        "url": "http://torgi.fg.gov.ua/prozorrosale",
        "documentOf": "tender",
        "datePublished": "2017-02-01T13:22:11.464263+02:00",
        "documentType": "x_dgfPlatformLegalDetails",
        "dateModified": "2017-02-01T13:22:11.464309+02:00",
        "id": "db319013c1844deeb18e076568c6ba37"
      }
    ],
    "title": "футляри до державних нагород",
    "tenderAttempts": 1,
    "dateModified": "2017-02-01T13:22:11.476680+02:00",
    "status": "draft",
    "tenderPeriod": {
      "startDate": "2017-02-01T13:22:11.463782+02:00",
      "endDate": "2017-02-14T23:59:50+02:00"
    },
    "procurementMethodDetails": "quick, accelerator=1440",
    "procurementMethodType": "dgfOtherAssets",
    "dgfID": "219560",
    "date": "2017-02-01T13:22:11.463782+02:00",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "Земля для військовослужбовців",
        "classification": {
          "scheme": "CAV",
          "description": "Земельні ділянки",
          "id": "04114000-0"
        },
        "address": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "schema_properties": {
          "code": "041",
          "version": "001",
          "properties": {
            "number_of_rooms": 4,
            "total_area": 4
          }
        },
        "id": "5c656e483fa043e7b16a1f53d6ce7941",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 100.0,
      "valueAddedTaxIncluded": true
    },
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "address": {
        "postalCode": "01220",
        "countryName": "Україна",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "region": "м. Київ",
        "locality": "м. Київ"
      }
    }
  }
}

And now let’s switch to active.tendering status:

PATCH /api/2.3/auctions/f7be6c0b987146118d6505733a3e438c?acc_token=ee2b8301dccc492b93769179dbcbcd37 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 40
Content-Type: application/json
Host: api-sandbox.ea.openprocurement.org

{
  "data": {
    "status": "active.tendering"
  }
}


200 OK
Content-Type: application/json; charset=UTF-8

{
  "data": {
    "procurementMethod": "open",
    "auctionID": "UA-EA-2017-02-01-000001",
    "enquiryPeriod": {
      "startDate": "2017-02-01T13:22:11.463782+02:00",
      "endDate": "2017-02-14T23:59:50+02:00"
    },
    "submissionMethod": "electronicAuction",
    "dgfDecisionDate": "2016-11-17",
    "next_check": "2017-02-14T23:59:50+02:00",
    "awardCriteria": "highestCost",
    "dgfDecisionID": "219560",
    "owner": "broker",
    "id": "f7be6c0b987146118d6505733a3e438c",
    "documents": [
      {
        "title": "Місце та форма прийому заяв на участь в аукціоні та банківські реквізити для зарахування гарантійних внесків",
        "url": "http://torgi.fg.gov.ua/prozorrosale",
        "documentOf": "tender",
        "datePublished": "2017-02-01T13:22:11.464263+02:00",
        "documentType": "x_dgfPlatformLegalDetails",
        "dateModified": "2017-02-01T13:22:11.464309+02:00",
        "id": "db319013c1844deeb18e076568c6ba37"
      }
    ],
    "title": "футляри до державних нагород",
    "tenderAttempts": 1,
    "procurementMethodDetails": "quick, accelerator=1440",
    "dateModified": "2017-02-01T13:22:11.611343+02:00",
    "status": "active.tendering",
    "tenderPeriod": {
      "startDate": "2017-02-01T13:22:11.463782+02:00",
      "endDate": "2017-02-14T23:59:50+02:00"
    },
    "auctionPeriod": {
      "shouldStartAfter": "2017-02-15T00:00:00+02:00"
    },
    "procurementMethodType": "dgfOtherAssets",
    "dgfID": "219560",
    "date": "2017-02-01T13:22:11.611343+02:00",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "Земля для військовослужбовців",
        "classification": {
          "scheme": "CAV",
          "description": "Земельні ділянки",
          "id": "04114000-0"
        },
        "address": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "schema_properties": {
          "code": "041",
          "version": "001",
          "properties": {
            "number_of_rooms": 4,
            "total_area": 4
          }
        },
        "id": "5c656e483fa043e7b16a1f53d6ce7941",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 100.0,
      "valueAddedTaxIncluded": true
    },
    "procuringEntity": {
      "contactPoint": {
        "name": "Державне управління справами",
        "telephone": "0440000000"
      },
      "identifier": {
        "scheme": "UA-EDR",
        "id": "00037256",
        "uri": "http://www.dus.gov.ua/"
      },
      "name": "Державне управління справами",
      "address": {
        "postalCode": "01220",
        "countryName": "Україна",
        "streetAddress": "вул. Банкова, 11, корпус 1",
        "region": "м. Київ",
        "locality": "м. Київ"
      }
    }
  }
}