Jayik logoDevelopers
v2.0.0Get an API key
Merchant APIDocumentation

Connect your store to Jayik

Create delivery orders, follow their status and receive updates by webhook.

Base URL
https://api.jayik.app/api/merchant
01Guide

How it works

Four steps take you from nothing to a tracked delivery.

  1. Create an API key
    In the Tajr dashboard, at tajr.jayik.app/api-keys. Send it in the X-API-KEY header on every request.
  2. Look up your IDs
    Fetch them once and store them: governorates and order categories.
  3. Create an order
    Create it, then mark it ready for pickup when it is packed.
  4. Follow the status
    Set a webhook URL to be told when the order changes.
POST /v2/orders · cURL
curl -X POST https://api.jayik.app/api/merchant/v2/orders \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_phone": "07809876543",
    "customer_address": "Mansour, street 14",
    "amount": 25000,
    "governorate_id": "<governorate id>",
    "order_category_id": "<category id>"
  }'
POST /v2/orders · JavaScript
const res = await fetch("https://api.jayik.app/api/merchant/v2/orders", {
  method: "POST",
  headers: {
    "X-API-KEY": process.env.JAYIK_API_KEY,
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    customer_phone: "07809876543",
    customer_address: "Mansour, street 14",
    amount: 25000,
    governorate_id: "<governorate id>",
    order_category_id: "<category id>",
  }),
});
const json = await res.json();
if (!res.ok) throw new Error(JSON.stringify(json.message));
console.log(json.data.tr);
POST /v2/orders · PHP
<?php
$ch = curl_init("https://api.jayik.app/api/merchant/v2/orders");
curl_setopt_array($ch, [
  CURLOPT_POST => true,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    "X-API-KEY: " . getenv("JAYIK_API_KEY"),
    "Accept: application/json",
    "Content-Type: application/json",
  ],
  CURLOPT_POSTFIELDS => json_encode([
    "customer_phone" => "07809876543",
    "customer_address" => "Mansour, street 14",
    "amount" => 25000,
    "governorate_id" => "<governorate id>",
    "order_category_id" => "<category id>",
  ]),
]);
$json = json_decode(curl_exec($ch), true);
curl_close($ch);
echo $json["data"]["tr"];
02Guide

Authenticate with an API key

Every request is authenticated with an API key sent in the X-API-KEY header. Create and manage keys in the Tajr dashboard at tajr.jayik.app/api-keys.

Required headers
X-API-KEY: YOUR_API_KEY
Accept: application/json
  • A key does not expire. It works until it is switched off, regenerated or deleted.
  • It acts as the merchant account that owns it.
  • The key value is shown only once, when it is created or regenerated. Store it then.
  • Keep it on your server. Do not put it in browser or app code.
Check your key
curl https://api.jayik.app/api/merchant/auth/details \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json"
03Guide

Three response shapes

Most endpoints answer with the standard wrapper. List endpoints answer with a page object and no wrapper. A few endpoints return the object directly; each one says so in its Returns line.

Standard wrapper
{
  "status": true,
  "message": "Order Created Successfully",
  "data": {}
}
Page object (list endpoints)
{
  "current_page": 1,
  "data": [],
  "from": 1,
  "last_page": 1,
  "per_page": 15,
  "to": 1,
  "total": 1
}
ParameterTypeDescription
takeintegerOptionalItems per page on list endpoints. Max 500. The default is 10 or 15, shown on each endpoint.
pageintegerOptionalPage number. Default 1.
04Guide

Errors

Error bodies have status set to false and a message. Any endpoint can answer 401, 403 or 429; the other codes are listed on the endpoints that use them.

StatusMeaning
400The request was refused. For invalid input, message is an object: field name → list of problems. Otherwise it is a sentence.
401Missing or invalid API key.
403The account is not active, or lacks the permission the call needs.
404Nothing with that id belongs to your account.
409Not possible in the order's current state.
422Well formed, but cannot be carried out.
429Rate limit reached. Wait for the number of seconds in the Retry-After header.
400 · invalid input
{
  "status": false,
  "message": {
    "customer_phone": [
      "The customer phone field is required."
    ],
    "amount": [
      "The amount field is required."
    ]
  },
  "data": []
}
400 · other reasons
{
  "status": false,
  "message": "Order already cancelled",
  "data": []
}
05Guide

Rate limit and permissions

Rate limit
120 requests a minute, per account
Past the limit the answer is 429 with a Retry-After header.
Permissions
Each call needs a permission, shown on the endpoint. The account owner's keys have all of them. Employees have the permissions of their role: merchant-admin, merchant-employee or merchant-viewer.
06Guide

Order statuses

Use status.name in your code; it is stable. ar_name is the Arabic label.

nameMeaning
nameMeaning
PendingCreated; waiting for you to mark it ready.
AwaitingPickupReady; waiting to be collected from you.
PickupDelayedCollection from you was postponed.
CancelledByMerchantCancelled by the merchant.
InTransitCollected; on the way to the delivery company's warehouse.
InDeliveryCompanyWarehouseAt the delivery company's warehouse.
ReceivedWith a driver, out for delivery.
HandOverPassed to another driver.
DelayedDelivery was postponed.
ReDeliveryOut for another delivery attempt.
DeliveredDelivered to the receiver.
ReturnedNot delivered; the driver has it.
ReturnedToCompanyReturned; at the delivery company's warehouse.
OnTheWayToMerchantWarehouseReturned; on the way back to you.
ReturnedToMainWarehouseReturned; back at your warehouse.
CancelledCancelled.
07Guide

Amounts, dates and IDs

  • Amounts are in Iraqi dinars (IQD).
  • Dates are either YYYY-MM-DD HH:MM:SS or ISO 8601, as shown on each field.
  • An order has three identifiers: tr (tracking number, used by most actions), id (numeric) and uuid.
  • delivery_type is 0 for normal and 1 for fawri (express).
08Guide

Multi-vendor marketplaces

If several vendors sell through your platform, treat each vendor as a sub-merchant by giving it its own warehouse. You keep one Jayik account and one API key.

A warehouse holds what the delivery needs to know about a vendor: its name, address, map location, phone numbers and the hours it is open for pickup. Put it on an order and the driver collects from that vendor, with no extra details to send each time.

  1. Create a warehouse per vendor
    Create a warehouse with the vendor's name, address, map location, phone and pickup hours. Save the returned id next to the vendor in your own system.
  2. Send it on every order
    Set warehouse_id to the vendor's warehouse when you create the order. The order is collected from that vendor.
  3. Follow orders by vendor
    List orders with filter[warehouse_id] to see one vendor's orders, or add include=warehouse to get the vendor with each order.
  4. Keep vendors up to date
    When a vendor moves or changes their phone or hours, update the warehouse so pickups go to the right place.
POST /v2/warehouses · one per vendor
curl -X POST https://api.jayik.app/api/merchant/v2/warehouses \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Al-Warda Flowers",
    "address": "Karrada, street 62",
    "lat": 33.3128,
    "long": 44.3615,
    "governorate_id": "<governorate id>",
    "phone": "07701234567",
    "availability_times_from": "09:00",
    "availability_times_to": "21:00"
  }'
POST /v2/orders · picked up from that vendor
curl -X POST https://api.jayik.app/api/merchant/v2/orders \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "warehouse_id": "<vendor warehouse id>",
    "customer_phone": "07809876543",
    "customer_address": "Mansour, street 14",
    "amount": 25000,
    "governorate_id": "<governorate id>",
    "order_category_id": "<category id>"
  }'
  • An order has one pickup point. When a customer buys from two vendors, create one order per vendor; Create many orders sends them in a single request.
  • Send governorate_id on every warehouse update: when it is left out, the warehouse's governorate is cleared.
1 endpointAPI

Account

The merchant account your API key belongs to.

Endpoints in this section

Get the current account

GET/auth/details

Useful as a first call to check that your API key works, and to see which permissions it has.

Returns

An object, returned directly without the wrapper.

Request · cURL
curl https://api.jayik.app/api/merchant/auth/details \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json"
Response · 200
{
  "user": {
    "id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
    "full_name": "Ali Hassan",
    "business_name": "Hassan Store",
    "phone": "07701234567",
    "default_order_category_id": "01a21416-4853-7b7c-9b7e-a5b5a4a47412",
    "default_warehouse_id": "01a21416-4a02-7e11-b3c8-5d2f7a9e1c44",
    "lat": null,
    "lng": null,
    "company": {
      "id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
      "name": "Example Delivery Co.",
      "logo_url": null,
      "description": null,
      "config": null
    }
  },
  "roles": [
    "merchant-admin"
  ],
  "permissions": [
    "merchant-get-order",
    "merchant-store-order"
  ]
}
9 endpointsAPI

Orders

Create, list, cancel and delete orders.

Endpoints in this section

List orders

GET/v2/orders

Your orders, paginated. Use filter[...] to narrow the list and include to embed related objects.

Permission merchant-get-order
Query parameters
NameTypeDescription
takeintegerOptionalItems per page. Default 15. Max 500.
pageintegerOptionalPage number. Default 1.
fromdateOptionalStart of a date range on the last update. Send together with to.
todateOptionalEnd of the date range. Send together with from.
simplebooleanOptionaltrue skips the total count, which is faster on large lists.
includestringOptionalComma-separated related objects to embed. Allowed: status, customer, governorate, district, warehouse, orderCategory, orderItems, orderItems.attribute, merchant, history.merchant, driverRate, amountChanges, financial. Example: status,customer,governorate.
sortstringOptionalField to sort by. Prefix with - for descending. Example: -created_at.
filter[tr]stringOptionalExact tracking number.
filter[uuid]uuidOptionalExact order uuid.
filter[status_id]stringOptionalStatus id. Several ids can be comma-separated.
filter[not_status_id]stringOptionalExclude these status ids.
filter[governorate_id]stringOptionalDestination governorate id.
filter[warehouse_id]stringOptionalPickup warehouse id.
filter[order_category_id]stringOptionalOrder category id.
filter[delivery_type]integerOptional0 = normal, 1 = fawri.
filter[customer.phone]stringOptionalExact receiver phone.
filter[customer.name]stringOptionalSearch in the receiver's name.
filter[customer.address]stringOptionalSearch in the delivery address.
filter[amount]stringOptionalAmount.
Returns

A page object without the wrapper. The items (Order) are in data.

Errors specific to this call
400Refused or invalid input
Request · cURL
curl -G https://api.jayik.app/api/merchant/v2/orders \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json" \
  -d "take=50" \
  --data-urlencode "include=status,customer,governorate" \
  -d "sort=-created_at"
Response · 200
{
  "current_page": 1,
  "data": [
    {
      "id": 1024,
      "uuid": "84df3f46-741d-45aa-b5b2-ab2a8a978e3e",
      "tr": "ORD-1001",
      "amount": 25000,
      "invoice_url": null,
      "delivery_type": 0,
      "delivery_type_label": "عادي",
      "last_four_digits": null,
      "customer_id": "01a21416-4894-7d5c-a904-edd051e3de44",
      "customer": {
        "id": "01a21416-4894-7d5c-a904-edd051e3de44",
        "name": "Ali Hassan",
        "address": "Mansour, street 14",
        "phone": "07809876543"
      },
      "governorate_id": "01a21416-44ce-7391-96e0-0cc4c3e99fd9",
      "governorate": {
        "id": "01a21416-44ce-7391-96e0-0cc4c3e99fd9",
        "name": "بغداد"
      },
      "status_id": "01a21416-4403-72c4-814a-12d27f9c3c93",
      "status": {
        "id": "01a21416-4403-72c4-814a-12d27f9c3c93",
        "name": "Pending",
        "ar_name": "قيد المعالجة",
        "color": null
      },
      "history_id": null,
      "created_at": "2026-11-25 22:02:14",
      "updated_at": "2026-11-25 22:02:14"
    }
  ],
  "from": 1,
  "last_page": 1,
  "per_page": 15,
  "to": 1,
  "total": 1
}

Create an order

POST/v2/orders

Creates one order. It starts in the Pending status. Call Mark ready for pickup when the package is packed.

Permission merchant-store-order
Body fields (JSON)
FieldTypeDescription
trstring | nullOptionalYour own tracking number. Must not already be in use. Leave it out and one is generated for you.
warehouse_iduuid | nullOptionalPickup point. Only needed if you have more than one pickup location. Must be one of your account's warehouses.
customer_namestring | nullOptionalReceiver's name.
customer_phonestringRequiredReceiver's phone. Example: 07809876543.
customer_addressstringRequiredDelivery address.
amountnumberRequiredAmount to collect from the receiver, in IQD. Use 0 for a prepaid order. Example: 25000.
district_iduuid | nullOptionalDistrict inside the governorate. Required for fawri orders (delivery_type = 1) when your account has a fawri price list.
order_category_iduuidRequiredOne of your own order categories.
delivery_typeinteger | nullOptional0 = normal (default), 1 = fawri (express).
notesstring | nullOptional—
business_namestring | nullOptional—
governorate_idstring | integerRequiredDestination governorate: its id (UUID) or its number.
destination_coordinatestring | nullOptionalDelivery map point as lat,lng. Example: 33.312805,44.361488.
total_productsinteger | nullOptional—
scheduled_delivery_date_fromdatetime | nullOptional—
scheduled_delivery_date_todatetime | nullOptionalMust be after scheduled_delivery_date_from.
invoice_urlstring | nullOptional—
order_itemsobject[] | nullOptional—
Fields of each item in order_items
FieldTypeDescription
attribute_iduuidRequiredFrom GET /v2/attributes.
namestringRequired—
weightintegerRequired—
unitstring | nullRequired—
countintegerRequired—
Returns

The standard wrapper, with an OrderRecord object in data.

Errors specific to this call
400Refused or invalid input
Request · cURL
curl -X POST https://api.jayik.app/api/merchant/v2/orders \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "tr": "ORD-1001",
    "customer_name": "Ali Hassan",
    "customer_phone": "07809876543",
    "customer_address": "Mansour, street 14",
    "amount": 25000,
    "governorate_id": "01a21416-44ce-7391-96e0-0cc4c3e99fd9",
    "order_category_id": "01a21416-4853-7b7c-9b7e-a5b5a4a47412",
    "notes": "Call before delivery"
  }'
Response · 200
{
  "status": true,
  "message": "Order Created Successfully",
  "data": {
    "id": 1024,
    "uuid": "84df3f46-741d-45aa-b5b2-ab2a8a978e3e",
    "tr": "ORD-1001",
    "amount": 25000,
    "status_id": "01a21416-4403-72c4-814a-12d27f9c3c93",
    "governorate_id": "01a21416-44ce-7391-96e0-0cc4c3e99fd9",
    "warehouse_id": null,
    "order_category_id": "01a21416-4853-7b7c-9b7e-a5b5a4a47412",
    "verification_type": 1,
    "destination_coordinate": {
      "lat": "33.312805",
      "lng": "44.361488"
    },
    "notes": "Call before delivery",
    "total_products": 2,
    "created_at": "2026-11-25 22:02:14",
    "updated_at": "2026-11-25 22:02:14",
    "warehouse": null,
    "status": {
      "id": "01a21416-4403-72c4-814a-12d27f9c3c93",
      "name": "Pending",
      "ar_name": "قيد المعالجة"
    },
    "order_category": {
      "id": "01a21416-4853-7b7c-9b7e-a5b5a4a47412",
      "name": "Clothes"
    },
    "governorate": {
      "id": "01a21416-44ce-7391-96e0-0cc4c3e99fd9",
      "name": "بغداد"
    }
  }
}

Create several orders

POST/v2/orders/batch

Creates up to 300 orders in one call. Either all are created or none. The response carries no order data; look the orders up by tracking number.

Permission merchant-store-order
Body fields (JSON)
FieldTypeDescription
ordersBatchOrderItem[]Required1 to 300 items.
Fields of each item in orders
FieldTypeDescription
trstringRequiredYour own tracking number. Required in a batch.
warehouse_iduuid | nullOptionalPickup point. Only needed if you have more than one pickup location. Must be one of your account's warehouses.
customer_namestringRequiredReceiver's name. Required in a batch.
customer_phonestringRequiredReceiver's phone. Example: 07809876543.
customer_addressstringRequiredDelivery address.
amountnumberRequiredAmount to collect from the receiver, in IQD. Use 0 for a prepaid order. Example: 25000.
district_iduuid | nullOptionalDistrict inside the governorate. Required for fawri orders (delivery_type = 1) when your account has a fawri price list.
order_category_iduuidRequiredOne of your own order categories.
delivery_typeinteger | nullOptional0 = normal (default), 1 = fawri (express).
notesstring | nullOptional—
business_namestring | nullOptional—
governorate_iduuidRequiredDestination governorate id.
Returns

