Getting Started with Composer APIs
The Composer APIs allow you to create documents with Salesforce data and JSON payloads using Microsoft Office templates. You can start the document generation process using Salesforce Apex calls and other Salesforce programmatic methods. Documents created with the Composer API are compatible with a variety of email delivery, eSignature, and cloud storage integrations.
The Conga Composer API adheres to the principles of RESTful web services. The Conga Composer REST API uses standard web technologies such as JSON to expose application logic and data and enable developers to use any language and environment that can connect to the Web.
- Uses SSL (HTTPS) to ensure all data is secure. Calls made over plain HTTP will fail.
- Uses API Key to validate API users. API requests without authentication will fail.
Authentication
At Conga, we value the security of our customers’ data more than anything else. Authenticating for Composer REST APIs requires a Client ID and Client Secret to connect your API solution to Conga Composer API.
Step 1: Generate the Client ID and Secret
Step 2: Generate Conga Auth Access Token
The Auth Access Token API call returns the Conga-access-token, which will be used to authorize the Conga Ingress API call and the Conga Status-Service API call.
- HTTP Method: POST
- Server URL: https://login-rls.congacloud.com/api/v1/auth/connect/token
- Required Headers: Content-Type: application/x-www-form-urlencoded
-
Post Body:
grant_type
‘client_credentials’
Scope
‘doc-gen.composer’
client_id
Retrieved from the Composer Setup Menu, and set in the code variable congaAuthClientId.
client_secret
Retrieved from the Composer Setup Menu, and set in the code variable congaAuthClientSecret.
-
Sample Response:
{ "access_token": "eyJh………… ", "expires_in": 3600, "token_type": "Bearer", "scope": "doc-gen.composer" }
Endpoint
Composer APIs use the following as their base URL:
Versions
Composer API ensures backward compatibility by properly versioning any changes to the APIs. Any necessary changes to the API structure will occur within a new version.
Content Type
Requests made to the API must be encoded as JSON and contain the header:
Content-Type: application/json
Errors
Conga Composer uses standard HTTP response codes to indicate the success or failure of an API request. Below are some example response codes:
Code |
Description |
---|---|
200 |
Successful Operation |
204 |
No Content |
400 |
Invalid Data/ Bad Request |
401 |
Unauthorized |
422 |
Validation Error |
500 |
Internal Server Error |