Miare
Miare API

Delivery

Create and manage trips and courses.


List Trips

GET
https://ws.miare.ir
/trip-management/third-party-api/v2/trips/

Returns list of your trips matching the given conditions.

Server might not have or decide not to send you as many result items as limit but it never sends you more than that.

Errors

CodeDescription
not_authenticatedToken is missing or invalid

List Trips › query Parameters

area_id
​integer

Filter: The ID of the area of the pickup location. You can find list of available areas in the List Areas endpoint

state
​string

Filter: The state of the trip. Should be one of the states specified in Trip definition

is_round_trip
​boolean

Filter: Base on is_round_trip of trip

bill_number
​string

Filter: The bill_number of the courses in the trips.

from_datetime
​string · pattern: ^\d{4}-\d{2}-\d{2}T\…

Filter: Minimum acceptable value for trip's created_at field. This filter is inclusive

Serialized timestamp. Responses may use Z or +HHMM; request timestamps must include a timezone.

to_datetime
​string · pattern: ^\d{4}-\d{2}-\d{2}T\…

Filter: Maximum acceptable value for trip's created_at field. This filter is inclusive

Serialized timestamp. Responses may use Z or +HHMM; request timestamps must include a timezone.

offset
​integer · min: 0

Give results excluding the first offset number of objects

limit
​integer · min: 0

Give at most limit number of results. The default value is 100

Default: 100

List Trips › Responses

Successful response.

​object[] · required
next
​null | string · required

Next page URL, or null.

previous
​null | string · required

Previous page URL, or null.

total_count
​integer · min: 0 · required

Create Trip

POST
https://ws.miare.ir
/trip-management/third-party-api/v2/trips/

Creates a new trip and puts it in the assign queue.

Round-trip creation is available only to accounts enabled by Miare, not to all clients. Contact Miare to request enablement for your account. Until enabled, course return requirements in the create request are ignored and the trip is created without a requested return.

Each course can independently require a return to the pickup location. If any course has is_round_course: true, the trip requires one final return after all deliveries; a false value on another course does not cancel that requirement. This does not require a separate return after each course or add another delivery course. The trip-level response field is_round_trip is true when any course requires a return. To change the trip's return requirement after creation, use the Round Trip endpoint. Setting is_round_course is supported only in Create Trip. Add Course ignores this field, and Update Trip cannot change it.

Trip creation will fail if you don't have enough concurrency limit in the area of the pickup location of the given trip in the deadline shift.

For clients with proxy invoicing enabled, register the seller through the Register or Update Seller endpoint before creating a trip. For these clients, pickup.seller_id is required.

The maximum declared package value is checked separately for each course using payment.price, in Tomans (IRT). A value equal to the limit is allowed. If any course exceeds the effective limit, the entire request is rejected and no trip is created. The default cap applies unless a client-specific cap has been configured by Miare.

Contact the commercial team to configure a client-specific cap.

The mixed-course example above applies to clients that can create multi-course trips. Clients with auto-batching enabled can still send only one course per trip.

Errors

CodeDescription
not_authenticatedToken is missing or invalid
parse_errorThe request body is not a valid JSON string (has syntax error)
invalid_request_bodyRequest body does not follow the valid format
concurrency_limitClient does not have enough concurrency in the area of the pickup location in the shift specified by deadline
service_level_orderBased on the current environmental state, your service level is too low to receive services from Miare. Service limitation error mostly happens due to whether conditions or special occasions. In order to increase your service level or if you need more details about this limitation please contant sales team.
duplicated_bill_numberThere is already a course related to trip with states of (assign_queue, pickup, dropoff) with this bill number.
delivery_code_requireddelivery_code is required for each course when the client/source proof_of_delivery_policy is third_party.
delivery_code_invaliddelivery_code was provided but is not a valid 5-digit code. Leading/trailing whitespace is ignored before validation.
seller_not_registeredProxy invoicing is enabled and pickup.seller_id is missing or is not registered for the authenticated client. Register the seller before creating the trip.
invalid_boost_levelThis level is not among the current valid levels. Refer to the valid boost levels.
declared_package_value_too_highHTTP 400. A course's payment.price exceeds the effective declared-value cap for the client. The entire trip-creation request is rejected.

