Skip to content
aYOUne
← E-Commerce API

Orders

Singular: Order — Base URL: https://ecommerce-api.ayoune.app — Access: CRUD — Machine-readable spec (JSON · YAML)

Try it now beta

Requests are proxied through the consumer-app to *.ayoune.app. Tokens stay in your browser and are forwarded per call.

Example response (recorded) sample

A real, previously recorded GET /:id response of this endpoint — not the live call above. Sensitive fields are masked.

{
  "payload": {
    "_id": "6ab22701497e7e1a3405685d",
    "createdAt": "2026-08-05T09:00:00.000Z",
    "updatedAt": "2026-08-05T09:00:00.000Z",
    "_consumerID": "6ab226fe497e7e1a3405673b",
    "orderNumber": "AUF-TOL-2026-0010",
    "status": "cancelled",
    "positions": [
      {
        "productId": "6ab22700497e7e1a3405680e",
        "qty": 1,
        "price": 590.39,
        "tax": 19
      }
    ],
    "currency": "EUR",
    "net_total": 590.39,
    "tax_total": 112.17,
    "discount_total": 0,
    "shipping_total": 0,
    "total": 702.56,
    "paymentProvider": "stripe",
    "shares": []
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://ecommerce-api.ayoune.app/orders/6ab22701497e7e1a3405685d",
        "method": "get",
        "title": "GET",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "Consumers",
        "title": "MODEL_CONSUMER",
        "href": "https://api.ayoune.app/crm/consumers/6ab226fe497e7e1a3405673b",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "crm.consumers"
      }
    ],
    "relations": [
      {
        "rel": "Consumers",
        "title": "MODEL_CONSUMER",
        "href": "https://api.ayoune.app/crm/consumers",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "crm.consumers"
      },
      {
        "rel": "ShoppingCarts",
        "title": "MODEL_SHOPPINGCART",
        "href": "https://api.ayoune.app/ecommerce/shoppingcarts",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "ecommerce.shoppingcarts"
      },
      {
        "rel": "PaymentTransactions",
        "title": "MODEL_PAYMENTTRANSACTION",
        "href": "https://api.ayoune.app/payments/paymenttransactions",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "payments.paymenttransactions"
      },
      {
        "rel": "Affiliates",
        "title": "MODEL_AFFILIATE",
        "href": "https://api.ayoune.app/config/affiliates",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "config.affiliates"
      },
      {
        "rel": "AffiliateAttributions",
        "title": "MODEL_AFFILIATEATTRIBUTION",
        "href": "https://api.ayoune.app/affiliate/affiliateattributions",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "affiliate.attributions"
      },
      {
        "rel": "CommissionSettlements",
        "title": "MODEL_COMMISSIONSETTLEMENT",
        "href": "https://api.ayoune.app/sale/commissionsettlements",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "sale.commissionsettlements"
      },
      {
        "rel": "Websites",
        "title": "MODEL_WEBSITE",
        "href": "https://api.ayoune.app/cms/websites",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "cms.websites"
      },
      {
        "rel": "ShippingMethods",
        "title": "MODEL_SHIPPINGMETHOD",
        "href": "https://api.ayoune.app/ecommerce/shippingmethods",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "ecommerce.shippingmethods"
      },
      {
        "rel": "Contracts",
        "title": "MODEL_CONTRACT",
        "href": "https://api.ayoune.app/sale/contracts",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "sale.contracts"
      }
    ],
    "debugId": "6adec9d7039adaf9a7a32f1f",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_ORDER",
        "href": "https://api.ayoune.app/ecommerce/orders/6ab22701497e7e1a3405685d/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_ORDER",
        "href": "https://api.ayoune.app/ecommerce/orders/6ab22701497e7e1a3405685d",
        "method": "delete",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.17.0",
      "core": "2026.388.0"
    },
    "rateLimit": {
      "limit": "10000",
      "remaining": "9900",
      "reset": "1792989127",
      "resetDate": "Mon Oct 26 2026"
    },
    "responseTime": 102.878649,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpoints

MethodPathDescriptionRight
GET /orders List with filters/pagination ecommerce.orders.view
GET /orders/:id Single record ecommerce.orders.view
POST /orders Create new record ecommerce.orders.new
PUT /orders Update record ecommerce.orders.edit
DELETE /orders/:id Delete record ecommerce.orders.delete

SDK

import { aYOUne } from '@tolinax/ayoune';
const ay = new aYOUne('pat_your_token');

// List all
const list = await ay.ecommerce.orders.find().limit(10).exec();

// Single record
const one = await ay.ecommerce.orders.findById('OBJECT_ID').exec();

// Create
const created = await ay.ecommerce.orders.create({ name: 'Foo' });

See also