kustomer-client
    Preparing search index...

    Function createKObject

    • Create KObject Creates a new KObject (custom object).

      Any one of the following roles is required for this endpoint:

      Legacy Role Equivalent Permission Set Role
      org.user.kobject.write org.permission.kobject.create
      org.permission.kobject.kobject_*.create

      Custom attributes are optional and allow you to specify custom key-value pairs.

      Kustomer uses a naming convention for custom attributes to specify the field data type with a name suffix:

      • Num number or null
      • At date-time or null
      • Str string or null, length: [ 0 .. 1024 ] characters
      • Txt string or null, length: [ 0 .. 1024 ] characters
      • Bool boolean or null
      • Url string or null, format: uri

      Custom objects are subject to a rate limit. A single client can create up to 120 custom objects per minute per customer.

      • Custom objects with importedAt in the body will not be subject to the rate limit.
      • A 429 Too Many Requests response will be returned if the rate limit has been reached for a customer.

      Type Parameters

      • ThrowOnError extends boolean = true

      Returns RequestResult<
          {
              data: {
                  attributes: {
                      createdAt: string;
                      custom: {
                          billingStatusStr: string;
                          orderDescriptionStr: string;
                          orderNumberNum: number;
                          orderStatusStr: string;
                          orderUpdatedAt: string;
                          shippingStatusStr: string;
                          specialInstructionsStr: string;
                          totalPriceNum: number;
                      };
                      icon: string;
                      images: string[];
                      rev: number;
                      tags: unknown[];
                      title: string;
                      updatedAt: string;
                  };
                  id: string;
                  links: { self: string };
                  relationships: {
                      klass: { data: { id: string; type: string }; link: { self: string } };
                      org: { data: { id: string; type: string }; links: { self: string } };
                  };
                  type: string;
              };
          },
          unknown,
          ThrowOnError,
      >