Skip to content

Latest commit

 

History

History
437 lines (399 loc) · 9.98 KB

negotiations.md

File metadata and controls

437 lines (399 loc) · 9.98 KB

Bukalapak Negotiations API

Bukalapak Negotiations API

Negotiation Listing

Get list of negotiations owned by user

  • Use GET http method.
  • Requires authentication
Resource URL
Parameters
  • page (optional).
  • per_page (optional).
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":
    {
      "id":1069174,
      "category":"Buku",
      "category_id":60,
      "category_structure":["Hobi & Hiburan","Buku"],
      "name":"Buku Palsu",
      "city":"Jakarta Barat",
      "province":"DKI Jakarta",
      "price":20000,"weight":"1000",
      "images":["http://www.local.host:3000/system/images/2/6/0/0/3/5/9/large/Screenshot_-_111113_-_15_47_03.png?1384836182"],
      "small_images":["http://www.local.host:3000/system/images/2/6/0/0/3/5/9/small/Screenshot_-_111113_-_15_47_03.png?1384836182"],
      "url":"http://www.local.host:3000/p/hobi-hiburan/buku/mwza-jual-buku-palsu",
      "desc":"asdasd",
      "condition":"new",
      "nego":false,
      "seller_name":"Liem Lie Wie",
      "payment_ready":true,
      "stock":49999,
      "specs":{"type":null},
      "state_description":[]
    },
    "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 Negotiation

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":
    {
      "id":1069174,
      "category":"Buku",
      "category_id":60,
      "category_structure":["Hobi & Hiburan","Buku"],
      "name":"Buku Palsu",
      "city":"Jakarta Barat",
      "province":"DKI Jakarta",
      "price":20000,"weight":"1000",
      "images":["http://www.local.host:3000/system/images/2/6/0/0/3/5/9/large/Screenshot_-_111113_-_15_47_03.png?1384836182"],
      "small_images":["http://www.local.host:3000/system/images/2/6/0/0/3/5/9/small/Screenshot_-_111113_-_15_47_03.png?1384836182"],
      "url":"http://www.local.host:3000/p/hobi-hiburan/buku/mwza-jual-buku-palsu",
      "desc":"asdasd",
      "condition":"new",
      "nego":false,
      "seller_name":"Liem Lie Wie",
      "payment_ready":true,
      "stock":49999,
      "specs":{"type":null},
      "state_description":[]
    },
    "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 Negotiation

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":
    {
      "id":1069174,
      "category":"Buku",
      "category_id":60,
      "category_structure":["Hobi & Hiburan","Buku"],
      "name":"Buku Palsu",
      "city":"Jakarta Barat",
      "province":"DKI Jakarta",
      "price":20000,"weight":"1000",
      "images":["http://www.local.host:3000/system/images/2/6/0/0/3/5/9/large/Screenshot_-_111113_-_15_47_03.png?1384836182"],
      "small_images":["http://www.local.host:3000/system/images/2/6/0/0/3/5/9/small/Screenshot_-_111113_-_15_47_03.png?1384836182"],
      "url":"http://www.local.host:3000/p/hobi-hiburan/buku/mwza-jual-buku-palsu",
      "desc":"asdasd",
      "condition":"new",
      "nego":false,
      "seller_name":"Liem Lie Wie",
      "payment_ready":true,
      "stock":49999,
      "specs":{"type":null},
      "state_description":[]
    },
    "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
}

Dictionary

  • state State of negotiation. Possible values are as listed
    • waiting initial state. Negotiation newly created and waiting for seller response
    • accepted negotiation has been accepted by seller
    • rejected negotiation has been rejected by seller
    • finished negotiation has been accepted by seller and paid by buyer
    • expired negotiation has been expired
    • 'cancelled' negotiation has been cancelled by buyer
  • actions Actions that can be performed by current user. Possible values are