Skip to main content

Get Order

GET/orders/
Returns full details for a single order, including line items, transaction data, subscription info, and customer details.

Authentication

Headers

HeaderValueRequired
AuthorizationBearer YOUR_API_TOKENYes
Acceptapplication/jsonRecommended

Path Parameters

ParameterTypeRequiredDescription
idintegerYesThe order ID

Example Request

curl -X GET "https://merchant-api.rmz.gg/shawarma/orders/78901" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Success Response

{
  "message": null,
  "data": {
    "id": 78901,
    "store_id": 1,
    "customer_id": 123,
    "coupon_id": null,
    "total": 299.99,
    "checkout_id": 55001,
    "current_status": 4,
    "seen_at": null,
    "order_review_notification_sent_at": null,
    "tax_rate": null,
    "tax_amount": null,
    "prices_include_tax": false,
    "tax_country_code": null,
    "tax_registration_number": null,
    "created_at": "2024-01-15T14:30:00.000000Z",
    "updated_at": "2024-01-15T15:00:00.000000Z",
    "human_format": {
      "date_human": "منذ شهرين",
      "date_normal": "Mon, Jan 15, 2024 2:30 PM"
    },
    "transaction": {
      "payment_method": "dokanpay",
      "deserved": 280.00,
      "id": 5001,
      "store_balance_credited_at": "2024-01-22T00:00:00.000000Z",
      "platform_fees": 19.99,
      "payment_data": null,
      "payment_id": "ch_abc123",
      "total": 299.99,
      "is_refunded": false,
      "is_hold": false,
      "is_by_platform": false,
      "order_id": 78901,
      "human_format": {
        "payment.method": "البطائق الإئتمانية",
        "created_at": "15 يناير 2024، 2:30 م",
        "created_at_text": "منذ شهرين",
        "store_balance_scheduled_at_text": "منذ شهر",
        "store_balance_scheduled_at": "22 يناير 2024، 12:00 ص"
      }
    },
    "items": [
      {
        "id": 1001,
        "order_id": 78901,
        "item_type": "App\\Models\\StoreProduct",
        "item_id": 101,
        "quantity": 2,
        "price": 149.99,
        "fields": [],
        "notice": null,
        "created_at": "2024-01-15T14:30:00.000000Z",
        "updated_at": "2024-01-15T14:30:00.000000Z",
        "item": {
          "id": 101,
          "name": "Premium Product",
          "price": 149.99,
          "type": "product"
        },
        "subscription": null
      }
    ],
    "customer": {
      "id": 123,
      "firstName": "Ahmed",
      "lastName": "Ali",
      "country_code": "966",
      "phone": "501234567",
      "email": "ahmed@example.com"
    }
  },
  "api": "rmz.shawarma",
  "timestamp": 1699999999
}

Response Fields

FieldTypeDescription
idintegerOrder ID
store_idintegerStore ID
customer_idintegerCustomer ID
coupon_idinteger/nullCoupon ID if a coupon was applied
totalfloatOrder total amount
checkout_idintegerCheckout session ID
current_statusintegerOrder status code (see Overview)
seen_atstring/nullWhen the order was seen by the store owner
tax_ratestring/nullTax rate percentage applied
tax_amountstring/nullTax amount
prices_include_taxbooleanWhether prices include tax
human_formatobjectHuman-readable date information (in Arabic)
human_format.date_humanstringRelative date (e.g., “منذ شهرين”)
human_format.date_normalstringFormatted date string
transaction.payment_methodstringPayment method used (e.g., dokanpay, bank, free)
transaction.deservedfloatAmount deserved by merchant after fees
transaction.is_refundedbooleanWhether the order was refunded
transaction.platform_feesfloatPlatform fees deducted
transaction.payment_dataobject/nullBank transfer data (only for bank payment method, null for other methods)
transaction.payment_idstringPayment provider transaction ID
transaction.is_holdbooleanWhether the transaction is on hold
transaction.is_by_platformbooleanWhether the transaction was processed via the platform
transaction.store_balance_credited_atstring/nullWhen the balance was credited to the store
transaction.order_idintegerThe order ID this transaction belongs to
transaction.human_formatobjectHuman-readable transaction info (in Arabic)
transaction.human_format.payment.methodstringArabic translation of the payment method
transaction.human_format.created_atstring/nullFormatted creation date
transaction.human_format.created_at_textstring/nullRelative creation date
transaction.human_format.store_balance_scheduled_atstring/nullFormatted balance schedule date
transaction.human_format.store_balance_scheduled_at_textstring/nullRelative balance schedule date
itemsarrayLine items in the order
items[].idintegerOrder item ID
items[].order_idintegerParent order ID
items[].item_typestringProduct model class
items[].item_idintegerProduct ID
items[].quantityintegerQuantity ordered
items[].pricefloatUnit price at time of purchase
items[].fieldsarraySelected product options/fields
items[].noticestring/nullCustomer note for this item
items[].itemobjectProduct details (id, name, price, type)
items[].subscriptionobject/nullSubscription details if applicable
customerobjectCustomer information

Error Responses

CodeDescription
401Unauthorized — invalid or missing token
404Order not found