Create Binder from Template
POST
/api/{version}/objects/bindersHeaders
Section link for Headers| Name | Description |
|---|---|
Content-Type | application/x-www-form-urlencoded |
Accept | application/json (default) or application/xml |
Body Parameters
Section link for Body Parameters| Name | Description |
|---|---|
fromTemplate | All required binder (document) fields must be included in the request. When creating a binder, no file is included in the request. Include the parameter fromTemplate and specify the name of the template as returned from the document metadata as shown below. Only templates of "kind": binder are allowed. |
Request
Section link for RequestSince we're creating a new binder with the document type "Compliance Package" and subtype "Professional", we need to find the available templates in the type/subtype metadata:
curl -X POST -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v22.2/metadata/objects/documents/types/compliance_package__v/subtypes/professional__vResponse
Section link for Response{
"templates": [
{
"label": "Compliance Package Template",
"name": "compliance_package__v",
"kind": "binder",
"definedIn": "compliance_package__v",
"definedInType": "type"
},
{
"label": "eCTD Compliance Package",
"name": "ectd_compliance_package_template__v",
"kind": "binder",
"definedIn": "compliance_package__v",
"definedInType": "type"
}
]
}Request (Create Binder from Template)
Section link for Request (Create Binder from Template)curl -X POST -H "Authorization: {SESSION_ID}" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "fromTemplate=ectd_compliance_package_template__v" \
-d "name__v=CholeCap eCTD Compliance Package" \
-d "type__v=Compliance Package" \
-d "subtype__v=Professional" \
-d "lifecycle__v=Binder Lifecycle" \
-d "product__v=1357662840171" \
-d "major_version_number__v=0" \
-d "minor_version_number__v=1" \
https://myvault.veevavault.com/api/v22.2/objects/bindersResponse
Section link for Response{
"responseStatus": "SUCCESS",
"responseMessage": "Successfully created binder.",
"id": 565
}Response Details
Section link for Response DetailsThe example response shows the "templates" section of the type/subtype response. There are two available templates we can use to create this binder (each template has the "kind": binder). Both are defined on the compliance_package__v document type. We'll use the binder template ectd_compliance_package_template__v to create our new binder as shown below.