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.
This custom object definition has the following limitations:
object
) is 64.label
) is 64.label
) is 64.Accept-Encoding | string Include the If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a |
Content-Encoding | string Include the |
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 ( |
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 should not set this header. |
Zuora-Org-Ids | string 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. |
Authorization required | string The value is in the |
Zuora-Version | string <date> API version that determines the response schema. The default version is used if this parameter is not included. Specify |
The custom object definitions to be created
object (customObjectDefinitions) The custom object definitions. This object maps types to custom object definitions. |
OK
Bad request
{- "definitions": {
- "Delivery": {
- "description": "Delivery schedule for shipping products based on customer's subscription.",
- "filterable": [
- "Quantity__c",
- "ProductName__c",
- "Cancelled__c",
- "ShippingStatus__c"
], - "label": "Delivery",
- "object": "Delivery",
- "properties": {
- "CancellationTime__c": {
- "description": "The time at which customer cancelled this particular shipment.",
- "format": "date-time",
- "label": "Cancellation Time",
- "type": "string"
}, - "Cancelled__c": {
- "default": false,
- "description": "Indicator is true when the customer has cancelled this particular shipment.",
- "label": "Shipment Cancelled",
- "type": "boolean"
}, - "ContactEmail__c": {
- "description": "The customer's email address.",
- "label": "Customer Email",
- "maxLength": 128,
- "type": "string"
}, - "ContactId__c": {
- "description": "The customer contact who will receive the shipment.",
- "format": "uuid",
- "label": "Ship To Customer",
- "type": "string"
}, - "ProductName__c": {
- "description": "The name of the product that is being shipped to customer.",
- "label": "Product Name",
- "type": "string"
}, - "Quantity__c": {
- "description": "The quantity of product that is being shipped to customer.",
- "label": "Quantity",
- "maximum": 20,
- "minimum": 1,
- "type": "integer"
}, - "ShippingDate__c": {
- "description": "The date the product will be sent to shipping vendor for delivery.",
- "format": "date",
- "label": "Shipping Date",
- "type": "string"
}, - "ShippingStatus__c": {
- "default": "Pending",
- "description": "The status of the shipment - e.g. Pending, Preparing shipment, Waiting for tracking information, or Shipped.",
- "enum": [
- "Pending",
- "Preparing shipment",
- "Waiting for tracking information",
- "Shipped"
], - "label": "Shipping Status",
- "type": "string"
}, - "SubscriptionId__c": {
- "description": "The subscription that is associated with the shipment record.",
- "format": "uuid",
- "label": "Subscription",
- "type": "string"
}, - "TotalWeight__c": {
- "description": "The total weight of the product and packaging that is being shipped to customer.",
- "label": "Total Weight (lbs.)",
- "minimum": 0,
- "type": "number"
}
}, - "relationships": [
- {
- "cardinality": "manyToOne",
- "fields": {
- "SubscriptionId__c": "Id"
}, - "namespace": "com_zuora",
- "object": "subscription",
- "recordConstraints": {
- "create": {
- "enforceValidMapping": false
}
}
}, - {
- "cardinality": "manyToOne",
- "fields": {
- "ContactId__c": "Id"
}, - "namespace": "com_zuora",
- "object": "contact",
- "recordConstraints": {
- "create": {
- "enforceValidMapping": false
}
}
}
], - "required": [
- "SubscriptionId__c",
- "ContactId__c",
- "ProductName__c",
- "Quantity__c",
- "ShippingDate__c"
]
}, - "birth_place_custom_object": {
- "filterable": [
- "city__c"
], - "label": "Birth Place Custom Object",
- "object": "birth_place_custom_object",
- "properties": {
- "ContactId__c": {
- "format": "uuid",
- "label": "Contact",
- "type": "string"
}, - "city__c": {
- "label": "city label",
- "type": "string"
}, - "country__c": {
- "label": "country label",
- "type": "string"
}, - "state__c": {
- "label": "state label",
- "type": "string"
}
}, - "relationships": [
- {
- "cardinality": "manyToOne",
- "fields": {
- "ContactId__c": "Id"
}, - "namespace": "com_zuora",
- "object": "contact",
- "recordConstraints": {
- "create": {
- "enforceValidMapping": false
}
}
}
], - "required": [
- "city__c",
- "state__c",
- "country__c"
], - "type": "object"
}
}
}
{- "count": 2,
- "definitions": {
- "Delivery": {
- "CreatedById": "2c92c0f9-6a07-409d-016a-0a58ab1172eb",
- "CreatedDate": "2021-04-29T04:06:07.876Z",
- "Id": "362e0954-7108-49ca-abb0-6f628478e77f",
- "UpdatedById": "2c92c0f9-6a07-409d-016a-0a58ab1172eb",
- "UpdatedDate": "2021-04-29T04:06:07.876Z",
- "schema": {
- "description": "Delivery schedule for shipping products based on customer's subscription.",
- "filterable": [
- "ContactId__c",
- "SubscriptionId__c",
- "Quantity__c",
- "ProductName__c",
- "Cancelled__c",
- "ShippingStatus__c",
- "Id",
- "CreatedById",
- "UpdatedById",
- "CreatedDate",
- "UpdatedDate"
], - "label": "Delivery",
- "object": "Delivery",
- "properties": {
- "CancellationTime__c": {
- "description": "The time at which customer cancelled this particular shipment.",
- "format": "date-time",
- "label": "Cancellation Time",
- "origin": "custom",
- "type": "string"
}, - "Cancelled__c": {
- "default": false,
- "description": "Indicator is true when the customer has cancelled this particular shipment.",
- "label": "Shipment Cancelled",
- "origin": "custom",
- "type": "boolean"
}, - "ContactEmail__c": {
- "description": "The customer's email address.",
- "label": "Customer Email",
- "maxLength": 128,
- "origin": "custom",
- "type": "string"
}, - "ContactId__c": {
- "description": "The customer contact who will receive the shipment.",
- "format": "uuid",
- "label": "Ship To Customer",
- "origin": "custom",
- "type": "string"
}, - "CreatedById": {
- "label": "CreatedById",
- "origin": "system",
- "type": "string"
}, - "CreatedDate": {
- "format": "date-time",
- "label": "CreatedDate",
- "origin": "system",
- "type": "string"
}, - "Id": {
- "format": "uuid",
- "label": "Id",
- "origin": "system",
- "type": "string"
}, - "ProductName__c": {
- "description": "The name of the product that is being shipped to customer.",
- "label": "Product Name",
- "maxLength": 512,
- "origin": "custom",
- "type": "string"
}, - "Quantity__c": {
- "description": "The quantity of product that is being shipped to customer.",
- "label": "Quantity",
- "maximum": 20,
- "minimum": 1,
- "origin": "custom",
- "type": "integer"
}, - "ShippingDate__c": {
- "description": "The date the product will be sent to shipping vendor for delivery.",
- "format": "date",
- "label": "Shipping Date",
- "origin": "custom",
- "type": "string"
}, - "ShippingStatus__c": {
- "default": "Pending",
- "description": "The status of the shipment - e.g. Pending, Preparing shipment, Waiting for tracking information, or Shipped.",
- "enum": [
- "Pending",
- "Preparing shipment",
- "Waiting for tracking information",
- "Shipped"
], - "label": "Shipping Status",
- "maxLength": 512,
- "origin": "custom",
- "type": "string"
}, - "SubscriptionId__c": {
- "description": "The subscription that is associated with the shipment record.",
- "format": "uuid",
- "label": "Subscription",
- "origin": "custom",
- "type": "string"
}, - "TotalWeight__c": {
- "description": "The total weight of the product and packaging that is being shipped to customer.",
- "label": "Total Weight (lbs.)",
- "minimum": 0,
- "origin": "custom",
- "type": "number"
}, - "UpdatedById": {
- "label": "UpdatedById",
- "origin": "system",
- "type": "string"
}, - "UpdatedDate": {
- "format": "date-time",
- "label": "UpdatedDate",
- "origin": "system",
- "type": "string"
}
}, - "relationships": [
- {
- "cardinality": "manyToOne",
- "fields": {
- "ContactId__c": "Id"
}, - "namespace": "com_zuora",
- "object": "contact",
- "recordConstraints": {
- "create": {
- "enforceValidMapping": false
}
}
}, - {
- "cardinality": "manyToOne",
- "fields": {
- "SubscriptionId__c": "Id"
}, - "namespace": "com_zuora",
- "object": "subscription",
- "recordConstraints": {
- "create": {
- "enforceValidMapping": false
}
}
}
], - "required": [
- "SubscriptionId__c",
- "ContactId__c",
- "ProductName__c",
- "Quantity__c",
- "ShippingDate__c",
- "Id",
- "CreatedById",
- "UpdatedById",
- "CreatedDate",
- "UpdatedDate"
]
}, - "type": "Delivery"
}, - "birth_place_custom_object": {
- "CreatedById": "2c92c0f9-6a07-409d-016a-0a58ab1172eb",
- "CreatedDate": "2021-04-29T04:06:07.876Z",
- "Id": "25924740-669d-4bcd-97b2-61c7410c7563",
- "UpdatedById": "2c92c0f9-6a07-409d-016a-0a58ab1172eb",
- "UpdatedDate": "2021-04-29T04:06:07.876Z",
- "schema": {
- "filterable": [
- "ContactId__c",
- "city__c",
- "Id",
- "CreatedById",
- "UpdatedById",
- "CreatedDate",
- "UpdatedDate"
], - "label": "Birth Place Custom Object",
- "object": "birth_place_custom_object",
- "properties": {
- "ContactId__c": {
- "format": "uuid",
- "label": "Contact",
- "origin": "custom",
- "type": "string"
}, - "CreatedById": {
- "label": "CreatedById",
- "origin": "system",
- "type": "string"
}, - "CreatedDate": {
- "format": "date-time",
- "label": "CreatedDate",
- "origin": "system",
- "type": "string"
}, - "Id": {
- "format": "uuid",
- "label": "Id",
- "origin": "system",
- "type": "string"
}, - "UpdatedById": {
- "label": "UpdatedById",
- "origin": "system",
- "type": "string"
}, - "UpdatedDate": {
- "format": "date-time",
- "label": "UpdatedDate",
- "origin": "system",
- "type": "string"
}, - "city__c": {
- "label": "city label",
- "maxLength": 512,
- "origin": "custom",
- "type": "string"
}, - "country__c": {
- "label": "country label",
- "maxLength": 512,
- "origin": "custom",
- "type": "string"
}, - "state__c": {
- "label": "state label",
- "maxLength": 512,
- "origin": "custom",
- "type": "string"
}
}, - "relationships": [
- {
- "cardinality": "manyToOne",
- "fields": {
- "ContactId__c": "Id"
}, - "namespace": "com_zuora",
- "object": "contact",
- "recordConstraints": {
- "create": {
- "enforceValidMapping": false
}
}
}
], - "required": [
- "city__c",
- "state__c",
- "country__c",
- "Id",
- "CreatedById",
- "UpdatedById",
- "CreatedDate",
- "UpdatedDate"
], - "type": "object"
}, - "type": "birth_place_custom_object"
}
}
}