{ "type": "object", "x-examples": { "Example": { "event": "order.shipment.creating", "merchant": 1305146709, "created_at": "Sun Jun 26 2022 13:29:51 GMT+0300", "data": { "id": 1427738113, "reference_id": 41030566, "urls": { "customer": "https://salla.sa/dev-wofftr4xsra5xtlv/order/AB3exRyLdXv5Wp8KwZ9WrGg4p7Ej8ZKl", "admin": "https://s.salla.sa/orders/order/AB3exRyLdXv5Wp8KwZ9WrGg4p7Ej8ZKl" }, "date": { "date": "2022-06-26 13:29:43.000000", "timezone_type": 3, "timezone": "Asia/Riyadh" }, "source": "dashboard", "source_device": "desktop", "source_details": { "type": "dashboard", "value": null, "device": "desktop", "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36", "ip": null }, "first_complete_at": null, "status": { "id": 566146469, "name": "بإنتظار المراجعة", "slug": "under_review", "customized": { "id": 986688842, "name": "بإنتظار المراجعة" } }, "payment_method": "bank", "currency": "SAR", "amounts": { "sub_total": { "amount": 79, "currency": "SAR" }, "shipping_cost": { "amount": 35, "currency": "SAR" }, "cash_on_delivery": { "amount": 0, "currency": "SAR" }, "tax": { "percent": "0.00", "amount": { "amount": 0, "currency": "SAR" } }, "discounts": [], "total": { "amount": 114, "currency": "SAR" } }, "shipping": { "id": 1935030040, "app_id": "2032004508", "company": "usertest@gmail.com", "logo": "https://salla-dev-portal.s3.eu-central-1.amazonaws.com/uploads/T3GFoIZXP7BsIKMEfdL3XoT9rxSXZN9WpKoFifa8.png", "receiver": { "name": "Del Don", "email": "user@gmail.com", "phone": "971555555555" }, "shipper": { "name": "Demo", "company_name": "dev-wofftr4xsra5xtlv", "email": "wofftr4xsra5xtlv@email.partners", "phone": "966500000000" }, "pickup_address": { "country": "السعودية", "country_code": "SA", "city": "مكة", "shipping_address": "شارع عبدالله,السلام,23233, سنابل السلام, مكة,السعودية", "street_number": "شارع عبدالله", "block": "السلام", "postal_code": "23233", "geo_coordinates": { "lat": 21.3825905096851, "lng": 39.77319103068542 } }, "address": { "country": "SA", "country_code": "SA", "city": "جدة", "shipping_address": " شارع Abu tamimah، الحي az zahraa 23233،, 5,, جدة, السعودية", "street_number": "Abu tamimah", "block": "az zahraa", "postal_code": "23233", "geo_coordinates": { "lat": 0, "lng": 0 } }, "shipment": { "id": "0", "pickup_id": null, "tracking_link": "0", "label": [] }, "policy_options": { "boxes": "2" } }, "can_cancel": true, "show_weight": false, "can_reorder": true, "is_pending_payment": false, "pending_payment_ends_at": 172791, "total_weight": "٠٫٢٥ كجم", "rating_link": "https://store-test.com/rating-link", "shipment_branch": [ { "id": 731280709, "name": "الفرع الرئيسي", "status": "active", "is_default": true, "type": {} } ], "customer": { "id": 1550968832, "name": "Del Don", "mobile": "+971555555555", "email": "user@gmail.com", "avatar": "https://store-test.com/cp/assets/images/avatar_male.png", "country": "الامارات", "city": "" }, "items": [ { "id": 1907902809, "product_id": 1994210129, "name": "تنورة", "sku": "2400409-20000012660-", "quantity": 1, "weight": 0.25, "amounts": { "price_without_tax": { "amount": 79, "currency": "SAR" }, "total_discount": { "amount": 0, "currency": "SAR" }, "tax": { "percent": "0.00", "amount": { "amount": 0, "currency": "SAR" } }, "total": { "amount": 79, "currency": "SAR" } } } ] } } }, "title": "Order Shipments Webhook Events Model", "properties": { "event": { "type": "string", "enum": [ "order.shipment.creating", "order.shipment.created", "order.shipment.return.creating", "order.shipment.return.created" ], "description": "Event Name" }, "merchant": { "type": "number", "description": "Merchant ID" }, "created_at": { "type": "string" }, "data": { "type": "object", "properties": { "id": { "type": "number", "description": "Order ID" }, "reference_id": { "type": "number", "description": "Order refrence ID, that appears to customers in the store." }, "urls": { "$ref": "#/definitions/1307398" }, "date": { "$ref": "#/definitions/1307388" }, "source": { "type": "string", "description": "The source of the order." }, "source_device": { "type": "string", "description": "The machine or device used when the customer placed the order." }, "source_details": { "type": "object", "properties": { "type": { "type": "string", "description": "Order Source Type" }, "value": { "type": [ "string", "null" ], "description": "Order Source Value" }, "device": { "type": "string", "description": "Order Source Device" }, "user-agent": { "type": "string", "description": "Order Source User Agent" }, "ip": { "type": "string", "description": "Order Source IP" } }, "x-apidog-orders": [ "type", "value", "device", "user-agent", "ip" ] }, "first_complete_at": { "type": [ "string", "null" ], "description": "Gets the first date of changing the order status to `completed`." }, "status": { "type": "object", "properties": { "id": { "type": "number", "description": "Status ID" }, "name": { "type": "string", "description": "Status Name" }, "slug": { "type": "string", "description": "Status Slug" }, "customized": { "type": "object", "properties": { "id": { "type": "number", "description": "Customized Status ID" }, "name": { "type": "string", "description": "Customized Status Name" } }, "x-apidog-orders": [ "id", "name" ] } }, "x-apidog-orders": [ "id", "name", "slug", "customized" ] }, "payment_method": { "type": "string", "description": "Order payment method" }, "currency": { "type": "string", "description": "Order currency" }, "amounts": { "type": "object", "properties": { "sub_total": { "type": "object", "properties": { "amount": { "type": "integer", "description": "Order sub total amount" }, "currency": { "type": "string", "description": "Order sub total currency" } }, "x-apidog-orders": [ "amount", "currency" ] }, "shipping_cost": { "type": "object", "properties": { "amount": { "type": "integer", "description": "Order shipping cost amount" }, "currency": { "type": "string", "description": "Order shipping cost amount" } }, "x-apidog-orders": [ "amount", "currency" ] }, "cash_on_delivery": { "type": "object", "properties": { "amount": { "type": "integer", "description": "Order cash on delivery cost amount" }, "currency": { "type": "string", "description": "Order cash on delivery cost curreny" } }, "x-apidog-orders": [ "amount", "currency" ] }, "tax": { "type": "object", "properties": { "percent": { "type": "string", "description": "Tax percentage value" }, "amount": { "type": "object", "properties": { "amount": { "type": "integer", "description": "Order tax amount" }, "currency": { "type": "string", "description": "Order tax amount currency" } }, "x-apidog-orders": [ "amount", "currency" ] } }, "x-apidog-orders": [ "percent", "amount" ] }, "discounts": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string", "description": "Order discounts title" }, "type": { "type": "string", "description": "Order discounts type" }, "code": { "type": "string", "description": "Order discounts code" }, "discount": { "type": "string", "description": "Order discount value" }, "discounted_shipping": { "type": "integer", "description": "Order discount shipping" } }, "x-apidog-orders": [ "title", "type", "code", "discount", "discounted_shipping" ] } }, "total": { "type": "object", "properties": { "amount": { "type": "integer", "description": "Order total cost amount." }, "currency": { "type": "string", "description": "Order total cost currency" } }, "x-apidog-orders": [ "amount", "currency" ] } }, "x-apidog-orders": [ "sub_total", "shipping_cost", "cash_on_delivery", "tax", "discounts", "total" ] }, "shipping": { "type": "object", "properties": { "id": { "type": "number", "description": "Order shipping ID" }, "app_id": { "type": [ "number", "null" ], "description": "Shipping Application ID" }, "company": { "type": "string", "description": "Order shipping company" }, "logo": { "type": "string", "description": "Shipping company logo" }, "receiver": { "type": "object", "properties": { "name": { "type": "string", "description": "Order receiver name" }, "email": { "type": "string", "description": "Order receiver details" }, "phone": { "type": "string", "description": "Order receiver phone" } }, "x-apidog-orders": [ "name", "email", "phone" ] }, "shipper": { "type": "object", "properties": { "name": { "type": "string", "description": "Order shipper name" }, "company_name": { "type": "string", "description": "Order shipper company name" }, "email": { "type": "string", "description": "Order shipper email" }, "phone": { "type": "string", "description": "Order shipper phone" } }, "x-apidog-orders": [ "name", "company_name", "email", "phone" ] }, "pickup_address": { "type": "object", "properties": { "country": { "type": "string", "description": "Order pickup address country" }, "country_code": { "type": "string", "description": "Order pickup address country code" }, "city": { "type": "string", "description": "Order pickup address city" }, "shipping_address": { "type": "string", "description": "Order pickup address shipping address" }, "street_number": { "type": "string", "description": "Order pickup address street number" }, "block": { "type": "string", "description": "Order pickup address block" }, "postal_code": { "type": "string", "description": "Order pickup address postal code" }, "geo_coordinates": { "type": "object", "properties": { "lat": { "type": "number", "description": "Pick Up address GEO coordinates latitude " }, "lng": { "type": "number", "description": "Pick Up address GEO coordinates longitude" } }, "x-apidog-orders": [ "lat", "lng" ] } }, "x-apidog-orders": [ "country", "country_code", "city", "shipping_address", "street_number", "block", "postal_code", "geo_coordinates" ] }, "address": { "type": "object", "properties": { "country": { "type": "string", "description": "Order shipping address country" }, "country_code": { "type": "string", "description": "Order shipping address country code" }, "city": { "type": "string", "description": "Order shipping address city" }, "shipping_address": { "type": "string", "description": "Order shipping address" }, "street_number": { "type": "string", "description": "Order shipping address street number" }, "block": { "type": "string", "description": "Order shipping address block" }, "postal_code": { "type": "string", "description": "Order shipping address postal code" }, "geo_coordinates": { "type": "object", "properties": { "lat": { "type": "integer", "description": "Address GEO latitude " }, "lng": { "type": "integer", "description": "Address GEO longitude" } }, "x-apidog-orders": [ "lat", "lng" ] } }, "x-apidog-orders": [ "country", "country_code", "city", "shipping_address", "street_number", "block", "postal_code", "geo_coordinates" ] }, "shipment": { "type": "object", "properties": { "id": { "type": "number", "description": "Order shipment ID" }, "pickup_id": { "type": "number", "description": "Order shipment pickup ID" }, "tracking_link": { "type": "string", "description": "Order tracking link" }, "label": { "type": "array", "items": { "type": "object", "properties": { "format": { "type": "string", "description": "Label Format" }, "url": { "type": "string", "description": "Label URL" } }, "x-apidog-orders": [ "format", "url" ] } } }, "x-apidog-orders": [ "id", "pickup_id", "tracking_link", "label" ] }, "policy_options": { "type": "array", "items": { "type": "object", "properties": { "boxes": { "type": "string", "description": "Number of boxes when generating the awb" } }, "x-apidog-orders": [ "boxes" ] } }, "shipment_reference": { "type": "integer", "examples": [ 2030962235 ] }, "branch_id": { "type": "number", "examples": [ 2094289474 ] } }, "x-apidog-orders": [ "id", "app_id", "company", "logo", "receiver", "shipper", "pickup_address", "address", "shipment", "policy_options", "shipment_reference", "branch_id" ] }, "shipments": { "type": "object", "properties": { "shipment_reference": { "type": "integer", "description": "Shipment Reference", "examples": [ 2030962235 ] }, "created_at": { "type": [ "string", "null" ], "description": "Timestamp" }, "type": { "type": "string", "description": "Shipment Type", "examples": [ "shipment" ] }, "id": { "type": "number", "description": "Shipment ID", "examples": [ "0" ] }, "tracking_number": { "type": "string", "description": "Tracking Number", "examples": [ "0" ] }, "courier_id": { "type": "number", "description": "Courier ID", "examples": [ 665151403 ] }, "courier_name": { "type": "string", "description": "Courier Name", "examples": [ "أي مكان" ] }, "courier_logo": { "type": "string", "description": "Courier Logo", "examples": [ "https://logo.com/shipping/aymakan.png" ] }, "pickup_id": { "type": [ "number", "null" ], "description": "Pickup ID" }, "trackable": { "type": "boolean", "default": true, "description": "Whether or not the shipment is trackable" }, "tracking_link": { "type": "string", "description": "Tracking Link", "examples": [ "https://aymakan.com.sa/ar/tracking/0" ] }, "label": { "type": "array", "description": "Shipment Labels", "items": { "type": "string" } }, "ship_to": { "type": "object", "properties": { "name": { "type": "string", "description": "Shipped To Name", "examples": [ "Username" ] }, "email": { "type": "string", "description": "Shipped To Email", "examples": [ "username@gmail.com" ] }, "phone": { "type": "string", "description": "Shipped To Phone", "examples": [ "9665231852655555" ] }, "country": { "type": "string", "description": "Shipped To Country Residence ", "examples": [ "SA" ] }, "country_code": { "type": "string", "description": "Shipped To Country Code", "examples": [ "SA" ] }, "city": { "type": "string", "description": "Shipped To City Residence", "examples": [ "جدة" ] }, "address_line": { "type": "string", "description": "Shipped To ", "examples": [ "شارع Makkah, Makkah، الحي NEW YORK 11434،, Makkah, Makkah,, جدة, السعودية" ] }, "street_number": { "type": "string", "description": "Shipped To Street Number", "examples": [ "Makkah, Makkah" ] }, "block": { "type": "string", "description": "Shipped To Block", "examples": [ "NEW YORK" ] }, "postal_code": { "type": "string", "description": "Shipped To Postal Code", "examples": [ "11414" ] }, "latitude": { "type": "number", "description": "Shipped To Latitude Geocoordiantes", "examples": [ 40.6413111 ] }, "longitude": { "type": "number", "description": "Shipped To Longitude Geocoordiantes", "examples": [ -73.7781391 ] } }, "x-apidog-orders": [ "name", "email", "phone", "country", "country_code", "city", "address_line", "street_number", "block", "postal_code", "latitude", "longitude" ] }, "ship_from": { "type": "object", "properties": { "name": { "type": "string", "description": "Shipped From Name ", "examples": [ "المستودع الرئيسي" ] }, "company_name": { "type": "string", "description": "Shipped From Company Name", "examples": [ "Routine" ] }, "email": { "type": "string", "description": "Shipped From Email", "examples": [ "companyuser@gmail.com" ] }, "phone": { "type": "string", "description": "Shipped From Phone", "examples": [ "9665231852655555" ] }, "country": { "type": "string", "description": "Shipped From Country", "examples": [ "السعودية" ] }, "city": { "type": "string", "description": "Shipped From City", "examples": [ "Riyadh" ] }, "address_line": { "type": "string", "description": "Shipped From ", "examples": [ "3481,السلي,62465, 3481، السلي، الرياض 14322 7487، السعودية, Riyadh,السعودية" ] }, "street_number": { "type": "string", "description": "Shipped From Street Number", "examples": [ "3481" ] }, "block": { "type": "string", "description": "Shipped From Block", "examples": [ "السلي" ] }, "postal_code": { "type": "string", "description": "Shipped From Postal Code", "examples": [ "62" ] }, "latitude": { "type": "number", "description": "Shipped From Latitude Geocoordiantes", "examples": [ 18.2952212 ] }, "longitude": { "type": "number", "description": "Shipped From Longi Geocoordiantes", "examples": [ 42.755331 ] } }, "x-apidog-orders": [ "name", "company_name", "email", "phone", "country", "city", "address_line", "street_number", "block", "postal_code", "latitude", "longitude" ] }, "total_weight": { "type": "object", "properties": { "value": { "type": "number", "description": "Total Weight Value", "examples": [ 8.052 ] }, "units": { "type": "string", "description": "Total Weight Units", "examples": [ "kg" ] } }, "x-apidog-orders": [ "value", "units" ] }, "packages": { "type": [ "array" ], "items": { "type": "object", "properties": { "weight": { "type": "object", "properties": { "value": { "type": "number", "description": "Package Total Weight Value", "examples": [ "8" ] }, "units": { "type": "string", "description": "Package Total Weight Value" } }, "x-apidog-orders": [ "value", "units" ] } }, "x-apidog-orders": [ "weight" ] } }, "is_international": { "type": "boolean", "default": false, "description": "Whether or not the shipment is International " }, "meta": { "type": "object", "properties": { "app_id": { "type": "number", "description": "App ID", "examples": [ 944213936 ] }, "branch_id": { "type": "number", "description": "Branch ID", "examples": [ 2030962235 ] }, "policy_options": { "type": "object", "properties": { "boxes": { "type": "string", "description": "Policy Options Boxes", "examples": [ "1" ] } }, "x-apidog-orders": [ "boxes" ] } }, "x-apidog-orders": [ "app_id", "branch_id", "policy_options" ] } }, "x-apidog-orders": [ "shipment_reference", "created_at", "type", "id", "tracking_number", "courier_id", "courier_name", "courier_logo", "pickup_id", "trackable", "tracking_link", "label", "ship_to", "ship_from", "total_weight", "packages", "is_international", "meta" ] }, "can_cancel": { "type": "boolean", "description": "Whether or not if the order is allowed to be cancelled by store customers.
\n`True` value should be set if the order status is in under review and in progress, as according to the store settings." }, "show_weight": { "type": "boolean", "description": "Whether or not to show weight value" }, "can_reorder": { "type": "boolean", "description": "Whether or not the order allowed to be re-order by customers" }, "is_pending_payment": { "type": "boolean", "description": "Waiting the customer to pay the order or the order status is `payment_pending`" }, "pending_payment_ends_at": { "type": "integer", "description": "Last date allowed to customer to pay the order" }, "total_weight": { "type": "string", "description": "Total weight value" }, "rating_link": { "type": [ "string", "null" ], "description": "Order Rating Link.
Note that the order has to be of either of the following statuses: `completed`, `delivered`, and `shipped`. The merchant has to allow the product to be rated from the [Store Settings](https://s.salla.sa/settings) > Rating Settings" }, "shipment_branch": { "$ref": "#/definitions/1307401" }, "customer": { "$ref": "#/definitions/1307288" }, "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "number", "description": "Order item ID" }, "product_id": { "type": "number", "description": "Order Product ID" }, "name": { "type": "string", "description": "Order item name" }, "sku": { "type": "number", "description": "Order item sku" }, "quantity": { "type": "number", "description": "Order item quantity" }, "weight": { "type": "number", "description": "Order item weight" }, "amounts": { "type": "object", "properties": { "price_without_tax": { "type": "object", "properties": { "amount": { "type": "integer", "description": "Order item amounts price without tax " }, "currency": { "type": "string", "description": "Order item amounts price without tax currency" } }, "x-apidog-orders": [ "amount", "currency" ] }, "total_discount": { "type": "object", "properties": { "amount": { "type": "integer", "description": "Order item amounts total discount amount" }, "currency": { "type": "string", "description": "Order item amounts total discount currency" } }, "x-apidog-orders": [ "amount", "currency" ] }, "tax": { "type": "object", "properties": { "percent": { "type": "string", "description": "Order item amounts tax percent" }, "amount": { "type": "object", "properties": { "amount": { "type": "integer", "description": "Order item amounts tax amount" }, "currency": { "type": "string", "description": "Order item amounts tax caurrency" } }, "x-apidog-orders": [ "amount", "currency" ] } }, "x-apidog-orders": [ "percent", "amount" ] }, "total": { "type": "object", "properties": { "amount": { "type": "integer", "description": "Order item amounts total amount" }, "currency": { "type": "string", "description": "Order item amounts total currency" } }, "x-apidog-orders": [ "amount", "currency" ] } }, "x-apidog-orders": [ "price_without_tax", "total_discount", "tax", "total" ] } }, "x-apidog-orders": [ "id", "product_id", "name", "sku", "quantity", "weight", "amounts" ] } } }, "x-apidog-orders": [ "id", "reference_id", "urls", "date", "source", "source_device", "source_details", "first_complete_at", "status", "payment_method", "currency", "amounts", "shipping", "shipments", "can_cancel", "show_weight", "can_reorder", "is_pending_payment", "pending_payment_ends_at", "total_weight", "rating_link", "shipment_branch", "customer", "items" ] } }, "x-tags": [ "Store Events Webhook Model" ], "x-apidog-orders": [ "event", "merchant", "created_at", "data" ] }