Nouq Developers

Nouq API for apps (0.2.0)

Download OpenAPI specification:

Build apps and integrations for Nouq stores: sync products and stock, pull orders into an ERP or a warehouse system, push shipments, create coupons, and get told the moment something happens.

Base URL: https://api.nouq.net (locally http://localhost:8090). Every call needs an app access token: Authorization: Bearer nouq_at_…. A token belongs to one store and one app, and carries the scopes the merchant granted. Money is always an integer in minor units (halalas for SAR).

Two ways to get a token

Private app: a merchant's own integration. In the dashboard, App store → My apps & API → A private app for your store: give it a name, tick the scopes, copy the token. It works for that store only. Rotate it from the same page if it leaks.

OAuth: an app any store can install. Register the app in the developer portal with its redirect URIs and the scopes it needs. You get a client_id and a client_secret (shown once).

  1. Send the merchant to https://app.nouq.net/oauth/authorize?client_id=…&redirect_uri=…&scope=products:read%20orders:read&state=…. redirect_uri must match one you registered exactly. scope is optional and defaults to all of the app's scopes. Use state to stop cross-site request forgery.

  2. The merchant reviews the scopes and approves. Nouq redirects to redirect_uri?code=…&state=…&store_id=….

  3. From your server, exchange the code within ten minutes:

    curl https://api.nouq.net/oauth/v1/token \
      -d grant_type=authorization_code -d code=$CODE -d redirect_uri=$REDIRECT_URI \
      -d client_id=$CLIENT_ID -d client_secret=$CLIENT_SECRET
    # {"access_token":"nouq_at_…","token_type":"bearer","scope":"products:read orders:read","store_id":"…"}
    

Tokens don't expire. They stop working when the merchant uninstalls the app, or when a new code is exchanged for the same store (each exchange revokes the previous token). Keep them server-side: they are never meant for a browser.

Installs from the Nouq app store. Once your app is listed (developer portal → your app → Store listing, then Nouq's review), merchants can install it from the app store. Those installs arrive at your redirect URI with state=nouq_marketplace, because no session of yours started them. Accept that value, then exchange the code as usual.

Scopes

Scope Allows
products:read Products, variants, stock, categories
products:write Create, edit and delete products and categories (includes read)
orders:read Orders, parcels and returns
orders:write Change order status, add shipments and notes (includes read)
customers:read Customers and their order history
discounts:read Coupons and automatic discounts
discounts:write Create, edit and delete them (includes read)

GET /api/v1/token tells you what your token can do. A call outside the token's scopes returns 403 with code insufficient_scope and names the scope it needs.

Charging for your app

Set a monthly price (and an optional free trial) on your store listing. Nouq bills the merchant each month with a VAT invoice and pays you 80%. You don't handle cards or invoices. To check whether this store pays for your app, call GET /api/v1/subscription:

{ "status": "active", "price": 4900, "trial_ends_at": null, "period_end": "2026-11-20T09:00:00Z", "payment_due": false }

status is free, trialing, active or past_due. When payment_due is true the merchant has an unpaid fee. After 7 days unpaid your token returns 401 until they pay, and then it works again. Removing the app ends the subscription.

Rate limits

Each installation has a bucket of 40 requests that refills at 4 per second. Every response carries X-RateLimit-Limit and X-RateLimit-Remaining. Over the limit, you get 429 with Retry-After in seconds. Back off and retry.

Errors

Errors are RFC 7807 problem documents with a stable code. Validation errors are 422 with a fields map. The token endpoint uses OAuth's own error format ({"error":"invalid_grant"}).

Webhooks

Subscribe with POST /api/v1/webhooks ({"url":"https://…","topics":["order.created"]}). The answer includes the signing secret (whsec_…) once; keep it.

Topic When data Scope
order.created An order is placed the order orders:read
order.updated An order's status changes the order orders:read
order.refunded A return is refunded {order, refund} orders:read
product.created / product.updated A product is saved the product products:read
product.deleted A product is deleted {id} products:read
app.uninstalled The merchant removes your app {installation_id} —

Each delivery is a POST with this body:

{ "id": "…event id…", "topic": "order.created", "store_id": "…", "created_at": "2026-10-20T09:00:00Z", "data": { } }

Headers: Nouq-Topic, Nouq-Event-Id, Nouq-Delivery-Id, Nouq-Store-Id and Nouq-Signature.

Verify every delivery. Nouq-Signature is t=<unix seconds>,v1=<hex>, where v1 is HMAC-SHA256 with your secret over <t>.<raw body>. Compute it over the exact bytes you received, before parsing the JSON. Compare in constant time, and reject a t more than five minutes old.

import { createHmac, timingSafeEqual } from "node:crypto";
function verify(secret, header, rawBody) {
  const { t, v1 } = Object.fromEntries(header.split(",").map((p) => p.split("=")));
  const want = createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
  return Math.abs(Date.now() / 1000 - Number(t)) < 300 && timingSafeEqual(Buffer.from(want), Buffer.from(v1));
}

Answer any 2xx within ten seconds; do slow work after you answer. Anything else is retried after 1 minute, 5 minutes, 30 minutes, 2, 6, 12 and 24 hours (8 attempts). A subscription whose deliveries run out of retries five times in a row is disabled; update it to turn it back on. Deliveries can arrive more than once or out of order: de-duplicate on the event id, and re-read the resource if order matters.

Event log and replay. GET /api/v1/webhook-deliveries lists the last 30 days with each attempt's status code, error and response. POST /api/v1/webhook-deliveries/{id}/replay sends the same payload again now. POST /api/v1/webhooks/{id}/test sends a webhook.test event. The developer portal has the same console across every store that installed your app.

Store

getMyStore

Scope: any app token

Authorizations:
appToken

Responses

Response Schema: application/json
phone_messages
required
boolean

Nouq can deliver WhatsApp and SMS (PHONE_CODES). False: shoppers hear by email only; don't offer or promise phone messages

id
required
string <uuid>
slug
required
string
name
required
string
description
required
string
logo_url
required
string
whatsapp_phone
required
string
currency
required
string
locale
required
string (Locale)
Enum: "ar" "en"
status
required
string
Enum: "active" "suspended" "closed"
cod_enabled
required
boolean
cod_fee
required
integer <int64> (Money)

Minor units (halalas)

vat_enabled
required
boolean
vat_rate_bp
required
integer
min_order_total
required
integer <int64> (Money)

The least the store takes an order for: products after offers and discounts, before rewards and shipping (0: no minimum)

recovery_enabled
required
boolean
recovery_delay_minutes
required
integer
recovery_discount_code
required
string
required
Array of objects (Domain)
created_at
required
string <date-time>

Response samples

Content type
application/json
{
  • "phone_messages": true,
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "slug": "string",
  • "name": "string",
  • "description": "string",
  • "logo_url": "string",
  • "whatsapp_phone": "string",
  • "currency": "string",
  • "locale": "ar",
  • "status": "active",
  • "cod_enabled": true,
  • "cod_fee": 0,
  • "vat_enabled": true,
  • "vat_rate_bp": 0,
  • "min_order_total": 0,
  • "recovery_enabled": true,
  • "recovery_delay_minutes": 0,
  • "recovery_discount_code": "string",
  • "domains": [
    • {
      }
    ],
  • "created_at": "2019-08-24T14:15:22Z"
}

Whether this store pays for your app

Scope: any app token

Free apps get {status: free}. When payment_due is true the merchant has an unpaid fee; after a 7-day grace your token stops working until it is paid.

Authorizations:
appToken

Responses

Response Schema: application/json
status
required
string
Enum: "free" "trialing" "active" "past_due"
price
integer <int64> (Money)

Minor units (halalas)

trial_ends_at
string or null <date-time>
period_end
string or null <date-time>
payment_due
boolean

The merchant has an unpaid fee for this app

Response samples

Content type
application/json
{
  • "status": "free",
  • "price": 0,
  • "trial_ends_at": "2019-08-24T14:15:22Z",
  • "period_end": "2019-08-24T14:15:22Z",
  • "payment_due": true
}

What this token can do

Scope: any app token

Authorizations:
appToken

Responses

Response Schema: application/json
store_id
required
string <uuid>
installation_id
required
string <uuid>
app_id
required
string <uuid>
scopes
required
Array of strings

Response samples

Content type
application/json
{
  • "store_id": "7fe87115-950c-4ae8-bd7e-970406bc9ac0",
  • "installation_id": "91166175-c6a9-4caf-88e9-3147ffc9c934",
  • "app_id": "affd1d10-9538-4fc8-9e0b-4594a28c1335",
  • "scopes": [
    • "string"
    ]
}

Products

merchantCategories

Scope: products:read

Authorizations:
appToken

Responses

Response Schema: application/json
Array
id
required
string <uuid>
slug
required
string
name_ar
required
string
name_en
required
string
position
required
integer
product_count
required
integer
description_ar
required
string

Intro text shown above the category's products

description_en
required
string
required
object (SearchSnippet)

What a product or category shows in Google. Empty fields fall back to the title and description.

updated_at
required
string <date-time>

Response samples

Content type
application/json
[
  • {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "slug": "string",
    • "name_ar": "string",
    • "name_en": "string",
    • "position": 0,
    • "product_count": 0,
    • "description_ar": "string",
    • "description_en": "string",
    • "seo": {
      },
    • "updated_at": "2019-08-24T14:15:22Z"
    }
]

createCategory

Scope: products:write

Authorizations:
appToken
Request Body schema: application/json
required
slug
string
name_ar
required
string
name_en
string
position
integer
description_ar
string <= 2000 characters

Omit to keep the stored text

description_en
string <= 2000 characters
object (SearchSnippet)

Omit to keep the stored snippet

Responses

Response Schema: application/json
id
required
string <uuid>
slug
required
string
name_ar
required
string
name_en
required
string
position
required
integer
product_count
required
integer
description_ar
required
string

Intro text shown above the category's products

description_en
required
string
required
object (SearchSnippet)

What a product or category shows in Google. Empty fields fall back to the title and description.

updated_at
required
string <date-time>

Request samples

Content type
application/json
{
  • "slug": "string",
  • "name_ar": "string",
  • "name_en": "string",
  • "position": 0,
  • "description_ar": "string",
  • "description_en": "string",
  • "seo": {
    • "title": "string",
    • "description": "string"
    }
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "slug": "string",
  • "name_ar": "string",
  • "name_en": "string",
  • "position": 0,
  • "product_count": 0,
  • "description_ar": "string",
  • "description_en": "string",
  • "seo": {
    • "title": "string",
    • "description": "string"
    },
  • "updated_at": "2019-08-24T14:15:22Z"
}

updateCategory

Scope: products:write

Authorizations:
appToken
path Parameters
id
required
string <uuid>
Request Body schema: application/json
required
slug
string
name_ar
required
string
name_en
string
position
integer
description_ar
string <= 2000 characters

Omit to keep the stored text

description_en
string <= 2000 characters
object (SearchSnippet)

Omit to keep the stored snippet

Responses

Response Schema: application/json
id
required
string <uuid>
slug
required
string
name_ar
required
string
name_en
required
string
position
required
integer
product_count
required
integer
description_ar
required
string

Intro text shown above the category's products

description_en
required
string
required
object (SearchSnippet)

What a product or category shows in Google. Empty fields fall back to the title and description.

updated_at
required
string <date-time>

Request samples

Content type
application/json
{
  • "slug": "string",
  • "name_ar": "string",
  • "name_en": "string",
  • "position": 0,
  • "description_ar": "string",
  • "description_en": "string",
  • "seo": {
    • "title": "string",
    • "description": "string"
    }
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "slug": "string",
  • "name_ar": "string",
  • "name_en": "string",
  • "position": 0,
  • "product_count": 0,
  • "description_ar": "string",
  • "description_en": "string",
  • "seo": {
    • "title": "string",
    • "description": "string"
    },
  • "updated_at": "2019-08-24T14:15:22Z"
}

deleteCategory

Scope: products:write

Authorizations:
appToken
path Parameters
id
required
string <uuid>

Responses

Response samples

Content type
application/problem+json
{
  • "type": "string",
  • "title": "string",
  • "status": 0,
  • "detail": "string",
  • "code": "string",
  • "fields": {
    • "property1": "string",
    • "property2": "string"
    }
}

merchantProducts

Scope: products:read

Authorizations:
appToken
query Parameters
status
string
Enum: "draft" "active" "archived"
category
string
q
string
page
integer >= 1
per_page
integer [ 1 .. 100 ]

Responses

Response Schema: application/json
required
Array of objects (ProductSummary)
total
required
integer
page
required
integer
per_page
required
integer

Response samples

Content type
application/json
{
  • "items": [
    • {
      }
    ],
  • "total": 0,
  • "page": 0,
  • "per_page": 0
}

createProduct

Scope: products:write

Authorizations:
appToken
Request Body schema: application/json
required
slug
string
title_ar
required
string
title_en
string
description_ar
string
description_en
string
status
required
string
Enum: "draft" "active" "archived"
featured
boolean
required
Array of objects (Option)
required
Array of objects (VariantInput)
images
required
Array of strings
category_ids
required
Array of strings <uuid> [ items <uuid > ]
object (SearchSnippet)

Omit to keep the stored snippet

free_shipping
boolean

Omit to keep what's stored

object (ProductPageSettings)

Omit to keep what's stored

Responses

Response Schema: application/json
id
required
string <uuid>
slug
required
string
title_ar
required
string
title_en
required
string
description_ar
required
string
description_en
required
string
status
required
string
Enum: "draft" "active" "archived"
featured
required
boolean
required
Array of objects (Option)
required
Array of objects (Variant)
images
required
Array of strings
category_ids
required
Array of strings <uuid> [ items <uuid > ]
required
object (SearchSnippet)

What a product or category shows in Google. Empty fields fall back to the title and description.

free_shipping
required
boolean

This product ships free. An order ships free when every line in it does

required
object (ProductPageSettings)

How this product's page sells, for products sold from an ad. All off: the store's normal product page.

created_at
required
string <date-time>
updated_at
required
string <date-time>

Request samples

Content type
application/json
{
  • "slug": "string",
  • "title_ar": "string",
  • "title_en": "string",
  • "description_ar": "string",
  • "description_en": "string",
  • "status": "draft",
  • "featured": true,
  • "options": [
    • {
      }
    ],
  • "variants": [
    • {
      }
    ],
  • "images": [
    • "string"
    ],
  • "category_ids": [
    • "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ],
  • "seo": {
    • "title": "string",
    • "description": "string"
    },
  • "free_shipping": true,
  • "page": {
    • "buy_now": true,
    • "button_label": "string",
    • "order_form": "",
    • "hide_chrome": true,
    • "hide_related": true,
    • "sticky_bar": "",
    • "hide_reviews": true
    }
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "slug": "string",
  • "title_ar": "string",
  • "title_en": "string",
  • "description_ar": "string",
  • "description_en": "string",
  • "status": "draft",
  • "featured": true,
  • "options": [
    • {
      }
    ],
  • "variants": [
    • {
      }
    ],
  • "images": [
    • "string"
    ],
  • "category_ids": [
    • "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ],
  • "seo": {
    • "title": "string",
    • "description": "string"
    },
  • "free_shipping": true,
  • "page": {
    • "buy_now": true,
    • "button_label": "string",
    • "order_form": "",
    • "hide_chrome": true,
    • "hide_related": true,
    • "sticky_bar": "",
    • "hide_reviews": true
    },
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

merchantProduct

Scope: products:read

Authorizations:
appToken
path Parameters
id
required
string <uuid>

Responses

Response Schema: application/json
id
required
string <uuid>
slug
required
string
title_ar
required
string
title_en
required
string
description_ar
required
string
description_en
required
string
status
required
string
Enum: "draft" "active" "archived"
featured
required
boolean
required
Array of objects (Option)
required
Array of objects (Variant)
images
required
Array of strings
category_ids
required
Array of strings <uuid> [ items <uuid > ]
required
object (SearchSnippet)

What a product or category shows in Google. Empty fields fall back to the title and description.

free_shipping
required
boolean

This product ships free. An order ships free when every line in it does

required
object (ProductPageSettings)

How this product's page sells, for products sold from an ad. All off: the store's normal product page.

created_at
required
string <date-time>
updated_at
required
string <date-time>

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "slug": "string",
  • "title_ar": "string",
  • "title_en": "string",
  • "description_ar": "string",
  • "description_en": "string",
  • "status": "draft",
  • "featured": true,
  • "options": [
    • {
      }
    ],
  • "variants": [
    • {
      }
    ],
  • "images": [
    • "string"
    ],
  • "category_ids": [
    • "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ],
  • "seo": {
    • "title": "string",
    • "description": "string"
    },
  • "free_shipping": true,
  • "page": {
    • "buy_now": true,
    • "button_label": "string",
    • "order_form": "",
    • "hide_chrome": true,
    • "hide_related": true,
    • "sticky_bar": "",
    • "hide_reviews": true
    },
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

updateProduct

Scope: products:write

Authorizations:
appToken
path Parameters
id
required
string <uuid>
Request Body schema: application/json
required
slug
string
title_ar
required
string
title_en
string
description_ar
string
description_en
string
status
required
string
Enum: "draft" "active" "archived"
featured
boolean
required
Array of objects (Option)
required
Array of objects (VariantInput)
images
required
Array of strings
category_ids
required
Array of strings <uuid> [ items <uuid > ]
object (SearchSnippet)

Omit to keep the stored snippet

free_shipping
boolean

Omit to keep what's stored

object (ProductPageSettings)

Omit to keep what's stored

Responses

Response Schema: application/json
id
required
string <uuid>
slug
required
string
title_ar
required
string
title_en
required
string
description_ar
required
string
description_en
required
string
status
required
string
Enum: "draft" "active" "archived"
featured
required
boolean
required
Array of objects (Option)
required
Array of objects (Variant)
images
required
Array of strings
category_ids
required
Array of strings <uuid> [ items <uuid > ]
required
object (SearchSnippet)

What a product or category shows in Google. Empty fields fall back to the title and description.

free_shipping
required
boolean

This product ships free. An order ships free when every line in it does

required
object (ProductPageSettings)

How this product's page sells, for products sold from an ad. All off: the store's normal product page.

created_at
required
string <date-time>
updated_at
required
string <date-time>

Request samples

Content type
application/json
{
  • "slug": "string",
  • "title_ar": "string",
  • "title_en": "string",
  • "description_ar": "string",
  • "description_en": "string",
  • "status": "draft",
  • "featured": true,
  • "options": [
    • {
      }
    ],
  • "variants": [
    • {
      }
    ],
  • "images": [
    • "string"
    ],
  • "category_ids": [
    • "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ],
  • "seo": {
    • "title": "string",
    • "description": "string"
    },
  • "free_shipping": true,
  • "page": {
    • "buy_now": true,
    • "button_label": "string",
    • "order_form": "",
    • "hide_chrome": true,
    • "hide_related": true,
    • "sticky_bar": "",
    • "hide_reviews": true
    }
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "slug": "string",
  • "title_ar": "string",
  • "title_en": "string",
  • "description_ar": "string",
  • "description_en": "string",
  • "status": "draft",
  • "featured": true,
  • "options": [
    • {
      }
    ],
  • "variants": [
    • {
      }
    ],
  • "images": [
    • "string"
    ],
  • "category_ids": [
    • "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ],
  • "seo": {
    • "title": "string",
    • "description": "string"
    },
  • "free_shipping": true,
  • "page": {
    • "buy_now": true,
    • "button_label": "string",
    • "order_form": "",
    • "hide_chrome": true,
    • "hide_related": true,
    • "sticky_bar": "",
    • "hide_reviews": true
    },
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

deleteProduct

Scope: products:write

Authorizations:
appToken
path Parameters
id
required
string <uuid>

Responses

Response samples

Content type
application/problem+json
{
  • "type": "string",
  • "title": "string",
  • "status": 0,
  • "detail": "string",
  • "code": "string",
  • "fields": {
    • "property1": "string",
    • "property2": "string"
    }
}

Orders

merchantOrders

Scope: orders:read

Authorizations:
appToken
query Parameters
status
string (OrderStatus)
Enum: "pending_confirmation" "pending_payment" "confirmed" "processing" "shipped" "delivered" "cancelled"
q
string
from
string <date>

Placed on or after this day (the store's time zone)

to
string <date>

Placed on or before this day (the store's time zone)

page
integer >= 1
per_page
integer [ 1 .. 100 ]

Responses

Response Schema: application/json
required
Array of objects (OrderSummary)
total
required
integer
page
required
integer
per_page
required
integer

Response samples

Content type
application/json
{
  • "items": [
    • {
      }
    ],
  • "total": 0,
  • "page": 0,
  • "per_page": 0
}

merchantOrder

Scope: orders:read

Authorizations:
appToken
path Parameters
id
required
string <uuid>

Responses

Response Schema: application/json
id
required
string <uuid>
number
required
integer
token
required
string
status
required
string (OrderStatus)
Enum: "pending_confirmation" "pending_payment" "confirmed" "processing" "shipped" "delivered" "cancelled"
payment_method
required
string (PaymentMethod)
Enum: "cod" "card" "stc_pay" "tabby" "tamara" "bank_transfer" "net_terms" "exchange"

exchange = zero-cost replacement order from a return; net_terms = a business account's credit terms (pay later)

payment_status
required
string
Enum: "unpaid" "deposit_paid" "paid" "refunded"
currency
required
string
subtotal
required
integer <int64> (Money)

Minor units (halalas)

shipping_total
required
integer <int64> (Money)

Minor units (halalas)

cod_fee
required
integer <int64> (Money)

Minor units (halalas)

discount_total
required
integer <int64> (Money)

Minor units (halalas)

discount_code
required
string
recovered_from_cart
required
boolean
vat_total
required
integer <int64> (Money)

Minor units (halalas)

total
required
integer <int64> (Money)

Minor units (halalas)

refunded_total
required
integer <int64> (Money)

Minor units (halalas)

deposit_amount
required
integer <int64> (Money)

Partial COD: paid online before shipping; the rest on delivery

via_passport
required
boolean

Placed with a Nouq Passport (verified phone)

loyalty_points
required
integer

Points spent on the order

loyalty_amount
required
integer <int64> (Money)

What the points took off (also in discount_total)

referral_amount
required
integer <int64> (Money)

Friend-referral discount (also in discount_total)

offer_total
required
integer <int64> (Money)

A landing page's quantity offer (also in discount_total)

upsell_total
required
integer <int64> (Money)

What cross-sell and post-purchase offers took off (also in discount_total)

landing_page_id
required
string or null <uuid>

The landing page the order came from

phone_whatsapp
required
boolean or null

Whether the shopper said their number is on WhatsApp (null: not asked)

parent_order_id
required
string or null <uuid>

The order this one ships with: an after-order offer accepted on a paid card order becomes its own small order, paid on its own

required
object (Customer)
required
object (Address)
shipping_method
required
string
note
required
string
required
Array of objects (FieldAnswer)

Answers to the store's checkout questions

payment_discount
required
integer <int64> (Money)

What paying this way took off (also in discount_total)

bank_offer
required
string

The bank whose card offer the order took (its amount is in payment_discount)

card_prefix
required
string

First 6 digits the shopper gave for that offer

paid_card_prefix
required
string

First 6 digits of the card the gateway reports paid (empty: not reported yet)

bank_offer_mismatch
required
boolean

The card that paid isn't in the offer

cod_confirmed_at
required
string or null <date-time>
cod_reminders
required
integer

Confirmation reminders sent (COD)

cod_expires_at
required
string or null <date-time>

When an unconfirmed COD order cancels itself

address_confirmed_at
required
string or null <date-time>
delivery_window
required
string
Enum: "" "morning" "afternoon" "evening"
required
Array of objects (OrderItem)
required
Array of objects (Shipment)
created_at
required
string <date-time>
updated_at
required
string <date-time>
Array of objects (OrderEvent)

Merchant view only

next_actions
Array of strings (OrderStatus)
Items Enum: "pending_confirmation" "pending_payment" "confirmed" "processing" "shipped" "delivered" "cancelled"

Merchant view only

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "number": 0,
  • "token": "string",
  • "status": "pending_confirmation",
  • "payment_method": "cod",
  • "payment_status": "unpaid",
  • "currency": "string",
  • "subtotal": 0,
  • "shipping_total": 0,
  • "cod_fee": 0,
  • "discount_total": 0,
  • "discount_code": "string",
  • "recovered_from_cart": true,
  • "vat_total": 0,
  • "total": 0,
  • "refunded_total": 0,
  • "deposit_amount": 0,
  • "via_passport": true,
  • "loyalty_points": 0,
  • "loyalty_amount": 0,
  • "referral_amount": 0,
  • "offer_total": 0,
  • "upsell_total": 0,
  • "landing_page_id": "414a5bce-f320-4a62-9fa5-1a44e5cc334f",
  • "phone_whatsapp": true,
  • "parent_order_id": "aca22822-0c4a-4277-bcc3-199a8417c244",
  • "customer": {
    • "name": "string",
    • "phone": "string",
    • "email": "string"
    },
  • "address": {
    • "city": "string",
    • "district": "string",
    • "street": "string",
    • "building_number": "string",
    • "additional_number": "string",
    • "postal_code": "string",
    • "short_address": "string",
    • "floor": "string",
    • "apartment": "string",
    • "landmark": "string",
    • "lat": 0,
    • "lng": 0,
    • "notes": "string"
    },
  • "shipping_method": "string",
  • "note": "string",
  • "custom_fields": [
    • {
      }
    ],
  • "payment_discount": 0,
  • "bank_offer": "string",
  • "card_prefix": "string",
  • "paid_card_prefix": "string",
  • "bank_offer_mismatch": true,
  • "cod_confirmed_at": "2019-08-24T14:15:22Z",
  • "cod_reminders": 0,
  • "cod_expires_at": "2019-08-24T14:15:22Z",
  • "address_confirmed_at": "2019-08-24T14:15:22Z",
  • "delivery_window": "",
  • "items": [
    • {
      }
    ],
  • "shipments": [
    • {
      }
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "events": [
    • {
      }
    ],
  • "next_actions": [
    • "pending_confirmation"
    ]
}

addOrderNote

Scope: orders:write

Authorizations:
appToken
path Parameters
id
required
string <uuid>
Request Body schema: application/json
required
note
required
string

Responses

Request samples

Content type
application/json
{
  • "note": "string"
}

Response samples

Content type
application/problem+json
{
  • "type": "string",
  • "title": "string",
  • "status": 0,
  • "detail": "string",
  • "code": "string",
  • "fields": {
    • "property1": "string",
    • "property2": "string"
    }
}

orderParcels

Scope: orders:read

Authorizations:
appToken
path Parameters
id
required
string <uuid>

Responses

Response Schema: application/json
Array
id
required
string <uuid>
order_id
required
string <uuid>
carrier
required
string
carrier_name
required
string
sandbox
required
boolean
tracking_number
required
string
track_url
required
string
status
required
string (ParcelStatus)
Enum: "label_created" "picked_up" "in_transit" "out_for_delivery" "delivered" "failed_attempt" "returned" "cancelled"
weight_grams
required
integer
cost
required
integer <int64> (Money)

Minor units (halalas)

cod_amount
required
integer <int64> (Money)

Minor units (halalas)

mode
required
string (CarrierMode)
Enum: "own" "nouq"

own: the merchant's carrier contract; nouq: Nouq Shipping (Nouq's contract, paid from the shipping balance, ADR 0020)

currency
required
string
retail
required
integer <int64> (Money)

Walk-in rate the Nouq price compares with (nouq mode)

cod_fee
required
integer <int64> (Money)

Charged for collecting the cash (nouq mode)

object (ParcelLabel)
pickup_ref
required
string
pickup_at
required
string or null <date-time>
required
Array of objects (ParcelEvent)
delivered_at
required
string or null <date-time>
created_at
required
string <date-time>

Response samples

Content type
application/json
[
  • {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe",
    • "carrier": "string",
    • "carrier_name": "string",
    • "sandbox": true,
    • "tracking_number": "string",
    • "track_url": "string",
    • "status": "label_created",
    • "weight_grams": 0,
    • "cost": 0,
    • "cod_amount": 0,
    • "mode": "own",
    • "currency": "string",
    • "retail": 0,
    • "cod_fee": 0,
    • "label": {
      },
    • "pickup_ref": "string",
    • "pickup_at": "2019-08-24T14:15:22Z",
    • "events": [
      ],
    • "delivered_at": "2019-08-24T14:15:22Z",
    • "created_at": "2019-08-24T14:15:22Z"
    }
]

merchantOrderReturns

Scope: orders:read

Authorizations:
appToken
path Parameters
id
required
string <uuid>

Responses

Response Schema: application/json
Array
id
required
string <uuid>
number
required
integer
order_id
required
string <uuid>
order_number
required
integer
status
required
string (ReturnStatus)
Enum: "requested" "approved" "rejected" "received" "refunded" "exchanged"
resolution
required
string (ReturnResolution)
Enum: "refund" "exchange"
reason
required
string (ReturnReason)
Enum: "wrong_size" "damaged" "not_as_described" "wrong_item" "changed_mind" "other"
note
required
string
photos
required
Array of strings
merchant_note
required
string
restocked
required
boolean
refund_amount
required
integer <int64>
refund_method
required
string

card | manual

suggested_refund
required
integer <int64>

Items' value after the order's discount

max_refund
required
integer <int64>

What's left to refund on the order

exchange_order_id
required
string or null <uuid>
price_difference
integer <int64>

Exchange only: positive = the shopper pays it, negative = refunded to them

payment_method
required
string
customer_name
required
string
customer_phone
required
string
currency
required
string
required
Array of objects (ReturnItem)
created_at
required
string <date-time>
updated_at
required
string <date-time>

Response samples

Content type
application/json
[
  • {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "number": 0,
    • "order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe",
    • "order_number": 0,
    • "status": "requested",
    • "resolution": "refund",
    • "reason": "wrong_size",
    • "note": "string",
    • "photos": [
      ],
    • "merchant_note": "string",
    • "restocked": true,
    • "refund_amount": 0,
    • "refund_method": "string",
    • "suggested_refund": 0,
    • "max_refund": 0,
    • "exchange_order_id": "fada7d0f-ca50-498f-8ea8-24ba1cc005e1",
    • "price_difference": 0,
    • "payment_method": "string",
    • "customer_name": "string",
    • "customer_phone": "string",
    • "currency": "string",
    • "items": [
      ],
    • "created_at": "2019-08-24T14:15:22Z",
    • "updated_at": "2019-08-24T14:15:22Z"
    }
]

addShipment

Scope: orders:write

Authorizations:
appToken
path Parameters
id
required
string <uuid>
Request Body schema: application/json
required
carrier
required
string
tracking_number
string

Responses

Response Schema: application/json
id
required
string <uuid>
number
required
integer
token
required
string
status
required
string (OrderStatus)
Enum: "pending_confirmation" "pending_payment" "confirmed" "processing" "shipped" "delivered" "cancelled"
payment_method
required
string (PaymentMethod)
Enum: "cod" "card" "stc_pay" "tabby" "tamara" "bank_transfer" "net_terms" "exchange"

exchange = zero-cost replacement order from a return; net_terms = a business account's credit terms (pay later)

payment_status
required
string
Enum: "unpaid" "deposit_paid" "paid" "refunded"
currency
required
string
subtotal
required
integer <int64> (Money)

Minor units (halalas)

shipping_total
required
integer <int64> (Money)

Minor units (halalas)

cod_fee
required
integer <int64> (Money)

Minor units (halalas)

discount_total
required
integer <int64> (Money)

Minor units (halalas)

discount_code
required
string
recovered_from_cart
required
boolean
vat_total
required
integer <int64> (Money)

Minor units (halalas)

total
required
integer <int64> (Money)

Minor units (halalas)

refunded_total
required
integer <int64> (Money)

Minor units (halalas)

deposit_amount
required
integer <int64> (Money)

Partial COD: paid online before shipping; the rest on delivery

via_passport
required
boolean

Placed with a Nouq Passport (verified phone)

loyalty_points
required
integer

Points spent on the order

loyalty_amount
required
integer <int64> (Money)

What the points took off (also in discount_total)

referral_amount
required
integer <int64> (Money)

Friend-referral discount (also in discount_total)

offer_total
required
integer <int64> (Money)

A landing page's quantity offer (also in discount_total)

upsell_total
required
integer <int64> (Money)

What cross-sell and post-purchase offers took off (also in discount_total)

landing_page_id
required
string or null <uuid>

The landing page the order came from

phone_whatsapp
required
boolean or null

Whether the shopper said their number is on WhatsApp (null: not asked)

parent_order_id
required
string or null <uuid>

The order this one ships with: an after-order offer accepted on a paid card order becomes its own small order, paid on its own

required
object (Customer)
required
object (Address)
shipping_method
required
string
note
required
string
required
Array of objects (FieldAnswer)

Answers to the store's checkout questions

payment_discount
required
integer <int64> (Money)

What paying this way took off (also in discount_total)

bank_offer
required
string

The bank whose card offer the order took (its amount is in payment_discount)

card_prefix
required
string

First 6 digits the shopper gave for that offer

paid_card_prefix
required
string

First 6 digits of the card the gateway reports paid (empty: not reported yet)

bank_offer_mismatch
required
boolean

The card that paid isn't in the offer

cod_confirmed_at
required
string or null <date-time>
cod_reminders
required
integer

Confirmation reminders sent (COD)

cod_expires_at
required
string or null <date-time>

When an unconfirmed COD order cancels itself

address_confirmed_at
required
string or null <date-time>
delivery_window
required
string
Enum: "" "morning" "afternoon" "evening"
required
Array of objects (OrderItem)
required
Array of objects (Shipment)
created_at
required
string <date-time>
updated_at
required
string <date-time>
Array of objects (OrderEvent)

Merchant view only

next_actions
Array of strings (OrderStatus)
Items Enum: "pending_confirmation" "pending_payment" "confirmed" "processing" "shipped" "delivered" "cancelled"

Merchant view only

Request samples

Content type
application/json
{
  • "carrier": "string",
  • "tracking_number": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "number": 0,
  • "token": "string",
  • "status": "pending_confirmation",
  • "payment_method": "cod",
  • "payment_status": "unpaid",
  • "currency": "string",
  • "subtotal": 0,
  • "shipping_total": 0,
  • "cod_fee": 0,
  • "discount_total": 0,
  • "discount_code": "string",
  • "recovered_from_cart": true,
  • "vat_total": 0,
  • "total": 0,
  • "refunded_total": 0,
  • "deposit_amount": 0,
  • "via_passport": true,
  • "loyalty_points": 0,
  • "loyalty_amount": 0,
  • "referral_amount": 0,
  • "offer_total": 0,
  • "upsell_total": 0,
  • "landing_page_id": "414a5bce-f320-4a62-9fa5-1a44e5cc334f",
  • "phone_whatsapp": true,
  • "parent_order_id": "aca22822-0c4a-4277-bcc3-199a8417c244",
  • "customer": {
    • "name": "string",
    • "phone": "string",
    • "email": "string"
    },
  • "address": {
    • "city": "string",
    • "district": "string",
    • "street": "string",
    • "building_number": "string",
    • "additional_number": "string",
    • "postal_code": "string",
    • "short_address": "string",
    • "floor": "string",
    • "apartment": "string",
    • "landmark": "string",
    • "lat": 0,
    • "lng": 0,
    • "notes": "string"
    },
  • "shipping_method": "string",
  • "note": "string",
  • "custom_fields": [
    • {
      }
    ],
  • "payment_discount": 0,
  • "bank_offer": "string",
  • "card_prefix": "string",
  • "paid_card_prefix": "string",
  • "bank_offer_mismatch": true,
  • "cod_confirmed_at": "2019-08-24T14:15:22Z",
  • "cod_reminders": 0,
  • "cod_expires_at": "2019-08-24T14:15:22Z",
  • "address_confirmed_at": "2019-08-24T14:15:22Z",
  • "delivery_window": "",
  • "items": [
    • {
      }
    ],
  • "shipments": [
    • {
      }
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "events": [
    • {
      }
    ],
  • "next_actions": [
    • "pending_confirmation"
    ]
}

changeOrderStatus

Scope: orders:write

Authorizations:
appToken
path Parameters
id
required
string <uuid>
Request Body schema: application/json
required
status
required
string (OrderStatus)
Enum: "pending_confirmation" "pending_payment" "confirmed" "processing" "shipped" "delivered" "cancelled"
note
string

Responses

Response Schema: application/json
id
required
string <uuid>
number
required
integer
token
required
string
status
required
string (OrderStatus)
Enum: "pending_confirmation" "pending_payment" "confirmed" "processing" "shipped" "delivered" "cancelled"
payment_method
required
string (PaymentMethod)
Enum: "cod" "card" "stc_pay" "tabby" "tamara" "bank_transfer" "net_terms" "exchange"

exchange = zero-cost replacement order from a return; net_terms = a business account's credit terms (pay later)

payment_status
required
string
Enum: "unpaid" "deposit_paid" "paid" "refunded"
currency
required
string
subtotal
required
integer <int64> (Money)

Minor units (halalas)

shipping_total
required
integer <int64> (Money)

Minor units (halalas)

cod_fee
required
integer <int64> (Money)

Minor units (halalas)

discount_total
required
integer <int64> (Money)

Minor units (halalas)

discount_code
required
string
recovered_from_cart
required
boolean
vat_total
required
integer <int64> (Money)

Minor units (halalas)

total
required
integer <int64> (Money)

Minor units (halalas)

refunded_total
required
integer <int64> (Money)

Minor units (halalas)

deposit_amount
required
integer <int64> (Money)

Partial COD: paid online before shipping; the rest on delivery

via_passport
required
boolean

Placed with a Nouq Passport (verified phone)

loyalty_points
required
integer

Points spent on the order

loyalty_amount
required
integer <int64> (Money)

What the points took off (also in discount_total)

referral_amount
required
integer <int64> (Money)

Friend-referral discount (also in discount_total)

offer_total
required
integer <int64> (Money)

A landing page's quantity offer (also in discount_total)

upsell_total
required
integer <int64> (Money)

What cross-sell and post-purchase offers took off (also in discount_total)

landing_page_id
required
string or null <uuid>

The landing page the order came from

phone_whatsapp
required
boolean or null

Whether the shopper said their number is on WhatsApp (null: not asked)

parent_order_id
required
string or null <uuid>

The order this one ships with: an after-order offer accepted on a paid card order becomes its own small order, paid on its own

required
object (Customer)
required
object (Address)
shipping_method
required
string
note
required
string
required
Array of objects (FieldAnswer)

Answers to the store's checkout questions

payment_discount
required
integer <int64> (Money)

What paying this way took off (also in discount_total)

bank_offer
required
string

The bank whose card offer the order took (its amount is in payment_discount)

card_prefix
required
string

First 6 digits the shopper gave for that offer

paid_card_prefix
required
string

First 6 digits of the card the gateway reports paid (empty: not reported yet)

bank_offer_mismatch
required
boolean

The card that paid isn't in the offer

cod_confirmed_at
required
string or null <date-time>
cod_reminders
required
integer

Confirmation reminders sent (COD)

cod_expires_at
required
string or null <date-time>

When an unconfirmed COD order cancels itself

address_confirmed_at
required
string or null <date-time>
delivery_window
required
string
Enum: "" "morning" "afternoon" "evening"
required
Array of objects (OrderItem)
required
Array of objects (Shipment)
created_at
required
string <date-time>
updated_at
required
string <date-time>
Array of objects (OrderEvent)

Merchant view only

next_actions
Array of strings (OrderStatus)
Items Enum: "pending_confirmation" "pending_payment" "confirmed" "processing" "shipped" "delivered" "cancelled"

Merchant view only

Request samples

Content type
application/json
{
  • "status": "pending_confirmation",
  • "note": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "number": 0,
  • "token": "string",
  • "status": "pending_confirmation",
  • "payment_method": "cod",
  • "payment_status": "unpaid",
  • "currency": "string",
  • "subtotal": 0,
  • "shipping_total": 0,
  • "cod_fee": 0,
  • "discount_total": 0,
  • "discount_code": "string",
  • "recovered_from_cart": true,
  • "vat_total": 0,
  • "total": 0,
  • "refunded_total": 0,
  • "deposit_amount": 0,
  • "via_passport": true,
  • "loyalty_points": 0,
  • "loyalty_amount": 0,
  • "referral_amount": 0,
  • "offer_total": 0,
  • "upsell_total": 0,
  • "landing_page_id": "414a5bce-f320-4a62-9fa5-1a44e5cc334f",
  • "phone_whatsapp": true,
  • "parent_order_id": "aca22822-0c4a-4277-bcc3-199a8417c244",
  • "customer": {
    • "name": "string",
    • "phone": "string",
    • "email": "string"
    },
  • "address": {
    • "city": "string",
    • "district": "string",
    • "street": "string",
    • "building_number": "string",
    • "additional_number": "string",
    • "postal_code": "string",
    • "short_address": "string",
    • "floor": "string",
    • "apartment": "string",
    • "landmark": "string",
    • "lat": 0,
    • "lng": 0,
    • "notes": "string"
    },
  • "shipping_method": "string",
  • "note": "string",
  • "custom_fields": [
    • {
      }
    ],
  • "payment_discount": 0,
  • "bank_offer": "string",
  • "card_prefix": "string",
  • "paid_card_prefix": "string",
  • "bank_offer_mismatch": true,
  • "cod_confirmed_at": "2019-08-24T14:15:22Z",
  • "cod_reminders": 0,
  • "cod_expires_at": "2019-08-24T14:15:22Z",
  • "address_confirmed_at": "2019-08-24T14:15:22Z",
  • "delivery_window": "",
  • "items": [
    • {
      }
    ],
  • "shipments": [
    • {
      }
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "events": [
    • {
      }
    ],
  • "next_actions": [
    • "pending_confirmation"
    ]
}

getParcel

Scope: orders:read

Authorizations:
appToken
path Parameters
id
required
string <uuid>

Responses

Response Schema: application/json
id
required
string <uuid>
order_id
required
string <uuid>
carrier
required
string
carrier_name
required
string
sandbox
required
boolean
tracking_number
required
string
track_url
required
string
status
required
string (ParcelStatus)
Enum: "label_created" "picked_up" "in_transit" "out_for_delivery" "delivered" "failed_attempt" "returned" "cancelled"
weight_grams
required
integer
cost
required
integer <int64> (Money)

Minor units (halalas)

cod_amount
required
integer <int64> (Money)

Minor units (halalas)

mode
required
string (CarrierMode)
Enum: "own" "nouq"

own: the merchant's carrier contract; nouq: Nouq Shipping (Nouq's contract, paid from the shipping balance, ADR 0020)

currency
required
string
retail
required
integer <int64> (Money)

Walk-in rate the Nouq price compares with (nouq mode)

cod_fee
required
integer <int64> (Money)

Charged for collecting the cash (nouq mode)

object (ParcelLabel)
pickup_ref
required
string
pickup_at
required
string or null <date-time>
required
Array of objects (ParcelEvent)
delivered_at
required
string or null <date-time>
created_at
required
string <date-time>

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe",
  • "carrier": "string",
  • "carrier_name": "string",
  • "sandbox": true,
  • "tracking_number": "string",
  • "track_url": "string",
  • "status": "label_created",
  • "weight_grams": 0,
  • "cost": 0,
  • "cod_amount": 0,
  • "mode": "own",
  • "currency": "string",
  • "retail": 0,
  • "cod_fee": 0,
  • "label": {
    • "format": "string",
    • "barcode": "string",
    • "service": "string",
    • "route": "string",
    • "from": {
      },
    • "to": {
      },
    • "pieces": 0,
    • "reference": "string",
    • "contents": "string"
    },
  • "pickup_ref": "string",
  • "pickup_at": "2019-08-24T14:15:22Z",
  • "events": [
    • {
      }
    ],
  • "delivered_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z"
}

merchantReturns

Scope: orders:read

Authorizations:
appToken
query Parameters
status
string (ReturnStatus)
Enum: "requested" "approved" "rejected" "received" "refunded" "exchanged"
page
integer >= 1
per_page
integer [ 1 .. 100 ]

Responses

Response Schema: application/json
required
Array of objects (ReturnSummary)
total
required
integer
page
required
integer
per_page
required
integer
open
required
integer

Returns waiting for the merchant

Response samples

Content type
application/json
{
  • "items": [
    • {
      }
    ],
  • "total": 0,
  • "page": 0,
  • "per_page": 0,
  • "open": 0
}

merchantReturn

Scope: orders:read

Authorizations:
appToken
path Parameters
id
required
string <uuid>

Responses

Response Schema: application/json
id
required
string <uuid>
number
required
integer
order_id
required
string <uuid>
order_number
required
integer
status
required
string (ReturnStatus)
Enum: "requested" "approved" "rejected" "received" "refunded" "exchanged"
resolution
required
string (ReturnResolution)
Enum: "refund" "exchange"
reason
required
string (ReturnReason)
Enum: "wrong_size" "damaged" "not_as_described" "wrong_item" "changed_mind" "other"
note
required
string
photos
required
Array of strings
merchant_note
required
string
restocked
required
boolean
refund_amount
required
integer <int64>
refund_method
required
string

card | manual

suggested_refund
required
integer <int64>

Items' value after the order's discount

max_refund
required
integer <int64>

What's left to refund on the order

exchange_order_id
required
string or null <uuid>
price_difference
integer <int64>

Exchange only: positive = the shopper pays it, negative = refunded to them

payment_method
required
string
customer_name
required
string
customer_phone
required
string
currency
required
string
required
Array of objects (ReturnItem)
created_at
required
string <date-time>
updated_at
required
string <date-time>

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "number": 0,
  • "order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe",
  • "order_number": 0,
  • "status": "requested",
  • "resolution": "refund",
  • "reason": "wrong_size",
  • "note": "string",
  • "photos": [
    • "string"
    ],
  • "merchant_note": "string",
  • "restocked": true,
  • "refund_amount": 0,
  • "refund_method": "string",
  • "suggested_refund": 0,
  • "max_refund": 0,
  • "exchange_order_id": "fada7d0f-ca50-498f-8ea8-24ba1cc005e1",
  • "price_difference": 0,
  • "payment_method": "string",
  • "customer_name": "string",
  • "customer_phone": "string",
  • "currency": "string",
  • "items": [
    • {
      }
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Customers

merchantCustomers

Scope: customers:read

Authorizations:
appToken
query Parameters
q
string
page
integer >= 1
per_page
integer [ 1 .. 100 ]

Responses

Response Schema: application/json
required
Array of objects (CustomerSummary)
total
required
integer
page
required
integer
per_page
required
integer

Response samples

Content type
application/json
{
  • "items": [
    • {
      }
    ],
  • "total": 0,
  • "page": 0,
  • "per_page": 0
}

getCustomer

Scope: customers:read

Authorizations:
appToken
path Parameters
id
required
string <uuid>

Responses

Response Schema: application/json
required
object (CustomerSummary)
required
Array of objects (OrderSummary)

Response samples

Content type
application/json
{
  • "customer": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "name": "string",
    • "phone": "string",
    • "email": "string",
    • "marketing_consent": true,
    • "anonymized": true,
    • "orders_count": 0,
    • "total_spent": 0,
    • "last_order_at": "2019-08-24T14:15:22Z",
    • "created_at": "2019-08-24T14:15:22Z"
    },
  • "orders": [
    • {
      }
    ]
}

Discounts

merchantDiscounts

Scope: discounts:read

Authorizations:
appToken

Responses

Response Schema: application/json
Array
id
required
string <uuid>
kind
required
string (DiscountKind)
Enum: "code" "automatic"
code
required
string
title
required
string
type
required
string (DiscountType)
Enum: "percent" "fixed" "free_shipping" "buy_x_get_y"

buy_x_get_y: for every buy_quantity + get_quantity covered pieces, the cheapest get_quantity come value% off (100: free); it repeats

value
required
integer <int64>

Whole percent for percent and buy_x_get_y; minor units for fixed

required
Money (integer) or null
starts_at
required
string <date-time>
ends_at
required
string or null <date-time>
usage_limit
required
integer or null
usage_count
required
integer
per_customer_limit
required
integer or null

Orders one customer (phone number) can use it on; null: no limit

once_per_customer
required
boolean

per_customer_limit is 1 (kept for older clients)

active
required
boolean
applies_to
required
string (DiscountScope)
Enum: "all" "categories" "products"

What the discount covers. Percent and fixed amounts come off the matching products only; free shipping is always for the whole order.

target_ids
required
Array of strings <uuid> [ items <uuid > ]

Category ids (applies_to=categories) or product ids (applies_to=products)

min_quantity
required
integer or null

Pieces of the covered products the discount needs (not for buy_x_get_y)

buy_quantity
required
integer or null

buy_x_get_y: pieces the shopper pays for in each group

get_quantity
required
integer or null

buy_x_get_y: pieces in each group that come value% off

required
Money (integer) or null

percent and buy_x_get_y: the most it takes off

class
required
string (DiscountClass)
Enum: "product" "order" "shipping"

product: covers some products or categories, or buy_x_get_y. order: percent or fixed off the whole cart. shipping: free shipping. A cart gets at most one of each, product first, then order on what is left, then shipping; each one's minimums are checked after the earlier ones came off.

combines_with
required
Array of strings (DiscountClass)
Items Enum: "product" "order" "shipping"

The other classes it stacks with; two discounts stack only when each allows the other's class

total_discounted
required
integer <int64> (Money)

Minor units (halalas)

created_at
required
string <date-time>

Response samples

Content type
application/json
[
  • {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "kind": "code",
    • "code": "string",
    • "title": "string",
    • "type": "percent",
    • "value": 0,
    • "min_subtotal": 0,
    • "starts_at": "2019-08-24T14:15:22Z",
    • "ends_at": "2019-08-24T14:15:22Z",
    • "usage_limit": 0,
    • "usage_count": 0,
    • "per_customer_limit": 0,
    • "once_per_customer": true,
    • "active": true,
    • "applies_to": "all",
    • "target_ids": [
      ],
    • "min_quantity": 0,
    • "buy_quantity": 0,
    • "get_quantity": 0,
    • "max_discount": 0,
    • "class": "product",
    • "combines_with": [
      ],
    • "total_discounted": 0,
    • "created_at": "2019-08-24T14:15:22Z"
    }
]

createDiscount

Scope: discounts:write

Authorizations:
appToken
Request Body schema: application/json
required
kind
required
string (DiscountKind)
Enum: "code" "automatic"
code
string
title
required
string
type
required
string (DiscountType)
Enum: "percent" "fixed" "free_shipping" "buy_x_get_y"

buy_x_get_y: for every buy_quantity + get_quantity covered pieces, the cheapest get_quantity come value% off (100: free); it repeats

value
required
integer <int64>
Money (integer) or null
starts_at
string or null <date-time>
ends_at
string or null <date-time>
usage_limit
integer or null
per_customer_limit
integer or null

1-1000, at most usage_limit

once_per_customer
boolean

Same as per_customer_limit 1, when per_customer_limit is not given

active
required
boolean
applies_to
string (DiscountScope)
Enum: "all" "categories" "products"

What the discount covers. Percent and fixed amounts come off the matching products only; free shipping is always for the whole order.

target_ids
Array of strings <uuid> [ items <uuid > ]
min_quantity
integer or null
buy_quantity
integer or null
get_quantity
integer or null
Money (integer) or null

percent and buy_x_get_y only; ignored otherwise

combines_with
Array of strings (DiscountClass)
Items Enum: "product" "order" "shipping"

Its own class is ignored. Leaving it out means it never stacks.

Responses

Response Schema: application/json
id
required
string <uuid>
kind
required
string (DiscountKind)
Enum: "code" "automatic"
code
required
string
title
required
string
type
required
string (DiscountType)
Enum: "percent" "fixed" "free_shipping" "buy_x_get_y"

buy_x_get_y: for every buy_quantity + get_quantity covered pieces, the cheapest get_quantity come value% off (100: free); it repeats

value
required
integer <int64>

Whole percent for percent and buy_x_get_y; minor units for fixed

required
Money (integer) or null
starts_at
required
string <date-time>
ends_at
required
string or null <date-time>
usage_limit
required
integer or null
usage_count
required
integer
per_customer_limit
required
integer or null

Orders one customer (phone number) can use it on; null: no limit

once_per_customer
required
boolean

per_customer_limit is 1 (kept for older clients)

active
required
boolean
applies_to
required
string (DiscountScope)
Enum: "all" "categories" "products"

What the discount covers. Percent and fixed amounts come off the matching products only; free shipping is always for the whole order.

target_ids
required
Array of strings <uuid> [ items <uuid > ]

Category ids (applies_to=categories) or product ids (applies_to=products)

min_quantity
required
integer or null

Pieces of the covered products the discount needs (not for buy_x_get_y)

buy_quantity
required
integer or null

buy_x_get_y: pieces the shopper pays for in each group

get_quantity
required
integer or null

buy_x_get_y: pieces in each group that come value% off

required
Money (integer) or null

percent and buy_x_get_y: the most it takes off

class
required
string (DiscountClass)
Enum: "product" "order" "shipping"

product: covers some products or categories, or buy_x_get_y. order: percent or fixed off the whole cart. shipping: free shipping. A cart gets at most one of each, product first, then order on what is left, then shipping; each one's minimums are checked after the earlier ones came off.

combines_with
required
Array of strings (DiscountClass)
Items Enum: "product" "order" "shipping"

The other classes it stacks with; two discounts stack only when each allows the other's class

total_discounted
required
integer <int64> (Money)

Minor units (halalas)

created_at
required
string <date-time>

Request samples

Content type
application/json
{
  • "kind": "code",
  • "code": "string",
  • "title": "string",
  • "type": "percent",
  • "value": 0,
  • "min_subtotal": 0,
  • "starts_at": "2019-08-24T14:15:22Z",
  • "ends_at": "2019-08-24T14:15:22Z",
  • "usage_limit": 0,
  • "per_customer_limit": 0,
  • "once_per_customer": true,
  • "active": true,
  • "applies_to": "all",
  • "target_ids": [
    • "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ],
  • "min_quantity": 0,
  • "buy_quantity": 0,
  • "get_quantity": 0,
  • "max_discount": 0,
  • "combines_with": [
    • "product"
    ]
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "kind": "code",
  • "code": "string",
  • "title": "string",
  • "type": "percent",
  • "value": 0,
  • "min_subtotal": 0,
  • "starts_at": "2019-08-24T14:15:22Z",
  • "ends_at": "2019-08-24T14:15:22Z",
  • "usage_limit": 0,
  • "usage_count": 0,
  • "per_customer_limit": 0,
  • "once_per_customer": true,
  • "active": true,
  • "applies_to": "all",
  • "target_ids": [
    • "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ],
  • "min_quantity": 0,
  • "buy_quantity": 0,
  • "get_quantity": 0,
  • "max_discount": 0,
  • "class": "product",
  • "combines_with": [
    • "product"
    ],
  • "total_discounted": 0,
  • "created_at": "2019-08-24T14:15:22Z"
}

updateDiscount

Scope: discounts:write

Authorizations:
appToken
path Parameters
id
required
string <uuid>
Request Body schema: application/json
required
kind
required
string (DiscountKind)
Enum: "code" "automatic"
code
string
title
required
string
type
required
string (DiscountType)
Enum: "percent" "fixed" "free_shipping" "buy_x_get_y"

buy_x_get_y: for every buy_quantity + get_quantity covered pieces, the cheapest get_quantity come value% off (100: free); it repeats

value
required
integer <int64>
Money (integer) or null
starts_at
string or null <date-time>
ends_at
string or null <date-time>
usage_limit
integer or null
per_customer_limit
integer or null

1-1000, at most usage_limit

once_per_customer
boolean

Same as per_customer_limit 1, when per_customer_limit is not given

active
required
boolean
applies_to
string (DiscountScope)
Enum: "all" "categories" "products"

What the discount covers. Percent and fixed amounts come off the matching products only; free shipping is always for the whole order.

target_ids
Array of strings <uuid> [ items <uuid > ]
min_quantity
integer or null
buy_quantity
integer or null
get_quantity
integer or null
Money (integer) or null

percent and buy_x_get_y only; ignored otherwise

combines_with
Array of strings (DiscountClass)
Items Enum: "product" "order" "shipping"

Its own class is ignored. Leaving it out means it never stacks.

Responses

Response Schema: application/json
id
required
string <uuid>
kind
required
string (DiscountKind)
Enum: "code" "automatic"
code
required
string
title
required
string
type
required
string (DiscountType)
Enum: "percent" "fixed" "free_shipping" "buy_x_get_y"

buy_x_get_y: for every buy_quantity + get_quantity covered pieces, the cheapest get_quantity come value% off (100: free); it repeats

value
required
integer <int64>

Whole percent for percent and buy_x_get_y; minor units for fixed

required
Money (integer) or null
starts_at
required
string <date-time>
ends_at
required
string or null <date-time>
usage_limit
required
integer or null
usage_count
required
integer
per_customer_limit
required
integer or null

Orders one customer (phone number) can use it on; null: no limit

once_per_customer
required
boolean

per_customer_limit is 1 (kept for older clients)

active
required
boolean
applies_to
required
string (DiscountScope)
Enum: "all" "categories" "products"

What the discount covers. Percent and fixed amounts come off the matching products only; free shipping is always for the whole order.

target_ids
required
Array of strings <uuid> [ items <uuid > ]

Category ids (applies_to=categories) or product ids (applies_to=products)

min_quantity
required
integer or null

Pieces of the covered products the discount needs (not for buy_x_get_y)

buy_quantity
required
integer or null

buy_x_get_y: pieces the shopper pays for in each group

get_quantity
required
integer or null

buy_x_get_y: pieces in each group that come value% off

required
Money (integer) or null

percent and buy_x_get_y: the most it takes off

class
required
string (DiscountClass)
Enum: "product" "order" "shipping"

product: covers some products or categories, or buy_x_get_y. order: percent or fixed off the whole cart. shipping: free shipping. A cart gets at most one of each, product first, then order on what is left, then shipping; each one's minimums are checked after the earlier ones came off.

combines_with
required
Array of strings (DiscountClass)
Items Enum: "product" "order" "shipping"

The other classes it stacks with; two discounts stack only when each allows the other's class

total_discounted
required
integer <int64> (Money)

Minor units (halalas)

created_at
required
string <date-time>

Request samples

Content type
application/json
{
  • "kind": "code",
  • "code": "string",
  • "title": "string",
  • "type": "percent",
  • "value": 0,
  • "min_subtotal": 0,
  • "starts_at": "2019-08-24T14:15:22Z",
  • "ends_at": "2019-08-24T14:15:22Z",
  • "usage_limit": 0,
  • "per_customer_limit": 0,
  • "once_per_customer": true,
  • "active": true,
  • "applies_to": "all",
  • "target_ids": [
    • "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ],
  • "min_quantity": 0,
  • "buy_quantity": 0,
  • "get_quantity": 0,
  • "max_discount": 0,
  • "combines_with": [
    • "product"
    ]
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "kind": "code",
  • "code": "string",
  • "title": "string",
  • "type": "percent",
  • "value": 0,
  • "min_subtotal": 0,
  • "starts_at": "2019-08-24T14:15:22Z",
  • "ends_at": "2019-08-24T14:15:22Z",
  • "usage_limit": 0,
  • "usage_count": 0,
  • "per_customer_limit": 0,
  • "once_per_customer": true,
  • "active": true,
  • "applies_to": "all",
  • "target_ids": [
    • "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ],
  • "min_quantity": 0,
  • "buy_quantity": 0,
  • "get_quantity": 0,
  • "max_discount": 0,
  • "class": "product",
  • "combines_with": [
    • "product"
    ],
  • "total_discounted": 0,
  • "created_at": "2019-08-24T14:15:22Z"
}

deleteDiscount

Scope: discounts:write

Authorizations:
appToken
path Parameters
id
required
string <uuid>

Responses

Response samples

Content type
application/problem+json
{
  • "type": "string",
  • "title": "string",
  • "status": 0,
  • "detail": "string",
  • "code": "string",
  • "fields": {
    • "property1": "string",
    • "property2": "string"
    }
}

Webhooks

webhookDeliveries

Scope: any app token

Authorizations:
appToken
query Parameters
subscription_id
string <uuid>
topic
string
status
string
Enum: "pending" "delivered" "failed"
page
integer >= 1
per_page
integer [ 1 .. 100 ]

Responses

Response Schema: application/json
required
Array of objects (WebhookDelivery)
total
required
integer
page
required
integer
per_page
required
integer

Response samples

Content type
application/json
{
  • "items": [
    • {
      }
    ],
  • "total": 0,
  • "page": 0,
  • "per_page": 0
}

webhookDelivery

Scope: any app token

Authorizations:
appToken
path Parameters
id
required
string <uuid>

Responses

Response Schema: application/json
id
required
string <uuid>
subscription_id
required
string <uuid>
event_id
required
string <uuid>

Same for every delivery and replay of one event: de-duplicate on it

topic
required
string
status
required
string
Enum: "pending" "delivered" "failed"
attempts
required
integer
next_attempt_at
required
string or null <date-time>
last_status
required
integer or null

The receiver's HTTP status

last_error
required
string
last_response
string

First 2 KB of the receiver's answer (detail only)

last_duration_ms
required
integer or null
replay_of
required
string or null <uuid>
created_at
required
string <date-time>
delivered_at
required
string or null <date-time>
payload
any

The exact body sent (detail only)

store_id
string <uuid>

Developer console only

store_name
string

Developer console only

url
string

Developer console only

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "subscription_id": "aa11a4c2-a467-43db-b413-c4ab0f5cf627",
  • "event_id": "a7a26ff2-e851-45b6-9634-d595f45458b7",
  • "topic": "string",
  • "status": "pending",
  • "attempts": 0,
  • "next_attempt_at": "2019-08-24T14:15:22Z",
  • "last_status": 0,
  • "last_error": "string",
  • "last_response": "string",
  • "last_duration_ms": 0,
  • "replay_of": "eb051ed0-925f-449a-a6c5-0c118d499f91",
  • "created_at": "2019-08-24T14:15:22Z",
  • "delivered_at": "2019-08-24T14:15:22Z",
  • "payload": null,
  • "store_id": "7fe87115-950c-4ae8-bd7e-970406bc9ac0",
  • "store_name": "string",
  • "url": "string"
}

Send a delivery's payload again, now

Scope: any app token

Authorizations:
appToken
path Parameters
id
required
string <uuid>

Responses

Response Schema: application/json
id
required
string <uuid>
subscription_id
required
string <uuid>
event_id
required
string <uuid>

Same for every delivery and replay of one event: de-duplicate on it

topic
required
string
status
required
string
Enum: "pending" "delivered" "failed"
attempts
required
integer
next_attempt_at
required
string or null <date-time>
last_status
required
integer or null

The receiver's HTTP status

last_error
required
string
last_response
string

First 2 KB of the receiver's answer (detail only)

last_duration_ms
required
integer or null
replay_of
required
string or null <uuid>
created_at
required
string <date-time>
delivered_at
required
string or null <date-time>
payload
any

The exact body sent (detail only)

store_id
string <uuid>

Developer console only

store_name
string

Developer console only

url
string

Developer console only

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "subscription_id": "aa11a4c2-a467-43db-b413-c4ab0f5cf627",
  • "event_id": "a7a26ff2-e851-45b6-9634-d595f45458b7",
  • "topic": "string",
  • "status": "pending",
  • "attempts": 0,
  • "next_attempt_at": "2019-08-24T14:15:22Z",
  • "last_status": 0,
  • "last_error": "string",
  • "last_response": "string",
  • "last_duration_ms": 0,
  • "replay_of": "eb051ed0-925f-449a-a6c5-0c118d499f91",
  • "created_at": "2019-08-24T14:15:22Z",
  • "delivered_at": "2019-08-24T14:15:22Z",
  • "payload": null,
  • "store_id": "7fe87115-950c-4ae8-bd7e-970406bc9ac0",
  • "store_name": "string",
  • "url": "string"
}

webhooks

Scope: any app token

Authorizations:
appToken

Responses

Response Schema: application/json
Array
id
required
string <uuid>
url
required
string
topics
required
Array of strings
Items Enum: "order.created" "order.updated" "order.refunded" "product.created" "product.updated" "product.deleted" "app.uninstalled"
status
required
string
Enum: "active" "disabled"
disabled_reason
required
string
Enum: "" "failing" "uninstalled"

failing: five deliveries in a row ran out of retries. Saving the subscription re-enables it.

consecutive_failures
required
integer
installation_id
required
string or null <uuid>

The app that made it; null when the merchant did

created_at
required
string <date-time>
secret
string

The signing secret (whsec_…), only right after creation or rotation

Response samples

Content type
application/json
[
  • {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "url": "string",
    • "topics": [
      ],
    • "status": "active",
    • "disabled_reason": "",
    • "consecutive_failures": 0,
    • "installation_id": "91166175-c6a9-4caf-88e9-3147ffc9c934",
    • "created_at": "2019-08-24T14:15:22Z",
    • "secret": "string"
    }
]

createWebhook

Scope: any app token

Authorizations:
appToken
Request Body schema: application/json
required
url
required
string

https only

topics
required
Array of strings non-empty

Responses

Response Schema: application/json
id
required
string <uuid>
url
required
string
topics
required
Array of strings
Items Enum: "order.created" "order.updated" "order.refunded" "product.created" "product.updated" "product.deleted" "app.uninstalled"
status
required
string
Enum: "active" "disabled"
disabled_reason
required
string
Enum: "" "failing" "uninstalled"

failing: five deliveries in a row ran out of retries. Saving the subscription re-enables it.

consecutive_failures
required
integer
installation_id
required
string or null <uuid>

The app that made it; null when the merchant did

created_at
required
string <date-time>
secret
string

The signing secret (whsec_…), only right after creation or rotation

Request samples

Content type
application/json
{
  • "url": "string",
  • "topics": [
    • "string"
    ]
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "url": "string",
  • "topics": [
    • "order.created"
    ],
  • "status": "active",
  • "disabled_reason": "",
  • "consecutive_failures": 0,
  • "installation_id": "91166175-c6a9-4caf-88e9-3147ffc9c934",
  • "created_at": "2019-08-24T14:15:22Z",
  • "secret": "string"
}

webhook

Scope: any app token

Authorizations:
appToken
path Parameters
id
required
string <uuid>

Responses

Response Schema: application/json
id
required
string <uuid>
url
required
string
topics
required
Array of strings
Items Enum: "order.created" "order.updated" "order.refunded" "product.created" "product.updated" "product.deleted" "app.uninstalled"
status
required
string
Enum: "active" "disabled"
disabled_reason
required
string
Enum: "" "failing" "uninstalled"

failing: five deliveries in a row ran out of retries. Saving the subscription re-enables it.

consecutive_failures
required
integer
installation_id
required
string or null <uuid>

The app that made it; null when the merchant did

created_at
required
string <date-time>
secret
string

The signing secret (whsec_…), only right after creation or rotation

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "url": "string",
  • "topics": [
    • "order.created"
    ],
  • "status": "active",
  • "disabled_reason": "",
  • "consecutive_failures": 0,
  • "installation_id": "91166175-c6a9-4caf-88e9-3147ffc9c934",
  • "created_at": "2019-08-24T14:15:22Z",
  • "secret": "string"
}

updateWebhook

Scope: any app token

Authorizations:
appToken
path Parameters
id
required
string <uuid>
Request Body schema: application/json
required
url
required
string

https only

topics
required
Array of strings non-empty

Responses

Response Schema: application/json
id
required
string <uuid>
url
required
string
topics
required
Array of strings
Items Enum: "order.created" "order.updated" "order.refunded" "product.created" "product.updated" "product.deleted" "app.uninstalled"
status
required
string
Enum: "active" "disabled"
disabled_reason
required
string
Enum: "" "failing" "uninstalled"

failing: five deliveries in a row ran out of retries. Saving the subscription re-enables it.

consecutive_failures
required
integer
installation_id
required
string or null <uuid>

The app that made it; null when the merchant did

created_at
required
string <date-time>
secret
string

The signing secret (whsec_…), only right after creation or rotation

Request samples

Content type
application/json
{
  • "url": "string",
  • "topics": [
    • "string"
    ]
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "url": "string",
  • "topics": [
    • "order.created"
    ],
  • "status": "active",
  • "disabled_reason": "",
  • "consecutive_failures": 0,
  • "installation_id": "91166175-c6a9-4caf-88e9-3147ffc9c934",
  • "created_at": "2019-08-24T14:15:22Z",
  • "secret": "string"
}

deleteWebhook

Scope: any app token

Authorizations:
appToken
path Parameters
id
required
string <uuid>

Responses

Response samples

Content type
application/problem+json
{
  • "type": "string",
  • "title": "string",
  • "status": 0,
  • "detail": "string",
  • "code": "string",
  • "fields": {
    • "property1": "string",
    • "property2": "string"
    }
}

rotateWebhookSecret

Scope: any app token

Authorizations:
appToken
path Parameters
id
required
string <uuid>

Responses

Response Schema: application/json
id
required
string <uuid>
url
required
string
topics
required
Array of strings
Items Enum: "order.created" "order.updated" "order.refunded" "product.created" "product.updated" "product.deleted" "app.uninstalled"
status
required
string
Enum: "active" "disabled"
disabled_reason
required
string
Enum: "" "failing" "uninstalled"

failing: five deliveries in a row ran out of retries. Saving the subscription re-enables it.

consecutive_failures
required
integer
installation_id
required
string or null <uuid>

The app that made it; null when the merchant did

created_at
required
string <date-time>
secret
string

The signing secret (whsec_…), only right after creation or rotation

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "url": "string",
  • "topics": [
    • "order.created"
    ],
  • "status": "active",
  • "disabled_reason": "",
  • "consecutive_failures": 0,
  • "installation_id": "91166175-c6a9-4caf-88e9-3147ffc9c934",
  • "created_at": "2019-08-24T14:15:22Z",
  • "secret": "string"
}

Send a webhook.test event now

Scope: any app token

Authorizations:
appToken
path Parameters
id
required
string <uuid>

Responses

Response Schema: application/json
id
required
string <uuid>
subscription_id
required
string <uuid>
event_id
required
string <uuid>

Same for every delivery and replay of one event: de-duplicate on it

topic
required
string
status
required
string
Enum: "pending" "delivered" "failed"
attempts
required
integer
next_attempt_at
required
string or null <date-time>
last_status
required
integer or null

The receiver's HTTP status

last_error
required
string
last_response
string

First 2 KB of the receiver's answer (detail only)

last_duration_ms
required
integer or null
replay_of
required
string or null <uuid>
created_at
required
string <date-time>
delivered_at
required
string or null <date-time>
payload
any

The exact body sent (detail only)

store_id
string <uuid>

Developer console only

store_name
string

Developer console only

url
string

Developer console only

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "subscription_id": "aa11a4c2-a467-43db-b413-c4ab0f5cf627",
  • "event_id": "a7a26ff2-e851-45b6-9634-d595f45458b7",
  • "topic": "string",
  • "status": "pending",
  • "attempts": 0,
  • "next_attempt_at": "2019-08-24T14:15:22Z",
  • "last_status": 0,
  • "last_error": "string",
  • "last_response": "string",
  • "last_duration_ms": 0,
  • "replay_of": "eb051ed0-925f-449a-a6c5-0c118d499f91",
  • "created_at": "2019-08-24T14:15:22Z",
  • "delivered_at": "2019-08-24T14:15:22Z",
  • "payload": null,
  • "store_id": "7fe87115-950c-4ae8-bd7e-970406bc9ac0",
  • "store_name": "string",
  • "url": "string"
}

oauth

Exchange an authorisation code for an access token

RFC 6749 §4.1.3. Send the body form-encoded or as JSON. Codes are single use and expire after ten minutes. A new exchange revokes the installation's previous token.

Request Body schema:
required
grant_type
required
string
Value: "authorization_code"
code
required
string
redirect_uri
required
string

The redirect_uri the authorisation used

client_id
required
string
client_secret
required
string

Or send client_id/client_secret with HTTP Basic auth

Responses

Response Schema: application/json
access_token
required
string
token_type
required
string
Value: "bearer"
scope
required
string
store_id
required
string <uuid>

Request samples

Content type
No sample

Response samples

Content type
application/json
{
  • "access_token": "nouq_at_…",
  • "token_type": "bearer",
  • "scope": "products:read orders:read",
  • "store_id": "7fe87115-950c-4ae8-bd7e-970406bc9ac0"
}