Skip to content

Instantly share code, notes, and snippets.

@selwin
Last active December 18, 2015 00:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save selwin/5696156 to your computer and use it in GitHub Desktop.
Save selwin/5696156 to your computer and use it in GitHub Desktop.
Stamps API example
curl -X POST -H "Content-Type: application/json" https://stamps.co.id/api/transactions/add -i -d '{ "token": "830a2413ccccd3f82ec39f10f8cf5852ea518815", "user_email": "kingman@softwarerestoran.com", "store": 104, "invoice_number": "2", "total_value": 50000 }'
# On Windows, double quotes need to be escaped:
curl -k -X POST -H "Content-Type: application/json" https://stamps.co.id/api/transactions/add -i -d "{ \"token\": \"6ef480e7ac6d374f5e29fdd9abff8cbfbbb9a7ea\", \"user_email\": \"customer@stamps.co.id\", \"store\": 11, \"invoice_number\": \"invoice_2\", \"total_value\": 50000}"
curl -k -X POST -H "Content-Type: application/json" https://stamps.co.id/api/transactions/add -i -d "{ \"token\": \"6ef480e7ac6d374f5e29fdd9abff8cbfbbb9a7ea\", \"user_email\": \"customer@stamps.co.id\", \"store\": 11, \"invoice_number\": \"invoice_3\", \"total_value\": 50000, \"items\": [{\"product_name\": \"Cappucino\", \"quantity\": 2, \"price\": 10000}, {\"product_name\": \"Iced Tea\", \"quantity\": 4, \"price\": 5000}]}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment