Miare
Miare API

Schemas


Trip

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

Pickup

name
​string

The human readable name of the pickup

Example: رستوران بزرگمهر
phone_number
​string

The phone number associated with the source which will be used by courier and support staffs in order to contact to pickup if necessary

Example: 0212345678
address
​string

The human readable address of the source, preferably down to every necessary detail for a human to find the source quickly

Example: تهران، صادقیه، بلوار آیت الله کاشانی
image
​string · uri

A valid URL which points to an image file which should be the logo of the pickup. This image will be used in both support panel, and courier’s application, so make sure that the URL is both reachable and is configured to allow CORS requests

Example: https://example.com/restaurants/bm_logo.png
​object
deadline
​string · pattern: ^\d{4}-\d{2}-\d{2}T\…

Expected package-ready pickup time. Must be in the future when creating or updating a trip.

Course

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: هران، خیابان استاد معین، پلاک ۱۲
requires_box
​boolean · required

The stored box requirement for this course. Older courses without a stored value return false. When enabled, true requires a car or a motorcycle courier with a box for the whole trip. The stored value remains visible while enforcement is disabled.

Example: false
is_round_course
​boolean · readOnly

The current stored return requirement for this course. It can change after creation through the Round Trip endpoint.

id
​string · uuid

The unique identifier of this course

Example: 40626ed5-9260-4a55-af04-ef9705a41b90
trip_id
​string · uuid

The unique identifier of the trip that the course belongs to

Example: 40626ed5-9260-4a55-af04-ef9705a41b90
location
​null | object
​object[]

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

tracking_url
​string · uri

The URL of Miare Tracking webpage which can be given to user so he/she can follow the courier in real-time

Example: https://www.miare.ir/p/trip_watching/#!/DEMOHASH01
dropped_off_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
old_trip_id
​string · uuid

Original trip identifier before batching; the zero UUID when no batching occurred.

CourseRequest

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: تهران، خیابان استاد معین، پلاک ۱۲
is_round_course
​boolean

Supported only in Create Trip. Set to true to mark this course as requiring a return to the pickup location. If any course requires a return, the trip has one final return after all deliveries, without adding another course. Omission defaults to false for this course. This feature is not available to all clients: contact Miare to request enablement for your account. Until enabled, requested course returns are ignored. Add Course ignores this field, and Update Trip cannot change it; use the Round Trip endpoint to change the return requirement after creation.

Example: true
Default: false
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

Location

latitude
​number · double · required
longitude
​number · double · required

ManifestItem

name
​string · required

Human readable name of the content which will be verified by courier

Example: پیتزا پپرونی خانواده
quantity
​integer · required

Number of these items in the package.

Example: 2

Area

id
​string

Unique identifier of area

Example: 59
name
​string

Textual name of the area

Example: فردوس شرق

Courier

name
​string

Name of the driver

Example: علی لطفی
image
​string · uri

A photo of the courier

Example: https://files.miare.ir/avatars/gheuIej.jpg
location_updated_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
phone_number
​string

FinancialAmounts

total_cost
​integer · required

Complete batch total at this revision, in Tomans. Authoritative for reconciliation.

​object · required

Selected pricing components. These may not sum to total_cost because other pricing rules, discounts and rounding can contribute to the total.

FinancialChange

type
​string · enum · required

A course was marked invalid.

Enum values:
course_faked
course_id
​string · uuid · required

Affected course identifier.

trip_id
​string · uuid · required

Client-visible trip ID, preserving the original trip ID after batching.

bill_number
​null | string · required

Bill number; may be empty, or null if package information is absent.

previous_total_cost
​integer · required

Batch total before this adjustment, in Tomans.

change_amount
​integer · required

Signed difference current_total_cost - previous_total_cost, in Tomans.

current_total_cost
​integer · required

Batch total immediately after this adjustment, in Tomans.

occurred_at
​string · date-time · required

Time the course was marked invalid.

Error

code
​string · required

Constant error code

Example: trip_not_found
detail
​string · required

Human readable explanation of the error

Example: Could not find trip with id "wrong_id"

AreaInfo

This model returns data about each area defined in Miare, and data about your ongoing trips in them. These data include: - `id`: The id of this area - `name`: The human readable name of this area - `polygon`: The coordinates of this area, in GeoJSON format - `max_ongoing_trips`: The maximum number of concurrent trips you can have in this area right now, based on your subscription. - `ongoing_trips`: Number of your ongonig trips in this area at the moment.
id
​number · min: 1 · required
max_ongoing_trips
​number · min: 0 · required

The maximum number of concurrent trips that you can have in this area at the moment, based on your subscription.

Example: 7
name
​string · minLength: 1 · required
ongoing_trips
​number · min: 0 · required

Count of your trips that are ongoing concurrently right now.

Example: 3
​object · required

Polygon of area coordinates, in GeoJSON format.

IssueTimestamp

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

Timestamp with UTC Z or a numeric offset without a colon, for example 2026-11-19T13:00:00+0330.

ResolutionAction

string · enum
Enum values:
cancel_trip
reject_issue

cancel_trip accepts the report and cancels the affected trip using existing cancellation/accounting rules; no replacement trip is created. reject_issue closes the issue and notifies the courier without changing trip progress. Only actions offered for the issue may be submitted.

SupportIssue

Issue returned by the support API. Delegated issues additionally include description, resolution_actions, resolution_deadline and resolution_action. The action is null while unresolved or after manual support/courier closure. Reporter/resolver miare includes couriers and support.
id
​string · uuid · required

Issue identifier.

trip_id
​string · uuid · required

Client-visible trip ID, preserving the original trip ID after batching.

problem_id
​string · uuid · required

Reported problem identifier.

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

Timestamp with UTC Z or a numeric offset without a colon, for example 2026-11-19T13:00:00+0330.

reporter_type
​string · enum · required

Reporter type, for example client or miare.

Enum values:
client
miare
resolved_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\… · required

Timestamp with UTC Z or a numeric offset without a colon, for example 2026-11-19T13:00:00+0330.

resolver_type
​null | string · enum · required

Resolver type, or null while unresolved.

Enum values:
client
miare
resolve_description
​null | string · required

Resolution description.

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

Timestamp with UTC Z or a numeric offset without a colon, for example 2026-11-19T13:00:00+0330.

picker_type
​null | string · enum · required

Support picker type.

Enum values:
client
miare
state
​string · enum · required

Issue state, for example reported.

Enum values:
reported
picked
resolved
​object[] · required

Messages attached to the issue.

description
​null | string

Present on delegated issues only.

resolution_actions
​string[] · minItems: 1

Present on delegated issues only.

Enum values:
cancel_trip
reject_issue
resolution_deadline
​string · pattern: ^\d{4}-\d{2}-\d{2}T\…

Present on delegated issues only.

resolution_action
​null | string · enum

Null for closure without a resolution action, including support/courier closure.

Enum values:
cancel_trip
reject_issue

DelegatedSupportIssue

Issue returned by the support API. Delegated issues additionally include description, resolution_actions, resolution_deadline and resolution_action. The action is null while unresolved or after manual support/courier closure. Reporter/resolver miare includes couriers and support.
id
​string · uuid · required

Issue identifier.

trip_id
​string · uuid · required

Client-visible trip ID, preserving the original trip ID after batching.

problem_id
​string · uuid · required

Reported problem identifier.

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

Timestamp with UTC Z or a numeric offset without a colon, for example 2026-11-19T13:00:00+0330.

reporter_type
​string · enum · required

Reporter type, for example client or miare.

Enum values:
client
miare
resolved_at
​null | string · pattern: ^\d{4}-\d{2}-\d{2}T\… · required

Timestamp with UTC Z or a numeric offset without a colon, for example 2026-11-19T13:00:00+0330.

resolver_type
​null | string · enum · required

Resolver type, or null while unresolved.

Enum values:
client
miare
resolve_description
​null | string · required

Resolution description.

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

Timestamp with UTC Z or a numeric offset without a colon, for example 2026-11-19T13:00:00+0330.

picker_type
​null | string · enum · required

Support picker type.

Enum values:
client
miare
state
​string · enum · required

Issue state, for example reported.

Enum values:
reported
picked
resolved
​object[] · required

Messages attached to the issue.

description
​null | string · required

Present on delegated issues only.

resolution_actions
​string[] · minItems: 1 · required

Present on delegated issues only.

Enum values:
cancel_trip
reject_issue
resolution_deadline
​string · pattern: ^\d{4}-\d{2}-\d{2}T\… · required