The standard wrapper. data carries nothing useful.

Errors specific to this call
400Refused or invalid input
Request · cURL
curl -X POST https://api.jayik.app/api/merchant/v2/orders/batch \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "orders": [
      {
        "tr": "ORD-1001",
        "customer_name": "Ali Hassan",
        "customer_phone": "07809876543",
        "customer_address": "Mansour, street 14",
        "amount": 25000,
        "governorate_id": "01a21416-44ce-7391-96e0-0cc4c3e99fd9",
        "order_category_id": "01a21416-4853-7b7c-9b7e-a5b5a4a47412"
      }
    ]
  }'
Response · 200
{
  "status": true,
  "message": "Create orders successfully",
  "data": []
}

Generate a tracking number

GET/v2/orders/generate-tr

Returns an unused tracking number you can send as tr.

Returns

The standard wrapper, with the result in data.

Request · cURL
curl https://api.jayik.app/api/merchant/v2/orders/generate-tr \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json"
Response · 200
{
  "status": true,
  "message": "TR Code generated successfully",
  "data": {
    "tr_code": "100006537"
  }
}

Check a tracking number

GET/v2/orders/tr-exists/{tr}

Tells you whether a tracking number is already in use.

Path parameters
NameTypeDescription
trstringRequiredTracking number.
Returns

An object, returned directly without the wrapper.

Request · cURL
curl https://api.jayik.app/api/merchant/v2/orders/tr-exists/ORD-1001 \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json"
Response · 200
{
  "exists": true
}

Cancel an order

PUT/v2/orders/cancel

Allowed only before pickup, while the order is Pending, AwaitingPickup or PickupDelayed.

Permission merchant-cancel-order
Body fields (JSON)
FieldTypeDescription
trstringRequiredTracking number.
Returns

The standard wrapper, with an OrderRecord object in data.

Errors specific to this call
400Refused or invalid input404Not found
Request · cURL
curl -X PUT https://api.jayik.app/api/merchant/v2/orders/cancel \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "tr": "ORD-1001"
  }'
Response · 200
{
  "status": true,
  "message": "Order cancelled successfully",
  "data": {
    "id": 1024,
    "uuid": "84df3f46-741d-45aa-b5b2-ab2a8a978e3e",
    "tr": "ORD-1001",
    "amount": 25000,
    "status_id": "01a21416-4403-72c4-814a-12d27f9c3c93",
    "governorate_id": "01a21416-44ce-7391-96e0-0cc4c3e99fd9",
    "warehouse_id": null,
    "order_category_id": "01a21416-4853-7b7c-9b7e-a5b5a4a47412",
    "verification_type": 1,
    "destination_coordinate": {
      "lat": "33.312805",
      "lng": "44.361488"
    },
    "notes": "Call before delivery",
    "total_products": 2,
    "created_at": "2026-11-25 22:02:14",
    "updated_at": "2026-11-25 22:02:14",
    "warehouse": null,
    "status": {
      "id": "01a21416-4403-72c4-814a-12d27f9c3c93",
      "name": "Pending",
      "ar_name": "قيد المعالجة"
    },
    "order_category": {
      "id": "01a21416-4853-7b7c-9b7e-a5b5a4a47412",
      "name": "Clothes"
    },
    "governorate": {
      "id": "01a21416-44ce-7391-96e0-0cc4c3e99fd9",
      "name": "بغداد"
    }
  }
}

Mark ready for pickup

PUT/v2/orders/ready-to-pickup

Tells the delivery company the package is packed. Moves a Pending order to AwaitingPickup.

Permission merchant-update-order
Body fields (JSON)
FieldTypeDescription
trstringRequiredTracking number.
Returns

The standard wrapper, with an OrderRecord object in data.

Errors specific to this call
400Refused or invalid input404Not found
Request · cURL
curl -X PUT https://api.jayik.app/api/merchant/v2/orders/ready-to-pickup \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "tr": "ORD-1001"
  }'
Response · 200
{
  "status": true,
  "message": "Order marked ready to pickup successfully",
  "data": {
    "id": 1024,
    "uuid": "84df3f46-741d-45aa-b5b2-ab2a8a978e3e",
    "tr": "ORD-1001",
    "amount": 25000,
    "status_id": "01a21416-4403-72c4-814a-12d27f9c3c93",
    "governorate_id": "01a21416-44ce-7391-96e0-0cc4c3e99fd9",
    "warehouse_id": null,
    "order_category_id": "01a21416-4853-7b7c-9b7e-a5b5a4a47412",
    "verification_type": 1,
    "destination_coordinate": {
      "lat": "33.312805",
      "lng": "44.361488"
    },
    "notes": "Call before delivery",
    "total_products": 2,
    "created_at": "2026-11-25 22:02:14",
    "updated_at": "2026-11-25 22:02:14",
    "warehouse": null,
    "status": {
      "id": "01a21416-4403-72c4-814a-12d27f9c3c93",
      "name": "Pending",
      "ar_name": "قيد المعالجة"
    },
    "order_category": {
      "id": "01a21416-4853-7b7c-9b7e-a5b5a4a47412",
      "name": "Clothes"
    },
    "governorate": {
      "id": "01a21416-44ce-7391-96e0-0cc4c3e99fd9",
      "name": "بغداد"
    }
  }
}

Get an order

GET/v2/orders/{order}
Permission merchant-show-order
Path parameters
NameTypeDescription
orderintegerRequiredThe order's numeric id.
Query parameters
NameTypeDescription
includestringOptionalComma-separated related objects to embed. Allowed: status, customer, governorate, district, warehouse, orderCategory, orderItems, orderItems.attribute, merchant, history.merchant, driverRate, amountChanges, financial. Example: status,customer,governorate.
Returns

The standard wrapper, with an Order object in data.

Errors specific to this call
404Not found
Request · cURL
curl -G https://api.jayik.app/api/merchant/v2/orders/1024 \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json" \
  --data-urlencode "include=status,customer,governorate"
Response · 200
{
  "status": true,
  "message": "Get Order Successfully",
  "data": {
    "id": 1024,
    "uuid": "84df3f46-741d-45aa-b5b2-ab2a8a978e3e",
    "tr": "ORD-1001",
    "amount": 25000,
    "invoice_url": null,
    "delivery_type": 0,
    "delivery_type_label": "عادي",
    "last_four_digits": null,
    "customer_id": "01a21416-4894-7d5c-a904-edd051e3de44",
    "customer": {
      "id": "01a21416-4894-7d5c-a904-edd051e3de44",
      "name": "Ali Hassan",
      "address": "Mansour, street 14",
      "phone": "07809876543"
    },
    "governorate_id": "01a21416-44ce-7391-96e0-0cc4c3e99fd9",
    "governorate": {
      "id": "01a21416-44ce-7391-96e0-0cc4c3e99fd9",
      "name": "بغداد"
    },
    "status_id": "01a21416-4403-72c4-814a-12d27f9c3c93",
    "status": {
      "id": "01a21416-4403-72c4-814a-12d27f9c3c93",
      "name": "Pending",
      "ar_name": "قيد المعالجة",
      "color": null
    },
    "history_id": null,
    "created_at": "2026-11-25 22:02:14",
    "updated_at": "2026-11-25 22:02:14"
  }
}

Delete an order

DELETE/v2/orders/{order}

Removes an order permanently. Allowed only while it is Pending; otherwise the answer is 403.

Permission merchant-delete-order
Path parameters
NameTypeDescription
orderintegerRequiredThe order's numeric id.
Returns

The standard wrapper, with an OrderRecord object in data.

