Create a Customer Cart Association
POSThttps://useast.api.elasticpath.com/v2/carts/:cartID/relationships/customers
You can create associations between a customer and one or more carts. After cart associations exist for a customer, the customer can access those carts across any device.
Request
Path Parameters
cartID stringrequired
The ID for the cart created by the customer. Ensure that you follow the guidelines for Safe Characters.
Header Parameters
x-moltin-customer-token string
A customer token to access a specific customer's carts.
- application/json
Body
data undefined[]
Responses
- 200
- 401
OK
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
data undefined[]
{
"data": [
{
"id": "string",
"type": "string"
}
]
}
Unauthorized
- application/json
- Schema
- Example (from schema)
- Example
Schema
detail string
status string
title string
[
null
]
{
"errors": {
"status": 401,
"title": "Unauthorized"
}
}
Authorization: http
name: bearerAuthtype: httpscheme: bearer
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X POST 'https://useast.api.elasticpath.com/v2/carts/:cartID/relationships/customers' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"data": [
{
"id": "string",
"type": "string"
}
]
}'
ResponseClear