API Docs
Pedidos
/orders/{externalId}
1 min
code examples curl location globoff request patch '/orders/{externalid}' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{ "items" \[ { "id" "", "price" "", "description" "" } ], "payment methods" \[ { "id" "", "amount" "" } ] }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "items" \[ { "id" "", "price" "", "description" "" } ], "payment methods" \[ { "id" "", "amount" "" } ] }); var requestoptions = { method 'patch', headers myheaders, body raw, redirect 'follow' }; fetch("/orders/{externalid}", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("/orders/{externalid}") http = net http new(url host, url port); request = net http patch new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request body = json dump({ "items" \[ { "id" "", "price" "", "description" "" } ], "payment methods" \[ { "id" "", "amount" "" } ] }) response = http request(request) puts response read body import requests import json url = "/orders/{externalid}" payload = json dumps({ "items" \[ { "id" "", "price" "", "description" "" } ], "payment methods" \[ { "id" "", "amount" "" } ] }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("patch", url, headers=headers, data=payload) print(response text) responses // pedido atualizado com sucesso { "id" 0, "configuration id" 0, "customer profile id" 0, "external id" "", "items" \[ { "id" "", "price" 0, "description" "" } ], "document" "12345678901", "total" 0, "discount" 0, "delivery date" "", "filial" "", "codigofilial" "", "cashback" 0, "status" "created", "two factor" false, "payment methods" \[ { "id" "", "amount" 0 } ], "cashback received" 0, "cashback limit" 0, "created at" "", "updated at" "" }