You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`cursor`|`String`| Query, Optional | A pagination cursor returned by a previous call to this endpoint.<br>Provide this cursor to retrieve the next set of results for the original query.<br>If a cursor is not provided, the endpoint returns the first page of the results.<br>For more information, see [Pagination](https://developer.squareup.com/docs/basics/api101/pagination). |
313
+
|`cursor`|`String`| Query, Optional | A pagination cursor returned by a previous call to this endpoint.<br>Provide this cursor to retrieve the next set of results for the original query.<br>If a cursor is not provided, the endpoint returns the first page of the results.<br>For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). |
314
314
|`limit`|`Integer`| Query, Optional | A limit on the number of results to return per page. The limit is advisory and<br>the implementation might return more or less results. If the supplied limit is negative, zero, or<br>greater than the maximum limit of 1000, it is ignored.<br><br>Default value: `100`|
Creates multiple [customer profiles](../../doc/models/customer.md) for a business.
136
+
137
+
This endpoint takes a map of individual create requests and returns a map of responses.
138
+
139
+
You must provide at least one of the following values in each create request:
140
+
141
+
-`given_name`
142
+
-`family_name`
143
+
-`company_name`
144
+
-`email_address`
145
+
-`phone_number`
146
+
147
+
```ruby
148
+
defbulk_create_customers(body:)
149
+
```
150
+
151
+
## Parameters
152
+
153
+
| Parameter | Type | Tags | Description |
154
+
| --- | --- | --- | --- |
155
+
|`body`|[`Bulk Create Customers Request Hash`](../../doc/models/bulk-create-customers-request.md)| Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
156
+
157
+
## Response Type
158
+
159
+
This method returns a `\ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`Bulk Create Customers Response Hash`](../../doc/models/bulk-create-customers-response.md).
result = customers_api.bulk_create_customers(body: body)
203
+
204
+
if result.success?
205
+
puts result.data
206
+
elsif result.error?
207
+
warn result.errors
208
+
end
209
+
```
210
+
211
+
212
+
# Bulk Delete Customers
213
+
214
+
Deletes multiple customer profiles.
215
+
216
+
The endpoint takes a list of customer IDs and returns a map of responses.
217
+
218
+
```ruby
219
+
defbulk_delete_customers(body:)
220
+
```
221
+
222
+
## Parameters
223
+
224
+
| Parameter | Type | Tags | Description |
225
+
| --- | --- | --- | --- |
226
+
|`body`|[`Bulk Delete Customers Request Hash`](../../doc/models/bulk-delete-customers-request.md)| Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
227
+
228
+
## Response Type
229
+
230
+
This method returns a `\ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`Bulk Delete Customers Response Hash`](../../doc/models/bulk-delete-customers-response.md).
231
+
232
+
## Example Usage
233
+
234
+
```ruby
235
+
body = {
236
+
:customer_ids => [
237
+
'8DDA5NZVBZFGAX0V3HPF81HHE0',
238
+
'N18CPRVXR5214XPBBA6BZQWF3C',
239
+
'2GYD7WNXF7BJZW1PMGNXZ3Y8M8'
240
+
]
241
+
}
242
+
243
+
244
+
result = customers_api.bulk_delete_customers(body: body)
245
+
246
+
if result.success?
247
+
puts result.data
248
+
elsif result.error?
249
+
warn result.errors
250
+
end
251
+
```
252
+
253
+
254
+
# Bulk Retrieve Customers
255
+
256
+
Retrieves multiple customer profiles.
257
+
258
+
This endpoint takes a list of customer IDs and returns a map of responses.
259
+
260
+
```ruby
261
+
defbulk_retrieve_customers(body:)
262
+
```
263
+
264
+
## Parameters
265
+
266
+
| Parameter | Type | Tags | Description |
267
+
| --- | --- | --- | --- |
268
+
|`body`|[`Bulk Retrieve Customers Request Hash`](../../doc/models/bulk-retrieve-customers-request.md)| Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
269
+
270
+
## Response Type
271
+
272
+
This method returns a `\ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`Bulk Retrieve Customers Response Hash`](../../doc/models/bulk-retrieve-customers-response.md).
273
+
274
+
## Example Usage
275
+
276
+
```ruby
277
+
body = {
278
+
:customer_ids => [
279
+
'8DDA5NZVBZFGAX0V3HPF81HHE0',
280
+
'N18CPRVXR5214XPBBA6BZQWF3C',
281
+
'2GYD7WNXF7BJZW1PMGNXZ3Y8M8'
282
+
]
283
+
}
284
+
285
+
286
+
result = customers_api.bulk_retrieve_customers(body: body)
287
+
288
+
if result.success?
289
+
puts result.data
290
+
elsif result.error?
291
+
warn result.errors
292
+
end
293
+
```
294
+
295
+
296
+
# Bulk Update Customers
297
+
298
+
Updates multiple customer profiles.
299
+
300
+
This endpoint takes a map of individual update requests and returns a map of responses.
301
+
302
+
You cannot use this endpoint to change cards on file. To make changes, use the [Cards API](../../doc/api/cards.md) or [Gift Cards API](../../doc/api/gift-cards.md).
303
+
304
+
```ruby
305
+
defbulk_update_customers(body:)
306
+
```
307
+
308
+
## Parameters
309
+
310
+
| Parameter | Type | Tags | Description |
311
+
| --- | --- | --- | --- |
312
+
|`body`|[`Bulk Update Customers Request Hash`](../../doc/models/bulk-update-customers-request.md)| Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
313
+
314
+
## Response Type
315
+
316
+
This method returns a `\ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`Bulk Update Customers Response Hash`](../../doc/models/bulk-update-customers-response.md).
result = customers_api.bulk_update_customers(body: body)
339
+
340
+
if result.success?
341
+
puts result.data
342
+
elsif result.error?
343
+
warn result.errors
344
+
end
345
+
```
346
+
347
+
129
348
# Search Customers
130
349
131
350
Searches the customer profiles associated with a Square account using one or more supported query filters.
@@ -200,9 +419,6 @@ end
200
419
201
420
Deletes a customer profile from a business. This operation also unlinks any associated cards on file.
202
421
203
-
As a best practice, include the `version` field in the request to enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) control.
204
-
If included, the value must be set to the current version of the customer profile.
205
-
206
422
To delete a customer profile that was created by merging existing profiles, you must use the ID of the newly created profile.
207
423
208
424
```ruby
@@ -274,11 +490,7 @@ end
274
490
# Update Customer
275
491
276
492
Updates a customer profile. This endpoint supports sparse updates, so only new or changed fields are required in the request.
277
-
To add or update a field, specify the new value. To remove a field, specify `null`
278
-
(recommended) or specify an empty string (string fields only).
279
-
280
-
As a best practice, include the `version` field in the request to enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) control.
281
-
If included, the value must be set to the current version of the customer profile.
493
+
To add or update a field, specify the new value. To remove a field, specify `null`.
282
494
283
495
To update a customer profile that was created by merging existing profiles, you must use the ID of the newly created profile.
0 commit comments