Errors specific to this call
404Not found
Request · cURL
curl -X DELETE https://api.jayik.app/api/merchant/v2/orders/1024 \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json"
Response · 200
{
  "status": true,
  "message": "Order deleted successfully",
  "data": {
    "id": 1024,
    "uuid": "84df3f46-741d-45aa-b5b2-ab2a8a978e3e",
    "tr": "ORD-1001",
    "amount": 25000,
    "status_id": "01a21416-4403-72c4-814a-12d27f9c3c93",
    "governorate_id": "01a21416-44ce-7391-96e0-0cc4c3e99fd9",
    "warehouse_id": null,
    "order_category_id": "01a21416-4853-7b7c-9b7e-a5b5a4a47412",
    "verification_type": 1,
    "destination_coordinate": {
      "lat": "33.312805",
      "lng": "44.361488"
    },
    "notes": "Call before delivery",
    "total_products": 2,
    "created_at": "2026-11-25 22:02:14",
    "updated_at": "2026-11-25 22:02:14",
    "warehouse": null,
    "status": {
      "id": "01a21416-4403-72c4-814a-12d27f9c3c93",
      "name": "Pending",
      "ar_name": "قيد المعالجة"
    },
    "order_category": {
      "id": "01a21416-4853-7b7c-9b7e-a5b5a4a47412",
      "name": "Clothes"
    },
    "governorate": {
      "id": "01a21416-44ce-7391-96e0-0cc4c3e99fd9",
      "name": "بغداد"
    }
  }
}
8 endpointsAPI

Warehouses

Optional. You only need warehouses if you collect orders from more than one pickup location. Create one per location, then send its id as warehouse_id when you create an order. Running a marketplace? See Multi-vendor marketplaces.

Endpoints in this section

List warehouses

GET/v2/warehouses
Permission merchant-get-warehouse
Query parameters
NameTypeDescription
takeintegerOptionalItems per page. Default 15. Max 500.
pageintegerOptionalPage number. Default 1.
Returns

A page object without the wrapper. The items (Warehouse) are in data.

Request · cURL
curl https://api.jayik.app/api/merchant/v2/warehouses \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json"
Response · 200
{
  "current_page": 1,
  "data": [
    {
      "id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
      "name": "Main warehouse",
      "address": "Karrada, street 62",
      "lat": "33.3128",
      "long": "44.3615",
      "phone": "07701234567",
      "secondary_phone": null,
      "governorate_id": "01a21416-44ce-7391-96e0-0cc4c3e99fd9",
      "availability_times_from": "09:00",
      "availability_times_to": "09:00",
      "site_id": null,
      "creator_id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
      "created_at": "2026-11-25 22:02:14",
      "updated_at": "2026-11-25 22:02:14"
    }
  ],
  "first_page_url": null,
  "from": 1,
  "last_page": 1,
  "last_page_url": null,
  "links": [
    {
      "url": null,
      "label": "1",
      "page": 1,
      "active": true
    }
  ],
  "next_page_url": null,
  "path": "https://api.jayik.app/api/merchant/v2/…",
  "per_page": 15,
  "prev_page_url": null,
  "to": 1,
  "total": 1
}

Create a warehouse

POST/v2/warehouses
Permission merchant-store-warehouse
Body fields (JSON)
FieldTypeDescription
namestringRequired—
addressstringRequired—
latnumber | nullOptional—
longnumber | nullOptional—
governorate_idstring | integer | nullOptionalGovernorate id (UUID) or its number.
phonestring | nullOptional—
secondary_phonestring | nullOptional—
availability_times_fromstring | nullOptionalTime of day, HH:MM. Example: 09:00.
availability_times_tostring | nullOptionalTime of day, HH:MM. Example: 09:00.
site_idstring | nullOptional—
Returns

The standard wrapper, with a Warehouse object in data.

Errors specific to this call
400Refused or invalid input
Request · cURL
curl -X POST https://api.jayik.app/api/merchant/v2/warehouses \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Main warehouse",
    "address": "Karrada, street 62",
    "lat": 33.3128,
    "long": 44.3615,
    "governorate_id": "01a21416-44ce-7391-96e0-0cc4c3e99fd9",
    "phone": "07701234567"
  }'
Response · 200
{
  "status": true,
  "message": "…",
  "data": {
    "id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
    "name": "Main warehouse",
    "address": "Karrada, street 62",
    "lat": "33.3128",
    "long": "44.3615",
    "phone": "07701234567",
    "secondary_phone": null,
    "governorate_id": "01a21416-44ce-7391-96e0-0cc4c3e99fd9",
    "availability_times_from": "09:00",
    "availability_times_to": "09:00",
    "site_id": null,
    "creator_id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
    "created_at": "2026-11-25 22:02:14",
    "updated_at": "2026-11-25 22:02:14"
  }
}

Set the default warehouse

PUT/v2/warehouses/default
Permission merchant-update-DefaultWarehouse
Body fields (JSON)
FieldTypeDescription
default_warehouse_iduuidRequired—
Returns

The standard wrapper. data carries nothing useful.

Errors specific to this call
400Refused or invalid input
Request · cURL
curl -X PUT https://api.jayik.app/api/merchant/v2/warehouses/default \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "default_warehouse_id": "01a21416-4a02-7e11-b3c8-5d2f7a9e1c44"
  }'
Response · 200
{
  "status": true,
  "message": "Default warehouse updated successfully.",
  "data": null
}

Get a warehouse

GET/v2/warehouses/{warehouse}
Permission merchant-show-warehouse
Path parameters
NameTypeDescription
warehouseuuidRequiredWarehouse id.
Returns

The standard wrapper, with a Warehouse object in data.

Errors specific to this call
404Not found
Request · cURL
curl https://api.jayik.app/api/merchant/v2/warehouses/01a21416-4a02-7e11-b3c8-5d2f7a9e1c44 \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json"
Response · 200
{
  "status": true,
  "message": "Get warehouse successfully",
  "data": {
    "id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
    "name": "Main warehouse",
    "address": "Karrada, street 62",
    "lat": "33.3128",
    "long": "44.3615",
    "phone": "07701234567",
    "secondary_phone": null,
    "governorate_id": "01a21416-44ce-7391-96e0-0cc4c3e99fd9",
    "availability_times_from": "09:00",
    "availability_times_to": "09:00",
    "site_id": null,
    "creator_id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
    "created_at": "2026-11-25 22:02:14",
    "updated_at": "2026-11-25 22:02:14"
  }
}

Update a warehouse

PUT/v2/warehouses/{warehouse}

Send governorate_id on every update: when it is left out, the warehouse's governorate is cleared.

Permission merchant-update-warehouse
Path parameters
NameTypeDescription
warehouseuuidRequiredWarehouse id.
Body fields (JSON)
FieldTypeDescription
namestringOptional—
addressstringOptional—
latnumber | nullOptional—
longnumber | nullOptional—
governorate_idstring | integer | nullOptionalGovernorate id (UUID) or its number.
phonestring | nullOptional—
secondary_phonestring | nullOptional—
availability_times_fromstring | nullOptionalTime of day, HH:MM. Example: 09:00.
availability_times_tostring | nullOptionalTime of day, HH:MM. Example: 09:00.
site_idstring | nullOptional—
Returns

The standard wrapper, with a Warehouse object in data.

Errors specific to this call
400Refused or invalid input404Not found
Request · cURL
curl -X PUT https://api.jayik.app/api/merchant/v2/warehouses/01a21416-4a02-7e11-b3c8-5d2f7a9e1c44 \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Main warehouse",
    "address": "Karrada, street 62",
    "governorate_id": "01a21416-44ce-7391-96e0-0cc4c3e99fd9"
  }'
Response · 200
{
  "status": true,
  "message": "Update warehouse successfully",
  "data": {
    "id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
    "name": "Main warehouse",
    "address": "Karrada, street 62",
    "lat": "33.3128",
    "long": "44.3615",
    "phone": "07701234567",
    "secondary_phone": null,
    "governorate_id": "01a21416-44ce-7391-96e0-0cc4c3e99fd9",
    "availability_times_from": "09:00",
    "availability_times_to": "09:00",
    "site_id": null,
    "creator_id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
    "created_at": "2026-11-25 22:02:14",
    "updated_at": "2026-11-25 22:02:14"
  }
}

Delete a warehouse

DELETE/v2/warehouses/{warehouse}
Permission merchant-delete-warehouse
Path parameters
NameTypeDescription
warehouseuuidRequiredWarehouse id.
Returns

The standard wrapper. data carries nothing useful.

Errors specific to this call
404Not found
Request · cURL
curl -X DELETE https://api.jayik.app/api/merchant/v2/warehouses/01a21416-4a02-7e11-b3c8-5d2f7a9e1c44 \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json"
Response · 200
{
  "status": true,
  "message": "Warehouse deleted",
  "data": null
}

Get business hours

GET/v2/warehouses/{warehouse}/business-hours
Path parameters
NameTypeDescription
warehouseuuidRequiredWarehouse id.
Returns

An array of BusinessHour objects, returned directly without the wrapper.

Errors specific to this call
404Not found
Request · cURL
curl https://api.jayik.app/api/merchant/v2/warehouses/01a21416-4a02-7e11-b3c8-5d2f7a9e1c44/business-hours \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json"
Response · 200
[
  {
    "id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
    "warehouse_id": "01a21416-4a02-7e11-b3c8-5d2f7a9e1c44",
    "day": "saturday",
    "opens_at": "09:00",
    "closes_at": "17:00",
    "is_closed": false
  }
]

Set business hours

PUT/v2/warehouses/{warehouse}/business-hours

Sets the opening hours for the days you send. Days you leave out are not changed.

Permission merchant-update-warehouse
Path parameters
NameTypeDescription
warehouseuuidRequiredWarehouse id.
Body fields (JSON)
FieldTypeDescription
business_hoursobjectRequiredKeyed by day name.
Fields of each entry in business_hours (keys: sunday, monday, tuesday, wednesday, thursday, friday, saturday)
FieldTypeDescription
is_closedbooleanRequired—
opens_atstring | nullOptionalTime of day, HH:MM. Example: 09:00.
closes_atstring | nullOptionalTime of day, HH:MM. Example: 09:00.
Returns

The standard wrapper. data carries nothing useful.

Errors specific to this call
400Refused or invalid input422Cannot be carried out
Request · cURL
curl -X PUT https://api.jayik.app/api/merchant/v2/warehouses/01a21416-4a02-7e11-b3c8-5d2f7a9e1c44/business-hours \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "business_hours": {
      "saturday": {
        "is_closed": false,
        "opens_at": "09:00",
        "closes_at": "17:00"
      },
      "friday": {
        "is_closed": true,
        "opens_at": null,
        "closes_at": null
      }
    }
  }'
Response · 200
{
  "status": true,
  "message": "Business hours updated successfully",
  "data": null
}
6 endpointsAPI

Order categories

Your own grouping of orders. Every order needs one.

Endpoints in this section

List order categories

GET/v2/order-categories
Permission merchant-get-orderCategory
Query parameters
NameTypeDescription
takeintegerOptionalItems per page. Default 10. Max 500.
pageintegerOptionalPage number. Default 1.
Returns

A page object without the wrapper. The items (OrderCategory) are in data.

Request · cURL
curl https://api.jayik.app/api/merchant/v2/order-categories \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json"
Response · 200
{
  "current_page": 1,
  "data": [
    {
      "id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
      "name": "Clothes",
      "merchant_id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
      "created_at": "2026-11-25T22:02:14Z",
      "updated_at": "2026-11-25T22:02:14Z"
    }
  ],
  "first_page_url": null,
  "from": 1,
  "last_page": 1,
  "last_page_url": null,
  "links": [
    {
      "url": null,
      "label": "1",
      "page": 1,
      "active": true
    }
  ],
  "next_page_url": null,
  "path": "https://api.jayik.app/api/merchant/v2/…",
  "per_page": 15,
  "prev_page_url": null,
  "to": 1,
  "total": 1
}

Create an order category

POST/v2/order-categories
Permission merchant-store-orderCategory
Body fields (JSON)
FieldTypeDescription
namestringRequired—
Returns

The standard wrapper, with an OrderCategory object in data.

Errors specific to this call
400Refused or invalid input
Request · cURL
curl -X POST https://api.jayik.app/api/merchant/v2/order-categories \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Clothes"
  }'
Response · 200
{
  "status": true,
  "message": "Order category created.",
  "data": {
    "id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
    "name": "Clothes",
    "merchant_id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
    "created_at": "2026-11-25T22:02:14Z",
    "updated_at": "2026-11-25T22:02:14Z"
  }
}

Set the default order category

PUT/v2/order-categories/default
Permission merchant-update-DefaultCategory
Body fields (JSON)
FieldTypeDescription
default_order_category_iduuidRequired—
Returns

The standard wrapper. data carries nothing useful.

Errors specific to this call
400Refused or invalid input
Request · cURL
curl -X PUT https://api.jayik.app/api/merchant/v2/order-categories/default \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "default_order_category_id": "01a21416-4853-7b7c-9b7e-a5b5a4a47412"
  }'
Response · 200
{
  "status": true,
  "message": "Default category updated successfully.",
  "data": null
}

Get an order category

GET/v2/order-categories/{order_category}
Permission merchant-show-orderCategory
Path parameters
NameTypeDescription
order_categoryuuidRequiredOrder category id.
Returns

The category, without the usual status/message/data wrapper. An OrderCategory object, returned directly.

Errors specific to this call
404Not found
Request · cURL
curl https://api.jayik.app/api/merchant/v2/order-categories/01a21416-4853-7b7c-9b7e-a5b5a4a47412 \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json"
Response · 200
{
  "id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
  "name": "Clothes",
  "merchant_id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
  "created_at": "2026-11-25T22:02:14Z",
  "updated_at": "2026-11-25T22:02:14Z"
}

Rename an order category

PUT/v2/order-categories/{order_category}
Permission merchant-update-orderCategory
Path parameters
NameTypeDescription
order_categoryuuidRequiredOrder category id.
Body fields (JSON)
FieldTypeDescription
namestringRequired—
Returns

The standard wrapper, with an OrderCategory object in data.

Errors specific to this call
400Refused or invalid input404Not found
Request · cURL
curl -X PUT https://api.jayik.app/api/merchant/v2/order-categories/01a21416-4853-7b7c-9b7e-a5b5a4a47412 \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Clothes"
  }'
Response · 200
{
  "status": true,
  "message": "Order category update.",
  "data": {
    "id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
    "name": "Clothes",
    "merchant_id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
    "created_at": "2026-11-25T22:02:14Z",
    "updated_at": "2026-11-25T22:02:14Z"
  }
}

Delete an order category

DELETE/v2/order-categories/{order_category}
Permission merchant-delete-orderCategory
Path parameters
NameTypeDescription
order_categoryuuidRequiredOrder category id.
Returns

The standard wrapper. data carries nothing useful.

Errors specific to this call
404Not found
Request · cURL
curl -X DELETE https://api.jayik.app/api/merchant/v2/order-categories/01a21416-4853-7b7c-9b7e-a5b5a4a47412 \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json"
Response · 200
{
  "status": true,
  "message": "Order category deleted.",
  "data": null
}
5 endpointsAPI

Reference data

Governorates, statuses and product types.

Endpoints in this section

List governorates

GET/v2/governorates

There are few governorates; send take=50 to get them all in one page.

Query parameters
NameTypeDescription
takeintegerOptionalItems per page. Default 10. Max 500.
pageintegerOptionalPage number. Default 1.
Returns

A page object without the wrapper. The items (Governorate) are in data.

Request · cURL
curl https://api.jayik.app/api/merchant/v2/governorates \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json"
Response · 200
{
  "current_page": 1,
  "data": [
    {
      "id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
      "name": "بغداد",
      "number": null,
      "created_at": "2026-11-25 22:02:14",
      "updated_at": "2026-11-25 22:02:14"
    }
  ],
  "first_page_url": null,
  "from": 1,
  "last_page": 1,
  "last_page_url": null,
  "links": [
    {
      "url": null,
      "label": "1",
      "page": 1,
      "active": true
    }
  ],
  "next_page_url": null,
  "path": "https://api.jayik.app/api/merchant/v2/…",
  "per_page": 15,
  "prev_page_url": null,
  "to": 1,
  "total": 1
}

Get a governorate

GET/v2/governorates/{governorate}
Path parameters
NameTypeDescription
governorateuuidRequiredGovernorate id.
Returns

The standard wrapper, with a Governorate object in data.

Errors specific to this call
404Not found
Request · cURL
curl https://api.jayik.app/api/merchant/v2/governorates/01a21416-44ce-7391-96e0-0cc4c3e99fd9 \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json"
Response · 200
{
  "status": true,
  "message": "Get governorate successfully",
  "data": {
    "id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
    "name": "بغداد",
    "number": null,
    "created_at": "2026-11-25 22:02:14",
    "updated_at": "2026-11-25 22:02:14"
  }
}

List order statuses

GET/v2/statuses

The statuses an order of yours can be in. Send take=50 to get them all in one page.

Query parameters
NameTypeDescription
takeintegerOptionalItems per page. Default 10. Max 500.
pageintegerOptionalPage number. Default 1.
Returns

A page object without the wrapper. The items (Status) are in data.

