Skip to content

Instantly share code, notes, and snippets.

@NekoTashi
Last active November 11, 2015 17:44
Show Gist options
  • Select an option

  • Save NekoTashi/2f631414834f9f2f9071 to your computer and use it in GitHub Desktop.

Select an option

Save NekoTashi/2f631414834f9f2f9071 to your computer and use it in GitHub Desktop.

Orders

POST

Pedir orden

/api/order/

curl -v -X POST http://localhost:8000/api/orders/ \
    -H 'Content-type: application/json' \
    -H 'Authorization: Token d492cfcb3f06cb1fb9a6a69bd945ed20c27ed27f' \
    -d '{"address": "WASHIMINGO", "order_phone": "56973326102", "items": [{"product":4, "quantity":3}, {"product":5, "quantity":2}]}' \
    | python -m json.tool

GET

Existe orden pendiente

/api/orders/

curl -v -X GET http://localhost:8000/api/orders/?username=revolS \
    -H 'Content-type: application/json' \
    -H 'Authorization: Token d492cfcb3f06cb1fb9a6a69bd945ed20c27ed27f' \
    | python -m json.tool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment