You can easily create new orders via TWICE Commerce Admin API
You can create new rental orders through API.
Use POST
to https://api.twicecommerce.com/admin/orders with a payload (example).
{
"startDate": "2024-11-26T20:11:20.477Z",
"duration": {
"period": "days",
"value": 1
},
"storeId": "PNEnzoEUhcLPGGkd3SEY",
"customer": {
"firstName": "John",
"lastName": "Doe",
"phone": "+1555555555",
"email": "john@doe.com",
"marketingConsent": true,
"language": "en",
"address": {
"address": "123 Main St",
"zipCode": "12345",
"city": "New York",
"country": "United States",
"state": "New York"
}
},
"items": [
{
"productId": "8cXDYcPTi3HbJjT8Z9t2",
"variantId": "YaW1E2arTJvvjcq70ACz",
"quantity": 1,
"duration": {
"period": "days",
"value": 1
}
}
],
"paid": true
}
The following fields are required
Check out our full full API documentation for creating an order.