Skip to content

Add or Replace Single Client Code Distribution

Add or replace client code in Vault by uploading a ZIP file of the client code distribution. Vault unpacks and compares the uploaded distribution with other distributions in the Vault and:

  • Adds the distribution if the distribution name is new.
  • Replaces a distribution if it has the same name and the client code filenames or contents are different.
  • Makes no changes if the distribution name exists and the code is the same.
POST/api/{version}/uicode/distributions/
NameDescription
Acceptapplication/json (default) or application/xml
Content-Typemultipart/form-data

To upload the file, use the multi-part attachment with the file component "file={file_name}". The maximum allowed total file size for all distributions in a Vault is 50 MB.

curl -X POST -H "Authorization: {SESSION_ID}" \ -H "Content-Type: multipart/form-data" \ -F "file=@custom-page.zip" \ https://myvault.veevavault.com/api/v26.1/uicode/distributions/
{ "responseStatus": "SUCCESS", "data": { "name": "custom_page__c", "updateType": "ADDED", "checksum": "5e7db21710fc4cddfaf5ad5eafdf7052" } }
NameDescription
nameThe name of the distribution as specified in the manifest file.
updateTypeWhether the distribution was added (ADDED), replaced (MODIFIED), or left unchanged (NO_CHANGE).
checksumA unique string used to identify the distribution and whether the contents have changed.