POST /objects/migrations

Updates a custom object definition by posting migration resource to initiate the migration of definitions.

Limitations

Updating custom field definition has the following limitations:

Servers

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 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.

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 (:), semicolon (;), double quote ("), and quote (').

Authorization String Yes

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

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-Version in the request header if you expect a specific response schema.

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 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.

Request body fields

Name Type Required Description
actions[] Array Yes

The actions of updating custom object definitions, to be performed as parts of the migration. Currently only one action per migration is supported.

actions[].field Object No

A reference to a field.

actions[].field.unique Boolean No

Indicates whether to specify a unique constraint to the field. You can remove the unique constraint on the 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.

actions[].field.definition Object No

The custom field definition in the custom object

actions[].field.definition.format String No

The data format of the custom field

actions[].field.definition.description String No

Applicable if the type of the action is updateField

actions[].field.definition.default String No

Applicable if the type of the action is updateField

actions[].field.definition.label String No

The UI label of the custom field

actions[].field.definition.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:

  • The type field is string.
  • The enum field is not specified.
actions[].field.definition.type String No

The data type of the custom field

actions[].field.definition.origin String No

Specifies that this is a custom field

Possible values:

  • "custom"
actions[].field.definition.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:

  • Text:
    • The type field is string.
    • The format field is not specified or is url.
    • The enum field is not specified.
  • Picklist:
    • The type field is string.
    • The enum field is specified.
    • The multiselect field is not specified or is false.
  • Multiselect:
    • The type field is string.
    • The enum field is specified.
    • The multiselect field is true.

If the custom field is filterable, the value of maxLength must be 512 or less.

actions[].field.definition.multiselect Boolean No

Indicates whether this is a multiselect custom field.

This field applies only to the creation of Picklist or Multiselect custom fields:

  • The action type field is addField.
  • The definition type field is string.
  • The maxLength field is specified.
  • The enum field is specified.
actions[].field.name String No

The name of the custom field to be updated

actions[].field.filterable Boolean No

Indicates whether the field is filterable or not. Applicable to addField and updateField actions.

You can change a filterable field to non-filterable and vice versa. You can also add a filterable field. One custom object can have a maximum of 10 filterable fields.

Note that changing filterable fields triggers reindexing. It will take 12-24 hours before all your data are reindexed and available to query.

actions[].field.required Boolean No

Indicates whether the field is required or optional.

You can update a required field to optional. On the other hand, you can only update an optional field to required on the custom object with no records.

You can only add a required field to the custom object with no records.

actions[].field.auditable Boolean No

Indicates whether Audit Trail will record changes of this custom field. You can change auditable fields to non-auditable, and vice versa. One custom object can have a maximum of five auditable fields.

actions[].field.targetName String No

Required if the type of the action is renameField

actions[].namespace String Yes

The namespace of the custom object definition to be updated

actions[].description String No

Optional property for updateObject action

actions[].object String Yes

The API name of the custom object definition to be updated

actions[].label String No

Optional property for updateObject action

actions[].relationship Object No
actions[].relationship.recordConstraints Object No

Specifies contraints to apply to custom object records.

actions[].relationship.recordConstraints.create Object No
actions[].relationship.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 AccountId__c that is mapped to the Id field of the account object, Zuora verifies that the value of AccountId__c is a valid account ID when a custom object record is created. If the value of AccountId__c is not a valid account ID, the operation fails.

Default value: true

actions[].relationship.cardinality String No

The cardinality of the relationship from this object to another object.

Only the manyToOne cardinality can be used when creating relationships. A relationship with oneToMany cardinality is created implicitly when a manyToOne relationship is created.

A custom object definition can have a maximum of 2 manyToOne relationships.

Possible values:

  • "manyToOne"
actions[].relationship.namespace String Yes

The namespace where the related object is located

actions[].relationship.object String Yes

The API name of the related object

actions[].relationship.fields Object Yes

Field mappings in the form of <this-object-field-name>: <other-object-field-name>.

actions[].type String Yes

The type of the updating action on a custom object definition

Possible values:

  • "renameField"
  • "updateObject"
  • "addField"
  • "deleteRelationship"
  • "deleteField"
  • "addRelationship"
  • "updateField"
actions[].enableCreateRecordAuditing Boolean No

Optional property for updateObject action.

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.

actions[].enableDeleteRecordAuditing Boolean No

Optional property for updateObject action.

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.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. 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.
  3. Click Test request to test run your request to the API and see the API's response.