Create an Account Cart Association
POSThttps://useast.api.elasticpath.com/v2/carts/:cartID/relationships/accounts
You can create associations between an account and one or more carts. After cart associations exist for an account, the account can access those carts across any device.
Request
Path Parameters
cartID stringrequired
The ID for the cart created by the account. Ensure that you follow the guidelines for Safe Characters.
Header Parameters
EP-Account-Management-Authentication-Token string
An Account Management Authentication token to access a specific account's carts.
Body
data object[]
Responses
- 200
- 204
- 400
- 403
- 422
OK
Response Headers
Schema
data object[]
{
"data": [
{
"id": "string",
"type": "string"
}
]
}
No Content is sent back in case the account has already been associated to the cart.
Response Headers
Bad Request
Schema
errors object[]required
{
"errors": [
{
"title": "string",
"status": "string",
"detail": "string",
"meta": {
"id": "string",
"ids": [
"string"
],
"item_ids": [
"string"
],
"shipping_group_id": "string",
"shipping_group_ids": [
"string"
],
"cart_id": "string",
"code": "string",
"order_id": "string",
"value": "string"
}
}
]
}
Forbidden
Schema
errors object[]required
{
"errors": [
{
"title": "string",
"status": "string",
"detail": "string",
"meta": {
"id": "string",
"ids": [
"string"
],
"item_ids": [
"string"
],
"shipping_group_id": "string",
"shipping_group_ids": [
"string"
],
"cart_id": "string",
"code": "string",
"order_id": "string",
"value": "string"
}
}
]
}
Unprocessable Entity
Schema
errors object[]required
{
"errors": [
{
"title": "string",
"status": "string",
"detail": "string",
"meta": {
"id": "string",
"ids": [
"string"
],
"item_ids": [
"string"
],
"shipping_group_id": "string",
"shipping_group_ids": [
"string"
],
"cart_id": "string",
"code": "string",
"order_id": "string",
"value": "string"
}
}
]
}
Authorization: http
name: bearerAuthtype: httpscheme: bearer
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
ResponseClear