Turuq Onboarding

Create Refund Orders

Request

Method: POST
Endpoint: /orders/refund
Content-Type: application/json

Request Body

Field NameRequiredTypeDescription
customerYesobjectAn object containing the customer's details as per the Customer Details table.
productsYesarray of objectsAn array of product objects, each structured as per the Product Details table. At least one product is required.
typeYesstringThe type of order, must be "REFUND".
notesNostringAny additional notes or special instructions for the order.
refundedAmountYesnumberThe total amount to be refunded (in EGP).
handlesShippingYesstringWho handles shipping, "CUSTOMER" or "BRAND".

Customer Details

Field NameRequiredTypeDescription
nameYesstringThe customer's full name (min 2 characters).
phoneYesstringPhone number starting with 01, digits only, exactly 11 digits.
addressYesstringThe customer's full address (min 2 characters).
governorateYesstringThe customer's governorate, one of the Valid Governorate Syntaxes.

Valid Governorate Syntaxes

  • 6th of October
  • Alexandria
  • Aswan
  • Asyut
  • Beheira
  • Beni Suef
  • Cairo
  • Dakahlia
  • Damietta
  • Fayed
  • Fayoum
  • Gharbeya
  • Giza
  • Helwan
  • Ismailia
  • Kafr El Sheikh
  • Luxor
  • Matrouh
  • Menoufia
  • Minya
  • New Valley
  • North Sinai
  • Port Said
  • Qalyubia
  • Qena
  • Red Sea
  • Sharkeya
  • Sohag
  • South Sinai
  • Suez

Product Details

Please make sure all products provided to this route have their SKUs mapped with their Turuq counterparts.

Field NameRequiredTypeDescription
UIDYesstringTuruq's 13-digit identifier or a client SKU mapped to that product. An identifier that doesn't match one of the client's products is rejected.
quantityYesnumberQuantity of the product (min 1).
priceYesnumberPrice per unit (in EGP).
weightYesnumberWeight per unit (in KG).
defectiveQuantityNointegerNumber of defective units among the returned quantity. Must be a non-negative integer. The limit applies to each line, so a line's defectiveQuantity cannot exceed that line's quantity.

Example Payload

{
  "customer": {
    "name": "Omar Hassan",
    "phone": "01009876543",
    "address": "45 Tahrir St., Downtown",
    "governorate": "Cairo"
  },
  "products": [
    {
      "UID": "0001112223334",
      "quantity": 2,
      "price": 500.00,
      "weight": 0.2,
      "defectiveQuantity": 1
    }
  ],
  "type": "REFUND",
  "notes": "Refund due to product defect.",
  "refundedAmount": 1000.00,
  "handlesShipping": "CUSTOMER"
}

Response

✅ 201 Created

The refund order was successfully created.

Response Body

{
  "OID": "3004720098765"
}

❌ 400 Bad Request

Invalid request, schema validation failed, client not found, or creation failure.

issues is only returned for schema validation failures. An empty products list is a schema validation failure, with "At least one product is required." inside issues.

Example Error (Validation)

{
  "error": "Provided order doesn't satisfy the order schema",
  "issues": [ /* array of validation issue objects */ ]
}

Example Error (Unknown Product Identifier)

{
  "error": "Unknown product identifier(s): 1010133088801, 1010133089501"
}

Example Error (Defective Quantity Exceeds Returned Quantity)

{
  "error": "Defective quantity cannot exceed returned quantity: 1010133088801"
}

Example Error (Client Not Found)

{
  "error": "Client not found"
}

Example Error (Creation Failure)

{
  "error": "Failed to create new order"
}

❌ 500 Internal Server Error

{
  "error": "Internal Server Error"
}