Request · cURL
curl https://api.jayik.app/api/merchant/v2/statuses \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json"
Response · 200
{
  "current_page": 1,
  "data": [
    {
      "id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
      "name": "Pending",
      "ar_name": null,
      "en_name": null,
      "kr_name": null,
      "color": null,
      "image": null,
      "sort": null,
      "created_at": "2026-11-25 22:02:14",
      "updated_at": "2026-11-25 22:02:14"
    }
  ],
  "first_page_url": null,
  "from": 1,
  "last_page": 1,
  "last_page_url": null,
  "links": [
    {
      "url": null,
      "label": "1",
      "page": 1,
      "active": true
    }
  ],
  "next_page_url": null,
  "path": "https://api.jayik.app/api/merchant/v2/…",
  "per_page": 15,
  "prev_page_url": null,
  "to": 1,
  "total": 1
}

Get a status

GET/v2/statuses/{status}
Path parameters
NameTypeDescription
statusuuidRequiredStatus id.
Returns

The standard wrapper, with a Status object in data.

Errors specific to this call
404Not found
Request · cURL
curl https://api.jayik.app/api/merchant/v2/statuses/01a21416-4403-72c4-814a-12d27f9c3c93 \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json"
Response · 200
{
  "status": true,
  "message": "Get status successfully",
  "data": {
    "id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
    "name": "Pending",
    "ar_name": null,
    "en_name": null,
    "kr_name": null,
    "color": null,
    "image": null,
    "sort": null,
    "created_at": "2026-11-25 22:02:14",
    "updated_at": "2026-11-25 22:02:14"
  }
}

List product types

GET/v2/attributes

Values for order_items[].attribute_id.

Query parameters
NameTypeDescription
takeintegerOptionalItems per page. Default 15. Max 500.
pageintegerOptionalPage number. Default 1.
Returns

A page object without the wrapper. The items (Attribute) are in data.

Request · cURL
curl https://api.jayik.app/api/merchant/v2/attributes \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json"
Response · 200
{
  "current_page": 1,
  "data": [
    {
      "id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
      "name": "Clothes",
      "description": null,
      "created_at": "2026-11-25T22:02:14Z",
      "updated_at": "2026-11-25T22:02:14Z"
    }
  ],
  "first_page_url": null,
  "from": 1,
  "last_page": 1,
  "last_page_url": null,
  "links": [
    {
      "url": null,
      "label": "1",
      "page": 1,
      "active": true
    }
  ],
  "next_page_url": null,
  "path": "https://api.jayik.app/api/merchant/v2/…",
  "per_page": 15,
  "prev_page_url": null,
  "to": 1,
  "total": 1
}
4 endpointsAPI

Webhook

Receive order events at your own URL.

Endpoints in this section

Order event (sent to your URL)

POSTyour webhook URL

Sent to your webhook URL whenever one of your orders is created or changes.

Verify every event. Compute HMAC-SHA256 over {X-Jayik-Timestamp}.{raw request body} with your webhook secret as the key, and compare sha256= plus the hex digest with X-Jayik-Signature. Use the raw bytes of the body, before any JSON parsing. Reject events whose timestamp is more than a few minutes old.

Answer with any 2xx status within 5 seconds. Do slow work after answering.

Headers Jayik sends
NameTypeDescription
X-Jayik-TimestampstringRequiredUnix time the event was sent, in seconds.
X-Jayik-SignaturestringRequiredsha256= followed by the hex HMAC-SHA256 digest.
secret-keystringOptionalYour webhook secret, sent as a plain header for older integrations. Prefer checking the signature.
Body fields
FieldTypeDescription
oprationstringRequiredThe event. The field name is spelled opration. One of: created, updated, assigned, deleted, restored, forceDeleted.
dataOrderRecordRequiredThe OrderRecord, plus a driver object. Driver fields are null unless driver details are enabled for your account.
Verify · Node.js
import crypto from "node:crypto";

// rawBody: the request body as received, before JSON parsing
function isFromJayik(rawBody, headers, secret) {
  const timestamp = headers["x-jayik-timestamp"];
  const expected = "sha256=" + crypto
    .createHmac("sha256", secret)
    .update(`${timestamp}.${rawBody}`)
    .digest("hex");
  const given = headers["x-jayik-signature"] || "";
  const fresh = Math.abs(Date.now() / 1000 - Number(timestamp)) < 300;
  return fresh
    && given.length === expected.length
    && crypto.timingSafeEqual(Buffer.from(given), Buffer.from(expected));
}
Verify · PHP
<?php
$rawBody   = file_get_contents("php://input");
$timestamp = $_SERVER["HTTP_X_JAYIK_TIMESTAMP"] ?? "";
$given     = $_SERVER["HTTP_X_JAYIK_SIGNATURE"] ?? "";

$expected = "sha256=" . hash_hmac("sha256", $timestamp . "." . $rawBody, $secret);
$fresh    = abs(time() - (int) $timestamp) < 300;

if (!$fresh || !hash_equals($expected, $given)) {
  http_response_code(401);
  exit;
}
http_response_code(200); // answer first, do slow work after
Event body
{
  "opration": "updated",
  "data": {
    "id": 1024,
    "uuid": "84df3f46-741d-45aa-b5b2-ab2a8a978e3e",
    "tr": "ORD-1001",
    "amount": 25000,
    "status_id": "01a21416-4403-72c4-814a-12d27f9c3c93",
    "governorate_id": "01a21416-44ce-7391-96e0-0cc4c3e99fd9",
    "warehouse_id": null,
    "order_category_id": "01a21416-4853-7b7c-9b7e-a5b5a4a47412",
    "verification_type": 1,
    "destination_coordinate": {
      "lat": "33.312805",
      "lng": "44.361488"
    },
    "notes": "Call before delivery",
    "total_products": 2,
    "created_at": "2026-11-25 22:02:14",
    "updated_at": "2026-11-25 22:40:02",
    "warehouse": null,
    "status": {
      "id": "01a21416-4403-72c4-814a-12d27f9c3c93",
      "name": "Received",
      "ar_name": "جاري التوصيل"
    },
    "order_category": {
      "id": "01a21416-4853-7b7c-9b7e-a5b5a4a47412",
      "name": "Clothes"
    },
    "governorate": {
      "id": "01a21416-44ce-7391-96e0-0cc4c3e99fd9",
      "name": "بغداد"
    },
    "driver": {
      "id": null,
      "name": null,
      "phone": null
    }
  }
}

Get the webhook settings

GET/v2/webhook

Returns your webhook URL and the secret used to verify events.

Permission merchant-get-webhook
Returns

The settings, without the usual status/message/data wrapper. A WebhookConfig object, returned directly.

Request · cURL
curl https://api.jayik.app/api/merchant/v2/webhook \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json"
Response · 200
{
  "webhook": "https://example.com/jayik/webhook",
  "secret": {
    "type": "header",
    "key": "secret-key",
    "value": "whsec_xxxxxxxxxxxxxxxx"
  },
  "signature": {
    "algorithm": "HMAC-SHA256",
    "header": "X-Jayik-Signature",
    "timestamp_header": "X-Jayik-Timestamp",
    "signed_payload": "{timestamp}.{raw body}",
    "format": "sha256={hex digest}"
  }
}

Set the webhook URL

PUT/v2/webhook

Sets where order events are sent. The URL must use HTTPS. Send null to stop receiving events.

Permission merchant-store-webhook
Body fields (JSON)
FieldTypeDescription
webhookuri | nullOptionalMust start with https://.
Returns

Saved. data.webhook shows the URL from before this call; read the settings again to see the new one. The standard wrapper, with a WebhookConfig object in data.

Errors specific to this call
400Refused or invalid input
Request · cURL
curl -X PUT https://api.jayik.app/api/merchant/v2/webhook \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "webhook": "https://example.com/jayik/webhook"
  }'
Response · 200
{
  "status": true,
  "message": "Webhook created",
  "data": {
    "webhook": "https://example.com/jayik/webhook",
    "secret": {
      "type": "header",
      "key": "secret-key",
      "value": "whsec_xxxxxxxxxxxxxxxx"
    },
    "signature": {
      "algorithm": "HMAC-SHA256",
      "header": "X-Jayik-Signature",
      "timestamp_header": "X-Jayik-Timestamp",
      "signed_payload": "{timestamp}.{raw body}",
      "format": "sha256={hex digest}"
    }
  }
}

Send a test event

POST/v2/webhook/test

Sends one event to your webhook URL. Without tr, sample data is sent. Answers 422 when no URL is set.

Permission merchant-send-webhook
Body fields (JSON) · optional
FieldTypeDescription
trstring | nullOptionalSend this order's real data.
operationstring | nullOptionalEvent name to put in opration. Default created.
Returns

The standard wrapper, with the result in data.

Errors specific to this call
400Refused or invalid input404Not found422Cannot be carried out
Request · cURL
curl -X POST https://api.jayik.app/api/merchant/v2/webhook/test \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "tr": "ORD-1001",
    "operation": null
  }'
Response · 200
{
  "status": true,
  "message": "Test webhook dispatched",
  "data": {
    "webhook": "https://example.com/jayik/webhook",
    "source": "order",
    "payload": {
      "opration": "updated",
      "data": {
        "id": 1024,
        "uuid": "84df3f46-741d-45aa-b5b2-ab2a8a978e3e",
        "tr": "ORD-1001",
        "amount": 25000,
        "status_id": "01a21416-4403-72c4-814a-12d27f9c3c93",
        "governorate_id": "01a21416-44ce-7391-96e0-0cc4c3e99fd9",
        "warehouse_id": null,
        "order_category_id": "01a21416-4853-7b7c-9b7e-a5b5a4a47412",
        "verification_type": 1,
        "destination_coordinate": {
          "lat": "33.312805",
          "lng": "44.361488"
        },
        "notes": "Call before delivery",
        "total_products": 2,
        "created_at": "2026-11-25 22:02:14",
        "updated_at": "2026-11-25 22:40:02",
        "warehouse": null,
        "status": {
          "id": "01a21416-4403-72c4-814a-12d27f9c3c93",
          "name": "Received",
          "ar_name": "جاري التوصيل"
        },
        "order_category": {
          "id": "01a21416-4853-7b7c-9b7e-a5b5a4a47412",
          "name": "Clothes"
        },
        "governorate": {
          "id": "01a21416-44ce-7391-96e0-0cc4c3e99fd9",
          "name": "بغداد"
        },
        "driver": {
          "id": null,
          "name": null,
          "phone": null
        }
      }
    }
  }
}

Resend an order's event

POST/v2/webhook/deliveries/{tr}

Sends a created event for one of your orders to your webhook URL again.

Permission merchant-send-webhook
Path parameters
NameTypeDescription
trstringRequiredTracking number.
Returns

The standard wrapper, with an OrderRecord object in data.

Errors specific to this call
404Not found
Request · cURL
curl -X POST https://api.jayik.app/api/merchant/v2/webhook/deliveries/ORD-1001 \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json"
Response · 200
{
  "status": true,
  "message": "Order data sent to webhook",
  "data": {
    "id": 1024,
    "uuid": "84df3f46-741d-45aa-b5b2-ab2a8a978e3e",
    "tr": "ORD-1001",
    "amount": 25000,
    "status_id": "01a21416-4403-72c4-814a-12d27f9c3c93",
    "governorate_id": "01a21416-44ce-7391-96e0-0cc4c3e99fd9",
    "warehouse_id": null,
    "order_category_id": "01a21416-4853-7b7c-9b7e-a5b5a4a47412",
    "verification_type": 1,
    "destination_coordinate": {
      "lat": "33.312805",
      "lng": "44.361488"
    },
    "notes": "Call before delivery",
    "total_products": 2,
    "created_at": "2026-11-25 22:02:14",
    "updated_at": "2026-11-25 22:02:14",
    "warehouse": null,
    "status": {
      "id": "01a21416-4403-72c4-814a-12d27f9c3c93",
      "name": "Pending",
      "ar_name": "قيد المعالجة"
    },
    "order_category": {
      "id": "01a21416-4853-7b7c-9b7e-a5b5a4a47412",
      "name": "Clothes"
    },
    "governorate": {
      "id": "01a21416-44ce-7391-96e0-0cc4c3e99fd9",
      "name": "بغداد"
    }
  }
}
6 endpointsAPI

API keys

Keys for server integrations.

Endpoints in this section

List API keys

GET/v2/api-keys

Key values are never listed.

Permission merchant-get-apiKey
Query parameters
NameTypeDescription
takeintegerOptionalItems per page. Default 10. Max 500.
pageintegerOptionalPage number. Default 1.
Returns

A page object without the wrapper. The items (ApiKey) are in data.

Request · cURL
curl https://api.jayik.app/api/merchant/v2/api-keys \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json"
Response · 200
{
  "current_page": 1,
  "data": [
    {
      "id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
      "description": "Store backend",
      "active": true,
      "user_id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
      "created_at": "2026-11-25T22:02:14Z",
      "updated_at": "2026-11-25T22:02:14Z"
    }
  ],
  "first_page_url": null,
  "from": 1,
  "last_page": 1,
  "last_page_url": null,
  "links": [
    {
      "url": null,
      "label": "1",
      "page": 1,
      "active": true
    }
  ],
  "next_page_url": null,
  "path": "https://api.jayik.app/api/merchant/v2/…",
  "per_page": 15,
  "prev_page_url": null,
  "to": 1,
  "total": 1
}

Create an API key

POST/v2/api-keys

The key value is in the response and is shown only this once.

Permission merchant-store-apiKey
Body fields (JSON)
FieldTypeDescription
descriptionstring | nullRequiredA label, such as the system that will use the key. The field must be present; it may be null.
Returns

The standard wrapper, with an ApiKeyWithSecret object in data.

Errors specific to this call
400Refused or invalid input
Request · cURL
curl -X POST https://api.jayik.app/api/merchant/v2/api-keys \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "Store backend"
  }'
Response · 200
{
  "status": true,
  "message": "Api Token Generated successfully",
  "data": {
    "id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
    "description": "Store backend",
    "key": "jk_live_xxxxxxxxxxxxxxxxxxxxxxxx",
    "user_id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
    "created_at": "2026-11-25T22:02:14Z",
    "updated_at": "2026-11-25T22:02:14Z"
  }
}

Regenerate an API key

POST/v2/api-keys/regenerate

Replaces the key's value. The old value stops working immediately; the new one is shown only this once.

Permission merchant-re-generate-apiKey
Body fields (JSON)
FieldTypeDescription
iduuidRequired—
Returns

The standard wrapper, with an ApiKeyWithSecret object in data.

Errors specific to this call
400Refused or invalid input404Not found
Request · cURL
curl -X POST https://api.jayik.app/api/merchant/v2/api-keys/regenerate \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10"
  }'
Response · 200
{
  "status": true,
  "message": "Api Token Generated successfully",
  "data": {
    "id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
    "description": "Store backend",
    "key": "jk_live_xxxxxxxxxxxxxxxxxxxxxxxx",
    "user_id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
    "created_at": "2026-11-25T22:02:14Z",
    "updated_at": "2026-11-25T22:02:14Z"
  }
}

Get an API key

GET/v2/api-keys/{api_key}
Permission merchant-show-apiKey
Path parameters
NameTypeDescription
api_keyuuidRequiredAPI key id.
Returns

The key's details, without its value and without the usual wrapper. An ApiKey object, returned directly.

Errors specific to this call
404Not found
Request · cURL
curl https://api.jayik.app/api/merchant/v2/api-keys/01a21416-5a10-7c3e-8f21-3b9d2e6a4c10 \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json"
Response · 200
{
  "id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
  "description": "Store backend",
  "active": true,
  "user_id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
  "created_at": "2026-11-25T22:02:14Z",
  "updated_at": "2026-11-25T22:02:14Z"
}

Update an API key

PUT/v2/api-keys/{api_key}

Rename a key, or switch it off and on.

Permission merchant-update-apiKey
Path parameters
NameTypeDescription
api_keyuuidRequiredAPI key id.
Body fields (JSON)
FieldTypeDescription
descriptionstring | nullOptional—
activeintegerRequired1 = usable, 0 = switched off.
Returns

The standard wrapper, with an ApiKey object in data.

Errors specific to this call
400Refused or invalid input404Not found
Request · cURL
curl -X PUT https://api.jayik.app/api/merchant/v2/api-keys/01a21416-5a10-7c3e-8f21-3b9d2e6a4c10 \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "Store backend",
    "active": 1
  }'
Response · 200
{
  "status": true,
  "message": "Api Token Updated",
  "data": {
    "id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
    "description": "Store backend",
    "active": true,
    "user_id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
    "created_at": "2026-11-25T22:02:14Z",
    "updated_at": "2026-11-25T22:02:14Z"
  }
}

Delete an API key

DELETE/v2/api-keys/{api_key}
Permission merchant-delete-apiKey
Path parameters
NameTypeDescription
api_keyuuidRequiredAPI key id.
Returns

The standard wrapper, with an ApiKey object in data.

Errors specific to this call
404Not found
Request · cURL
curl -X DELETE https://api.jayik.app/api/merchant/v2/api-keys/01a21416-5a10-7c3e-8f21-3b9d2e6a4c10 \
  -H "X-API-KEY: $JAYIK_API_KEY" \
  -H "Accept: application/json"
Response · 200
{
  "status": true,
  "message": "Api Token Deleted",
  "data": {
    "id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
    "description": "Store backend",
    "active": true,
    "user_id": "01a21416-5a10-7c3e-8f21-3b9d2e6a4c10",
    "created_at": "2026-11-25T22:02:14Z",
    "updated_at": "2026-11-25T22:02:14Z"
  }
}
17 objectsReference

Objects

The objects returned by the API, field by field. Other fields may be present; ignore the ones you do not use.

Order

An order as returned by the list and show endpoints. Nested objects are present only when requested with include.
FieldTypeDescription
idintegerNumeric id. Used in GET and DELETE /orders/{order}.
uuiduuid—
trstringTracking number. Example: ORD-1001.
amountnumberAmount to collect from the receiver, in IQD. Example: 25000.
invoice_urlstring | null—
delivery_typeinteger | null0 = normal, 1 = fawri (express).
delivery_type_labelstring | null—
last_four_digitsstring | null—
customer_iduuid—
customerCustomer—
governorate_iduuid—
governorateGovernorateSummary—
status_iduuid—
statusStatusSummary—
merchantobject—
warehouseWarehouse | null—
order_itemsOrderItem[]—
historyOrderHistoryEntry[]—
amount_changesAmountChange[]—
settlementobject | null—
created_atstringDate and time, YYYY-MM-DD HH:MM:SS. Example: 2026-11-25 22:02:14.
updated_atstringDate and time, YYYY-MM-DD HH:MM:SS. Example: 2026-11-25 22:02:14.

OrderRecord

The full order record, as returned by create, cancel and ready-to-pickup, and sent in webhooks. Other fields may be present.
FieldTypeDescription
idinteger—
uuiduuid—
trstring—
amountnumber—
status_iduuid—
governorate_iduuid—
district_iduuid | null—
customer_iduuid—
merchant_iduuid—
company_iduuid | null—
warehouse_iduuid | null—
order_category_iduuid | null—
delivery_typeinteger | null0 = normal, 1 = fawri (express).
verification_typeintegerHow delivery is confirmed: 0 = none, 1 = one-time code, 2 = photo, 3 = QR.
destination_coordinateCoordinate—
notesstring | null—
total_productsinteger | null—
invoice_urlstring | null—
scheduled_delivery_date_fromstring | null—
scheduled_delivery_date_tostring | null—
ratenumber | null—
assigned_atstring | null—
picked_up_atstring | null—
delivered_atstring | null—
returned_atstring | null—
cancelled_atstring | null—
statusStatus—
governorateGovernorateSummary—
order_categoryOrderCategory | null—
warehouseWarehouse | null—
customerCustomer—
created_atstringDate and time, YYYY-MM-DD HH:MM:SS. Example: 2026-11-25 22:02:14.
updated_atstringDate and time, YYYY-MM-DD HH:MM:SS. Example: 2026-11-25 22:02:14.

Customer

The person receiving the order.
FieldTypeDescription
iduuid—
namestring | null—
phonestring—
addressstring | null—

OrderItem

FieldTypeDescription
iduuid—
namestring—
attribute_iduuid—
attributeobject—
weightstring | number—
unitstring | null—
countinteger—

OrderHistoryEntry

One status change of an order.
FieldTypeDescription
iduuid—
order_iduuidThe order's uuid.
status_iduuid—
statusStatus—
notesstring | null—
descriptionstring | null—
latstring | null—
longstring | null—
imagestring | null—
note_imagestring | null—
driver_iduuid | null—
merchant_iduuid | null—
warehouse_iduuid | null—
delay_daysinteger | null—
created_atstringDate and time, YYYY-MM-DD HH:MM:SS. Example: 2026-11-25 22:02:14.
updated_atstringDate and time, YYYY-MM-DD HH:MM:SS. Example: 2026-11-25 22:02:14.

AmountChange

FieldTypeDescription
idstring—
old_amountnumber—
new_amountnumber—
changed_by_typestring | nullWho changed it. Example: Merchant.
notesstring | null—
changed_atdatetime—

Warehouse

A pickup point.
FieldTypeDescription
iduuid—
namestring—
addressstring | null—
latstring | number | nullExample: 33.3128.
longstring | number | nullExample: 44.3615.
phonestring | null—
secondary_phonestring | null—
governorate_iduuid | null—
availability_times_fromstring | nullTime of day, HH:MM. Example: 09:00.
availability_times_tostring | nullTime of day, HH:MM. Example: 09:00.
site_idstring | null—
creator_iduuid | null—
created_atstringDate and time, YYYY-MM-DD HH:MM:SS. Example: 2026-11-25 22:02:14.
updated_atstringDate and time, YYYY-MM-DD HH:MM:SS. Example: 2026-11-25 22:02:14.

BusinessHour

FieldTypeDescription
idstring—
warehouse_iduuid—
daystringOne of: sunday, monday, tuesday, wednesday, thursday, friday, saturday.
opens_atstring | null—
closes_atstring | null—
is_closedboolean—

OrderCategory

FieldTypeDescription
iduuid—
namestringExample: Clothes.
merchant_iduuid—
created_atdatetime—
updated_atdatetime—

Governorate

FieldTypeDescription
iduuid—
namestringExample: بغداد.
numberinteger | nullShort numeric code. Accepted in place of the id when creating a single order or a warehouse.
created_atstringDate and time, YYYY-MM-DD HH:MM:SS. Example: 2026-11-25 22:02:14.
updated_atstringDate and time, YYYY-MM-DD HH:MM:SS. Example: 2026-11-25 22:02:14.

Status

FieldTypeDescription
iduuid—
namestringStable status code. See the status list in the introduction. Example: Pending.
ar_namestring | null—
en_namestring | null—
kr_namestring | null—
colorstring | null—
imagestring | null—
sortinteger | null—
created_atstringDate and time, YYYY-MM-DD HH:MM:SS. Example: 2026-11-25 22:02:14.
updated_atstringDate and time, YYYY-MM-DD HH:MM:SS. Example: 2026-11-25 22:02:14.

Attribute

A product type used on order items.
FieldTypeDescription
iduuid—
namestring—
descriptionstring | null—
created_atdatetime—
updated_atdatetime—

WebhookConfig

FieldTypeDescription
webhookuri | nullThe URL order events are sent to.
secretobjectThe static header sent with every event.
signatureobjectHow events are signed.

WebhookEvent

FieldTypeDescription
oprationstringThe event. The field name is spelled opration. One of: created, updated, assigned, deleted, restored, forceDeleted.
dataOrderRecord—

ApiKey

FieldTypeDescription
iduuid—
descriptionstring | null—
activeboolean | integerWhether the key can be used.
user_iduuid—
created_atdatetime—
updated_atdatetime—

ApiKeyWithSecret

Returned only when a key is created or regenerated.
FieldTypeDescription
iduuid—
descriptionstring | null—
keystringThe key value. Shown once; store it now.
user_iduuid—
created_atdatetime—
updated_atdatetime—

Merchant

A merchant account or one of its employees. Other fields may be present.
FieldTypeDescription
iduuid—
full_namestring—
business_namestring | null—
phonestring—
secondary_phonestring | null—
is_activeboolean—
statusinteger0 = waiting for activation, 1 = active, 2 = rejected.
parent_merchant_iduuid | nullSet on an employee; the account it belongs to.
governorate_iduuid | null—
latnumber | null—
lngnumber | null—
default_order_category_iduuid | null—
default_warehouse_iduuid | null—
warehouse_iduuid | nullWhen set on an employee, they only see orders of this warehouse.
availability_times_fromstring | nullTime of day, HH:MM. Example: 09:00.
availability_times_tostring | nullTime of day, HH:MM. Example: 09:00.
webhookstring | null—
company_iduuid | null—
created_atdatetime—
updated_atdatetime—