Creating a cart
The request body for creating a cart contains the name of the cart to be created, assigned to the variable “cartName”.
URL of the POST method: https://api.itscope.com/2.1/business/carts
Example:
POST https://api.itscope.com/2.1/business/carts
{
"cartName": "Cart for Thomas"
}
Editing (renaming) a cart
The request body is the same as when creating a cart. Therefore, the new name of the cart is assigned to the variable “cartName”.
The cart to be edited is specified by the cartId, which is generated while creating a cart.
URL of the PUT method: https://api.itscope.com/2.1/business/carts/640b6b1e-01fa-423e-b072-8b7dca155c2e
{
"cartName": "Shopping by Thomas"
}
Deleting a cart
The cart to be deleted is specified by the cartId.
URL of the DELETE method: https://api.itscope.com/2.1/business/carts/640b6b1e-01fa-423e-b072-8b7dca155c2e
Adding products to a cart
The request body for adding products to a cart contains the ‘cartLineItem’ object. This object contains the following variables:
puid | Product ID on ITscope |
supplierId | Supplier ID on ITscope |
supplierItemId | Supplier’s item number |
quantity | Quantity |
comment | Line item comment |
The cartId specifies the cart where products should be added to.
URL of the POST method: product with the PUID 1559972000 to our cart, with a quantity of five and from the supplier Ingram Micro Germany. Ingram Germany has the supplier ID 14 and the product has the Ingram item number ‘9432GFW’.
POST https://api.itscope.com/2.1/business/carts/640b6b1e-01fa-423e-b072-8b7dca155c2e/cartlineitems
{
"cartLineItem": [
{
"puid": 1559972000,
"supplierId": 14,
"supplierItemId": "9432GFW",
"quantity": 5,
"comment": "For the printer in the southern office wing"
}
]
}
Removing products from a cart
The product to be removed is specified using the lineItemId. The cartId is also required in order to locate the cart from which the product is to be removed.
URL of the DELETE method: https://api.itscope.com/2.1/business/carts/640b6b1e-01fa-423e-b072-8b7dca155c2e/cartlineitems/9f8d78d5-118e-4f9d-9a98-2e6ec551c9b1
Showing a cart
Fetching a cart requires the cartId. The output will be in cart format.
URL of the GET method: https://api.itscope.com/2.1/business/carts/640b6b1e-01fa-423e-b072-8b7dca155c2e/cart.json
Listing all carts
Lists all carts. The output will be in shopping cart format.
URL of the GET method: https://api.itscope.com/2.1/business/carts/cart.json*
* or cart.xml
Example: