Create Test Data for Source

Use these APIs to create and modify your test Source orders and items.

Routes

https://test.valorebooks.com/test/buyback/order (qa)
https://api.valorebooks.com/test/buyback/order (production)

POST Create a new buyback order containing one buyback item

Parameters

Name Located in Description Type
Content-Type header String
price body Number
isbn body String
wantList query Value 1-5 to indicate which Want List to create the order for. Byte

Request Examples

Create a new order containing a new item with a price of $20.00 and isbn of 9780000000002.
{
    "price": 20.00,
    "isbn": "9780000000002"
}

Responses

200 The new order and item IDs
{
  "orderId": 123,
  "itemId": 456
}
400 There is an error in your request
Field `price` in the request is invalid.
Field `isbn` in the request is missing or invalid.
Could not find a product for the given `isbn`.
No bid found for `isbn` 9780000000002.
No bid for `isbn` 9780000000002 is currently available.
Bid has expired on 2018-03-15'T'11:00:00'Z'.
$20.00 is greater than max bid of $18.00.
$4.00 is less than buyer fee of $5.00.
Missing or invalid wantList
403 Your AWS credentials are not correct
No buyer found with given credentials.
404 Want List not found for buyer
Could not find wantList 2 for buyer 123
500 An internal error occurred

https://test.valorebooks.com/test/buyback/changeitemstatus (qa)
https://api.valorebooks.com/test/buyback/changeitemstatus (production)

POST Change the status of an item

Parameters

Name Located in Description Type
Content-Type header String
itemId body Number
status body accepted, in-transit, or rejected String

Request Examples

Change the status of the item whose ID is 1001 to `accepted`
{
    "itemId": 1001,
    "status": "accepted"
}

Responses

200 Success
400 There is an error in your request
Field `itemId` in the request is missing or invalid.
Could not find the item for the given `itemId`.
Field `status` in the request is missing or invalid.
An item with status `pending` can only change to `in-transit`, `accepted` or `rejected`.
An item with status `in-transit` can only change to `accepted` or `rejected`.
An item with status `accepted` cannot change.
An item with status `rejected` cannot change.
403 Your AWS credentials are not correct
No buyer found with given credentials.
500 An internal error occurred

https://test.valorebooks.com/test/buyback/shipment (qa)
https://api.valorebooks.com/test/buyback/shipment (production)

POST Create a shipment for one or more items

Parameters

Name Located in Description Type
Content-Type header String
itemIds body Array
wantList query Value 1-5 to indicate which Want List to create the shipment for. Byte

Request Examples

Create a shipment for items 1001 and 1002
{
    "itemIds": [1001, 1002]
}

Responses

200 Success
{
  "shipmentId": 45
}
400 There is an error in your request
Field `itemIds` in the request is missing or invalid.
Not all entries in `itemIds` have a corresponding product.
Missing or invalid wantList
403 Your AWS credentials are not correct
No buyer found with given credentials.
404 Want List not found for buyer
Could not find wantList 2 for buyer 123
500 An internal error occurred