Orders
GET
Responses
200
Orders retrieved successfully
application/json
401
Unauthorized
application/json
get
GET /orders HTTP/1.1
Host:
Accept: */*
[
{
"id": 1,
"userId": 1,
"date": "2023-01-01T00:00:00Z",
"products": [
{
"id": 1,
"name": "Product Name",
"quantity": 2,
"priceInCents": 1000
}
],
"amountInCents": 2000,
"clientSecret": "client_secret",
"status": "pending"
}
]
Path parameters
idnumberRequired
Responses
200
Order retrieved successfully
application/json
401
Unauthorized
application/json
404
Order not found
application/json
get
GET /orders/{id} HTTP/1.1
Host:
Accept: */*
{
"id": 1,
"userId": 1,
"date": "2023-01-01T00:00:00Z",
"products": [
{
"id": 1,
"name": "Product Name",
"quantity": 2,
"priceInCents": 1000
}
],
"amountInCents": 2000,
"clientSecret": "client_secret",
"status": "pending"
}
POST
Bodystring[]
string[]Optional
Responses
201
Order created successfully
application/json
400
Invalid order data
application/json
post
POST /orders/new HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 8
[
"text"
]
{
"id": 1,
"userId": 1,
"date": "2023-01-01T00:00:00Z",
"products": [
{
"id": 1,
"name": "Product Name",
"quantity": 2,
"priceInCents": 1000
}
],
"amountInCents": 2000,
"clientSecret": "client_secret",
"status": "pending"
}
Body
orderIdnumberRequiredExample:
ID of the order
123
statusstring · enumRequiredExample:
Status of the order
Pending
Possible values: Responses
200
Order status updated successfully
application/json
400
Invalid order status data
application/json
post
POST /orders/status-update HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 34
{
"orderId": 123,
"status": "Pending"
}
{
"id": 1,
"status": "completed"
}
PUT
Bodyobject[]
idnumberOptionalExample:
1
statusOrdernumberOptionalExample:
1
Responses
200
Lead statuses order updated successfully
application/json
500
Internal server error
application/json
put
PUT /leads/statuses/order HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 24
{
"id": 1,
"statusOrder": 1
}
[
{
"id": 1,
"statusOrder": 1
}
]
Last updated