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: 1987
Content-Type: application/json
Host: api-sandbox.ea.openprocurement.org

{
  "data": {
    "status": "draft",
    "title": "футляри до державних нагород",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35
    },
    "procurementMethodDetails": "quick, accelerator=1440",
    "tenderAttempts": 1,
    "procurementMethodType": "dgfOtherAssets",
    "value": {
      "currency": "UAH",
      "amount": 100
    },
    "dgfID": "219560",
    "auctionPeriod": {
      "startDate": "2017-04-12"
    },
    "items": [
      {
        "classification": {
          "scheme": "CPV",
          "id": "66113000-5",
          "description": "Земельні ділянки"
        },
        "quantity": 5,
        "description": "Земля для військовослужбовців",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "address": {
          "countryName": "Україна",
          "postalCode": "79000",
          "region": "м. Київ",
          "streetAddress": "вул. Банкова 1",
          "locality": "м. Київ"
        }
      }
    ],
    "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/72737375d94941d0be9101e03ad1f2ea

{
  "access": {
    "token": "0a361047084244efa11702da631adc67"
  },
  "data": {
    "procurementMethod": "open",
    "auctionID": "UA-PS-2017-03-29-000001",
    "tenderPeriod": {
      "startDate": "2017-03-29T15:47:28.230957+03:00",
      "endDate": "2017-04-11T23:59:50+03:00"
    },
    "title": "футляри до державних нагород",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "procurementMethodDetails": "quick, accelerator=1440",
    "tenderAttempts": 1,
    "procurementMethodType": "dgfOtherAssets",
    "value": {
      "currency": "UAH",
      "amount": 100.0,
      "valueAddedTaxIncluded": true
    },
    "submissionMethod": "electronicAuction",
    "date": "2017-03-29T15:47:28.230957+03:00",
    "status": "draft",
    "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": "м. Київ"
      }
    },
    "dgfID": "219560",
    "enquiryPeriod": {
      "startDate": "2017-03-29T15:47:28.230957+03:00",
      "endDate": "2017-04-11T23:59:50+03:00"
    },
    "owner": "broker",
    "dateModified": "2017-03-29T15:47:28.233931+03:00",
    "items": [
      {
        "description": "Земля для військовослужбовців",
        "classification": {
          "scheme": "CPV",
          "description": "Земельні ділянки",
          "id": "66113000-5"
        },
        "address": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "id": "06b4a0e8017347de80a227fec7fdc098",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "id": "72737375d94941d0be9101e03ad1f2ea",
    "awardCriteria": "highestCost"
  }
}

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

PATCH /api/2.3/auctions/72737375d94941d0be9101e03ad1f2ea?acc_token=0a361047084244efa11702da631adc67 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-PS-2017-03-29-000001",
    "enquiryPeriod": {
      "startDate": "2017-03-29T15:47:28.230957+03:00",
      "endDate": "2017-04-11T23:59:50+03:00"
    },
    "submissionMethod": "electronicAuction",
    "next_check": "2017-04-11T23:59:50+03:00",
    "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": "м. Київ"
      }
    },
    "owner": "broker",
    "id": "72737375d94941d0be9101e03ad1f2ea",
    "title": "футляри до державних нагород",
    "tenderAttempts": 1,
    "procurementMethodDetails": "quick, accelerator=1440",
    "dateModified": "2017-03-29T15:47:28.275761+03:00",
    "status": "active.tendering",
    "tenderPeriod": {
      "startDate": "2017-03-29T15:47:28.230957+03:00",
      "endDate": "2017-04-11T23:59:50+03:00"
    },
    "auctionPeriod": {
      "shouldStartAfter": "2017-04-12T00:00:00+03:00"
    },
    "procurementMethodType": "dgfOtherAssets",
    "dgfID": "219560",
    "date": "2017-03-29T15:47:28.275761+03:00",
    "minimalStep": {
      "currency": "UAH",
      "amount": 35.0,
      "valueAddedTaxIncluded": true
    },
    "items": [
      {
        "description": "Земля для військовослужбовців",
        "classification": {
          "scheme": "CPV",
          "description": "Земельні ділянки",
          "id": "66113000-5"
        },
        "address": {
          "postalCode": "79000",
          "countryName": "Україна",
          "streetAddress": "вул. Банкова 1",
          "region": "м. Київ",
          "locality": "м. Київ"
        },
        "id": "06b4a0e8017347de80a227fec7fdc098",
        "unit": {
          "code": "44617100-9",
          "name": "item"
        },
        "quantity": 5
      }
    ],
    "value": {
      "currency": "UAH",
      "amount": 100.0,
      "valueAddedTaxIncluded": true
    },
    "awardCriteria": "highestCost"
  }
}