Create Checkout URL
This API endpoint generates a checkout URL for a specified product. Ensure the project you choose has availability greater than 0.
Endpoint:
- URL:
http://baseURL/rest/main_EUR/V1/checkout/url - Method:
POST
Request Body (JSON):
{
"sku": "303730",
"vintageYear": 2019,
"qty": 30.2
}
Parameters:
- sku: (string, required) — The SKU (Stock Keeping Unit) of the product for which the checkout URL is to be created.
- vintageYear: (integer, required) — The vintage year of the product.
- qty: (float, required) — The quantity for the checkout. Ensure the quantity does not exceed the availability of the selected product.
Response:
Upon success, the response returns a checkout URL, indicating that the checkout URL was generated successfully.
{
"success": true,
"message": "Checkout URL built successfully.",
"url": "..."
}
- success: (boolean) — Indicates if the URL was created successfully.
- message: (string) — Provides a message confirming the URL generation.
- url: (string) — The generated checkout URL.
Example Request:
POST http://baseURL/rest/main_EUR/V1/checkout/url
Content-Type: application/json
{
"sku": "303730",
"vintageYear": 2019,
"qty": 30.2
}
Example Response:
{
"success": true,
"message": "Checkout URL built successfully.",
"url": "https://shop.example.com/checkout?session_id=abcdef123456"
}