Present on delegated issues only.

resolution_action
​null | string · enum · required

Null for closure without a resolution action, including support/courier closure.

Enum values:
cancel_trip
reject_issue

SupportIssuePage

​null | array · required
next
​string · required

Next page URL, or an empty string.

previous
​string · required

Previous page URL, or an empty string.

total_count
​integer · min: 0 · required

ResolveDelegatedIssueRequest

resolution_action
​string · enum · required

cancel_trip accepts the report and cancels the affected trip using existing cancellation/accounting rules; no replacement trip is created. reject_issue closes the issue and notifies the courier without changing trip progress. Only actions offered for the issue may be submitted.

Enum values:
cancel_trip
reject_issue
resolve_description
​null | string

Optional for both actions, including reject_issue. Omitted/null/blank values are accepted. Supplied strings are trimmed; rejection uses generic notification text when no explanation is provided.

ResolveOwnIssueRequest

Existing non-delegated flow: only reports created by the authenticated client can be resolved. Omit resolution_action.
resolve_description
​null | string

Timestamp

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

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

NullableTimestamp

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

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

PickupRequest

name
​string · required

The human readable name of the pickup

Example: رستوران بزرگمهر
phone_number
​string · required

The phone number associated with the source which will be used by courier and support staffs in order to contact to pickup if necessary

Example: 0212345678
address
​string · required

The human readable address of the source, preferably down to every necessary detail for a human to find the source quickly

Example: تهران، صادقیه، بلوار آیت الله کاشانی
image
​string · uri · required

A valid URL which points to an image file which should be the logo of the pickup. This image will be used in both support panel, and courier’s application, so make sure that the URL is both reachable and is configured to allow CORS requests

Example: https://example.com/restaurants/bm_logo.png
​object · required
deadline
​string · pattern: ^\d{4}-\d{2}-\d{2}T\… · required

Expected package-ready pickup time. Must be in the future when creating or updating a trip.

seller_id
​string · maxLength: 64

Required for proxy invoicing: register this client-scoped seller before creating the trip.

Payment

price
​integer · min: 0 · required

Declared package value in Tomans (IRT), separate from delivery cost. Checked per course; equality with the effective client limit is allowed. A value over the limit rejects the whole trip or new course.

payment_type
​string · enum

Payment method; currently cash.

Enum values:
cash

AddCourseRequest

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

BoostRequest

level
​integer · min: 0 · required

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

Boost

level
​integer · required

Active boost level; 0 means no boost.

amount
​integer · required

Price increase in Tomans (IRT).

CreateTripRequest

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

CreateBoostRequest

level
​null | integer · min: 0 · required

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

UpdateCourseRequest

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: تهران، خیابان استاد معین، پلاک ۱۲
​object
​object[]

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

UpdateTripRequest

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

RoundTripRequest

is_round_trip
​boolean · required

Require or remove one final return to the pickup location.

BoostLevel

level
​integer · min: 1 · required
amount
​integer · required

Price increase in Tomans (IRT).

TripPage

​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

Problem

id
​string · uuid · required
title
​string · required
description_required
​boolean · required
reporter_type
​string · enum · required

Problem reporter category. Only client problems can be reported by API clients. The older prose called this for_reporter_type; the wire field is reporter_type.

Enum values:
client
miare

ReportIssueRequest

problem_id
​string · uuid · required

Use a problem for the client reporter type.

trip_id
​null | string · uuid

Provide trip_id or course_id. trip_id takes precedence when both are supplied.

course_id
​null | string · uuid
description
​null | string · maxLength: 256

Required when the selected problem requires a description.

anyOf
At least one variant must match. Multiple variants may match simultaneously.

Decision Table

VariantMatching Criteria
requires: trip_id
requires: course_id
Properties for Variant 1:
trip_id
​string · uuid · required

AppendMessageRequest

message
​string · maxLength: 256 · required

Text to append to an unresolved issue.

Estimate

price
​integer · required

Estimated course delivery cost, in Tomans. Excludes trip-level costs and boost.

status
​string · required
area_coverage
​boolean · required

SellerRequest

For individuals national_id is required; legal sellers need national_id or economic_id. On update, omitted optional fields retain their values and null clears them when validation permits.
person_type
​string · enum · required
Enum values:
individual
legal
address
​string · maxLength: 4096 · required
name
​null | string · maxLength: 255
national_id
​null | string · maxLength: 16

Required for an individual. A legal seller needs national_id or economic_id.

registration_number
​null | string · maxLength: 16
economic_id
​null | string · maxLength: 16

A legal seller needs national_id or economic_id.

postal_code
​null | string · maxLength: 10
phone_number
​null | string · maxLength: 20

Seller

person_type
​string · enum · required
Enum values:
individual
legal
name
​null | string · maxLength: 255 · required
national_id
​null | string · maxLength: 16 · required

Required for an individual. A legal seller needs national_id or economic_id.

registration_number
​null | string · maxLength: 16 · required
economic_id
​null | string · maxLength: 16 · required

A legal seller needs national_id or economic_id.

address
​string · maxLength: 4096 · required
postal_code
​null | string · maxLength: 10 · required
phone_number
​null | string · maxLength: 20 · required
seller_id
​string · maxLength: 64 · required
created_at
​string · pattern: ^\d{4}-\d{2}-\d{2}T\… · required

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

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

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

InvoiceReady

status
​string · enum · required
Enum values:
ready
batch_id
​string · uuid · required
revision
​integer · min: 0 · required
revisions_count
​integer · min: 0 · required

Highest available revision number; not the number of revisions.

invoice_number
​string · required

Adjustments append -RNN to the original invoice number.

document_type
​string · enum · required
Enum values:
original
adjustment
download_url
​string · uri · required

Temporary private download URL; expires in five minutes.

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

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

InvoiceProcessing

status
​string · enum · required
Enum values:
processing
batch_id
​string · uuid · required
revision
​integer · min: 0 · required
revisions_count
​integer · min: 0 · required

Highest available revision number; not the number of revisions.

retry_after
​integer · min: 0 · required

Seconds to wait before polling again.

FinancialDetail

Available for enabled client accounts with a configured webhook. financial_calculated reports initial accounting; eligible deleted trips have zero amounts. financial_adjusted reports a non-zero financial change after a course is marked invalid. Deduplicate by (batch_id, revision), retain the highest revision and use the complete total rather than reapplying cumulative changes. Revisions can arrive out of order, including before revision 0. Any non-2xx response or network failure is retried with a 10-second request timeout. Default retry delays are 30,120,300,900,1800 seconds and are configurable. Retries use the stored payload. Recover latest data using GET https://www.miare.ir/api/accounting/financial-detail/{batch_id}/ with the client token; the response omits event. Invoice PDF readiness is independent.
batch_id
​string · uuid · required

Stable accounting batch identifier across revisions; may differ from original trip IDs.

revision
​integer · min: 0 · required

Per-batch revision: 0 initially; increasing positive values for adjustments.

trip_ids
​string[] · unique · required

Unique original client-visible trip IDs, retained after batching.

course_ids
​string[] · required

Courses associated with this calculation; adjustments include invalidated courses for traceability.

bill_numbers
​string[] · unique · required

Unique non-empty bill numbers, not positionally aligned with trip_ids or course_ids.

state
​string · enum · required

Financial state, separate from trip lifecycle state.

Enum values:
calculated
changed
​object · required
​object[] · required

Cumulative adjustment history; empty for the initial calculation.

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
No specific criteria
No specific criteria
Properties for Variant 1:
state
​enum
Enum values:
calculated
revision
​integer · enum
Enum values:
0
changes
​array · maxItems: 0

NullableLocation

latitude
​number · double · required
longitude
​number · double · required

UpdatePickupRequest

name
​string · required

The human readable name of the pickup

Example: رستوران بزرگمهر
phone_number
​string · required

The phone number associated with the source which will be used by courier and support staffs in order to contact to pickup if necessary

Example: 0212345678
address
​string · required

The human readable address of the source, preferably down to every necessary detail for a human to find the source quickly

Example: تهران، صادقیه، بلوار آیت الله کاشانی
image
​string · uri · required

A valid URL which points to an image file which should be the logo of the pickup. This image will be used in both support panel, and courier’s application, so make sure that the URL is both reachable and is configured to allow CORS requests

Example: https://example.com/restaurants/bm_logo.png
​object · required
deadline
​string · pattern: ^\d{4}-\d{2}-\d{2}T\… · required

Expected package-ready pickup time. Must be in the future when creating or updating a trip.