This quickstart walks you through the full buyer journey on the AgroPulse platform: creating an account, obtaining a JWT token, browsing available produce from a farmer, placing an order, and initializing payment through the Squad gateway. By the end you will have a working order and a checkout URL you can use to complete payment. All requests target the Django development server running atDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/OluwagbeminiyiA/agro_pulse-API/llms.txt
Use this file to discover all available pages before exploring further.
http://localhost:8000.
Replace the UUID values in the examples below with real IDs returned from the API.
Register a user
Create a new BUYER account by posting to A successful response returns
/api/users/. The role field accepts BUYER, SELLER, or TRANSPORTER. The password_confirm field must match password.HTTP 201 Created with the new user object, including the UUID you will need in later steps:Obtain a JWT token
Exchange your credentials for an access token and a refresh token. The access token is required for every authenticated request.Response:Store the
access token. Pass it as Authorization: Bearer <access_token> in all subsequent requests. See Authentication for token lifetimes and how to refresh.Browse available produce
List produce that is currently available for purchase. Pass your access token in the Response:Note the produce
Authorization header.id and the farmer UUID — you will need both when placing the order.Place an order
Create an order by referencing your buyer profile UUID, the farmer’s profile UUID, and the produce items you want. The The API creates the order with
delivery_type must be PICKUP or DELIVERY.order_status: "PENDING" and returns the new order object including its UUID. Record the order id — you will pass it to the payment endpoint in the next step. Then add line items by calling POST /api/order-items/ with the order UUID, produce UUID, quantity, and unit price.Initialize payment
Start a payment session for the order. The API calls the Squad payment gateway and returns a Response:Redirect the buyer to
checkout_url that you redirect your user to in order to complete payment.checkout_url to complete payment. Once payment is confirmed by Squad’s webhook, the order order_status transitions from PENDING to PAID.