Contract Temporary
This API allows customers to create a Contract with 2 steps.
An example call to this API could look like:
Init create contract flow
POST https://app-auth-staging.bananasign.co/api/web/v1/document-signing/init
Header:
Provide your bearer token in the Authorization Header
Example: Authorization: Bearer 111098
Example:
- Shell/cURL
- Javascript
init-flow
curl --request POST \
--url https://app-auth-staging.bananasign.co/api/web/v1/document-signing/init \
-d '{"fileName":"sample.pdf"}' \
--header 'Authorization: Bearer $access_token' \
--header 'Content-Type: application/json'
response
{
flowId: "WNLW4u4dBOOn",
preSignedUrl: "https://bananasign-temporary-contracts.s3...",
owner: {
email: '[email protected]',
name: 'First Signer',
}
}
init-flow.js
fetch('https://app-auth-staging.bananasign.co/api/web/v1/document-signing/init', {
method: 'POST',
body: JSON.stringify({
fileName: 'sample.pdf',
}),
headers: {
Authorization: `Bearer ${accessToken}`,
'Content-Type': 'application/json',
},
})
.then(async (response) => {
const data = await response.json();
// {
// flowId: "WNLW4u4dBOOn",
// preSignedUrl: "https://bananasign-temporary-contracts.s3...",
// owner: {
// email: '[email protected]',
// name: 'First Signer',
// }
// }
})
Using preSignedUrl for uploading document to Lumin Sign
- Shell/cURL
- Javascript
init-flow
curl --request PUT \
--url preSignedUrl \
-d 'your_file' \
--header 'Content-Type: application/pdf'
upload.js
fetch(preSignedUrl, {
method: 'PUT',
body: fileData, // Your document file object
headers: {
'Content-Type': 'application/pdf',
},
})
caution
You must use preSignedUrl for uploading your document to Lumin Sign before going to next step
Create document temporary
You can create temporary document with your signers and viewers with flowId
PUT https://app-auth-staging.bananasign.co/api/web/v1/document-signing/create-document-temporary
Header:
Provide your bearer token in the Authorization Header
Example: Authorization: Bearer 111098
Example:
- Shell/cURL
- Javascript
init-flow
curl --request PUT \
--url https://app-auth-staging.bananasign.co/api/web/v1/document-signing/create-document-temporary \
-d '{"signers":[{"name":"First Signer","email":"[email protected]"}],"viewers":[],"flowId":"WNLW4u4dBOOn"}' \
--header 'Authorization: Bearer $access_token' \
--header 'Content-Type: application/json'
response
{
flowId: "WNLW4u4dBOOn",
message: "You've requested to a save document info successfully",
statusCode: 200
}
create.js
fetch('https://app-auth-staging.bananasign.co/api/web/v1/document-signing/create-document-temporary', {
method: 'PUT',
body: JSON.stringify({
signers: [{
name: 'First Signer',
email: '[email protected]',
}],
viewers: [],
flowId: 'WNLW4u4dBOOn',
}),
headers: {
Authorization: `Bearer ${accessToken}`,
'Content-Type': 'application/json',
}
}).then(async (response) => {
const data = await response.json();
// {
// flowId: "WNLW4u4dBOOn",
// message: "You've requested to a save document info successfully",
// statusCode: 200,
// }
})