Orders
Endpoints for all customer orders including endpoints for creating a new order/shopping cart. To create a new order/shopping cart, simply use the "Add Item" endpoint - the system will intelligently determine if there is any existing order/shopping cart, and if not, will create a new one. IMPORTANT NOTE: All "PENDING" order/shopping cart objects expire after 10 minutes of creation if no payment is detected. This is because the tokens that are added to the order are locked to prevent any one else from attempting to purchase them, the lock is released and the order CANCELLED after the 10 minutes runs up.
Orders /orders/ (GET)
All orders for a customer.
Authorization
Header | Value | Description |
---|---|---|
Authorization |
Bearer {JWT} | The JWT session token issued upon succesful customer login and verification. |
curl -X GET 'https://marketplace-api.curios.com/orders/' \
-H 'Content-type: application/json'
-H 'curios-api-key: {API Key}'
-H 'curios-date: {UTC Date/Time Stamp}'
-H 'Authorization: Bearer {JWT}' \
Order Details /orders/:id (GET)
Order details including checkout link if the order is in "PENDING" status.
Authorization
Header | Value | Description |
---|---|---|
Authorization |
Bearer {JWT} | The JWT session token issued upon succesful customer login and verification. |
curl -X GET 'https://marketplace-api.curios.com/orders/:id' \
-H 'Content-type: application/json'
-H 'curios-api-key: {API Key}'
-H 'curios-date: {UTC Date/Time Stamp}'
-H 'Authorization: Bearer {JWT}' \
Cart Add Item /orders/cartAddItem (POST)
Creates an Order and adds an item to the "shopping cart" for purchase. If a pending order or existing cart already exists, it will reuse that order.
Authorization
Header | Value | Description |
---|---|---|
Authorization |
Bearer {JWT} | The JWT session token issued upon succesful customer login and verification. |
Body
Argument | Value | Required | Description |
---|---|---|---|
listing_id |
{listing id} | Yes | ID of the listing for the token that the customer is purchasing. |
curl -X POST 'https://marketplace-api.curios.com/orders/cartAddItem' \
-H 'Content-type: application/json'
-H 'curios-api-key: {API Key}'
-H 'curios-date: {UTC Date/Time Stamp}'
-H 'Authorization: Bearer {JWT}' \
-d '{
"listing_id": {listing id}
}'
Cart Delete Item /orders/cartDeleteItem (POST)
Deletes and item from the PENDING order/shopping cart.
Authorization
Header | Value | Description |
---|---|---|
Authorization |
Bearer {JWT} | The JWT session token issued upon succesful customer login and verification. |
Body
Argument | Value | Required | Description |
---|---|---|---|
order_item_id |
{order item id} | Yes | ID of the order item to delete from the PENDING order. |
curl -X POST 'https://marketplace-api.curios.com/orders/cartDeleteItem' \
-H 'Content-type: application/json'
-H 'curios-api-key: {API Key}'
-H 'curios-date: {UTC Date/Time Stamp}'
-H 'Authorization: Bearer {JWT}' \
-d '{
"order_item_id": {order item id}
}'
Cart Cancel /orders/cartCancel (GET)
Cancels the PENDING order/shopping cart.
Authorization
Header | Value | Description |
---|---|---|
Authorization |
Bearer {JWT} | The JWT session token issued upon succesful customer login and verification. |
curl -X GET 'https://marketplace-api.curios.com/orders/cartCancel' \
-H 'Content-type: application/json'
-H 'curios-api-key: {API Key}'
-H 'curios-date: {UTC Date/Time Stamp}'
-H 'Authorization: Bearer {JWT}' \
Cart Details /orders/cart (GET)
Gets the details of the shopping cart and checkout URL for the customer's current PENDING purchase/order.
Authorization
Header | Value | Description |
---|---|---|
Authorization |
Bearer {JWT} | The JWT session token issued upon succesful customer login and verification. |
curl -X GET 'https://marketplace-api.curios.com/orders/cart' \
-H 'Content-type: application/json'
-H 'curios-api-key: {API Key}'
-H 'curios-date: {UTC Date/Time Stamp}'
-H 'Authorization: Bearer {JWT}' \
Cart Update /orders/cartUpdate (POST)
Update details of the shopping cart before checkout.
Authorization
Header | Value | Description |
---|---|---|
Authorization |
Bearer {JWT} | The JWT session token issued upon succesful customer login and verification. |
Body
Argument | Value | Required | Description |
---|---|---|---|
confirmation_redirect |
{URL} | Yes | Fully qualified URL that customer will be redirected to after attempting to place an order - they will be redirected here for failed payments and pending payments as well as completed payments. |
curl -X POST 'https://marketplace-api.curios.com/orders/cartUpdate' \
-H 'Content-type: application/json'
-H 'curios-api-key: {API Key}'
-H 'curios-date: {UTC Date/Time Stamp}'
-H 'Authorization: Bearer {JWT}' \
-d '{
"confirmation_redirect": "{URL}"
}'