Tags
python
Asked 2 years ago
27 Jan 2022
Views 499
kiran

kiran posted

make Amazon product purchase by program ?




Is there any way to buy products from amazon with code automatically?


ravi

ravi
answered Feb 1 '22 00:00

Does Amazon have an order API?
yes , With the Orders API section of Amazon Marketplace Web Service (Amazon MWS), you can build simple applications that retrieve only the order information that you need.

Does Amazon have a purchase order API?
No, there is no official API for buy product from Amazon.
jqueryLearner

jqueryLearner
answered Jan 27 '22 00:00

try to use Scrapy


Writing a spider to crawl a site and signup or login with code

and try to order with Scrapy code which calls Spider

denyy

denyy
answered Jan 27 '22 00:00

buying amazon with a legal way
1
I heard that: Amazon Business offers exclusive price savings and shipping benefits for its registered business members. Anyone with a business account can purchase via Amazon.com.

2
OR YOU CAN SIGN UP WITH AMAZON FOR AFFILIATE PROGRAMM
where you redirect to amazon, instead of ordering at your site it goes to Amazon.
steave ray

steave ray
answered Feb 1 '22 00:00

use API from https://zincapi.com/,
Order from Amazon, Walmart, AliExpress, and more with a POST

create order api :
https://docs.zincapi.com/#orders
sample api request :

curl "https://api.zinc.io/v1/orders" \
  -u <client_token>: \
  -d '{
  "retailer": "amazon",
  "products": [
    {
      "product_id": "B0016NHH56",
      "quantity": 1
    }
  ],
  "max_price": 2300,
  "shipping_address": {
    "first_name": "Tim",
    "last_name": "Beaver",
    "address_line1": "77 Massachusetts Avenue",
    "address_line2": "",
    "zip_code": "02139",
    "city": "Cambridge",
    "state": "MA",
    "country": "US",
    "phone_number": "5551230101"
  },
  "is_gift": true,
  "gift_message": "Here is your package, Tim! Enjoy!",
  "shipping": {
    "order_by": "price",
    "max_days": 5,
    "max_price": 1000
  },
  "payment_method": {
    "name_on_card": "Ben Bitdiddle",
    "number": "5555555555554444",
    "security_code": "123",
    "expiration_month": 1,
    "expiration_year": 2020,
    "use_gift": false
  },
  "billing_address": {
    "first_name": "William",
    "last_name": "Rogers",
    "address_line1": "84 Massachusetts Ave",
    "address_line2": "",
    "zip_code": "02139",
    "city": "Cambridge",
    "state": "MA",
    "country": "US",
    "phone_number": "5551234567"
  },
  "retailer_credentials": {
    "email": "timbeaver@gmail.com",
    "password": "myRetailerPassword",
    "totp_2fa_key": "3DE4 3ERE 23WE WIKJ GRSQ VOBG CO3D METM 2NO2 OGUX Z7U4 DP2H UYMA"
  },
  "webhooks": {
    "request_succeeded": "http://mywebsite.com/zinc/request_succeeded",
    "request_failed": "http://mywebsite.com/zinc/requrest_failed",
    "tracking_obtained": "http://mywebsite.com/zinc/tracking_obtained"
  },
  "client_notes": {
    "our_internal_order_id": "abc123",
    "any_other_field": ["any value"]
  }
}'


ruby code sample :
https://rubygems.org/gems/zinc-api/versions/0.0.6
Post Answer