Skip to content

Latest commit

 

History

History
374 lines (337 loc) · 7.27 KB

negotiations.md

File metadata and controls

374 lines (337 loc) · 7.27 KB

Bukalapak Negotiations API

Bukalapak Negotiations API

Negotation Listing

Get list of negotiations owned by user

  • Use GET http method.
  • Requires authentication
Resource URL
Parameters
  • page (optional).
  • per_page (required).
Example Request
curl -u 110677:JheQQS0OKApu3hGJwkRH https://api.bukalapak.com/v1/negotiations.json
Example Response

Successfull example

{
  "status":"OK",
  "negotiations":[
  {
    "id":10530,
    "state":"rejected",
    "product":
    {
      "name":"BL Test-17",
      "url":"https://www.bukalapak.com/p/fashion/men/accessories-jewelry-170/fq96_-bl-test-17"
    },
    "normal_price":100000,
    "quantity":1,
    "nego_price":10000,
    "actions":[],
    "buyer":
    {
      "id":31432,
      "name":"Khairul",
      "username":"kahirul"
    },
    "seller":
    {
      "id":62817,
      "name":"Sayur Kangkung",
      "username":"sayurkangkung"
    }
  }
  ...
  ],
  "message": null
}

Accept Negotation

Accept incoming negotiation

  • Use PUT http method.
  • Requires authentication
Resource URL
Parameters

None

Example Request
curl -u 110677:JheQQS0OKApu3hGJwkRH -d {} https://api.bukalapak.com/v1/negotiations/124/accept.json -X PUT
Example Response

Successfull example

{
  "status":"OK",
  "negotiation":[
  {
    "id":124,
    "state":"accepted",
    "product":
    {
      "name":"BL Test-17",
      "url":"https://www.bukalapak.com/p/fashion/men/accessories-jewelry-170/fq96_-bl-test-17"
    },
    "normal_price":100000,
    "quantity":1,
    "nego_price":10000,
    "actions":[],
    "buyer":
    {
      "id":31432,
      "name":"Khairul",
      "username":"kahirul"
    },
    "seller":
    {
      "id":62817,
      "name":"Sayur Kangkung",
      "username":"sayurkangkung"
    }
  }
  ...
  ],
  "message": null
}

Failed example

{
  "status":"ERROR",
  "negotiation": nil,
  "message": "Stock not available"
}

Reject Negotation

Reject incoming negotiation

  • Use PUT http method.
  • Requires authentication
Resource URL
Parameters

None

Example Request
curl -u 110677:JheQQS0OKApu3hGJwkRH -d {} https://api.bukalapak.com/v1/negotiations/124/reject.json -X PUT
Example Response

Successfull example

{
  "status":"OK",
  "negotiation":[
  {
    "id":124,
    "state":"rejected",
    "product":
    {
      "name":"BL Test-17",
      "url":"https://www.bukalapak.com/p/fashion/men/accessories-jewelry-170/fq96_-bl-test-17"
    },
    "normal_price":100000,
    "quantity":1,
    "nego_price":10000,
    "actions":[],
    "buyer":
    {
      "id":31432,
      "name":"Khairul",
      "username":"kahirul"
    },
    "seller":
    {
      "id":62817,
      "name":"Sayur Kangkung",
      "username":"sayurkangkung"
    }
  }
  ...
  ],
  "message": null
}

Failed example

{
  "status":"ERROR",
  "negotiation": nil,
  "message": null
}