Returns a single Line Item by its ID. See api docs.
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.items.show({
bearer_token: '7381273269536713689562374856'
id: '1'
})
Creates a new Line Item and returns its attributes. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.items.create({
bearer_token: '7381273269536713689562374856',
line_item: {
order_id: '1',
variant_id: '1',
quantity: 2,
public_metadata: {},
private_metadata: {}
}
})
Update selected Line Item for the signed in User. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.items.update({
bearer_token: '7381273269536713689562374856',
id: '1',
line_item: {
variant_id: '1',
quantity: 2
}
})
This endpoint removes the specified Line Item for the current user. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.items.remove({
bearer_token: '7381273269536713689562374856',
id: '1'
})
Protected
spreeOptional
tokens: ITokenOptional
params: anyOptional
responseParsing: ResponseParsingProtected
classifyProtected
processProtected
processProtected
spreeGenerated using TypeDoc
Returns a list of all Line Items. See api docs.
Success response schema: Success schema
Failure response schema: Error schema
Example: