🌭 Hotdog stand

List orders

Returns a list of all orders with pagination.

get
https://hotdog.example.com/api/v1/orders

Query Parameters

limitinteger(int32)

Maximum number of items to return

Default:20

>= 1<= 100

offsetinteger(int32)

Number of items to skip for pagination

Default:0

>= 0

Response

application/json

Successful operation

dataarray[object]

Example:{"id":"5fa7b5a7-3a0a-4b8a-8b3a-4b8a5b5a7b5a","items":[{"item_name":"Hot Dog","quantity":2,"condiments":["mustard","relish"]}],"status":"pending","total_amount":10}

Show Child Parameters
metaobject
Show Child Parameters
get/orders
 
application/json

Retrieve order details

Retrieves details of a specific order.

get
https://hotdog.example.com/api/v1/orders/{orderId}

Path Parameters

orderIdstring(uuid)required

ID of the order to retrieve

Response

application/json

Successful operation

Order

idstring(uuid)

Unique identifier for the order

itemsarray[object]

Example:{"item_name":"Hot Dog","quantity":1,"condiments":["mustard","ketchup"]}

Show Child Parameters
statusstring

Status of the order

Allowed values:pendingconfirmedcancelledcompleted

total_amountnumber(float)

Total amount of the order

get/orders/{orderId}
 
application/json

Update an order

Updates an existing order.

put
https://hotdog.example.com/api/v1/orders/{orderId}

Path Parameters

orderIdstring(uuid)required

ID of the order to update

Body

application/json

OrderRequest

itemsarray[object]

Example:{"item_name":"Hot Dog","quantity":1,"condiments":["mustard","ketchup"]}

Show Child Parameters

Response

application/json

Order updated successfully

Order

idstring(uuid)

Unique identifier for the order

itemsarray[object]

Example:{"item_name":"Hot Dog","quantity":1,"condiments":["mustard","ketchup"]}

Show Child Parameters
statusstring

Status of the order

Allowed values:pendingconfirmedcancelledcompleted

total_amountnumber(float)

Total amount of the order

put/orders/{orderId}

Body

{ "items": [ { "item_name": "Hot Dog", "quantity": 2, "condiments": [ "mustard", "relish" ] } ] }
 
application/json

Cancel an order

Cancels an order.

delete
https://hotdog.example.com/api/v1/orders/{orderId}

Path Parameters

orderIdstring(uuid)required

ID of the order to cancel

Response

Order cancelled successfully

delete/orders/{orderId}
 

Process payment for an order

Processes payment for a specific order.

post
https://hotdog.example.com/api/v1/orders/{orderId}/payment

Path Parameters

orderIdstring(uuid)required

ID of the order to process payment for

Body

application/json

PaymentInfo

payment_methodstring

Payment method used

Allowed values:credit_cardpaypalcash

amountnumber(float)

Amount to be paid

Response

application/json

Payment processed successfully

statusstring

Status of the payment

post/orders/{orderId}/payment

Body

{ "payment_method": "credit_card", "amount": 10 }
 
application/json