v1

latestOpenAPI 3.0.0Apache 2.02026-07-143281,4552.1 MB
Customers

BulkCreateCustomers

Creates multiple customer profiles for a business.

This endpoint takes a map of individual create requests and returns a map of responses.

You must provide at least one of the following values in each create request:

  • given_name
  • family_name
  • company_name
  • email_address
  • phone_number
post/v2/customers/bulk-create

Request body

customersobject required

A map of 1 to 100 individual create requests, represented by idempotency key: { customer data } key-value pairs.

Each key is an idempotency key that uniquely identifies the create request. Each value contains the customer data used to create the customer profile.

Example request

{
  "customers": {
    "8bb76c4f-e35d-4c5b-90de-1194cd9179f0": {
      "address": {
        "address_line_1": "500 Electric Ave",
        "address_line_2": "Suite 600",
        "administrative_district_level_1": "NY",
        "country": "US",
        "locality": "New York",
        "postal_code": "10003"
      },
      "email_address": "Amelia.Earhart@example.com",
      "family_name": "Earhart",
      "given_name": "Amelia",
      "note": "a customer",
      "phone_number": "+1-212-555-4240",
      "reference_id": "YOUR_REFERENCE_ID"
    },
    "d1689f23-b25d-4932-b2f0-aed00f5e2029": {
      "address": {
        "address_line_1": "500 Electric Ave",
        "address_line_2": "Suite 601",
        "administrative_district_level_1": "NY",
        "country": "US",
        "locality": "New York",
        "postal_code": "10003"
      },
      "email_address": "Marie.Curie@example.com",
      "family_name": "Curie",
      "given_name": "Marie",
      "note": "another customer",
      "phone_number": "+1-212-444-4240",
      "reference_id": "YOUR_REFERENCE_ID"
    }
  }
}

Response

Success

responsesobject

A map of responses that correspond to individual create requests, represented by key-value pairs.

Each key is the idempotency key that was provided for a create request and each value is the corresponding response. If the request succeeds, the value is the new customer profile. If the request fails, the value contains any errors that occurred during the request.

Example response

{
  "responses": {
    "8bb76c4f-e35d-4c5b-90de-1194cd9179f4": {
      "customer": {
        "address": {
          "address_line_1": "500 Electric Ave",
          "address_line_2": "Suite 600",
          "administrative_district_level_1": "NY",
          "country": "US",
          "locality": "New York",
          "postal_code": "10003"
        },
        "created_at": "2024-03-23T20:21:54.859Z",
        "creation_source": "THIRD_PARTY",
        "email_address": "Amelia.Earhart@example.com",
        "family_name": "Earhart",
        "given_name": "Amelia",
        "id": "8DDA5NZVBZFGAX0V3HPF81HHE0",
        "note": "a customer",
        "phone_number": "+1-212-555-4240",
        "preferences": {
          "email_unsubscribed": false
        },
        "reference_id": "YOUR_REFERENCE_ID",
        "updated_at": "2024-03-23T20:21:54.859Z",
        "version": 0
      }
    },
    "d1689f23-b25d-4932-b2f0-aed00f5e2029": {
      "customer": {
        "address": {
          "address_line_1": "500 Electric Ave",
          "address_line_2": "Suite 601",
          "administrative_district_level_1": "NY",
          "country": "US",
          "locality": "New York",
          "postal_code": "10003"
        },
        "created_at": "2024-03-23T20:21:54.859Z",
        "creation_source": "THIRD_PARTY",
        "email_address": "Marie.Curie@example.com",
        "family_name": "Curie",
        "given_name": "Marie",
        "id": "N18CPRVXR5214XPBBA6BZQWF3C",
        "note": "another customer",
        "phone_number": "+1-212-444-4240",
        "preferences": {
          "email_unsubscribed": false
        },
        "reference_id": "YOUR_REFERENCE_ID",
        "updated_at": "2024-03-23T20:21:54.859Z",
        "version": 0
      }
    }
  }
}