POST /objects/definitions/default
You can post custom object definitions with the request body schema described below.
This operation also allows you to use the List custom object definitions response schema as its request schema. If you want to copy all the existing custom objects from an old tenant to a new tenant, you can make a List custom object definitions call in your old tenant and then use its response directly as the request of this operation in the new tenant to import all the custom objects from the old tenant.
The label
field is the UI label of the custom object. The object
field contains the API Name of the custom object.
Limitations
This custom object definition has the following limitations:
- The maximum number of characters for the Custom Object API Name (
object
) is 64. - The maximum number of characters for the Custom Object Label (
label
) is 64. - The maximum number of characters for the Custom Object Description 250.
- The maximum number of custom fields in an custom object is 50.
- The maximum number of characters for the custom field API name is 64.
- The maximum number of characters for the custom field label (
label
) is 64. - The maximum number of characters for the custom field Description is 250.
- The maximum number of picklist or multiselect options is 250.
- The default maximum number of characters for the Text field is 512. You can configure the max length up to 8,192 characters when creating or updating the custom object definition via API. However, if the Text field is filterable, the max length must be 512 or less.
- The maximum number of digits to the left of the decimal point for the Number field is 13, and to the right is 9.
Servers
- https://rest.test.zuora.com
- https://rest.sandbox.na.zuora.com
- https://rest.apisandbox.zuora.com
- https://rest.na.zuora.com
- https://rest.zuora.com
- https://rest.test.eu.zuora.com
- https://rest.sandbox.eu.zuora.com
- https://rest.eu.zuora.com
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Content-Encoding |
String | No |
Include the |
Zuora-Track-Id |
String | No |
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 ( |
Authorization |
String | Yes |
The value is in the |
Idempotency-Key |
String | No |
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. |
Zuora-Version |
String | No |
API version that determines the response schema. The default version is used if this parameter is not included. Specify |
Zuora-Entity-Ids |
String | No |
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-Org-Ids |
String | No |
Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. |
Accept-Encoding |
String | No |
Include the If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
definitions |
Object | No |
The custom object definitions. This object maps types to custom object definitions. |
definitions.name |
Object | No | |
definitions.name.unique[] |
Array | No |
The fields with unique constraints. You can remove the unique constraint on a field. However, you can only add a unique constraint to a filterable field if the custom object contains no record. One custom object can have a maximum of five fields with unique constraints. |
definitions.name.filterable[] |
Array | No |
The set of fields that are allowed to be queried on. Queries on non-filterable fields will be rejected. You can not change a non-filterable field to filterable. |
definitions.name.object |
String | Yes |
The API name of the custom object |
definitions.name.properties |
Object | No | |
definitions.name.properties.name |
Object | No | |
definitions.name.properties.name.format |
String | No |
The data format of the custom field |
definitions.name.properties.name.label |
String | Yes |
The UI label of the custom field |
definitions.name.properties.name.displayName |
Boolean | No |
Indicates whether to use this field as the display name of the custom object when being linked to another custom object. This field applies only to the Text custom field type:
|
definitions.name.properties.name.type |
String | Yes |
The data type of the custom field |
definitions.name.properties.name.maxLength |
Integer | No |
The maximum length of string that can be stored in the custom field. This field applies only to the following custom field types:
If the custom field is filterable, the value of |
definitions.name.properties.name.multiselect |
Boolean | No |
Indicates whether this is a multiselect custom field. This field applies only to the Picklist or Multiselect custom field types:
|
definitions.name.required[] |
Array | No |
The required fields of the custom object. You can change required fields to optional. However, you can only change optional fields to required on the custom objects with no records. |
definitions.name.label |
String | Yes |
A UI label for the custom object |
definitions.name.auditable[] |
Array | No |
The set of fields which Audit Trail tracks and records changes of. You can change auditable fields to non-auditable, and vice versa. One custom object can have a maximum of five auditable fields. |
definitions.name.enableCreateRecordAuditing |
Boolean | No |
Indicates whether to audit the creation of custom object records of this custom object definition. Note that you must enable the Custom Object Definition audit trail setting in your Zuora tenant before auditing custom object record creation. For more information, see Manage audit trail settings. Default value: false |
definitions.name.relationships[] |
Array | No |
An array of relationships with Zuora objects or other custom objects. You can add at most 2 |
definitions.name.relationships[].recordConstraints |
Object | No |
Specifies contraints to apply to custom object records. |
definitions.name.relationships[].recordConstraints.create |
Object | No | |
definitions.name.relationships[].recordConstraints.create.enforceValidMapping |
Boolean | No |
Specifies whether Zuora validates the values of mapped fields in custom object records. By default, Zuora validates the values of mapped fields
in custom object records. For example, if the
custom object definition has a field called Default value: true |
definitions.name.relationships[].cardinality |
String | No |
The cardinality of the relationship from this object to another object. Only the A custom object definition can have a maximum of 2 Possible values:
|
definitions.name.relationships[].namespace |
String | Yes |
The namespace where the related object is located |
definitions.name.relationships[].object |
String | Yes |
The API name of the related object |
definitions.name.relationships[].fields |
Object | Yes |
Field mappings in the form of |
definitions.name.enableDeleteRecordAuditing |
Boolean | No |
Indicates whether to audit the deletion of custom object records of this custom object definition. Note that you must enable the Custom Object Definition audit trail setting in your Zuora tenant before auditing custom object record deletion. For more information, see Manage audit trail settings. Default value: false |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.