The course index in this example is zero-based (0 identifies the first course). The cap shown is illustrative; use code for error handling, as detail may change.

Create Trip › Request Body

​object · required
​object[] · minItems: 1 · required
​object

Create Trip › Responses

Successful response.

is_round_trip
​boolean · readOnly

Whether this trip requires a return to the pickup location. On creation, true when any course has is_round_course set to true. This is a response field, not a root-level Create Trip request field.

rounded_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

For accounts with round-trip creation enabled, null until return completion, then the recorded return-completion time. For a batched order, this is the completion time of the shared return. Cancellation or an aborted trip does not count as return completion.

id
​string · uuid

Unique ID of this trip

Example: 40626ed5-9260-4a55-af04-ef9705a41b90
​object
state
​string · enum

Current state of this trip. Advanced states depend on account configuration.

Enum values:
assign_queue
pickup
dropoff
returning
delivered
canceled_by_miare
canceled_by_client
receiving
Example: pickup
​object
​object[]

All of the different courses at which parts of this trip should be dropped off

created_at
​string · pattern: ^\d{4}-\d{2}-\d{2}T\…

The exact moment at which this trip is created for the first time

assigned_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

The time this trip was assigned to its current courier

picked_up_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

The time at which the courier picked up the items from pickup location

courier
​null | object
test_mode
​boolean

Whether or not this trip was created in test mode

Example: false
batch_id
​string · uuid

Current batch identifier; equals id before batching and may change while the trip is in progress.

delivery_cost
​null | integer

Final delivery cost in Tomans (IRT); null until available.

arrived_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

Serialized timestamp. Responses may use Z or +HHMM; request timestamps must include a timezone.

departed_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

Serialized timestamp. Responses may use Z or +HHMM; request timestamps must include a timezone.

​object

Cancel Trip

POST
https://ws.miare.ir
/trip-management/third-party-api/v2/trips/{trip_id}/cancel/

Cancels one of your trips indicated by its ID.

Note that a trip cannot be canceled when it has passed 30 seconds since we’ve assigned it to a courier or the courier has already arrived at the source. In special cases that you still need to cancel the trip, please contact our support.

You can find ID of your trip in the response body of Create Trip request

The given trip ID must belong to your client.

Response body is a serialized trip. For a detailed version of it take a look at the response body of Create Trip request.

Successful calls to this endpoint will update the state of the trip to canceled_by_client.

Errors

CodeDescription
not_authenticatedToken is missing or invalid
parse_errorThe request body is not a valid JSON string (has syntax error)
invalid_request_bodyRequest body does not follow the valid format
record_not_foundA trip with the given ID does not belong to your client or doesn't exist at all
canceling_after_deadlineThe trip has been in assigned state for more than 30 seconds
canceling_arrived_tripThe trip's courier is already at the source location
canceling_ended_tripThe trip is already ended (delivered)
invalid_state_changeChanging the trip's state from its current state to canceled is not possible

Cancel Trip › path Parameters

trip_id
​string · uuid · required

The trip id belonging to the authenticated client.

Cancel Trip › Responses

Successful response.

is_round_trip
​boolean · readOnly

Whether this trip requires a return to the pickup location. On creation, true when any course has is_round_course set to true. This is a response field, not a root-level Create Trip request field.

rounded_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

For accounts with round-trip creation enabled, null until return completion, then the recorded return-completion time. For a batched order, this is the completion time of the shared return. Cancellation or an aborted trip does not count as return completion.

id
​string · uuid

Unique ID of this trip

Example: 40626ed5-9260-4a55-af04-ef9705a41b90
​object
state
​string · enum

Current state of this trip. Advanced states depend on account configuration.

Enum values:
assign_queue
pickup
dropoff
returning
delivered
canceled_by_miare
canceled_by_client
receiving
Example: pickup
​object
​object[]

All of the different courses at which parts of this trip should be dropped off

created_at
​string · pattern: ^\d{4}-\d{2}-\d{2}T\…

The exact moment at which this trip is created for the first time

assigned_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

The time this trip was assigned to its current courier

picked_up_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

The time at which the courier picked up the items from pickup location

courier
​null | object
test_mode
​boolean

Whether or not this trip was created in test mode

Example: false
batch_id
​string · uuid

Current batch identifier; equals id before batching and may change while the trip is in progress.

delivery_cost
​null | integer

Final delivery cost in Tomans (IRT); null until available.

arrived_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

Serialized timestamp. Responses may use Z or +HHMM; request timestamps must include a timezone.

departed_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

Serialized timestamp. Responses may use Z or +HHMM; request timestamps must include a timezone.

​object

Round Trip

POST
https://ws.miare.ir
/trip-management/third-party-api/v2/trips/{trip_id}/round-trip/

Enable or remove the return requirement for the trip indicated by its ID. This endpoint requires account enablement by Miare.

The return requirement can be changed while the trip is in assign_queue, pickup, dropoff, or returning state. Completed or canceled trips cannot be changed.

You can find ID of your trip in the response body of Create Trip request

The given trip ID must belong to your client.

Response body is a serialized trip. For a detailed version of it take a look at the response body of Create Trip request.

Requiring a return does not immediately change the trip state to returning. The trip enters returning after all deliveries are complete and a return is still required. Removing the last return requirement after deliveries are complete can end the trip.

Errors

CodeDescription
not_authenticatedToken is missing or invalid
parse_errorThe request body is not a valid JSON string (has syntax error)
invalid_request_bodyRequest body does not follow the valid format
record_not_foundA trip with the given ID does not belong to your client or doesn't exist at all
invalid_state_changeThe trip is already completed or canceled, so its return requirement cannot be changed.

Round Trip › path Parameters

trip_id
​string · uuid · required

The trip id belonging to the authenticated client.

Round Trip › Request Body

is_round_trip
​boolean · required

Require or remove one final return to the pickup location.

Round Trip › Responses

Successful response.

is_round_trip
​boolean · readOnly

Whether this trip requires a return to the pickup location. On creation, true when any course has is_round_course set to true. This is a response field, not a root-level Create Trip request field.

rounded_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

For accounts with round-trip creation enabled, null until return completion, then the recorded return-completion time. For a batched order, this is the completion time of the shared return. Cancellation or an aborted trip does not count as return completion.

id
​string · uuid

Unique ID of this trip

Example: 40626ed5-9260-4a55-af04-ef9705a41b90
​object
state
​string · enum

Current state of this trip. Advanced states depend on account configuration.

Enum values:
assign_queue
pickup
dropoff
returning
delivered
canceled_by_miare
canceled_by_client
receiving
Example: pickup
​object
​object[]

All of the different courses at which parts of this trip should be dropped off

created_at
​string · pattern: ^\d{4}-\d{2}-\d{2}T\…

The exact moment at which this trip is created for the first time

assigned_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

The time this trip was assigned to its current courier

picked_up_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

The time at which the courier picked up the items from pickup location

courier
​null | object
test_mode
​boolean

Whether or not this trip was created in test mode

Example: false
batch_id
​string · uuid

Current batch identifier; equals id before batching and may change while the trip is in progress.

delivery_cost
​null | integer

Final delivery cost in Tomans (IRT); null until available.

arrived_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

Serialized timestamp. Responses may use Z or +HHMM; request timestamps must include a timezone.

departed_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

Serialized timestamp. Responses may use Z or +HHMM; request timestamps must include a timezone.

​object

Boost Trip

POST
https://ws.miare.ir
/trip-management/third-party-api/v2/trips/{trip_id}/boost/

Add, cancel, or update a trip's boost level by its ID.

You can only update trip in the assign_queue state.

You can find ID of your trip in the response body of Create Trip request

Response body is a serialized trip. For a detailed version of it take a look at the response body of Create Trip request.

Errors

CodeDescription
not_authenticatedToken is missing or invalid
parse_errorThe request body is not a valid JSON string (has syntax error)
invalid_request_bodyRequest body does not follow the valid format
record_not_foundA trip with the given ID does not belong to your client or doesn't exist at all
invalid_boost_levelThis level is not among the current valid levels. Refer to the valid boost levels.
invalid_trip_stateThe boost cannot be added, changed, or cancelled because the trip is no longer in assign_queue.

Boost Trip › path Parameters

trip_id
​string · uuid · required

The trip id belonging to the authenticated client.

Boost Trip › Request Body

level
​integer · min: 0 · required

A current boost level, or 0 to cancel. Fetch valid levels periodically.

Boost Trip › Responses

Successful response.

is_round_trip
​boolean · readOnly

Whether this trip requires a return to the pickup location. On creation, true when any course has is_round_course set to true. This is a response field, not a root-level Create Trip request field.

rounded_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

For accounts with round-trip creation enabled, null until return completion, then the recorded return-completion time. For a batched order, this is the completion time of the shared return. Cancellation or an aborted trip does not count as return completion.

id
​string · uuid

Unique ID of this trip

Example: 40626ed5-9260-4a55-af04-ef9705a41b90
​object
state
​string · enum

Current state of this trip. Advanced states depend on account configuration.

Enum values:
assign_queue
pickup
dropoff
returning
delivered
canceled_by_miare
canceled_by_client
receiving
Example: pickup
​object
​object[]

All of the different courses at which parts of this trip should be dropped off

created_at
​string · pattern: ^\d{4}-\d{2}-\d{2}T\…

The exact moment at which this trip is created for the first time

assigned_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

The time this trip was assigned to its current courier

picked_up_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

The time at which the courier picked up the items from pickup location

courier
​null | object
test_mode
​boolean

Whether or not this trip was created in test mode

Example: false
batch_id
​string · uuid

Current batch identifier; equals id before batching and may change while the trip is in progress.

delivery_cost
​null | integer

Final delivery cost in Tomans (IRT); null until available.

arrived_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

Serialized timestamp. Responses may use Z or +HHMM; request timestamps must include a timezone.

departed_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

Serialized timestamp. Responses may use Z or +HHMM; request timestamps must include a timezone.

​object

Get Trip

GET
https://ws.miare.ir
/trip-management/third-party-api/v2/trips/{trip_id}/

Returns information about one of your trips indicated by its ID.

You can find ID of your trip in the response body of Create Trip request

The given trip ID must belong to your client.

Response body is a serialized trip. For a detailed version of it take a look at the response body of Create Trip request.

Errors

CodeDescription
not_authenticatedToken is missing or invalid
parse_errorThe request body is not a valid JSON string (has syntax error)
invalid_request_bodyRequest body does not follow the valid format
record_not_foundA trip with the given ID does not belong to your client or doesn't exist at all

Get Trip › path Parameters

trip_id
​string · uuid · required

The trip id belonging to the authenticated client.

Get Trip › Responses

Successful response.

is_round_trip
​boolean · readOnly

Whether this trip requires a return to the pickup location. On creation, true when any course has is_round_course set to true. This is a response field, not a root-level Create Trip request field.

rounded_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

For accounts with round-trip creation enabled, null until return completion, then the recorded return-completion time. For a batched order, this is the completion time of the shared return. Cancellation or an aborted trip does not count as return completion.

id
​string · uuid

Unique ID of this trip

Example: 40626ed5-9260-4a55-af04-ef9705a41b90
​object
state
​string · enum

Current state of this trip. Advanced states depend on account configuration.

Enum values:
assign_queue
pickup
dropoff
returning
delivered
canceled_by_miare
canceled_by_client
receiving
Example: pickup
​object
​object[]

All of the different courses at which parts of this trip should be dropped off

created_at
​string · pattern: ^\d{4}-\d{2}-\d{2}T\…

The exact moment at which this trip is created for the first time

assigned_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

The time this trip was assigned to its current courier

picked_up_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

The time at which the courier picked up the items from pickup location

courier
​null | object
test_mode
​boolean

Whether or not this trip was created in test mode

Example: false
batch_id
​string · uuid

Current batch identifier; equals id before batching and may change while the trip is in progress.

delivery_cost
​null | integer

Final delivery cost in Tomans (IRT); null until available.

arrived_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

Serialized timestamp. Responses may use Z or +HHMM; request timestamps must include a timezone.

departed_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

Serialized timestamp. Responses may use Z or +HHMM; request timestamps must include a timezone.

​object

deprecated

Update Trip

PUT
https://ws.miare.ir
/trip-management/third-party-api/v2/trips/{trip_id}/

Updates an existing trip and it's courses.

This endpoint cannot change requires_box. Existing course values are preserved, including when requires_box is supplied in the update request.

This endpoint cannot change is_round_course. Use Round Trip to change the return requirement after creation.

This endpoint is deprecated. Please refer to other endpoints.

You can only update trip in the assign_queue or pickup states.

The required boost field can only be changed or cancelled while the trip is in the assign_queue state.

Please note that in this request, the boost field is required, in contrast to the Create Trip request.

You can find ID of your trip in the response body of Create Trip request

Response body is a serialized trip. For a detailed version of it take a look at the response body of Create Trip request.

Errors

CodeDescription
not_authenticatedToken is missing or invalid
parse_errorThe request body is not a valid JSON string (has syntax error)
invalid_request_bodyRequest body does not follow the valid format
record_not_foundA trip with the given ID does not belong to your client or doesn't exist at all
too_lateTrip's state is later than pickup
duplicated_bill_numberThere is already a course related to trip with states of (assign_queue, pickup, dropoff) with this bill number
invalid_boost_levelThis level is not among the current valid levels. Refer to the valid boost levels.
invalid_trip_stateThe boost cannot be changed or cancelled because the trip is no longer in assign_queue.

Update Trip › path Parameters

trip_id
​string · uuid · required

The trip id belonging to the authenticated client.

Update Trip › Request Body

​object · required
​object[] · required
​object · required

Update Trip › Responses

Successful response.

is_round_trip
​boolean · readOnly

Whether this trip requires a return to the pickup location. On creation, true when any course has is_round_course set to true. This is a response field, not a root-level Create Trip request field.

rounded_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

For accounts with round-trip creation enabled, null until return completion, then the recorded return-completion time. For a batched order, this is the completion time of the shared return. Cancellation or an aborted trip does not count as return completion.

id
​string · uuid

Unique ID of this trip

Example: 40626ed5-9260-4a55-af04-ef9705a41b90
​object
state
​string · enum

Current state of this trip. Advanced states depend on account configuration.

Enum values:
assign_queue
pickup
dropoff
returning
delivered
canceled_by_miare
canceled_by_client
receiving
Example: pickup
​object
​object[]

All of the different courses at which parts of this trip should be dropped off

created_at
​string · pattern: ^\d{4}-\d{2}-\d{2}T\…

The exact moment at which this trip is created for the first time

assigned_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

The time this trip was assigned to its current courier

picked_up_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

The time at which the courier picked up the items from pickup location

courier
​null | object
test_mode
​boolean

Whether or not this trip was created in test mode

Example: false
batch_id
​string · uuid

Current batch identifier; equals id before batching and may change while the trip is in progress.

delivery_cost
​null | integer

Final delivery cost in Tomans (IRT); null until available.

arrived_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

Serialized timestamp. Responses may use Z or +HHMM; request timestamps must include a timezone.

departed_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

Serialized timestamp. Responses may use Z or +HHMM; request timestamps must include a timezone.

​object

Add Course

PATCH
https://ws.miare.ir
/trip-management/third-party-api/v2/trips/{trip_id}/courses/

Adds a new course to the courses of a trip.

This endpoint ignores is_round_course. Use Round Trip to change the return requirement after creation.

