bring-forwardOrders

This page contains the documentation for the orders endpoints.

The orders endpoints allow you to view your current orders. You can also add, modify and delete your orders with these endpoints.

Get all Orders

get
/orders/get_all

This endpoint allows you to get the orders of the user. Order can either be:

  • pending: Order is in the pending state. It has not been delivered.
  • delivery: Order is in the delivery state. It is still in shipment and not completed.
  • completed: Order is completed an finalized.

To change the status of an order, use the POST Edit Orders endpoint.

Authorizations
AuthorizationstringRequired

Provide your API key.

Responses
chevron-right
200

Successful response. Returns all of the user's orders.

application/json
orderIdstringOptional

Unique identifier for the order.

productIdstringOptional

Unique identifier for the product in the order.

imagestringOptional

File name of the product's image.

namestringOptional

Name of the product.

pricenumberOptional

Price of the product (in dollars).

quantityintegerOptional

Quantity of the product in the order.

shippingstringOptional

Shipping type (e.g., "Regular").

statusstringOptional

Current status of the order (e.g., "pending").

createdAtstringOptional

Date the order was created.

orderNumintegerOptional

Order number associated with the transaction.

get
/orders/get_all

Add an Order

post
/orders/add

This endpoint allows users to create a new order by providing the list of items they want to purchase along with the shipping address.

  • Each item must include the product ID, quantity, and shipping type.
  • The address field specifies the delivery address for the order.
Authorizations
AuthorizationstringRequired

Provide your API key.

Body
addressstringRequired

Delivery address for the order.

Responses
chevron-right
200

Successful response. The order has been created successfully.

text/plain
stringOptionalExample: ORDER SUCCESS
post
/orders/add

Edit Orders

post
/orders/change-status

This endpoint allows users to update the status of one or more orders. Valid status values include:

  • pending: The order has not been delivered.
  • delivery: The order is in shipment.
  • completed: The order is finalized and delivered.

Users must provide the orderId and the new status for each order.

chevron-right
lockRequired scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired

Provide your API key.

Body
Responses
chevron-right
200

Successful response. Returns the updated orders with their details.

application/json
_idstringOptional

Unique identifier for the order.

userstringOptional

Unique identifier for the user who placed the order.

statusstringOptional

Current status of the order.

addressstringOptional

Delivery address for the order.

createdAtstring · date-timeOptional

Timestamp when the order was created.

__vintegerOptional

Internal versioning field.

post
/orders/change-status

Delete Orders

post
/orders/delete

This endpoint allows users to delete one or more orders.

  • Users must provide the orderId of each order to be deleted.
  • The response confirms whether the operation was successful and the number of orders deleted.
Authorizations
AuthorizationstringRequired

Provide your API key.

Body
orderIdstring[]Required

List of order IDs to be deleted.

Responses
chevron-right
200

Successful response. Confirms the number of deleted orders.

application/json
acknowledgedbooleanOptional

Indicates whether the deletion request was acknowledged.

deletedCountintegerOptional

The number of orders successfully deleted.

post
/orders/delete

Last updated