Orders

The orders service is a feature within our platform that provides a payment service for products. It enables users to place orders and complete transactions conveniently and securely. With this service, customers can select the desired products from the catalog, add them to their cart, and proceed to the checkout process. The orders service handles the payment processing, ensuring a seamless and reliable transaction experience for both buyers and sellers. It may include features such as payment gateway integration, order tracking, and order management functionalities to streamline the entire purchase process.


POST/v1/orders/place-order

Place Order

This endpoint allows users to place an order through the platform. It requires a bearer token for authentication and accepts a JSON payload in the request body. Request Body:

The request body should include the following information:

  • Name
    externalOrderCode
    Type
    string
    Description

    A unique identifier for the order.

  • Name
    price
    Type
    integer
    Description

    The total price of the order.

  • Name
    currency
    Type
    string
    Description

    The currency in which the order is placed.

  • Name
    orderProducts
    Type
    array
    Description

    An array of objects representing the individual products included in the order. Each object contains the following details:

  • Name
    productId
    Type
    integer
    Description

    The ID of the product.

  • Name
    price
    Type
    integer
    Description

    The price of the product.

  • Name
    sku
    Type
    integer
    Description

    The SKU code of the product.

  • Name
    currency
    Type
    integer
    Description

    The currency of the product price.

  • Name
    quantity
    Type
    integer
    Description

    The quantity of the product ordered.

Documentation:

The endpoint will process the order and return an appropriate response indicating the status of the order placement.

Request

POST
/v1/orders/place-order
curl -X POST \
-H "Authorization: Bearer <ACCESS_TOKEN>" -H "Content-Type: application/json" -d '{
    "externalOrderCode": "O-12345",
    "price": 4398,
    "currency": "GBP",
    "orderProducts": [
        {
            "productId": 2,
            "price": 3299,
            "sku": "GB-EN-4251604177278",
            "currency": "GBP",
            "quantity": 1
        },
        {
            "productId": 6,
            "price": 839,
            "sku": "GB-EN-4251604133182",
            "currency": "GBP",
            "quantity": 1
        }
    ]
}' \
https://api.kalixo.io/v1/orders/place-order

Response

{
	"orderId": "59400",
	"products": [{
			"price": 1099,
			"productId": 1,
			"quantity": 1,
			"pin": [{
				"PIN": "ABCDE-FGHIJ-KLMNO-PQRST-UVWXY"
			}]
		},
		{
			"price": 3299,
			"productId": 2,
			"quantity": 2,
			"pin": [{
				"PIN": "ABCDE-FGHIJ-KLMNO-PQRST-UVWXY"
			}, {
				"PIN": "ABCDE-FGHIJ-KLMNO-PQRST-UVWXY"
			}]
		}
	]
}

GET/v1/orders/retrieve-order

Retrieve Order

This endpoint allows users to retrieve an order through the platform. It requires a bearer token for authentication and accepts a JSON payload in the request body.

This endpoint allows users to fetch a specific order included with the order details and pins.

Possible order statuses:

  1. 'requested' - the ordering process waits to be processed
  2. 'processing' - the ordering process is still in progress
  3. 'completed' - the order is completed
  4. 'cancelled' - the order was cancelled
  5. 'failed' - the order failed
  6. 'error' - there was an error in the order process

The endpoint will retrieve the order and return an appropriate response indicating the status of the order.

Request

GET
/v1/orders/retrieve-order?id=59400
curl -X GET \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
https://api.kalixo.io/v1/orders/retrieve-order?id=59400

Response

{
    "orderId": 59400,
    "orderStatus": "completed",
    "products": [{
			"price": 1099,
			"productId": 1,
			"quantity": 1,
			"pin": [{
				"PIN": "ABCDE-FGHIJ-KLMNO-PQRST-UVWXY"
			}]
		},
		{
			"price": 3299,
			"productId": 2,
			"quantity": 2,
			"pin": [{
				"PIN": "ABCDE-FGHIJ-KLMNO-PQRST-UVWXY"
			}, {
				"PIN": "ABCDE-FGHIJ-KLMNO-PQRST-UVWXY"
			}]
		}
	]
}