Placing Orders

Managing Inventory

To begin placing orders on Regolith, merchants can access the inventory endpoint to view available items, including the country they are available in and the VAT for that country. Follow these steps to manage inventory:

  1. Inventory Endpoint:

    GET /api/v1/Inventory/allInventory – Retrieves a list of available items.

Placing Orders

To place orders for items and equipment, merchants need to add items to their cart and then proceed to place the order. Follow these steps to place orders:

While it is possible to add multiple items to the cart, please only add items that are to be delivered to one person at a time, as all items in cart would automatically be added when an order is being created.

  1. Cart Endpoints: Regolith provides CRUD endpoints for managing the cart, including adding, deleting, updating, viewing all items in the cart, and searching. All GET endpoints are paginated, allowing merchants to specify
    page number and page size when making requests.

    GET /api/v1/Carts/getCartItems – Gets all items in cart.

    POST /api/v1/Carts/addCartItem – Adds an item to cart.

    PUT /api/v1/Carts/updateCartItem/{cartId} – Updates a cart item.

    DELETE /api/v1/Carts/deleteCartItem/{cartId} – Deletes a cart item.

    Add to Cart Payload Example:

				
					{
"itemId": 123,
"quantity": 2
}
				
			
  1. Place Order: Once items have been added to the cart, merchants can proceed to place the order. All items in the cart will be added to the order. To make an order, this endpoint should be called – 

    POST /api/v1/Orders/createOrder

    Order Payload Example:

				
					{
"employer": “Facebook”,
"buyerName": "John Doe",
"assignee": "Jane Smith",
"assigneeRole": "Manager",
"shippingAddress": {
"countryId": 0,
"address": "123 Main St",
"city": "City",
"state": "State",
"phoneNumber": "123-456-7890"
}
}
				
			

Order Management and Payment Settings

Managing Orders

Once orders are created, merchants get debited for the orders via the card earlier
connected. Merchants can also view all their orders, order details using the orderId,
and the status of their orders through the following endpoints:

  1. View All Orders: GET /api/v1/Orders/orders
  2. Order Detail: Get detailed information about a specific order by querying the
    orderId. GET /api/v1/Orders/orderDetail?orderId=<YourOrderId>
  3. Check Order Status: View the status of an order to track its progress.

Item Assignment

After orders are placed, the assigned items are populated with details from the order. Merchants can use the following endpoints to see who items were assigned to:
  1. Item Assignment: Retrieve information about which items were assigned to specific individuals or entities. GET /api/v1/AssignedItems/merchantAssigned

Payment Settings

Merchants can configure their payment settings and specify preferences for making
payments, including immediate payments for onboarding, purchase of items, and repairs of items. Use the payment settings APIs to manage payment preferences:

  1.  Set Payment Preferences: Configure payment settings to specify whether
    payments should be made immediately for various actions.
    POST/api/v1/PaymentSettings/setPaymentSettings
  2. View Connected Card Details: Retrieve details of the currently connected card
    via the getPaymentDetails endpoint. GET /api/v1/PaymentSettings/getPaymentDetails

Repairs Management

Requesting Repairs

Merchants can use the repair APIs to request repairs of items from their staff. The
POST /api/v1/Repairs endpoint allows merchants to make a request for an item to
be repaired. The payload should include the following information:

  • assignedItemId: The ID of the assigned item to be repaired.
  • itemId: The ID of the item to be repaired.
  • issues: Description of the issues the staff are currently facing with the item.

    Example Payload:

				
					{
"assignedItemId": 123,
"itemId": 456,
"issues": "Laptop screen cracked"
}
				
			

To check repair requests you have made, this endpoint should be called:

GET  /api/v1/Repairs

To check details of a repair request, call

GET /api/v1/Repairs/getSingleRequest/{requestId} passing in your requestId as a route params.

Retrieving Assigned Items

To get the assignedItemId, merchants can call the GET/api/v1/AssignedItems/merchantAssigned endpoint. This endpoint returns a
paginated list of all assigned items by a merchant. It also takes in an optional query
parameter, Employer, which can be used to filter the list based on employer names.

Managing Repair Requests

After making a repair request, merchants can view a list of all the repair requests they have made via the repair request APIs. They can also cancel a request if needed. GET /api/v1/Repairs