Sellback Cart API
Use these APIs to create, manage and submit sellback orders with ValoreBooks.
Routes
https://test.valorebooks.com/sellback/cart (qa)
https://api.valorebooks.com/sellback/cart (production)
POST
Create a new cart to add items to
Parameters
Name
Located in
Description
Type
Content-Type
header
String
Responses
200
Details about your newly created sellback list
{
"id": 123,
"state": "ACTIVE",
"items": []
}
403
Your AWS credentials are not correct
No user found with given credentials.
No affiliate found with given credentials.
500
An internal error occurred
POST Create a new cart to add items to
Parameters
Name | Located in | Description | Type |
---|---|---|---|
Content-Type | header | String |
Responses
200 Details about your newly created sellback list
{
"id": 123,
"state": "ACTIVE",
"items": []
}
403 Your AWS credentials are not correct
No user found with given credentials.
No affiliate found with given credentials.
500 An internal error occurred
https://test.valorebooks.com/sellback/cart/{id}/item (qa)
https://api.valorebooks.com/sellback/cart/{id}/item (production)
POST
Add an item to your cart
Parameters
Name
Located in
Description
Type
Content-Type
header
String
id
path
Id of cart the item will be added to
Long
isbn
body
ISBN of item that will be added to the cart
String
Request Examples
{
"isbn": 9781234567890
}
Responses
200
Details about the cart with the newly added item
{
"id": 60,
"status": "ACTIVE",
"items": [
{
"id": 69,
"isbn": "9781305577213",
"price": 39.35,
"status": "LOCKED"
},
{
"id": 68,
"isbn": "9780321356680",
"price": 11.28,
"status": "LOCKED"
},
{
"id": 67,
"isbn": "9781118771334",
"price": 9.25,
"status": "UNLOCKED"
}
]
}
400
There was an error with your request
Missing or invalid `id` parameter.
Given cart id does not match the cart this item belongs to.
This cart has already completed its transaction.
This cart is currently completing its transaction.
403
Your AWS credentials are not correct
No user found with given credentials.
No affiliate found with given credentials.
404
Not found
No cart found with given id
500
An internal error occurred
POST Add an item to your cart
Parameters
Name | Located in | Description | Type |
---|---|---|---|
Content-Type | header | String | |
id | path | Id of cart the item will be added to | Long |
isbn | body | ISBN of item that will be added to the cart | String |
Request Examples
{
"isbn": 9781234567890
}
Responses
200 Details about the cart with the newly added item
{
"id": 60,
"status": "ACTIVE",
"items": [
{
"id": 69,
"isbn": "9781305577213",
"price": 39.35,
"status": "LOCKED"
},
{
"id": 68,
"isbn": "9780321356680",
"price": 11.28,
"status": "LOCKED"
},
{
"id": 67,
"isbn": "9781118771334",
"price": 9.25,
"status": "UNLOCKED"
}
]
}
400 There was an error with your request
Missing or invalid `id` parameter.
Given cart id does not match the cart this item belongs to.
This cart has already completed its transaction.
This cart is currently completing its transaction.
403 Your AWS credentials are not correct
No user found with given credentials.
No affiliate found with given credentials.
404 Not found
No cart found with given id
500 An internal error occurred
https://test.valorebooks.com/sellback/cart/{id} (qa)
https://api.valorebooks.com/sellback/cart/{id} (production)
GET
Retrieve a list of all the items currently in your cart
Parameters
Name
Located in
Description
Type
Content-Type
header
String
id
path
Id of the sellback cart
String
Responses
200
Details about your cart and items
{
"id": 60,
"status": "ACTIVE",
"items": [
{
"id": 69,
"isbn": "9781305577213",
"price": 39.35,
"status": "LOCKED"
},
{
"id": 68,
"isbn": "9780321356680",
"price": 11.28,
"status": "LOCKED"
},
{
"id": 67,
"isbn": "9781118771334",
"price": 9.25,
"status": "UNLOCKED"
}
]
}
403
Your AWS credentials are not correct
No user found with given credentials.
No affiliate found with given credentials.
404
Not found
No cart found with given id
500
An internal error occurred
GET Retrieve a list of all the items currently in your cart
Parameters
Name | Located in | Description | Type |
---|---|---|---|
Content-Type | header | String | |
id | path | Id of the sellback cart | String |
Responses
200 Details about your cart and items
{
"id": 60,
"status": "ACTIVE",
"items": [
{
"id": 69,
"isbn": "9781305577213",
"price": 39.35,
"status": "LOCKED"
},
{
"id": 68,
"isbn": "9780321356680",
"price": 11.28,
"status": "LOCKED"
},
{
"id": 67,
"isbn": "9781118771334",
"price": 9.25,
"status": "UNLOCKED"
}
]
}
403 Your AWS credentials are not correct
No user found with given credentials.
No affiliate found with given credentials.
404 Not found
No cart found with given id
500 An internal error occurred
https://test.valorebooks.com/sellback/cart/{id}/lock (qa)
https://api.valorebooks.com/sellback/cart/{id}/lock (production)
POST
Lock all items currently in your cart for another 10 minutes
Parameters
Name
Located in
Description
Type
Content-Type
header
String
id
path
Id of the sellback cart you want to lock
String
Responses
200
Details about your cart and items
{
"id": 60,
"status": "ACTIVE",
"items": [
{
"id": 69,
"isbn": "9781305577213",
"price": 39.35,
"status": "LOCKED"
},
{
"id": 68,
"isbn": "9780321356680",
"price": 11.28,
"status": "LOCKED"
},
{
"id": 67,
"isbn": "9781118771334",
"price": 9.25,
"status": "LOCKED"
}
]
}
400
There was an error with your request
Invalid sellback cart id `id`
Cannot lock items in cart `id` because it is not active
403
Your AWS credentials are not correct
No user found with given credentials.
No affiliate found with given credentials.
404
Not found
Cannot find a sellback cart for id `id`
500
An internal error occurred
POST Lock all items currently in your cart for another 10 minutes
Parameters
Name | Located in | Description | Type |
---|---|---|---|
Content-Type | header | String | |
id | path | Id of the sellback cart you want to lock | String |
Responses
200 Details about your cart and items
{
"id": 60,
"status": "ACTIVE",
"items": [
{
"id": 69,
"isbn": "9781305577213",
"price": 39.35,
"status": "LOCKED"
},
{
"id": 68,
"isbn": "9780321356680",
"price": 11.28,
"status": "LOCKED"
},
{
"id": 67,
"isbn": "9781118771334",
"price": 9.25,
"status": "LOCKED"
}
]
}
400 There was an error with your request
Invalid sellback cart id `id`
Cannot lock items in cart `id` because it is not active
403 Your AWS credentials are not correct
No user found with given credentials.
No affiliate found with given credentials.
404 Not found
Cannot find a sellback cart for id `id`
500 An internal error occurred
https://test.valorebooks.com/sellback/cart/{cartId}/item/{itemId}/remove (qa)
https://api.valorebooks.com/sellback/cart/{cartId}/item/{itemId}/remove (production)
DELETE
Remove an item from your cart
Parameters
Name
Located in
Description
Type
Content-Type
header
String
cartId
path
Id of cart the item will be removed from
Long
itemId
path
Id of item that will be removed from the cart
Long
Responses
200
Success
400
There was an error with your request
Missing or invalid `itemId` parameter.
Missing or invalid `cartId` parameter.
Given cart id does not match the cart this item belongs to.
This cart has already completed its transaction.
This cart is currently completing its transaction.
403
Your AWS credentials are not correct
No user found with given credentials.
No affiliate found with given credentials.
404
Not found
Cannot find a sellback cart for id `id`
500
An internal error occurred
DELETE Remove an item from your cart
Parameters
Name | Located in | Description | Type |
---|---|---|---|
Content-Type | header | String | |
cartId | path | Id of cart the item will be removed from | Long |
itemId | path | Id of item that will be removed from the cart | Long |
Responses
200 Success
400 There was an error with your request
Missing or invalid `itemId` parameter.
Missing or invalid `cartId` parameter.
Given cart id does not match the cart this item belongs to.
This cart has already completed its transaction.
This cart is currently completing its transaction.
403 Your AWS credentials are not correct
No user found with given credentials.
No affiliate found with given credentials.
404 Not found
Cannot find a sellback cart for id `id`
500 An internal error occurred
https://test.valorebooks.com/sellback/cart/{cartId}/item/{itemId}/acknowledgeRemove (qa)
https://api.valorebooks.com/sellback/cart/{cartId}/item/{itemId}/acknowledgeRemove (production)
POST
Acknowledge an item has been removed from your cart
Parameters
Name
Located in
Description
Type
Content-Type
header
String
cartId
path
Id of cart the item was removed from
Long
itemId
path
Id of item that was removed from the cart
Long
Responses
200
Success
400
There was an error with your request
Missing or invalid `itemId` parameter.
Missing or invalid `cartId` parameter.
Given cart id does not match the cart this item belongs to.
This cart has already completed its transaction.
This cart is currently completing its transaction.
403
Your AWS credentials are not correct
No user found with given credentials.
No affiliate found with given credentials.
404
Not found
Cannot find a sellback cart for id `id`
500
An internal error occurred
POST Acknowledge an item has been removed from your cart
Parameters
Name | Located in | Description | Type |
---|---|---|---|
Content-Type | header | String | |
cartId | path | Id of cart the item was removed from | Long |
itemId | path | Id of item that was removed from the cart | Long |
Responses
200 Success
400 There was an error with your request
Missing or invalid `itemId` parameter.
Missing or invalid `cartId` parameter.
Given cart id does not match the cart this item belongs to.
This cart has already completed its transaction.
This cart is currently completing its transaction.
403 Your AWS credentials are not correct
No user found with given credentials.
No affiliate found with given credentials.
404 Not found
Cannot find a sellback cart for id `id`
500 An internal error occurred
https://test.valorebooks.com/sellback/cart/{id}/checkout (qa)
https://api.valorebooks.com/sellback/cart/{id}/checkout (production)
POST
Complete the checkout and create orders for the items in your cart
Parameters
Name
Located in
Description
Type
Content-Type
header
String
id
path
Id of the cart you want to checkout
String
address
body
Contains payment address information
Object
line1
address
First line of payment address
Object
line2
address
Line 2 of payment address (Note: This value cannot exceed 35 characters)
String
city
address
City of payemnt address
String
state
address
Two letter US state abbreviation of payment address (e.g. MA)
String
postalCode
address
5 or 9 digit US postal code of payment address (e.g. 02210 or 02210-1014)
String
emailAddress
body
Email address of contact
Object
firstName
body
First name of contact
String
lastName
body
Last name of contact
String
phoneNumber
body
Phone number of contact
String
paymentMethod
body
Payment method for the order (CHECK or PAYPAL)
String
Request Examples
{
"address": {
"line1": "123 Main Street",
"city": "Boston",
"state": "MA",
"postalCode": "02210"
},
"emailAddress": "example@google.com",
"firstName": "Joe",
"lastName": "Smith",
"phoneNumber": "5555555555",
"paymentMethod": "CHECK"
}
Responses
200
Details about your order
{
"orderId": 2544953,
"orderTotal": 59.88,
"items": [
{
"id": 6050209,
"isbn": "9781305577213",
"price": 39.35,
"status": "Pending"
},
{
"id": 6050210,
"isbn": "9780321356680",
"price": 11.28,
"status": "Pending"
},
{
"id": 6050211,
"isbn": "9781118771334",
"price": 9.25,
"status": "Pending"
}
]
}
400
There was an error with your request
Cannot checkout cart `id` because it is not active
Cannot checkout cart `id`. Error: `address` information is missing.
Requires: address.line1, address.city, address.state, address.postalCode
Cannot checkout cart `id`. Error: field `$field` is missing.
Cannot checkout cart `id`. Error: field `paymentMethod` is missing or invalid.
Cannot checkout cart `id` because there are no eligible items
We're sorry, but we cannot accept a PO Box as a valid address. Please enter a valid address.
The customer information you supplied is associated with previous orders that were determined to be counterfeit,
or otherwise violated one or more of our marketplace policies. Orders cannot be placed with that information.
403
Your AWS credentials are not correct
No user found with given credentials.
No affiliate found with given credentials.
404
Not found
Cannot find a sellback cart for id `id`
409
There was a confilict with your request
Cannot checkout cart `id` because an item became unavailable
500
An internal error occurred
POST Complete the checkout and create orders for the items in your cart
Parameters
Name | Located in | Description | Type |
---|---|---|---|
Content-Type | header | String | |
id | path | Id of the cart you want to checkout | String |
address | body | Contains payment address information | Object |
line1 | address | First line of payment address | Object |
line2 | address | Line 2 of payment address (Note: This value cannot exceed 35 characters) | String |
city | address | City of payemnt address | String |
state | address | Two letter US state abbreviation of payment address (e.g. MA) | String |
postalCode | address | 5 or 9 digit US postal code of payment address (e.g. 02210 or 02210-1014) | String |
emailAddress | body | Email address of contact | Object |
firstName | body | First name of contact | String |
lastName | body | Last name of contact | String |
phoneNumber | body | Phone number of contact | String |
paymentMethod | body | Payment method for the order (CHECK or PAYPAL) | String |
Request Examples
{
"address": {
"line1": "123 Main Street",
"city": "Boston",
"state": "MA",
"postalCode": "02210"
},
"emailAddress": "example@google.com",
"firstName": "Joe",
"lastName": "Smith",
"phoneNumber": "5555555555",
"paymentMethod": "CHECK"
}
Responses
200 Details about your order
{
"orderId": 2544953,
"orderTotal": 59.88,
"items": [
{
"id": 6050209,
"isbn": "9781305577213",
"price": 39.35,
"status": "Pending"
},
{
"id": 6050210,
"isbn": "9780321356680",
"price": 11.28,
"status": "Pending"
},
{
"id": 6050211,
"isbn": "9781118771334",
"price": 9.25,
"status": "Pending"
}
]
}
400 There was an error with your request
Cannot checkout cart `id` because it is not active
Cannot checkout cart `id`. Error: `address` information is missing.
Requires: address.line1, address.city, address.state, address.postalCode
Cannot checkout cart `id`. Error: field `$field` is missing.
Cannot checkout cart `id`. Error: field `paymentMethod` is missing or invalid.
Cannot checkout cart `id` because there are no eligible items
We're sorry, but we cannot accept a PO Box as a valid address. Please enter a valid address.
The customer information you supplied is associated with previous orders that were determined to be counterfeit,
or otherwise violated one or more of our marketplace policies. Orders cannot be placed with that information.
403 Your AWS credentials are not correct
No user found with given credentials.
No affiliate found with given credentials.
404 Not found
Cannot find a sellback cart for id `id`
409 There was a confilict with your request
Cannot checkout cart `id` because an item became unavailable