Salesforce REST Api missing fields with PHP - php

I'm using the Salesforce REST API and found it very hard to find decent documentation.
I can successfully log in with OAuth and i can push new accounts to Salesforce.
I use the instance url to make the API calls and i send the following fields to create an account object:
Name
Rating
Description
The problem is that I created a free trial (which sits on na9.salesforce.com) and everything worked fine.
I created a second free trial to check if everything works with another account, but the rating field is not available... I get the following message from Salesforce:
"[{"message":"No such column 'rating' on sobject of Account"}]"
Why is that?
Also, is it possible to add notes to a created account using POST? And is it possible to create Leads instead of Accounts using the API?
Thanks in advance,

A feature called field level security (FLS) can mean that even standard fields are not accessible, check the FLS settings on account in your second org.
Docs for the REST API are on the developer force site

Related

Paypal REST API: How can I get authenticated users email/name without using the Identity API?

So it seems like https://developer.paypal.com/docs/api/identity/v1/ only works if you're using Connect with Paypal API. This isn't an option at the moment. I have a Paypal widget within my dashboard and users can add multiple accounts. I need an email or name to help my users distinguish this account from their others. I tried using /userinfo but I only received the user_id property.
Is there something I can do differently to get email/name from this endpoint or is there somewhere else I can get this data? This workflow is best for users but if needed I can have them manually enter the info on my application
What ended up working for me was making sure all permissions per enabled and I added my return URL. I was doing this to setup connect with paypal button but then tried a postman request and realized I could now get all user info needed

One stripe account with multiple webhooks for different services

I have already integrated Stripe payments into one of my websites, and all is working great (and I'm using a unique webhook for this website).
I have just created an entirely different service through another website of mine, and am in the process of integrating Stripe on that website too.
However I have one problem, as far as I can see, I have to use the same webhook for both of my services. This won't work tho!! I really need separate webhooks for each service... is this possible?
PS: I read on Stripe's docs that every event will be sent to every webhook in the list (https://dashboard.stripe.com/account/webhooks).
Please somebody shed some light!
This was such a tidy fix.
Simply log in to your Stripe dashboard, and in the top right click you account name and then click 'Create New Account'.
Props to Matthew for the answer which also matches Stripe's docs
You must use separate Stripe accounts for projects, websites, or businesses that operate independently from one another.
Log in to your Stripe Dashboard and there is a drop down option that shows your current account name on the top left hand side. Select it and add new account.

Is it possible to send an email to a list of users using Marketo API and PHP

I've got a Drupal website and I'd like to send an email via Marketo whenever a new post is created. I've got the Drupal side of things covered (I know how to create the custom module that will be triggered whenever a new content us created).
What I don't know is whether:
1) Marketo API allows for this?
2) How? As when I was trying to follow this tutorial, I got stuck on the $clientId and $clientSecret as these values are now available under Integration/LauchPoint nor in Integration/Web Services
Thanks!
You should have an admin account or something. http://developers.marketo.com/documentation/rest/custom-service/
Here is how you can obtain your client id and secret

Aweber developer/labs API working

I just created an account on https://labs.aweber.com/apps in order to test Aweber service. I created an app there too.
First,I'm trying to create a list (listname) in my this developer account, I"m not sure how to add a list to it? and can see app id, is this list_id?
Second, I'm trying to access this developer account using my plugin. I have downloaded a PHP library from their labs and it contains demo.php. I have found Consumer Key & Consumer secret keys from labs, and changed them in my demo.php and when i run demo.php it always takes me to:
https://auth.aweber.com/1.0/oauth/authorize?oauth_token=Aqz6ePpjxPrZ0DePqi3LDBmZ
I'm not user which login to use?
Third, I'm trying to add a subscriber to a list. How can i get accessKey,accessSecret,$account_id for below script?
https://labs.aweber.com/docs/code_samples/subs/create
Aweber's labs documentation are very short, they are not such clear about these things. Please give me your suggestions if any body have used Aweber's labs account for testing. Thanks
You also need to have an Aweber account. The developer account just gives you the privileges to create an app and talk to their API.
You then need a regular Aweber account to add subscribers or gets lists.

Integrating Fedex into your web application

I realize they have an API but some of
the questions I have wouldn't be
answered by it, and it would be great
to receive feedback from others who
have integrated it before.
I basically am working with a web site where visitors may choose to sell a used item to the site owner.
If the user decides to sell, he can enter in the specifications of the item and be given a quote. Then he'll proceed to enter in his address, which I assume I'll have to verify using the Fedex API before or during the part where it creates a shipping label.
So assuming the address is verified, it looks like the script in the API I have to interact with is /Ship/Ground/Domestic/ShipGroundDomestic.php5 ( since we will not integrate any other type of shipment type yet ).
Is this is the script that actually creates the shipment and charges the account setup, assuming all goes well it returns a xml response with the status?
Since it's SOAP based - I realize there are options for a pdf and png shipping label type, it looks like it generates the label but where is it actually stored, is it just temporary?
In the script it specifies options for a API Key, password, account #, and Meter # - so I would have to actually know the site owners credentials, since it charges for creating shipments/labels I can't use a normal account that doesn't have a CC setup, can I?
I can't actually test anything without contacting them and telling them to make my account go into test mode? Or is there an extra parameter for test mode?
I should store all shipments in a local database to pull them up, right? Or should I solely rely on Fedex for storing all the information? If I use a local database I can map shipments to users and use a Fedex provided script to look up the delivery status so I would think I have to do that.
If I were to have a feature that automatically emailed customers with status updates of a delivery, I would have to use some type of cron job to look and see if there were any updates made, I can't do this any other way?
If you are using the the Fedex Web Services API you get a test key by going to https://www.fedex.com/wpor/wpor/editConsult.do
(You may need to be already signed in).
The label it generates it just dumps into the current directory. That is obviously not acceptable for production code, since it does not even generate a unique file name, but the php file is example code. Modify the code they give to do whatever you want with the returned label.
You would want a local database.
Why would you want to send users updates? Is there any reason they cannot just use the tracking number and look it up themselves? I mean it would be possible to call the tracking API periodically and generate emails, but do users really want these emails?

Categories