When box requirements are enabled, adding a course with requires_box: true to an assigned trip requires the currently assigned courier to be compatible. Otherwise the request is rejected with HTTP 409 (driver_box_required); the course is not added and the existing assignment is unchanged.

You can only add a course to a trip in the assign_queue or pickup states.

The new course's payment.price is checked against the same per-course declared-value limit described in Create Trip. If it exceeds the limit, the request is rejected and the course is not added. A value equal to the limit is allowed.

You can find ID of your trip in the response body of Create Trip request

Response body is a serialized trip. For a detailed version of it take a look at the response body of Create Trip request.

Errors

CodeDescription
not_authenticatedToken is missing or invalid
parse_errorThe request body is not a valid JSON string (has syntax error)
invalid_request_bodyRequest body does not follow the valid format
record_not_foundA trip with the given ID does not belong to your client or doesn't exist at all
too_lateTrip's state is later than pickup
duplicated_bill_numberThere is already a course related to trip with states of (assign_queue, pickup, dropoff) with this bill number
delivery_code_requireddelivery_code is required when the client/source proof_of_delivery_policy is third_party
delivery_code_invaliddelivery_code was provided but is not a valid 5-digit code. Leading/trailing whitespace is ignored before validation
driver_box_requiredHTTP 409. The assigned courier cannot carry a course requiring a box. The course is not added and the existing assignment is unchanged.
declared_package_value_too_highHTTP 400. The new course's payment.price exceeds the effective declared-value cap for the client. The course is not added.

The cap shown is illustrative; use code for error handling, as detail may change.

Add Course › path Parameters

trip_id
​string · uuid · required

The trip id belonging to the authenticated client.

Add Course › Request Body

Add Course ignores is_round_course. Use Round Trip to change the return requirement.
bill_number
​string · required

An string field left for you to store sort of a human readable bill number in it which will be used as a reference point among our support team, you and the pickup staffs

Example: DEL-119
name
​string · required

Name of the dropp-off

Example: علی علوی
phone_number
​string · required

The phone number associated with the drop-off which will be used by courier and support staffs in order to contact to them if necessary

Example: 09123456789
address
​string · required

The human readable drop-off address, preferably down to every necessary detail for a human to find it quickly

Example: تهران، خیابان استاد معین، پلاک ۱۲
delivery_code
​string · pattern: ^\s*[0-9]{5}\s*$

Required only when the client/source proof_of_delivery_policy is third_party. Must be exactly 5 digits. Leading/trailing whitespace is ignored before validation and storage. When accepted, this code is stored as the course PoD code and will be used later for delivery verification by the driver. For clients whose PoD policy is none or miare, this field is not required.

Example: 98765
​object
​object[]

The contents of the package to be delivered to the drop-off

requires_box
​boolean

Optional; defaults to false. When box requirements are enabled, true requires a car or a motorcycle courier with a box for the whole trip, even if only one course requires it. Existing client service-level restrictions still apply. Confirm availability with Miare: while disabled, true is accepted but stored as false and course-level box requirements are not enforced. Enabling later does not restore ignored requirements. The value cannot be edited after creation; unrelated updates preserve it.

Example: false
Default: false
​object

Add Course › Responses

Successful response.

is_round_trip
​boolean · readOnly

Whether this trip requires a return to the pickup location. On creation, true when any course has is_round_course set to true. This is a response field, not a root-level Create Trip request field.

rounded_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

For accounts with round-trip creation enabled, null until return completion, then the recorded return-completion time. For a batched order, this is the completion time of the shared return. Cancellation or an aborted trip does not count as return completion.

id
​string · uuid

Unique ID of this trip

Example: 40626ed5-9260-4a55-af04-ef9705a41b90
​object
state
​string · enum

Current state of this trip. Advanced states depend on account configuration.

Enum values:
assign_queue
pickup
dropoff
returning
delivered
canceled_by_miare
canceled_by_client
receiving
Example: pickup
​object
​object[]

All of the different courses at which parts of this trip should be dropped off

created_at
​string · pattern: ^\d{4}-\d{2}-\d{2}T\…

