Create document properties

Note: This feature is available only if you have the Billing Document Properties Setup feature enabled. The Billing Document Properties Setup feature is in Limited Availability. If you wish to have access to the feature, submit a request at Zuora Global Support.

Creates custom document properties for a billing document. For example, a document property can be a custom name used for files generated for billing documents. Billing documents include invoices, credit memos, and debit memos.

If you want to configure custom file names for billing documents created through API operations, you have to call this operation before posting the billing documents.

Note: You can create document properties for credit and debit memos only if you have the Invoice Settlement feature enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see Invoice Settlement Enablement and Checklist Guide for more information.

Request
header Parameters
Idempotency-Key
string <= 255 characters

Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types.

With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident.

Accept-Encoding
string

Include the Accept-Encoding: gzip header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response.

If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a Content-Encoding header with the compression algorithm so that your client can decompress it.

Content-Encoding
string

Include the Content-Encoding: gzip header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload.

Authorization
string

The value is in the Bearer {token} format where {token} is a valid OAuth token generated by calling Create an OAuth token.

Zuora-Entity-Ids
string

An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.

Zuora-Track-Id
string <= 64 characters

A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue.

The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (:), semicolon (;), double quote ("), and quote (').

Request Body schema: application/json
required
customFileName
string

The custom file name to use to generate new Word or PDF files for the billing document.

documentKey
string

The unique ID or number of a billing document that you want to create document properties for. For example, 402892c74c9193cd014c96bbe7c101f9, INV00000001, CM00000001, or DM00000001.

documentType
string

The type of the billing document.

Enum: "Invoice" "CreditMemo" "DebitMemo"
Responses
200
post/v1/document-properties
Request samples
application/json
{
  • "customFileName": "testCreditMemo",
  • "documentId": "40288af1614cee0b01614cf2ec25000a",
  • "documentType": "CreditMemo"
}
Response samples
application/json
{
  • "success": true,
  • "id": "402892c74c9193cd014c96bbe7c101f9",
  • "documentKey": "40288af1614cee0b01614cf2ec25000a",
  • "documentType": "CreditMemo",
  • "customFileName": "testCreditMemo"
}