Connect Your First Order
Get your system connected in minutes. This guide shows you how to sync an order with 4N NextDay - the same as clicking "Create Order" in your panel, but automated.
You'll need a bearer token from your NextDay administrator to authenticate with the API. See the Authentication guide for details.
Base URL
All API requests should be made to the following base URL:
https://api.4nortes.app/api/v1
Authentication
The 4N NextDay API uses bearer tokens for authentication. Your token is provided by a NextDay system administrator.
Include the token in the Authorization header of all requests:
Authorization header
Authorization: Bearer {token}
Sync your first order
This is the same as filling out the order form in your panel. Instead of typing the details manually, your system sends them automatically:
curl -X POST https://api.4nortes.app/api/v1/orders/create \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"sender_name": "John Store",
"sender_phone": "+56912345678",
"sender_email": "store@example.com",
"recipient_name": "Jane Doe",
"recipient_phone": "+56987654321",
"recipient_email": "jane@example.com",
"destination_address": "Calle Secundaria 456",
"destination_locality": "Providencia",
"destination_reference": "Near the plaza",
"weight": 2.5,
"external_reference": "ORDER-001",
"service_id": 1,
"packages_count": 1
}'
You'll get back the order details with a tracking number - just like when you create an order in your panel:
Response
{
"success": true,
"message": "Order created successfully",
"data": {
"id": 12345,
"tracking_number": "4N000000012345",
"external_reference": "ORDER-001",
"delivery_state": "pending",
"destination": {
"address": "Calle Secundaria 456",
"locality": "Providencia"
},
"packages_count": 1,
"weight": 2.5,
"estimated_delivery_date": "2025-02-05",
"created_at": "2025-02-03T10:30:00.000000Z"
},
"timestamp": "2025-02-03T10:30:00.000000Z"
}
What's next?
Your first order is synced. Here's what else you can automate:
- Understand order states - See how orders flow through the system
- Sync orders automatically - Full orders reference
- Get notified of updates - Receive tracking updates automatically
- Handle errors - What to do when something goes wrong