Guides and Examples
...
Revenue Lifecycle Management
Create Objects
10 min
the create objects api allows you to create object records directly in salesforce through nue's revenue lifecycle api this endpoint provides a generic, metadata driven interface for creating records required permission your api key must be associated with a role that has manage salesforce orders permission enabled under the "nue on salesforce" category endpoint post /api/objects/{objectname} supported objects object description customer create customer accounts (maps to salesforce account) important metadata driven fields the fields available are determined by your salesforce metadata configuration the fields documented below are common examples and may vary based on your organization's setup to see the exact fields available for your environment use the /docs/api references/metadata api to retrieve object definitions check your salesforce org's field configurations custom fields added to your salesforce objects will also be available authentication include your api key in the request header curl x post 'https //api nue io/api/objects/customer' \\ h 'nue api key your api key' \\ h 'content type application/json' request create a new customer account in your salesforce org curl x post 'https //api nue io/api/objects/customer' \\ h 'nue api key your api key' \\ h 'content type application/json' \\ d '{ "name" "acme corporation", "recordtype" "business" }' customer fields (examples) the following fields are commonly available your actual fields depend on your metadata configuration field type required description name string yes account name recordtype string no account record type (e g , "business", "individual") accountnumber string no account number email string no primary contact email phone string no phone number industry string no industry classification billingstreet string no billing street address billingcity string no billing city billingstate string no billing state/province billingpostalcode string no billing postal code billingcountry string no billing country shippingstreet string no shipping street address shippingcity string no shipping city shippingstate string no shipping state/province shippingpostalcode string no shipping postal code shippingcountry string no shipping country billcycleday string no day of month for billing cycle paymentterm string no payment terms (e g , "net30") paymentmethod string no default payment method description string no account description response { "id" "001d000000irfmaiah" } error handling common error responses status code error description 400 bad request invalid request format or missing required fields 401 unauthorized invalid or missing api key 403 forbidden insufficient permissions 404 not found object type not found in metadata 409 conflict record already exists or constraint violation example error response { "code" 400, "message" "bad request", "details" "required field 'name' is missing" }