The exact moment at which this trip is created for the first time

assigned_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

The time this trip was assigned to its current courier

picked_up_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

The time at which the courier picked up the items from pickup location

courier
​null | object
test_mode
​boolean

Whether or not this trip was created in test mode

Example: false
batch_id
​string · uuid

Current batch identifier; equals id before batching and may change while the trip is in progress.

delivery_cost
​null | integer

Final delivery cost in Tomans (IRT); null until available.

arrived_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

Serialized timestamp. Responses may use Z or +HHMM; request timestamps must include a timezone.

departed_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

Serialized timestamp. Responses may use Z or +HHMM; request timestamps must include a timezone.

​object

Remove Course

DELETE
https://ws.miare.ir
/trip-management/third-party-api/v2/courses/{course_id}/

Removes the course indicated by the given ID from the courses of its trip.

You can only remove courses from a trip in the assign_queue or pickup states which has at least two courses.

You can find ID of your course in the response body of Create Trip or Add Course requests.

The given course ID must belong to your client.

Response body is a serialized trip. For a detailed version of it take a look at the response body of Create Trip request.

Errors

CodeDescription
not_authenticatedToken is missing or invalid
parse_errorThe request body is not a valid JSON string (has syntax error)
invalid_request_bodyRequest body does not follow the valid format
record_not_foundA course with the given ID does not belong to your client or doesn't exist at all
single_courseThe course belongs to a trip that has only one course

Remove Course › path Parameters

course_id
​string · uuid · required

The course id belonging to the authenticated client.

Remove Course › Responses

Successful response.

is_round_trip
​boolean · readOnly

Whether this trip requires a return to the pickup location. On creation, true when any course has is_round_course set to true. This is a response field, not a root-level Create Trip request field.

rounded_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

For accounts with round-trip creation enabled, null until return completion, then the recorded return-completion time. For a batched order, this is the completion time of the shared return. Cancellation or an aborted trip does not count as return completion.

id
​string · uuid

Unique ID of this trip

Example: 40626ed5-9260-4a55-af04-ef9705a41b90
​object
state
​string · enum

Current state of this trip. Advanced states depend on account configuration.

Enum values:
assign_queue
pickup
dropoff
returning
delivered
canceled_by_miare
canceled_by_client
receiving
Example: pickup
​object
​object[]

All of the different courses at which parts of this trip should be dropped off

created_at
​string · pattern: ^\d{4}-\d{2}-\d{2}T\…

The exact moment at which this trip is created for the first time

assigned_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

The time this trip was assigned to its current courier

picked_up_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

The time at which the courier picked up the items from pickup location

courier
​null | object
test_mode
​boolean

Whether or not this trip was created in test mode

Example: false
batch_id
​string · uuid

Current batch identifier; equals id before batching and may change while the trip is in progress.

delivery_cost
​null | integer

Final delivery cost in Tomans (IRT); null until available.

arrived_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

Serialized timestamp. Responses may use Z or +HHMM; request timestamps must include a timezone.

departed_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\…

Serialized timestamp. Responses may use Z or +HHMM; request timestamps must include a timezone.

​object

Boost Levels

GET
https://ws.miare.ir
/trip-management/third-party-api/v2/boost-levels/

Returns the current valid boosting levels along with the corresponding price increase for each level in Tomans (IRT).

Please note that boosting levels are dynamic and set by the commercial team, though they change infrequently. It is essential to periodically fetch them from this endpoint.

Boost levels always start at 1 and are continuous. If you see a level 3, levels 1 and 2 are also available.

Level 0 is not included in this list but can be used in requests and updates to cancel a boost.

Boost availability is configured separately for each account. Receiving this list does not mean that Boosting is enabled for your account; Boost requests from accounts without access are rejected.

The response is an array of all the current available levels.

The details of the properties for each object are as follows:

Errors

CodeDescription
not_authenticatedToken is missing or invalid

Boost Levels › Responses

Successful response.

​object[]
level
​integer · min: 1 · required
amount
​integer · required

Price increase in Tomans (IRT).