API POSTing for large batches of data -


i trying add products deals in pipedrive - excel import doesn't allow that. api does. https://developers.pipedrive.com/v1

i complete beginner in of this, i've been able use postman chrome app add products:

post: https://api.pipedrive.com/v1/deals/:id/products?api_token=mytoken 

in postman, set variables :id (the deal), , mytoken.

in body section (raw/json), add following:

    [{ "product_id":34160, "item_price":25, "quantity":50 }, { "product_id":34160, "item_price":10, "quantity":50 }] 

which adds product 2 times deal. great!

so have basic questions making api calls, want make large update of data (100s of deals , products)

  • as complete beginner, how can make such api calls, on mass - many updates? there simple tool can that? need wrap code in html , make database? (hopefully not!)
  • in same action, i'd need dynamically pass :id in url variable. postman doesn't seem let me - possible. ease of data management - id exists on same row other changes.

thanks , suggestions, bearing in mind first time working api calls (little coding experience).

update: clarify, have csv 4 columns of data (as above), , need push through api. have no experience of doing - looking simplest method. things mytoken hard-coded in, no need form.

maybe code looking for:

import json import urllib  api_url = 'https://api.pipedrive.com/v1/deals/:id'  id_item = 'iphone' #insert id product  my_token = 'api_token='+'30938dñjfalñ032' #insert token  api = '%s/%s/%s' % (api_url, id_item,my_token)  response = urllib.urlopen(api)    data = json.loads(response.read())   print (data) 

look comments should enter api information , let's see if works.

regards


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -