cartLinesAdd
Adds merchandise lines to an existing cart
Authentication
Public Access: Accessible with the public API key
Mutation Structure
mutation {
cartLinesAdd(id: String!, lines: [CartLineInput!]!) {
cart {
# Cart fields
}
userErrors {
# UserError fields
}
}
}Input Arguments
Return Type
CartLinesAddPayload - Payload returned by the cartLinesAdd mutation. Returns an updated cart object and a list of user errors if any occurred during the operation.
Example
mutation {
cartLinesAdd(
id: "eyJhbGciOiJIUzI1NiJ9..."
lines: [
{
merchandiseId: "12345"
quantity: 2
}
]
) {
cart {
id
lines {
nodes {
id
quantity
}
}
}
userErrors {
field
message
}
}
}