Returns a single Order by its ID. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.orders.show({
bearer_token: '7381273269536713689562374856'
id: '1'
})
Creates a new Order 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.orders.create({
bearer_token: '7381273269536713689562374856',
order: {
item_total: 170.9,
total: 190.9,
state: "cart",
adjustment_total: 20,
user_id: "1",
completed_at: "2022-11-08 19:33:50 UTC",
bill_address_id: "1",
ship_address_id: "1",
payment_total: 190.9,
shipment_state: "backorder",
payment_state: "balance_due",
email: "hi@getvendo.com",
special_instructions: "I need it ASAP!",
currency: "USD",
last_ip_address: "127.0.0.1",
created_by_id: "1",
shipment_total: 10,
additional_tax_total: 10,
promo_total: 0,
channel: "online",
included_tax_total: 0,
item_count: 2,
approver_id: "string",
approved_at: "2022-11-08 19:33:50 UTC",
confirmation_delivered: false,
considered_risky: false,
canceled_at: "string",
canceler_id: "string",
taxable_adjustment_total: 170.9,
non_taxable_adjustment_total: 10,
store_owner_notification_delivered: false,
bill_address_attributes: {
address: {
country_id: "224",
state_id: "516",
state_name: "New York",
address1: "5th ave",
address2: "1st suite",
city: "NY",
zipcode: "10001",
phone: "+1 123 456 789",
alternative_phone: "string",
firstname: "John",
lastname: "Snow",
label: "My home address",
company: "Vendo Cloud Inc",
user_id: "string",
public_metadata: {
distance_from_city_in_km: 10,
location_type: "building"
},
private_metadata: {
close_to_shop: true
}
}
},
ship_address_attributes: {
address: {
country_id: "224",
state_id: "516",
state_name: "New York",
address1: "5th ave",
address2: "1st suite",
city: "NY",
zipcode: "10001",
phone: "+1 123 456 789",
alternative_phone: "string",
firstname: "John",
lastname: "Snow",
label: "My home address",
company: "Vendo Cloud Inc",
user_id: "string",
public_metadata: {
distance_from_city_in_km: 10,
location_type: "building"
},
private_metadata: {
close_to_shop: true
}
}
}
}
})
Update selected Order. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.orders.update({
bearer_token: '7381273269536713689562374856',
id: '1',
order: {
item_total: 170.9,
total: 190.9,
state: "cart",
adjustment_total: 20,
user_id: "1",
completed_at: "2022-11-08 19:33:50 UTC",
bill_address_id: "1",
ship_address_id: "1",
payment_total: 190.9,
shipment_state: "backorder",
payment_state: "balance_due",
email: "hi@getvendo.com",
special_instructions: "I need it ASAP!",
currency: "USD",
last_ip_address: "127.0.0.1",
created_by_id: "1",
shipment_total: 10,
additional_tax_total: 10,
promo_total: 0,
channel: "online",
included_tax_total: 0,
item_count: 2,
approver_id: "string",
approved_at: "2022-11-08 19:33:50 UTC",
confirmation_delivered: false,
considered_risky: false,
canceled_at: "string",
canceler_id: "string",
taxable_adjustment_total: 170.9,
non_taxable_adjustment_total: 10,
store_owner_notification_delivered: false,
bill_address_attributes: {
address: {
country_id: "224",
state_id: "516",
state_name: "New York",
address1: "5th ave",
address2: "1st suite",
city: "NY",
zipcode: "10001",
phone: "+1 123 456 789",
alternative_phone: "string",
firstname: "John",
lastname: "Snow",
label: "My home address",
company: "Vendo Cloud Inc",
user_id: "string",
public_metadata: {
distance_from_city_in_km: 10,
location_type: "building"
},
private_metadata: {
close_to_shop: true
}
}
},
ship_address_attributes: {
address: {
country_id: "224",
state_id: "516",
state_name: "New York",
address1: "5th ave",
address2: "1st suite",
city: "NY",
zipcode: "10001",
phone: "+1 123 456 789",
alternative_phone: "string",
firstname: "John",
lastname: "Snow",
label: "My home address",
company: "Vendo Cloud Inc",
user_id: "string",
public_metadata: {
distance_from_city_in_km: 10,
location_type: "building"
},
private_metadata: {
close_to_shop: true
}
}
}
}
})
This endpoint removes the specified Order. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.orders.remove({
bearer_token: '7381273269536713689562374856',
id: '1'
})
Advances an Order. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.orders.advance({
bearer_token: '7381273269536713689562374856',
id: '1'
})
Moves an Order to the next state. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.orders.next({
bearer_token: '7381273269536713689562374856',
id: '1'
})
Marks an Order as completed. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.orders.complete({
bearer_token: '7381273269536713689562374856',
id: '1'
})
Removes all line items, promotions, shipment and payments from an Order. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.orders.empty({
bearer_token: '7381273269536713689562374856',
id: '1'
})
Approves an Order, when using a token created for a user, it will save this user as the approver. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.orders.approve({
bearer_token: '7381273269536713689562374856',
id: '1'
})
Cancels an Order, when using a token created for a user, it will save this user as the canceler. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.orders.cancel({
bearer_token: '7381273269536713689562374856',
id: '1'
})
Creates Store Credit payment for an Order. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.orders.useStoreCredit({
bearer_token: '7381273269536713689562374856',
id: '1',
amount: 0
})
Applies Coupon Code for an Order. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.orders.applyCouponCode({
bearer_token: '7381273269536713689562374856',
id: '1',
coupon_code: 'string'
})
Protected
spreeOptional
tokens: ITokenOptional
params: anyOptional
responseParsing: ResponseParsingProtected
classifyProtected
processProtected
processProtected
spreeGenerated using TypeDoc
Returns a list of all Orders. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example: