(orders)
The orders endpoints.
- create_order - Create an order.
Create an order for a drink.
import speakeasybar
from speakeasybar.models import shared
s = speakeasybar.Speakeasybar(
security=shared.Security(
api_key="<YOUR_API_KEY>",
),
)
res = s.orders.create_order(request_body=[
shared.OrderInput(
product_code='APM-1F2D3',
quantity=26535,
type=shared.OrderType.DRINK,
),
], callback_url='<value>')
if res.order is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request_body |
List[shared.OrderInput] | ✔️ | N/A |
callback_url |
Optional[str] | ➖ | The url to call when the order is updated. |
operations.CreateOrderResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.APIError | 5XX | application/json |
errors.SDKError | 4xx-5xx | / |