Skip to content

Instantly share code, notes, and snippets.

@etagwerker
Created May 10, 2012 13:13
Show Gist options
  • Save etagwerker/2652909 to your computer and use it in GitHub Desktop.
Save etagwerker/2652909 to your computer and use it in GitHub Desktop.
Ombu Shop API: Ejemplo de Actualización de Variante
PUT /admin/variants/#{sku}.json
# Request
{
"variant": {
"sku": "remera-lacoste-verde",
"count_on_hand": 27
}
}
# OK Response
HTTP/1.1 200 OK[]
{
"variant": {
"id": 808950810,
"price": "199.00",
"cost_price": "100.00",
"product_id": 632910392,
"sku": "remera-lacoste-verde",
"updated_at": "2012-05-09T14:42:32-04:00",
"deleted_at": null,
"created_at": "2012-04-09T14:42:32-04:00",
"weight": "27.5",
"height": "175.30",
"width": "15.30",
"depth": "17.30",
"is_master": true,
"count_on_hand": 27,
"currency": "ARS",
"shipment_included": false
}
}
# Not Found Response
HTTP/1.1 404 NOT FOUND[]
# Error Response
HTTP/1.1 422 Unprocessable Entity[]
{
"errors": {
"variant": [
"not found"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment