CustomerProfiles / Client / batch_put_profile_object

batch_put_profile_object

CustomerProfiles.Client.batch_put_profile_object(**kwargs)

Adds multiple profile objects to a domain of a given ObjectType in a single API call.

When adding a specific profile object, like a Contact Record, an inferred profile can get created if it is not mapped to an existing profile. The resulting profile will only have a phone number populated in the standard ProfileObject. Any additional Contact Records with the same phone number will be mapped to the same inferred profile.

When a ProfileObject is created and if a ProfileObjectType already exists for the ProfileObject, it will provide data to a standard profile depending on the ProfileObjectType definition.

BatchPutProfileObject needs an ObjectType, which can be created using PutProfileObjectType.

See also: AWS API Documentation

Request Syntax

response = client.batch_put_profile_object(
    DomainName='string',
    ObjectTypeName='string',
    Items=[
        {
            'Id': 'string',
            'Object': 'string'
        },
    ]
)
Parameters:
  • DomainName (string) –

    [REQUIRED]

    The unique name of the domain.

  • ObjectTypeName (string) –

    [REQUIRED]

    The name of the profile object type.

  • Items (list) –

    [REQUIRED]

    A list of items to add to the domain.

    • (dict) –

      An item to add to the domain as part of a batch request.

      • Id (string) – [REQUIRED]

        A unique identifier for this item in the batch request. Used to correlate items in the response.

      • Object (string) – [REQUIRED]

        A string that is serialized from a JSON object.

Return type:

dict

Returns:

Response Syntax

{
    'Successful': [
        {
            'Id': 'string',
            'ProfileObjectUniqueKey': 'string'
        },
    ],
    'Failed': [
        {
            'Id': 'string',
            'Code': 123,
            'Message': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • Successful (list) –

      A list of items that were successfully added to the domain.

      • (dict) –

        An item that was successfully added to the domain.

        • Id (string) –

          The unique identifier of the item in the batch request.

        • ProfileObjectUniqueKey (string) –

          The unique identifier of the profile object generated by the service.

    • Failed (list) –

      A list of items that failed to be added to the domain.

      • (dict) –

        An item that failed to be added to the domain.

        • Id (string) –

          The unique identifier of the item in the batch request that failed.

        • Code (integer) –

          The HTTP status code for the error.

        • Message (string) –

          A message describing the error.

Exceptions

  • CustomerProfiles.Client.exceptions.BadRequestException

  • CustomerProfiles.Client.exceptions.AccessDeniedException

  • CustomerProfiles.Client.exceptions.ResourceNotFoundException

  • CustomerProfiles.Client.exceptions.ThrottlingException

  • CustomerProfiles.Client.exceptions.InternalServerException