Services

A service is a delivery product configured for your account - the same options you pick from when creating an order in your panel. Each order belongs to exactly one service.

Your services

Services are set up per merchant by 4N NextDay, so the list, the codes and the names are specific to your account. Each service has:

FieldTypeDescription
idintegerUnique service identifier - this is what you send as service_id
codestringShort code chosen for your account (for example ECOM-STGO)
namestringDisplay name, as shown in your panel
typestringb2b, b2c or field (see below)

Service types

TypeMeaning
b2bDeliveries to businesses - stores, warehouses, offices
b2cDeliveries to consumers - home delivery
fieldCargo created by drivers on the road from blank labels. Auto-provisioned; not for integration orders and never chosen automatically

Choose a service

When syncing an order, include the service_id - just like selecting a service in your panel:

{
  "destination_address": "Calle Secundaria 456",
  "destination_locality": "Providencia",
  "weight": 2.5,
  "service_id": 27
}

What happens with service_id:

You sendResult
The id of one of your active servicesThe order is created with that service
NothingYour account's default active service is used (never a field one). 422 with There are no active services available for this merchant. if you have none
The id of a service that isn't yours or is inactive422 with The specified service is not available for this merchant.
An id that doesn't exist at all422 validation error on service_id: The selected service does not exist.

Fetch the list of services

Get your active services programmatically. This endpoint requires a merchant token:

GET
/services
curl https://api.4nortes.app/api/v1/services \
  -H "Authorization: Bearer {token}" \
  -H "Accept: application/json"

Response

{
  "success": true,
  "message": "Services retrieved successfully",
  "data": [
    {
      "id": 31,
      "code": "B2B-RM",
      "name": "Distribución B2B Región Metropolitana",
      "type": "b2b"
    },
    {
      "id": 27,
      "code": "ECOM-STGO",
      "name": "E-commerce Santiago",
      "type": "b2c"
    }
  ],
  "timestamp": "2025-02-03T10:00:00.000000Z"
}

Was this page helpful?