To retrieve information about fields for a given object type (opportunities, contacts, accounts) I hit this endpoint:
https://na24.salesforce.com/services/data/v35.0/sobjects/{OBJECT-TYPE}/describe
When I attempt to retrieve a description of all fields for Opportunity and Contact, Salesforce reliably returns all fields. But when I try to retrieve fields for Accounts, the API will intermittently return just null
.
I have tried on a number of different versions of the API. The request seems to arbitrarily fail for Accounts only, independent of API version. Has anyone else run into this issue? Is there another way to retrieve all fields for an Account?
EDIT:
I'm interacting directly with the API here for an iOS application (Objective-C below). I've made sure that the URI is properly formed (object type properly inserted)
NSString *objectName = [manager _salesforceObjectNameForType:objectType];
NSString *uri = [NSString stringWithFormat:@"%@/services/data/v35.0/sobjects/%@/describe", manager.instanceURI, objectName ];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL: [NSURL URLWithString: uri ] ];
[request setTimeoutInterval:30];
[request setHTTPMethod:@"GET"];
[request setValue:[NSString stringWithFormat:@"Bearer %@", manager.token] forHTTPHeaderField:@"Authorization"];